]> git.proxmox.com Git - grub2.git/blame - ChangeLog
Cheery-pick grub-emu split from experimental (rev 1361)
[grub2.git] / ChangeLog
CommitLineData
f84b481b
RM
12009-11-23 Robert Millan <rmh.grub@aybabtu.com>
2
3 * configure.ac: Detect all `emu' platforms. Define
4 GRUB_MACHINE_* macros in TARGET_CFLAGS. Remove
5 --enable-grub-emu logic. Disable include/grub/machine
6 symlink on `emu' platforms.
7
8 * genkernsyms.sh.in: Use @TARGET_CFLAGS@ during symbol generation.
9 * gensymlist.sh.in: Likewise.
10
11 * include/grub/i386/coreboot/machine.h: Remove file.
12 * include/grub/i386/efi/machine.h: Likewise.
13 * include/grub/i386/ieee1275/machine.h: Likewise.
14 * include/grub/i386/pc/machine.h: Likewise.
15 * include/grub/i386/qemu/machine.h: Likewise.
16 * include/grub/powerpc/ieee1275/machine.h: Likewise.
17 * include/grub/sparc64/ieee1275/machine.h: Likewise.
18 * include/grub/x86_64/efi/machine.h: Likewise.
19
20 * commands/acpi.c: Remove `<grub/machine/machine.h>'.
21 * commands/halt.c: Likewise.
22 * commands/reboot.c: Likewise.
23 * include/grub/autoefi.h: Likewise.
24 * include/grub/i386/at_keyboard.h: Likewise.
25 * include/grub/i386/kernel.h: Likewise.
26 * include/grub/i386/loader.h: Likewise.
27 * include/grub/i386/pc/memory.h: Likewise.
28 * kern/dl.c: Likewise.
29 * kern/i386/coreboot/init.c: Likewise.
30 * loader/i386/bsd.c: Likewise.
31 * loader/i386/linux.c: Likewise.
32 * loader/multiboot_loader.c: Likewise.
33 * term/i386/pc/serial.c: Likewise.
34 * term/usb_keyboard.c: Likewise.
35
36 * include/grub/time.h [!GRUB_MACHINE_EMU]: Remove
37 `<grub/machine/machine.h>'
38 [!GRUB_MACHINE_EMU] (GRUB_TICKS_PER_SECOND): New macro.
39 * util/misc.c: Remove `<grub/machine/machine.h>' and
40 `<grub/machine/time.h>'.
41
42 * Makefile.in (enable_grub_emu): Remove variable.
43 Include $(srcdir)/conf/any-emu.mk for the `emu' platform.
44
45 * conf/any-emu.rmk: New file.
46 * conf/common.rmk (grub_emu_init.lst, grub_emu_init.h)
47 (grub_emu_init.c): Move from here ...
48 * conf/any-emu.rmk: ... to here.
49
50 * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-emu'.
51 (grub_emu_SOURCES, grub_emu_LDFLAGS): Move from here ...
52 * conf/any-emu.rmk: ... to here.
53
4efeab03
RM
542009-11-23 Robert Millan <rmh.grub@aybabtu.com>
55
56 * include/grub/parser.h (grub_parser_register): Document need
57 of `name' parameter.
58 * normal/main.c (grub_normal_read_line): Simplify prompt string.
59 * script/sh/main.c (grub_sh_parser, GRUB_MOD_INIT(sh)): Rename
60 "sh" to "grub".
61
ea1dd8bf
RM
622009-11-23 Robert Millan <rmh.grub@aybabtu.com>
63
64 * Makefile.in ($(srcdir)/po/$(PACKAGE).pot): Pass --keyword=N_ to
65 `$(XGETTEXT)'.
66 * include/grub/i18n.h (N_): New macro.
67 * util/mkisofs/mkisofs.h: Likewise.
68 * util/mkisofs/mkisofs.c (ld_options): Wrap all translatable strings
69 around N_().
70 (usage): Use gettext() to translate help strings when printing them.
71
0c140626
RM
722009-11-23 Robert Millan <rmh.grub@aybabtu.com>
73
74 Based on patch from Bean
75 (http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00384.html)
76
77 * video/efi_fb.c: New file.
78 * conf/i386-efi.rmk (pkglib_MODULES): Add `efi_fb.mod'.
79 (efi_fb_mod_SOURCES, efi_fb_mod_CFLAGS, efi_fb_mod_LDFLAGS): New
80 variables.
81 * conf/x86_64-efi.rmk: Likewise.
82
87d58298
RM
832009-11-22 Robert Millan <rmh.grub@aybabtu.com>
84
85 * util/i386/pc/grub-mkimage.c: Ungettextize grub_util_info() strings.
86 * util/i386/pc/grub-setup.c: Likewise.
87
994cc3a3
ST
882009-11-21 Samuel Thibault <samuel.thibault@ens-lyon.org>
89
90 * util/getroot.c [__GNU__]: Include <hurd.h>, <hurd/lookup.h>, and
91 <hurd/fs.h>
92 [__GNU__] (grub_guess_root_device): Call file_name_lookup and
93 file_get_storage_info to implement grub_guess_root_device.
94
26a61d6a
FZ
952009-11-21 Felix Zielcke <fzielcke@z-51.de>
96
97 * Makefile.in (target): Use make's builtin $(shell) function
98 instead of calling directly $(SHELL) to create the locale directories,
99 inside the $(foreach) function.
100
74ff1dd5
FZ
1012009-11-21 Felix Zielcke <fzielcke@z-51.de>
102
103 * util/grub-mkrescue.in: Print an error and usage if output option
104 has not been given.
105
0b787d0e
FZ
1062009-11-21 Felix Zielcke <fzielcke@z-51.de>
107
108 Patch from Loïc Minier <loic.minier@ubuntu.com>.
109 * util/grub.d/30_os-prober.in: Cope with Linux entries where
110 root and /boot are on different devices.
111
1164b270
RM
1122009-11-21 Robert Millan <rmh.grub@aybabtu.com>
113
114 Fix build for srcdir != objdir.
115
116 * Makefile.in (po/$(PACKAGE).pot): Rename to ...
117 ($(srcdir)/po/$(PACKAGE).pot): ... this. Run $(XGETTEXT) from
118 $(srcdir).
119 ($(foreach lang, $(LINGUAS), po/$(lang).po)): Rename to ...
120 ($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): ... this. Use $^
121 reference for input.
122
13774a2f
RM
1232009-11-21 Robert Millan <rmh.grub@aybabtu.com>
124
125 * util/grub-mkrescue.in: Use source directory direcly (without copiing
126 or hardlinking it). Remove -J option, Joliet is not compatible with
127 multiple source directories.
128
efda854e
RM
1292009-11-21 Carles Pina i Estany <carles@pina.cat>
1302009-11-21 Robert Millan <rmh.grub@aybabtu.com>
131
132 * util/grub-mkrescue.in: Recognize `--override-directory' option.
133 (process_input_dir): New function. Process an arbitrary input
134 directory.
135 Misc adjustments to support both "override mode" and system-wide mode.
136
6c09890c
FZ
1372009-11-20 Felix Zielcke <fzielcke@z-51.de>
138
139 * configure.ac (UNIFONT_BDF): Rename to ...
140 (FONT_SOURCE): ... this. Update all users.
141
a797824f
FZ
1422009-11-20 Felix Zielcke <fzielcke@z-51.de>
143
144 * configure.ac: Add `/usr/share/fonts/X11/misc/unifont.pcf.gz'
145 to the list of unifont files to look for.
146
cd4f42b0
RM
1472009-11-19 Robert Millan <rmh.grub@aybabtu.com>
148
149 Patch from Joe Auricchio <jauricchio@gmail.com>
150 * commands/minicmd.c (grub_mini_cmd_clear): New function.
151 (GRUB_MOD_INIT(minicmd)): Register grub_mini_cmd_clear().
152 (GRUB_MOD_FINI(minicmd)): Unregister grub_mini_cmd_clear().
153
393c783d
FZ
1542009-11-19 Felix Zielcke <fzielcke@z-51.de>
155
156 * Makefile.in (install-local): Add a missing backslash.
157
b2f1e327
FZ
1582009-11-19 Felix Zielcke <fzielcke@z-51.de>
159
160 * include/grub/x86_64/io.h: New file.
161
f577f7a0
RM
1622009-11-19 Robert Millan <rmh.grub@aybabtu.com>
163
164 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `gnulib/progname.c'.
165 * util/i386/pc/grub-setup.c: Include `<grub/i18n.h>'.
166 Include `"progname.h"'.
167 (main): Initialize gettext.
168 * util/i386/pc/grub-setup.c: Gettexttize.
169 * util/i386/pc/grub-mkimage.c: Likewise.
170
171 * Makefile.in (po/*.po): Redefine as ...
172 ($(foreach lang, $(LINGUAS), po/$(lang).po)): ... this.
173
174 * po/POTFILES: Add `util/i386/pc/grub-setup.c'.
175
c37943b6
RM
1762009-11-19 Robert Millan <rmh.grub@aybabtu.com>
177
178 * conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/progname.c'.
179 * util/mkisofs/mkisofs.c: Include `"progname.h"'.
180 (program_name): Remove.
181 (main): Initialize gettext support.
6323f705
RM
182 * util/mkisofs/mkisofs.h: Include `<locale.h>'.
183 Include `<libintl.h>'.
184 (_): New macro.
c37943b6
RM
185
186 * util/mkisofs/eltorito.c: Gettexttize.
187 * util/mkisofs/joliet.c: Likewise.
188 * util/mkisofs/mkisofs.c: Likewise.
c37943b6
RM
189 * util/mkisofs/multi.c: Likewise.
190 * util/mkisofs/rock.c: Likewise.
191 * util/mkisofs/tree.c: Likewise.
192 * util/mkisofs/write.c: Likewise.
193
194 * po/POTFILES: Update with new files.
195
5ce77c6e
RM
1962009-11-18 Robert Millan <rmh.grub@aybabtu.com>
197
198 * util/mkisofs/eltorito.c: Fix minor mistake in license text.
199 * util/mkisofs/iso9660.h: Likewise.
200 * util/mkisofs/joliet.c: Likewise.
201 * util/mkisofs/mkisofs.c: Likewise.
202 * util/mkisofs/mkisofs.h: Likewise.
203 * util/mkisofs/rock.c: Likewise.
204 * util/mkisofs/tree.c: Likewise.
205 * util/mkisofs/write.c: Likewise.
206
207 * util/mkisofs/eltorito.c (rcsid): Remove.
208 * util/mkisofs/hash.c: Likewise.
209 * util/mkisofs/joliet.c: Likewise.
210 * util/mkisofs/name.c: Likewise.
211 * util/mkisofs/rock.c: Likewise.
212 * util/mkisofs/tree.c: Likewise.
213 * util/mkisofs/write.c: Likewise.
214
1dabbc77
RM
2152009-11-18 Robert Millan <rmh.grub@aybabtu.com>
216
217 * util/mkisofs/match.c: Rewrite from scratch, using a linked list
218 instead of static allocation.
219 * util/mkisofs/match.h: Likewise.
220
633877cb
RM
2212009-11-18 Robert Millan <rmh.grub@aybabtu.com>
222
223 * po/POTFILES-shell: New file. List `util/grub.d/10_kfreebsd.in'
224 and `util/grub.d/10_linux.in'.
225 * Makefile.in (po/$(PACKAGE).pot): Process `po/POTFILES-shell' for
226 translatable Shell files.
227
af1c0c85
RM
2282009-11-18 Robert Millan <rmh.grub@aybabtu.com>
229
230 * Makefile.in ($(srcdir)/aclocal.m4): New target.
231
769ae37b
RM
2322009-11-17 Robert Millan <rmh.grub@aybabtu.com>
233
234 * INSTALL: Document Automake is needed for bootstrap.
235 * po/ca.po: Fix PO-Revision-Date and Language-Team fields.
236 * util/grub.d/10_kfreebsd.in (bindir): New variable.
237 Add gettext initialization.
238 (kfreebsd_entry): Make menuentry output translatable.
239
2402009-11-17 Robert Millan <rmh.grub@aybabtu.com>
241
242 * Makefile.in (XGETTEXT, MSGMERGE, MSGFMT): New variables.
243 (po/$(PACKAGE).pot): Replace `xgettext' with `$(XGETTEXT)'.
244 (po/*.po): Replace `msgmerge' with `$(MSGMERGE)'.
245 (po/%.mo): Replace `msgfmt' with `$(MSGFMT)'.
246 (LINGUAS): Auto-generate using `po/LINGUAS'.
247 * po/LINGUAS: New file.
248
2492009-11-17 Robert Millan <rmh.grub@aybabtu.com>
250
251 * configure.ac: Call AM_GNU_GETTEXT() (defines localedir, among
252 other things).
253 * Makefile.in (CPPFLAGS): Add `-DLOCALEDIR=\"$(localedir)\"'.
254 * util/i386/pc/grub-mkimage.c (main): Issue setlocale() and
255 bindtextdomain() calls for gettext initialization.
256
2572009-11-17 Robert Millan <rmh.grub@aybabtu.com>
258
259 * gnulib/progname.c: New file (imported from Gnulib).
260 * gnulib/progname.h: Likewise.
261 * conf/i386-pc.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
262 * util/i386/pc/grub-mkimage.c: Include `"progname.h"'.
263 (usage): Replace `progname' with `program_name'.
264 (main): Use set_program_name() for program name initialization.
265
2662009-11-17 Robert Millan <rmh.grub@aybabtu.com>
267
268 * conf/common.rmk (grub_mkisofs_CFLAGS): Move `-I$(srcdir)/gnulib'
269 from here ...
270 * Makefile.in (CPPFLAGS): ... to here.
271
2722009-11-16 Robert Millan <rmh.grub@aybabtu.com>
273
274 * aclocal.m4: Move from here ...
275 * acinclude.m4: ... to here.
276 * autogen.sh: Add call to `aclocal'.
277 * configure.ac: Add AM_INIT_AUTOMAKE() after AC_INIT() call.
278
2792009-11-16 Robert Millan <rmh.grub@aybabtu.com>
280
281 * Makefile.in (CLEANFILES): Add `po/*.mo'.
282 (LINGUAS): New variable.
283 (all-local): Add `$(foreach lang, $(LINGUAS), po/$(lang).mo)'.
284 (install-local): Install MO files.
285 (po/$(PACKAGE).pot, po/*.po, po/%.mo): New rules.
286 * include/grub/i18n.h: New file.
287 * po/POTFILES: New file.
288 * po/ca.po: New file.
289 * util/grub.d/10_linux.in (bindir): New variable.
290 Add gettext initialization.
291 (linux_entry): Make menuentry output translatable.
292 * util/i386/pc/grub-mkimage.c: Include `<grub/i18n.h>'.
293 (usage): Make --help output translatable.
294 (main): Initialize gettext.
295
02c0a6ad
RM
2962009-11-17 Robert Millan <rmh.grub@aybabtu.com>
297
298 * import_gcry.py: New file (written by Vladimir with minor
299 adjustments).
300 * autogen.sh: Use import_gcry.py to auto-generate GRUB-ified
301 ciphers.
302 * INSTALL: Document that Python is required for bootstrap.
303
3042009-11-17 Robert Millan <rmh.grub@aybabtu.com>
305
306 Import ciphers from libgcrypt 1.4.4.
307
308 * lib/libgcrypt/cipher/ChangeLog
309 * lib/libgcrypt/cipher/ac.c
310 * lib/libgcrypt/cipher/arcfour.c
311 * lib/libgcrypt/cipher/bithelp.h
312 * lib/libgcrypt/cipher/blowfish.c
313 * lib/libgcrypt/cipher/camellia-glue.c
314 * lib/libgcrypt/cipher/camellia.c
315 * lib/libgcrypt/cipher/camellia.h
316 * lib/libgcrypt/cipher/cast5.c
317 * lib/libgcrypt/cipher/cipher.c
318 * lib/libgcrypt/cipher/crc.c
319 * lib/libgcrypt/cipher/des.c
320 * lib/libgcrypt/cipher/dsa.c
321 * lib/libgcrypt/cipher/ecc.c
322 * lib/libgcrypt/cipher/elgamal.c
323 * lib/libgcrypt/cipher/hash-common.c
324 * lib/libgcrypt/cipher/hash-common.h
325 * lib/libgcrypt/cipher/hmac-tests.c
326 * lib/libgcrypt/cipher/md.c
327 * lib/libgcrypt/cipher/md4.c
328 * lib/libgcrypt/cipher/md5.c
329 * lib/libgcrypt/cipher/primegen.c
330 * lib/libgcrypt/cipher/pubkey.c
331 * lib/libgcrypt/cipher/rfc2268.c
332 * lib/libgcrypt/cipher/rijndael-tables.h
333 * lib/libgcrypt/cipher/rijndael.c
334 * lib/libgcrypt/cipher/rmd.h
335 * lib/libgcrypt/cipher/rmd160.c
336 * lib/libgcrypt/cipher/rsa.c
337 * lib/libgcrypt/cipher/seed.c
338 * lib/libgcrypt/cipher/serpent.c
339 * lib/libgcrypt/cipher/sha1.c
340 * lib/libgcrypt/cipher/sha256.c
341 * lib/libgcrypt/cipher/sha512.c
342 * lib/libgcrypt/cipher/tiger.c
343 * lib/libgcrypt/cipher/twofish.c
344 * lib/libgcrypt/cipher/whirlpool.c
345
af2f93ac
RM
3462009-11-16 Robert Millan <rmh.grub@aybabtu.com>
347
348 Fix build for systems without error().
349
350 * gnulib/error.c: New file (imported from Gnulib).
351 * gnulib/error.h: Likewise.
352 * conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/error.c'.
353 * util/mkisofs/mkisofs.c (program_name): Remove `static' qualifier
354 (this variable is now used by error()).
355
73fb3dd5
FZ
3562009-11-16 Felix Zielcke <fzielcke@z-51.de>
357
814f5e96
FZ
358 * util/mkisofs/name.c (iso9660_file_length): Use isascii macro
359 instead of relying that char is signed.
73fb3dd5 360
a691ca33
VS
3612009-11-16 Vladimir Serbinenko <phcoder@gmail.com>
362
363 * fs/i386/pc/pxe.c (grub_pxefs_open): Correctly handle PXE choosing
364 blocksize different from specified.
365 (grub_pxefs_read): Likewise.
366
2af8f0f4
FZ
3672009-11-16 Felix Zielcke <fzielcke@z-51.de>
368
369 Enable ata.mod on x86_64-efi, i386-efi and i386-ieee1275.
370
371 * disk/ata.c (grub_ata_dumpinfo): Add a cast.
372 (grub_ata_readwrite): Likewise. Update 2 format strings.
373 (grub_atapi_read): Likewise.
374
375 * conf/i386-coreboot.rmk (pkglib_MODULES): Move `ata.mod' from here ...
376 * conf/i386.rmk (pkglib_MODULES): ... to here ...
377 * conf/x86_64-efi.rmk (pkglib_MODULES): ... and here.
378 * conf/i386-coreboot.rmk (ata_mod_SOURCES, ata_mod_CFLAGS)
379 (ata_mod_LDFLAGS): Move from here ...
380 * conf/i386.rmk: ... to here ...
381 * conf/x86_64-efi.rmk: ... and here.
382 * conf/i386-pc.rmk (pkglib_MODULES): Remove `ata.mod'
383 (ata_mod_SOURCES, ata_mod_CFLAGS, ata_mod_LDFLAGS): Remove.
384
83bdecaf
RM
3852009-11-16 Robert Millan <rmh.grub@aybabtu.com>
386
387 Relicense multiboot.h, with RMS' blessing.
388
389 * include/multiboot.h: Change to X11 license.
390
fd6fd3d7
RM
3912009-11-15 Robert Millan <rmh.grub@aybabtu.com>
392
393 Support --version in grub-mkisofs.
394
395 * util/mkisofs/mkisofs.c (rcsid): Remove variable.
396 (OPTION_VERSION): New macro.
397 (ld_options): Recognize --version.
398 (usage): Move `program_name' from here ...
399 (program_name): ... to here. Add `static' qualifier.
400 (main): Recognize `OPTION_VERSION'.
401
16a88c49
FZ
4022009-11-15 Felix Zielcke <fzielcke@z-51.de>
403
404 * Makefile.in (TARGET_CPPFLAGS): Replace `-isystem=$(srcdir)/include'
405 with `-nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include)'.
406
a4158476
RM
4072009-11-14 Robert Millan <rmh.grub@aybabtu.com>
408
409 Fix help2man generation for mkisofs.
410
411 * util/mkisofs/mkisofs.c (ld_options): Recognize --help.
412 (usage): Send output to stdout (rather than stderr).
413
fc2208b0
RM
4142009-11-14 Robert Millan <rmh.grub@aybabtu.com>
415
416 * conf/i386-coreboot.rmk (grub_mkrescue_SOURCES): Replace
417 `util/i386/coreboot/grub-mkrescue.in' with `util/grub-mkrescue.in'.
418 * conf/i386-pc.rmk (grub_mkrescue_SOURCES): Replace
419 `util/i386/pc/grub-mkrescue.in' with `util/grub-mkrescue.in'.
420 (bin_SCRIPTS): Add `grub-mkfloppy'.
421 (grub_mkfloppy_SOURCES): New variable.
422
423 * util/grub-mkrescue.in: New file.
424 * util/i386/pc/grub-mkfloppy.in: New file.
425
426 * util/i386/coreboot/grub-mkrescue.in: Remove.
427 * util/i386/pc/grub-mkrescue.in: Remove.
428
8d0edf4a
RM
4292009-11-13 Robert Millan <rmh.grub@aybabtu.com>
430
431 * include/grub/multiboot.h (struct grub_multiboot_header): Move
432 from here ...
433 * include/multiboot.h (struct multiboot_header): ... to here. Update
434 all users.
435 * include/grub/multiboot.h (struct grub_multiboot_info): Move
436 from here ...
437 * include/multiboot.h (struct multiboot_info): ... to here. Update
438 all users.
439 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): Move
440 from here ...
441 * include/multiboot.h (struct multiboot_mmap_entry): ... to here.
442 Update all users.
443 * include/grub/multiboot.h (struct grub_mod_list): Move
444 from here ...
445 * include/multiboot.h (struct multiboot_mod_list): ... to here.
446 Update all users.
447
a73f5969
RM
4482009-11-13 Robert Millan <rmh.grub@aybabtu.com>
449
450 * include/multiboot2.h (multiboot_word): Rename from this ...
451 (multiboot2_word): ... to this. Update all users.
452 (multiboot_header): Rename from this ...
453 (multiboot2_header): ... to this. Update all users.
454 (multiboot_tag_header): Rename from this ...
455 (multiboot2_tag_header): ... to this. Update all users.
456 (multiboot_tag_start): Rename from this ...
457 (multiboot2_tag_start): ... to this. Update all users.
458 (multiboot_tag_name): Rename from this ...
459 (multiboot2_tag_name): ... to this. Update all users.
460 (multiboot_tag_module): Rename from this ...
461 (multiboot2_tag_module): ... to this. Update all users.
462 (multiboot_tag_memory): Rename from this ...
463 (multiboot2_tag_memory): ... to this. Update all users.
464 (multiboot_tag_unused): Rename from this ...
465 (multiboot2_tag_unused): ... to this. Update all users.
466 (multiboot_tag_end): Rename from this ...
467 (multiboot2_tag_end): ... to this. Update all users.
468
1c8927f0
RM
4692009-11-13 Robert Millan <rmh.grub@aybabtu.com>
470
471 Disable Multiboot2 in i386-ieee1275. It didn't actually work, and on
472 this platform we should support Multiboot1 first.
473
474 * conf/i386-ieee1275.rmk (pkglib_MODULES): Remove `multiboot.mod'.
475 (multiboot_mod_SOURCES, multiboot_mod_CFLAGS)
476 (multiboot_mod_LDFLAGS, multiboot_mod_ASFLAGS): Remove.
477
6e1e0d89
RM
4782009-11-12 Robert Millan <rmh.grub@aybabtu.com>
479
480 * util/mkisofs/eltorito.c (init_boot_catalog): Handle return code
481 of write calls (converting them to fwrite() if they aren't already).
482 (get_torito_desc): Likewise.
483 * util/mkisofs/rock.c (generate_rock_ridge_attributes): Likewise.
484
7f2b34d8
RM
4852009-11-12 Robert Millan <rmh.grub@aybabtu.com>
486
487 * util/i386/pc/grub-install.in: Move from here ...
488 * util/grub-install.in: ... to here. Update all users.
489
c0ef3311
CW
4902009-11-11 Colin Watson <cjwatson@ubuntu.com>
491
492 * util/powerpc/ieee1275/grub-mkrescue.in: Fix --version output.
493
e1f240ff
RM
4942009-11-11 Robert Millan <rmh.grub@aybabtu.com>
495
496 Support for El Torito without floppy emulation.
497
498 * util/mkisofs/eltorito.c: Include `<errno.h>'.
499 (init_boot_catalog): Improve error handling.
500 (get_torito_desc): Don't use floppy emulation unless requested by
501 user. Patch boot information table when requested via
502 `-boot-info-table'.
503 * util/mkisofs/iso9660.h (struct eltorito_boot_info): New struct.
504 * util/mkisofs/mkisofs.c (use_eltorito_emul_floppy)
505 (use_boot_info_table): New variables.
506 (OPTION_BOOT_INFO_TABLE, OPTION_NO_EMUL_BOOT)
507 (OPTION_ELTORITO_EMUL_FLOPPY): New macros.
508 (ld_options): Handle `-boot-info-table', `-no-emul-boot' and
509 `--eltorito-emul-floppy'.
510 (main): Handle `OPTION_BOOT_INFO_TABLE', `OPTION_NO_EMUL_BOOT'
511 and `OPTION_ELTORITO_EMUL_FLOPPY'.
512 * util/mkisofs/mkisofs.h (use_eltorito_emul_floppy)
513 (use_boot_info_table, get_731): New prototypes.
514 * util/mkisofs/write.c (get_731): New function.
515
af7d4de5
FZ
5162009-11-11 Felix Zielcke <fzielcke@z-51.de>
517
518 Fix the generation of the man page.
519
520 * util/pc/i386/grub-install.in: Source
521 `${libdir}/grub/grub-mkconfig_lib' after options have been parsed.
522
2c55dbc0
RM
5232009-11-11 Robert Millan <rmh.grub@aybabtu.com>
524
525 Large file support for grub-mkisofs.
526
527 * conf/common.rmk (grub_mkisofs_CFLAGS): Add `-D_FILE_OFFSET_BITS=64'.
528 * util/mkisofs/mkisofs.c (next_extent, last_extent)
529 (session_start): Upgrade type to `uint64_t'. Update all users.
530 * util/mkisofs/mkisofs.h: Include `<stdint.h>'.
531 (struct directory_entry): Upgrade type of `starting_block' and
532 `size' to `uint64_t'. Update all users.
533 (struct deferred): Remove unused structure.
534 (xfwrite): Upgrade type of `count' and `size' to `uint64_t'.
535 Update all users.
536 * util/mkisofs/tree.c (stat_filter, lstat_filter): Return -1 when
537 file is larger than `UINT32_MAX'.
538 * util/mkisofs/write.c (xfwrite): Upgrade type of `count' and
539 `size' to `uint64_t'. Update all users. Fix handling of fwrite()
540 return value.
541 (struct deferred_write): Upgrade type of `extent' and `size' to
542 `uint64_t'. Update all users.
543 (last_extent_written): Upgrade type to `uint64_t'. Update all
544 users.
545 (write_one_file): Upgrade type of `count' and `size' to `uint64_t'.
546 Update all users. Upgrade type of `remain' to `int64_t' and
547 `use' to `size_t'. Use error() to handle fread() errors.
548 (write_files): Rely on write_one_file() rather than calling
549 xfwrite() directly.
550
6a9cead5
FZ
5512009-11-09 Felix Zielcke <fzielcke@z-51.de>
552
553 * util/mkisofs/mkisofs.c (ld_options): Fix a spelling mistake.
554
4825d790
RM
5552009-11-09 Robert Millan <rmh.grub@aybabtu.com>
556
557 * util/mkisofs/fnmatch.c: Remove.
558 * util/mkisofs/getopt1.c: Likewise.
559 * util/mkisofs/getopt.c: Likewise.
560 * conf/common.rmk (grub_mkisofs_SOURCES): Replace
561 `util/mkisofs/fnmatch.c', `util/mkisofs/getopt1.c' and
562 `util/mkisofs/getopt.c' with `gnulib/fnmatch.c',
563 `gnulib/getopt1.c' and `gnulib/getopt.c'.
564 (grub_mkisofs_CFLAGS): Add `-I$(srcdir)/gnulib'.
565
566 * configure.ac: Detect `mingw32msvc' host_os.
567 Check for lstat(), getuid() and getgid().
568
569 * util/mkisofs/joliet.c: Include `<stdint.h>'. Replace all
570 instances of `u_char' with `uint8_t'.
571
572 * util/mkisofs/mkisofs.h: Include `<sys/stat.h>'.
573 [!HAVE_GETUID] (getuid): New function (stub).
574 [!HAVE_GETGID] (getgid): Likewise.
575 [!HAVE_LSTAT] (lstat): Likewise.
576 [!S_IROTH] (S_IROTH): New macro (dummy).
577 [!S_IRGRP] (S_IRGRP): Likewise.
578
84b860d8
RM
5792009-11-09 Robert Millan <rmh.grub@aybabtu.com>
580
581 * gnulib/fnmatch_loop.c (EXT): Fix warning (signed and unsigned type in
582 conditional expression).
583
66e9b712
RM
5842009-11-09 Robert Millan <rmh.grub@aybabtu.com>
585
586 Import from Gnulib.
587
588 * gnulib/fnmatch.c: New file.
589 * gnulib/fnmatch.h: Likewise.
590 * gnulib/fnmatch_loop.c: Likewise.
591 * gnulib/getopt.c: Likewise.
592 * gnulib/getopt.h: Likewise.
593 * gnulib/getopt1.c: Likewise.
594 * gnulib/getopt_int.h: Likewise.
595 * gnulib/gettext.h: Likewise.
596
34f4a5b0
RM
5972009-11-09 Robert Millan <rmh.grub@aybabtu.com>
598
599 * normal/dyncmd.c (read_command_list): Replace `0' with `NULL'.
600 * normal/handler.c (read_handler_list): Likewise.
601
ac451143
RM
6022009-11-09 Robert Millan <rmh.grub@aybabtu.com>
603
604 Misc cleanup.
605
606 * kern/command.c (grub_register_command_prio): Use
607 grub_zalloc() instead of explicitly zeroing data.
608 * kern/list.c: Include `<grub/mm.h>'.
609 (grub_named_list_find): Replace `0' with `NULL'.
610 * normal/autofs.c (struct grub_fs_module_list): Remove ad-hoc type.
611 (fs_module_list): Change type to `grub_named_list_t'. Update all
612 users.
613 * normal/dyncmd.c (read_command_list): Add space between function
614 call and parenthesis.
615 * normal/handler.c (read_handler_list): Likewise.
616
4089b167
RM
6172009-11-09 Robert Millan <rmh.grub@aybabtu.com>
618
619 * normal/auth.c (punishment_delay): Moved from here ...
620 (grub_auth_strcmp): ... to here (inside function).
621
325f5037
RM
6222009-11-09 Robert Millan <rmh.grub@aybabtu.com>
623
624 * include/grub/list.h (struct grub_named_list): Remove `const'
625 qualifier from `name'.
626 (struct grub_prio_list): Likewise.
627
7aea29a3
RM
6282009-11-09 Robert Millan <rmh.grub@aybabtu.com>
629
630 * normal/auth.c: Include `<grub/time.h>'.
631 (grub_auth_strcmp): Replace `strcmp' with `grub_strcmp'.
632
3fd6f044
RM
6332009-11-09 Robert Millan <rmh.grub@aybabtu.com>
634
635 * normal/auth.c (punishment_delay): New variable.
636 (grub_auth_strcmp): Rewrite using grub_get_time_ms ().
637 (grub_auth_check_authentication): Punish failed login attempts with
638 an incremental (2^N) delay.
639
a4cd68e4
RM
6402009-11-09 Robert Millan <rmh.grub@aybabtu.com>
641
642 * conf/common.rmk (grub_mkisofs_CFLAGS): Prefix include
643 path with $(srcdir).
644
7ad12f43
VS
6452009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
646
647 * normal/auth.c (grub_auth_strcmp): Fixed incorrect variable usage.
648
c1129f03
RM
6492009-11-09 Robert Millan <rmh.grub@aybabtu.com>
650
651 * util/i386/coreboot/grub-mkrescue.in: New file.
652 * conf/i386-coreboot.rmk (bin_SCRIPTS, grub_mkrescue_SOURCES): New
653 variables.
654
655 * conf/common.rmk (bin_UTILITIES): Add `grub-mkisofs'.
656 (grub_mkisofs_SOURCES, grub_mkisofs_CFLAGS): New variables.
657 * configure.ac: Add header and function checks to satisfy grub-mkisofs
658 requirements.
659 * util/mkisofs/defaults.h: New file.
660 * util/mkisofs/eltorito.c: Likewise.
661 * util/mkisofs/exclude.h: Likewise.
662 * util/mkisofs/fnmatch.c: Likewise.
663 * util/mkisofs/getopt.c: Likewise.
664 * util/mkisofs/getopt1.c: Likewise.
665 * util/mkisofs/hash.c: Likewise.
666 * util/mkisofs/include/fctldefs.h: Likewise.
667 * util/mkisofs/include/mconfig.h: Likewise.
668 * util/mkisofs/include/prototyp.h: Likewise.
669 * util/mkisofs/include/statdefs.h: Likewise.
670 * util/mkisofs/iso9660.h: Likewise.
671 * util/mkisofs/joliet.c: Likewise.
672 * util/mkisofs/match.c: Likewise.
673 * util/mkisofs/match.h: Likewise.
674 * util/mkisofs/mkisofs.c: Likewise.
675 * util/mkisofs/mkisofs.h: Likewise.
676 * util/mkisofs/multi.c: Likewise.
677 * util/mkisofs/name.c: Likewise.
678 * util/mkisofs/rock.c: Likewise.
679 * util/mkisofs/tree.c: Likewise.
680 * util/mkisofs/write.c: Likewise.
681
ec8bb77d
VS
6822009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
683
684 * normal/auth.c (grub_auth_strcmp): Fix bug which resulted in function
685 being insecure.
686
3716b12c
RM
6872009-11-08 Robert Millan <rmh.grub@aybabtu.com>
688
689 * util/i386/pc/grub-mkrescue.in: Fix miss-identification as
690 `grub-mkimage' (and use $0 when possible).
691
b97b7b91
RM
6922009-11-08 Robert Millan <rmh.grub@aybabtu.com>
693
694 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve
695 error message for excessively large memory map.
696
04114812
RM
6972009-11-08 Robert Millan <rmh.grub@aybabtu.com>
698
699 * autogen.sh: Use `sh gendistlist.sh' to avoid reliing on
700 executable bit.
701
e4eb2373
RM
7022009-11-08 Robert Millan <rmh.grub@aybabtu.com>
703
704 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve error
705 message for coreboot users.
706
c926e1d5 7072009-11-07 Robert Millan <rmh.grub@aybabtu.com>
708
709 Fix build with GNU gold.
710
711 * conf/i386-pc.rmk (boot_img_LDFLAGS, pxeboot_img_LDFLAGS)
712 (diskboot_img_LDFLAGS, lnxboot_img_LDFLAGS)
713 (cdboot_img_LDFLAGS): Prepend `0x' qualifier to hexadecimal
714 link addresses.
715 * aclocal.m4: Likewise.
716
86e5b1db 7172009-11-04 Felix Zielcke <fzielcke@z-51.de>
718
719 * configure.ac (AC_PREREQ): Bump to 2.59d.
720 * INSTALL: Make it more clear when Autoconf and Ruby are
721 needed and when to run `./autogen.sh'.
722
246cd78f 7232009-11-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
724
725 * util/grub.d/30_os-prober.in: Restore default behavior for unsupported
726 OSes.
727
4f9dfb37 7282009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
729
730 * util/grub.d/30_os-prober.in: Add GNU/Hurd support
731
b82bd5e1 7322009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
733
734 * util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
735 giving it to GNU Mach.
736
ff1a9bca 7372009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
738
739 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Subtract 1 from
740 GNU partition number to get internal GRUB partition number.
741
61697d9c 7422009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
743
744 * util/grub.d/10_hurd.in: Call prepare_grub_to_access_device
745 ${GRUB_DEVICE_BOOT} before loading /boot kernel.
746
a50569e1 7472009-11-01 Robert Millan <rmh.grub@aybabtu.com>
748
749 Based on patch from BVK Chaitanya <bvk.groups@gmail.com>
750 * kern/misc.c (grub_strchr, grub_strrchr): Fix to handle c == '\0'
751 case.
752
5b153867 7532009-11-01 Felix Zielcke <fzielcke@z-51.de>
754
755 * Makefile.in (TARGET_CPPFLAGS): Add `-I$(srcdir)/include'.
756
d9e2cd70 7572009-10-30 Robert Millan <rmh.grub@aybabtu.com>
758
759 Fix build problem.
760
761 * Makefile.in (TARGET_CPPFLAGS): Replace `-nostdinc' with
762 `-isystem=$(srcdir)/include'.
763
805111a4 7642009-10-30 Robert Millan <rmh.grub@aybabtu.com>
765
766 * util/i386/pc/grub-install.in: Remove hint that device.map should be
767 checked (grub-install doesn't currently rely on it).
768
fa6e945f 7692009-10-29 Robert Millan <rmh.grub@aybabtu.com>
770
771 Revert SVN r2660.
772
773 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): Moved from here ...
774 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
775 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): ... and here.
776 * conf/i386-ieee1275.rmk: Likewise.
777 * conf/i386-pc.rmk: Likewise.
778 * conf/powerpc-ieee1275.rmk: Likewise.
779 * conf/sparc64-ieee1275.rmk: Likewise.
780 * conf/x86_64-efi.rmk: Likewise.
781
cee15086 7822009-10-28 Robert Millan <rmh.grub@aybabtu.com>
783
784 * Makefile.in (TARGET_CPPFLAGS): Add `-nostdinc'.
785
95b9239e 7862009-10-28 Robert Millan <rmh.grub@aybabtu.com>
787
788 * include/grub/misc.h: Stop checking for APPLE_CC.
789
2ed19dfd 7902009-10-28 Robert Millan <rmh.grub@aybabtu.com>
791
792 * kern/i386/coreboot/init.c (grub_exit): Reimplement in a way that
793 doesn't cause an infinite call loop.
794
fdcdde19 7952009-10-28 Felix Zielcke <fzielcke@z-51.de>
796
797 * commands/acpi.c (grub_cmd_acpi): Fix the out of memory error
798 strings.
799
cefabfe1 8002009-10-26 Robert Millan <rmh.grub@aybabtu.com>
801
802 * autogen.sh: Support addition of external modules via `GRUB_CONTRIB'
803 variable.
804 * Makefile.in: Likewise.
805
ed96ab6d 8062009-10-26 Robert Millan <rmh.grub@aybabtu.com>
807
808 * gendistlist.sh: Simplify .svn check. Skip .bzr as well.
809
0579b753 8102009-10-26 Robert Millan <rmh.grub@aybabtu.com>
811
812 * Makefile.in (RMKFILES): Rewrite using $(wildcard).
813
478df409 8142009-10-26 Robert Millan <rmh.grub@aybabtu.com>
815
816 * disk/scsi.c: Remove `<grub/machine/kernel.h>' (not needed).
817
083d1679 8182009-10-26 Robert Millan <rmh.grub@aybabtu.com>
819
820 * gensymlist.sh.in (COMPILE_TIME_ASSERT): Copy macro declaration
821 from here ...
822 * include/grub/misc.h (COMPILE_TIME_ASSERT): ... to here.
823
5947ae32 8242009-10-26 Robert Millan <rmh.grub@aybabtu.com>
825
826 * Makefile.in (docs/grub.info): Use make syntax to ignore errors
827 in $(MAKEINFO) invocation. This makes it clear in output that
828 errors are being ignored.
829
94180ff6 8302009-10-26 Robert Millan <rmh.grub@aybabtu.com>
831
832 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): Moved
833 from here ...
834 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
835 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): Remove.
836 * conf/i386-ieee1275.rmk: Likewise.
837 * conf/i386-pc.rmk: Likewise.
838 * conf/powerpc-ieee1275.rmk: Likewise.
839 * conf/sparc64-ieee1275.rmk: Likewise.
840 * conf/x86_64-efi.rmk: Likewise.
841
9031b03a 8422009-10-26 Colin Watson <cjwatson@ubuntu.com>
843
844 * util/grub-editenv.c (main): If only a command is given, use
845 DEFAULT_DIRECTORY "/" GRUB_ENVBLK_DEFCFG as a default file name.
846 (usage): FILENAME is now optional and has a default.
847
e4f6809b 8482009-10-26 Colin Watson <cjwatson@ubuntu.com>
849
850 Improve grub-mkconfig performance when there are several menu
851 entries on a single filesystem.
852
853 * util/grub.d/10_linux.in (linux_entry): Cache the output of
854 prepare_grub_to_access_device.
855 * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
856 * util/grub.d/30_os-prober.in: Likewise.
857
67937d4d 8582009-10-26 Robert Millan <rmh.grub@aybabtu.com>
859
860 * util/grub.d/10_freebsd.in: Remove.
861 * util/grub.d/10_kfreebsd.in: New file (based on 10_linux.in).
862 * configure.ac: Set host_kernel=kfreebsd for FreeBSD and GNU/kFreeBSD.
863
ee3756cc 8642009-10-26 Robert Millan <rmh.grub@aybabtu.com>
865
5c35048e 866 * docs/grub.cfg: Fix example usage of *BSD loaders.
ee3756cc 867
4dea1c6f 8682009-10-25 Robert Millan <rmh.grub@aybabtu.com>
869
870 * util/i386/pc/grub-setup.c (setup): Add missing parameter to
871 grub_util_error() call.
872
042484d7 8732009-10-25 Robert Millan <rmh.grub@aybabtu.com>
874
875 * include/grub/fs.h [GRUB_UTIL] (struct grub_fs): Add
876 `reserved_first_sector' member.
877 * fs/ext2.c [GRUB_UTIL] (grub_ext2_fs): Initialize
878 `reserved_first_sector' to 1.
879 * fs/fat.c [GRUB_UTIL] (grub_fat_fs): Likewise.
880 * fs/ntfs.c [GRUB_UTIL] (grub_ntfs_fs): Likewise.
881 * fs/hfsplus.c [GRUB_UTIL] (grub_hfsplus_fs): Likewise.
882 * util/i386/pc/grub-setup.c (setup): Add safety check that probes for
883 filesystems which begin at first sector.
884 (options): New option --skip-fs-probe.
885 (main): Handle --skip-fs-probe and pass it to setup().
886
d64448a7 8872009-10-25 Robert Millan <rmh.grub@aybabtu.com>
888
889 * include/grub/misc.h: Fix wrong evaluation of APPLE_CC.
890 (memset): Fix function prototype.
891
508d42ec 8922009-10-25 Robert Millan <rmh.grub@aybabtu.com>
8932009-10-25 Vasily Averin <vvs@parallels.com>
894
895 * fs/ext2.c (grub_ext2_iterate_dir): Avoid infinite loop when
896 `dirent.direntlen == 0'.
897
b240e30c 8982009-10-25 Robert Millan <rmh.grub@aybabtu.com>
899
900 * fs/cpio.c [MODE_USTAR]: Initialize `tar' module instead of
901 `cpio'.
902 [! MODE_USTAR]: Initialize `cpio' module instead of `tar'.
903
346e7fbe 9042009-10-25 Robert Millan <rmh.grub@aybabtu.com>
905
906 * configure.ac: Check for `__ashldi3', `__ashrdi3', `__lshrdi3',
907 `__trampoline_setup' and `__ucmpdi2'.
908 * include/grub/powerpc/libgcc.h: Only export symbols for functions
909 that libgcc provides.
910
cdb308b0 9112009-10-25 Robert Millan <rmh.grub@aybabtu.com>
912
913 * include/grub/powerpc/libgcc.h (memset): Remove function prototype.
914 * include/grub/sparc64/libgcc.h (memset): Likewise.
915 * include/grub/misc.h (memset, memcmp): New function prototypes.
916
fb26abc2 9172009-10-25 Robert Millan <rmh.grub@aybabtu.com>
918
919 * fs/cpio.c [MODE_USTAR]: Finish `tar' module instead of
920 `cpio'.
921 [! MODE_USTAR]: Finish `cpio' module instead of `tar'.
922
f6693890 9232009-10-25 Robert Millan <rmh.grub@aybabtu.com>
924
925 Patch from Samuel Thibault <samuel.thibault@ens-lyon.org>
926 * docs/grub.cfg: Compensate for recent change in multiboot
927 loader (since 2009-08-14 it won't pass filename to payload).
928 * util/grub.d/10_hurd.in: Likewise.
929
0933cdc0 9302009-10-21 Felix Zielcke <fzielcke@z-51.de>
931
932 * config.guess: Update to latest version from config git
933 repository.
934 * config.sub: Likewise.
935
3b2fe8c2 9362009-10-20 Robert Millan <rmh.grub@aybabtu.com>
937
938 Fix build on sparc64.
939
940 * configure.ac: Perform checks for libgcc symbols before
941 adding `-nostdlib' to LDFLAGS.
942
46695a62 9432009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
944
945 Let user specify OpenBSD root device.
946
947 * loader/i386/bsd.c (openbsd_root): New variable.
948 (openbsd_opts): New option 'root'.
949 (OPENBSD_ROOT_ARG): New macro.
950 (grub_openbsd_boot): Use 'openbsd_root'.
951 (grub_cmd_openbsd): Fill 'openbsd_root'.
952
d2b6b7fc 9532009-10-16 Robert Millan <rmh.grub@aybabtu.com>
954
955 * NEWS: Misc adjustments.
956
421bd7ac 9572009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
958
959 * NEWS: Mentioned XNU, ACPI, gptsync, password and parttool.
960
f1d29d87 9612009-10-16 Robert Millan <rmh.grub@aybabtu.com>
962
963 * configure.ac: Bump version to 1.97.
964
6f3cd880 9652009-10-16 Colin Watson <cjwatson@ubuntu.com>
966
967 * configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2
968 -mno-3dnow on x86 architectures. Some toolchains enable these
969 features by default, but they rely on registers that aren't enabled
970 in GRUB. Thanks to Vladimir Serbinenko for the suggestion.
971
035f7122 9722009-10-15 Robert Millan <rmh.grub@aybabtu.com>
973
974 Make entry text a bit more readable.
975
976 * util/grub.d/10_linux.in: Add `with' before `Linux'.
977
44998e58 9782009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
979
980 * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
981
cd2851b3 9822009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
983
984 * commands/xnu_uuid.c (grub_cmd_xnu_uuid): Remove duplicated bitwise
985 operations.
986
c6f3b249 9872009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
988
989 * configure.ac: Add missing dollar.
990
6b5886ba 9912009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
992
993 Revert 2009-06-10 Pavel Roskin <proski@gnu.org>
994
995 * configure.ac: Put checks for __bswapsi2 and __bswapdi2.
996 * include/grub/powerpc/libgcc.h: Don't use weak attribute for all
997 exports.
998 * include/grub/sparc64/libgcc.h: Likewise. Use
999 preprocessor conditionals.
1000
e9d66f6d 10012009-10-14 Robert Millan <rmh.grub@aybabtu.com>
1002
1003 * conf/common.rmk (grub-dumpbios): Remove rule.
1004 (sbin_SCRIPTS, CLEANFILES): Remove `grub-dumpbios'.
1005 * util/grub-dumpbios.in: Remove file.
1006
9155bc17 10072009-10-14 Robert Millan <rmh.grub@aybabtu.com>
1008
1009 Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
1010 the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).
1011
1012 * loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
1013 from "kFreeBSD" namespace (rather than "FreeBSD"). Update all
1014 users.
1015
1016 (GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
1017 "openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
1018 to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
1019 and "freebsd_module_elf" to "kfreebsd_module_elf". Update all
1020 users.
1021
bf7f7a18 10222009-10-12 Robert Millan <rmh.grub@aybabtu.com>
1023
1024 * term/tparm.c: Switch to GPLv3.
1025
86564c26 10262009-10-09 Robert Millan <rmh.grub@aybabtu.com>
1027
1028 * include/grub/i386/cpuid.h: Add header protection.
1029
5c936493 10302009-10-09 Robert Millan <rmh.grub@aybabtu.com>
1031
1032 Fail gracefuly when attempting to load 64-bit kFreeBSD on IA32 CPU.
1033
1034 * include/grub/i386/cpuid.h: New file.
1035 * commands/i386/cpuid.c: Include `<grub/i386/cpuid.h>'.
1036 (has_longmode): Rename to ...
1037 (grub_cpuid_has_longmode): ... this. Update all users. Remove
1038 `static' attribute.
1039 * loader/i386/bsd.c: Include `<grub/i386/cpuid.h>'.
1040 (grub_bsd_load_elf): Fail if load of 64-bit kernel was requested
1041 on a CPU that doesn't implement AMD64 instruction set.
1042
186e7cf2 10432009-10-06 Colin Watson <cjwatson@ubuntu.com>
1044
1045 * Makefile.in (docs/stamp-vti): Depend on configure.ac as well, so
1046 that version.texi is rebuilt on version number changes.
1047
83b65c4a 10482009-10-06 Colin Watson <cjwatson@ubuntu.com>
1049
1050 * Makefile.in: Don't set info_INFOS unless makeinfo was found.
1051 Fixes bug #27602.
1052
d244281c 10532009-10-06 Colin Watson <cjwatson@ubuntu.com>
1054
1055 * util/i386/pc/grub-install.in: Source
1056 ${libdir}/grub/grub-mkconfig_lib before option processing, in order
1057 that the --grub-probe option will work.
1058 * util/sparc64/ieee1275/grub-install.in: Likewise.
1059
da25306d 10602009-10-05 Robert Millan <rmh.grub@aybabtu.com>
1061
1062 * configure.ac: Bump version to 1.97~beta4.
1063
e8ee83c0 10642009-10-03 Robert Millan <rmh.grub@aybabtu.com>
1065
1066 Resync grub-mkdevicemap in x86_64-efi.
1067
1068 * conf/x86_64-efi.rmk (sbin_UTILITIES): Enable `grub-mkdevicemap'.
1069 (grub_mkdevicemap_SOURCES): Add missing `util/deviceiter.c' and
1070 `util/devicemap.c'.
1071
50dcabcf 10722009-10-01 Colin Watson <cjwatson@ubuntu.com>
1073
1074 * util/grub-editenv.c (create_envblk_file): Write new block with a
1075 .new suffix and then rename it into place, to ensure atomic
1076 creation.
1077
0e51c3a7 10782009-09-28 Robert Millan <rmh.grub@aybabtu.com>
1079
1080 Do not automatically install headers.
1081
1082 * Makefile.in (include_DATA): Remove. Update all users.
1083
31299a95 10842009-09-26 Robert Millan <rmh.grub@aybabtu.com>
1085
1086 * conf/common.rmk (pkglib_MODULES): Remove `lua.mod'.
1087 (lua_mod_SOURCES, lua_mod_CFLAGS, lua_mod_LDFLAGS): Remove.
1088
1089 * util/osdetect.lua: Remove.
1090 * script/lua/lauxlib.c: Likewise.
1091 * script/lua/ldebug.c: Likewise.
1092 * script/lua/grub_main.c: Likewise.
1093 * script/lua/lauxlib.h: Likewise.
1094 * script/lua/ldebug.h: Likewise.
1095 * script/lua/ltablib.c: Likewise.
1096 * script/lua/liolib.c: Likewise.
1097 * script/lua/lstrlib.c: Likewise.
1098 * script/lua/lualib.h: Likewise.
1099 * script/lua/ldo.c: Likewise.
1100 * script/lua/ldump.c: Likewise.
1101 * script/lua/ldo.h: Likewise.
1102 * script/lua/loslib.c: Likewise.
1103 * script/lua/lundump.c: Likewise.
1104 * script/lua/grub_lib.c: Likewise.
1105 * script/lua/ldblib.c: Likewise.
1106 * script/lua/lundump.h: Likewise.
1107 * script/lua/lmem.c: Likewise.
1108 * script/lua/grub_lib.h: Likewise.
1109 * script/lua/lmathlib.c: Likewise.
1110 * script/lua/lstate.c: Likewise.
1111 * script/lua/ltm.c: Likewise.
1112 * script/lua/lvm.c: Likewise.
1113 * script/lua/lmem.h: Likewise.
1114 * script/lua/lstate.h: Likewise.
1115 * script/lua/ltm.h: Likewise.
1116 * script/lua/ltable.c: Likewise.
1117 * script/lua/lvm.h: Likewise.
1118 * script/lua/llex.c: Likewise.
1119 * script/lua/lgc.c: Likewise.
1120 * script/lua/grub_lua.h: Likewise.
1121 * script/lua/loadlib.c: Likewise.
1122 * script/lua/lfunc.c: Likewise.
1123 * script/lua/lopcodes.c: Likewise.
1124 * script/lua/lparser.c: Likewise.
1125 * script/lua/ltable.h: Likewise.
1126 * script/lua/llex.h: Likewise.
1127 * script/lua/lgc.h: Likewise.
1128 * script/lua/lfunc.h: Likewise.
1129 * script/lua/lbaselib.c: Likewise.
1130 * script/lua/lopcodes.h: Likewise.
1131 * script/lua/lparser.h: Likewise.
1132 * script/lua/lzio.c: Likewise.
1133 * script/lua/linit.c: Likewise.
1134 * script/lua/lobject.c: Likewise.
1135 * script/lua/llimits.h: Likewise.
1136 * script/lua/lstring.c: Likewise.
1137 * script/lua/lzio.h: Likewise.
1138 * script/lua/lapi.c: Likewise.
1139 * script/lua/lcode.c: Likewise.
1140 * script/lua/lua.h: Likewise.
1141 * script/lua/lobject.h: Likewise.
1142 * script/lua/lstring.h: Likewise.
1143 * script/lua/lapi.h: Likewise.
1144 * script/lua/lcode.h: Likewise.
1145 * script/lua/luaconf.h: Likewise.
1146
cb8a2c38 11472009-09-26 Colin Watson <cjwatson@ubuntu.com>
1148
1149 * docs/grub.texi (Command-line and menu entry commands): Document
1150 date and echo commands.
1151
6b9b6276 11522009-09-24 Pavel Roskin <proski@gnu.org>
1153
1154 * include/grub/kernel.h (struct grub_module_header): Remove
1155 `grub_module_header_types'. Make `type' unsigned. Make `size'
1156 32-bit on all platforms.
1157 * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
1158 8-bit field. Use grub_host_to_target32() for `size'.
1159 * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
1160 * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
1161 * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
1162
4e5a02a7 11632009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1164
1165 Fix "lost keypress" bug in at_keyboard.
1166
1167 * term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
1168 Checks for readyness of input buffer (without flushing it).
1169 (grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
1170 than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
1171
c6dcedf6 11722009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1173
1174 * util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
1175 size check within GRUB_MACHINE_PCBIOS section.
1176
74c958b1 11772009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1178
1179 * include/grub/i386/at_keyboard.h (KEYBOARD_ISREADY): Negate
1180 return value.
1181 * term/i386/pc/at_keyboard.c (grub_keyboard_getkey): Negate
1182 KEYBOARD_ISREADY check.
1183 (grub_at_keyboard_checkkey): Rename to ...
1184 (grub_at_keyboard_getkey_noblock): ... this. Update all users.
1185 Remove gratuitous cast.
1186
ff420223 11872009-09-23 Colin Watson <cjwatson@ubuntu.com>
1188
1189 * configure.ac: Call AC_PROG_MKDIR_P.
1190 * Makefile.in (docs/stamp-vti): Create docs directory. Create
1191 version.texi in $(builddir) rather than $(srcdir).
1192 (docs/grub.info): Create docs directory. Prepend $(builddir)/docs
1193 to makeinfo's @include search path.
1194
d96875df 11952009-09-23 Felix Zielcke <fzielcke@z-51.de>
1196
1197 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'
1198
9b3f8365 11992009-09-23 Felix Zielcke <fzielcke@z-51.de>
1200
1201 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
1202 for `*.dpkg-new'.
1203
c44c90db 12042009-09-21 Colin Watson <cjwatson@ubuntu.com>
1205
1206 Build info documentation. Some code borrowed from Automake.
1207
1208 * configure.ac: Check for makeinfo.
1209 * Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
1210 (MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
1211 docs/version.texi.
1212 (MOSTLYCLEANFILES): Add vti.tmp.
1213 (docs/version.texi, docs/stamp-vti): Update automatically.
1214 (docs/grub.info): Build info documentation. Use --force and ignore
1215 errors for now.
1216 (all-local): Add $(INFOS).
1217 (install-local): Install info files.
1218 (uninstall): Uninstall info files.
1219 * docs/version.texi: Remove from revision control. This file is
1220 automatically generated on build now.
1221 * gendistlist.sh: Add `*.info'.
1222
e0b37bb5 12232009-09-21 Felix Zielcke <fzielcke@z-51.de>
1224
1225 * kern/term.c: Fix indentation.
1226
5a78865b 12272009-09-21 Felix Zielcke <fzielcke@z-51.de>
1228
1229 * util/hostdisk.c: Fix a comment.
1230
dace7e8a 12312009-09-20 Robert Millan <rmh.grub@aybabtu.com>
1232
1233 Fix regression introduced in r2539.
1234
1235 * term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
1236 to 0xA1.
1237
a83d079b 12382009-09-19 Colin Watson <cjwatson@ubuntu.com>
1239
1240 * util/grub.d/30_os-prober.in: Don't throw away stderr from
4cbbccec 1241 os-prober. Under normal operation, it does not print anything to
1242 stderr; if it does, we need to debug it, and throwing away stderr
1243 makes that excessively difficult.
a83d079b 1244
be94a509 12452009-09-16 Vladimir Serbinenko <phcoder@gmail.com>
1246
1247 * mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.
1248
63f745e8 12492009-09-16 Robert Millan <rmh.grub@aybabtu.com>
1250
1251 * aclocal.m4 (AC_LANG_PROGRAM): New macro. Overrides stock
1252 AC_LANG_PROGRAM from autoconf.
1253 (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
1254 prototypes (fixes warning).
1255
1256 * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
1257 `--disable-werror' was used.
1258
bbb2a70f 12592009-09-16 Robert Millan <rmh.grub@aybabtu.com>
1260
1261 * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
1262 uninitialized `lastaddr'.
1263
77c24f1d 12642009-09-15 Vladimir Serbinenko <phcoder@gmail.com>
1265
0f0b8c87 1266 * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
77c24f1d 1267
07197f23 12682009-09-14 Colin Watson <cjwatson@ubuntu.com>
1269
1270 * commands/test.c (get_fileinfo): Return immediately if
1271 grub_fs_probe fails.
1272
dabf1798 12732009-09-14 José Martínez <xosemp@gmail.com>
1274
1275 * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
1276
d52109a7 12772009-09-14 Colin Watson <cjwatson@ubuntu.com>
1278
1279 * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
1280 output.
1281
56532179 12822009-09-13 Robert Millan <rmh.grub@aybabtu.com>
1283
1284 * configure.ac: Remove --enable-grub-pe2elf. Only build
1285 grub-pe2elf when needed by the build system itself.
1286 * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
1287
8ef070f5 12882009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1289
1290 * configure.ac: Bump version to 1.97~beta3.
1291 * docs/version.texi: Likewise.
1292
61229557 12932009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1294
1295 * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
1296 mode special handling (grub_vbe_bios_set_dac_palette_width() call)
1297 from here ...
1298 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
1299 (grub_linux_setup_video): ... to here (with some adjustments).
1300
5c9f8d84 13012009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1302
1303 Fix memory corruption issue (spotted by Colin Watson).
1304
1305 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
1306 causing returned size to be stored in an incorrect memory location.
1307 Fix use of uninitialized value when storing the returned size.
1308
e8f5d6e9 13092009-09-12 Yves Blusseau <blusseau@zetam.org>
1310
1311 Change clean rules to properly remove files
1312
1313 * genmk.rb: add new clean rules
1314 * Makefile.in (clean): add the new targets
1315 (mostlyclean): likewise
1316
cda2a409 13172009-09-11 Colin Watson <cjwatson@ubuntu.com>
1318
1319 * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
1320 to grub_uint64_t.
1321 * fs/ntfs.c (init_file): Understand 64-bit sizes for
1322 non-resident files.
1323
86695375 13242009-09-11 Colin Watson <cjwatson@ubuntu.com>
1325
1326 * configure.ac: Don't look for help2man when cross-compiling. Fixes
1327 part of bug #27349.
1328
8aa1541a 13292009-09-10 Felix Zielcke <fzielcke@z-51.de>
1330
1331 * util/grub-mkconfig.in: Make the created config mode 400 and
1332 print a warning if it fails.
1333
48d9bb0a 13342009-09-10 Robert Millan <rmh.grub@aybabtu.com>
1335
1336 * util/grub.d/40_custom.in: Ask user to type custom entries below
1337 comment, rather than below 'exec tail' line.
1338
3b0521be 13392009-09-10 Colin Watson <cjwatson@ubuntu.com>
1340
1341 * util/grub.d/40_custom.in: Make sure that the explanatory text is
1342 visible in grub.cfg.
1343
50051d55 13442009-09-10 Colin Watson <cjwatson@ubuntu.com>
1345
1346 * util/grub.d/40_custom.in: Make it a little clearer how to use this
1347 file.
1348
c0d34387 13492009-09-10 Felix Zielcke <fzielcke@z-51.de>
1350
1351 * docs/grub.cfg: Add an example menu entry for memtest86+.
1352
80a608f3 13532009-09-09 Felix Zielcke <fzielcke@z-51.de>
1354
a2094832 1355 * config.guess: Update to latest version from config git.
80a608f3 1356 * config.sub: Likewise.
1357
99423078 13582009-09-08 Colin Watson <cjwatson@ubuntu.com>
1359
1360 * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
1361 unknown-command case. Fixes bug #27320.
1362
44454e4c 13632009-09-08 Felix Zielcke <fzielcke@z-51.de>
1364
1365 * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
1366 `help' if the command exists.
1367
e30d87ad 13682009-09-06 Robert Millan <rmh.grub@aybabtu.com>
1369
1370 * INSTALL: Require GCC 4.1.3 or later.
1371
9a86f1ec 13722009-09-06 Yves Blusseau <blusseau@zetam.org>
1373
1374 * Makefile.in (RMKFILES): add i386-qemu.rmk
1375 (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
1376 $(srcdir)/stamp-h.in
1377
7f26d466 13782009-09-05 Robert Millan <rmh.grub@aybabtu.com>
1379
1380 * util/grub-probe.c (probe): Comment out buggy codepath, which
1381 was unexpectedly enabled by Colin Watson's 2009-09-02 fix. This
1382 should be re-enabled after 1.97.
1383
3a613259 13842009-09-05 Felix Zielcke <fzielcke@z-51.de>
1385
1386 * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
1387 find searches for.
1388
197f76c7 13892009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
1390
1391 * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
1392 unnecessary calls to grub_error.
1393
70ba68ce 13942009-09-04 Colin Watson <cjwatson@ubuntu.com>
1395
1396 * NEWS: Mention `keystatus' and Unicode fonts.
1397
4ff0d7a4 13982009-09-04 Robert Millan <rmh.grub@aybabtu.com>
1399
1400 * configure.ac: Bump version to 1.97~beta2.
1401 * docs/version.texi: Likewise.
1402
77c55a87 14032009-09-03 Colin Watson <cjwatson@ubuntu.com>
1404
1405 * configure.ac: By default, GCC 4.4 generates .eh_frame sections
1406 containing unwind information in some cases where it previously did
1407 not. Use -fno-dwarf2-cfi-asm if available to restore the old
1408 behaviour. See http://patchwork.kernel.org/patch/8555/ for related
1409 discussion.
1410
f79572cd 14112009-09-02 Yves BLUSSEAU <blusseau@zetam.org>
1412
1413 Embedding loadenv module into grub-emu
1414
1415 * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
1416 commands/loadenv.c
1417 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
1418 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
1419 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
1420 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
1421 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
1422 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
1423
93a81088 14242009-09-03 Magnus Granberg <zorry@ume.nu>
1425
1426 * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
1427 include -fPIE in the default specs.
1428 * configure.ac: Check if pie_possible is yes and add -fno-PIE
1429 to TARGET_CFLAGS.
1430
160034b2 14312009-09-03 Felix Zielcke <fzielcke@z-51.de>
1432
1433 * INSTALL: Note that GNU Bison 2.3 or later is required.
1434
087c07c4 14352009-09-03 Colin Watson <cjwatson@ubuntu.com>
1436
1437 * kern/i386/pc/startup.S: Fix typo.
1438
cbf978c0 14392009-09-02 Vladimir Serbinenko <phcoder@gmail.com>
1440
1441 * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
1442 according to GCS.
1443
14442009-09-02 Colin Watson <cjwatson@ubuntu.com>
f0910644 1445
1446 * docs/grub.texi (Naming convention): Describe one-based partition
1447 numbering.
1448 (Device syntax): Likewise.
1449 (File name syntax): Likewise.
1450 (Block list syntax): Likewise.
1451 (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
1452 menu.lst.
1453 (File name syntax): Likewise.
1454 (Command-line and menu entry commands): Document acpi, blocklist,
1455 crc, export, insmod, keystatus, ls, set, and unset commands.
1456
f3e8cdfd 14572009-09-02 Colin Watson <cjwatson@ubuntu.com>
1458
1459 * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
1460 to avoid implying that only one of --shift, --ctrl, or --alt may be
1461 used.
1462
c0bc232b 14632009-09-02 Colin Watson <cjwatson@ubuntu.com>
1464
1465 * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
1466 rather than comparing against S_IFREG, which will almost never work.
1467
aa0f752d 14682009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
1469
1470 * commands/loadenv.c (check_blocklists): Fix off-by-one error.
1471 (write_blocklists): Likewise.
1472
ecb3166a 14732009-09-01 Colin Watson <cjwatson@ubuntu.com>
1474
1475 * script/lua/grub_lua.h (fputs): Supply a format string as the first
1476 argument to grub_printf.
1477
c403a125 14782009-09-01 Felix Zielcke <fzielcke@z-51.de>
31aba781 1479
1480 * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
c403a125 1481 non GNU test.
31aba781 1482
b5e7312c 14832009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
1484
1485 * kern/file.c (grub_file_read): Spelling fix
1486
fe00f472 14872009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
1488
1489 * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
1490 loading of headers in some cases.
1491
cc55302e 14922009-08-30 Robert Millan <rmh.grub@aybabtu.com>
1493
1494 * configure.ac: Bump version to 1.97~beta1.
1495 * docs/version.texi: Likewise.
1496
5c90cdd2 14972009-08-29 Vladimir Serbinenko <phcoder@gmail.com>
64bf71d0 1498
1499 * include/grub/i386/xnu.h: Add license header.
1500 include grub/err.h explicitly.
1501
c90edae4 15022009-08-29 Robert Millan <rmh.grub@aybabtu.com>
1503
1504 * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
1505 to `ufs' in the vfs.root.mountfrom kernel parameter.
1506
d8888b5c 15072009-08-29 Robert Millan <rmh.grub@aybabtu.com>
1508
1509 * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
1510
1511 [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
1512 value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
1513
1514 [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
1515 `ARRAY_SIZE' macro.
1516
6f07b921 15172009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1518
1519 * kern/file.c (grub_file_read): Check offset.
1520 * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
1521 * fs/jfs.c (grub_jfs_read_file): Likewise.
1522 * fs/ntfs.c (grub_ntfs_read): Likewise.
1523 * fs/reiserfs.c (grub_reiserfs_read): Likewise.
1524 * fs/minix.c (grub_minix_read_file): Correct offset check.
1525 * fs/ufs.c (grub_ufs_read_file): Likewise.
1526
b4f34077 15272009-08-28 Colin Watson <cjwatson@ubuntu.com>
1528
1529 * term/i386/pc/console.c (bios_data_area): Cast
1530 GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
1531
e7c69859 15322009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1533
1534 1-bit optimised blitters.
1535
1536 * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
1537 prototype.
1538 (grub_video_fbblit_replace_24bit_1bit): Likewise.
1539 (grub_video_fbblit_replace_16bit_1bit): Likewise.
1540 (grub_video_fbblit_replace_8bit_1bit): Likewise.
1541 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
1542 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
1543 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
1544 * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
1545 function.
1546 (grub_video_fbblit_replace_24bit_1bit): Likewise.
1547 (grub_video_fbblit_replace_16bit_1bit): Likewise.
1548 (grub_video_fbblit_replace_8bit_1bit): Likewise.
1549 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
1550 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
1551 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
1552 * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
1553 when possible.
1554 * video/video.c (grub_video_get_blit_format): Return
1555 GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
1556
a57da43f 15572009-08-28 Colin Watson <cjwatson@ubuntu.com>
1558
1559 * normal/cmdline.c (grub_cmdline_get): Supply a format string as
1560 the first argument to grub_printf.
1561
4cbe67e5 15622009-08-28 Colin Watson <cjwatson@ubuntu.com>
15632009-08-28 Robert Millan <rmh.grub@aybabtu.com>
1564
1565 Add `getkeystatus' terminal method. Add a new `keystatus' command
1566 to query it.
1567
1568 * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
1569 GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
1570 modifier key bitmasks.
1571 (struct grub_term_input): Add `getkeystatus' member.
1572 (grub_getkeystatus): Add prototype.
1573 * kern/term.c (grub_getkeystatus): New function.
1574
1575 * include/grub/i386/pc/memory.h
1576 (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
1577 (struct grub_machine_bios_data_area): Define necessary parts of BIOS
1578 Data Area layout.
1579 * term/i386/pc/console.c (grub_console_getkeystatus): New function.
1580 (grub_console_term_input): Set `getkeystatus' member.
1581 * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
1582 constants.
1583 (grub_usb_keyboard_getreport): Likewise.
1584 (grub_usb_keyboard_checkkey): Likewise.
1585 (grub_usb_keyboard_getkeystatus): New function.
1586 (grub_usb_keyboard_term): Set `getkeystatus' member.
1587
1588 * commands/keystatus.c: New file.
1589 * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
1590 (keystatus_mod_SOURCES): New variable.
1591 (keystatus_mod_CFLAGS): Likewise.
1592 (keystatus_mod_LDFLAGS): Likewise.
1593 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
1594 commands/keystatus.c.
1595 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1596 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1597 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1598 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1599 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1600 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4cbe67e5 1601
6e2a9085 16022009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
1603
1604 Split befs.mod and afs.mod into *_be.mod and *.mod
1605
1606 * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
1607 (grub_fstest_SOURCES): Likewise.
1608 (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
1609 (afs_be_mod_SOURCES): New variable.
1610 (afs_be_mod_CFLAGS): Likewise.
1611 (afs_be_mod_LDFLAGS): Likewise.
1612 (befs_be_mod_SOURCES): Likewise.
1613 (befs_be_mod_CFLAGS): Likewise.
1614 (befs_be_mod_LDFLAGS): Likewise.
1615 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
1616 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1617 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1618 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
1619 (grub_emu_SOURCES): Likewise.
1620 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1621 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1622 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1623 * fs/afs_be.c: New file.
1624 * fs/befs_be.c: New file.
1625 * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
1626 (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
1627 (U16): Replaced with ...
1628 (grub_afs_to_cpu16): ...this. All users updated.
1629 (U32): Replaced with ...
1630 (grub_afs_to_cpu32): ...this. All users updated.
1631 (U64): Replaced with ...
1632 (grub_afs_to_cpu64): ...this. All users updated.
1633 (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
1634 (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
ad8ea1f4 1635 (grub_afs_validate_sblock): Check only one endianness.
6e2a9085 1636 (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
1637 (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
1638 (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
1639 (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
1640 (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
1641 (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
1642 (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
1643 (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
1644
32a71655 16452009-08-26 Bean <bean123ch@gmail.com>
1646
1647 * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
1648 64-bit number.
1649 (GRUB_XFS_FSB_TO_BLOCK): Likewise.
1650 (grub_xfs_inode_block): Change return type to grub_uint64_t.
1651 (grub_xfs_read_inode): Change type of block to grub_uint64_t.
1652
552bf6c5 16532009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1654
1655 NetBSD memory map support.
1656
1657 * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
1658 (grub_netbsd_btinfo_mmap_header): New structure.
1659 (grub_netbsd_btinfo_mmap_entry): Likewise.
1660 * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
1661
1ae2078c 16622009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1663
1664 Enable bsd.mod on coreboot.
1665
1666 * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
1667 (bsd_mod_SOURCES): New variable.
1668 (bsd_mod_CFLAGS): Likewise.
1669 (bsd_mod_LDFLAGS): Likewise.
1670 (bsd_mod_ASFLAGS): Likewise.
1671 * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
1672 (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
1673
beefc598 16742009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1675
1676 Cleanup NetBSD root support.
1677
1678 * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
1679 grub_bsd_get_device.
1680 Fix typo.
1681
3b76e68b 16822009-08-25 Felix Zielcke <fzielcke@z-51.de>
1683
1684 * util/grub.d/00_header.in: Move check for the video backend of
1685 gfxterm from here ...
1686 * util/grub-mkconfig.in: ... to here. Enable gfxterm if there's
1687 a suitable video backend.
1688
aea664ea 16892009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1690
1691 Fix breakage in grub-setup.
1692
1693 * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
1694 "msdos_partition_map".
1695
ff747d50 16962009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1697
1698 Fix breakage in normal/auth.c.
1699
1700 * normal/auth.c (grub_iswordseparator): New function.
1701
e7e1f93f 17022009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
1703
1704 Authentication support.
1705
1706 * commands/password.c: New file.
1707 * conf/common.rmk (pkglib_MODULES): Add password.mod.
1708 (password_mod_SOURCES): New variable.
1709 (password_mod_CFLAGS): Likewise.
1710 (password_mod_LDFLAGS): Likewise.
1711 (normal_mod_SOURCES): Add normal/auth.c.
1712 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
1713 normal/auth.c.
1714 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1715 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1716 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1717 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1718 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1719 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1720 * include/grub/auth.h: New file.
1721 * include/grub/err.h (grub_err_t): New enum value
1722 GRUB_ERR_ACCESS_DENIED.
1723 * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
1724 'users'.
1725 * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
1726 * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
1727 users updated.
1728 * normal/auth.c: New file.
1729 * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
1730 (grub_cmdline_run): Don't allow to go to command line without
1731 authentication.
1732 * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
1733 * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
1734 menuentry without superuser rights.
1735 * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
1736 user isn't a superuser.
1737
70f1161d 17382009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1739
1740 Save space by inlining misc.c functions.
1741
1742 * kern/misc.c (grub_iswordseparator): Made static.
1743 * kern/misc.c (grub_strcat): Moved from here ...
1744 * include/grub/misc.h (grub_strcat): ... here. Inlined.
1745 * kern/misc.c (grub_strncat): Moved from here ...
1746 * include/grub/misc.h (grub_strncat): ... here. Inlined.
1747 * kern/misc.c (grub_strcasecmp): Moved from here ...
1748 * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
1749 * kern/misc.c (grub_strncasecmp): Moved from here ...
1750 * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
1751 * kern/misc.c (grub_isalpha): Moved from here ...
1752 * include/grub/misc.h (grub_isalpha): ... here. Inlined.
1753 * kern/misc.c (grub_isdigit): Moved from here ...
1754 * include/grub/misc.h (grub_isdigit): ... here. Inlined.
1755 * kern/misc.c (grub_isgraph): Moved from here ...
1756 * include/grub/misc.h (grub_isgraph): ... here. Inlined.
1757 * kern/misc.c (grub_tolower): Moved from here ...
1758 * include/grub/misc.h (grub_tolower): ... here. Inlined.
1759
48e40bff 17602009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1761
1762 * script/sh/function.c (grub_script_function_find): Cut error message
1763 not to flood terminal.
1764 * script/sh/lexer.c (grub_script_yylex): Remove command line length
1765 limit.
1766 * script/sh/script.c (grub_script_arg_add): Duplicate string.
1767
c385bfc3 17682009-08-24 Colin Watson <cjwatson@ubuntu.com>
1769
1770 * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
1771 `report' grub_uint8_t *.
1772 (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
1773 Use a 50-millisecond timeout rather than just repeating
1774 grub_usb_keyboard_getreport 50 times.
1775 (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
1776
2d21e3e8 17772009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1778
1779 Rename *_partition_map to part_*
1780
1781 * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
1782 * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
1783 * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
1784 * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
1785 All users updated.
1786 * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
1787 All users updated.
1788 * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
1789 * util/grub-probe.c (probe_partmap): Don't transform partition name
1790 to get module name.
1791
dd103c4e 17922009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1793
1794 Fix OpenBSD and NetBSD support.
1795
1796 * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
1797 memory address conflict.
1798 (OPENBSD_MMAP_ACPI): New definition.
1799 (OPENBSD_MMAP_NVS): Likewise.
1800 * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
1801 and OPENBSD_MMAP_NVS.
1802 Add memory map terminator
1803 Explicit cast when calling grub_unix_real_boot.
ad8ea1f4 1804 (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
dd103c4e 1805
16c84d74 18062009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1807
1808 Let user specify NetBSD root device.
1809
1810 * loader/i386/bsd.c (netbsd_root): New variable.
1811 (netbsd_opts): New option 'root'.
1812 (NETBSD_ROOT_ARG): New macro.
1813 (grub_netbsd_boot): Use 'netbsd_root'.
1814 (grub_bsd_unload): Free 'netbsd_root'.
1815 (grub_cmd_netbsd): Fill 'netbsd_root'.
1816
adb29902 18172009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1818
1819 Support for 64-bit NetBSD.
1820
1821 * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
1822 point when booting non-FreeBSD.
1823
f5ae9f74 18242009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
1825
1826 Support --no-smp and --no-acpi for NetBSD.
1827
1828 * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
1829 (NETBSD_AB_NOACPI): Likewise.
1830 * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
1831 (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
1832
de74f136 18332009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1834
1835 * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
1836 errors.
1837 (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
1838 errors. Call grub_error when needed.
1839
e9a925da 18402009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1841
1842 * commands/search.c (search_fs): Try searching without autoload first.
1843 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
1844 filesystem module explicitly for faster booting.
1845
5174302b 18462009-08-23 Colin Watson <cjwatson@ubuntu.com>
1847
1848 * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
1849
c8c80635 18502009-08-23 Colin Watson <cjwatson@ubuntu.com>
1851
1852 * util/grub.d/30_os-prober.in: Disable os-prober if
1853 `GRUB_DISABLE_OS_PROBER' was set to true.
1854
71acf5e5 18552009-08-23 Robert Millan <rmh.grub@aybabtu.com>
1856
1857 * partmap/pc.c: Rename to ...
1858 * partmap/msdos.c: ... this. Update all users.
1859 (grub_pc_partition_map): Rename to ...
1860 (grub_msdos_partition_map): ... this. Update all users.
1861
1862 * parttool/pcpart.c: Rename to ...
1863 * parttool/msdospart.c: ... this. Update all users.
1864
1865 * include/grub/pc_partition.h: Rename to ...
1866 * include/grub/msdos_partition.h: ... this. Update all users.
1867 (grub_pc_partition_bsd_entry): Rename to ...
1868 (grub_msdos_partition_bsd_entry): ... this. Update all users.
1869 (grub_pc_partition_disk_label): Rename to ...
1870 (grub_msdos_partition_disk_label): ... this. Update all users.
1871 (grub_pc_partition_entry): Rename to ...
1872 (grub_msdos_partition_entry): ... this. Update all users.
1873 (grub_pc_partition_mbr): Rename to ...
1874 (grub_msdos_partition_mbr): ... this. Update all users.
1875 (grub_pc_partition): Rename to ...
1876 (grub_msdos_partition): ... this. Update all users.
1877 (grub_pc_partition_is_empty): Rename to ...
1878 (grub_msdos_partition_is_empty): ... this. Update all users.
1879 (grub_pc_partition_is_extended): Rename to ...
1880 (grub_msdos_partition_is_extended): ... this. Update all users.
1881 (grub_pc_partition_is_bsd): Rename to ...
1882 (grub_msdos_partition_is_bsd): ... this. Update all users.
1883
1884 * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
1885 (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
1886 (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
1887 (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
1888 (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
1889 (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
1890 (gpt_mod_LDFLAGS): Rename to ...
1891 (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
1892 (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
1893 (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
1894 (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
1895 (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
1896 (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
1897 (part_gpt_mod_LDFLAGS): ... this.
1898 (pkglib_MODULES): Prefix partition modules with `part_'. Rename
1899 `pcpart.mod' to `msdospart.mod'.
1900 (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
1901 to ...
1902 (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
1903 (msdospart_mod_LDFLAGS): ... this.
1904
c11fded5 19052009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
1906
1907 * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
1908 (openbsd_opts): Likewise.
1909 (netbsd_opts): Likewise.
1910 (freebsd_flags): Added 0 terminator.
1911 (openbsd_flags): Likewise.
1912 (netbsd_flags): Likewise.
1913 (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
1914 (grub_cmd_freebsd): Transformed into extended command.
1915 (grub_cmd_openbsd): Likewise.
1916 (grub_cmd_netbsd): Likewise.
1917 (cmd_freebsd): Changed type to grub_extcmd_t.
1918 (cmd_openbsd): Likewise.
1919 (cmd_netbsd): Likewise.
1920 (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
1921 grub_cmd_openbsd as extended commands.
1922 (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
1923 cmd_netbsd and cmd_openbsd
1924
11d1c769 19252009-08-22 Vladimir Serbinenko <phcoder@gmail.com>
1926
1927 * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
1928
7a9094e5 19292009-08-21 Pavel Roskin <proski@gnu.org>
1930
5496c37e 1931 * Makefile.in (install-local): When checking if a file is in the
1932 build directory, use "test -e" to detect symlinks.
1933
7a9094e5 1934 * Makefile.in (install-local): Remove all files in
1935 $(DESTDIR)$(pkglibdir) before installing new files there.
1936
e53cea11 19372009-08-18 Felix Zielcke <fzielcke@z-51.de>
1938
1939 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
1940 grub-mkelfimage.
1941
9aced544 19422009-08-18 Felix Zielcke <fzielcke@z-51.de>
1943
1944 * util/grub-mkconfig.in: Don't use gfxterm by default if not
1945 explicitly specified by the user.
1946
b7da6bab 19472009-08-18 Pavel Roskin <proski@gnu.org>
1948
1949 * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
1950 grub_uint8_t pointer for data.
1951 * include/grub/fbutil.h (struct grub_video_fbblit_info):
1952 Likewise.
1953 * video/fb/fbutil.c: Remove unnecessary casts.
1954
19f1b335 19552009-08-17 Michal Suchanek <hramrach@centrum.cz>
1956
1957 VBE cleanup.
1958
1959 * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
1960 (grub_vbe_set_video_mode): Save active mode info
1961 only after setting the mode.
1962 (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
1963 second argument.
1964
2f467aa9 19652009-08-17 Michal Suchanek <hramrach@centrum.cz>
1966
1967 Rename variables for clarity.
1968
1969 * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
1970 (active_vbe_mode_info): ... this. All users updated.
1971 (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
1972 All users updated.
1973 (initial_mode): Rename to ...
1974 (initial_vbe_mode): ... this. All users updated.
1975 (mode_in_use): Rename to ..
1976 (vbe_mode_in_use): ... this. All users updated.
1977 (mode_list): Rename to ..
1978 (vbe_mode_list): ... this. All users updated.
1979 (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
1980 'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
1981 (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
1982 'mode_list_size' to 'vbe_mode_list_size'.
1983 (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
1984 'best_mode_info' to 'best_vbe_mode_info' and
1985 'best_mode' to 'best_vbe_mode'
1986
6025fcd7 19872009-08-17 Michal Suchanek <hramrach@centrum.cz>
1988
1989 Remove duplicate grub_video_fb_get_video_ptr.
1990
1991 * include/grub/fbutil.h (get_data_ptr): Rename to ...
1992 (grub_video_fb_get_video_ptr): ... this.
1993 * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
1994 * video/fb/fbutil.c: Add comment about addressing.
1995 (get_data_ptr): Rename to ...
1996 (grub_video_fb_get_video_ptr): ... this. All users updated.
1997 * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
1998
cc8c6faf 19992009-08-17 Robert Millan <rmh.grub@aybabtu.com>
2000
2001 * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
2002 grub_dprintf() that was just added.
2003
08aa61f0 20042009-08-17 Robert Millan <rmh.grub@aybabtu.com>
2005
2006 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
2007 (DEFAULT_VIDEO_MODE): Remove macros.
2008 (grub_linux_boot): Remove assumption that Linux has FB support,
2009 and use "text" as default video mode.
2010
7cef4f75 20112009-08-15 Vladimir Serbinenko <phcoder@gmail.com>
2012
2013 * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
2014 grub_dprintf.
2015 * fs/fat.c (grub_fat_read_data): Likewise.
2016
e1f39873 20172009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2018
2019 * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
2020 payload.
2021 (grub_module): Likewise.
2022
c166d79e 20232009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2024
2025 * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
2026 mbi->cmdline but free playground.
2027
c60cee8e 20282009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2029
2030 Handle group offset on UFS1.
2031
2032 * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
2033 (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
2034
c0d8b5d4 20352009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2036
2037 Split ufs.mod into ufs1.mod and ufs2.mod.
2038
2039 * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
2040 (grub_fstest_SOURCES): Likewise.
2041 (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
2042 (ufs_mod_SOURCES): Remove.
2043 (ufs_mod_CFLAGS): Likewise.
2044 (ufs_mod_LDFLAGS): Likewise.
2045 (ufs1_mod_SOURCES): New variable.
2046 (ufs1_mod_CFLAGS): Likewise.
2047 (ufs1_mod_LDFLAGS): Likewise.
25fbd77a 2048 (ufs2_mod_SOURCES): New variable.
2049 (ufs2_mod_CFLAGS): Likewise.
2050 (ufs2_mod_LDFLAGS): Likewise.
c0d8b5d4 2051 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
2052 * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
2053 Likewise.
2054 (grub_emu_SOURCES): Likewise.
2055 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2056 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2057 (grub_setup_SOURCES): Likewise.
2058 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2059 * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
2060 (grub_setup_SOURCES): Likewise.
2061 * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
2062 Likewise.
2063 * fs/ufs2.c: New file.
2064 * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
2065
d3539132 20662009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2067
2068 Framebuffer split.
2069
2070 * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
2071 subsystem at the end.
2072 * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
2073 (video_fb_mod_SOURCES): New variable.
2074 (video_fb_mod_CFLAGS): Likewise.
2075 (video_fb_mod_LDFLAGS): Likewise.
2076 * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
2077 video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
2078 * video/i386/pc/vbeblit.c: Moved from here ...
2079 * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
2080 * video/i386/pc/vbefill.c: Moved from here ...
2081 * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
2082 * video/i386/pc/vbeutil.c: Moved from here ...
2083 * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
2084 * include/grub/i386/pc/vbeblit.h: Moved from here ...
2085 * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
2086 * include/grub/i386/pc/vbefill.h: Moved from here ...
2087 * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
2088 * include/grub/i386/pc/vbeutil.h: Moved from here ...
2089 * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
2090 * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
2091 * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
2092 * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
2093 (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
2094 (grub_video_adapter): Added 'get_info_and_fini'.
2095 (grub_video_get_info_and_fini): New prototype.
2096 (grub_video_set_mode): make modestring const char *.
2097 * loader/i386/linux.c (grub_linux_setup_video): Use
2098 grub_video_get_info_and_fini.
2099 (grub_linux_boot): Move modesetting just before booting.
2100 * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
2101 grub_video_get_info_and_fini.
2102 * video/i386/pc/vbe.c: Moved framebuffer part ...
2103 * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
2104 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
2105 grub_video_fbstd_colors and grub_video_fb_set_palette.
2106 (grub_video_vbe_init): Clear 'framebuffer' variable and use
2107 grub_video_fb_init.
2108 (grub_video_vbe_fini): Use grub_video_fb_fini.
2109 (grub_video_vbe_setup): Use framebuffer.render_target instead of
2110 render_target and use grub_video_fb_set_active_render_target and
2111 grub_video_fb_set_palette.
2112 (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
2113 (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
2114 (grub_video_vbe_adapter): Use framebuffer.
2115 * video/video.c (grub_video_get_info_and_fini): New function.
2116 (grub_video_set_mode): Make modestring const char *.
2117 (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
2118 values are already initialised.
2119
d404ee56 21202009-08-14 Pavel Roskin <proski@gnu.org>
2121
2122 * boot/i386/pc/cdboot.S: Use LOCAL for local labels. Eliminate
2123 ABS and APPLE_CC.
2124 * boot/i386/pc/diskboot.S: Likewise.
2125 * boot/i386/pc/lnxboot.S: Likewise. Hardcode the number of code
2126 sectors allow compilation on MacOSX.
2127 * conf/i386-pc.rmk: Enable unconditional compilation of
2128 lnxboot.img.
2129
9a10df16 21302009-08-13 Colin Watson <cjwatson@ubuntu.com>
2131
2132 * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
2133 * util/grub.d/00_header.in: Enter interruptible sleep if
2134 GRUB_HIDDEN_TIMEOUT is set.
2135
be3c9ca7 21362009-08-13 Yves Blusseau <blusseau@zetam.org>
2137
2138 * include/grub/symbol.h: Add the LOCAL macro.
2139 * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
2140 starting with "L_".
2141
1f9e557e 21422009-08-13 Pavel Roskin <proski@gnu.org>
2143
9ca62843 2144 * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
2145 any modern compilers we support.
2146
1f9e557e 2147 * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
2148 Use local labels starting with "L_" so that Apple assembler
2149 knows they are local.
2150
81623db6 21512009-08-10 Robert Millan <rmh.grub@aybabtu.com>
2152
2153 * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
2154 (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
2155 (bsd_kernel_types): ... this enum.
2156
2157 * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
2158 (grub_cmd_freebsd_module_elf): Abort with "You need to load the
2159 kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
2160
2161 (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
2162 (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
2163 (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
2164 messages.
2165
f5d35e7a 21662009-08-08 Robert Millan <rmh.grub@aybabtu.com>
2167
2168 * util/grub-dumpdevtree: Moved from here ...
2169 * util/i386/efi/grub-dumpdevtree: ... to here.
2170 (hexify): New function. Converts a string to its hex version.
2171 Generate hex versions of "efi" and "device-properties" by calling
2172 hexify() on the ASCII strings rather than by hardcoding numbers.
2173
d1e1d527 21742009-08-08 Robert Millan <rmh.grub@aybabtu.com>
2175
2176 * fs/jfs.c: Update copyright year.
2177
1ebbe064 21782009-08-08 Felix Zielcke <fzielcke@z-51.de>
2179
2180 * util/grub.d/00_header.in: Fix a comment.
2181 * util/grub.d/10_linux.in: Likewise.
2182 * util/grub.d/10_windows.in: Likewise.
2183 * util/grub.d/10_hurd.in: Likewise.
2184
a78c8d24 21852009-08-08 Felix Zielcke <fzielcke@z-51.de>
2186
2187 * util/grub-mkconfig.in: Allow the user to specify the used font
2188 with GRUB_FONT.
2189
29a6b9e8 21902009-08-08 Pavel Roskin <proski@gnu.org>
2191
b5f16cc4 2192 * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
2193 available, xfs.mod needs it now.
2194
2f5cb827 2195 * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
2196 the "g" modifier in sed when the intention is to strip something
2197 once. This fixes comparison of kernels with multiple dashes.
2198
29a6b9e8 2199 * util/grub-mkconfig.in: Define datarootdir, datadir may depend
2200 on it. Add missing space before closing bracket. Fix
2201 misleading formatting.
2202
892a3d98 22032009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2204
2205 * docs/grub.texi: Major overhaul. Remove all sections that are
2206 specific to GRUB Legacy, or mostly composed of Legacy-specific
2207 information.
2208
ed94253f 22092009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2210
2211 * docs/version.texi: New file. Provides version information for
2212 grub.texi.
2213
126d6628 22142009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2215
2216 * docs/grub.texi: Update CVS information to SVN.
2217 Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
2218
998b5aa9 22192009-08-07 Felix Zielcke <fzielcke@z-51.de>
2220
2221 * util/grub-mkconfig.in: Remove a wrong `fi'.
2222
818e094a 22232009-08-07 Felix Zielcke <fzielcke@z-51.de>
2224
2225 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
2226 (grub_jfs_uuid): New function.
2227 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
2228
b969c52f 22292009-08-07 Felix Zielcke <fzielcke@z-51.de>
2230
2231 * util/grub-mkconfig_lib.in (font_path): Move the functionality
2232 of it to ...
2233 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
2234 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
2235
7a4894cc 22362009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2237
2238 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
2239 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
2240 Update all users.
2241
2242 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
2243 not just "vmlinu[zx]".
2244 Moved from here ...
2245 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
2246 all users.
2247
2248 * util/grub.d/10_linux.in (find_latest): Moved from here ...
2249 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
2250 all users.
2251
4e2171f8 22522009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2253
2254 * util/grub.d/10_freebsd.in: Use an absolute device path for
2255 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
2256
6dcfcb32 22572009-08-06 Felix Zielcke <fzielcke@z-51.de>
2258
2259 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
2260 handling of multiple abstraction modules.
2261
f56a8756 22622009-08-04 Robert Millan <rmh.grub@aybabtu.com>
2263
2264 Fix a bug resulting in black screen when loading Linux using a
2265 packed video mode.
2266
2267 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
2268 function.
2269
2270 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
2271 (grub_vbe_bios_getset_dac_palette_width): New function.
2272 (grub_vbe_bios_get_dac_palette_width)
2273 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
2274 grub_vbe_bios_getset_dac_palette_width()).
2275
2276 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
2277 check for return status.
2278 (grub_vbe_get_video_mode_info): When getting information for a packed
2279 mode (<= 8 bpp), obtain DAC palette width using
2280 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
2281 {red,green,blue}_mark_size.
2282
222671b2 22832009-08-04 Felix Zielcke <fzielcke@z-51.de>
2284
ecb1a6d9 2285 * commands/search.c (options): Fix help output to match actual code.
222671b2 2286
f84114f5 22872009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
2288
2289 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
2290 of homegrown code.
2291
bd288a20 22922009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
e768b770 2293
2294 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
2295 on XFS or ReiserFS.
2296
8aab5e25 22972009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
2298
2299 Support Apple partition map with sector size different from 512 bytes.
2300
2301 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
2302 (apple_partition_map_iterate): Respect 'aheader.blocksize'
2303 and 'apart.partmap_size'.
2304
6ad6258a 23052009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
23062009-08-01 Robert Millan <rmh.grub@aybabtu.com>
2307
2308 Fix cpuid command.
2309
2310 * commands/i386/cpuid.c (options): New variable.
2311 (grub_cmd_cpuid): Return real error.
2312 (GRUB_MOD_INIT(cpuid)): Declare options.
2313
67459bc6 23142009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
2315
2316 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
2317 valid.
2318
fbc6ab54 23192009-07-31 Bean <bean123ch@gmail.com>
2320
2321 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
2322 log2_inode.
2323 (grub_fshelp_node): Move inode field to the end.
2324 (grub_xfs_data): Remove inode field.
2325 (grub_xfs_inode_block): Calculate inode size using sblock.
2326 (grub_xfs_inode_offset): Likewise.
2327 (grub_xfs_read_inode): Calculate inode size using sblock.
2328 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
2329 (grub_xfs_iterate_dir): Calculate inode size using sblock.
2330 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
2331 to match inode size.
2332 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
2333 not accessible when data is null.
2334 (grub_xfs_open): Likewise.
2335
f45d6cfc 23362009-07-31 Bean <bean123ch@gmail.com>
2337
2338 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
2339 Don't change pv->disk if it's already set.
2340
2341 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
2342 (grub_raid_register): ... here.
2343 (grub_raid_rescan): Removed.
2344
2345 * include/grub/raid.h (grub_raid_rescan): Removed.
2346
2347 * util/grub-fstest.c: Remove include file <grub/raid.h>.
2348 (fstest): Replace grub_raid_rescan with module fini function followed
2349 by init function.
2350
2351 * util/grub-probe.c: Add include file <grub/raid.h>.
2352 (probe_raid_level): New function.
2353 (probe): Detect abstraction by walking the disk device, support two
2354 level of abstraction (LVM on RAID) when detecting partition map.
2355
24443b5a 23562009-07-31 Pavel Roskin <proski@gnu.org>
2357
2358 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
2359 to grub_zalloc(), it was erroneous.
2360 Reported by Bean <bean123ch@gmail.com>
2361
a275d9e7 23622009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
2363
2364 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
ad8ea1f4 2365 embedding zone, not only the first one.
a275d9e7 2366
56c5a47f 23672009-07-29 Joe Auricchio <jauricchio@gmail.com>
2368
2369 * term/gfxterm.c (clear_char): New function.
2370 (grub_virtual_screen_setup): Use clear_char.
2371 (scroll_up): Likewise.
2372 (grub_virtual_screen_cls): Likewise.
2373
67bb323a 23742009-07-29 Felix Zielcke <fzielcke@z-51.de>
2375
2376 * util/deviceiter.c (get_acceleraid_disk_name): New static
2377 function.
2378 (grub_util_iterate_devices): Handle Accelraid devices.
2379 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
2380
388a7c75 23812009-07-28 Robert Millan <rmh.grub@aybabtu.com>
2382
2383 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
2384 separator for the suggested gfxpayload string (';' collides with the
2385 parser and needs escaping).
2386
3bb7abcf 23872009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
2388
2389 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
2390 Clear direction flag before jumping to OS.
2391 (grub_multiboot2_real_boot): Likewise.
2392
2ddd36d7 23932009-07-28 Felix Zielcke <fzielcke@z-51.de>
2394
2395 * util/i386/pc/grub-install: Fix parsing of --disk-module
2396 option.
2397
c521b62b 23982009-07-28 Felix Zielcke <fzielcke@z-51.de>
2399
2400 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
2401 when embedding.
2402
880e0a0c 24032009-07-26 Felix Zielcke <fzielcke@z-51.de>
2404
2405 * util/grub-mkconfig.in (package_version): New variable.
2406 Use it do display the version.
2407
2366e356 24082009-07-25 Felix Zielcke <fzielcke@z-51.de>
2409
2410 * kern/file.c (grub_file_open): Revert to previous check with
2411 grub_errno.
2412
7ad8c80e 24132009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2414
2415 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
2416 from help line. It's out of sync with code.
2417
72b9658b 24182009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2419
2420 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
2421 entries on failed boot.
2422
77435277 24232009-07-25 Felix Zielcke <fzielcke@z-51.de>
2424
2425 * kern/file.c (grub_file_open): Fix an error check.
2426
fcaa8b21 24272009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
2428
35d16c74 2429 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
2430 partition map couldn't be identified.
fcaa8b21 2431
48904cd1 24322009-07-23 Pavel Roskin <proski@gnu.org>
2433
ef3c317f 2434 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
2435 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
2436 case of little endian words becomes just an optimization.
2437 Respect const modifier.
ad8ea1f4 2438 (md5_final): Use code that doesn't depend on endianness.
ef3c317f 2439
48904cd1 2440 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
2441 to avoid loss of upper bits if align is unsigned and shorter
2442 than addr.
2443
260c9a89 24442009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2445
2446 UUID support for UFS
2447
2448 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
2449 (grub_ufs_uuid): New function.
2450 (grub_ufs_fs): add .uuid
2451
f76ce889 24522009-07-21 Pavel Roskin <proski@gnu.org>
2453
2454 * kern/dl.c (grub_dl_check_header): Make static.
2455
6a6cbcaf 24562009-07-21 Felix Zielcke <fzielcke@z-51.de>
2457
2458 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
2459 add drivemap for Vista. It breaks Windows 7.
2460
cffcddb2 24612009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2462
2463 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
2464 128 bytes
2465
1ef44b80 24662009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2467
2468 Add BFS support
2469
2470 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
2471 (grub_fstest_SOURCES): Likewise.
2472 (pkglib_MODULES): Add befs.mod.
2473 (befs_mod_SOURCES): New variable.
2474 (befs_mod_CFLAGS): Likewise.
2475 (befs_mod_LDFLAGS): Likewise.
2476 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2477 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2478 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2479 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2480 (grub_setup_SOURCES): Likewise.
2481 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2482 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2483 (grub_setup_SOURCES): Likewise.
2484 * fs/befs.c: New file.
2485 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
2486 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
2487 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
2488 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
2489 (B_KEY_INDEX_ALIGN): New declaration.
2490 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
2491 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
2492 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
2493 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
2494 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
2495 (grub_afs_mount) [MODE_BFS]: Likewise.
2496 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
2497 (grub_afs_fs): Use GRUB_AFS_FSNAME
2498 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
2499 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
2500 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
2501 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
2502
4f253044 25032009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
2504
2505 * util/getroot.c (find_root_device): Add support for MacOSX.
2506 * util/hostdisk.c: Likewise.
2507
57a55913 25082009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2509
2510 * font/font.c (find_glyph): Check whether a font is present to avoid
2511 segmentation fault.
75421ca9 2512
25132009-07-20 Joe Auricchio <jauricchio@gmail.com>
04c7c429 2514
2515 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
2516
e98cd0c2 25172009-07-20 Pavel Roskin <proski@gnu.org>
2518
2519 * configure.ac: Trim excessively wordy excuses.
2520
1d2d169a 25212009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2522
2523 Add symlink, mtime and label support to AtheFS.
2524
2525 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
2526 (grub_afs_iterate_dir): Handle symlinks.
2527 (grub_afs_open): Use grub_afs_read_symlink.
2528 (grub_afs_dir): Likewise.
2529 Pass mtime.
2530 (grub_afs_label): New function.
2531 (grub_afs_fs): Add grub_afs_label.
2532 (grub_afs_read_symlink): New function.
2533
186f3189 25342009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
2535
2536 Fix AtheFS support.
2537
2538 * fs/afs.c: Fix comments style.
2539 (grub_afs_blockrun): Declare as packed.
2540 (grub_afs_datastream): Likewise.
2541 (grub_afs_bnode): Likewise.
2542 (grub_afs_btree): Likewise.
2543 (grub_afs_sblock): Likewise.
2544 Declare `name' as char.
2545 (grub_afs_inode): Declare as packed.
2546 Change void *vnode to grub_uint32_t unused.
2547 (grub_afs_iterate_dir): Check that key_size is positive.
2548 (grub_afs_mount): Don't read superblock twice.
75421ca9 2549 (grub_afs_dir): Don't free node in case of error,
186f3189 2550 grub_fshelp_find_file already handles this.
2551 (grub_afs_open): Likewise.
2552
5680109e 25532009-07-19 Pavel Roskin <proski@gnu.org>
2554
2555 * Makefile.in: Remove LIBLZO and enable_lzo.
2556 * conf/i386-pc.rmk: Remove lzo support.
2557 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
2558 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
2559 support.
2560 * kern/i386/pc/lzo1x.S: Remove.
2561 * kern/i386/pc/startup.S: Remove lzo support.
2562 * util/i386/pc/grub-mkimage.c: Likewise.
2563
ac70fa32 25642009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
2565
2566 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
2567 * fs/xfs.c (grub_xfs_dir): Likewise.
2568 * fs/afs.c (grub_afs_dir): Likewise.
2569 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
2570 (grub_iso9660_open): Likewise.
2571 * fs/jfs.c (grub_jfs_open): Likewise.
2572 * fs/ext2.c (grub_ext2_dir): Likewise.
2573 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
2574 * script/sh/lexer.c (grub_script_yylex): Likewise.
75421ca9 2575
eab58da2 25762009-07-16 Pavel Roskin <proski@gnu.org>
2577
d2838156 2578 * configure.ac: Never add "-c" to CFLAGS.
2579
55c70904 2580 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
2581
43e6200c 2582 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
2583 grub_cv_cc_efiemu should be used.
2584
ce7a733d 2585 * configure.ac: Typo fixes.
2586
eab58da2 2587 * kern/mm.c (grub_zalloc): New function.
2588 (grub_debug_zalloc): Likewise.
2589 * include/grub/mm.h: Declare grub_zalloc() and
2590 grub_debug_zalloc().
2591 * util/misc.c (grub_zalloc): New function.
2592 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
2593 instead of grub_malloc(), remove unneeded initializations.
2594 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
2595 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
2596 * commands/parttool.c (grub_cmd_parttool): Likewise.
2597 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
2598 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
2599 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
2600 * disk/usbms.c (grub_usbms_finddevs): Likewise.
2601 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
2602 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
2603 (grub_cmd_efiemu_pnvram): Likewise.
2604 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
2605 * fs/iso9660.c (grub_iso9660_mount): Likewise.
2606 (grub_iso9660_iterate_dir): Likewise.
2607 * fs/jfs.c (grub_jfs_opendir): Likewise.
2608 * fs/ntfs.c (list_file): Likewise.
2609 (grub_ntfs_mount): Likewise.
2610 * kern/disk.c (grub_disk_open): Likewise.
2611 * kern/dl.c (grub_dl_load_core): Likewise.
2612 * kern/elf.c (grub_elf_file): Likewise.
2613 * kern/env.c (grub_env_context_open): Likewise.
2614 (grub_env_set): Likewise.
2615 (grub_env_set_data_slot): Likewise.
2616 * kern/file.c (grub_file_open): Likewise.
2617 * kern/fs.c (grub_fs_blocklist_open): Likewise.
2618 * loader/i386/multiboot.c (grub_module): Likewise.
2619 * loader/xnu.c (grub_xnu_create_key): Likewise.
2620 (grub_xnu_create_value): Likewise.
2621 * normal/main.c (grub_normal_add_menu_entry): Likewise.
2622 (read_config_file): Likewise.
2623 * normal/menu_entry.c (make_screen): Likewise.
2624 * partmap/sun.c (sun_partition_map_iterate): Likewise.
2625 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
2626 * script/sh/script.c (grub_script_parse): Likewise.
2627 * video/bitmap.c (grub_video_bitmap_create): Likewise.
2628 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
2629 * video/readers/png.c (grub_png_output_byte): Likewise.
2630 (grub_video_reader_png): Likewise.
2631
830afef7 26322009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
5ce5507f 2633
2634 Enable all targets that can be built by default
2635
830afef7 2636 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
5ce5507f 2637 grub-mkfont and grub-fstest if they can be built
2638
ee293aee 26392009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2640
2641 Fix hang and segmentation fault in grub-emu-usb
2642
2643 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
2644 * util/usb.c (grub_libusb_devices): likewise
2645 (grub_libusb_init): rename to ...
2646 (GRUB_MOD_INIT (libusb)):...this
2647 (grub_libusb_fini): rename to ..
2648 (GRUB_MOD_FINI (libusb)):...this
2649 * disk/usbms.c (grub_usbms_transfer): fix retry logic
2650 * include/grub/disk.h (grub_raid_init): removed, it's useless
2651 (grub_raid_fini): likewise
2652 (grub_lvm_init): likewise
2653 (grub_lvm_fini): likewise
2654 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
2655 by grub_init_all
2656
94414221 26572009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2658
2659 Fix libusb
2660
2661 * Makefile.in (LIBUSB): new macro
2662 * genmk.rb (Utility/print_tail): new method
2663 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
2664 (top level): call util.print_tail at the end.
2665
59ade63d 26662009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2667
2668 Make FreeBSD accept zpool.cache
2669
2670 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
2671 type is /boot/zfs/zpool.cache
2672
a58da8c7 26732009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
2674
2675 Fix 64-bit efiemu
2676
2677 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
2678 correct wrong typedef
2679 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
2680
20591577 26812009-07-15 Pavel Roskin <proski@gnu.org>
2682
560ca572 2683 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
2684 * kern/disk.c (struct grub_disk_cache): Likewise.
2685
e8e8e4fd 2686 * commands/probe.c (options): Typo fix.
2687
fde24e10 2688 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
2689 Increase to 0x5a to accommodate FAT32. Adjust other offsets
2690 accordingly.
2691 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
2692
379c54c1 2693 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
2694 the end of "Error" to make the message more readable.
2695
7bd8f5bf 2696 * boot/i386/pc/boot.S (kernel_segment): Remove.
2697 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
2698 for destination.
2699
40b132c5 2700 * boot/i386/pc/boot.S (boot_version): Remove.
2701 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
2702 Remove.
2703
20591577 2704 * include/grub/i386/pc/boot.h: Sort all offsets.
2705 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
2706 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
2707 * boot/i386/pc/boot.S: Assert location of every offset listed in
2708 include/grub/i386/pc/boot.h.
2709
2df32b2c 27102009-07-13 Pavel Roskin <proski@gnu.org>
2711
44b5d879 2712 * include/grub/i386/coreboot/machine.h: Rename
2713 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
2714 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
2715 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
2716
17dc3751 2717 * kern/dl.c: Force native word size to suppress warnings when
2718 compiling grub-emu.
2719
2df32b2c 2720 * kern/device.c (grub_device_iterate): Change struct part_ent to
2721 hold the name, not a pointer to it. Use one grub_malloc() per
2722 partition, not two. Free partition_name if grub_malloc() fails.
2723 Set ents to NULL only before grub_partition_iterate() is called.
2724
75c59f59 27252009-07-11 Bean <bean123ch@gmail.com>
2726
2727 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
2728 childname.
2729
0ae1bf88 27302009-07-10 Bean <bean123ch@gmail.com>
27312009-07-10 Robert Millan <rmh.grub@aybabtu.com>
2732
2733 * kern/ieee1275/openfw.c (grub_children_iterate)
2734 (grub_devalias_iterate): Fix size evaluation for property or path
2735 strings, which was broken since r2132.
2736
8279cade 27372009-07-07 Pavel Roskin <proski@gnu.org>
2738
7d8a52d3 2739 * commands/search.c (search_file): Merge into ...
2740 (search_fs): ... this. Accept search type as argument.
2741 (grub_cmd_search): Pass search type to search_fs().
2742
25f9a05a 2743 * include/grub/util/console.h: New file.
2744 * util/console.c: Use it instead of grub/machine/console.h.
2745 * util/grub-emu.c: Likewise.
2746
8279cade 2747 * lib/arg.c (find_long_option): Remove.
2748 (find_long): Add `len' argument, make `s' const char *.
2749 (grub_arg_parse): Parse long options in place, not in a
2750 temporary buffer.
2751
4a11b60f 27522009-07-06 Pavel Roskin <proski@gnu.org>
2753
99f68041 2754 * commands/search.c (search_fs): Fix potential NULL pointer
2755 dereference.
2756
4a11b60f 2757 * commands/search.c (search_fs): Replace QUID macro with quid_fn
2758 function pointer.
2759
e110f4de 27602009-07-06 Daniel Mierswa <impulze@impulze.org>
2761
2762 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
2763 comparison.
2764
46eeb6a2 27652009-07-05 Pavel Roskin <proski@gnu.org>
2766
bab74958 2767 * include/grub/i386/linux.h (struct linux_kernel_params):
2768 Restore padding3, it's still needed.
2769
46eeb6a2 2770 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
2771 FreeBSD.
2772 * util/osdetect.lua: Likewise.
2773
b4a1dc79 27742009-07-05 Bean <bean123ch@gmail.com>
2775
2776 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
2777
2778 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
2779 (grub_lua_getenv): Likewise.
2780 (grub_lua_setenv): Likewise.
2781 (save_errno): New function.
2782 (push_result): Likewise.
2783 (grub_lua_enum_device): Likewise.
2784 (grub_lua_enum_file): Likewise.
2785 (grub_lua_file_open): Likewise.
2786 (grub_lua_file_close): Likewise.
2787 (grub_lua_file_seek): Likewise.
2788 (grub_lua_file_read): Likewise.
2789 (grub_lua_file_getline): Likewise.
2790 (grub_lua_file_getsize): Likewise.
2791 (grub_lua_file_getpos): Likewise.
2792 (grub_lua_file_eof): Likewise.
2793 (grub_lua_file_exist): Likewise.
2794 (grub_lua_add_menu): Likewise.
2795
2796 * script/lua/grub_lua.h (isupper): New inline function.
2797 (islower): Likewise.
2798 (ispunct): Likewise.
2799 (isxdigit): Likewise.
2800 (strcspn): Change to normal function.
2801 (strpbkr): New function declaration.
2802 (memchr): Likewise.
2803
2804 * script/lua/grub_main.c (scan_str): New function.
2805 (strcspn): Likewise.
2806 (strpbrk): Likewise.
2807 (memchr): Likewise.
2808
2809 * script/lua/linit.c (lualibs): Enable the string library.
2810
2811 * util/osdetect.lua: New file.
2812
2da92295 28132009-07-04 Robert Millan <rmh.grub@aybabtu.com>
2814
2815 * include/grub/i386/linux.h (struct linux_kernel_params): Add
2816 `capabilities' member.
2817
b2582ec9 28182009-07-02 Pavel Roskin <proski@gnu.org>
2819
2820 * genparttoollist.sh: Add missing newline at the end.
2821
32622956 28222009-07-01 Pavel Roskin <proski@gnu.org>
2823
87a7339e 2824 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
2825
d23af54e 2826 * util/hostdisk.c (open_device): Remove `const' from
2827 `sysctl_size', as sysctlbyname() can change it (in this case it
2828 doesn't actually happen).
2829
c94b18a9 2830 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
2831 using signed long int constants.
2832
c6cd3ef0 2833 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
2834 constant to avoid a warning on FreeBSD.
2835
0df63420 2836 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
2837 where it's needed.
2838
999577f1 2839 * Makefile.in: Install include/grub/machine symlink.
2840
6f41557f 2841 * Makefile.in: When installing symlinks, use "cp -fR", which
2842 works on FreeBSD and MacOSX.
2843 From Yves Blusseau <cl7m42e02@sneakemail.com>
2844
c8d22988 2845 * kern/dl.c (grub_dl_resolve_symbol): Make static.
2846 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
2847
1b96e952 2848 * util/misc.c: Move grub_reboot() and grub_halt() ...
2849 * util/grub-emu.c: ... here. Make main_env static.
2850 * include/grub/util/misc.h: Remove main_env.
2851
2ef0084d 2852 * kern/mm.c: Use correct format to print size_t.
2853
32622956 2854 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
2855 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
2856 * kern/powerpc/dl.c: Likewise.
2857 * kern/sparc64/dl.c: Likewise.
2858 * kern/x86_64/dl.c: Likewise.
2859
3f7f0cd0 28602009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2861
2862 Fix grub-emu build on sparc64-ieee1275.
2863
75421ca9 2864 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
3f7f0cd0 2865 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
2866
211d06b5 28672009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2868
2869 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
2870 (grub_reboot, grub_halt): New functions.
2871
2872 * util/i386/pc/misc.c: Delete. Update all users.
2873 * util/sparc64/ieee1275/misc.c: Likewise.
2874 * util/powerpc/ieee1275/misc.c: Likewise.
2875
aaf53e3c 28762009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2877
2878 * conf/i386.rmk (setjmp_mod_SOURCES)
2879 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
2880 * conf/common.rmk (setjmp_mod_SOURCES)
2881 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
2882 to use $(target_cpu).
2883 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
2884 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
2885 * conf/powerpc-ieee1275.rmk: Likewise.
2886 * conf/sparc64-ieee1275.rmk: Likewise.
2887
2888 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
2889 $(target_cpu) for kern/$(target_cpu)/dl.c.
2890 * conf/i386-efi.rmk: Likewise.
2891 * conf/i386-ieee1275.rmk: Likewise.
2892 * conf/x86_64-efi.rmk: Likewise.
2893 * conf/i386-coreboot.rmk: Likewise.
2894 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
2895 $(target_cpu) for kern/$(target_cpu)/dl.c and for
2896 kern/$(target_cpu)/cache.S.
2897 * conf/sparc64-ieee1275.rmk: Likewise.
2898
a337130b 28992009-07-01 Robert Millan <rmh.grub@aybabtu.com>
2900
2901 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
2902 type to `grub_uint8_t', and adjust `padding9' accordingly.
2903
c6fe4d53 29042009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2905
b09db61d 2906 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
2907
c6fe4d53 2908 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
2909 assembly in final jump, using register constraints.
2910
b09db61d 2911 (grub_linux_boot): For text mode, initialize `have_vga' using
2912 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
2913
2914 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
2915 right before the final jump.
2916
2917 Set `video_mode' to 0x3.
2918
2919 Document initialization of `video_page', `video_mode' and
2920 `video_ega_bx'.
2921
28333ad0 29222009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2923
2924 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
2925 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
75421ca9 2926 and set GRUB_LINUX_FLAG_QUIET appropriately.
28333ad0 2927
02164e1b 29282009-06-29 Robert Millan <rmh.grub@aybabtu.com>
2929
2930 Fix build on Debian / sparc.
2931
2932 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
2933
18b6c557 29342009-06-28 Pavel Roskin <proski@gnu.org>
2935
85f2aab6 2936 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
2937 fix a warning.
2938
18b6c557 2939 * util/grub.d/10_linux.in: Match SUSE style initrd names.
2940
ad760f81 29412009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2942
2943 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
2944 `err'.
2945
87a4623b 29462009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2947
2948 Revert r2338.
2949
2950 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
2951 file can't be opened. grub_file_open() is already supposed to set
75421ca9 2952 grub_errno / grub_errmsg appropriately.
87a4623b 2953 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2954
8231fb77 29552009-06-27 Pavel Roskin <proski@gnu.org>
29562009-06-27 Robert Millan <rmh.grub@aybabtu.com>
2957
2958 * include/grub/dl.h: Include grub/elf.h.
2959 (struct grub_dl): Add symtab field.
2960 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
2961 GRUB_MODULES_MACHINE_READONLY.
2962 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
2963 of the header for read-only modules.
2964 (grub_dl_unload): Free mod->symtab for read-only modules.
2965 * kern/i386/dl.c: Use mod->symtab.
2966 * kern/powerpc/dl.c: Likewise.
2967 * kern/sparc64/dl.c: Likewise.
2968 * kern/x86_64/dl.c: Likewise.
2969
2970 * conf/i386-qemu.rmk: New file.
2971 * kern/i386/qemu/startup.S: Likewise.
2972 * kern/i386/qemu/mmap.c: Likewise.
2973 * boot/i386/qemu/boot.S: Likewise.
2974 * include/grub/i386/qemu/time.h: Likewise.
2975 * include/grub/i386/qemu/serial.h: Likewise.
2976 * include/grub/i386/qemu/kernel.h: Likewise.
2977 * include/grub/i386/qemu/console.h: Likewise.
2978 * include/grub/i386/qemu/boot.h: Likewise.
2979 * include/grub/i386/qemu/init.h: Likewise.
2980 * include/grub/i386/qemu/machine.h: Likewise.
2981 * include/grub/i386/qemu/loader.h: Likewise.
2982 * include/grub/i386/qemu/memory.h: Likewise.
2983
2984 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
2985 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
2986 [qemu] (pkglib_IMAGES): Add `boot.img'.
2987 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
2988 [qemu] (boot_img_FORMAT): New variables.
2989 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
2990 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
2991 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
2992 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
2993 [qemu] (kernel_img_FORMAT): New variables.
2994
2995 * configure.ac: Recognise `i386-qemu'.
2996
2997 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
2998 (for no compression).
2999 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
3000 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
3001 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
3002 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
3003 ifdefs).
3004
97fe384e 30052009-06-27 Pavel Roskin <proski@gnu.org>
3006
3007 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
3008 read.
3009 * efiemu/prepare32.c: Likewise.
3010 * efiemu/prepare64.c: Likewise.
3011
c402ab17 30122009-06-26 Pavel Roskin <proski@gnu.org>
3013
3014 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
3015 * include/grub/elf.h: Define symbols without "32" or "64" based
3016 on GRUB_TARGET_WORDSIZE.
3017 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
3018 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
3019 ELF definitions.
3020 * efiemu/loadcore64.c: Likewise.
3021 * loader/i386/bsd32.c: Likewise.
3022 * loader/i386/bsd64.c: Likewise.
3023 * kern/dl.c: Remove own ELF definitions.
3024 * util/i386/efi/grub-mkimage.c: Likewise.
3025
9bbdfd4d 30262009-06-23 Robert Millan <rmh.grub@aybabtu.com>
3027
3028 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
3029 segment 0x0 unconditionally, because the reference generated by
3030 GAS is an absolute address.
3031
a42ce6e9 30322009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3033
3034 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
3035 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
3036
c952cf92 30372009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3038
3039 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
3040 indexes. Check for -f explicitly.
cc3752ad 3041 (search_file): Improve error message.
3042 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 3043
132a0a59 30442009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3045
3046 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
3047 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
3048
387a140c 30492009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3050
3051 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
3052 * conf/i386-ieee1275.rmk: Likewise.
3053 * conf/i386-coreboot.rmk: Likewise.
3054
3055 * kern/i386/pc/startup.S (grub_stop): Remove function.
3056 * kern/i386/ieee1275/startup.S: Likewise.
3057 * kern/i386/coreboot/startup.S: Likewise.
3058 * kern/i386/misc.S (grub_stop): New function.
3059
41da9665 30602009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3061
3062 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
3063 * kern/i386/realmode.S (real_to_prot): ... to here.
3064
bf337234 30652009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3066
3067 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
3068 with `kernel.img'.
3069 (kernel_elf_SOURCES): Rename to ...
3070 (kernel_img_SOURCES): ... this.
3071 (kernel_elf_HEADERS): Rename to ...
3072 (kernel_img_HEADERS): ... this. Update all users.
3073 (kernel_elf_ASFLAGS): Rename to ...
3074 (kernel_img_ASFLAGS): ... this.
3075 (kernel_elf_CFLAGS): Rename to ...
3076 (kernel_img_CFLAGS): ... this.
3077 (kernel_elf_LDFLAGS): Rename to ...
3078 (kernel_img_LDFLAGS): ... this.
3079 * conf/i386-coreboot.rmk: Likewise.
3080 * conf/powerpc-ieee1275.rmk: Likewise.
3081
3082 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
3083 with "kernel.img".
3084
f52196ff 30852009-06-21 Pavel Roskin <proski@gnu.org>
3086
c3cee413 3087 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
3088 to match nested functions.
3089 * loader/sparc64/ieee1275/linux.c: Likewise.
3090
f52196ff 3091 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
3092
58750afc 30932009-06-21 Robert Millan <rmh.grub@aybabtu.com>
3094
3095 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
3096 all i386 platforms.
3097
15355c7d 30982009-06-21 Robert Millan <rmh.grub@aybabtu.com>
3099
3100 Fix asm file handling on ELF, and remove workarounds.
3101
3102 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
75421ca9 3103 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
15355c7d 3104 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
3105 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
3106
3f3ec72b 31072009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
3108
3109 Load BSD ELF modules
3110
3111 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
3112 and loader/i386/bsd64.c
3113 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
3114 (FREEBSD_MODTYPE_ELF_MODULE): New definition
3115 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
3116 (grub_freebsd_load_elfmodule32): New declaration
3117 (grub_freebsd_load_elfmoduleobj64): Likewise
3118 (grub_freebsd_load_elf_meta32): Likewise
3119 (grub_freebsd_load_elf_meta64): Likewise
3120 (grub_freebsd_add_meta): Likewise
3121 (grub_freebsd_add_meta_module): Likewise
3122 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
3123 (grub_freebsd_add_meta_module): Likewise and move module-specific
3124 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
3125 (grub_cmd_freebsd): Add elf-kernel specific parts
3126 based on grub_freebsd_add_meta_module
3127 (grub_cmd_freebsd_module): Add type parsing moved from
3128 grub_freebsd_add_meta_module
3129 (grub_cmd_freebsd_module_elf): New function
3130 (cmd_freebsd_module_elf): New variable
3131 (GRUB_MOD_INIT): Register freebsd_module_elf
3132 * loader/i386/bsd32.c: New file
3133 * loader/i386/bsd64.c: Likewise
3134 * loader/i386/bsdXX.c: Likewise
3135 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
3136 (grub_elf64_load): Likewise
3137 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
3138 All users updated
3139 (grub_elf64_load_hook_t): Likewise
3140
0db15301 31412009-06-21 Colin Watson <cjwatson@ubuntu.com>
3142
3143 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
3144 variable.
3145 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
3146 don't write a menu entry for recovery mode.
3147
546796c1 31482009-06-20 Robert Millan <rmh.grub@aybabtu.com>
3149
3150 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
3151 after it's no longer needed.
3152
cd7310d5 31532009-06-20 Robert Millan <rmh.grub@aybabtu.com>
3154
3155 * include/grub/i386/loader.h (grub_linux_prot_size)
3156 (grub_linux_tmp_addr, grub_linux_real_addr)
3157 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
3158 GRUB_MACHINE_PCBIOS.
3159 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
3160 common grub_util_info() call to ...
3161 (generate_image): ... here.
3162 Fix use of uninitialized memory, comparison of signed with
3163 unsigned integers and memory leak.
3164 Remove bogus module address message.
3165
ab32d3b5 31662009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
3167
3168 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
3169 grub_raid_register
3170 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
3171
024ef597 31722009-06-19 Pavel Roskin <proski@gnu.org>
3173
3174 * configure.ac: Remove stray AC_MSG_CHECKING.
3175
3ac72b51 31762009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
3177
3178 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 3179
e14cd814 31802009-06-18 Pavel Roskin <proski@gnu.org>
3181
3182 * conf/common.rmk: Add fs_file.mod.
3183 * disk/fs_file.c: New file.
3184 * include/grub/disk.h (enum grub_disk_dev_id): Add
3185 GRUB_DISK_DEVICE_FILE_ID.
3186
26586d98 31872009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3188
3189 Fix build with Apple's toolchain. Part 2
3190
3191 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
3192 a fake start
3193
26de2bcd 31942009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3195
3196 Fix build with Apple's toolchain. Part 1
3197
3198 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
3199 for long calls
3200 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 3201 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 3202 Apple's toolchain
3203
09b3490b 32042009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3205
3206 Fix warnings
3207
3208 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
3209 (decomp_block): initialize ch
3210 use grub_memcpy instead of memcpy
3211
c22a006a 32122009-06-17 Pavel Roskin <proski@gnu.org>
3213
d3638678 3214 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
3215 version, use declarations needed to use vga_text as the startup
3216 console.
3217
c22a006a 3218 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
3219 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
3220 the kernel.
3221 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
3222 and grub_at_keyboard_fini(), it's done on module load and
3223 unload.
3224
05b129e0 32252009-06-17 Felix Zielcke <fzielcke@z-51.de>
3226
3227 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
3228 file can't be found.
3229 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
3230
cf24ed9e 32312009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
3232
3233 Fix newline handling
3234
3235 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 3236 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 3237 (grub_script_yylex): don't segfault on unterminated script
3238 newline terminates command and variable
3239
74aa8e4b 32402009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
3241
3242 avoid double grub_adjust_range call. Bug reported by David Simner
3243
3244 * kern/disk.c (grub_disk_write): change to raw disk access before
3245 calling disk_read
3246
1bd265f3 32472009-06-17 Colin Watson <cjwatson@ubuntu.com>
3248
3249 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
3250 spaces, for the benefit of help2man.
3251 * util/i386/efi/grub-mkimage.c (usage): Likewise.
3252
a2d08c06 32532009-06-16 Pavel Roskin <proski@gnu.org>
3254
3255 * kern/i386/halt.c: Include grub/machine/init.h.
3256 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
3257
b97bcb19 32582009-06-16 Felix Zielcke <fzielcke@z-51.de>
3259
3260 * util/grub.d/30_os-prober.in: Use ${root} in the generated
3261 drivemap menuentry.
3262
0644f96c 32632009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
3264
3265 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
3266 `echo' command.
3267
3ef17a2e 32682009-06-16 Pavel Roskin <proski@gnu.org>
3269
3270 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
3271 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
3272 save %dx, we only need %dl and we never change it.
3273 * boot/i386/pc/cdboot.S: Don't set the root drive.
3274 * boot/i386/pc/pxeboot.S: Likewise.
3275 * include/grub/i386/pc/boot.h: Remove
3276 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
3277 GRUB_BOOT_MACHINE_DRIVE_CHECK.
3278 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
3279 * kern/i386/pc/init.c (make_install_device): Remove references
3280 to grub_root_drive.
3281 * kern/i386/pc/startup.S: Likewise.
3282 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
3283
693fe637 32842009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
3285
3286 xnu_uuid command
3287
3288 * commands/xnu_uuid.c: new file
3289 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
3290 (xnu_uuid_mod_SOURCES): new variable
3291 (xnu_uuid_mod_CFLAGS): likewise
3292 (xnu_uuid_mod_LDFLAGS): likewise
3293 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
3294 * conf/i386-ieee1275.rmk: likewise
3295 * conf/i386-pc.rmk: likewise
3296 * conf/powerpc-ieee1275.rmk: likewise
3297 * conf/sparc64-ieee1275.rmk: likewise
3298 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
3299
c9da87d0 33002009-06-16 Pavel Roskin <proski@gnu.org>
3301
3302 * configure.ac: Avoid '==' in test command, it's not portable.
3303
9c6f4596 33042009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
3305
3306 Probe command
3307
3308 * commands/probe.c: new file
3309 * conf/common.rmk (pkglib_MODULES): add probe.mod
3310 (probe_mod_SOURCES): new variable
3311 (probe_mod_CFLAGS): likewise
3312 (probe_mod_LDFLAGS): likewise
3313 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
3314 * conf/i386-ieee1275.rmk: likewise
3315 * conf/i386-pc.rmk: likewise
3316 * conf/powerpc-ieee1275.rmk: likewise
3317 * conf/sparc64-ieee1275.rmk: likewise
3318
70b7f9fd 33192009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
3320
3321 Fix handling of string like \"hello\" and "a
3322 b"
3323
3324 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
3325 (grub_script_yylex): fix parsing of quoting, escaping and newline
3326
71c79a6b 33272009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
3328
dd74360c 3329 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 3330 handling
dd74360c 3331
0644f96c 33322009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 3333
3334 * util/grub-mkconfig.in: Fix parsing of --output option.
3335
e40893c3 33362009-06-12 Pavel Roskin <proski@gnu.org>
3337
3338 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
3339 genmk.rb don't need to be generated or installed.
3340
3a1acfe2 33412009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
3342
3343 * commands/i386/pc/drivemap_int13h.S: add more comments
3344
3a4575d4 33452009-06-11 Pavel Roskin <proski@gnu.org>
3346
0658e928 3347 * Makefile.in (uninstall): Uninstall manuals.
3348
ca0388f0 3349 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
3350 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
3351 and update-grub_lib in two places.
3352 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
3353
e3b27c39 3354 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
3355 a compiler warning.
3356
3a4575d4 3357 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
3358 `entry_lo' to fix variable shadowing.
3359
af1f4f55 33602009-06-11 Christian Franke <franke@computer.org>
3361
3362 * kern/misc.c (__enable_execute_stack): Add missing return type
3363 to prevent gcc warning.
3364
5225e649 33652009-06-11 Felix Zielcke <fzielcke@z-51.de>
3366
3367 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
3368
7d83bd47 33692009-06-11 Pavel Roskin <proski@gnu.org>
3370
c1cb63ba 3371 * Makefile.in: Don't rely on any scripts being executable.
3372 Always use $(SHELL) to run shell scripts.
3373
7d83bd47 3374 * configure.ac: Always define ___main if using -nostdlib. This
3375 fixes tests on Cygwin.
3376
948f48e7 33772009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
3378
3379 UDF fix
3380
7d83bd47 3381 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 3382 is in bytes and not in blocks
7d83bd47 3383
8ada9bc1 33842009-06-11 Pavel Roskin <proski@gnu.org>
3385
3386 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
3387 warning.
3388
25ad2323 33892009-06-11 Felix Zielcke <fzielcke@z-51.de>
3390
3391 * util/grub.d/30_os-prober.in: Fix a comment. Source
3392 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
3393 to set the root device. Place drivemap command in the generated
3394 chain entry.
3395
e65acb0c 33962009-06-11 Pavel Roskin <proski@gnu.org>
3397
3398 * configure.ac: Remove host_m32. Issues with 64-bit utilities
3399 have long been resolved.
3400
f285fe2d 34012009-06-11 Colin Watson <cjwatson@ubuntu.com>
3402
bd47b0b5 3403 * util/grub.d/10_linux.in: Capitalise "Linux".
3404
f285fe2d 3405 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
3406
a0c62e4e 34072009-06-11 Pavel Roskin <proski@gnu.org>
3408
b6783cb2 3409 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
3410 fix a gcc warning and ensure that the function won't ever exit.
3411
dde032e8 3412 * kern/i386/ieee1275/init.c: Add missing prototype for
3413 grub_stop_floppy().
3414
22cd079d 3415 * loader/ieee1275/multiboot2.c [__i386__]: Include
3416 grub/cpu/multiboot.h.
3417
a0c62e4e 3418 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
3419 casts to short - they are not portable and cause warnings. Fix
3420 use of uninitialized values in input_buf. Use ARRAY_SIZE.
3421
63963d17 34222009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
3423
3424 Drivemap fixes
3425
3426 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
3427 new function
3428 (grub_get_root_biosnumber_saved): new variable
3429 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
3430 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 3431 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 3432 %dx after the call if necessary
3433 * conf/common.rmk (pkglib_MODULES): remove boot.mod
3434 (boot_mod_SOURCES): remove
3435 (boot_mod_CFLAGS): remove
3436 (boot_mod_LDFLAGS): remove
3437 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
3438 (boot_mod_SOURCES): new variable
3439 (boot_mod_CFLAGS): likewise
3440 (boot_mod_LDFLAGS): likewise
3441 * conf/i386-efi.rmk: likewise
3442 * conf/i386-ieee1275.rmk: likewise
3443 * conf/i386-pc.rmk: likewise
3444 * conf/powerpc-ieee1275.rmk: likewise
3445 * conf/sparc64-ieee1275.rmk: likewise
3446 * conf/x86_64-efi.rmk: likewise
3447 * include/grub/i386/pc/biosnum.h: new file
3448 * lib/i386/pc/biosnum.c: likewise
3449 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
3450 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
3451 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 3452
33abf7ae 34532009-06-10 Pavel Roskin <proski@gnu.org>
3454
5ac35b35 3455 * io/gzio.c (test_header): Don't reuse one buffer for all data.
3456 Use separate variables. Read only the file size at the end, but
3457 not the checksum that we don't use.
3458
5c5215d5 3459 * kern/file.c (grub_file_read): Use void pointer for the buffer.
3460 Adjust all callers.
3461
27d5fef7 3462 * kern/ieee1275/openfw.c: Remove libc includes.
3463 * kern/ieee1275/cmain.c: Likewise.
3464 * include/grub/ieee1275/ieee1275.h: Likewise.
3465
33abf7ae 3466 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
3467 compiler warnings.
3468
19d50c2b 34692009-06-10 Felix Zielcke <fzielcke@z-51.de>
3470
3471 * Makefile.in: Remove all trailing whitespace.
3472 * conf/i386-pc.rmk: Likewise.
3473 * conf/powerpc-ieee1275.rmk: Likewise.
3474 * conf/sparc64-ieee1275.rmk: Likewise.
3475 * docs/grub.texi: Likewise.
3476 * docs/texinfo.tex: Likewise.
3477 * disk/fs_uuid.c: Likewise.
3478 * disk/lvm.c: Likewise.
3479 * disk/scsi.c: Likewise.
3480 * disk/ata.c: Likewise.
3481 * disk/ieee1275/ofdisk.c: Likewise.
3482 * disk/i386/pc/biosdisk.c: Likewise.
3483 * disk/host.c: Likewise.
3484 * disk/raid.c: Likewise.
3485 * disk/efi/efidisk.c: Likewise.
3486 * disk/usbms.c: Likewise.
3487 * disk/memdisk.c: Likewise.
3488 * disk/loopback.c: Likewise.
3489 * kern/powerpc/dl.c: Likewise.
3490 * kern/device.c: Likewise.
3491 * kern/dl.c: Likewise.
3492 * kern/sparc64/dl.c: Likewise.
3493 * kern/ieee1275/ieee1275.c: Likewise.
3494 * kern/term.c: Likewise.
3495 * kern/fs.c: Likewise.
3496 * kern/i386/dl.c: Likewise.
3497 * kern/i386/pc/startup.S: Likewise.
3498 * kern/i386/pc/init.c: Likewise.
3499 * kern/i386/pc/mmap.c: Likewise.
3500 * kern/i386/pc/lzo1x.S: Likewise.
3501 * kern/i386/ieee1275/init.c: Likewise.
3502 * kern/i386/realmode.S: Likewise.
3503 * kern/i386/tsc.c: Likewise.
3504 * kern/partition.c: Likewise.
3505 * kern/corecmd.c: Likewise.
3506 * kern/file.c: Likewise.
3507 * kern/efi/efi.c: Likewise.
3508 * kern/efi/init.c: Likewise.
3509 * kern/efi/mm.c: Likewise.
3510 * kern/main.c: Likewise.
3511 * kern/err.c: Likewise.
3512 * kern/env.c: Likewise.
3513 * kern/disk.c: Likewise.
3514 * kern/generic/millisleep.c: Likewise.
3515 * kern/generic/rtc_get_time_ms.c: Likewise.
3516 * kern/misc.c: Likewise.
3517 * kern/parser.c: Likewise.
3518 * genmk.rb: Likewise.
3519 * configure.ac: Likewise.
3520 * boot/i386/pc/diskboot.S: Likewise.
3521 * boot/i386/pc/pxeboot.S: Likewise.
3522 * boot/i386/pc/boot.S: Likewise.
3523 * boot/i386/pc/lnxboot.S: Likewise.
3524 * boot/i386/pc/cdboot.S: Likewise.
3525 * parttool/pcpart.c: Likewise.
3526 * video/readers/tga.c: Likewise.
3527 * video/video.c: Likewise.
3528 * video/bitmap.c: Likewise.
3529 * lib/envblk.c: Likewise.
3530 * lib/i386/setjmp.S: Likewise.
3531 * fs/xfs.c: Likewise.
3532 * fs/afs.c: Likewise.
3533 * fs/fat.c: Likewise.
3534 * fs/ntfs.c: Likewise.
3535 * fs/udf.c: Likewise.
3536 * fs/affs.c: Likewise.
3537 * fs/iso9660.c: Likewise.
3538 * fs/hfs.c: Likewise.
3539 * fs/fshelp.c: Likewise.
3540 * fs/ext2.c: Likewise.
3541 * fs/jfs.c: Likewise.
3542 * fs/reiserfs.c: Likewise.
3543 * fs/hfsplus.c: Likewise.
3544 * fs/minix.c: Likewise.
3545 * fs/cpio.c: Likewise.
3546 * fs/sfs.c: Likewise.
3547 * fs/ufs.c: Likewise.
3548 * efiemu/prepare.c: Likewise.
3549 * efiemu/loadcore_common.c: Likewise.
3550 * efiemu/runtime/efiemu.sh: Likewise.
3551 * efiemu/runtime/efiemu.S: Likewise.
3552 * efiemu/runtime/efiemu.c: Likewise.
3553 * efiemu/pnvram.c: Likewise.
3554 * efiemu/main.c: Likewise.
3555 * efiemu/i386/pc/cfgtables.c: Likewise.
3556 * efiemu/i386/loadcore64.c: Likewise.
3557 * efiemu/i386/loadcore32.c: Likewise.
3558 * efiemu/loadcore.c: Likewise.
3559 * efiemu/symbols.c: Likewise.
3560 * efiemu/mm.c: Likewise.
3561 * include/grub/autoefi.h: Likewise.
3562 * include/grub/datetime.h: Likewise.
3563 * include/grub/term.h: Likewise.
3564 * include/grub/hfs.h: Likewise.
3565 * include/grub/lvm.h: Likewise.
3566 * include/grub/i386/tsc.h: Likewise.
3567 * include/grub/i386/linux.h: Likewise.
3568 * include/grub/i386/xnu.h: Likewise.
3569 * include/grub/i386/efiemu.h: Likewise.
3570 * include/grub/i386/pc/biosdisk.h: Likewise.
3571 * include/grub/i386/pc/memory.h: Likewise.
3572 * include/grub/i386/pc/vbe.h: Likewise.
3573 * include/grub/parttool.h: Likewise.
3574 * include/grub/video.h: Likewise.
3575 * include/grub/memory.h: Likewise.
3576 * include/grub/fs.h: Likewise.
3577 * include/grub/partition.h: Likewise.
3578 * include/grub/xnu.h: Likewise.
3579 * include/grub/efi/api.h: Likewise.
3580 * include/grub/efi/pe32.h: Likewise.
3581 * include/grub/efi/memory.h: Likewise.
3582 * include/grub/multiboot.h: Likewise.
3583 * include/grub/usbdesc.h: Likewise.
3584 * include/grub/multiboot2.h: Likewise.
3585 * include/grub/acpi.h: Likewise.
3586 * include/grub/efiemu/efiemu.h: Likewise.
3587 * include/grub/disk.h: Likewise.
3588 * include/grub/ieee1275/ieee1275.h: Likewise.
3589 * include/grub/net.h: Likewise.
3590 * include/grub/machoload.h: Likewise.
3591 * include/grub/macho.h: Likewise.
3592 * include/multiboot.h: Likewise.
3593 * genmoddep.awk: Likewise.
3594 * normal/main.c: Likewise.
3595 * normal/menu_entry.c: Likewise.
3596 * normal/menu_viewer.c: Likewise.
3597 * normal/completion.c: Likewise.
3598 * normal/cmdline.c: Likewise.
3599 * normal/misc.c: Likewise.
3600 * normal/datetime.c: Likewise.
3601 * bus/usb/usbtrans.c: Likewise.
3602 * bus/usb/ohci.c: Likewise.
3603 * bus/usb/uhci.c: Likewise.
3604 * bus/usb/usb.c: Likewise.
3605 * mmap/efi/mmap.c: Likewise.
3606 * mmap/i386/pc/mmap_helper.S: Likewise.
3607 * mmap/i386/pc/mmap.c: Likewise.
3608 * mmap/i386/mmap.c: Likewise.
3609 * mmap/i386/uppermem.c: Likewise.
3610 * mmap/mmap.c: Likewise.
3611 * commands/acpi.c: Likewise.
3612 * commands/echo.c: Likewise.
3613 * commands/blocklist.c: Likewise.
3614 * commands/loadenv.c: Likewise.
3615 * commands/usbtest.c: Likewise.
3616 * commands/boot.c: Likewise.
3617 * commands/parttool.c: Likewise.
3618 * commands/search.c: Likewise.
3619 * commands/cat.c: Likewise.
3620 * commands/i386/pc/play.c: Likewise.
3621 * commands/i386/pc/drivemap.c: Likewise.
3622 * commands/i386/pc/vbeinfo.c: Likewise.
3623 * commands/i386/pc/acpi.c: Likewise.
3624 * commands/i386/pc/vbetest.c: Likewise.
3625 * commands/ls.c: Likewise.
3626 * commands/cmp.c: Likewise.
3627 * commands/test.c: Likewise.
3628 * commands/efi/acpi.c: Likewise.
3629 * commands/gptsync.c: Likewise.
3630 * commands/help.c: Likewise.
3631 * partmap/amiga.c: Likewise.
3632 * partmap/apple.c: Likewise.
3633 * partmap/acorn.c: Likewise.
3634 * partmap/pc.c: Likewise.
3635 * partmap/sun.c: Likewise.
3636 * partmap/gpt.c: Likewise.
3637 * script/sh/lexer.c: Likewise.
3638 * script/sh/function.c: Likewise.
3639 * font/font.c: Likewise.
3640 * font/font_cmd.c: Likewise.
3641 * loader/powerpc/ieee1275/linux.c: Likewise.
3642 * loader/efi/chainloader.c: Likewise.
3643 * loader/multiboot_loader.c: Likewise.
3644 * loader/macho.c: Likewise.
3645 * loader/i386/multiboot.c: Likewise.
3646 * loader/i386/linux.c: Likewise.
3647 * loader/i386/pc/linux.c: Likewise.
3648 * loader/i386/pc/multiboot2.c: Likewise.
3649 * loader/i386/pc/chainloader.c: Likewise.
3650 * loader/i386/pc/xnu.c: Likewise.
3651 * loader/i386/bsd_trampoline.S: Likewise.
3652 * loader/i386/efi/linux.c: Likewise.
3653 * loader/i386/multiboot_elfxx.c: Likewise.
3654 * loader/i386/bsd_helper.S: Likewise.
3655 * loader/i386/bsd.c: Likewise.
3656 * loader/i386/linux_trampoline.S: Likewise.
3657 * loader/i386/xnu_helper.S: Likewise.
3658 * loader/i386/xnu.c: Likewise.
3659 * loader/i386/bsd_pagetable.c: Likewise.
3660 * loader/i386/multiboot_helper.S: Likewise.
3661 * loader/xnu.c: Likewise.
3662 * loader/xnu_resume.c: Likewise.
3663 * io/gzio.c: Likewise.
3664 * term/efi/console.c: Likewise.
3665 * term/terminfo.c: Likewise.
3666 * term/ieee1275/ofconsole.c: Likewise.
3667 * term/i386/pc/serial.c: Likewise.
3668 * term/i386/pc/vesafb.c: Likewise.
3669 * term/i386/pc/vga.c: Likewise.
3670 * term/usb_keyboard.c: Likewise.
3671 * term/gfxterm.c: Likewise.
3672 * aclocal.m4: Likewise.
3673 * util/lvm.c: Likewise.
3674 * util/grub.d/30_os-prober.in: Likewise.
3675 * util/grub.d/10_hurd.in: Likewise.
3676 * util/console.c: Likewise.
3677 * util/grub-macho2img.c: Likewise.
3678 * util/grub-probe.c: Likewise.
3679 * util/hostfs.c: Likewise.
3680 * util/i386/pc/grub-mkimage.c: Likewise.
3681 * util/i386/pc/grub-setup.c: Likewise.
3682 * util/i386/efi/grub-mkimage.c: Likewise.
3683 * util/grub-mkconfig.in: Likewise.
3684 * util/raid.c: Likewise.
3685 * util/resolve.c: Likewise.
3686 * util/grub-mkdevicemap.c: Likewise.
3687 * util/grub-emu.c: Likewise.
3688 * util/getroot.c: Likewise.
3689 * util/hostdisk.c: Likewise.
3690 * util/usb.c: Likewise.
3691 * util/grub-editenv.c: Likewise.
3692 * util/misc.c: Likewise.
3693
d2d49665 36942009-06-10 Felix Zielcke <fzielcke@z-51.de>
3695
3696 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
3697 `genparttoollist.sh'.
3698 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
3699 Add `*.sh' to the list find searches for and change `mdate.sh'
3700 to `mdate-sh'.
3701
fe052e37 37022009-06-10 Pavel Roskin <proski@gnu.org>
3703
2763ac18 3704 * include/grub/multiboot2.h: Provide compatibility defines for
3705 multiboot2.h.
3706 * include/multiboot2.h: Include stdint.h only if needed, using
3707 angle brackets.
3708 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
3709 grub/multiboot2.h.
3710 * loader/ieee1275/multiboot2.c: Likewise.
3711 * loader/multiboot2.c: Likewise.
3712 * loader/multiboot_loader.c: Likewise.
3713
437e6adc 3714 * configure.ac: Use -nostdlib when probing for the target. It
3715 should not be required to have libc for the target.
3716
06a6836c 3717 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
3718 they fail without libc headers for the target.
3719 * include/grub/powerpc/libgcc.h: Use weak attribute for all
3720 exports.
3721 * include/grub/sparc64/libgcc.h: Likewise. Don't use
3722 preprocessor conditionals.
3723
fe052e37 3724 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
3725 build system doesn't need to be aware of the tar.c internals.
3726
afd22553 37272009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 3728
afd22553 3729 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 3730
6b787c4f 37312009-06-09 Robert Millan <rmh.grub@aybabtu.com>
3732
3733 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
3734 disk limit to 26 for IDE, Virtio, Xen and SCSI.
3735
37362009-06-09 Felix Zielcke <fzielcke@z-51.de>
3737
3738 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 3739 aren't available if ata.mod gets used.
6b787c4f 3740
473d1e45 37412009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 3742
473d1e45 3743 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 3744 initialising controller.
473d1e45 3745 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 3746
255a27d4 37472009-06-08 Felix Zielcke <fzielcke@z-51.de>
3748
3749 * util/i386/pc/grub-install.in: Add a parameter --disk-module
3750 to choose between ata and biosdisk module on i386-pc.
3751
473d1e45 37522009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 3753
d55842d8 3754 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
3755 Subclass and Programming Interface fields in terms of the 3 byte
3756 Class Code register.
3757 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3758
fa5db0b1 3759 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
3760 interface is OHCI. Add grub_dprintf for symmetry with
3761 bus/usb/uhci.c.
3762 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
3763 interface is UHCI. Add interf variable for programming
3764 interface. Print interface with class/subclass.
3765
c0947beb 3766 * bus/usb/ohci.c: Set interf with correct field.
3767
69da8877 3768 * bus/usb/uhci.c: Remove unneeded doubled lines.
3769 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
3770 Remove whitespace inside comment.
3771
9e172e30 37722009-06-08 Robert Millan <rmh.grub@aybabtu.com>
3773
3774 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
3775 as fallback an equivalent option without depth.
3776
de65ee2b 37772009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
3778
3779 Not fail if unable to retrieve C/H/S on LBA disks
3780
473d1e45 3781 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 3782 if unable to retrieve C/H/S on LBA disks
3783
b57ea2c9 37842009-06-08 Pavel Roskin <proski@gnu.org>
3785
3786 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
3787 about aliasing.
3788
af361263 37892009-06-08 Felix Zielcke <fzielcke@z-51.de>
3790
3791 * Makefile.in (uninstall): Remove all $lib_DATA files.
3792
4c9ec6b3 37932009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
3794
3795 Bugfix: install on partitionless device
3796
3797 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
3798 is a whole disk
3799
e76fc924 38002009-06-08 Felix Zielcke <fzielcke@z-51.de>
3801
3802 * Makefile.in (uninstall): Remove all $include_DATA files.
3803
ba5a0d05 38042009-06-08 Felix Zielcke <fzielcke@z-51.de>
3805
3806 * commands/true.c: New file. Implement the true and false commands.
3807 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
3808 (true_mod_SOURCES): New variable.
3809 (true_mod_CFLAGS): Likewise.
3810 (true_mod_LDFLAGS): Likewise.
3811
c8048e32 38122009-06-05 Colin D Bennett <colin@gibibit.com>
3813
3814 Optimized font character lookup using binary search instead of linear
3815 search. Fonts now are required to have the character index ordered by
3816 code point.
3817
3818 * font/font.c (load_font_index): Verify that fonts have ordered
3819 character indices.
3820 (find_glyph): Use binary search instead of linear search to find a
3821 character in a font.
3822
408305be 38232009-06-05 Michael Scherer <misc@mandriva.org>
3824
3825 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
3826 uses case sensitive btree.
3827 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
3828 only for case insensitive filesystems.
3829
8ee1e0d9 38302009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
3831
3832 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
3833 * conf/common.rmk (search_mod_CFLAGS): likewise
3834
a9966eb1 38352009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3836
473d1e45 3837 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 3838 compensate a compiler bug
3839
9e7100fb 38402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3841
473d1e45 3842 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 3843 instead of '\b'
473d1e45 3844
ede21d71 38452009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3846
3847 Definitions for creating asm symbols with Apple's CC
3848
3849 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
3850 [APPLE_CC] (VARIABLE): likewise
3851
9dbf7653 38522009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3853
3854 Disable lnxboot.img when compiled
3855 with Apple's CC
3856
3857 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
3858 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
3859 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
3860 [! APPLE_CC] (CODE_LENG): skip
3861 [! APPLE_CC] (setup_sects): likewise
3862 [! APPLE_CC]: skip filling
473d1e45 3863
e93cdc3d 38642009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3865
3866 Address in trampolines based on 32-bit registers when compiled
3867 with Apple's CC
3868
473d1e45 3869 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 3870 for addresses
3871 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
3872
6c688477 38732009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3874
3875 Avoid aliases when compiling with Apple's CC for PCBIOS machine
3876
3877 * kern/misc.c [APPLE_CC] (memcpy): new function
3878 [APPLE_CC] (memmove): likewise
3879 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 3880 (memcpy): define alias conditionally on !APPLE_CC
6c688477 3881 (memset): likewise
3882 (abort): likewise
3883 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
3884 APPLE_CC are defined
3885 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
3886 (grub_assert_fail): make prototype conditional
3887
e37ffc5c 38882009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3889
3890 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
3891
473d1e45 3892 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
3893 grub-macho2img
e37ffc5c 3894 (CLEANFILES): add grub-macho2img
3895 (grub_macho2img_SOURCES): new variable
3896 * kern/i386/pc/startup.S (bss_start): new variable
3897 (bss_end): likewise
3898 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
3899 * util/grub-macho2img.c: new file
3900
cf00df31 39012009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3902
3903 Use objconv when compiling with Apple's CC
3904
3905 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
3906 (efiemu64.o): likewise
3907 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
3908 when compiling with Apple's CC
3909 (efiemu64_s.o): likewise
3910 * configure.ac: check for objconv when compiling with Apple's CC
3911 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 3912
d119a20c 39132009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3914
3915 Define segment as well as section when compiling with
3916 Apple's CC
3917
3918 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
3919 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
3920 (efiemu_convert_pointer): likewise
3921 (efiemu_set_virtual_address_map): likewise
3922 (efiemu_convert_pointer): likewise
3923 (efiemu_getcrc32): likewise
3924 (init_crc32_table): likewise
3925 (reflect): likewise
3926 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
3927 (GRUB_MOD_DEP): likewise
473d1e45 3928
c8600122 39292009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3930
3931 Allow a compilation without -mcmodel=large
3932
3933 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
3934 when compiled without -mcmodel=large
473d1e45 3935 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 3936 without -mcmodel=large
473d1e45 3937 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 3938 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 3939
e8df1d4e 39402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3941
3942 Remove nested functions in efiemu core
3943
3944 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 3945
cc6c3ac1 39462009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3947
3948 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
3949
3950 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
3951 temporary storage
473d1e45 3952 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
3953 using Apple's CC
cc6c3ac1 3954 (grub_cpu_is_tsc_supported): likewise
3955 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 3956
3e325901 39572009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3958
3959 Absolute addressing through constant with Apple's cc
3960
3961 * kern/i386/pc/startup.S: Define necessary constants
3962 and address through it when using ABS with Apple's CC
3963 * boot/i386/pc/diskboot.S: likewise
3964 * boot/i386/pc/boot.S: likewise
3965 * boot/i386/pc/lnxboot.S: likewise
3966 * boot/i386/pc/cdboot.S: likewise
3967 * mmap/i386/pc/mmap_helper.S: likewise
3968 * commands/i386/pc/drivemap_int13h.S: likewise
3969
2b167a72 39702009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3971
3972 Check if compiler is apple cc
3973
3974 * Makefile.in (ASFLAGS): new variable
3975 (TARGET_ASFLAGS): likewise
3976 (TARGET_MODULE_FORMAT): likewise
3977 (TARGET_APPLE_CC): likewise
3978 (OBJCONV): likewise
3979 (TARGET_IMG_CFLAGS): likewise
3980 (TARGET_CPPFLAGS): add includedir
3981 * configure.ac: call grub_apple_cc and grub_apple_target_cc
3982 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
3983 Check for linker script only if compiler isn't Apple's CC
3984 (TARGET_MODULE_FORMAT): set
3985 (TARGET_APPLE_CC): likewise
3986 (TARGET_ASFLAGS): likewise
3987 (ASFLAGS): likewise
3988 Check for objcopy only if compiler isn't Apple's CC
3989 Check for BSS symbol only if compiler isn't Apple's CC
3990 * genmk.rb: adapt nm options if we use Apple's utils
3991 * aclocal.m4 (grub_apple_cc): new test
3992 (grub_apple_target_cc): likewise
473d1e45 3993
fb14123e 39942009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
3995
3996 Simplify sed expressions and improve awk
3997
3998 * Makefile.in (install-local): simplify sed expression
3999 * gencmdlist.sh: likewise
4000 * genmoddep.awk: avoid adding module as a dependency of itself
4001
5b889789 40022009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4003
4004 Add missing start symbols
4005
4006 * boot/i386/pc/boot.S: add start
fb14123e 4007 * boot/i386/pc/pxeboot.S: likewise
473d1e45 4008
fd2bf2e3 40092009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4010
4011 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 4012
4013 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 4014 (relocate_addresses): consider both r_addend and value at offset
4015 (make_mods_section): zerofill modinfo and header
4016 (convert_elf): write prefix here
473d1e45 4017
5389763d 40182009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4019
4020 Use .asciz instead of .string
4021
4022 * i386/pc/diskboot.S: use .asciz instead of .string
4023 * i386/pc/boot.S: likewise
4024 * include/grub/dl.h (GRUB_MOD_DEP): likewise
4025 (GRUB_MOD_NAME): likewise
473d1e45 4026
3eb5ed4e 40272009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4028
4029 gfxpayload support
4030
4031 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
4032 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
4033 (grub_video_setup): remove
4034 (grub_video_set_mode): new prototype
4035 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
4036 (vid_mode): remove
4037 (linux_vesafb_res): compile only on PCBIOS
4038 (grub_linux_boot): support gfxpayload
4039 * loader/i386/pc/xnu.c (video_hook): new function
4040 (grub_xnu_set_video): support gfxpayload
4041 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
4042 (DEFAULT_VIDEO_HEIGHT): likewise
4043 (DEFAULT_VIDEO_FLAGS): likewise
4044 (DEFAULT_VIDEO_MODE): new definition
4045 (video_hook): new function
4046 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 4047 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 4048 loading xnu
4049 * video/video.c (grub_video_setup): removed
473d1e45 4050 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 4051 grub_video_setup
4052
4b0e1143 40532009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4054
4055 Avoid calling biosdisk in drivemap
4056
4057 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
4058 (revparse_biosdisk): likewise
4059 (list_mappings): derive name from id directly
4060 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 4061
fda6cb98 40622009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4063
4064 Script fixes
4065
4066 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
4067 (grub_lexer_param): add tokenonhold
4068 (grub_script_create_cmdline): remove cmdline. All callers updated
4069 (grub_script_function_create): make functionname
4070 grub_script_arg. All callers updated
4071 (grub_script_execute_argument_to_string): new prototype
4072 * kern/parser.c (state_transitions): reorder
4073 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 4074 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 4075 make global
4076 (grub_script_execute_cmdline): use new format
4077 * script/sh/function.c (grub_script_function_create): make functionname
4078 grub_script_arg. All callers updated
473d1e45 4079 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 4080 (grub_script_yylex): remove
4081 (grub_script_yylex2): renamed to ...
4082 (grub_script_yylex): ...renamed
4083 parse the expressions like a${b}c
4084 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
4085 (GRUB_PARSER_TOKEN_VAR): remove
4086 (GRUB_PARSER_TOKEN_NAME): likewise
4087 ("if"): declare as typeless
4088 ("while"): likewise
4089 ("function"): likewise
4090 ("else"): likewise
4091 ("then"): likewise
4092 ("fi"): likewise
4093 (text): remove
4094 (argument): likewise
4095 (script): accept empty scripts and make exit on error
4096 (arguments): use GRUB_PARSER_TOKEN_ARG
4097 (function): likewise
4098 (command): move error handling to script
4099 (menuentry): move grub_script_lexer_ref before
473d1e45 4100 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 4101 argument. All callers updated
4102
f4448a07 41032009-06-04 Robert Millan <rmh.grub@aybabtu.com>
4104
4105 Prevent GRUB from probing floppies during boot.
4106
4107 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
4108 * commands/search.c (options): Add --no-floppy.
4109 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
4110 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
4111 --no-floppy when searching for UUIDs.
4112
2bf5885a 41132009-06-04 Robert Millan <rmh.grub@aybabtu.com>
4114
4115 Simplify the code duplication in commands/search.c.
4116
4117 * commands/search.c (search_label, search_fs_uuid): Merge into ...
4118 (search_fs): ... this. Update all users.
4119
f6fd460a 41202009-06-03 Felix Zielcke <fzielcke@z-51.de>
4121
4122 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
4123
cbb3c83e 41242009-05-28 Pavel Roskin <proski@gnu.org>
4125
57788cfd 4126 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
4127 Remove the original symlink explicitly.
4128
cbb3c83e 4129 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
4130 just one slash. That's how grub_fshelp_find_file() does it.
4131
cd0d5e30 41322009-05-26 Pavel Roskin <proski@gnu.org>
4133
f0f8bbe2 4134 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
4135 to `str'.
4136
cd0d5e30 4137 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
4138 possibly unused.
4139
8c2cab51 41402009-05-25 Christian Franke <franke@computer.org>
4141
4142 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
4143 register.
4144 (grub_atapi_identify): Add wait after drive select.
4145 (grub_ata_identify): Do more strict status register check before
4146 calling grub_atapi_identify (). Suppress error message if status
4147 register is 0x00 after command failure. Add status register
4148 check after PIO read to avoid bogus identify due to stuck DRQ.
4149 Thanks to Pavel Roskin for testing.
4150 (grub_device_initialize): Remove unsafe status register check.
4151 Thanks to 'phcoder' for problem report and patch.
4152 Prevent sign extension in debug message.
4153
230c0ad6 41542009-05-23 Colin D Bennett <colin@gibibit.com>
4155
4156 Cleaned up `include/grub/normal.h'. Grouped prototypes by
4157 definition file, and functions defined in `normal/menu.c' have had
4158 their prototypes moved to `include/grub/menu.h' for consistency.
4159
4160 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
4161 from normal.h.
4162 (grub_menu_get_entry): Likewise.
4163 (grub_menu_get_timeout): Likewise.
4164 (grub_menu_set_timeout): Likewise.
4165 (grub_menu_execute_entry): Likewise.
4166 (grub_menu_execute_with_fallback): Likewise.
4167 (grub_menu_entry_run): Likewise.
4168
4169 * include/grub/normal.h: Re-ordered and grouped function
4170 prototypes by file that the function is defined in.
4171 (grub_menu_execute_callback): Removed; moved to menu.h.
4172 (grub_menu_get_entry): Likewise.
4173 (grub_menu_get_timeout): Likewise.
4174 (grub_menu_set_timeout): Likewise.
4175 (grub_menu_execute_entry): Likewise.
4176 (grub_menu_execute_with_fallback): Likewise.
4177 (grub_menu_entry_run): Likewise.
4178 (grub_menu_addentry): Renamed from this ...
4179 (grub_normal_add_menu_entry): ... to this.
4180
4181 * normal/main.c (grub_menu_addentry): Renamed from this ...
4182 (grub_normal_add_menu_entry): ... to this.
4183
4184 * script/sh/execute.c (grub_script_execute_menuentry): Update
4185 reference to renamed grub_menu_addentry function.
4186
861f03a5 41872009-05-23 Felix Zielcke <fzielcke@z-51.de>
4188
4189 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
4190
96b1619a 41912009-05-22 Pavel Roskin <proski@gnu.org>
4192
bf6a5fb2 4193 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
4194 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
4195 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
4196 compiling for the i386 targets, but not for the utilities.
4197
96b1619a 4198 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
4199 to grub_uint8_t.
4200 (grub_root_drive): Likewise.
4201 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
4202 remove alignment.
4203 (grub_root_drive): Change size to byte.
4204 (grub_start_addr): Remove.
4205 (grub_end_addr): Likewise.
4206 (grub_apm_bios_info): Likewise.
4207
b729776b 42082009-05-21 Felix Zielcke <fzielcke@z-51.de>
4209
4210 * normal/i386: Remove.
4211 * normal/powerpc: Likewise.
4212 * normal/sparc64: Likewise.
4213 * normal/x86_64: Likewise.
4214
0a15ce80 42152009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
4216
4217 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 4218 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 4219 * loader/i386/xnu_helper.S: Likewise
d6da58e6 4220
33db9015 42212009-05-18 Colin D Bennett <colin@gibibit.com>
4222
d6da58e6 4223 Display error messages when parsing a Lua statement fails.
4224 Previously, executing a syntactically invalid statement like
4225 ")foo" or "bar;" would silently fail.
33db9015 4226
4227 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 4228 (grub_lua_parse_line): Improved reporting of Lua parser and
4229 execution errors.
33db9015 4230
46422c89 42312009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
4232
4233 Remove -Werror which causes build to fail on some systems
4234
4235 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
4236 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
4237 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 4238
22f53a96 42392009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
4240
4241 trampoline for linux on 64-bit platform
4242
18f547ad 4243 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
4244 loader/i386/efi/linux_trampoline.S
4245 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 4246 declaration
d6da58e6 4247 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
4248 here
22f53a96 4249 * loader/i386/linux_trampoline.S: moved here
d6da58e6 4250 * loader/i386/efi/linux.c (allocate_pages): reserve space for
4251 trampoline
22f53a96 4252 (jumpvector): removed
4253 (grub_linux_trampoline_start): new declaration
4254 (grub_linux_trampoline_end): likewise
4255 (grub_linux_boot): use trampoline when on 64-bit platform
4256 * loader/i386/linux.c: likewise
4257
cb5a0f40 42582009-05-16 Pavel Roskin <proski@gnu.org>
4259
4260 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
4261 const to avoid a warning.
4262 (grub_lua_setenv): Likewise.
4263 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
4264 lmsg to fix a warning.
4265
334f2c28 42662009-05-16 Felix Zielcke <fzielcke@z-51.de>
4267
4268 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 4269 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4270 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
4271 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4272 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
4273 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4274 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
4275 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 4276
59e5d3ec 42772009-05-16 Felix Zielcke <fzielcke@z-51.de>
4278
4279 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
4280
9d87a1ba 42812009-05-16 Bean <bean123ch@gmail.com>
4282
4283 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
4284 (lua_mod_SOURCES): New variable.
4285 (lua_mod_CFLAGS): Likewise.
4286 (lua_mod_LDFLAGS): Likewise.
4287
4288 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
4289 (setjmp_mod_SOURCES): New variable.
4290 (setjmp_mod_CFLAGS): Likewise.
4291 (setjmp_LDFLAGS): Likewise.
4292
4293 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
4294 (setjmp_mod_SOURCES): New variable.
4295 (setjmp_mod_CFLAGS): Likewise.
4296 (setjmp_LDFLAGS): Likewise.
4297
4298 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
4299 (setjmp_mod_SOURCES): New variable.
4300 (setjmp_mod_CFLAGS): Likewise.
4301 (setjmp_LDFLAGS): Likewise.
4302
4303 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
4304 (setjmp_mod_SOURCES): New variable.
4305 (setjmp_mod_CFLAGS): Likewise.
4306 (setjmp_LDFLAGS): Likewise.
4307
4308 * normal/i386/setjmp.S: Moved from here ...
4309 * lib/i386/setjmp.S: ... Moved here
4310 * normal/x86_64/setjmp.S: Moved from here ...
4311 * lib/x86_64/setjmp.S: ... Moved here
4312 * normal/powerpc/setjmp.S: Moved from here ...
4313 * lib/powerpc/setjmp.S: ... Moved here
4314 * normal/sparc64/setjmp.S: Moved from here ...
4315 * lib/sparc64/setjmp.S: ... Moved here
4316
4317 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
4318 returns_twice in mingw.
4319
4320 * script/lua/grub_lib.c: New file.
4321 * script/lua/grub_lib.h: Likewise.
4322 * script/lua/grub_lua.h: Likewise.
4323 * script/lua/grub_main.c: Likewise.
4324 * script/lua/lapi.c: Likewise.
4325 * script/lua/lapi.h: Likewise.
4326 * script/lua/lauxlib.c: Likewise.
4327 * script/lua/lauxlib.h: Likewise.
4328 * script/lua/lbaselib.c: Likewise.
4329 * script/lua/lcode.c: Likewise.
4330 * script/lua/lcode.h: Likewise.
4331 * script/lua/ldblib.c: Likewise.
4332 * script/lua/ldebug.c: Likewise.
4333 * script/lua/ldebug.h: Likewise.
4334 * script/lua/ldo.c: Likewise.
4335 * script/lua/ldo.h: Likewise.
4336 * script/lua/ldump.c: Likewise.
4337 * script/lua/lfunc.c: Likewise.
4338 * script/lua/lfunc.h: Likewise.
4339 * script/lua/lgc.c: Likewise.
4340 * script/lua/lgc.h: Likewise.
4341 * script/lua/linit.c: Likewise.
4342 * script/lua/liolib.c: Likewise.
4343 * script/lua/llex.c: Likewise.
4344 * script/lua/llex.h: Likewise.
4345 * script/lua/llimits.h: Likewise.
4346 * script/lua/lmathlib.c: Likewise.
4347 * script/lua/lmem.c: Likewise.
4348 * script/lua/lmem.h: Likewise.
4349 * script/lua/loadlib.c: Likewise.
4350 * script/lua/lobject.c: Likewise.
4351 * script/lua/lobject.h: Likewise.
4352 * script/lua/lopcodes.c: Likewise.
4353 * script/lua/lopcodes.h: Likewise.
4354 * script/lua/loslib.c: Likewise.
4355 * script/lua/lparser.c: Likewise.
4356 * script/lua/lparser.h: Likewise.
4357 * script/lua/lstate.c: Likewise.
4358 * script/lua/lstate.h: Likewise.
4359 * script/lua/lstring.c: Likewise.
4360 * script/lua/lstring.h: Likewise.
4361 * script/lua/lstrlib.c: Likewise.
4362 * script/lua/ltable.c: Likewise.
4363 * script/lua/ltable.h: Likewise.
4364 * script/lua/ltablib.c: Likewise.
4365 * script/lua/ltm.c: Likewise.
4366 * script/lua/ltm.h: Likewise.
4367 * script/lua/lua.h: Likewise.
4368 * script/lua/luaconf.h: Likewise.
4369 * script/lua/lualib.h: Likewise.
4370 * script/lua/lundump.c: Likewise.
4371 * script/lua/lundump.h: Likewise.
4372 * script/lua/lvm.c: Likewise.
4373 * script/lua/lvm.h: Likewise.
4374 * script/lua/lzio.c: Likewise.
4375 * script/lua/lzio.h: Likewise.
4376
5e898c9d 43772009-05-16 Bean <bean123ch@gmail.com>
4378
4379 * include/grub/kernel.h (grub_module_header_types): Add type
4380 OBJ_TYPE_CONFIG.
4381
4382 * kern/main.c (grub_load_config): New function.
4383 (grub_main): Call grub_load_config to read boot config.
4384
4385 * grub-mkimage (generate_image): New parameter config_path.
4386 (options): New option --config.
4387 (main): Parse --config option, and pass it to generate_image.
4388
cf353a47 43892009-05-14 Christian Franke <franke@computer.org>
4390
4391 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
4392 This fixes build on Cygwin.
4393
3834887f 43942009-05-14 Pavel Roskin <proski@gnu.org>
4395
4396 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
4397 jump. This saves two bytes, so the typical case of 2 swapped
4398 drives would fit 32 bytes.
4399
8090fc01 44002009-05-13 Pavel Roskin <proski@gnu.org>
4401
ac963883 4402 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
4403 grub_uint32_t to avoid a warning.
4404
8090fc01 4405 * loader/i386/linux.c (allocate_pages): When assigning
4406 real_mode_mem, cast through grub_size_t to fix a warning. The
4407 code already makes sure that the value would fit a pointer.
4408 (grub_linux_setup_video): Cast render_target->data to
4409 grub_size_t to fix a warning.
4410
18f547ad 44112009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 4412
4413 * commands/i386/pc/drivemap.c: New file - implement drivemap
4414 command.
4415 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
4416 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
4417
6f6a8b28 44182009-05-13 Pavel Roskin <proski@gnu.org>
4419
4420 * util/i386/pc/grub-setup.c (setup): Remove unused variable
4421 embedding_area_exists.
4422
15fbf4c4 44232009-05-13 Robert Millan <rmh.grub@aybabtu.com>
4424
4425 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
4426 it easier to understand / work with.
59978c8a 4427 Improve warning messages for cases where there's no embedding area,
4428 or when it is too small (or core.img too large).
15fbf4c4 4429
238e871f 44302009-05-13 Pavel Roskin <proski@gnu.org>
4431
0ab3a9a4 4432 * loader/i386/pc/multiboot2.c: Add necessary includes for
4433 grub_multiboot2_real_boot().
4434
a2c8c5f8 4435 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
4436 PX record is always little-endian. We only need the lower 2
4437 bytes of the mode.
4438
faec96af 4439 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
4440 facilitate code reuse.
4441 (grub_cpio_mount): Use "struct head", not a char buffer. This
4442 fixes a warning reported by gcc 4.4.
4443
238e871f 4444 * kernel/disk.c (grub_disk_read): Use void pointer for the
4445 buffer.
4446 (grub_disk_write): Use const void pointer for the buffer.
4447 Adjust all callers. Remove unnecessary casts.
4448
901d2f0c 44492009-05-10 Robert Millan <rmh.grub@aybabtu.com>
4450
4451 * util/i386/pc/grub-install.in: Update copyright year.
4452
18f547ad 44532009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 4454
4455 gptsync
4456
4457 * commands/gptsync.c: new file
4458 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
4459 (gptsync_mod_SOURCES): new variable
4460 (gptsync_mod_CFLAGS): likewise
4461 (gptsync_mod_LDFLAGS): likewise
18f547ad 4462 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 4463 new definition
4464 (GRUB_PC_PARTITION_TYPE_HFS): likewise
4465 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
4466 * conf/i386-ieee1275.rmk: likewise
4467 * conf/i386-pc.rmk: likewise
4468 * conf/powerpc-ieee1275.rmk: likewise
4469
b4ba690a 44702009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
4471
4472 Fixed grub-emu
4473
4474 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
4475 (grub_dl_ref): likewise
4476
317e1a44 44772009-05-08 Robert Millan <rmh.grub@aybabtu.com>
4478
4479 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
4480 split in two functions (one for msdos and one for gpt).
4481
041b8094 44822009-05-08 Pavel Roskin <proski@gnu.org>
4483
752473c2 4484 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
4485 not modified.
4486
041b8094 4487 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
4488 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
4489 Initialize them with -1. Add sanity check for bad1. Eliminate
4490 nerr variable.
4491
172800ce 44922009-05-08 David S. Miller <davem@davemloft.net>
4493
4494 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
4495
29aa5e81 44962009-05-06 Robert Millan <rmh.grub@aybabtu.com>
4497
4498 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 4499 existence.
29aa5e81 4500
96613b62 45012009-05-05 Felix Zielcke <fzielcke@z-51.de>
4502
4503 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 4504 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 4505
eef73c8a 45062009-05-05 David S. Miller <davem@davemloft.net>
4507
4508 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
4509
119494b5 45102009-05-05 Pavel Roskin <proski@gnu.org>
4511
4512 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
4513 of grub_dl_ref() and grub_dl_unref().
4514 * commands/parttool.c: Remove preprocessor conditionals around
4515 grub_dl_ref() and grub_dl_unref().
4516 * fs/affs.c: Likewise.
4517 * fs/afs.c: Likewise.
4518 * fs/cpio.c: Likewise.
4519 * fs/ext2.c: Likewise.
4520 * fs/fat.c: Likewise.
4521 * fs/hfs.c: Likewise.
4522 * fs/hfsplus.c: Likewise.
4523 * fs/iso9660.c: Likewise.
4524 * fs/jfs.c: Likewise.
4525 * fs/minix.c: Likewise.
4526 * fs/ntfs.c: Likewise.
4527 * fs/reiserfs.c: Likewise.
4528 * fs/sfs.c: Likewise.
4529 * fs/udf.c: Likewise.
4530 * fs/ufs.c: Likewise.
4531 * fs/xfs.c: Likewise.
4532 * include/grub/dl.h: Likewise.
4533 * loader/xnu.c: Likewise.
4534
de5fd76e 45352009-05-04 Pavel Roskin <proski@gnu.org>
4536
4537 * commands/acpi.c: Remove unused variable my_mod.
4538 * partmap/amiga.c: Likewise.
4539 * partmap/apple.c: Likewise.
4540 * partmap/gpt.c: Likewise.
4541 * partmap/pc.c: Likewise.
4542 * partmap/sun.c: Likewise.
4543 * term/gfxterm.c: Likewise.
4544 * term/i386/pc/vesafb.c: Likewise.
4545 * term/i386/pc/vga.c: Likewise.
4546
983598ad 45472009-05-04 David S. Miller <davem@davemloft.net>
4548
4549 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
4550 pointer args to grub_ieee1275_get_property().
4551
8aadec43 4552 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
4553
9554b15e 4554 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
4555 devices, and do not traverse down under controller nodes.
4556
67e23c90 4557 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
4558 (grub_ofdisk_open): Use it to un-escape "," characters.
4559 * kern/disk.c (find_part_sep): New.
4560 (grub_disk_open): Use it to find the first non-escaped ','
4561 character in the disk name.
4562 * util/ieee1275/devicemap.c (escape_of_path): New.
4563 (grub_util_emit_devicemap_entry): Use it.
4564 * util/sparc64/ieee1275/grub-install.in: Update script to
4565 strip partition specifiers properly by not triggering on
4566 '\' escaped ',' characters.
4567
74bfdd2f 45682009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4569
4570 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
4571 to 0x300.
4572 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
4573 resolutions.
4574 (linux_vesafb_modes): Add a lot of additional modes to the list (based
4575 on documentation from Wikipedia).
4576
4241d2b1 45772009-05-04 Pavel Roskin <proski@gnu.org>
4578
4579 * disk/ata.c: Spelling fixes.
4580 * disk/raid.c: Likewise.
4581 * disk/usbms.c: Likewise.
4582 * disk/dmraid_nvidia.c: Likewise.
4583 * kern/ieee1275/openfw.c: Likewise.
4584 * kern/ieee1275/init.c: Likewise.
4585 * kern/ieee1275/cmain.c: Likewise.
4586 * boot/i386/pc/cdboot.S: Likewise.
4587 * video/readers/png.c: Likewise.
4588 * video/i386/pc/vbe.c: Likewise.
4589 * fs/udf.c: Likewise.
4590 * fs/hfs.c: Likewise.
4591 * fs/reiserfs.c: Likewise.
4592 * efiemu/runtime/efiemu.c: Likewise.
4593 * efiemu/main.c: Likewise.
4594 * efiemu/mm.c: Likewise.
4595 * include/grub/elf.h: Likewise.
4596 * include/grub/xnu.h: Likewise.
4597 * include/grub/usbdesc.h: Likewise.
4598 * include/grub/usb.h: Likewise.
4599 * include/grub/script_sh.h: Likewise.
4600 * include/grub/lib/LzmaEnc.h: Likewise.
4601 * include/grub/efiemu/efiemu.h: Likewise.
4602 * include/grub/command.h: Likewise.
4603 * normal/menu.c: Likewise.
4604 * normal/main.c: Likewise.
4605 * normal/datetime.c: Likewise.
4606 * bus/usb/uhci.c: Likewise.
4607 * mmap/i386/uppermem.c: Likewise.
4608 * mmap/mmap.c: Likewise.
4609 * commands/acpi.c: Likewise.
4610 * commands/test.c: Likewise.
4611 * partmap/apple.c: Likewise.
4612 * font/font.c: Likewise.
4613 * loader/sparc64/ieee1275/linux.c: Likewise.
4614 * loader/macho.c: Likewise.
4615 * loader/i386/bsd_trampoline.S: Likewise.
4616 * loader/i386/bsd.c: Likewise.
4617 * loader/xnu.c: Likewise.
4618 * term/i386/pc/vesafb.c: Likewise.
4619 * term/usb_keyboard.c: Likewise.
4620 * util/resolve.c: Likewise.
4621 * util/getroot.c: Likewise.
4622
0cfc0083 46232009-05-04 Felix Zielcke <fzielcke@z-51.de>
4624
4625 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
4626
7c1d00cd 46272009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4628
4629 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
4630 build error.
4631
b01f0548 46322009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4633
4634 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
4635 parameter only available on BIOS.
4636
ecc3eb22 46372009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4638
4639 Removed wrong semicolon in declaration
4640
4641 * grub/misc.h (grub_dprintf): remove semicolon
4642
112972a9 46432009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4644
4645 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
4646 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
4647 is done by grub_cmd_linux() now).
4648 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
4649 restore video to text mode.
4650 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
4651 indicates lack of "vga=" parameter. "vga=0" is mapped to
4652 `GRUB_LINUX_VID_MODE_NORMAL'.
4653
afd5c115 46542009-05-04 Felix Zielcke <fzielcke@z-51.de>
4655
4656 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
4657 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
4658 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 4659 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 4660 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
4661 `grub_script.tab.c'.
4662
4663 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4664 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4665 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4666 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4667 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4668
faa517ce 4669 * Makefile.in: Remove duplicated 2008 in Copyright line.
4670
ae0c0bdc 46712009-05-04 Robert Millan <rmh.grub@aybabtu.com>
4672
473d1e45 4673 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 4674 unconditionally.
4675 * include/grub/util/misc.h (grub_util_warn): New declaration.
4676
4677 * util/i386/pc/grub-install.in: Understand --force and pass it down
4678 to grub-setup.
4679
4680 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
4681 down to setup().
4682 (setup): Improve error messages and add warnings when requested to
4683 install in odd layouts. Refuse to install using blocklists unless
4684 --force was set.
4685
18f547ad 46862009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 4687
4688 * disk/raid.c (grub_raid_scan_device): Improve debug message.
4689
6d260daa 46902009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4691
4692 Updated copyright year
4693
4694 * fs/hfsplus.c: updated copyright year
18f547ad 4695
69f853f8 46962009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
4697
4698 HFS+ UUID
4699
18f547ad 4700 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 4701 in the space previously used by unused3
4702 (grub_hfsplus_uuid): new function
4703 (grub_hfsplus_fs): added uuid field
4704
4c402e73 47052009-05-03 Pavel Roskin <proski@gnu.org>
4706
4707 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
4708 suppress warnings. It's no longer needed.
4709 * disk/host.c: Likewise.
4710 * disk/ata_pthru.c: Likewise.
4711 * disk/loopback.c: Likewise.
4712 * hook/datehook.c: Likewise.
4713 * parttool/pcpart.c: Likewise.
4714 * fs/i386/pc/pxe.c: Likewise.
4715 * fs/ntfscomp.c: Likewise.
4716 * efiemu/main.c: Likewise.
4717 * mmap/mmap.c: Likewise.
4718 * commands/crc.c: Likewise.
4719 * commands/hexdump.c: Likewise.
4720 * commands/hdparm.c: Likewise.
4721 * commands/acpi.c: Likewise.
4722 * commands/echo.c: Likewise.
4723 * commands/minicmd.c: Likewise.
4724 * commands/blocklist.c: Likewise.
4725 * commands/memrw.c: Likewise.
4726 * commands/loadenv.c: Likewise.
4727 * commands/usbtest.c: Likewise.
4728 * commands/lsmmap.c: Likewise.
4729 * commands/boot.c: Likewise.
4730 * commands/parttool.c: Likewise.
4731 * commands/configfile.c: Likewise.
4732 * commands/search.c: Likewise.
4733 * commands/ieee1275/suspend.c: Likewise.
4734 * commands/cat.c: Likewise.
4735 * commands/i386/pc/pxecmd.c: Likewise.
4736 * commands/i386/pc/play.c: Likewise.
4737 * commands/i386/pc/halt.c: Likewise.
4738 * commands/i386/pc/vbeinfo.c: Likewise.
4739 * commands/i386/pc/vbetest.c: Likewise.
4740 * commands/lspci.c: Likewise.
4741 * commands/date.c: Likewise.
4742 * commands/handler.c: Likewise.
4743 * commands/ls.c: Likewise.
4744 * commands/test.c: Likewise.
4745 * commands/cmp.c: Likewise.
4746 * commands/efi/loadbios.c: Likewise.
4747 * commands/efi/fixvideo.c: Likewise.
4748 * commands/halt.c: Likewise.
4749 * commands/help.c: Likewise.
4750 * commands/reboot.c: Likewise.
4751 * hello/hello.c: Likewise.
4752 * script/sh/main.c: Likewise.
4753 * loader/xnu.c: Likewise.
4754 * term/terminfo.c: Likewise.
4755 * term/i386/pc/serial.c: Likewise.
4756 * term/usb_keyboard.c: Likewise.
4757
515b5079 47582009-05-03 David S. Miller <davem@davemloft.net>
4759
4760 * normal/menu.c: Include grub/parser.h
4761
dfc31a22 47622009-05-03 Pavel Roskin <proski@gnu.org>
4763
2fee74f1 4764 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
4765 not char*.
4766 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
4767 Suggested by Javier Martín <lordhabbit@gmail.com>
4768
dfc31a22 4769 * util/i386/pc/grub-mkrescue.in: Allow for the case when
4770 efiemu??.o doesn't exist.
4771 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
4772 copying.
4773
18f547ad 47742009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 4775
4776 FreeBSD 64-bit support
4777
18f547ad 4778 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 4779 and loader/i386/bsd_trampoline.S
4780 (bsd_mod_ASFLAGS): new variable
4781 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
4782 (FREEBSD_MODTYPE_KERNEL64): likewise
4783 (grub_bsd64_trampoline_start): likewise
4784 (grub_bsd64_trampoline_end): likewise
4785 (grub_bsd64_trampoline_selfjump): likewise
4786 (grub_bsd64_trampoline_gdt): likewise
4787 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
4788 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
4789 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
4790 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 4791 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 4792 of "attrib" member
4793 * loader/i386/bsd_pagetable.c: new file
4794 * loader/i386/bsd_trampoline.S: likewise
4795 * loader/i386/bsd.c (ALIGN_QWORD): new macro
4796 (ALIGN_VAR): likewise
4797 (entry_hi): new variable
4798 (kern_end_mdofs): likewise
4799 (is_64bit): likewise
4800 (grub_freebsd_add_meta): use ALIGN_VAR
4801 (grub_e820_mmap): new declaration
4802 (grub_freebsd_add_mmap): new function
4803 (grub_freebsd_add_meta_module): support 64 bit kernels
4804 (grub_freebsd_list_modules): use ALIGN_VAR
4805 (gdt_descriptor): new declaration
4806 (grub_freebsd_boot): support 64 bit kernels
4807 (grub_bsd_elf64_hook): new function
4808 (grub_bsd_load_elf): support elf64
4809
038c5720 48102009-05-03 Bean <bean123ch@gmail.com>
4811
4812 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
4813 after we get the result of if statement.
4814
fc45fb58 48152009-05-03 Bean <bean123ch@gmail.com>
4816
4817 * Makefile.in (enable_efiemu): New variable.
4818
4819 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
4820 set.
4821 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
4822 path.
4823 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
4824 path, add -mno-red-zone option.
4825 (efiemu64_s.o): Likewise.
4826 (efiemu64.o): Use macro $^ for source file.
4827
4828 * configure.ac (--enable-efiemu): New option.
4829
bbee0f2b 48302009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
4831
4832 xnu support
4833
4834 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
4835 (pkglib_MODULES): add xnu.mod
4836 (xnu_mod_SOURCES): new variable
4837 (xnu_mod_CFLAGS): likewise
4838 (xnu_mod_LDFLAGS): likewise
4839 (xnu_mod_ASFLAGS): likewise
4840 * conf/i386-pc.rmk: likewise
4841 * conf/x86_64-efi.rmk: likewise
7dd4a573 4842 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 4843 new declaration
4844 * include/grub/i386/macho.h: new file
4845 * include/grub/i386/xnu.h: likewise
4846 * include/grub/macho.h: likewise
4847 * include/grub/machoload.h: likewise
4848 * include/grub/x86_64/macho.h: likewise
4849 * include/grub/x86_64/xnu.h: likewise
4850 * include/grub/xnu.h: likewise
4851 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
4852 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
4853 * loader/i386/efi/xnu.c: new file
4854 * loader/i386/pc/xnu.c: likewise
4855 * loader/i386/xnu.c: likewise
4856 * loader/i386/xnu_helper.S: likewise
4857 * loader/macho.c: likewise
4858 * loader/xnu.c: likewise
4859 * loader/xnu_resume.c: likewise
4860 * util/grub-dumpdevtree: likewise
4861 * include/grub/i386/pit.h: include grub/err.h
4862 (grub_pit_wait): export
4863 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 4864
5caf964d 48652009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
4866
4867 Efiemu
7dd4a573 4868
5caf964d 4869 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 4870 _linux_efi, linux_efi.
4871 new files in grub-emu
5caf964d 4872 new targets efiemu32.o and efiemu64.o
4873 * loader/linux_normal_efiemu.c: likewise
4874 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 4875 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 4876 files to copy
4877 * include/grub/autoefi.h: new file
7dd4a573 4878 * include/grub/i386/efiemu.h: likewise
5caf964d 4879 * include/grub/i386/pc/efiemu.h: likewise
4880 * include/grub/efi/api.h: add LL suffix when necessary
4881 new definitions relating to tables
4882 * include/grub/efiemu/efiemu.h: new file
4883 * include/grub/efiemu/runtime.h: likewise
4884 * efiemu/prepare.c: likewise
4885 * efiemu/loadcore_common.c: likewise
4886 * efiemu/loadcore64.c: likewise
4887 * efiemu/runtime/efiemu.sh: likewise
4888 * efiemu/runtime/efiemu.S: likewise
4889 * efiemu/runtime/efiemu.c: likewise
4890 * efiemu/runtime/config.h: likewise
4891 * efiemu/prepare32.c: likewise
4892 * efiemu/main.c: likewise
4893 * efiemu/modules/pnvram.c: likewise
4894 * efiemu/modules/i386: likewise
4895 * efiemu/modules/i386/pc: likewise
4896 * efiemu/modules/acpi.c: likewise
4897 * efiemu/i386/pc/cfgtables.c: likewise
4898 * efiemu/i386/loadcore64.c: likewise
4899 * efiemu/i386/loadcore32.c: likewise
4900 * efiemu/prepare64.c: likewise
4901 * efiemu/loadcore.c: likewise
4902 * efiemu/symbols.c: likewise
4903 * efiemu/mm.c: likewise
4904 * efiemu/loadcore32.c: likewise
7dd4a573 4905
49062009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 4907
4908 ACPI spoofing
4909
4910 * commands/acpi.c: new file
4911 * commands/i386/pc/acpi.c: likewise
4912 * commands/efi/acpi.c: likewise
4913 * include/grub/acpi.h: likewise
4914 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
4915 (acpi_mod_SOURCES): new variable
4916 (acpi_mod_CFLAGS): likewise
4917 (acpi_mod_LDFLAGS): likewise
4918 * conf/i386-efi.rmk: likewise
4919 * conf/x86_64-efi.rmk: likewise
4920
7dd4a573 49212009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 4922
4923 Missing part from mmap patch
4924
4925 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
4926 (grub_mmap_unregister)
4927 (grub_mmap_free_and_unregister): use grub_mmap_register
4928
7dd4a573 49292009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 4930
4931 Mmap services
4932
4933 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
4934 * loader/i386/linux.c (find_mmap_size): likewise
4935 (allocate_pages): likewise
4936 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
4937 (grub_fill_multiboot_mmap): likewise
4938 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
4939 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
4940 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
4941 (OPENBSD_MMAP_RESERVED): likewise
4942 * include/grub/i386/pc/memory.h: include grub/memory.h
4943 (grub_lower_mem): removed
4944 (grub_upper_mem): likewise
4945 (GRUB_MACHINE_MEMORY_ACPI): new definition
4946 (GRUB_MACHINE_MEMORY_NVS): likewise
4947 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
4948 (GRUB_MACHINE_MEMORY_HOLE): likewise
4949 (grub_machine_mmap_register): likewise
4950 (grub_machine_mmap_unregister): likewise
4951 (grub_machine_get_upper): likewise
4952 (grub_machine_get_lower): likewise
4953 (grub_machine_get_post64): likewise
4954 * include/grub/i386/efi/memory.h: new file
4955 * include/grub/x86_64/efi/memory.h: likewise
4956 * include/grub/efi/memory.h: likewise
4957 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
4958 (mmap_mod_SOURCES): new variable
4959 (mmap_mod_LDFLAGS): likewise
4960 (mmap_mod_ASFLAGS): likewise
4961 * conf/i386-coreboot.rmk: likewise
4962 * conf/i386-ieee1275.rmk: likewise
4963 * conf/i386-efi.rmk: likewise
4964 * conf/x86_64-efi.rmk: likewise
4965 * include/grub/types.h (UINT_TO_PTR): new macro
4966 (PTR_TO_UINT32): likewise
4967 (PTR_TO_UINT64): likewise
4968 * include/grub/memory.h: new file
4969 * mmap/i386/pc/mmap.c: likewise
4970 * mmap/i386/pc/mmap_helper.S: likewise
4971 * mmap/i386/uppermem.c: likewise
4972 * mmap/mmap.c: likewise
4973 * mmap/efi/mmap.c: likewise
7dd4a573 4974 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 4975 grub_upper_mem
4976 * kern/i386/pc/init.c (grub_lower_mem): removed variable
4977 (grub_upper_mem): likewise
4978 (grub_machine_init): don't use grub_upper_mem,
4979 make grub_lower_mem local
4980 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
4981 grub_mmap_iterate and grub_mmap_get_upper
4982 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
4983
d558e6b5 49842009-05-02 Bean <bean123ch@gmail.com>
4985
4986 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
4987 script/sh/parser.y.
4988 (pkglib_MODULES): Add normal.mod and sh.mod.
4989 (normal_SOURCES): New variable.
4990 (normal_mod_CFLAGS): Likewise.
4991 (normal_mod_LDFLAGS): Likewise.
4992 (sh_mod_SOURCES): Likewise.
4993 (sh_mod_CFLAGS): Likewise.
4994 (sh_mod_LDFLAGS): Likewise.
4995
4996 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
4997 script/sh/lexer.c_DEPENDENCIES.
4998 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
4999 kern/rescue_reader.c and kern/rescue_parser.c.
5000 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
5001 (grub_emu_SOURCES): Change source files.
5002 (pkglib_MODULES): Remove normal.mod.
5003 (normal_SOURCES): Removed.
5004 (normal_mod_CFLAGS): Likewise.
5005 (normal_mod_LDFLAGS): Likewise.
5006 * conf/i386-coreboot.rmk: Likewise.
5007 * conf/i386-efi.rmk: Likewise.
5008 * conf/i386-ieee1276.rmk: Likewise.
5009 * conf/powerpc-ieee1275.rmk: Likewise.
5010 * conf/sparc64-ieee1275.rmk: Likewise.
5011 * conf/x86_64-efi.rmk: Likewise.
5012
5013 * include/grub/command.h (grub_command_execute): New inline function.
5014
5015 * include/grub/menu.h (grub_menu_entry): Removed commands field.
5016
5017 * include/grub/normal.h: Remove <grub/setjmp.h>.
5018 (grub_fs_module_list): Moved to normal/autofs.c.
5019 (grub_exit_env): Removed.
5020 (grub_command_execute): Likewise.
5021 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
5022 parameter script.
5023 (read_command_list): New function declaration.
5024 (read_fs_list): Likewise.
5025
5026 * include/parser.h: Include <grub/reader.h>.
5027 (grub_parser_split_cmdline): Change type of getline parameter.
5028 (grub_parser): New structure.
5029 (grub_parser_class): New variable.
5030 (grub_parser_execute): New function declaration.
5031 (grub_register_rescue_parser): Likewise.
5032 (grub_parser_register): New inline function.
5033 (grub_parser_unregister): Likewise.
5034 (grub_parser_get_current): Likewise.
5035 (grub_parser_set_current): Likewise.
5036
5037 * include/grub/reader.h: New file.
5038 * kern/reader.c: Likewise.
5039 * kern/rescue_parser.c: Likewise.
5040 * kern/rescue_reader.c: Likewise.
5041 * normal/autofs.c: Likewise.
5042 * normal/dyncmd.c: Likewise.
5043
5044 * include/grub/rescue.h: Removed.
5045 * normal/command.h: Likewise.
5046
5047 * include/grub/script.h: Moved to ...
5048 * include/grub/script_sh.h: ... Moved here.
5049 * normal/execute.c: Moved to ...
5050 * script/sh/execute.c: ... Moved here.
5051 * normal/function.c: Moved to ...
5052 * script/sh/function.c: ... Moved here.
5053 * normal/lexer.c: Moved to ...
5054 * script/sh/lexer.c: ... Moved here.
5055 * normal/parser.y: Moved to ...
5056 * script/sh/parser.y: ... Moved here.
5057 * normal/script.c: Moved to ...
5058 * script/sh/script.c: ... Moved here.
5059
5060 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
5061 <grub/reader.h>.
5062 (grub_exit_env): Removed.
5063 (fs_module_list): Moved to normal/autofs.c.
5064 (grub_file_getline): Don't handle comment here.
5065 (free_menu): Skip removed field entry->commands.
5066 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
5067 script parameter.
5068 (read_config_file): Removed nested parameter, change getline function.
5069 (grub_enter_normal_mode): Removed.
5070 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
5071 (read_command_list): Likewise.
5072 (autoload_fs_module): Moved to normal/autofs.c.
5073 (read_fs_list): Likewise.
5074 (reader_nested): New variable.
5075 (grub_normal_execute): Run parser.sh to switch to sh parser.
5076 (grub_cmd_rescue): Removed.
5077 (cmd_normal): Removed.
5078 (grub_cmd_normal): Unregister itself at the beginning. Don't register
5079 rescue command.
5080 (grub_cmdline_run): New function.
5081 (grub_normal_reader_init): Likewise.
5082 (grub_normal_read_line): Likewise.
5083 (grub_env_write_pager): Likewise.
5084 (cmdline): New variable.
5085 (grub_normal_reader): Likewise.
5086 (GRUB_MOD_INIT): Register normal reader and set as current, register
5087 pager hook, register normal command with grub_register_command_prio,
5088 so that it won't show up in command.lst.
5089 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
5090 grub_fs_autoload_hook.
5091
5092 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
5093 (grub_menu_execute_entry): Replace grub_script_execute with
5094 grub_parser_execute, change parameter to grub_command_execute.
5095
5096 * normal/menu_text.c: Remove <grub/script.h>.
5097
5098 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
5099 and <grub/parser.h>.
5100 (run): Change editor_getline to use new parser interface. Change
5101 parameter to grub_command_execute.
5102
5103 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
5104 <grub/reader.h> and <grub/parser.h>.
5105 (grub_load_normal_mode): Execute normal command.
5106 (grub_main): Call grub_register_core_commands,
5107 grub_register_rescue_parser and grub_register_rescue_reader, use
5108 grub_reader_loop to enter input loop.
5109
7dd4a573 5110 * kern/parser.c (grub_parser_split_cmdline): Change type of
5111 getline parameter.
d558e6b5 5112 (grub_parser_class): New variable.
5113 (grub_parser_execute): New function.
5114
5115 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
5116 * loader/multiboot2.c: Likewise.
5117 * loader/sparc64/ieee1275/linux.c: Likewise.
5118
5119 * util/grub-emu.c (read_command_list): New dummy function.
5120
18db813d 51212009-05-02 Robert Millan <rmh.grub@aybabtu.com>
5122
5123 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
5124 count to 16 for CCISS and IDA.
5125
6c67de15 51262009-05-02 Robert Millan <rmh.grub@aybabtu.com>
5127
5128 * normal/menu_text.c (grub_wait_after_message): Print a newline
5129 after waiting for user input.
5130
5131 * loader/i386/linux.c: Include `<grub/normal.h>'.
5132 (grub_cmd_linux): Improve the error message about `ask' mode, by
5133 waiting for user input so it's not missed (we can do this, since
5134 user requested interaction).
5135
d9dc87b0 51362009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
5137
5138 Added missing lst to grub-mkrescue
5139
5140 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
5141 and ${input_dir}/parttool.lst
5142
ac8a2baa 51432009-04-30 David S. Miller <davem@davemloft.net>
5144
ad22a610 5145 * util/hostdisk.c (device_is_wholedisk): New function.
5146 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
5147 zero only if device_is_wholedisk() returns true.
5148
6966215d 5149 * util/hostdisk.c (convert_system_partition_to_system_disk):
5150 Handle virtual disk devices named /dev/vdiskX as found on sparc
5151 and powerpc.
5152
ac8a2baa 5153 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
5154 lettered partition specifier is found, convert to numbered.
5155
979b4fb4 51562009-04-29 David S. Miller <davem@davemloft.net>
5157
e2bf39b2 5158 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
5159 * include/grub/sparc64/ieee1275/memory.h: Likewise.
5160
3c64e104 5161 * normal/command.c: Add missing newline at end of file.
5162
979b4fb4 5163 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
5164 warnings.
5165 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
5166 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
5167 grub_ofdisk_read): Likewise, and deal similarly with the fact that
5168 ihandles have a 32-bit type but need to be stored in a "void *".
5169
136d9f82 51702009-04-28 Pavel Roskin <proski@gnu.org>
5171
9459c306 5172 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
5173 not disk. Adjust all dependencies.
2e08a26a 5174 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 5175 grub_disk_close().
5176
136d9f82 5177 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
5178 parent's partition, don't copy it by reference, as it gets freed
5179 on close.
5180
7dd4a573 51812009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 5182
5183 Preboot hooks support
5184
5185 * commands/boot.c (struct grub_preboot_t): new declaration
5186 (preboots_head): new variable
5187 (preboots_tail): likewise
5188 (grub_loader_register_preboot_hook): new function
5189 (grub_loader_unregister_preboot_hook): likewise
5190 (grub_loader_set): launch preboot hooks
5191 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
5192 (grub_loader_register_preboot_hook): new declaration
5193 (grub_loader_unregister_preboot_hook): likewise
5194
5af922b5 51952009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
5196
5197 Warning fix
5198
7dd4a573 5199 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 5200 calling grub_dprintf
5201
a5562c30 52022009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
5203
5204 Bug and warning fixes
5205
7dd4a573 5206 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 5207 declaration
5208 * commands/test.c (test_parse): fixed bug with file tests and corrected
5209 declaration of find_file
5210
4006f85c 52112009-04-26 Pavel Roskin <proski@gnu.org>
5212
5213 * Makefile.in: Don't install empty manual pages if help2man is
5214 missing. Use help2man option for output, not shell redirection.
5215
5c77c3de 52162009-04-26 David S. Miller <davem@davemloft.net>
5217
5218 * util/grub-mkdevicemap.c (make_device_map): Add missing
5219 NESTED_FUNC_ATTR to process_device().
5220
033b10a8 52212009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
5222
5223 Test command
5224
5225 * commands/test.c: rewritten to use bash-like test
5226
e4343593 52272009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
5228
5229 Parttool autoloading and improvements
5230
7dd4a573 5231 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 5232 (parttool.lst): new target
5233 * genmk.rb: generate parttool-*
5234 (CLEANFILES): add #{parttool}
5235 (PARTTOOLFILES): new variable
5236 * genparttoollist.sh: new file
7dd4a573 5237 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 5238 (grub_pcpart_type): likewise
5239 * commands/parttool.c (helpmsg): new variable
5240 (grub_cmd_parttool): output help if not enough arguments are supplied
5241 autoload modules
5242 (GRUB_MOD_INIT(parttool)): use helpmsg
5243
0d312500 52442009-04-24 David S. Miller <davem@davemloft.net>
5245
7dd4a573 5246 Avoiding opening same device multiple times in device iterator.
0d312500 5247
5248 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 5249 and use it to build a list of partitions in iterate_disk() and
0d312500 5250 iterate_partition().
5251
ac20caff 5252 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
5253 on disk->data.
5254
0dcf7495 5255 * disk/ieee1275/nand.c (grub_nand_iterate): Return
5256 grub_devalias_iterate() result instead of unconditional 0.
5257 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
5258 Also, capture hook return value, either directly or via
5259 grub_children_iterate(), and propagate to caller.
5260 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
5261 grub_children_iterate): Return value is now 'int' instead of
5262 'grub_err_t'.
5263 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
5264 like a proper iterator, stopping when hooks return non-zero.
5265 (grub_devalias_iterate): Likewise.
5266
c8c08833 52672009-04-23 David S. Miller <davem@davemloft.net>
5268
5269 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
5270
f01005a8 52712009-04-22 David S. Miller <davem@davemloft.net>
5272
5273 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
5274 is larger than address_cells, use that value for address_cells too.
5275
4e8269da 5276 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
5277 IEEE1275_MAX_PATH_LEN): Define.
5278 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
5279 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
5280 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
5281 'devtype'. Explicitly NULL terminate devalias expansion.
5282
a1447506 5283 * util/sparc64/ieee1275/misc.c: New file.
5284 * util/sparc64/ieee1275/grub-setup.c: New file.
5285 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
5286 * util/sparc64/ieee1275/grub-mkimage.c: New file.
5287 * util/sparc64/ieee1275/grub-install.in: New file.
5288 * util/ieee1275/ofpath.c: New file.
5289 * util/ieee1275/devicemap.c: New file.
5290 * util/devicemap.c: New file.
5291 * util/deviceiter.c: New file.
5292 * kern/sparc64/ieee1275/init.c: New file.
5293 * include/grub/util/ofpath.h: New file.
5294 * include/grub/util/deviceiter.h: New file.
5295 * util/grub-mkdevicemap.c: Include deviceiter.h.
5296 Implement using grub_util_emit_devicemap_entry and
5297 grub_util_iterate_devices.
5298 * conf/i386-corebook.rmk: Build util/deviceiter.c and
5299 util/devicemap.c into grub-mkdevicemap
5300 * conf/i386-efi.rmk: Likewise.
5301 * conf/i386-ieee1275.rmk: Likewise.
5302 * conf/i386-pc.rmk: Likewise.
5303 * conf/powerpc-ieee1275.rmk: Likewise.
5304 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
5305 images and installation utilities. Build kernel as image
5306 instead of as elf binary. Use common rules as much as possible.
5307
7dd4a573 53082009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 5309
5310 Correct GPT definition
5311
7dd4a573 5312 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 5313 of "attrib" member
5314
c6c5219f 53152009-04-19 Felix Zielcke <fzielcke@z-51.de>
5316
5317 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
5318
0552ff9f 53192009-04-19 David S. Miller <davem@davemloft.net>
5320
5321 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
5322 (grub_rescue_cmd_linux): Rename to...
5323 (grub_cmd_linux): and fix prototype.
5324 (grub_rescue_cmd_initrd): Rename to...
5325 (grub_cmd_initrd): and fix prototype.
5326 (cmd_linux, cmd_initrd): New.
5327 (GRUB_MOD_INIT(linux)): Use grub_register_command().
5328 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
5329
d1a282fc 53302009-04-17 Pavel Roskin <proski@gnu.org>
5331
07c5039f 5332 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
5333 format.
5334 (grub_ohci_transfer): Likewise.
5335
b012002d 5336 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
5337
1bc09c35 5338 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
5339 return without a value. Fix inconsistent indentation.
5340
e0ff9126 5341 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
5342 match struct grub_fs.
5343
d1a282fc 5344 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
5345 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
5346 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
5347 * commands/lspci.c (grub_lspci_iter): Likewise.
5348
a96df3f2 53492009-04-16 Bean <bean123ch@gmail.com>
5350
5351 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
5352 value.
5353
41bb0fe9 53542009-04-15 Pavel Roskin <proski@gnu.org>
5355
5356 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
5357 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
5358 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
5359 definitions.
5360
596c6970 53612009-04-15 Felix Zielcke <fzielcke@z-51.de>
5362
5363 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 5364 that no multiple data or metadata areas are supported and `Unknown
596c6970 5365 metadata header'.
5366
7dd4a573 53672009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 5368
5369 Move loader out of the kernel
5370
5371 * kern/loader.c: moved to ...
5372 * commands/boot.c: ... moved here
5373 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
5374 * commands/boot.c (grub_cmd_boot): moved here. All users updated
5375 * include/grub/kernel.h (grub_machine_fini): export
5376 * include/grub/loader.h (grub_loader_is_loaded): update declaration
5377 (grub_loader_set): likewise
5378 (grub_loader_unset): likewise
5379 (grub_loader_boot): likewise
5380 * conf/common.rmk: new module boot.mod
5381 (pkglib_MODULES): add boot.mod
5382 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
5383 (grub_emu_SOURCES): likewise
5384 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
5385 (grub_emu_SOURCES): likewise
5386 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
5387 (grub_emu_SOURCES): likewise
5388 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
5389 (grub_emu_SOURCES): likewise
5390 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
5391 (grub_emu_SOURCES): likewise
7dd4a573 5392 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
5393 (grub_emu_SOURCES): likewise
0d5d5653 5394 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 5395 (grub_emu_SOURCES): likewise
0d5d5653 5396
7dd4a573 53972009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 5398
5399 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 5400
5999d619 5401 * kern/misc.c (grub_itoa): Removed function
5402 (grub_ltoa): likewise
5403 (grub_vsprintf): use grub_lltoa
5404
7dd4a573 54052009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 5406
5407 Restore grub-emu
5408
5409 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
5410 * conf/i386-coreboot.rmk: likewise
5411 * conf/i386-ieee1275.rmk: likewise
5412 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5413
20318222 54142009-04-15 Felix Zielcke <fzielcke@z-51.de>
5415
5416 * INSTALL: Add that `./autogen.sh' needs to be run before
5417 `./configure.'.
5418
d05f0df3 54192009-04-14 Bean <bean123ch@gmail.com>
5420
5421 * Makefile.in (pkglib_DATA): Add handler.lst.
5422 (handler.lst): New rule.
5423
5424 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
5425 * conf/i386-coreboot.rmk: Likewise.
5426 * conf/i386-ieee1275.rmk: Likewise.
5427 * conf/i386-efi.rmk: Likewise.
5428 * conf/x86_64-efi.rmk: Likewise.
5429 * conf/powerpc-ieee1275.rmk: Likewise.
5430 * conf/sparc64-ieee1275.rmk: Likewise.
5431
5432 * genhandlerlist.sh: New file.
5433
5434 * genmk.rb: Add rules to generate handler.lst.
5435
5436 * include/grub/normal.h (grub_file_getline): New function definition.
5437 (read_handler_list): Likewise.
5438 (free_handler_list): Likewise.
5439
5440 * include/grub/term.h (grub_term_register_input): Add name parameter
5441 for auto generation of handler.lst.
5442 (grub_term_register_output): Likewise.
5443
5444 * normal/handler.c: New file.
5445
5446 * normal/main.c (get_line): Renamed to grub_file_getline.
5447 (read_config_file): Use the newly renamed grub_file_getline.
5448 (read_command_list): Likewise.
5449 (read_fs_list): Likewise.
5450 (grub_normal_execute): Call read_handler_list to parse handler.lst.
5451 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
5452
5453 * term/efi/console.c (grub_console_init): Add name parameter for auto
5454 generation of handler.lst.
5455 * term/gfxterm.c: Likewise.
5456 * term/i386/pc/at_keyboard.c: Likewise.
5457 * term/i386/pc/console.c: Likewise.
5458 * term/i386/pc/serial.c: Likewise.
5459 * term/i386/pc/vesafb.c: Likewise.
5460 * term/i386/pc/vga.c: Likewise.
5461 * term/i386/pc/vga_text.c: Likewise.
5462 * term/ieee1275/ofconsole.c: Likewise.
5463 * term/usb_keyboard.c: Likewise.
5464
33c846be 54652009-04-14 Bean <bean123ch@gmail.com>
5466
5467 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
5468 properly with null character.
5469
4484e01e 54702009-04-14 Felix Zielcke <fzielcke@z-51.de>
5471
5472 * configure: Remove.
5473 * config.h.in: Likewise.
f93d668e 5474 * stamp-h.in: Likewise.
4484e01e 5475 * DISTLIST: Likewise.
5476 * conf/common.mk: Likewise.
5477 * conf/i386-coreboot.mk: Likewise.
5478 * conf/i386-efi.mk: Likewise.
5479 * conf/i386-ieee1275.mk: Likewise.
5480 * conf/i386.mk: Likewise.
5481 * conf/i386-pc.mk: Likewise.
5482 * conf/powerpc-ieee1275.mk: Likewise.
5483 * conf/sparc64-ieee1275.mk: Likewise.
5484 * conf/x86_64-efi.mk: Likewise.
5485
5486 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
5487 develop on GRUB.
5488
7dd4a573 54892009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 5490 David S. Miller <davem@davemloft.net>
5491
5492 * util/hostdisk.c (make_device_name): Fix buffer length
5493 calculations.
5494
e25b5a8c 54952009-04-14 Felix Zielcke <fzielcke@z-51.de>
5496
5497 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
5498 <sys/param.h> and <sys/sysctl.h>.
5499 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
5500 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
5501 opening the device and reset them afterwards.
5502
1f1f580c 55032009-04-13 Pavel Roskin <proski@gnu.org>
5504
5505 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
5506 Reported by John Stanley <jpsinthemix@verizon.net>
5507
7ebc2d6b 55082009-04-13 Robert Millan <rmh@aybabtu.com>
5509
5510 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 5511 that name for menuentries when appropriate.
7ebc2d6b 5512
d8ba3667 55132009-04-13 Felix Zielcke <fzielcke@z-51.de>
5514
5515 * util/grub.d/10_freebsd.in: Add a missing `fi'.
5516
cba416eb 55172009-04-13 Robert Millan <rmh@aybabtu.com>
5518
5519 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
5520 to Linux, simply abort telling the user it's no longer supported.
5521
a547a745 55222009-04-13 Felix Zielcke <fzielcke@z-51.de>
5523
5524 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 5525 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 5526 `freebsd_loadenv' only when devices.hints exist.
5527
232a769c 55282009-04-13 Pavel Roskin <proski@gnu.org>
5529
5530 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
5531
c3012039 55322009-04-13 Felix Zielcke <fzielcke@z-51.de>
5533
5534 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
5535 partition number.
5536 (grub_drive): Likewise.
5537
234022fe 55382009-04-13 David S. Miller <davem@davemloft.net>
5539
5540 * kern/sparc64/ieee1275/ieee1275.c: New file.
5541 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
5542 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
5543 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
5544 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
5545 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
5546 grub_ieee1275_alloc_physmem): Declare new exported functions.
5547
d8e1836c 5548 * include/grub/sparc64/ieee1275/loader.h: New file.
5549 * include/grub/sparc64/ieee1275/memory.h: Likewise.
5550 * include/grub/sparc64/kernel.h: Likewise.
5551 * loader/sparc64/ieee1275/linux.c: Likewise.
5552
96bd81ec 5553 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
5554 (grub_fstest_SOURCES): Likewise.
5555
6a4737e5 5556 * util/hostdisk.c (make_device_name): Do not make any assumptions
5557 about the length of drive names.
5558
1d7a72fd 5559 * kern/dl.c (grub_dl_load_file): Close file immediately when
5560 we are done using it.
5561
56bc2471 55622009-04-12 David S. Miller <davem@davemloft.net>
5563
5564 * kern/misc.c (grub_ltoa): Fix cast when handling negative
5565 values. Noticed by Pavel Roskin.
5566
df38d0bb 5567 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
5568 target compiler.
7dd4a573 5569
e382e93a 5570 * genmk.rb: Add more flexible image type specification, also
5571 pass --strip-unneeded to objcopy.
5572 * conf/i386-pc.rmk: Use *_FORMAT.
5573 * conf/i386-pc.mk: Rebuilt.
5574
f5dbbca9 5575 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
5576 (OFDISK_HASH_SZ): Define.
5577 (ofdisk_hash): New hash table.
5578 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
5579 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
5580 instead of device phandle which is not unique.
5581
91c88b12 5582 * kern/sparc64/ieee1275/init.c: Delete, replace with...
5583 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
5584 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
5585 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
5586 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
5587 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
5588 GRUB_KERNEL_MACHINE_DATA_END): Define.
5589 (grub_kernel_image_size, grub_total_module_size): Declare.
5590
5b5d4aa5 55912009-04-12 Pavel Roskin <proski@gnu.org>
5592
7dd4a573 5593 * configure.ac: Change the logic when we check for target tools.
5594 Do it when the target is specified and it's different from the
5595 specified value of the host.
5b5d4aa5 5596
c91e1793 55972009-04-11 Felix Zielcke <fzielcke@z-51.de>
5598
5599 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
5600 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
5601 GNU/kFreeBSD. Check if a device is a character device. Use
5602 DIOCGMEDIASIZE to get the size.
5603 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
5604 support for GNU/kFreeBSD.
5605 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
5606 is a character device instead of a block device. Add support for
5607 FreeBSD device names.
5608
5609 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
5610 is a character device instead of a block device.
5611
5612 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
5613 is a character device instead of a block device.
5614
b1ac8644 56152009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
5616
5617 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
5618 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
5619 FreeBSD. Check if a device is a character device. Use
5620 DIOCGMEDIASIZE to get the size.
5621 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
5622 support for FreeBSD.
5623 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
5624 is a character device instead of a block device. Add support for
5625 FreeBSD device names.
5626
5627 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
5628 a character device instead of a block device.
5629 (grub_util_check_char_device): New function.
5630
5631 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
5632 a character device instead of a block device.
5633
5634 * include/grub/util/getroot.h (grub_util_check_char_device): New
5635 prototype.
5636
a3f7515a 56372009-04-11 David S. Miller <davem@davemloft.net>
5638
5639 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
5640 static libgcc.
5641 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
5642 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
5643 function, if present.
5644 (__bswapdi2): Likewise.
5645
0d44993d 5646 * include/grub/sparc64/ieee1275/boot.h: New file.
5647 * boot/sparc64/ieee1275/boot.S: Likewise.
5648 * boot/sparc64/ieee1275/diskboot.S: Likewise.
5649
ed3d2bc2 5650 * kern/misc.c (grub_ltoa): New function.
5651 (grub_vsprintf): Use it to format 'long' integers.
5652
d3bfb59c 56532009-04-10 David S. Miller <davem@davemloft.net>
5654
5655 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
5656 slots are of type grub_ieee1275_cell_t.
5657 (grub_nand_read): Likewise.
5658 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
5659 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
5660 macros are used to compare values in arg/ret block of the call.
5661 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5662 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
5663 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
5664 grub_ieee1275_instance_to_path, grub_ieee1275_write,
5665 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
5666 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
5667 grub_ieee1275_close, grub_ieee1275_set_property,
5668 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
5669 grub_ieee1275_cell_t.
5670 * kern/ieee1275/openfw.c (grub_map): Likewise.
5671 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
5672 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
5673
450e2238 5674 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
5675 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
5676 (grub_devalias_iterate): Likewise.
5677
7dd4a573 56782009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 5679
5680 UFS improvements
5681
5682 * fs/ufs.c (INODE_NBLOCKS): new definition
5683 (struct grub_ufs_dirent): added fields for non-BSD dirents
5684 (grub_ufs_get_file_block): fixed double indirect handling
5685 (grub_ufs_lookup_symlink): use more robust way to determine whether
5686 symlink is inline
5687 (grub_ufs_find_file): support for non-BSD dirents
5688 (grub_ufs_dir): support for non-BSD dirents
5689
e7e6862a 56902009-04-10 Bean <bean123ch@gnail.com>
5691
5692 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
5693 attribute, otherwise the size would be wrong for i386 platform.
5694
5695 * include/grub/pci.h (grub_pci_read_word): New inline function.
5696 (grub_pci_read_byte): Likewise.
5697 (grub_pci_write): Likewise.
5698 (grub_pci_write_word): Likewise.
5699 (grub_pci_write_byte): Likewise.
5700
5701 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
5702
5703 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
5704 (find_framebuf): Scan pci to locate the frame buffer address.
5705
5706 * commands/efi/fixvideo.c: New file.
5707
5708 * commands/efi/loadbios.c: Likewise.
5709
5710 * commands/memrw.c: Likewise.
5711
5712 * util/grub-dumpbios.in: Likewise.
5713
5714 * conf/common.rmk (grub-dumpbios): New utility.
5715 (pkglib_MODULES): New module memrw.mod.
5716 (memrw_mod_SOURCE): New macro.
5717 (memrw_mod_CFLAGS): Likewise.
5718 (memrw_mod_LDFLAGS): Likewise.
5719
7dd4a573 5720 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 5721 fixvideo.mod.
5722 (loadbios_mod_SOURCE): New macro.
5723 (loadbios_mod_CFLAGS): Likewise.
5724 (loadbios_mod_LDFLAGS): Likewise.
5725 (fixvideo_mod_SOURCE): Likewise.
5726 (fixvideo_mod_CFLAGS): Likewise.
5727 (fixvideo_mod_LDFLAGS): Likewise.
5728
7dd4a573 5729 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 5730 fixvideo.mod.
5731 (loadbios_mod_SOURCE): New macro.
5732 (loadbios_mod_CFLAGS): Likewise.
5733 (loadbios_mod_LDFLAGS): Likewise.
5734 (fixvideo_mod_SOURCE): Likewise.
5735 (fixvideo_mod_CFLAGS): Likewise.
5736 (fixvideo_mod_LDFLAGS): Likewise.
5737
af63ada2 57382009-04-08 Felix Zielcke <fzielcke@z-51.de>
5739
5740 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
5741
c2cdde70 57422009-04-07 David S. Miller <davem@davemloft.net>
5743
5744 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
5745 support for R_SPARC_OLO10 relocations. Fix compile warning for
5746 R_SPARC_WDISP30 case.
ea3f72cf 5747 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 5748
761319cf 57492009-04-06 Pavel Roskin <proski@gnu.org>
5750
1007d1f5 5751 * include/grub/misc.h (ARRAY_SIZE): New macro.
5752 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
5753 New macro.
5754 * loader/i386/linux.c (allocate_pages): Use free_pages().
5755 (grub_linux_unload): Don't use free_pages().
5756 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
5757 wrong index. Treat all other modes as text modes.
5758 (grub_cmd_linux): Initialize vid_mode unconditionally to
5759 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
5760
761319cf 5761 * commands/help.c (print_command_help): Use cmd->prio, not
5762 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
5763
ea761d40 57642009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 5765
ea761d40 5766 Parttool
5767
5768 * parttool/pcpart.c: new file
5769 * commands/parttool.c: likewise
5770 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
5771 (parttool_mod_SOURCES): new variable
5772 (parttool_mod_CFLAGS): likewise
5773 (parttool_mod_LDFLAGS): likewise
5774 (pcpart_mod_SOURCES): likewise
5775 (pcpart_mod_CFLAGS): likewise
5776 (pcpart_mod_LDFLAGS): likewise
7dd4a573 5777 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 5778 and parttool/pcpart.c
5779 * conf/i386-efi.rmk: likewise
5780 * conf/i386-ieee1275.rmk: likewise
5781 * conf/i386-pc.rmk: likewise
5782 * conf/powerpc-ieee1275.rmk: likewise
5783 * conf/sparc64-ieee1275.rmk: likewise
5784 * conf/x86_64-ieee1275.rmk: likewise
5785
05aaebfb 57862009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
5787
5788 Support for mtime and further expandability of dir command
5789
5790 * include/grub/lib/datetime.h: moved to ...
7dd4a573 5791 * include/grub/datetime.h: ... moved here and added
05aaebfb 5792 declaration of grub_unixtime2datetime. All users updated
7dd4a573 5793 * include/grub/fs.h: new syntax for dir and mtime functions in
5794 struct grub_fs
05aaebfb 5795 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
5796 and GRUB_FSHELP_FLAGS_MASK
5797 * commands/ls.c (grub_ls_list_files): Write mtime in long format
5798 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
5799 (grub_ext2_mtime): new function
5800 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
5801 (grub_hfsplus_mtime): new function
5802 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
5803 (GRUB_UFS_ATTR_FILE): likewise
5804 (GRUB_UFS_ATTR_LNK): likewise
5805 (struct grub_ufs_sblock): new fields mtime
5806 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
5807 all users updated
5808 (grub_ufs_dir): mtime support
5809 (grub_ufs_mtime): new function
5810 * fs/affs.c (grub_affs_dir): use new dir syntax
5811 * fs/afs.c (grub_afs_dir): likewise
5812 * fs/cpio.c (grub_cpio_dir): likewise
5813 * fs/fat.c (grub_fat_find_dir): likewise
5814 * fs/hfs.c (grub_hfs_dir): likewise
5815 * fs/iso9660.c (grub_iso9660_dir): likewise
5816 * fs/jfs.c (grub_jfs_dir): likewise
5817 * fs/minix.c (grub_minix_dir): likewise
5818 * fs/ntfs.c (grub_ntfs_dir): likewise
5819 * fs/reiserfs.c (grub_reiserfs_dir): likewise
5820 * fs/sfs.c (grub_sfs_dir): likewise
5821 * fs/xfs.c (grub_xfs_dir): likewise
5822 * util/hostfs.c (grub_hostfs_dir): likewise
5823 * lib/datetime.c: moved to ...
5824 * normal/datetime.c: ... moved here
5825 (grub_unixtime2datetime): new function
5826 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 5827 * normal/completion.c (iterate_dir): use new dir syntax
5828 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 5829 last modification time of a volume
7dd4a573 5830 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 5831 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 5832 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 5833 (normal_mod_SOURCES): likewise
5834 (datetime_mod_SOURCES): Removed lib/datetime.c
5835 * conf/i386-efi.rmk: likewise
7dd4a573 5836 * conf/i386-ieee1275.rmk: likewise
05aaebfb 5837 * conf/i386-pc.rmk: likewise
5838 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5839 * conf/sparc64-ieee1275.rmk: likewise
5840 * conf/x86_64-efi.rmk: likewise
05aaebfb 5841
8a7e1a14 58422009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
5843
5844 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 5845
5846 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 5847 on grub_fat_find_dir
5848 (grub_fat_find_dir): use grub_fat_iterate_dir
5849 (grub_fat_label): likewise
5850
04186a9c 58512009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
5852
7dd4a573 5853 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 5854 and command.h
5855 remove extraneous kernel_elf_HEADERS
5856
da4c0bb6 58572009-04-04 Bean <bean123ch@gnail.com>
5858
5859 * include/grub/util/misc.h: Add dummy function fsync for mingw.
5860
5861 * util/misc.c: Likewise.
5862
54ad9555 58632009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
5864
5865 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
5866 instead of grub_printf.
5867
7a6bf9f2 58682009-04-03 Robert Millan <rmh@aybabtu.com>
5869
5870 * loader/i386/linux.c (grub_linux_setup_video): Fill
5871 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
5872 values from `mode info' structure instead of hardcoded
5873 values.
5874
3fcc2083 58752009-04-01 Pavel Roskin <proski@gnu.org>
5876
5877 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
5878 unused now.
5879 * genmk.rb: Likewise.
5880 * configure.ac: Likewise.
5881
5ec9740b 58822009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
5883
5884 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
5885 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
5886
5270cec8 58872009-04-01 David S. Miller <davem@davemloft.net>
5888
5889 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 5890 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 5891 (grub_setjmp): Mark with 'returns_twice' attribute.
5892 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
5893 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
5894 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
5895
9c3dd854 58962009-04-01 Robert Millan <rmh@aybabtu.com>
5897
5898 Reapply fix from 2008-07-28 which was accidentally reverted; also
5899 perform the same fix to a similar check in same function.
5900
5901 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5902 with the same number are found, just use issue a warning with
5903 grub_dprintf(), as this error has been reported to be non-fatal.
5904
0d818b7e 59052009-03-31 Pavel Roskin <proski@gnu.org>
5906
5907 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
5908 for cross-compilation.
5909
95646d92 59102009-03-30 Robert Millan <rmh@aybabtu.com>
5911
5912 Fix i386-ieee1275 build.
5913
5914 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
5915 Remove declaration.
5916
6a003ed1 59172009-03-30 Pavel Roskin <proski@gnu.org>
5918
5919 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
5920 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
5921 zero-terminated, rely only on the strlen value. Fix comparison
5922 of strings differing in length.
5923
92f33540 59242009-03-30 Robert Millan <rmh@aybabtu.com>
5925
5926 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
5927 checking for abi version. Improve error messages on BIOS to notify
5928 user about `linux16' command.
5929
a8c48fd5 59302009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
5931
f968172e 5932 Leak fixes
a8c48fd5 5933
f968172e 5934 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
5935 in case of collision
5936 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 5937
9c323f09 59382009-03-29 Robert Millan <rmh@aybabtu.com>
5939
5940 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
5941 set `vid_mode' accordingly.
5942 (grub_linux_boot): Process `vid_mode' and set video mode.
5943
ae68f423 59442009-03-29 Robert Millan <rmh@aybabtu.com>
5945
5946 * util/grub.d/10_linux.in (linux_entry): New function.
5947 Factorize generation of Linux boot entries.
5948
5709cfc4 59492009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
5950
5951 Make the format of Environment Block plain text. The boot loader
5952 part is not tested well yet.
7dd4a573 5953
5709cfc4 5954 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
5955 (buffer): Removed.
5956 (envblk): Likewise.
5957 (usage): Remove "info" and "clear". Add "unset". Update the
5958 description of "set", as this does not delete variables any
5959 longer.
5960 (create_envblk_file): Complete rewrite.
5961 (open_envblk_file): Likewise.
5962 (cmd_info): Removed.
5963 (cmd_list): Likewise.
5964 (cmd_set): Likewise.
5965 (cmd_clear): Likewise.
5966 (list_variables): New function.
5967 (write_envblk): Likewise.
5968 (set_variables): Likewise.
5969 (unset_variables): Likewise.
5970 (main): Complete rewrite.
5971
5972 * commands/loadenv.c (buffer): Removed.
5973 (envblk): Likewise.
5974 (open_envblk_file): New function.
5975 (read_envblk_file): Complete rewrite.
5976 (grub_cmd_load_env): Likewise.
5977 (grub_cmd_list_env): Likewise.
5978 (struct blocklist): New struct.
5979 (free_blocklists): New function.
5980 (check_blocklists): Likewise.
5981 (write_blocklists): Likewise.
5982 (grub_cmd_save_env): Complete rewrite.
5983
5984 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
5985 a plain text signature.
5986 (GRUB_ENVBLK_MAXLEN): Removed.
5987 (struct grub_envblk): Complete rewrite.
5988 (grub_envblk_find): Removed.
5989 (grub_envblk_insert): Likewise.
5990 (grub_envblk_open): New prototype.
5991 (grub_envblk_set): Likewise.
5992 (grub_envblk_delete): Put const to VALUE.
5993 (grub_envblk_iterate): Put const to NAME and VALUE.
5994 (grub_envblk_close): New prototype.
5995 (grub_envblk_buffer): New inline function.
5996 (grub_envblk_size): Likewise.
5997
5998 * lib/envblk.c: Include grub/mm.h.
5999 (grub_env_find): Removed.
6000 (grub_envblk_open): New function.
6001 (grub_envblk_close): Likewise.
6002 (escaped_value_len): Likewise.
6003 (find_next_line): Likewise.
6004 (grub_envblk_insert): Removed.
6005 (grub_envblk_set): New function.
6006 (grub_envblk_delete): Complete rewrite.
6007 (grub_envblk_iterate): Likewise.
6008
a9368fd3 60092009-03-28 Robert Millan <rmh@aybabtu.com>
6010
6011 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
6012 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
6013 variables. Use 16-bit loader.
6014 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
6015 loader.
6016 * kern/i386/loader.S (grub_linux_boot): Rename to ...
6017 (grub_linux16_boot): ... this. Update all users.
6018 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
6019 (grub_linux_boot): ... this. Update all users.
6020
6021 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
6022 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
6023 commands to `linux16' and `initrd16'.
6024 (GRUB_MOD_FINI(linux)): Rename to ...
6025 (GRUB_MOD_FINI(linux16)): ... this.
6026
e4dd5a7e 60272009-03-24 Pavel Roskin <proski@gnu.org>
6028
6029 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
6030 not just for compilation.
6031
c04d6e05 60322009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
6033
6034 Move multiboot helper out of kernel
6035
6036 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
6037 `loader/i386/multiboot_helper.S'.
6038 * conf/i386-coreboot.rmk: Likewise
6039 * conf/i386-ieee1275.rmk: Likewise
6040
6041 * kern/i386/loader.S: Move multiboot helpers from here...
6042 * loader/i386/multiboot_helper.S: ...moved here
6043 * include/grub/i386/loader.h: Move declarations of multiboot
6044 helpers from here...
6045 * include/grub/i386/multiboot.h: ...moved here
6046 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
6047
42a5b3fc 60482009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
6049
6050 * kern/env.c (grub_env_context_open): Added an argument to specify
6051 whether a new context inherits exported variables from current
6052 one. This is useful when making a sandbox to interpret a config
6053 file.
6054 All callers updated.
6055
6056 * include/grub/env.h (grub_env_context_open): Updated the prototype.
6057
b28bbc4e 60582009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
6059
6060 * kern/env.c (grub_env_context_close): Fix memory leaks.
6061
f04f02e4 60622009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
6063
6064 * normal/main.c (grub_normal_execute): Added an argument
6065 BATCH to specify if an interactive interface should be provided
6066 after reading a config file.
6067 All callers updated.
6068 (read_command_list): Prevent being executed twice.
6069 (read_fs_list): Likewise.
6070
42a5b3fc 6071 * include/grub/normal.h (grub_normal_execute): Updated the
6072 prototype.
f04f02e4 6073
41473ac2 60742009-03-22 Pavel Roskin <proski@gno.org>
6075
fbc00b0c 6076 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
6077 _start.
6078 * kern/i386/pc/startup.S: Likewise.
6079 * kern/i386/efi/startup.S: Likewise.
6080 * kern/i386/ieee1275/startup.S: Likewise.
6081 * kern/i386/coreboot/startup.S: Likewise.
6082 * kern/x86_64/efi/startup.S: Likewise.
6083
41473ac2 6084 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
6085 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
6086 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
6087
2274cc8f 60882009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
6089
6090 Bugfixes in multiboot for bugs uncovered by solaris kernel.
6091
6092 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
6093 limit detection.
6094 Use vaddr of correct segment for entry_point.
6095
b1b797cb 60962009-03-21 Bean <bean123ch@gmail.com>
6097
6098 * commands/blocklist.c: Add include file <grub/command.h>, remove
6099 <grub/normal.h> and <grub/arg.h>.
6100 (grub_cmd_blocklist): Use the new command interface.
6101 (GRUB_MOD_INIT): Likewise.
6102 (GRUB_MOD_FINI): Likewise.
6103 * commands/boot.c: Likewise.
6104 * commands/cat.c: Likewise.
6105 * commands/cmp.c: Likewise.
6106 * commands/configfile.c: Likewise.
6107 * commands/crc.c: Likewise.
6108 * commands/echo.c: Likewise.
6109 * commands/halt.c: Likewise.
6110 * commands/handler.c: Likewise.
6111 * commands/hdparm.c: Likewise.
6112 * commands/help.c: Likewise.
6113 * commands/hexdump.c: Likewise.
6114 * commands/loadenv.c: Likewise.
6115 * commands/ls.c: Likewise.
6116 * commands/lsmmap.c: Likewise.
6117 * commands/lspci.c: Likewise.
6118 * commands/loadenv.c: Likewise.
6119 * commands/read.c: Likewise.
6120 * commands/reboot.c: Likewise.
6121 * commands/search.c: Likewise.
6122 * commands/sleep.c: Likewise.
6123 * commands/test.c: Likewise.
6124 * commands/usbtest.c: Likewise.
6125 * commands/videotest.c: Likewise.
6126 * commands/i386/cpuid.c: Likewise.
6127 * commands/i386/pc/halt.c: Likewise.
6128 * commands/i386/pc/play.c: Likewise.
6129 * commands/i386/pc/pxecmd.c: Likewise.
6130 * commands/i386/pc/vbeinfo.c: Likewise.
6131 * commands/i386/pc/vbetest.c: Likewise.
6132 * commands/ieee1275/suspend.c: Likewise.
6133 * disk/loopback.c: Likewise.
6134 * font/font_cmd.c: Likewise.
6135 * hello/hello.c: Likewise.
6136 * loader/efi/appleloader.c: Likewise.
6137 * loader/efi/chainloader.c: Likewise.
6138 * loader/i386/bsd.c: Likewise.
6139 * loader/i386/efi/linux.c: Likewise.
6140 * loader/i386/ieee1275/linux.c: Likewise.
6141 * loader/i386/linux.c: Likewise.
6142 * loader/i386/pc/chainloader.c: Likewise.
6143 * loader/i386/pc/linux.c: Likewise.
6144 * loader/powerpc/ieee1275/linux.c: Likewise.
6145 * loader/multiboot_loader.c: Likewise.
6146 * term/gfxterm.c: Likewise.
6147 * term/i386/pc/serial.c: Likewise.
6148 * term/terminfo.c: Likewise.
6149
6150 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
6151 * term/i386/pc/vga.c: Likewise.
6152 * video/readers/jpeg.c: Likewise.
6153 * video/readers/png.c: Likewise.
6154 * video/readers/tga.c: Likewise.
6155
6156 * util/grub-fstest (cmd_loopback): Removed.
6157 (cmd_blocklist): Likewise.
6158 (cmd_ls): Likewise.
6159 (grub_register_command): Likewise.
6160 (grub_unregister_command): Likewise.
6161 (execute_command): Use grub_command_find to locate command and execute
6162 it.
6163
6164 * include/grub/efi/chainloader.h: Removed.
6165 * loader/efi/chainloader_normal.c: Likewise.
6166 * loader/i386/bsd_normal.c: Likewise.
6167 * loader/i386/pc/chainloader_normal.c: Likewise.
6168 * loader/i386/pc/multiboot_normal.c: Likewise.
6169 * loader/linux_normal.c: Likewise.
6170 * loader/multiboot_loader_normal.c: Likewise.
6171 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6172
6173 * gencmdlist.sh: Scan new registration command grub_register_extcmd
6174 and grub_register_command_p1.
6175
6176 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
6177 kern/command.c, lib/arg.c and commands/extcmd.c.
6178 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
6179 (minicmd_mod_SOURCES): New variable.
6180 (minicmd_mod_CFLAGS): Likewise.
6181 (minicmd_mod_LDFLAGS): Likewise.
6182 (extcmd_mod_SOURCES): Likewise.
6183 (extcmd_mod_CFLAGS): Likewise.
6184 (extcmd_mod_LDFLAGS): Likewise.
6185 (boot_mod_SOURCES): Removed.
6186 (boot_mod_CFLAGS): Likewise.
6187 (boot_mod_LDFLAGS): Likewise.
6188
6189 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
6190 kern/corecmd.c.
6191 (kernel_img_HEADERS): Add command.h.
6192 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
6193 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
6194 and lib/arg.c.
6195 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
6196 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
6197 remove the corresponding normal mode command.
6198 (normal_mod_SOURCES): Remove normal/arg.c.
6199 * conf/i386-coreboot.rmk: Likewise.
6200 * conf/i386-efi.rmk: Likewise.
6201 * conf/i386-ieee1275.rmk: Likewise.
6202 * conf/powerpc-ieee1275.rmk: Likewise.
6203 * conf/x86_64-efi.rmk: Likewise.
6204
6205 * include/grub/arg.h: Move from here ...
6206 * include/grub/lib/arg.h: ... to here.
6207
6208 * normal/arg.c: Move from here ...
6209 * lib/arg.c: ... to here.
6210
6211 * commands/extcmd.c: New file.
6212 * commands/minicmd.c: Likewise.
6213 * include/grub/command.h: Likewise.
6214 * include/grub/extcmd.h: Likewise.
6215 * kern/command.c: Likewise.
6216 * kern/corecmd.c: Likewise.
6217
6218 * kern/list.c (grub_list_iterate): Return int instead of void.
6219 (grub_list_insert): New function.
6220 (grub_prio_list_insert): Likewise.
6221
6222 * kern/rescue.c (grub_rescue_command): Removed.
6223 (grub_rescue_command_list): Likewise.
6224 (grub_rescue_register_command): Likewise.
6225 (grub_rescue_unregister_command): Likewise.
6226 (grub_rescue_cmd_boot): Move to minicmd.c
6227 (grub_rescue_cmd_help): Likewise.
6228 (grub_rescue_cmd_info): Likewise.
6229 (grub_rescue_cmd_boot): Likewise.
6230 (grub_rescue_cmd_testload): Likewise.
6231 (grub_rescue_cmd_dump): Likewise.
6232 (grub_rescue_cmd_rmmod): Likewise.
6233 (grub_rescue_cmd_lsmod): Likewise.
6234 (grub_rescue_cmd_exit): Likewise.
6235 (grub_rescue_print_devices): Moved to corecmd.c.
6236 (grub_rescue_print_files): Likewise.
6237 (grub_rescue_cmd_ls): Likewise.
6238 (grub_rescue_cmd_insmod): Likewise.
6239 (grub_rescue_cmd_set): Likewise.
6240 (grub_rescue_cmd_unset): Likewise.
7d074e3c 6241 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 6242 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 6243 commands, remove grub_rescue_register_command calls.
b1b797cb 6244
7d074e3c 6245 * normal/command.c (grub_register_command): Removed.
b1b797cb 6246 (grub_unregister_command): Likewise.
6247 (grub_command_find): Likewise.
6248 (grub_iterate_commands): Likewise.
6249 (rescue_command): Likewise.
6250 (export_command): Moved to corecmd.c.
6251 (set_command): Removed.
6252 (unset_command): Likewise.
6253 (insmod_command): Likewise.
6254 (rmmod_command): Likewise.
6255 (lsmod_command): Likewise.
6256 (grub_command_init): Likewise.
6257
6258 * normal/completion.c (iterate_command): Use cmd->prio to check for
6259 active command.
6260 (complete_arguments): Use grub_extcmd_t structure to find options.
6261 (grub_normal_do_completion): Change function grub_iterate_commands to
6262 grub_command_iterate.
6263
6264 * normal/execute.c (grub_script_execute_cmd): No need to parse
6265 argument here.
6266
6267 * normal/main.c (grub_dyncmd_dispatcher): New function.
6268 (read_command_list): Register unload commands as dyncmd.
6269 (grub_cmd_normal): Use new command interface, register rescue,
6270 unregister normal at entry, register normal, unregister rescue at exit.
6271
6272 * include/grub/list.h (grub_list_test_t): New type.
6273 (grub_list_iterate): Return int instead of void.
6274 (grub_list_insert): New function.
6275 (GRUB_AS_NAMED_LIST_P): New macro.
6276 (GRUB_AS_PRIO_LIST): Likewise.
6277 (GRUB_AS_PRIO_LIST_P): Likewise.
6278 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
6279 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
6280 (grub_prio_list): New structure.
6281 (grub_prio_list_insert): New function.
6282 (grub_prio_list_remove): New inline function.
6283
6284 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
6285 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
6286 (GRUB_COMMAND_FLAG_MENU): Likewise.
6287 (GRUB_COMMAND_FLAG_BOTH): Likewise.
6288 (GRUB_COMMAND_FLAG_TITLE): Likewise.
6289 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
6290 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
6291 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
6292 (grub_command): Likewise.
6293 (grub_register_command): Likewise.
6294 (grub_command_find): Likewise.
6295 (grub_iterate_commands): Likewise.
6296 (grub_command_init): Likewise.
6297 (grub_arg_parse): Likewise.
6298 (grub_arg_show_help): Likewise.
6299
6300 * include/grub/rescue.h (grub_rescue_register_command): Removed.
6301 (grub_rescue_unregister_command): Likewise.
6302
6303 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
6304 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
6305 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
6306
6307 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
6308 grub_rescue_cmd_initrd.
6309 * include/grub/i386/loader.h: Likewise.
6310 * include/grub/x86_64/loader.h: Likewise.
6311
6312 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
6313
1f4147aa 63142009-03-21 Bean <bean123ch@gmail.com>
6315
6316 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
6317 instead of stat in mingw environment.
6318
6319 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
6320
6321 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
6322
6323 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
6324 AC_CONFIG_LINKS.
6325
2156d5ba 63262009-03-21 Bean <bean123ch@gmail.com>
6327
6328 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
6329 out of range error.
6330
177b82ca 63312009-03-18 Michel Dänzer <michel@daenzer.net>
6332
6333 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
6334 checking inode flags for EXT4_EXTENTS_FLAG.
6335
14aad807 63362009-03-18 Robert Millan <rmh@aybabtu.com>
6337
6338 * loader/i386/linux.c: Include `<grub/video.h>' and
6339 `<grub/i386/pc/vbe.h>'..
6340 (grub_linux_setup_video): New function. Loosely based on the EFI one.
6341 (grub_linux32_boot): Attempt to configure video settings with
6342 grub_linux_setup_video().
6343 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
6344 to avoid grub_console_fini() which would step out of graphical mode
6345 unconditionally.
6346
8cf83a27 63472009-03-14 Robert Millan <rmh@aybabtu.com>
6348
6349 Fix build on powerpc.
6350 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
6351
40164e75 63522009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
6353
6354 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
6355 background image command.
6356
c58bc32a 63572009-03-12 Colin D Bennett <colin@gibibit.com>
6358
6359 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
6360 (grub_gfxterm_putchar): Extract pairs of identical calls to
6361 draw_cursor out of conditional blocks.
6362
5415144a 63632009-03-11 Pavel Roskin <proski@gnu.org>
6364
6365 * fs/hfs.c (grub_hfs_strncasecmp): New function.
6366 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
6367
6394042e 63682009-03-11 Robert Millan <rmh@aybabtu.com>
6369
6370 * loader/i386/multiboot_elfxx.c
6371 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
6372
b7b50e5f 63732009-03-11 Felix Zielcke <fzielcke@z-51.de>
6374
6375 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
6376 `kern/handler.c'.
6377
1ca7fc96 63782009-03-11 Robert Millan <rmh@aybabtu.com>
6379
6380 * loader/i386/multiboot.c (code_size): New variable.
6381 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 6382 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 6383 4-byte alignment to MBI and others by increasing
7d074e3c 6384 `boot_loader_name_length' appropriately.
1ca7fc96 6385
6386 * loader/i386/multiboot_elfxx.c
6387 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
6388
a83ea1d2 63892009-03-09 Felix Zielcke <fzielcke@z-51.de>
6390
6391 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
6392 `fs/ext2.c'.
6393
aa9f3bff 63942009-03-08 Robert Millan <rmh@aybabtu.com>
6395
6396 Make loader/i386/linux.c usable on i386-pc again.
6397
6398 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
6399 memory to heap.
6400 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
6401 `#error' stanza.
6402
d8b3b60e 64032009-03-07 Bean <bean123ch@gmail.com>
6404
6405 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
6406 allocation.
6407
b362c9e9 64082009-03-06 Robert Millan <rmh@aybabtu.com>
6409
6410 Fix display issue on terminals with screen size other than 80x25
6411 (e.g. gfxterm with resolution higher than 640x480).
6412
6413 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 6414 position relative to the center of the terminal instead of relying
b362c9e9 6415 on a hardcoded offset.
6416
9304eef1 64172009-03-04 Robert Millan <rmh@aybabtu.com>
6418
6419 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
6420 installed.
6421
6422 * Makefile.in (host_kernel): New variable.
6423 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
6424 scripts instead of just the windows one.
6425 * configure.ac: Initialize and AC_SUBST `host_kernel'.
6426
eabc95fb 64272009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 6428
6429 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
6430 `kern/handler.c'.
6431 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6432 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6433 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6434 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6435 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6436 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6437
ceb1223c 64382009-03-04 Felix Zielcke <fzielcke@z-51.de>
6439
6440 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
6441 or if there's no space for the disk label and print the partition number on a
6442 invalid magic.
6443
4910684a 64442009-03-04 Felix Zielcke <fzielcke@z-51.de>
6445
6446 * util/misc.c: Include <time.h>.
6447 (grub_millisleep): New function.
6448
7e9ca17a 64492009-03-04 Bean <bean123ch@gmail.com>
6450
6451 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
6452 another option -mno-red-zone.
6453
6454 * commands/handler.c: Change module description.
6455
6456 * kern/handler.c: Add missing space at the end of description line.
6457
6458 * kern/list.c: Likewise.
6459
f501677c 64602009-03-03 Robert Millan <rmh@aybabtu.com>
6461
6462 Move more components to the relocation area, and fix mbi pointer
6463 handling to use the destination rather than the origin (thanks to
6464 Vladimir Serbinenko for spotting).
6465
6466 * loader/i386/multiboot.c (mbi_dest): New variable.
6467 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
6468 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
6469 relocation area.
6470
9902d047 64712009-03-01 Bean <bean123ch@gmail.com>
6472
50fb7002 6473 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 6474 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
6475 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
6476 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
6477
6478 * loader/i386/efi/linux.c (acpi_guid): New variable.
6479 (acpi_guid): Likewise.
6480 (EBDA_SEG_ADDR): New constant.
6481 (LOW_MEM_ADDR): Likewise.
6482 (FAKE_EBDA_SEG): Likewise.
6483 (fake_bios_data): New function.
6484 (grub_linux_boot): Call fake_bios_data.
6485
71b9f361 64862009-03-01 Bean <bean123ch@gmail.com>
6487
6488 * commands/terminal.c: Removed.
6489
6490 * commands/handler.c: New file.
6491
6492 * include/grub/list.h: Likewise.
6493
6494 * include/grub/handler.h: Likewise.
6495
6496 * kern/list.c: Likewise.
6497
6498 * kern/handler.c: Likewise.
6499
6500 * kern/term.h: Include header file <grub/handler.h>.
6501 (grub_term_input): Move next field to the beginning.
6502 (grub_term_output): Likewise.
6503 (grub_term_input_class): New variable.
6504 (grub_term_output_class): Likewise.
6505 (grub_term_register_input): Changed to inline function.
6506 (grub_term_register_output): Likewise.
6507 (grub_term_unregister_input): Likewise.
6508 (grub_term_unregister_output): Likewise.
6509 (grub_term_set_current_input): Likewise.
6510 (grub_term_set_current_output): Likewise.
6511 (grub_term_get_current_input): Likewise.
6512 (grub_term_get_current_output): Likewise.
6513 (grub_term_iterate_input): Removed.
6514 (grub_term_iterate_output): Likewise.
6515
6516 * kern/term.c (grub_term_list_input): Removed.
6517 (grub_term_list_output): Likewise.
6518 (grub_term_input_class): New variable.
6519 (grub_term_output_class): Likewise.
50fb7002 6520 (grub_cur_term_input): Change variable as macro.
71b9f361 6521 (grub_cur_term_output): Likewise.
6522 (grub_term_register_input): Removed.
6523 (grub_term_register_output): Likewise.
6524 (grub_term_unregister_input): Likewise.
6525 (grub_term_unregister_output): Likewise.
6526 (grub_term_set_current_input): Likewise.
6527 (grub_term_set_current_output): Likewise.
6528 (grub_term_iterate_input): Likewise.
6529 (grub_term_iterate_output): Likewise.
6530 (grub_term_get_current_input): Likewise.
6531 (grub_term_get_current_output): Likewise.
6532
6533 * util/grub-editenv.c: Include header file <grub/handler.h>.
6534 (grub_term_get_current_input): Removed.
6535 (grub_term_get_current_output): Likewise.
6536 (grub_term_input_class): New variable.
50fb7002 6537 (grub_term_output_class): Likewise.
71b9f361 6538
6539 * util/grub-fstest.c (grub_term_get_current_input): Removed.
6540 (grub_term_get_current_output): Likewise.
6541 (grub_term_input_class): New variable.
50fb7002 6542 (grub_term_output_class): Likewise.
71b9f361 6543
6544 * util/grub-probe.c (grub_term_get_current_input): Removed.
6545 (grub_term_get_current_output): Likewise.
6546 (grub_term_input_class): New variable.
50fb7002 6547 (grub_term_output_class): Likewise.
71b9f361 6548
6549 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
6550 (grub_term_get_current_output): Likewise.
6551 (grub_term_input_class): New variable.
50fb7002 6552 (grub_term_output_class): Likewise.
71b9f361 6553
6554 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
6555 (terminal_mod_SOURCES): Likewise.
6556 (terminal_mod_CFLAGS): Likewise.
6557 (terminal_mod_LDFLAGS): Likewise.
6558
6559 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
6560 handler.c.
6561 (kernel_img_SOURCES): Add list.c and handler.c.
6562 (kernel_img_HEADERS): Add list.h and handler.h.
6563
6564 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
6565 handler.c.
6566 (kernel_mod_SOURCES): Add list.c and handler.c.
6567 (kernel_mod_HEADERS): Add list.h and handler.h.
6568
6569 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
6570 handler.c.
6571 (kernel_elf_SOURCES): Add list.c and handler.c.
6572 (kernel_elf_HEADERS): Add list.h and handler.h.
6573
6574 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
6575 handler.c.
6576 (kernel_elf_SOURCES): Add list.c and handler.c.
6577 (kernel_elf_HEADERS): Add list.h and handler.h.
6578
6579 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
6580 handler.c.
6581 (kernel_mod_SOURCES): Add list.c and handler.c.
6582 (kernel_mod_HEADERS): Add list.h and handler.h.
6583
6584 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
6585 handler.c.
6586 (kernel_elf_SOURCES): Add list.c and handler.c.
6587 (kernel_elf_HEADERS): Add list.h and handler.h.
6588
8a31787f 65892009-02-27 Robert Millan <rmh@aybabtu.com>
6590
6591 Factorize elf32 / elf64 code in Multiboot loader. This will
6592 prevent it from getting out of sync again.
6593
6594 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
6595 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
6596 grub_multiboot_load_elf64): Move from here ...
6597 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
6598 grub_multiboot_load_elf): ... to here (new file).
6599
51cd3dfc 66002009-02-27 Robert Millan <rmh@aybabtu.com>
6601
6602 * util/grub.d/10_linux.in: Rename "single-user mode" to
6603 "recovery mode".
6604
6e8c9c3a 66052009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
6606
6607 Don't leak in SCSI code.
6608 * disk/scsi.c (grub_scsi_close): free `scsi'.
6609
4b6bf4f9 66102009-02-27 Robert Millan <rmh@aybabtu.com>
6611
6612 * loader/i386/pc/multiboot.c: Move from here ...
6613 * loader/i386/multiboot.c: ... to here. Update all users.
6614
b9413424 66152009-02-27 Robert Millan <rmh@aybabtu.com>
6616
6617 Patch from Alexandre Bique <bique.alexandre@gmail.com>
6618 * util/i386/pc/grub-setup.c (setup): Fix directory path.
6619
50fb7002 66202009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 6621
6622 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
6623 b-tree.
6624
8cc50345 66252009-02-27 Robert Millan <rmh@aybabtu.com>
6626
6627 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
6628 `0x' qualifier as 0 when base is specified as parameter).
6629
6e09b8b7 66302009-02-24 Bean <bean123ch@gmail.com>
6631
6632 * configure.ac: Check for -mcmodel=large in x86_64 target.
6633
6634 * include/grub/efi/api.h (efi_call_10): New macro.
6635 (efi_wrap_10): New function.
6636
6637 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
6638 (GRUB_PE32_REL_BASED_HIGH): Likewise.
6639 (GRUB_PE32_REL_BASED_LOW): Likewise.
6640 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
6641 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
6642 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
6643 (GRUB_PE32_REL_BASED_SECTION): Likewise.
6644 (GRUB_PE32_REL_BASED_REL): Likewise.
6645 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
6646 (GRUB_PE32_REL_BASED_DIR64): Likewise.
6647 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
6648
6649 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
6650 issue.
6651
6652 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
6653 (efi_wrap_10): New function.
6654
6655 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
6656
6657 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
6658 MB/MBP model (NV chipset).
6659 (devdata_devs): Add devpath_5 to the list.
6660
6661 * load/i386/efi/linux.c (video_base): Remove variable.
6662 (RGB_MASK): New macro.
6663 (RGB_MAGIC): Likewise.
6664 (LINE_MIN): Likewise.
6665 (LINE_MAX): Likewise.
6666 (FBTEST_STEP): Likewise.
6667 (FBTEST_COUNT): Likewise.
6668 (fb_list): New variable.
6669 (grub_find_video_card): Remove function.
6670 (find_framebuf): New function.
6671 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
6672 line length.
6673
6674 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
6675 problem for x86_64.
6676
74b21bee 66772009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
6678
6679 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
6680
6681 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
6682 coding tool name.
6683
a455f472 66842009-02-22 Robert Millan <rmh@aybabtu.com>
6685
6686 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
6687 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
6688 in our relocation, instead of using it directly from heap. Also
6689 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
6690
6374daf3 66912009-02-21 Robert Millan <rmh@aybabtu.com>
6692
6693 Implement USB keyboard support (based on patch by Marco Gerards)
6694
6695 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
6696 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
6697 (usb_keyboard_mod_LDFLAGS): New variables.
6698
6699 * term/usb_keyboard.c: New file.
6700
8fa4ea70 67012009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
6702
6703 Corrected wrong declaration
6704
6705 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
6706
353976ac 67072009-02-14 Christian Franke <franke@computer.org>
6708
6709 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
6710 (grub_lspci_iter): Print class code and programming interface byte.
6711
6aa1169b 67122009-02-14 Christian Franke <franke@computer.org>
6713
6714 * gendistlist.sh: Ignore `.svn' directories.
6715
265372ca 67162009-02-14 Felix Zielcke <fzielcke@z-51.de>
6717
6718 * fs/fat.c: Add 2009 to Copyright line.
6719
9ff516f3 67202009-02-14 Christian Franke <franke@computer.org>
6721
6722 * commands/hdparm.c: New file. Provides `hdparm' command
6723 which sends ATA commands via grub_disk_ata_pass_through ().
6724
6725 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
6726
6727 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
6728 and <grub/cpu/io.h> to include/grub/ata.h.
6729 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
6730 (GRUB_CDROM_SECTOR_SIZE): Remove.
6731 (GRUB_ATA_*): Move to include/grub/ata.h.
6732 (GRUB_ATAPI_*): Likewise.
6733 (enum grub_ata_commands): Likewise.
6734 (enum grub_ata_timeout_milliseconds): Likewise.
6735 (struct grub_ata_device): Likewise.
6736 (grub_ata_regset): Likewise.
6737 (grub_ata_regget): Likewise.
6738 (grub_ata_regset2): Likewise.
6739 (grub_ata_regget2): Likewise.
6740 (grub_ata_check_ready): Likewise.
6741 (grub_ata_wait_not_busy): Remove static, exported in
6742 include/grub/ata.h.
6743 (grub_ata_wait_drq): Likewise.
6744 (grub_ata_pio_read): Likewise.
6745
6746 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
6747 function for hdparm.mod.
6748
6749 * include/grub/ata.h: New file, contains declarations from
6750 disk/ata.c.
6751 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
6752
6753 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
6754 (grub_disk_ata_pass_through): New exported variable.
6755
6756 * kern/disk.c (grub_disk_ata_pass_through): New variable.
6757
772e23da 67582009-02-13 Colin D Bennett <colin@gibibit.com>
6759
6760 Support multiple fallback entries, and provide an API to support
6761 executing default+fallback menu entries. Renamed the `terminal' menu
6762 viewer to `text'.
6763
6764 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
6765 variable declaration.
6766 (grub_menu_execute_callback): New structure declaration.
6767 (grub_menu_execute_callback_t): New typedef.
6768 (grub_menu_execute_with_fallback): New function declaration.
6769 (grub_menu_get_entry): Likewise.
6770 (grub_menu_get_timeout): Likewise.
6771 (grub_menu_set_timeout): Likewise.
6772
6773 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
6774
6775 * normal/menu.c (grub_wait_after_message): Moved to
6776 `normal/menu_text.c'.
6777 (draw_border): Likewise.
6778 (print_message): Likewise.
6779 (print_entry): Likewise.
6780 (print_entries): Likewise.
6781 (grub_menu_init_page): Likewise.
6782 (get_entry_number): Likewise.
6783 (print_timeout): Likewise.
6784 (run_menu): Likewise.
6785 (grub_menu_execute_entry): Likewise.
6786 (show_text_menu): Likewise.
6787 (get_and_remove_first_entry_number): New function.
6788 (grub_menu_execute_with_fallback): Likewise.
6789 (get_entry): Renamed to ...
6790 (grub_menu_get_entry): .. this and made it global.
6791 (get_timeout): Renamed to ...
6792 (grub_menu_get_timeout): ... this and made it global.
6793 (set_timeout): Renamed to ...
6794 (grub_menu_set_timeout): ... this and made it global.
6795 (grub_normal_terminal_menu_viewer): Renamed to ...
6796 (grub_normal_text_menu_viewer): ... this.
6797
6798 * normal/menu_text.c: New file. Extracted text-menu-specific code
6799 from normal/menu.c.
6800
6801 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
6802 (normal_mod_SOURCES): Likewise.
6803
6804 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6805 (normal_mod_SOURCES): Likewise.
6806
6807 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6808 (normal_mod_SOURCES): Likewise.
6809
6810 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
6811 (normal_mod_SOURCES): Likewise.
6812
6813 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6814 (normal_mod_SOURCES): Likewise.
6815
6816 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6817 (normal_mod_SOURCES): Likewise.
6818
6819 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6820 (normal_mod_SOURCES): Likewise.
6821
16ac430e 68222009-02-11 Robert Millan <rmh@aybabtu.com>
6823
6824 * util/grub.d/00_header.in: Update old reference to `font' command.
6825
06ff20fc 68262009-02-10 Felix Zielcke <fzielcke@z-51.de>
6827
6828 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
6829
6830 Based on patch from Javier Martín.
6831
96da9407 68322009-02-09 Felix Zielcke <fzielcke@z-51.de>
6833
6834 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 6835 to avoid false positives with FAT.
96da9407 6836 (grub_fstest_SOURCES): Likewise.
6837 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6838 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6839 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6840 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6841 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6842 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6843
6dca6fe4 68442009-02-09 Felix Zielcke <fzielcke@z-51.de>
6845
06ff20fc 6846 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 6847 bpb.version_specific.fat12_or_fat16.fstype and
6848 bpb.version_specific.fat32.fstype.
6849
2550c62f 68502009-02-08 Robert Millan <rmh@aybabtu.com>
6851
be110b30 6852 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 6853
56978920 68542009-02-08 Robert Millan <rmh@aybabtu.com>
6855
6856 * Makefile.in (host_os, host_cpu): New variables.
6857 (target_os): Remove. Update all users.
6858
d64399b5 68592009-02-08 Marco Gerards <marco@gnu.org>
6860
6861 * Makefile.in (enable_grub_emu_usb): New variable.
6862 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
6863 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
6864 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
6865 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
6866 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
6867 `usbtest.mod' and `usbms.mod'.
6868 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
6869 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
6870 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
6871 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
6872 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
6873 variables.
6874
6875 * disk/usbms.c: New file.
6876
6877 * include/grub/usb.h: Likewise.
6878
6879 * include/grub/usbtrans.h: Likewise.
6880
6881 * include/grub/usbdesc.h: Likewise.
6882
6883 * bus/usb/usbtrans.c: Likewise.
6884
6885 * bus/usb/ohci.c: Likewise.
6886
6887 * bus/usb/uhci.c: Likewise.
6888
6889 * bus/usb/usbhub.c: Likewise.
6890
6891 * bus/usb/usb.c: Likewise.
6892
6893 * commands/usbtest.c: Likewise.
6894
6895 * util/usb.c: Likewise.
50fb7002 6896
d64399b5 6897 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
6898
6899 * configure.ac: Test for libusb presence.
50fb7002 6900
d64399b5 6901 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
6902
2b40d6bb 69032009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
6904
6905 * kern/mm.c: Add more comments.
6906
73a4ce81 69072009-02-08 Robert Millan <rmh@aybabtu.com>
6908
6909 Patch from Javier Martín.
6910 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
6911 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
6912
f821ce59 69132009-02-08 Robert Millan <rmh@aybabtu.com>
6914
6915 * fs/cpio.c: Split tar functionality to ...
6916 * fs/tar.c: ... here (new file). Update all users.
6917
aebfc4b0 69182009-02-07 Robert Millan <rmh@aybabtu.com>
6919
6920 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
6921 backward-incompatible features.
6922
6923 Based on patch from Javier Martín, with some adjustments.
6924
50fb7002 69252009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 6926
6927 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
6928
0bb5115e 69292009-02-07 Robert Millan <rmh@aybabtu.com>
6930
6931 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
6932 position of `disk/lvm.c' to ensure grub_init_all() always picks it
6933 after the RAID stuff.
6934
38a0f8e7 69352009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
6936
50fb7002 6937 Fixes problem when running vbetest command as reported by
38a0f8e7 6938 Vladimir Serbinenko <phcoder@gmail.com>.
6939
6940 * (grub_vbe_set_video_mode): Fixed problem with text modes.
6941
3143cc1c 69422009-02-04 Felix Zielcke <fzielcke@z-51.de>
6943
6944 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
6945 /dev/md/NpN style mdraid devices.
6946
9cba6fce 69472009-02-03 Felix Zielcke <fzielcke@z-51.de>
6948
6949 * util/unifont2pff.rb: Remove.
6950
e507a2c1 69512009-02-03 Felix Zielcke <fzielcke@z-51.de>
6952
6953 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
6954 `#'.
6955
d2c2b4cd 69562009-02-03 Felix Zielcke <fzielcke@z-51.de>
6957
6958 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
6959 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6960 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6961 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6962 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6963 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6964 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6965
b4315fb0 69662009-02-02 Christian Franke <franke@computer.org>
6967
6968 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
6969
de3aa260 69702009-02-01 Felix Zielcke <fzielcke@z-51.de>
6971
7c3ff286 6972 * INSTALL: Note that we now require at least autoconf 2.59 and
6973 that LZO is optional.
de3aa260 6974
825a182b 69752009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
6976
6977 Base on patch on bug #24154 created by Tomas Tintera
6978 <trosos@seznam.cz>.
6979
6980 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
6981
a69ef770 69822009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
6983
7c3ff286 6984 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 6985 <bero@arklinux.org>.
6986
6987 * normal/parser.y (script_init): Add missing semicolon.
6988
6fa42fa6 69892009-01-31 Colin D Bennett <colin@gibibit.com>
6990
7c3ff286 6991 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 6992 (free_menu_entry_classes): Added.
6993 (grub_normal_menu_addentry): Added class property handling.
6994 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
6995 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
6996
6997 * normal/menu_viewer.c: New file.
6998
6999 * normal/menu.c (run_menu_entry): Renamed to ...
7000 (grub_menu_execute_entry): ... this and made it as global.
7001 (grub_menu_run): Renamed to ...
7002 (show_text_menu): ... this and made it local.
7003 (show_text_menu): Adapt to new function names.
7004 (grub_normal_terminal_menu_viewer): New global variable.
7005
7006 * include/grub/menu.h: New file.
7007
7008 * include/grub/menu_viewer.h: New file.
7009
7010 * include/grub/normal.h: Added include to grub/menu.h.
7011 (grub_menu_entry): Moved to include/grub/menu.h.
7012 (grub_menu_entry_t): Likewise.
7013 (grub_menu): Likewise.
7014 (grub_menu_t): Likewise.
7015 (grub_normal_terminal_menu_viewer): Added.
7016 (grub_menu_execute_entry): Likewise.
7017 (grub_menu_run): Removed.
7018
7019 * DISTLIST: Added include/grub/menu.h.
7020 Added include/grub/menu_viewer.h.
7021 Added normal/menu_viewer.c.
7022
70232009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
7024
7025 * normal/execute.c (grub_script_execute_menuentry): Changed to use
7026 arglist for menutitle arguments.
7027
7028 * normal/main.c (grub_normal_menu_addentry): Likewise.
7029
7030 * normal/parser.y (menuentry): Likewise.
7031
7032 * normal/script.c (grub_script_create_cmdmenu): Likewise.
7033
7034 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
7035 (grub_script_create_cmdmenu): Likewise.
7036
7037 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
7038
7039 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
7040 changes.
7041
7042 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
7043
7044 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
7045
7046 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
7047
7048 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
7049
7050 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
7051
7052 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
7053
56192c23 70542009-01-30 Christian Franke <franke@computer.org>
7055
7056 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
7057 in option help text.
7058
d72521b3 70592009-01-27 Pavel Roskin <proski@gnu.org>
7060
7061 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
7062
994b5e84 70632009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
7064
7065 * commands/lsmmap.c: Add include to grub/machine/memory.h.
7066
7067 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
7068
7069 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
7070 unregister function.
7071
6a7eab2c 70722009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
7073
7074 * disk/scsi.c (grub_scsi_read): Fix sign problem.
7075
7076 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
7077
7078 * util/grub-mkfont.c (usage): Fix typo.
7079
7080 * util/elf/grub-mkimage.c (load_modules): Fix warning.
7081
1806b56e 70822009-01-26 Daniel Mierswa <impulze@impulze.org>
7083
3fb18f09 7084 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
7085
336e1fb9 7086 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
7087
1806b56e 7088 * kern/misc.c (grub_strcasecmp): New function.
7089 (grub_strcasecmp): Use grub_size_t instead of int for length.
7090 Fix return value.
7091 * include/grub/misc.h: Update function prototypes.
7092
580b2a0f 70932009-01-26 Robert Millan <rmh@aybabtu.com>
7094
7095 * configure.ac: Fix cross-compilation check.
ef257b36 7096
d31c24f1 70972009-01-22 Christian Franke <franke@computer.org>
7098
7099 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
7100 (precision) digit string. Allow `.format2' without `format1' (width).
7101 Limit input chars for `%s' output to `format2' if specified. This is
7102 compatible with standard printf ().
7103
3138b44c 71042009-01-22 Christian Franke <franke@computer.org>
7105
7106 * disk/ata.c (grub_ata_wait_status): Replace by ...
7107 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
7108 other status bits may be invalid while BSY is asserted.
7109 (grub_ata_check_ready): New function.
7110 (grub_ata_cmd): Removed.
7111 (grub_ata_wait_drq): New function.
7112 (grub_ata_strncpy): Remove inline.
7113 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
7114 and error check now done by grub_ata_wait_drq ().
7115 (grub_ata_pio_write): Likewise.
7116 (grub_atapi_identify): Set DEV before check for !BSY. Use
7117 grub_ata_wait_drq () to wait for data.
7118 (grub_ata_device_initialize): Add status register check to
7119 detect missing SATA slave devices. Add debug messages.
7120 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
7121 (grub_atapi_packet): Set DEV before check for !BSY. Replace
7122 transfer loop by grub_ata_pio_write ().
7123 (grub_ata_identify): Set DEV before check for !BSY. Use
7124 grub_ata_wait_drq () to wait for data.
ef257b36 7125 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 7126 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
7127 read/write in one loop. Fix invalid command on write. Fix incomplete
7128 command on (size % batch) == 0. Add missing error check after write of
7129 last block. Add debug messages.
7130 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
7131
59a64ef6 71322009-01-19 Christian Franke <franke@computer.org>
7133
7134 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
7135 (GRUB_ATAPI_IREASON_*): Likewise.
7136 (grub_ata_pio_write): Fix timeout error return.
7137 (grub_atapi_identify): Add grub_ata_wait () after cmd.
7138 (grub_atapi_wait_drq): New function.
7139 (grub_atapi_packet): New parameter `size'.
7140 Use grub_atapi_wait_drq () and direct write instead of
7141 grub_ata_pio_write ().
7142 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
7143 reads the number of bytes requested by the device for each DRQ
7144 assertion.
7145 (grub_atapi_write): Remove old implementation, return not
7146 implemented instead.
7147
1cfe20b3 71482009-01-19 Christian Franke <franke@computer.org>
7149
7150 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
7151 of 512 to calculate data size.
7152 (grub_scsi_read12): Likewise.
7153 (grub_scsi_write10): Likewise.
7154 (grub_scsi_write12): Likewise.
7155 (grub_scsi_read): Adjust size according to blocksize.
7156 Add checks for invalid blocksize and unaligned transfer.
7157
bee5fe5d 71582009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
7159
7160 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
7161
ef257b36 7162 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 7163 width glyphs.
7164
3e643f8c 71652009-01-19 Robert Millan <rmh@aybabtu.com>
7166
7167 * config.guess: Update to latest version from config git.
7168 * config.sub: Likewise.
7169
4fa80998 71702009-01-17 Felix Zielcke <fzielcke@z-51.de>
7171
7172 * Makefile.in: Change font compilation to use new grub-mkfont instead
7173 of java version.
7174
7175 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
7176 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
7177 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
7178 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
7179 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
7180 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
7181 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
7182 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
7183 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
7184
7086085b 71852009-01-16 Christian Franke <franke@computer.org>
7186
7187 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
7188 (enum grub_ata_timeout_milliseconds): New enum.
7189 (grub_ata_wait_status): Add parameter milliseconds.
7190 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
7191 recovery from timed-out commands.
7192 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
7193 return grub_errno instead of REG_ERROR.
7194 (grub_ata_pio_write): Add parameter milliseconds.
7195 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
7196 Pass milliseconds to grub_ata_wait_status () and
7197 grub_ata_pio_read ().
7198 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
7199 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
7200 grub_ata_wait_status (). Fix IDENTIFY timeout check.
7201 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
7202 It is not suitable for device detection, because DEV bit is ignored,
7203 the command may run too long, and not all devices set the signature
7204 properly.
7205 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
7206 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
7207 Fix device selection, DEV bit must be set first to address the registers
7208 of the correct device.
7209 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
7210 grub_ata_pio_read/write ().
7211 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
7212 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
7213
4a412913 72142009-01-13 Carles Pina i Estany <carles@pina.cat>
7215
7216 * util/grub-editenv.c (main): Use fseeko(), not fseek().
7217
7795c55e 72182009-01-13 Bean <bean123ch@gmail.com>
d913988c 7219
7220 * util/grub-mkfont.c (write_font): forget to remove some debug code.
7221
7795c55e 72222009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 7223
7224 * Makefile.in: (enable_grub_mkfont): New variable.
7225 (freetype_cflags): Likewise.
7226 (freetype_libs): Likewise.
7227
7228 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
7229 (grub_mkfont_SOURCES): New variable.
7230 (grub_mkfont_CFLAGS): Likewise.
7231 (grub_mkfont_LDFLAGS): Likewise.
7232
7233 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
7234 library if `--enable-grub-mkfont' is requested.
7235 (enable_grub_mkfont): New variable.
7236 (freetype_cflags): Likewise.
7237 (freetype_libs): Likewise.
7238
7239 * util/grub-mkfont.c: New file.
7240
093af1fe 72412009-01-12 Christian Franke <franke@computer.org>
7242
7243 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
7244 mode check. Fix setting of compat_use[].
7245
f36cc108 72462009-01-10 Robert Millan <rmh@aybabtu.com>
7247
7248 Update a few copyright years which we forgot to do in 2008 (only for
7249 files whose changes made in 2008 were copyright-significant)
7250
7251 * Makefile.in: Add 2008 to Copyright line.
7252 * disk/ieee1275/ofdisk.c: Likewise.
7253 * disk/efi/efidisk.c: Likewise.
7254 * kern/dl.c: Likewise.
7255 * kern/sparc64/ieee1275/init.c: Likewise.
7256 * kern/mm.c: Likewise.
7257 * kern/efi/mm.c: Likewise.
7258 * boot/i386/pc/boot.S: Likewise.
7259 * genfslist.sh: Likewise.
7260 * fs/iso9660.c: Likewise.
7261 * fs/hfs.c: Likewise.
7262 * fs/jfs.c: Likewise.
7263 * fs/minix.c: Likewise.
7264 * fs/ufs.c: Likewise.
7265 * gensymlist.sh.in: Likewise.
7266 * genkernsyms.sh.in: Likewise.
7267 * include/grub/misc.h: Likewise.
7268 * include/grub/types.h: Likewise.
7269 * include/grub/symbol.h: Likewise.
7270 * include/grub/elf.h: Likewise.
7271 * include/grub/kernel.h: Likewise.
7272 * include/grub/disk.h: Likewise.
7273 * include/grub/dl.h: Likewise.
7274 * include/grub/i386/linux.h: Likewise.
7275 * include/grub/i386/pc/biosdisk.h: Likewise.
7276 * include/grub/efi/api.h: Likewise.
7277 * include/grub/efi/pe32.h: Likewise.
7278 * include/grub/util/misc.h: Likewise.
7279 * normal/execute.c: Likewise.
7280 * normal/arg.c: Likewise.
7281 * normal/completion.c: Likewise.
7282 * normal/lexer.c: Likewise.
7283 * normal/parser.y: Likewise.
7284 * normal/misc.c: Likewise.
7285 * commands/i386/pc/vbeinfo.c: Likewise.
7286 * commands/hexdump.c: Likewise.
7287 * commands/terminal.c: Likewise.
7288 * commands/ls.c: Likewise.
7289 * commands/help.c: Likewise.
7290 * partmap/pc.c: Likewise.
7291 * loader/efi/chainloader.c: Likewise.
7292 * loader/multiboot_loader.c: Likewise.
7293 * loader/i386/pc/multiboot2.c: Likewise.
7294 * term/efi/console.c: Likewise.
7295 * term/i386/pc/serial.c: Likewise.
7296 * util/lvm.c: Likewise.
7297 * util/console.c: Likewise.
7298 * util/i386/efi/grub-mkimage.c: Likewise.
7299 * util/raid.c: Likewise.
7300
7f02114b 73012009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
7302
7303 * commands/videotest.c: Removed include to grub/machine/memory.h.
7304
7305 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
7306 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
7307 (video_mod_SOURCES): Removed.
7308 (video_mod_CFLAGS): Likewise.
7309 (video_mod_LDFLAGS): Likewise.
7310 (gfxterm_mod_SOURCES): Likewise.
7311 (gfxterm_mod_CFLAGS): Likewise.
7312 (gfxterm_mod_LDFLAGS): Likewise.
7313 (videotest_mod_SOURCES): Likewise.
7314 (videotest_mod_CFLAGS): Likewise.
7315 (videotest_mod_LDFLAGS): Likewise.
7316 (bitmap_mod_SOURCES): Likewise.
7317 (bitmap_mod_CFLAGS): Likewise.
7318 (bitmap_mod_LDFLAGS): Likewise.
7319 (tga_mod_SOURCES): Likewise.
7320 (tga_mod_CFLAGS): Likewise.
7321 (tga_mod_LDFLAGS): Likewise.
7322 (jpeg_mod_SOURCES): Likewise.
7323 (jpeg_mod_CFLAGS): Likewise.
7324 (jpeg_mod_LDFLAGS): Likewise.
7325 (png_mod_SOURCES): Likewise.
7326 (png_mod_CFLAGS): Likewise.
7327 (png_mod_LDFLAGS): Likewise.
7328
7329 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
7330 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
7331 (video_mod_SOURCES): Added.
7332 (video_mod_CFLAGS): Likewise.
7333 (video_mod_LDFLAGS): Likewise.
7334 (videotest_mod_SOURCES): Likewise.
7335 (videotest_mod_CFLAGS): Likewise.
7336 (videotest_mod_LDFLAGS): Likewise.
7337 (bitmap_mod_SOURCES): Likewise.
7338 (bitmap_mod_CFLAGS): Likewise.
7339 (bitmap_mod_LDFLAGS): Likewise.
7340 (tga_mod_SOURCES): Likewise.
7341 (tga_mod_CFLAGS): Likewise.
7342 (tga_mod_LDFLAGS): Likewise.
7343 (jpeg_mod_SOURCES): Likewise.
7344 (jpeg_mod_CFLAGS): Likewise.
7345 (jpeg_mod_LDFLAGS): Likewise.
7346 (png_mod_SOURCES): Likewise.
7347 (png_mod_CFLAGS): Likewise.
7348 (png_mod_LDFLAGS): Likewise.
7349 (gfxterm_mod_SOURCES): Likewise.
7350 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 7351 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 7352
7353 * term/gfxterm.c: Removed include to grub/machine/memory.h,
7354 grub/machine/console.h.
7355
644fff97 73562009-01-04 Jerone Young <jerone@gmail.com>
7357
7358 Make on screen instructions clearer
7359
7360 Based on patch created by Jidanni <jidanni@jidanni.org>
7361
7362 * normal/menu.c: print clearer instructions on the screen
7363
1e901a75 73642009-01-02 Colin D Bennett <colin@gibibit.com>
7365
7366 New font engine.
34c44600 7367
1e901a75 7368 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
7369 build system and fixed gfxterm.c to work with different sized fonts.
7370
7371 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 7372
1e901a75 7373 * configure: Re-generated.
34c44600 7374
1e901a75 7375 * DISTLIST: Removed font/manager.c.
7376 Added font/font.c.
7377 Added font/font_cmd.c.
34c44600 7378
1e901a75 7379 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
7380 compilation.
34c44600 7381
1e901a75 7382 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 7383
7384 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 7385
7386 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 7387
1e901a75 7388 * normal/menu.c: Likewise.
34c44600 7389
1e901a75 7390 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
7391 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 7392
1e901a75 7393 * include/grub/font.h: Replaced with new file.
34c44600 7394
1e901a75 7395 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
7396 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
7397 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
7398 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
7399 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 7400 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 7401 fg_red, fg_green, fg_blue, fg_alpha.
7402 (grub_video_adapter): Removed blit_glyph.
34c44600 7403 (grub_video_blit_glyph): Removed.
7404
1e901a75 7405 * font/manager.c: Removed file.
34c44600 7406
7407 * font/font.c: New file.
7408
1e901a75 7409 * font/font_cmd.c: Likewise.
34c44600 7410
1e901a75 7411 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 7412
1e901a75 7413 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
7414 (grub_video_vbe_map_rgba): Likewise.
7415 (grub_video_vbe_unmap_color_int): Likewise.
7416 (grub_video_vbe_blit_glyph): Removed.
7417 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 7418
1e901a75 7419 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
7420 (get_pixel): Likewise.
34c44600 7421 (set_pixel): Likewise.
7422
1e901a75 7423 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 7424
1e901a75 7425 * term/gfxterm.c: Adapted to new font engine.
34c44600 7426
1e901a75 7427 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 7428
1e901a75 7429 * term/i386/pc/vga.c: Likewise.
34c44600 7430
1e901a75 7431 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 7432
1e901a75 7433 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 7434
1e901a75 7435 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7436
1e901a75 7437 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7438
1e901a75 7439 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 7440
1e901a75 7441 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 7442
1e901a75 7443 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 7444
1e901a75 7445 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 7446
1e901a75 7447 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
7448
7449 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 7450
1e901a75 7451 * util/grub-mkconfig_lib.in: Changed font extension.
7452
278922e8 74532008-12-28 Felix Zielcke <fzielcke@z-51.de>
7454
7455 * util/getroot.c (grub_util_get_grub_dev): Add support for
7456 /dev/md/dNNpNN style partitionable mdraid devices.
7457
3ced05cf 74582008-12-12 Alex Smith <alex@alex-smith.me.uk>
7459
7460 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
7461 at a time limit of the PXE TFTP API correctly.
7462 (grub_pxefs_close): Likewise.
7463
7fd0ee30 74642008-11-29 Robert Millan <rmh@aybabtu.com>
7465
34c44600 7466 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 7467 grub_ata_device_initialize() calls.
7468
34c44600 74692008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 7470
7471 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
7472 iteration failed.
7473 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
7474
89313780 74752008-11-28 Robert Millan <rmh@aybabtu.com>
7476
7477 Fix build on powerpc-ieee1275. Based on patch created by
7478 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
7479 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7480 `kern/ieee1275/mmap.c'.
7481 * include/grub/powerpc/ieee1275/memory.h: New file.
7482
15257703 7483 Provide grub-install on coreboot.
7484 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
7485 (grub_install_SOURCES): New variable.
7486 * util/i386/pc/grub-install.in: Add a few condition checks to make it
7487 usable on coreboot.
7488
9fc5388a 74892008-11-25 Felix Zielcke <fzielcke@z-51.de>
7490
7491 * util/grub-fstest.c (grub_term_get_current_input): Change return type
7492 to `grub_term_input_t'.
7493 (grub_term_get_current_output): Change return type to
7494 `grub_term_output_t'.
7495
bc3a2f31 74962008-11-22 Robert Millan <rmh@aybabtu.com>
7497
34c44600 7498 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 7499 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
7500 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
7501 grub_vga_text_cls().
7502
80fc88f2 7503 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 7504 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 7505
cbf36fd3 7506 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
7507 to 0x200000 (avoids trouble with some OFW implementations, and matches
7508 with the one in Yaboot).
7509 Reported by Manoel Abranches
7510
73e8e268 75112008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 7512
7513 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
7514 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
7515
73e8e268 7516 * util/grub-mkconfig_lib.in (grub_warn): New function.
7517 (convert_system_path_to_grub_path): Use grub_warn() when issuing
7518 warnings, to obtain consistent formatting.
7519 * util/grub.d/00_header.in: Likewise.
7520 * util/update-grub_lib.in: Likewise.
7521
e94045a1 7522 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 7523 Move comment text to `#error' stanza.
e94045a1 7524
79d29fd7 7525 Harmonize ieee1275's grub_available_iterate() with the generic
7526 grub_machine_mmap_iterate() interface (fixes a recently-introduced
7527 build problem on i386-ieee1275):
7528 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
7529 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
7530 parameter `type'. Update all users of this function.
7531 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7532 `kern/ieee1275/mmap.c'.
7533 * kern/ieee1275/init.c
7534 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
7535 with ...
7536 (grub_machine_mmap_iterate): ... this.
7537 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
7538 return type to `grub_err_t'. Update all implementations of this
7539 function prototype.
7540 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
7541 Likewise.
7542
60d6b16e 7543 Add `lsmmap' command (lists firmware-provided memory map):
7544 * commands/lsmmap.c: New file.
7545 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
7546 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
7547 variables.
7548 * conf/powerpc-ieee1275.rmk: Likewise.
7549 * conf/i386-coreboot.rmk: Likewise.
7550 * conf/i386-ieee1275.rmk: Likewise.
7551
ebaaf49b 75522008-11-19 Robert Millan <rmh@aybabtu.com>
7553
7554 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 7555 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
7556 constraints to initrd allocation (based on code from
7557 loader/i386/pc/linux.c). Without them, initrd was allocated too high
7558 for Linux to find it.
ebaaf49b 7559
dfab719f 75602008-11-14 Robert Millan <rmh@aybabtu.com>
7561
7562 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
7563 order to cope with duplicate slashes.
7564
10fc3eb9 75652008-11-14 Robert Millan <rmh@aybabtu.com>
7566
7567 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
7568 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
7569 don't want to mess with lower memory, because it is used in the Linux
7570 loader.
7571
7572 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 7573 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 7574 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
7575 is in our heap (probably as a result of it being corrupted during
2f2a3442 7576 decompression). Add #error instance with comment to explain why this
7577 loader isn't currently usable on PC/BIOS.
10fc3eb9 7578
e2e07847 75792008-11-14 Robert Millan <rmh@aybabtu.com>
7580
7581 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 7582 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 7583
fe8e8d69 75842008-11-12 Robert Millan <rmh@aybabtu.com>
7585
7586 Make loader/i386/linux.c buildable on i386-pc (although disabled).
7587
7588 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
7589 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
7590 from here ...
7591 * include/grub/i386/pc/memory.h: ... to here.
7592
976b07d0 75932008-11-12 Robert Millan <rmh@aybabtu.com>
7594
7595 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
7596 split).
7597
7598 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
7599 (grub_console_cur_color, grub_console_real_putchar)
7600 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
7601 (grub_console_setcolorstate, grub_console_setcolor)
7602 (grub_console_getcolor): Move from here ...
7603 * include/grub/i386/vga_common.h: ... to here (new file).
7604
7605 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
7606 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
7607 `<grub/i386/io.h>'.
7608 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
7609 `<grub/i386/vga_common.h>'.
7610
76679cd3 76112008-11-12 Robert Millan <rmh@aybabtu.com>
7612
7613 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
7614 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
7615 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
7616 variables.
7617 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
7618 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
7619
7620 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
7621 grub_console_init() with call to grub_vga_text_init().
7622 (grub_machine_fini): Replace call to
7623 grub_console_fini() with call to grub_vga_text_fini() and
7624 grub_at_keyboard_fini().
7625
7626 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
7627 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
7628 (grub_console_setcolorstate, grub_console_setcolor)
7629 (grub_console_getcolor): New function prototypes.
7630
7631 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
7632 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
7633 (grub_vga_text_setcursor): Static-ize.
7634 (grub_vga_text_term): New structure.
7635 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
7636
7637 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
7638 (grub_console_cur_color, grub_console_standard_color)
7639 (grub_console_normal_color, grub_console_highlight_color)
7640 (map_char, grub_console_putchar, grub_console_getcharwidth)
7641 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
7642 (grub_console_getcolor): Move from here ...
7643 * term/i386/vga_common.c: ... to here (same function names).
7644
95b841d3 76452008-11-12 Robert Millan <rmh@aybabtu.com>
7646
7647 Use newly-added Multiboot support in coreboot.
7648
7649 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
7650 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
7651
7652 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
7653 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
7654 (codestart): Store the MBI in `startup_multiboot_info' when we're
7655 being loaded using Multiboot.
7656
7657 * kern/i386/coreboot/init.c (grub_machine_init): Move
7658 grub_at_keyboard_init() call to beginning of function (useful for
7659 debugging). Call grub_machine_mmap_init() before attempting to use
7660 grub_machine_mmap_iterate().
7661 (grub_lower_mem, grub_upper_mem): Move from here ...
7662 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
7663 here (new file).
7664
7665 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
7666 function prototype.
7667
761ca975 76682008-11-12 Robert Millan <rmh@aybabtu.com>
7669
7670 Fix a regression introduced by the at_keyboard.mod split. Because
7671 some terminals are default on some platforms and non-default on
7672 others, the first terminal being registered determines which is
7673 going to be default.
7674
7675 * kern/term.c (grub_term_register_input): If this is the first
7676 terminal being registered, set it as the current one.
7677 (grub_term_register_output): Likewise.
7678
7679 * term/efi/console.c (grub_console_init): Do not call
7680 grub_term_set_current_output() or grub_term_set_current_input().
7681 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
7682 * term/i386/pc/console.c (grub_console_init): Likewise.
7683 (grub_console_fini): Do not call grub_term_set_current_input()
7684 (but leave grub_term_set_current_output() to restore text mode).
7685
6c529df7 76862008-11-10 Robert Millan <rmh@aybabtu.com>
7687
7688 * util/grub.d/00_header.in: Add backward compatibility check for
7689 versions of terminal.mod that don't understand `terminal_input' or
7690 `terminal_output'.
7691
132e4113 76922008-11-09 Robert Millan <rmh@aybabtu.com>
7693
7694 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
7695 `terminal_input' / `terminal_output', not `terminal'.
7696
ac293d50 76972008-11-08 Robert Millan <rmh@aybabtu.com>
7698
7699 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 7700 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 7701
0025933a 77022008-11-08 Robert Millan <rmh@aybabtu.com>
7703
7704 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 7705 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 7706 members. Update all users.
7707 * util/console.c (grub_ncurses_term): Split in ...
7708 (grub_ncurses_term_input): ... this, and ...
7709 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 7710 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 7711
37c86336 77122008-11-08 Robert Millan <rmh@aybabtu.com>
7713
7714 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
7715 (PKGDATA): Add $(pkgdata_SRCDIR).
7716 (pkglib_BUILDDIR): New variable.
7717 (pkgdata_SRCDIR): New variable.
7718 (build_env.mk): New target.
7719 (include_DATA): New variable.
7720 (install-local): Install $(include_DATA) files in $(includedir).
7721
b6c15a2d 77222008-11-07 Pavel Roskin <proski@gnu.org>
7723
d99d46f1 7724 * gendistlist.sh: Use C locale for sorting to ensure consistent
7725 output on all systems.
7726
b6c15a2d 7727 * util/grub.d/00_header.in: Remove incorrect space before
7728 "serial".
7729
c32ee8c9 77302008-11-07 Robert Millan <rmh@aybabtu.com>
7731
7732 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
7733 per specification.
7734 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
7735 * loader/multiboot_loader.c (find_multi_boot2_header): New function
7736 (based on find_multi_boot1_header).
7737 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
7738 using find_multi_boot2_header(), and abort if neither Multiboot or
7739 Multiboot headers were found.
7740
651c29b7 77412008-11-07 Robert Millan <rmh@aybabtu.com>
7742
7743 Modularize at_keyboard.mod:
7744
7745 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
7746 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
7747 (at_keyboard_mod_LDFLAGS): New variables.
7748
7749 Actual terminal split:
7750
7751 * include/grub/term.h (struct grub_term): Split in ...
7752 (struct grub_term_input): ... this, and ...
7753 (struct grub_term_output): ... this. Update all users.
7754 (grub_term_set_current): Split in ...
7755 (grub_term_set_current_input): ... this, and ...
7756 (grub_term_set_current_output): ... this.
7757 (grub_term_get_current): Split in ...
7758 (grub_term_get_current_input): ... this, and ...
7759 (grub_term_get_current_output): ... this.
7760 (grub_term_register): Split in ...
7761 (grub_term_register_input): ... this, and ...
7762 (grub_term_register_output): ... this.
7763 (grub_term_unregister): Split in ...
7764 (grub_term_unregister_input): ... this, and ...
7765 (grub_term_unregister_output): ... this.
7766 (grub_term_iterate): Split in ...
7767 (grub_term_iterate_input): ... this, and ...
7768 (grub_term_iterate_output): ... this.
7769
7770 * kern/term.c (grub_term_list): Split in ...
7771 (grub_term_list_input): ... this, and ...
7772 (grub_term_list_output): ... this. Update all users.
7773 (grub_cur_term): Split in ...
7774 (grub_cur_term_input): ... this, and ...
7775 (grub_cur_term_output): ... this. Update all users.
7776 (grub_term_set_current): Split in ...
7777 (grub_term_set_current_input): ... this, and ...
7778 (grub_term_set_current_output): ... this.
7779 (grub_term_get_current): Split in ...
7780 (grub_term_get_current_input): ... this, and ...
7781 (grub_term_get_current_output): ... this.
7782 (grub_term_register): Split in ...
7783 (grub_term_register_input): ... this, and ...
7784 (grub_term_register_output): ... this.
7785 (grub_term_unregister): Split in ...
7786 (grub_term_unregister_input): ... this, and ...
7787 (grub_term_unregister_output): ... this.
7788 (grub_term_iterate): Split in ...
7789 (grub_term_iterate_input): ... this, and ...
7790 (grub_term_iterate_output): ... this.
7791
7792 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
7793 a check for input and one for output (and only attempt to get keys
7794 from user when input works).
7795
7796 * util/grub-probe.c (grub_term_get_current): Split in ...
7797 (grub_term_get_current_input): ... this, and ...
7798 (grub_term_get_current_output): ... this.
7799 * util/grub-fstest.c: Likewise.
7800 * util/i386/pc/grub-setup.c: Likewise.
7801 * util/grub-editenv.c: Likewise.
7802
7803 Portability adjustments:
7804
7805 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
7806 `term/i386/pc/at_keyboard.c'.
7807 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
7808 grub_keyboard_controller_init() (now handled by terminal .init).
7809 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
7810 grub_at_keyboard_init().
7811 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
7812 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
7813 at_keyboard.mod via input terminal interface).
7814 * include/grub/i386/coreboot/console.h: Convert into a stub for
7815 `<grub/i386/pc/console.h>'.
7816
7817 Migrate full terminals to new API:
7818
7819 * term/efi/console.c (grub_console_term): Split into ...
7820 (grub_console_term_input): ... this, and ...
7821 (grub_console_term_output): ... this. Update all users.
7822 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
7823 (grub_ofconsole_init): Split into ...
7824 (grub_ofconsole_init_input): ... this, and ...
7825 (grub_ofconsole_init_output): ... this.
7826 (grub_ofconsole_term): Split into ...
7827 (grub_ofconsole_term_input): ... this, and ...
7828 (grub_ofconsole_term_output): ... this. Update all users.
7829 * term/i386/pc/serial.c (grub_serial_term): Split into ...
7830 (grub_serial_term_input): ... this, and ...
7831 (grub_serial_term_output): ... this. Update all users.
7832 * term/i386/pc/console.c (grub_console_term): Split into ...
7833 (grub_console_term_input): ... this, and ...
7834 (grub_console_term_output): ... this. Update all users.
7835 (grub_console_term_input): Only enable it on PC/BIOS platform.
7836 (grub_console_init): Remove grub_keyboard_controller_init() call.
7837
7838 Migrate input terminals to new API:
7839
7840 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
7841 `i386' and `i386/pc' to enable build on x86_64 (this driver is
7842 i386-specific anyway).
7843 (grub_console_checkkey): Rename to ...
7844 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
7845 users.
7846 (grub_keyboard_controller_orig): New variable.
7847 (grub_console_getkey): Rename to ...
7848 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
7849 users.
7850 (grub_keyboard_controller_init): Static-ize. Save original
7851 controller value so that it can be restored ...
7852 (grub_keyboard_controller_fini): ... here (new function).
7853 (grub_at_keyboard_term): New structure.
7854 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
7855 functions.
7856
7857 Migrate output terminals to new API:
7858
7859 * term/i386/pc/vga.c (grub_vga_term): Change type to
7860 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
7861 members. Update all users.
7862 * term/gfxterm.c (grub_video_term): Change type to
7863 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
7864 members. Update all users.
7865 * include/grub/i386/pc/console.h (grub_console_checkkey)
7866 (grub_console_getkey): Do not export (no longer needed by gfxterm,
7867 etc).
7868
7869 Migrate `terminal' command and userland tools to new API:
7870
7871 * commands/terminal.c (grub_cmd_terminal): Split into ...
7872 (grub_cmd_terminal_input): ... this, and ...
7873 (grub_cmd_terminal_output): ... this.
7874 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
7875 `terminal_input' and `terminal_output'.
7876 * util/grub.d/00_header.in: Adjust `terminal' calls to new
7877 `terminal_input' / `terminal_output' API.
7878 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
7879 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
7880 provided ${GRUB_TERMINAL}, convert it).
7881
96e5d876 78822008-11-04 Robert Millan <rmh@aybabtu.com>
7883
7884 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
7885 for FreeBSD.
7886 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
7887
556f3775 78882008-11-03 Bean <bean123ch@gmail.com>
7889
7890 * kern/elf.c (grub_elf32_load): Revert to previous code.
7891 (grub_elf64_load): Likewise.
7892
7893 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
7894
926b9823 78952008-11-01 Robert Millan <rmh@aybabtu.com>
7896
7897 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
7898 (TARGET_CPPFLAGS): Likewise.
7899 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
7900
1432e958 79012008-11-01 Carles Pina i Estany <carles@pina.cat>
7902
7903 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
7904
dba3f844 79052008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 7906
7907 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
7908 addition of objects until the code is not going to be able to fail.
7909
dba3f844 79102008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 7911
7912 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
7913 (add a missing NULL check, and correct them by moving the pointer
7914 operations after the actual check).
7915
7ab28c21 79162008-10-29 Robert Millan <rmh@aybabtu.com>
7917
7918 * util/i386/pc/grub-install.in: Handle empty string as output from
7919 make_system_path_relative_to_its_root().
7920
1b7748eb 79212008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
7922
7923 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
7924 circular metadata worst case scenario. If the metadata is circular
7925 then copy the wrap in place.
7926 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
7927 project lib/format_text/layout.h
7928 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
7929
c9618ab2 79302008-10-03 Felix Zielcke <fzielcke@z-51.de>
7931
7a36edca 7932 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 7933
bf981c62 79342008-10-03 Felix Zielcke <fzielcke@z-51.de>
7935
7936 * util/update-grub_lib.in: Mention filename in warning message.
7937
6d994591 79382008-09-29 Felix Zielcke <fzielcke@z-51.de>
7939
7940 * NEWS: Update for rename of update-grub to grub-mkconfig.
7941
18ade780 79422008-09-29 Felix Zielcke <fzielcke@z-51.de>
7943
7944 * util/update-grub_lib.in: Copy to ...
7945 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 7946 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 7947 * util/update-grub.in: Rename to ...
7948 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
7949 option. Add `--output' option to allow users to specify the generated
7950 configuration file. Default to stdout.
7951 (update_grub_dir): Rename to ...
7952 (grub_mkconfig_dir): ... this.
7953 (grub_cfg): Default to an empty string.
7954 * conf/common.rmk (update-grub): Rename to ...
7955 (grub-mkconfig): ... this.
7956 (update-grub_lib): Copy to ...
7957 (grub-mkconfig_lib): ... this.
7958 (update-grub_SCRIPTS): Copy to ...
7959 (grub-mkconfig_SCRIPTS): ... this. Update all users.
7960 (update-grub_DATA): Rename to ...
7961 (grub-mkconfig_DATA): ... this.
7962
556ce6ac 79632008-09-28 Robert Millan <rmh@aybabtu.com>
7964
7965 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
7966 to `modified'. Add the real `created' field.
7967 (grub_iso9660_uuid): Use `modified' rather than `created' for
7968 constructing the UUID.
7969
79702008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 7971
7972 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
7973 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
7974
92274e85 79752008-09-28 Bean <bean123ch@gmail.com>
7976
7977 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
7978 Thanks to Christian Franke for finding this bug.
7979
add6f17a 79802008-09-25 Robert Millan <rmh@aybabtu.com>
7981
7982 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
7983 instances of grub_util_get_disk_name() (see previous commit).
7984
d2a367b8 79852008-09-25 Robert Millan <rmh@aybabtu.com>
7986
7987 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
7988 `util/i386/get_disk_name.c'.
7989 * conf/i386-efi.rmk: Likewise.
7990 * conf/x86_64-efi.rmk: Likewise.
7991 * conf/i386-coreboot.rmk: Likewise.
7992 * conf/i386-ieee1275.rmk: Likewise.
7993 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
7994 `util/ieee1275/get_disk_name.c'.
7995 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
7996 * util/ieee1275/get_disk_name.c: Remove file.
7997 * util/i386/get_disk_name.c: Remove file.
7998 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
7999 "hd%d" for device.map entries, rather than using
8000 grub_util_get_disk_name().
8001
81a06771 80022008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 8003
8004 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
8005 warning.
8006 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
8007
5a004279 80082008-09-24 Carles Pina i Estany <carles@pina.cat>
8009
8010 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
8011 Changed to 0x5100.
8012 (GRUB_TERM_PPAGE): Changed to 0x4900.
8013
397093d3 80142008-09-24 Robert Millan <rmh@aybabtu.com>
8015
8016 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
8017 macros (they were i386-pc specific).
8018 * include/grub/sparc64/ieee1275/console.h: Likewise.
8019 * include/grub/efi/console.h: Likewise.
8020
a91b6c7c 80212008-09-22 Bean <bean123ch@gmail.com>
8022
8023 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
8024 resident and in attribute list.
8025
8026 * include/grub/ntfs.h (BMP_LEN): Removed.
8027
c40fd116 80282008-09-22 Bean <bean123ch@gmail.com>
8029
81a06771 8030 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 8031 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
8032
8033 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
8034 error occurs, as grub_disk_open will call grub_disk_close, which will
8035 call p->close (scsi).
8036
81a06771 80372008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 8038
8039 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
8040 (AC_PREREQ): Bumped to 2.59.
8041 (AC_TRY_COMPILE): Replace obsolete macro with ...
8042 (AC_COMPILE_IFELSE): ... this.
8043 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
8044 (AC_LINK_IFELSE): ... this.
8045
5dc43410 80462008-09-21 Felix Zielcke <fzielcke@z-51.de>
8047
8048 * autogen.sh: Add a call to `gendistlist.sh'.
8049
9035dce4 80502008-09-19 Christian Franke <franke@computer.org>
8051
8052 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
8053 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
8054 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
8055 Export __enable_execute_stack() to modules.
8056 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
8057 New function.
8058
7fd75377 80592008-09-09 Felix Zielcke <fzielcke@z-51.de>
8060
040030b3 8061 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
8062 Sort the list.
8063
80642008-09-09 Felix Zielcke <fzielcke@z-51.de>
8065
8066 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 8067 #include <grub/util/hostdisk.h>.
8068
89d5ffcf 80692008-09-08 Robert Millan <rmh@aybabtu.com>
8070
8071 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
8072 segments when their filesz is zero (grub_file_read() interprets
81a06771 8073 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 8074 Use `lowest_segment' rather than 0 for calculating the current
8075 segment load address.
8076
40da438f 80772008-09-08 Robert Millan <rmh@aybabtu.com>
8078
8079 * util/hostdisk.c (open_device): Replace a grub_util_info() call
8080 with grub_dprintf("hostdisk", ...), as it was so verbose that it
8081 clobbered useful information.
8082
ddbf5556 80832008-09-08 Robert Millan <rmh@aybabtu.com>
8084
8085 * include/grub/util/biosdisk.h: Move to ...
8086 * include/grub/util/hostdisk.h: ... here. Update all users.
8087 * util/biosdisk.c: Move to ...
8088 * util/hostdisk.c: ... here. Update all users.
8089
783d0f48 80902008-09-07 Robert Millan <rmh@aybabtu.com>
8091
8092 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
8093 variables.
8094 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
8095 and length can be stored directly in the `mbi->mmap_addr' and
8096 `mbi->mmap_length' struct fields.
8097
548e2ea5 80982008-09-07 Robert Millan <rmh@aybabtu.com>
8099
8100 * conf/i386.rmk: New file. Provides declaration for building
8101 `cpuid.mod'.
8102 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
8103 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
8104 variables.
8105 Include `conf/i386.mk'.
8106 * conf/i386-efi.rmk: Likewise.
8107 * conf/x86_64-efi.rmk: Likewise.
8108 * conf/i386-coreboot.rmk: Likewise.
8109 * conf/i386-ieee1275.rmk: Likewise.
8110
0ea85a37 81112008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
8112
8113 Based on patch created by Colin D Bennett <colin@gibibit.com>.
8114 Adds optimization support for BGR based modes.
8115
8116 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
8117 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
8118 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8119 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8120 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8121 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8122 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8123 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8124 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8125 (grub_video_i386_vbeblit_index_index): Likewise.
8126 (grub_video_i386_vbeblit_replace_directN): Added.
8127 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
8128 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
8129 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
8130 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
8131 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
8132 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 8133 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 8134 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
8135 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
8136 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
8137 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
8138 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
8139 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
8140
8141 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
8142 (grub_video_i386_vbefill_R8G8B8): Likewise.
8143 (grub_video_i386_vbefill_index): Likewise.
8144 (grub_video_i386_vbefill_direct32): Added.
8145 (grub_video_i386_vbefill_direct24): Likewise.
8146 (grub_video_i386_vbefill_direct16): Likewise.
8147 (grub_video_i386_vbefill_direct8): Likewise.
8148
81a06771 8149 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 8150 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
8151 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
8152 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
8153 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
8154 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 8155
0ea85a37 8156 * video/video.c (grub_video_get_blit_format): Updated to use new
8157 blit formats. Added handling for 16 bit color modes.
81a06771 8158
8159 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 8160 fillers.
8161 (common_blitter): Updated to use new blitters.
8162
8163 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
8164 Removed.
8165 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
8166 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8167 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8168 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8169 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8170 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8171 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8172 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8173 (grub_video_i386_vbeblit_index_index): Likewise.
8174 (grub_video_i386_vbeblit_replace_directN): Added.
8175 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
8176 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
8177 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
8178 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
8179 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
8180 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
8181 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
8182 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
8183 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
8184 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
8185 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
8186 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
8187 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 8188
0ea85a37 8189 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
8190 (grub_video_i386_vbefill_R8G8B8): Likewise.
8191 (grub_video_i386_vbefill_index): Likewise.
8192 (grub_video_i386_vbefill_direct32): Added.
8193 (grub_video_i386_vbefill_direct24): Likewise.
8194 (grub_video_i386_vbefill_direct16): Likewise.
8195 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 8196
0ea85a37 8197 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
8198 types.
81a06771 8199
0ea85a37 8200 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
8201 types.
81a06771 8202
0ea85a37 8203 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
8204 blitter types.
81a06771 8205
0ea85a37 8206 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
8207 types.
8208
e8a83df6 82092008-09-06 Felix Zielcke <fzielcke@z-51.de>
8210
8211 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
8212 RAID level 1.
8213
6bcd8ee5 82142008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 8215
6bcd8ee5 8216 * fs/iso9660.c (grub_iso9660_date): New structure.
8217 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
8218 (grub_iso9660_uuid): New function.
c375ae58 8219
59261157 82202008-09-05 Bean <bean123ch@gmail.com>
8221
8222 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
8223
8224 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
8225 insensitive bit for names in Win32 and Win32 & DOS namespace.
8226
8227 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
8228
8229 * include/grub/types.h (LONG_MAX): Likewise.
8230
58b6645a 82312008-09-04 Felix Zielcke <fzielcke@z-51.de>
8232
4ee55921 8233 * util/getroot.c: Include <config.h>.
8234 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
8235 add support for /dev/md/N devices and handle LVM double dash escaping.
8236
82372008-09-04 Felix Zielcke <fzielcke@z-51.de>
8238
8239 * config.guess: Update to latest version from config git.
8240 * config.sub: Likewise.
58b6645a 8241
9124f65d 82422008-09-03 Robert Millan <rmh@aybabtu.com>
8243
8244 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
8245 `disk->total_sectors'.
8246
81a06771 82472008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 8248
8249 * include/grub/normal.h: Fixed incorrect comment for
8250 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
8251
81a06771 82522008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 8253
8254 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
8255 values with defines.
8256
8257 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
8258 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
8259 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
8260 (GRUB_VBE_MODEATTR_COLOR): Likewise.
8261 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
8262 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
8263 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
8264 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
8265 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
8266 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
8267 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
8268 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
8269 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
8270 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
8271 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
8272 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
8273 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
8274 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
8275 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
8276
93d5cbf8 82772008-08-31 Robert Millan <rmh@aybabtu.com>
8278
8279 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
8280 declaration.
8281 (grub_multiboot): Fix a few warnings.
8282
21751d50 82832008-08-31 Robert Millan <rmh@aybabtu.com>
8284
8285 * loader/i386/pc/multiboot.c: Update comment not to say that
8286 boot_device support is unimplemented.
8287
e27a75c5 82882008-08-31 Robert Millan <rmh@aybabtu.com>
8289
8290 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
8291 or memory map support are unimplemented.
8292
81a06771 82932008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 8294
8295 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
8296
81a06771 82972008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 8298
8299 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
8300 total video memory in 'vbeinfo' output; show color format details for
8301 each video mode.
8302
7c5d8d95 83032008-08-30 Pavel Roskin <proski@gnu.org>
8304
8305 * util/genmoddep.c: Remove for real this time.
8306 * DISTLIST: Remove util/genmoddep.c.
8307
4cebd25a 83082008-08-30 Robert Millan <rmh@aybabtu.com>
8309
8310 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
8311 as required by Multiboot spec (it was already 4-byte aligned, but
8312 only by chance).
8313
b497a269 83142008-08-29 Pavel Roskin <proski@gnu.org>
8315
e3925185 8316 * kern/powerpc/ieee1275/crt0.S: Rename to ...
8317 * kern/powerpc/ieee1275/startup.S: ... this.
8318 * conf/powerpc-ieee1275.rmk: Adjust for the above.
8319 * DISTLIST: Likewise.
8320
b497a269 8321 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
8322 grub/cpu/kernel.h. Add start label for consistency with other
8323 platforms. Add grub_prefix immediately after start. Add jump
8324 to the code after grub_prefix.
8325 * include/grub/powerpc/kernel.h: Provide valid values for
8326 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
8327
6e5a42fe 83282008-08-29 Bean <bean123ch@gmail.com>
8329
8330 * configure.ac: Change host_os to cygwin for mingw.
8331 (asprintf): New check for function.
8332
8333 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
8334 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
8335
8336 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 8337 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 8338 sync, sleep and grub_util_get_disk_size for mingw.
8339
8340 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
8341 to get size in mingw.
8342 (open_device): Use flag O_BINARY if it's defined.
8343 (find_root_device): Add dummy code for mingw.
8344
8345 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
8346 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
8347 (get_scsi_disk_name): Return 0 for mingw.
8348
8349 * util/hostfs.c: #include <grub/util/misc.h>.
8350 (grub_hostfs_open): Use "rb" flag to open file, use
8351 grub_util_get_disk_size to get disk size for mingw.
8352
8353 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
8354 (asprintf): New function if HAVE_ASPRINTF is not set.
8355 (sync): New function for mingw.
8356 (sleep): Likewise.
8357 (grub_util_get_disk_size): Likewise.
8358
ab3f2673 83592008-08-28 Pavel Roskin <proski@gnu.org>
8360
8361 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8362 kern/time.c.
8363
1c282483 83642008-08-28 Robert Millan <rmh@aybabtu.com>
8365
8366 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
8367
678e849c 83682008-08-28 Robert Millan <rmh@aybabtu.com>
8369
8370 Change find_grub_drive() syntax so it doesn't prevent it from
8371 detecting NULL names as errors.
8372
8373 * util/biosdisk.c (find_grub_drive): Move free slot search code
8374 from here ...
8375 (find_free_slot): ... to here.
8376 (read_device_map): Use find_free_slot() to search for free slots.
8377
965c75ca 83782008-08-27 Marco Gerards <marco@gnu.org>
8379
8380 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
8381 (scsi_mod_SOURCES): New variable.
8382 (scsi_mod_CFLAGS): Likewise
8383 (scsi_mod_LDFLAGS): Likewise.
8384
8385 * disk/scsi.c: New file.
8386
8387 * include/grub/scsi.h: Likewise.
8388
8389 * include/grub/scsicmd.h: Likewise.
8390
8391 * disk/ata.c: Include <grub/scsi.h>.
8392 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
8393 instead.
8394 (grub_ata_iterate): Skip ATAPI devices.
8395 (grub_ata_open): Only handle ATAPI devices.
8396 (struct grub_atapi_read): Removed.
8397 (grub_atapi_readsector): Likewise.
8398 (grub_ata_read): No longer handle ATAPI devices.
8399 (grub_ata_write): Likewise.
8400 (grub_atapi_iterate): New function.
8401 (grub_atapi_read): Likewise.
8402 (grub_atapi_write): Likewise.
8403 (grub_atapi_open): Likewise.
8404 (grub_atapi_close): Likewise.
8405 (grub_atapi_dev): New variable.
8406 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
8407 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
8408
8409 * include/grub/disk.h (enum grub_disk_dev_id): Add
8410 `GRUB_DISK_DEVICE_SCSI_ID'.
8411
c07ae501 84122008-08-26 Robert Millan <rmh@aybabtu.com>
8413
8414 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
8415 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
8416 descriptive.
8417
5ed20adc 84182008-08-23 Bean <bean123ch@gmail.com>
8419
8420 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
8421 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8422 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
8423 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
8424 dm_nv.mod.
8425 (raid5rec_mod_SOURCES): New macro.
8426 (raid5rec_mod_CFLAGS): Likewise.
8427 (raid5rec_mod_LDFLAGS): Likewise.
8428 (raid6rec_mod_SOURCES): Likewise.
8429 (raid6rec_mod_CFLAGS): Likewise.
8430 (raid6rec_mod_LDFLAGS): Likewise.
8431 (mdraid_mod_SOURCES): Likewise.
8432 (mdraid_mod_CFLAGS): Likewise.
8433 (mdraid_mod_LDFLAGS): Likewise.
8434 (dm_nv_mod_SOURCES): Likewise.
8435 (dm_nv_mod_CFLAGS): Likewise.
8436 (dm_nv_mod_LDFLAGS): Likewise.
8437
8438 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
8439 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8440 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8441
8442 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
8443 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8444
8445 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8446
8447 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8448
8449 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8450
8451 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8452
8453 * disk/raid5_recover.c: New file.
8454
8455 * disk/raid6_recover.c: Likewise.
8456
8457 * disk/mdraid_linux.c: Likewise.
8458
8459 * disk/dmraid_nvidia.c: Likewise.
8460
8461 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
8462 ULONG_MAX.
8463
8464 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
8465 calculate the size of raid device.
8466 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
8467 different layout of raid5.
8468 (grub_raid_scan_device): Remove code specific to mdraid.
8469 (grub_raid_list): New variable.
8470 (free_array): New function.
8471 (grub_raid_register): Likewise.
8472 (grub_raid_unregister): Likewise.
8473 (grub_raid_rescan): Likewise.
8474 (GRUB_MOD_INIT): Don't iterate device here.
8475 (GRUB_MOD_FINI): Use free_array to release resource.
8476
8477 * include/grub/raid.h: Remove macro and structure specific to mdraid.
8478 (grub_raid5_recover_func_t): New function variable type.
8479 (grub_raid6_recover_func_t): Likewise.
8480 (grub_raid5_recover_func): New variable.
8481 (grub_raid6_recover_func): Likewise.
8482 (grub_raid_register): New function.
8483 (grub_raid_unregister): Likewise.
8484 (grub_raid_rescan): Likewise.
8485 (grub_raid_block_xor): Likewise.
8486
8487 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
8488 (CMD_CRC): New macro.
8489 (part): Removed.
8490 (read_file): Handle device as well as file.
8491 (cmd_crc): New function.
8492 (fstest): Handle multiple disks.
8493 (options): Remove part, raw and long, add root and diskcount.
8494 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 8495 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 8496 add handling for the new options, support multiple disks.
8497
8498 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
8499
29c18915 85002008-08-23 Bean <bean123ch@gmail.com>
8501
8502 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
8503
8504 * genfslist.sh: Ignore kernel.mod.
8505
8506 * genpartmaplist.sh: Likewise.
8507
8415f261 85082008-08-23 Robert Millan <rmh@aybabtu.com>
8509
8510 * util/getroot.c (find_root_device): Skip anything that starts with
8511 a dot, not just directories. This avoids things like /dev/.tmp.md0.
8512
d5a7dc5b 85132008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 8514
d5a7dc5b 8515 * util/update-grub.in (GRUB_GFXMODE): Export variable.
8516 * util/grub.d/00_header.in: Allow the administrator to change default
8517 gfxmode via ${GRUB_GFXMODE}.
8518
380cfbb4 85192008-08-21 Felix Zielcke <fzielcke@z-51.de>
8520
8521 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
8522
c9baafe7 85232008-08-21 Robert Millan <rmh@aybabtu.com>
8524
8525 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
8526 loader.
8527 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
8528 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
8529
e290bef2 85302008-08-20 Carles Pina i Estany <carles@pina.cat>
8531
8532 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
8533 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
8534
f9dbfc96 85352008-08-19 Robert Millan <rmh@aybabtu.com>
8536
8537 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
8538 (struct grub_virtual_screen): Remove `cursor_color'.
8539 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
8540 initialization.
8541 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
8542
dd6bd6ab 85432008-08-18 Robert Millan <rmh@aybabtu.com>
8544
8545 Unify (identical) linux_normal.c files.
8546 * loader/i386/efi/linux_normal.c: Move from here ...
8547 * loader/linux_normal.c: ... to here. Update all users.
8548 * loader/i386/pc/linux_normal.c: Delete. Update all users.
8549 * loader/i386/ieee1275/linux_normal.c: Likewise.
8550
7f42f83e 85512008-08-18 Robert Millan <rmh@aybabtu.com>
8552
8553 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
8554 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
8555 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
8556 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
8557 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
8558 New macros.
8559 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
8560 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
8561 (GRUB_LINUX_CL_END_OFFSET): ... to here.
8562 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
8563 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
8564 (GRUB_EFI_CL_END_OFFSET): Rename to ...
8565 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
8566 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
8567 Initialize `params->video_cursor_x' and `params->video_cursor_y'
8568 portably using grub_getxy().
8569 Replace `-EFI' with `-bzImage' in boot message.
8570
38487ddb 85712008-08-17 Robert Millan <rmh@aybabtu.com>
8572
8573 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
8574
deceb3ec 85752008-08-17 Robert Millan <rmh@aybabtu.com>
8576
8577 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
8578
8579 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
8580 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
8581 (grub_machine_mmap_iterate): New function declaration.
8582 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
8583 structure.
8584 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
8585 macros.
8586
8587 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
8588 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
8589 Move e820 parsing from here ...
8590 * kern/i386/pc/mmap.c: New file.
8591 (grub_machine_mmap_iterate): ... to here.
8592
8593 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
8594 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
8595 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
8596 (grub_available_iterate): Redeclare to return `void', and redeclare
8597 its hook to use grub_uint64_t as addr and size parameters, and rename
8598 to ...
8599 (grub_machine_mmap_iterate): ... this. Update all users.
8600
8601 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
8602 to make it more readable. Rename to ...
8603 (grub_machine_mmap_iterate): ... this.
8604
8605 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
8606 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
8607 (grub_multiboot): Allocate an extra region after the payload, and fill
8608 it with a Multiboot memory map. Adjust a.out loader to calculate size
8609 with the extra space.
8610 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
8611 with the extra space.
8612
f8aa0f43 86132008-08-17 Carles Pina i Estany <carles@pina.cat>
8614
9807deb9 8615 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 8616
605f5bb6 86172008-08-17 Felix Zielcke <fzielcke@z-51.de>
8618
8619 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
8620 mdate-sh to the list `find' searches for.
8621 * DISTLIST: Regenerated.
8622
210db6c6 86232008-08-16 Felix Zielcke <fzielcke@z-51.de>
8624
8625 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
8626 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 8627 genmoddep.awk, gensymlist.sh.in.
8628 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 8629 * DISTLIST: Regenerated.
48cdbfd4 8630 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 8631
1082b929 86322008-08-16 Robert Millan <rmh@aybabtu.com>
8633
8634 * disk/raid.c (grub_raid_init): Handle/report errors set by
8635 grub_device_iterate().
8636 * disk/lvm.c (grub_lvm_init): Likewise.
8637
42ce5170 86382008-08-15 Bean <bean123ch@gmail.com>
8639
8640 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8641 and datehook.mod.
8642 (datetime_mod_SOURCES): New macro.
8643 (datetime_mod_CFLAGS): Likewise.
8644 (datetime_mod_LDFLAGS): Likewise.
8645 (date_mod_SOURCES): Likewise.
8646 (date_mod_CFLAGS): Likewise.
8647 (date_mod_LDFLAGS): Likewise.
8648 (datehook_mod_SOURCES): Likewise.
8649 (datehook_mod_CFLAGS): Likewise.
8650 (datehook_mod_LDFLAGS): Likewise.
8651
8652 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8653 and datehook.mod.
8654 (datetime_mod_SOURCES): New macro.
8655 (datetime_mod_CFLAGS): Likewise.
8656 (datetime_mod_LDFLAGS): Likewise.
8657 (date_mod_SOURCES): Likewise.
8658 (date_mod_CFLAGS): Likewise.
8659 (date_mod_LDFLAGS): Likewise.
8660 (datehook_mod_SOURCES): Likewise.
8661 (datehook_mod_CFLAGS): Likewise.
8662 (datehook_mod_LDFLAGS): Likewise.
8663
8664 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8665 and datehook.mod.
8666 (datetime_mod_SOURCES): New macro.
8667 (datetime_mod_CFLAGS): Likewise.
8668 (datetime_mod_LDFLAGS): Likewise.
8669 (date_mod_SOURCES): Likewise.
8670 (date_mod_CFLAGS): Likewise.
8671 (date_mod_LDFLAGS): Likewise.
8672 (datehook_mod_SOURCES): Likewise.
8673 (datehook_mod_CFLAGS): Likewise.
8674 (datehook_mod_LDFLAGS): Likewise.
8675
8676 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8677 and datehook.mod.
8678 (datetime_mod_SOURCES): New macro.
8679 (datetime_mod_CFLAGS): Likewise.
8680 (datetime_mod_LDFLAGS): Likewise.
8681 (date_mod_SOURCES): Likewise.
8682 (date_mod_CFLAGS): Likewise.
8683 (date_mod_LDFLAGS): Likewise.
8684 (datehook_mod_SOURCES): Likewise.
8685 (datehook_mod_CFLAGS): Likewise.
8686 (datehook_mod_LDFLAGS): Likewise.
8687
8688 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
8689 and datehook.mod.
8690 (datetime_mod_SOURCES): New macro.
8691 (datetime_mod_CFLAGS): Likewise.
8692 (datetime_mod_LDFLAGS): Likewise.
8693 (date_mod_SOURCES): Likewise.
8694 (date_mod_CFLAGS): Likewise.
8695 (date_mod_LDFLAGS): Likewise.
8696 (datehook_mod_SOURCES): Likewise.
8697 (datehook_mod_CFLAGS): Likewise.
8698 (datehook_mod_LDFLAGS): Likewise.
8699
8700 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
8701
8702 * commands/date.c: New file.
8703
8704 * hook/datehook.c: Likewise.
8705
8706 * include/grub/lib/datetime.h: Likewise.
8707
8708 * include/grub/i386/cmos.h: Likewise.
8709
8710 * lib/datetime.c: Likewise.
8711
8712 * lib/i386/datetime.c: Likewise.
8713
8714 * lib/efi/datetime.c: Likewise.
8715
0e9242da 87162008-08-14 Robert Millan <rmh@aybabtu.com>
8717
8718 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
8719 (grub_mkelfimage_SOURCES): New variable.
8720 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
8721
8722 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
8723 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
8724 * conf/powerpc-ieee1275.rmk: Likewise.
8725 * conf/i386-ieee1275.rmk: Likewise.
8726
8727 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
8728 * kern/i386/coreboot/init.c: Likewise.
8729
8730 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
8731 with `<grub/cpu/kernel.h>'.
8732 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
8733 to ...
8734 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
8735 * kern/i386/coreboot/startup.S: Likewise.
8736
8737 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
8738 (GRUB_MOD_GAP): Remove.
8739 * include/grub/powerpc/kernel.h: New file.
8740 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
8741 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8742 * include/grub/i386/kernel.h: New file.
8743 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
8744 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
8745 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8746
8747 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
8748 `grub-mkelfimage'.
8749 Use --directory when invoking grub_mkimage.
8750
8751 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
8752 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
8753 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
8754 and GRUB_KERNEL_CPU_PREFIX.
8755
b86408f8 87562008-08-14 Felix Zielcke <fzielcke@z-51.de>
8757
d5e619ca 8758 * include/grub/err.h (grub_err_printf): New function prototype.
8759 * util/misc.c (grub_err_printf): New function.
8760 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
8761 grub_printf.
8762 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 8763
7161f0e0 87642008-08-13 Robert Millan <rmh@aybabtu.com>
8765
8766 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
8767
a1967522 87682008-08-13 Robert Millan <rmh@aybabtu.com>
8769
8770 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
8771 boot entry.
8772
371458b5 87732008-08-12 Robert Millan <rmh@aybabtu.com>
8774
8775 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
8776 of the relocation code from here ...
8777 (grub_multiboot): ... to here.
8778 (forward_relocator, backward_relocator): Move from here ...
8779 * kern/i386/loader.S (grub_multiboot_forward_relocator)
8780 (grub_multiboot_backward_relocator): ... to here.
8781 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
8782 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
8783 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
8784 (grub_multiboot_forward_relocator_end)
8785 (grub_multiboot_backward_relocator)
8786 (grub_multiboot_backward_relocator_end): New variables.
8787
05f9452b 87882008-08-12 Bean <bean123ch@gmail.com>
8789
8790 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
8791
20024ab0 87922008-08-11 Robert Millan <rmh@aybabtu.com>
8793
8794 * kern/i386/linuxbios/startup.S: Move from here ...
8795 * kern/i386/coreboot/startup.S: ... to here.
8796
8797 * kern/i386/linuxbios/init.c: Move from here ...
8798 * kern/i386/coreboot/init.c: ... to here.
8799
8800 * kern/i386/linuxbios/table.c: Move from here ...
8801 * kern/i386/coreboot/mmap.c: ... to here.
8802
8803 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
8804
e352e9cd 88052008-08-11 Robert Millan <rmh@aybabtu.com>
8806
8807 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
8808 errors. Leave it to the upper layer to handle them.
8809
2d05bc6a 88102008-08-09 Christian Franke <franke@computer.org>
8811
8812 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
8813 * conf/common.rmk: Install `grub-pe2elf' only if requested.
8814 Install `grub.d/10_windows' only on Cygwin.
8815 * configure.ac: Add subst of `target_os'.
8816 Check `target_os' also before setting TARGET_OBJ2ELF.
8817 Add `--enable-grub-pe2elf'.
8818
042bd419 88192008-08-08 Robert Millan <rmh@aybabtu.com>
8820
8821 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8822 (grub_last_time): Change type to grub_uint64_t.
8823 (grub_disk_open): Migrate code from to using grub_get_time_ms().
8824 (grub_disk_close): Likewise.
8825
8826 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8827 (run_menu): Migrate code from to using grub_get_time_ms().
8828
8829 * util/misc.c (grub_get_time_ms): New function.
8830
7f280db5 88312008-08-08 Marco Gerards <marco@gnu.org>
8832
8833 * disk/ata.c (grub_ata_regget): Change return type to
8834 `grub_uint8_t'.
8835 (grub_ata_regget2): Likewise.
8836 (grub_ata_wait_status): New function.
8837 (grub_ata_wait_busy): Removed function, updated all users to use
8838 `grub_ata_wait_status'.
8839 (grub_ata_wait_drq): Likewise.
8840 (grub_ata_cmd): New function.
8841 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
8842 error handling.
8843 (grub_ata_pio_write): Add error handling.
8844 (grub_atapi_identify): Likewise.
8845 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
8846 handling.
8847 (grub_ata_identify): Use `grub_ata_cmd' and improve error
8848 handling. Actually use the detected registers. Reorder the
8849 detection logic such that it is easier to read.
8850 (grub_ata_pciinit): Do not assign the same ID to each controller.
8851 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
8852 handling.
8853 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
8854
8855 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
8856
1fbc5e66 88572008-08-08 Marco Gerards <marco@gnu.org>
8858
8859 * NEWS: Update.
8860
819ce6c0 88612008-08-07 Bean <bean123ch@gmail.com>
8862
8863 * include/grub/x86_64/pci.h: New file.
8864
5c41d44d 88652008-08-07 Christian Franke <franke@computer.org>
8866
8867 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
8868 (TIMER2_GATE): Likewise.
8869 (grub_pit_wait): Add enable/disable of the timer2 gate
8870 bit of port 0x61. This fixes a possible infinite loop.
8871
5ebc275d 88722008-08-07 Bean <bean123ch@gmail.com>
8873
8874 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
8875 kern/i386/tsc.c and kern/i386/pit.c.
8876
8877 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
8878 x86_64 platform.
8879
8880 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
8881 <grub/i386/tsc.h>.
8882
8883 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
8884
e383b3d0 88852008-08-07 Bean <bean123ch@gmail.com>
8886
8887 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
8888
8889 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
8890
8891 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
8892 multiple inclusion. Add #include <grub/types.h>.
8893
1cbb58ac 88942008-08-06 Christian Franke <franke@computer.org>
8895
8896 * conf/common.rmk: Build and install `10_windows'.
8897 * util/grub.d/10_windows.in: New script.
8898
337f5a1e 88992008-08-06 Pavel Roskin <proski@gnu.org>
8900
8901 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
8902
057bc4ac 89032008-08-06 Robert Millan <rmh@aybabtu.com>
8904
8905 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
8906 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
8907
2b99f123 89082008-08-06 Bean <bean123ch@gmail.com>
8909
8910 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
8911 (grub_pxefs_fs_int): Remove dummy definition.
8912 (grub_pxefs_open): Use data->block_size to store the current block
8913 size setting.
8914 (grub_pxefs_read): Use block size stored in data->block_size. As the
8915 value of grub_pxe_blksize can be changed after the file is opened.
8916
9f0234cb 89172008-08-06 Bean <bean123ch@gmail.com>
8918
8919 * fs/i386/pc/pxe.c (curr_file): new variable.
8920 (grub_pxefs_open): Simply the handling of pxe file system. Don't
8921 require the dummy internal file system anymore.
8922 (grub_pxefs_read): Removed.
8923 (grub_pxefs_close): Likewise.
8924 (grub_pxefs_fs_int): Likewise.
8925 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
8926 connection when we switch file.
8927 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
8928
a55d42e0 89292008-08-06 Robert Millan <rmh@aybabtu.com>
8930
8931 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
8932 `halt.mod'.
8933 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
8934 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
8935
8936 * kern/i386/halt.c: New file.
8937 * kern/i386/reboot.c: Likewise.
8938 * include/grub/i386/reboot.h: Likewise.
8939 * include/grub/i386/halt.h: Likewise.
8940
8941 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
8942 Include `<grub/cpu/halt.h>'.
8943 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
8944 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
8945
8946 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
8947 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
8948 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
8949 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
8950 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
8951 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
8952 from here ...
8953 * include/grub/i386/at_keyboard.h: ... to here.
8954
24371d26 89552008-08-05 Robert Millan <rmh@aybabtu.com>
8956
8957 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
8958 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
8959 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
8960 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8961 `kern/generic/millisleep.c'.
8962
8963 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
8964 instead of grub_get_rtc().
8965 (grub_tsc_init): Initialize `tsc_boot_time'.
8966
8967 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
8968 (grub_machine_init): Use grub_tsc_init() rather than
8969 installing an RTC-based handler via grub_install_get_time_ms().
8970
8971 * kern/i386/pit.c: New file.
8972 * include/grub/i386/pit.h: Likewise.
8973
9e7007b3 89742008-08-05 Bean <bean123ch@gmail.com>
8975
8976 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
8977
8978 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
8979 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
8980 (pxe_mod_SOURCES): New macro.
8981 (pxe_mod_CFLAGS): Likewise.
8982 (pxe_mod_LDFLAGS): Likewise.
8983 (pxecmd_mod_SOURCES): Likewise.
8984 (pxecmd_mod_CFLAGS): Likewise.
8985 (pxecmd_mod_LDFLAGS): Likewise.
8986
8987 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
8988 (grub_pxe_call): Likewise.
8989
8990 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
8991
8992 * commands/i386/pc/pxecmd.c: New file.
8993
9f0234cb 8994 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 8995
8996 * include/grub/i386/pc/pxe.h: Likewise.
8997
6977d49f 89982008-08-05 Bean <bean123ch@gmail.com>
8999
9000 * util/console.c (grub_console_cur_color): New variable.
9001 (grub_console_standard_color): Likewise.
9002 (grub_console_normal_color): Likewise.
9003 (grub_console_highlight_color): Likewise.
9004 (color_map): Likewise.
9005 (use_color): Likewise.
9006 (NUM_COLORS): New macro.
9007 (grub_ncurses_setcolorstate): Handle color properly.
9008 (grub_ncurses_setcolor): Don't change color here, just remember the
9009 settings, color will be set in grub_ncurses_setcolorstate.
9010 (grub_ncurses_getcolor): New function.
9011 (grub_ncurses_init): Initialize color pairs.
9012 (grub_ncurses_term): New member grub_ncurses_getcolor.
9013
9c2ff3ee 90142008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 9015
9c2ff3ee 9016 High resolution timer support. Implemented for x86 CPUs using TSC.
9017 Extracted generic grub_millisleep() so it's linked in only as needed.
9018 This requires a Pentium compatible CPU; if the RDTSC instruction is
9019 not supported, then it falls back on the generic grub_get_time_ms()
9020 implementation that uses the machine's RTC.
9021
9022 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
9023 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
9024 `kern/generic/millisleep.c'.
9025
9026 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
9027 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
9028
9029 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
9030 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
9031
9032 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
9033
9034 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
9035 `kern/generic/millisleep.c'.
9036
9037 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
9038
9039 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
9040
9041 * kern/generic/rtc_get_time_ms.c: New file.
9042
9043 * kern/generic/millisleep.c: New file.
337f5a1e 9044
9c2ff3ee 9045 * kern/misc.c: Don't include
9046 <kern/time.h> anymore.
9047 (grub_millisleep_generic): Removed.
9048
9049 * commands/sleep.c (grub_interruptible_millisleep): Uses
9050 grub_get_time_ms() instead of grub_get_rtc().
9051
9052 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
9053 function.
9054 (grub_cpu_is_cpuid_supported): New inline function.
9055 (grub_cpu_is_tsc_supported): New inline function.
9056 (grub_tsc_init): New function prototype.
9057 (grub_tsc_get_time_ms): New function prototype.
9058
9059 * kern/i386/tsc.c (grub_get_time_ms): New file.
9060
9061 * include/grub/time.h: Include <grub/types.h.
9062 (grub_millisleep_generic): Removed.
9063 (grub_get_time_ms): New prototype.
9064 (grub_install_get_time_ms): New prototype.
9065 (grub_rtc_get_time_ms): New prototype.
9066
9067 * kern/time.c (grub_get_time_ms): New function.
9068 (grub_install_get_time_ms): New function.
9069
9070 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
9071 <grub/time.h> anymore.
9072 (grub_millisleep): Removed.
9073 (grub_machine_init): Call grub_tsc_init.
9074
9075 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
9076 get_time_ms() implementation.
9077
9078 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
9079 (ieee1275_get_time_ms): New function.
9080 (grub_machine_init): Install get_time_ms() implementation.
9081
9082 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
9083 (grub_machine_init): Call grub_tsc_init().
9084 (grub_millisleep): Removed.
bf06a93f 9085
9c2ff3ee 9086 * kern/ieee1275/init.c (grub_millisleep): Removed.
9087 (grub_machine_init): Install ieee1275_get_time_ms()
9088 implementation.
9089 (ieee1275_get_time_ms): New function.
9090 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
9091 real work.
9092
9ec92aaf 90932008-08-05 Marco Gerards <marco@gnu.org>
9094
9095 * disk/ata.c: Include <grub/pci.h>.
9096 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
9097 (grub_ata_initialize): Rewritten.
9098 (grub_ata_device_initialize): New function.
9099
8d23f507 91002008-08-04 Pavel Roskin <proski@gnu.org>
9101
9102 * kern/main.c: Include grub/mm.h.
9103
5e15ee3d 91042008-08-04 Robert Millan <rmh@aybabtu.com>
9105
9106 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
9107 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
9108 corruption problem).
9109
a9053f8f 91102008-08-04 Robert Millan <rmh@aybabtu.com>
9111
9112 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
9113 warnings introduced in my last commit.
9114
dd19c7d7 91152008-08-03 Robert Millan <rmh@aybabtu.com>
9116
9117 Make PCI available on all i386 architectures.
9118
9119 * include/grub/i386/pc/pci.h: Move from here ...
9120 * include/grub/i386/pci.h: ... to here.
9121
9122 * include/grub/i386/pc/pci.h: Remove.
9123 * include/grub/i386/efi/pci.h: Remove.
9124 * include/grub/x86_64/efi/pci.h: Remove.
9125
9126 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
9127 `<grub/cpu/pci.h>'.
9128
9129 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
9130 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
9131 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
9132
9133 * conf/i386-ieee1275.rmk: Likewise.
9134
e14a6184 91352008-08-03 Robert Millan <rmh@aybabtu.com>
9136
9137 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
9138 (grub_console_setcursor): Make it possible to set cursor off.
9139
52768e37 91402008-08-03 Robert Millan <rmh@aybabtu.com>
9141
9142 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
9143 of modules instead of assuming which platform provides what.
9144 * util/update-grub.in: Likewise.
9145
2d52f57f 91462008-08-03 Robert Millan <rmh@aybabtu.com>
9147
9148 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
9149 instead of `grub_install_dos_part' to determine whether a drive needs
9150 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 9151 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 9152
2a5cd121 91532008-08-02 Robert Millan <rmh@aybabtu.com>
9154
9155 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
9156
93808428 91572008-08-02 Robert Millan <rmh@aybabtu.com>
9158
9159 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
9160 of informational grub_dprintf() calls.
9161
3bd0a12a 91622008-08-02 Robert Millan <rmh@aybabtu.com>
9163
9164 * disk/memdisk.c (memdisk_size): Don't initialize.
9165 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
9166
9167 * include/grub/i386/pc/kernel.h
9168 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
9169 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
9170 (grub_memdisk_image_size, grub_arch_memdisk_addr)
9171 (grub_arch_memdisk_size): Remove.
9172
9173 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
9174 field (was only used to transfer a constant). Add `type' field to
9175 support multiple module types.
9176 (grub_module_iterate): New function.
9177
9178 * kern/device.c (grub_device_open): Do not hide error messages
9179 when grub_disk_open() fails. Use grub_print_error() instead.
9180
9181 * kern/i386/pc/init.c (grub_arch_modules_addr)
9182 (grub_arch_memdisk_size): Remove functions.
9183 (grub_arch_modules_addr): Return the module address in high memory
9184 (now that it isn't copied anymore).
9185
9186 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
9187 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
9188 decompression routine (grub_total_module_size already includes that
9189 now). Don't copy modules back to low memory.
9190
9191 * kern/main.c: Include `<grub/mm.h>'.
9192 (grub_load_modules): Split out (and use) ...
9193 (grub_module_iterate): ... this function, which iterates through
9194 module objects and runs a hook.
9195 Comment out grub_mm_init_region() call, as it would cause non-ELF
9196 modules to be overwritten.
9197
9198 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
9199 the memdisk image in its own region, make it part of the module list.
9200 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
9201 (main): Parse --memdisk|-m option, and pass user-provided path as
9202 parameter to generate_image().
9203 (add_segments): Pass `memdisk_path' down to load_modules().
9204 (load_modules): Embed memdisk image in module section when requested.
9205 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
9206 `header.type' instead of `header.offset'.
9207
9208 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
9209 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
9210 (memdisk_mod_LDFLAGS): New variables.
9211 * conf/i386-coreboot.rmk: Likewise.
9212 * conf/i386-ieee1275.rmk: Likewise.
9213
a927cc73 92142008-08-02 Robert Millan <rmh@aybabtu.com>
9215
9216 * loader/i386/pc/multiboot.c (playground, forward_relocator)
9217 (backward_relocator): New variables. Used to allocate and relocate
9218 the payload, respectively.
9219 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 9220 address, install the appropriate relocator code in each bound of
a927cc73 9221 the payload, and set the entry point such that
9222 grub_multiboot_real_boot() will jump to one of them.
9223
9224 * kern/i386/loader.S (grub_multiboot_payload_size)
9225 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
9226 (grub_multiboot_payload_entry_offset): New variables.
9227 (grub_multiboot_real_boot): Set cpu context to what the relocator
9228 expects, and jump to the relocator instead of the payload.
9229
9230 * include/grub/i386/loader.h (grub_multiboot_payload_size)
9231 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
9232 (grub_multiboot_payload_entry_offset): Export.
9233
b15d8a0c 92342008-08-01 Bean <bean123ch@gmail.com>
9235
9236 * normal/menu_entry.c (editor_getline): Don't return the original
9237 string as result, as it will be released by lexer once it has done
9238 using it.
9239
cdfb3d22 92402008-08-01 Robert Millan <rmh@aybabtu.com>
9241
9242 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
9243 within menuentries, not before them.
9244 util/grub.d/10_hurd.in: Likewise.
9245
9175e93d 92462008-08-01 Bean <bean123ch@gmail.com>
9247
9248 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
9249 (bufio_mod_SOURCES): New macro.
9250 (bufio_mod_CFLAGS): Likewise.
9251 (bufio_mod_LDFLAGS): Likewise.
9252
9253 * include/grub/bufio.h: New file.
9254
9255 * io/bufio.c: Likewise.
9256
9257 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
9258 (grub_video_reader_png): Use grub_buffile_open to open file.
9259
9260 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
9261 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
9262
9263 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
9264 (grub_video_reader_tga): Use grub_buffile_open to open file.
9265
9266 * font/manager.c: Include <grub/bufio.h>.
9267 (add_font): Use grub_buffile_open to open file.
9268
3d8383e7 92692008-07-31 Robert Millan <rmh@aybabtu.com>
9270
9271 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
9272 ELF segments, use a macro for arbitrarily accessing any of them instead
9273 of preparing a pointer that allows access to one at a time.
9274 (grub_multiboot_load_elf64): Likewise.
9275
16e641b6 92762008-07-31 Bean <bean123ch@gmail.com>
9277
9278 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
9279 GRUB_KERNEL_MACHINE_DATA_END.
9280
59198b72 92812008-07-30 Robert Millan <rmh@aybabtu.com>
9282
9283 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
9284 Increase from 0x50 to 0x60.
9285 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
9286 use UUIDs to identify the root drive for them. If that's not
9287 possible, abort.
9288 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
9289 check, for cross-disk installs.
9290
ae88bca3 92912008-07-30 Robert Millan <rmh@aybabtu.com>
9292
9293 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
9294 is non-empty, use it to set the `prefix' environment variable instead
9295 of the usual approach.
9296 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
9297 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
9298 environment variable instead of dummy make_install_device().
9299
9300 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
9301 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 9302 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 9303
9304 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
9305 New variable reference.
9306 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
9307 New macro. Defines offset of `grub_prefix' within startup.S (relative
9308 to `start').
9309 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
9310 section within startup.S (relative to `start').
9311 * include/grub/i386/coreboot/kernel.h: Likewise.
9312
9313 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
9314 Overwrite grub_prefix with its contents, at the beginning of the
9315 first segment.
9316 (main): Understand -p|--prefix.
9317
14f41dd1 93182008-07-30 Robert Millan <rmh@aybabtu.com>
9319
9320 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
9321
4ca049a3 93222008-07-30 Robert Millan <rmh@aybabtu.com>
9323
9324 * term/i386/pc/vga_text.c (grub_console_cls): Use
9325 grub_console_gotoxy() to go back to beginning of the screen.
9326 Found by Patrick Georgi <patrick.georgi@coresystems.de>
9327
2921d337 93282008-07-29 Christian Franke <franke@computer.org>
9329
9330 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9331 Add conversion of emulated mount points on Cygwin.
9332
b609876d 93332008-07-29 Christian Franke <franke@computer.org>
9334
9335 * util/update-grub.in: Add a check for admin
9336 group on Cygwin.
9337 Remove old `grub.cfg.new' before creation.
9338 Add `-f' to `mv' to handle the different filesystem
9339 semantics of Windows.
9340
e93e4679 93412008-07-29 Bean <bean123ch@gmail.com>
9342
9343 * normal/main.c (get_line): Fix buffer overflow bug.
9344
41694fd0 93452008-07-28 Robert Millan <rmh@aybabtu.com>
9346
9347 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
9348 (struct grub_apple_header): New struct. Describes the layout of
9349 the partmap header.
9350 (apple_partition_map_iterate): Check the header magic as well as the
9351 partition magic (which was already being checked).
9352
cfd0b4e6 93532008-07-28 Pavel Roskin <proski@gnu.org>
9354
9355 * genmk.rb: Add a warning to the beginning of the output that
9356 it's a generated file and should not be edited.
9357
93cce016 93582008-07-28 Robert Millan <rmh@aybabtu.com>
9359
9360 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
9361 with the same number are found, just use issue a warning with
9362 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 9363
cd1df915 93642008-07-27 Robert Millan <rmh@aybabtu.com>
9365
9366 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
9367 information.
9368
b70a8427 93692008-07-27 Bean <bean123ch@gmail.com>
9370
9371 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
9372 (grub_fat_find_dir): Ignore case when comparing filename.
9373
8f5e379f 93742008-07-27 Bean <bean123ch@gmail.com>
9375
9376 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
9377 smallino, as it's more descriptive, and i8count can be confused with
9378 the other field count.
9379 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
9380 inode type.
9381
a85cd5a0 93822008-07-27 Bean <bean123ch@gmail.com>
9383
9384 * commands/crc.c: New file.
9385
9386 * lib/crc.c: Likewise.
9387
9388 * include/grub/lib/crc.h: Likewise.
9389
9390 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
9391
9392 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
9393 (hexdump): Move this function to ...
9394
9395 * lib/hexdump.c: ... here.
9396
9397 * include/grub/hexdump.h: Renamed to ...
9398
9399 * include/grub/lib/hexdump.h: ... this.
9400
9401 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
9402
9403 * util/grub-editenv.c: Likewise.
9404
9405 * include/envblk.h: Renamed to ...
9406
9407 * include/lib/envblk.h: ... this.
9408
9409 * util/envblk.c: Renamed to ...
9410
9411 * lib/envblk.c: ... this.
9412
9413 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
9414 lib/hexdump.c.
9415 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
9416 (pkglib_MODULES): Add crc.mod.
9417 (hexdump_mod_SOURCES): Add lib/hexdump.c.
9418 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
9419 (crc_mod_SOURCES): New macro.
9420 (crc_mod_CFLAGS): Likewise.
9421 (crc_mod_LDFLAGS): Likewise.
9422
9423 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
9424
9425 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9426
9427 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9428
9429 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9430
9431 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
9432
c298def0 94332008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 9434
9435 * commands/help.c: Include <grub/term.h>.
9436 (TERM_WIDTH): Removed. Updated all users.
9437
cc349fb3 94382008-07-27 Pavel Roskin <proski@gnu.org>
9439
9440 * util/getroot.c (find_root_device): Rephrase a comment to avoid
9441 spurious warnings about a comment within a comment.
9442
9051607e 94432008-07-25 Robert Millan <rmh@aybabtu.com>
9444
9445 * util/getroot.c (find_root_device): Skip devices that match
9446 /dev/dm-[0-9]. This lets the real device be found for any type of
9447 abstraction (LVM, EVMS, RAID..).
9448 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
9449 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
9450 device is found first, find_root_device() will now skip it.
9451
01453bfc 94522008-07-24 Pavel Roskin <proski@gnu.org>
9453
9454 * include/grub/types.h: Use __builtin_bswap32() and
9455 __builtin_bswap64() with gcc 4.3 and newer.
9456
6af9849f 94572008-07-24 Christian Franke <franke@computer.org>
9458
3a0fa256 9459 * util/i386/pc/grub-install.in: If `--debug' is specified,
9460 pass `--verbose' to grub-setup.
9461 Abort script if make_system_path_relative_to_its_root() fails.
9462
7810e747 94632008-07-24 Bean <bean123ch@gmail.com>
9464
9465 * configure.ac: Fixed a bug caused by the previous cygwin patch,
9466 variable `target_platform' should be `platform'.
9467
42290e17 94682008-07-24 Bean <bean123ch@gmail.com>
9469
51cc5193 9470 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 9471 (grub_png_init_fixed_block): New function.
9472 (grub_png_decode_image_data): Handle fixed huffman code compression.
9473
2a8a80e4 94742008-07-24 Bean <bean123ch@gmail.com>
9475
9476 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
9477 (grub_pe2elf_SOURCES): New macro.
9478 (CLEANFILES): Add grub-pe2elf.
9479
9480 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
9481 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
9482 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
9483 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
9484 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
9485 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
9486 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
9487 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
9488 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
9489 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
9490 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
9491 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
9492 (GRUB_PE32_DT_FUNCTION): Likewise.
9493 (GRUB_PE32_REL_I386_DIR32): Likewise.
9494 (GRUB_PE32_REL_I386_REL32): Likewise.
9495 (grub_pe32_symbol): New structure.
9496 (grub_pe32_reloc): Likewise.
9497
9498 * util/grub-pe2elf.c: New file.
9499
9500 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
9501 start symbol in non pc platform.
9502
9503 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
9504
9505 The following patches are from Christian Franke.
9506
9507 * include/grub/dl.h: Remove .previous, gas supports this only
9508 for ELF format.
9509
9510 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
9511 Remove .type, gas supports this only for ELF format.
9512
9513 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
9514 nullbytes in symbol table. This fixes an infinite loop if table is
9515 zero filled.
9516
9517 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
9518 TARGET_IMG_LDFLAGS and EXEEXT.
9519
9520 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
9521 TARGET_IMG_LDFLAGS_AC.
9522 (grub_CHECK_STACK_ARG_PROBE): New function.
9523
9524 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
9525
9526 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
9527
9528 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
9529 to set TARGET_IMG_LD* accordingly.
9530 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
9531 Add call to grub_CHECK_STACK_ARG_PROBE.
9532 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
9533
9534 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
9535
9536 * genmk.rb: Add EXEEXT to CLEANFILES.
9537
12ccdb75 95382008-07-23 Robert Millan <rmh@aybabtu.com>
9539
9540 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
9541 define the codes for arrows and lines used for the menu).
9542 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
9543 as well.
9544
9545 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
9546 fonts, because the latter are too slow.
9547
18eeaf04 95482008-07-21 Bean <bean123ch@gmail.com>
9549
9550 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
9551 a20. Run keyboard test last, as it will cause macbook to halt.
9552
b095e2ad 95532008-07-18 Pavel Roskin <proski@gnu.org>
9554
9555 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
9556 load foreign architecture modules correctly anyway. Keep
9557 support for loading host architecture modules, whether we
9558 compile them or not.
9559
737feb35 95602008-07-17 Pavel Roskin <proski@gnu.org>
9561
3f4ce737 9562 * configure.ac: Use -m32 or -m64 regardless of whether we had to
9563 change target_cpu. The compiler default can mismatch target_cpu
9564 in any case.
9565
4ad2d049 9566 * disk/efi/efidisk.c: Fix format warnings on x86_64.
9567 * kern/efi/efi.c: Likewise.
9568
f6130a12 9569 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
9570 target compiler is functional.
9571 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
9572 are set up.
9573
58393a2d 9574 * configure.ac: Default to efi platform for x86_64-apple. Allow
9575 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
9576 adjustments from the rest, only do them if target is not
9577 explicitly given. Merge other adjustments with the final sanity
9578 check. Remove an extraneous check for supported CPU. Be
9579 specific which CPU and which platform is not supported.
9580
737feb35 9581 * configure.ac: Default to pc platform for x86_64.
9582
546f966a 95832008-07-17 Robert Millan <rmh@aybabtu.com>
9584
9585 Partial LinuxBIOS -> Coreboot rename.
9586
9587 * conf/i386-linuxbios.rmk: Renamed to ...
9588 * conf/i386-coreboot.rmk: ... this.
9589 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
9590 * configure.ac: Accept "coreboot" as input platform (but maintain
9591 compatibility with "linuxbios").
9592 * include/grub/i386/linuxbios: Renamed to ...
9593 * include/grub/i386/coreboot: ... this.
9594
20011694 95952008-07-17 Bean <bean123ch@gmail.com>
9596
9597 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 9598 (appleldr_mod_SOURCE): New variable.
20011694 9599 (appleldr_mod_CFLAGS): Likewise.
9600 (appleldr_mod_LDFLAGS): Likewise.
9601 (pci_mod_SOURCES): Likewise.
9602 (pci_mod_CFLAGS): Likewise.
9603 (pci_mod_LDFLAGS): Likewise.
9604 (lspci_mod_SOURCES): Likewise.
9605 (lspci_mod_CFLAGS): Likewise.
9606 (lspci_mod_LDFLAGS): Likewise.
9607
9608 * conf/x86_64-efi.rmk: New file.
9609
9610 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
9611 macro.
9612 (grub_efidisk_write): Likewise.
9613
9614 * include/efi/api.h (efi_call_0): New macro.
9615 (efi_call_1): Likewise.
9616 (efi_call_2): Likewise.
9617 (efi_call_3): Likewise.
9618 (efi_call_4): Likewise.
9619 (efi_call_5): Likewise.
9620 (efi_call_6): Likewise.
9621
9622 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
9623 grub_rescue_cmd_chainloader.
9624
9625 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
9626 (grub_pe32_optional_header): Change some fields based on i386 or
9627 x86_64 platform.
9628 (GRUB_PE32_PE32_MAGIC): Likewise.
9629
9630 * include/grub/efi/uga_draw.h: New file.
9631
9632 * include/grub/elf.h (STN_ABS): New constant.
9633 (R_X86_64_NONE): Relocation constant for x86_64.
9634 (R_X86_64_64): Likewise.
9635 (R_X86_64_PC32): Likewise.
9636 (R_X86_64_GOT32): Likewise.
9637 (R_X86_64_PLT32): Likewise.
9638 (R_X86_64_COPY): Likewise.
9639 (R_X86_64_GLOB_DAT): Likewise.
9640 (R_X86_64_JUMP_SLOT): Likewise.
9641 (R_X86_64_RELATIVE): Likewise.
9642 (R_X86_64_GOTPCREL): Likewise.
9643 (R_X86_64_32): Likewise.
9644 (R_X86_64_32S): Likewise.
9645 (R_X86_64_16): Likewise.
9646 (R_X86_64_PC16): Likewise.
9647 (R_X86_64_8): Likewise.
9648 (R_X86_64_PC8): Likewise.
9649
9650 * include/grub/i386/efi/pci.h: New file.
9651
9652 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
9653 Change it value based on platform.
9654 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
9655 (GRUB_E820_RAM): Likewise.
9656 (GRUB_E820_RESERVED): Likewise.
9657 (GRUB_E820_ACPI): Likewise.
9658 (GRUB_E820_NVS): Likewise.
9659 (GRUB_E820_EXEC_CODE): Likewise.
9660 (GRUB_E820_MAX_ENTRY): Likewise.
9661 (grub_e820_mmap): New structure.
9662 (linux_kernel_header): Change the efi field according to different
9663 kernel version, also field from linux_kernel_header.
9664
9665 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
9666
9667 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
9668 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
9669 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
9670 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
9671 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
9672 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
9673 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
9674 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
9675 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
9676 (GRUB_PCI_ADDR_IO_MASK): Likewise.
9677
9678 * include/grub/x86_64/efi/kernel.h: New file.
9679
9680 * include/grub/x86_64/efi/loader.h: Likewise.
9681
9682 * include/grub/x86_64/efi/machine.h: Likewise.
9683
9684 * include/grub/x86_64/efi/pci.h: Likewise.
9685
9686 * include/grub/x86_64/efi/time.h: Likewise.
9687
9688 * include/grub/x86_64/linux.h: Likewise.
9689
9690 * include/grub/x86_64/setjmp.h: Likewise.
9691
9692 * include/grub/x86_64/time.h: Likewise.
9693
9694 * include/grub/x86_64/types.h: Likewise.
9695
9696 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
9697 GRUB_TARGET_SIZEOF_VOID_P.
9698
9699 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
9700 (grub_efi_locate_handle): Likewise.
9701 (grub_efi_open_protocol): Likewise.
9702 (grub_efi_set_text_mode): Likewise.
9703 (grub_efi_stall): Likewise.
9704 (grub_exit): Likewise.
9705 (grub_reboot): Likewise.
9706 (grub_halt): Likewise.
9707 (grub_efi_exit_boot_services): Likewise.
9708 (grub_get_rtc): Likewise.
9709
9710 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
9711 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
9712 (grub_efi_allocate_pages): Wrap efi calls.
9713 (grub_efi_free_pages): Wrap efi calls.
9714 (grub_efi_get_memory_map): Wrap efi calls.
9715
9716 * kern/x86_64/dl.c: New file.
9717
9718 * kern/x86_64/efi/callwrap.S: Likewise.
9719
9720 * kern/x86_64/efi/startup.S: Likewise.
9721
9722 * loader/efi/appleloader.c: Likewise.
9723
9724 * loader/efi/chainloader.c (cmdline): New variable.
9725 (grub_chainloader_unload): Wrap efi calls.
9726 (grub_chainloader_boot): Likewise.
9727 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
9728 command line.
9729
9730 * loader/efi/chainloader_normal.c (chainloader_command):
9731 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
9732 command line.
9733
9734 * loader/i386/efi/linux.c (allocate_pages): Change allocation
9735 method.
9736 (grub_e820_add_region): New function.
9737 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
9738 booting.
9739 (grub_find_video_card): New function.
9740 (grub_linux_setup_video): New function.
9741 (grub_rescue_cmd_linux): Probe for video information.
9742
9743 * normal/x86_64/setjmp.S: New file.
9744
9745 * term/efi/console.c (map_char): New function.
9746 (grub_console_putchar): Map unicode char.
9747 (grub_console_checkkey): Wrap efi calls.
9748 (grub_console_getkey): Likewise.
9749 (grub_console_getwh): Likewise.
9750 (grub_console_gotoxy): Likewise.
9751 (grub_console_cls): Likewise.
9752 (grub_console_setcolorstate): Likewise.
9753 (grub_console_setcursor): Likewise.
9754
9755 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
9756
59652a20 97572008-07-16 Pavel Roskin <proski@gnu.org>
9758
ef294055 9759 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
9760 format strings.
9761
59652a20 9762 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
9763 pointer, not an integer. This fixes a warning and prevents
9764 precision loss on 64-bit systems.
9765 (relocate_addresses): Remove unneeded cast.
9766
afc3b5d7 97672008-07-15 Pavel Roskin <proski@gnu.org>
9768
506b2b3e 9769 * kern/i386/ieee1275/init.c: Include grub/cache.h.
9770
62ead89c 9771 * term/ieee1275/ofconsole.c: Disable code unused on i386.
9772
c4cd51d7 9773 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
9774 Fix comparison between signed and unsigned.
9775
0d3d8f28 9776 * include/grub/i386/ieee1275/console.h: Declare
9777 grub_console_init() and grub_console_fini().
9778
8804b286 9779 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
9780 It's empty and unused.
9781
ee01cf35 9782 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
9783 beginning to avoid warnings with some compilers.
9784
afc3b5d7 9785 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
9786 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
9787
e4e8eaa5 97882008-07-14 Pavel Roskin <proski@gnu.org>
9789
407aceb4 9790 * kern/env.c (grub_register_variable_hook): Don't copy empty
9791 string, it leaks memory. Pass "" to grub_env_set(), it should
9792 handle constant strings.
9793
e4e8eaa5 9794 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
9795 * commands/cmp.c (grub_cmd_cmp): Likewise.
9796 * kern/dl.c (grub_dl_flush_cache): Likewise.
9797 (grub_dl_load_core): Likewise.
9798 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
9799 (grub_elf64_load_phdrs): Likewise.
9800
d4e2dad3 98012008-07-13 Pavel Roskin <proski@gnu.org>
9802
9803 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
9804 between signed and unsigned.
9805 (LzmaEnc_Finish): Fix warning about an unused parameter.
9806
aa24b516 98072008-07-13 Bean <bean123ch@gmail.com>
9808
9809 * Makefile.in (enable_lzo): New rule.
9810
9811 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
9812
9813 * configure.ac (ENABLE_LZO): New option --enable-lzo.
9814
9815 * boot/i386/pc/lnxboot.S: #include <config.h>.
9816
9817 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 9818 its value according to the compression algorithm used, lzo or lzma.
aa24b516 9819
9820 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
9821 compression algorithm according to configure macro.
9822
9823 * kern/i386/pc/startup.S (codestart): Likewise.
9824
9825 * kern/i386/pc/lzma_decode.S: New file.
9826
9827 * include/grub/lib/LzFind.h: Likewise.
9828
9829 * include/grub/lib/LzHash.h: Likewise.
9830
9831 * include/grub/lib/LzmaDec.h: Likewise.
9832
9833 * include/grub/lib/LzmaEnc.h: Likewise.
9834
9835 * include/grub/lib/LzmaTypes.h: Likewise.
9836
9837 * lib/LzFind.c: Likewise.
9838
9839 * lib/LzmaDec.c: Likewise.
9840
9841 * lib/LzmaEnc.c: Likewise.
9842
4ae821ac 98432008-07-13 Bean <bean123ch@gmail.com>
9844
9845 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
9846 (grub_ext4_extent_header): New structure.
9847 (grub_ext4_extent): Likewise.
9848 (grub_ext4_extent_idx): Likewise.
9849 (grub_ext4_find_leaf): New function.
9850 (grub_ext2_read_block): Handle extents.
9851
9a745147 98522008-07-12 Robert Millan <rmh@aybabtu.com>
9853
9854 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
9855
d49a4cf6 98562008-07-11 Robert Millan <rmh@aybabtu.com>
9857
9858 * util/grub.d/40_custom.in: New file. Example on how to add custom
9859 entries to /etc/grub.d.
9860 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
9861 40_custom (implicitly, by merging all the grub.d rules).
9862
947414b4 98632008-07-11 Pavel Roskin <proski@gnu.org>
9864
0059cf6f 9865 * commands/read.c (grub_getline): Fix invalid memory access.
9866 Don't add newline to the variable value.
9867
947414b4 9868 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
9869 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
9870 (serial_hw_get_port): Check validity of the port number.
9871 (grub_cmd_serial): Check return value of serial_hw_get_port().
9872
62a02d00 98732008-07-07 Pavel Roskin <proski@gnu.org>
9874
9875 * boot/i386/pc/diskboot.S (notification_string): Replace
9876 "Loading kernel" with just "loading". This is shorter, less
9877 confusing and saves a few bytes for possible future changes.
9878
3e5581b0 98792008-07-05 Pavel Roskin <proski@gnu.org>
9880
ea387a48 9881 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
9882 size for ATAPI devices, they are undefined. Output sector
9883 number in decimal form.
9884
3e5581b0 9885 * disk/ata.c: Use named constants for status bits.
9886
fdecb8fd 98872008-07-04 Pavel Roskin <proski@gnu.org>
9888
bcd35b90 9889 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
9890 grub_addr_t before casting it to the void pointer to fix a
9891 warning. Non-addressable regions are discarded earlier.
9892 (grub_arch_modules_addr): Cast _end to grub_addr_t.
9893 * kern/i386/linuxbios/table.c: Include grub/misc.h.
9894 (check_signature): Don't shadow table_header.
9895 (grub_linuxbios_table_iterate): Cast numeric constants to
9896 grub_linuxbios_table_header_t.
9897 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
9898 grub_stop().
9899
af58ab3d 9900 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
9901 prevent warnings.
9902
1759aa57 9903 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
9904 pointer, which can cause warnings. Support 64-bit addresses.
9905
fdecb8fd 9906 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
9907 of sizeof(long). This fixes PowerPC image generation on x86_64.
9908
8516d2a8 99092008-07-04 Robert Millan <rmh@aybabtu.com>
9910
9911 This fixes a performance issue when pc & gpt partmap iterators
9912 didn't abort iteration even after our hook found what it was
fe987087 9913 looking for (often causing expensive probes of non-existent drives).
8516d2a8 9914
9915 Some callers relied on previous buggy behaviour, since they would
34c44600 9916 raise an error when their own hooks caused early abortion of its
8516d2a8 9917 iteration.
9918
9919 * kern/device.c (grub_device_open): Improve error message.
9920 * disk/lvm.c (grub_lvm_open): Likewise.
9921 * disk/raid.c (grub_raid_open): Likewise.
9922
9923 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
9924 when hook requests it, independently of grub_errno.
9925 (pc_partition_map_probe): Do not fail when find_func() caused
9926 early abortion of pc_partition_map_iterate().
9927
9928 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
9929 when hook requests it, independently of grub_errno.
9930 (gpt_partition_map_probe): Do not fail when find_func() caused
9931 early abortion of gpt_partition_map_iterate().
9932
9933 * kern/partition.c (grub_partition_iterate): Abort parent iteration
9934 when hook requests it, independently of grub_errno. Do not fail when
9935 part_map_iterate_hook() caused early abortion of p->iterate().
9936
9937 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
9938 when grub_partition_iterate() returned with non-zero.
9939
277d0de9 99402008-07-03 Pavel Roskin <proski@gnu.org>
9941
9942 * disk/ata.c (grub_ata_pio_write): Check status before writing,
9943 like we do in grub_ata_pio_read().
9944 (grub_ata_readwrite): Always write individual sectors. Fix the
9945 sector count for the remainder.
9946 (grub_ata_write): Enable writing to ATA devices. Correctly
9947 report error for ATAPI devices.
9948
d4c9b428 99492008-07-02 Pavel Roskin <proski@gnu.org>
9950
e43fc690 9951 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
9952 warning.
9953
f707af42 9954 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
9955 for every read sector, we already increment it for the whole
9956 batch. This fixes reading more than 256 sectors at once.
9957
11e16b15 9958 * util/grub-editenv.c (cmd_info): Cast argument to long
9959 explicitly. ptrdiff_t reduces to int on i386.
9960
cbabfdd4 9961 * util/grub-editenv.c (main): Be specific which parameter is
9962 missing.
9963
b8fbce0a 9964 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
9965 (memdisk): Make memdisk_orig_addr a pointer.
9966
c9c8e606 9967 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
9968 for file offsets, use grub_off_t instead. Fix printf format
9969 warnings.
9970
ca62e598 9971 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
9972 there. Real unexpected warnings should not drown in the noise
9973 about known problems.
9974
ce8d1766 9975 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
9976 grub_disk_addr_t for memory addresses.
9977
00c7a56a 9978 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
9979 explicitly to fix a warning.
9980
08d3ef09 9981 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
9982
cb71ba20 9983 * Makefile.in (MODULE_LDFLAGS): New variable.
9984 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
9985 the linker accepts --build-id=none.
9986 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
9987 MODULE_LDFLAGS.
9988 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
9989
d4c9b428 9990 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
9991 those in Linux XFS code. Provide a way to access 64-bit parent
9992 inode.
9993 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
9994 the end of struct grub_xfs_dir_header.
9995
d4156eee 99962008-07-02 Bean <bean123ch@gmail.com>
9997
9998 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
9999 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
10000 and GRUB_IEEE1275_FLAG_NO_ANSI.
10001
10002 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
10003 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
10004 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
10005
10006 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
10007 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
10008
10009 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
10010 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
10011
10012 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
10013 esc sequence on non ANSI terminal.
10014 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
10015
10016 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
10017 beginning of file.
10018
2270f77b 100192008-07-02 Bean <bean123ch@gmail.com>
10020
10021 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
10022 (grub_editenv_SOURCES): New variable.
10023 (pkglib_MODULES): Add loadenv.mod.
10024 (loadenv_mod_SOURCES): New variable.
10025 (loadenv_mod_CFLAGS): Likewise.
10026 (loadenv_mod_LDFLAGS): Likewise.
10027
10028 * include/grub/envblk.h: New file.
10029
10030 * util/envblk.c: New file.
10031
10032 * util/grub-editenv.c: New file.
10033
10034 * commands/loadenv.c: New file.
10035
0e9e51ec 100362008-07-01 Pavel Roskin <proski@gnu.org>
10037
d89b7634 10038 * include/multiboot2.h (struct multiboot_tag_module): Use char,
10039 not unsigned char. This fixes warnings and is consistent with
10040 other tags.
10041
bf1835b1 10042 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
10043
8222a04b 10044 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
10045
6a42d99d 10046 * term/tparm.c (analyze): Always set *popcount.
10047
10b159d1 10048 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
10049 cast to fix a warning.
10050
b8789f6c 10051 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
10052 cast to suppress a warning.
10053
29d7e38a 10054 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
10055 grub_fshelp_read_file() expects.
10056
f341f669 10057 * fs/fat.c: Fix UUID calculation on big-endian systems. We
10058 write uuid as a 32-bit value in CPU byte order, so declare and
10059 use it as such.
10060
0e9e51ec 10061 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
10062 long if the format specifier expects it.
10063 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
10064 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10065 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
10066 long to fix a warning.
10067 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
10068 grub_dprintf() arguments to fix warnings.
10069
3aefa857 100702008-06-30 Pavel Roskin <proski@gnu.org>
10071
56c7668b 10072 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
10073 install_bsd_part immediately before core.img is embedded or
10074 modified on disk. This fixes core.img verification if core.img
10075 cannot be embedded.
10076
3aefa857 10077 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
10078 core_path to calculate the blocklist.
10079 Patch from Javier Martín <lordhabbit@gmail.com>
10080
5444088d 100812008-06-29 Robert Millan <rmh@aybabtu.com>
10082
10083 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
10084 block to disk block.
10085 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
10086 Patch from Niels Böhm <bitbucket@arcor.de>
10087
674835c8 100882008-06-29 Robert Millan <rmh@aybabtu.com>
10089
10090 * util/update-grub_lib.in (font_path): Search for fonts in
10091 /boot/grub first, which is more likely to be readable (we aren't
10092 deciding where fonts live, just looking for them).
10093
f527dbc8 100942008-06-26 Pavel Roskin <proski@gnu.org>
10095
6c2d8df6 10096 * util/biosdisk.c (read_device_map): Don't leave dead map
10097 entries for devices failing stat() check.
10098
f527dbc8 10099 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
10100 core_path_dev for the core.img path on the target device.
10101
aebe3d13 101022008-06-26 Robert Millan <rmh@aybabtu.com>
10103
10104 * disk/fs_uuid.c: New file.
10105 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
10106 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
10107 (fs_uuid_mod_LDFLAGS): New variables.
10108 * include/grub/disk.h (grub_disk_dev_id): Add
10109 `GRUB_DISK_DEVICE_UUID_ID'.
10110 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
10111 implement iterate().
10112
37aaf354 101132008-06-26 Robert Millan <rmh@aybabtu.com>
10114
10115 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
10116 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
10117 Linux image includes no initrd.
10118
25ff262a 101192008-06-21 Javier Martín <lordhabbit@gmail.com>
10120
10121 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
10122 call to resolve the core image location that effectively appended the
10123 name twice.
10124
76a2bd44 101252008-06-21 Robert Millan <rmh@aybabtu.com>
10126
10127 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
10128 call from here ...
10129
10130 * util/grub.d/10_hurd.in: ... to here ...
10131 * util/grub.d/10_linux.in: ... and here.
10132
650e1c79 101332008-06-19 Robert Millan <rmh@aybabtu.com>
10134
fe987087 10135 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 10136 after it has been set by grub_machine_set_prefix().
10137
6ce63911 101382008-06-19 Robert Millan <rmh@aybabtu.com>
10139
10140 * commands/search.c (search_label, search_fs_uuid, search_file): Print
10141 search result when not saving to variable, not the other way around.
10142 When saving to variable, abort iteration as soon as a match is found.
10143
73940cec 101442008-06-19 Robert Millan <rmh@aybabtu.com>
10145
10146 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
10147 check for partition that provides /boot/grub. Its logic is flawed,
10148 as it prevents prepare_grub_to_access_device() from being called
10149 multiple times.
10150
3c62a39d 101512008-06-19 Robert Millan <rmh@aybabtu.com>
10152
10153 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
10154 "insmod" command directly when abstraction modules are needed,
fe987087 10155 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 10156 since it had already been processed).
10157
47395a42 101582008-06-19 Pavel Roskin <proski@gnu.org>
10159
10160 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
10161 changed. This is needed in case GRUB_LIBDIR changes.
10162 * conf/i386-ieee1275.rmk: Likewise.
10163 * conf/i386-linuxbios.rmk: Likewise.
10164 * conf/i386-pc.rmk: Likewise.
10165 * conf/powerpc-ieee1275.rmk: Likewise.
10166
a145ac2d 101672008-06-18 Pavel Roskin <proski@gnu.org>
10168
10169 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
10170 kernel_elf_symlist.c to symlist.c for consistency with other
10171 architectures. Update all users.
10172 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
10173
7847c51e 101742008-06-18 Robert Millan <rmh@aybabtu.com>
10175
10176 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
10177 it in prefix.
10178
10179 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
10180 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
10181 a RAID device, run setup() for all members independently on whether
10182 LVM abstraction is being used.
10183 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
10184 If grub-mkimage has set `*install_dos_part == -2', don't override this
10185 value.
10186 Perform *install_dos_part adjustments independently on whether
10187 we're embedding or not.
10188 Clarify error message when image is too big for embedding.
10189 Remove duplicate *install_dos_part stanza.
10190
b23e5644 101912008-06-17 Robert Millan <rmh@aybabtu.com>
10192
10193 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
10194 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
10195 variables.
10196 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
10197 values in grub_ofconsole_normal_color and
10198 grub_ofconsole_highlight_color (they're not directly related to
10199 background and foreground).
10200 (grub_ofconsole_setcolorstate): Extract background and foreground
10201 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
10202
0aac2f79 102032008-06-17 Robert Millan <rmh@aybabtu.com>
10204
10205 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
10206 /boot/grub for the check in last commit, not /boot (they could be
10207 different partitions).
10208
3cca7ef3 102092008-06-16 Robert Millan <rmh@aybabtu.com>
10210
10211 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
10212 asked to setup access for the same partition that provides /boot,
10213 don't bother using UUIDs since our root already has the value we
10214 want.
10215
347396d8 102162008-06-16 Robert Millan <rmh@aybabtu.com>
10217
10218 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
10219 I2O devices.
10220 Patch from Sven Mueller <sven@debian.org>.
10221
991477f8 102222008-06-16 Robert Millan <rmh@aybabtu.com>
10223
10224 * util/update-grub.in: Check for $EUID instead of $UID.
10225 Reported by Vincent Zweije.
10226
d31a32a1 102272008-06-16 Bean <bean123ch@gmail.com>
10228
fe987087 10229 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 10230 (grub_ext2_read_block): Likewise.
10231 (grub_ext2_read_inode): Likewise.
10232 (grub_ext2_mount): Likewise.
10233 (grub_ext2_close): Likewise.
10234 (grub_ext3_get_journal): Removed.
10235
fe987087 10236 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 10237 (grub_reiserfs_read_symlink): Likewise.
10238 (grub_reiserfs_mount): Likewise.
10239 (grub_reiserfs_open): Likewise.
10240 (grub_reiserfs_read): Likewise.
10241 (grub_reiserfs_close): Likewise.
10242 (grub_reiserfs_get_journal): Removed.
10243
10244 * fs/fshelp.c (grub_fshelp_read): Removed.
10245 (grub_fshelp_map_block): Likewise.
10246
10247 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
10248 (grub_fshelp_journal): Likewise.
10249 (grub_fshelp_read): Likewise.
10250 (grub_fshelp_map_block): Likewise.
10251
3540a760 102522008-06-16 Pavel Roskin <proski@gnu.org>
10253
10254 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
10255 floating point anymore.
10256 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
10257
95614c84 102582008-06-15 Pavel Roskin <proski@gnu.org>
10259
10260 * commands/ls.c (grub_ls_list_files): Use integer calculations
10261 for human readable format, avoid floating point use.
10262 * kern/misc.c (grub_ftoa): Remove.
10263 (grub_vsprintf): Remove floating point support.
10264
50465dd6 102652008-06-15 Robert Millan <rmh@aybabtu.com>
10266
fe6b695a 10267 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 10268 devices.
10269 Reported by Max Vozeler.
10270
a9207284 102712008-06-15 Robert Millan <rmh@aybabtu.com>
10272
10273 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
10274 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
10275 skipped later.
10276 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
10277 the beginning of the prefix.
10278
10279 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
10280 It is assumed that if we have a memdisk, grub-mkimage has set
10281 grub_prefix to include the "(memdisk)" drive in it.
10282
a7cbd45a 102832008-06-15 Robert Millan <rmh@aybabtu.com>
10284
10285 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
10286 Initialize keyboard controller after registering the terminal, so that
10287 grub_printf() can be called from grub_keyboard_controller_init().
10288
21cf716a 102892008-06-15 Robert Millan <rmh@aybabtu.com>
10290
10291 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
10292 extent-btree which is written as big endian on disk.
10293 Reported by Alain Greppin <al@chilibi.org>.
10294
23a64d8e 102952008-06-14 Robert Millan <rmh@aybabtu.com>
10296
10297 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
10298 * util/i386/pc/grub-install.in (modules): Likewise.
10299
d687651c 103002008-06-13 Pavel Roskin <proski@gnu.org>
10301
10302 * commands/ls.c (grub_ls_list_files): Fix format warnings.
10303
dfe9ddd4 103042008-06-13 Bean <bean123ch@gmail.com>
10305
10306 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
10307
10308 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
10309
10310 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
10311 to indicate sparse block.
10312
16ae7781 103132008-06-12 Pavel Roskin <proski@gnu.org>
10314
e6d1a308 10315 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
10316 number, grub_fshelp_read() does it for us.
10317
16ae7781 10318 * fs/fshelp.c (grub_fshelp_read): New function. Implement
10319 linear disk read with journal translation.
10320 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
10321 * include/grub/fshelp.h: Declare grub_fshelp_read().
10322
40fd3a2b 103232008-06-09 Pavel Roskin <proski@gnu.org>
10324
10325 * fs/minix.c (grub_minix_mount): Handle error reading
10326 superblock.
10327
f5679726 103282008-06-08 Robert Millan <rmh@aybabtu.com>
10329
10330 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
10331 don't append the RAID prefix afterwards.
10332 Reported by Clint Adams.
10333
ce525529 103342008-06-08 Robert Millan <rmh@aybabtu.com>
10335
10336 Based on description from Pavel:
10337 * kern/disk.c (grub_disk_check_range): Rename to ...
10338 (grub_disk_adjust_range): ... this. Add a comment explaining the
10339 tasks performed by this function.
10340
ad4936a0 103412008-06-08 Robert Millan <rmh@aybabtu.com>
10342
10343 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
10344 `num_serial' (for consistency with other variables).
10345 (struct grub_ntfs_data): Add `uuid' member.
10346 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
10347 (grub_ntfs_uuid): New function.
10348 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
10349
dc20b0f9 103502008-06-07 Pavel Roskin <proski@gnu.org>
10351
10352 * util/biosdisk.c (open_device): Revert last change to the
10353 function, it broke installation. The sector needs to be
10354 different dependent on which device is opened.
10355
c5e3cfba 103562008-06-06 Robert Millan <rmh@aybabtu.com>
10357
10358 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
10359 rest of GRUB, and breakage doesn't happen if its value were modified.
10360
10361 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10362 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
10363 a constant (same value).
10364 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
10365 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
10366
26a1f8c4 103672008-06-06 Robert Millan <rmh@aybabtu.com>
10368
10369 * util/biosdisk.c (open_device): Do not modify sector offset when
10370 accessing a partition. kern/disk.c already handles this for us.
10371
25d6b327 103722008-06-06 Robert Millan <rmh@aybabtu.com>
10373
10374 * util/grub-emu.c (grub_machine_init): Move code in this function from
10375 here ...
10376 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
10377 segfault in case grub_printf() is called).
10378
10379 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
10380 grub_probe. Update all users not to explicitly add it again.
10381 (grub_device): New variable; contains corresponding device for grubdir.
10382 (fs_module, partmap_module, devabstraction_module): Pass
10383 `--device ${grub_device}' to grub_probe to avoid traversing /dev
10384 every time.
10385
9ece62fb 103862008-06-05 Robert Millan <rmh@aybabtu.com>
10387
10388 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
10389 is found, print it (same layout as with labels).
10390
1ad36d37 103912008-06-04 Robert Millan <rmh@aybabtu.com>
10392
10393 * util/biosdisk.c (get_drive): Rename to ...
10394 (find_grub_drive): ... this. Update all users.
10395
10396 (get_os_disk): Rename to ...
10397 (convert_system_partition_to_system_disk): ... this. Update all users.
10398
10399 (find_drive): Rename to ...
10400 (find_system_device): ... this. Update all users.
10401
e6a30859 104022008-06-04 Robert Millan <rmh@aybabtu.com>
10403
10404 * util/biosdisk.c (get_os_disk): Handle IDA devices.
10405 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10406 (make_device_map): Likewise.
10407
00c108a4 104082008-06-01 Robert Millan <rmh@aybabtu.com>
10409
10410 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
10411 before dereferencing it.
10412
10413 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
10414 union with fat12/fat16-specific ones. Add some new fields, including
10415 `num_serial' for both versions.
10416 (struct grub_fat_data): Add `uuid' member.
10417 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
10418 names. Initialize `data->uuid' using `num_serial'.
10419 (grub_fat_uuid): New function.
10420 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
10421
10422 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
10423 (grub_reiserfs_uuid): New function.
10424 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
10425 member.
10426
10427 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
10428 (grub_xfs_uuid): New function.
10429 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
10430
1385c5bb 104312008-06-01 Robert Millan <rmh@aybabtu.com>
10432
10433 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
10434 code that is backward compatible with pre-uuid search command.
10435
c682dfd7 104362008-05-31 Robert Millan <rmh@aybabtu.com>
10437
10438 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
10439 floppies after everything else, to ensure floppy drive isn't accessed
10440 unnecessarily (patch from Bean).
10441
b7db5d47 104422008-05-31 Robert Millan <rmh@aybabtu.com>
10443
10444 * commands/search.c (search_label, search_fs_uuid, search_file): Do
10445 not print device names when we were asked to set a variable.
10446
6e037aa9 104472008-05-31 Robert Millan <rmh@aybabtu.com>
10448
10449 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
10450 using "cursor-on" and "cursor-off" commands (understood at least by
10451 the Open Firmware flavour on OLPC).
10452
41305bc8 104532008-05-31 Michael Gorven <michael@gorven.za.net>
10454
10455 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
10456 on and off sequences.
10457
69ba137e 104582008-05-31 Robert Millan <rmh@aybabtu.com>
10459
10460 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
10461 * util/update-grub.in: Likewise.
10462
520ae21b 104632008-05-30 Pavel Roskin <proski@gnu.org>
10464
10465 * util/biosdisk.c (linux_find_partition): Simplify logic and
10466 make the code more universal. Keep special processing for
10467 devfs, but use a simple rule for all other devices. If the
10468 device ends with a number, append 'p' and the partition number.
10469 Otherwise, append only the partition number.
10470
5786569b 104712008-05-30 Robert Millan <rmh@aybabtu.com>
10472
10473 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
10474 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
10475 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
10476 the `root' parameter to Linux.
10477
51500452 104782008-05-30 Robert Millan <rmh@aybabtu.com>
10479
10480 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
10481 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
10482 --fs_uuid with --fs-uuid.
10483 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
10484 all filesystems support them).
10485
811d3878 104862008-05-30 Robert Millan <rmh@aybabtu.com>
10487
10488 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 10489 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 10490
cab63c95 104912008-05-30 Robert Millan <rmh@aybabtu.com>
10492
10493 * util/grub.d/00_header.in: Remove obsolete comment referencing
10494 convert_system_path_to_grub_path().
10495 * util/update-grub.in: Likewise.
10496 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
10497 (convert_system_path_to_grub_path): Add a warning message explaining
10498 that this function is deprecated. Rely on is_path_readable_by_grub()
10499 for the readability checks.
10500 (font_path): Use is_path_readable_by_grub() for the readability
10501 check rather than convert_system_path_to_grub_path().
10502
972e2f7a 105032008-05-30 Robert Millan <rmh@aybabtu.com>
10504
10505 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
10506 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
10507 converting it first.
10508 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
10509 grub.cfg for access to font file, and afterwards call it again to set
10510 the root device.
10511
62191274 105122008-05-30 Robert Millan <rmh@aybabtu.com>
10513
10514 * commands/search.c (options): Add --fs_uuid option.
10515 (search_fs_uuid): New function.
10516 (grub_cmd_search): Fix --set argument passing.
10517 Use search_fs_uuid() when requested via --fs_uuid.
10518 (grub_search_init): Update help message.
10519 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
10520 and redeclare it as an array of 16-bit words.
10521 (grub_ext2_uuid): New function.
10522 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
10523 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
10524 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
10525 (GRUB_DEVICE_BOOT_UUID): New variables.
10526 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
10527 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
10528 whenever possible.
10529 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
10530 just assume `root' variable has the right value.
10531 * util/grub.d/10_linux.in: Likewise.
10532 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
10533 via PRINT_FS_UUID.
10534 (main): Recognise `-t fs_uuid' argument.
10535
01b73ec8 105362008-05-30 Robert Millan <rmh@aybabtu.com>
10537
10538 * util/biosdisk.c (map): Redefine structure to hold information
10539 about GRUB drive name.
fe6b695a 10540 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 10541 drive names.
10542 (call_hook): Remove.
10543 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
10544 member. Assume drive has partitions.
10545 (grub_util_biosdisk_open): Access device names via `.device' struct
10546 member.
10547 (open_device): Likewise.
10548 (find_drive): Likewise.
10549 (read_device_map): Adjust map[] usage to match the new struct
10550 definition. Don't check for duplicates (still possible, but not cheap
10551 anymore).
10552 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
10553 (make_device_name): Remove assumption of BIOS-like drive names.
10554
22f16596 105552008-05-30 Pavel Roskin <proski@gnu.org>
10556
10557 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
10558 compiling execute.c doesn't need grub_script.tab.h anymore.
10559 (normal/command.c_DEPENDENCIES): Likewise.
10560 (normal/function.c_DEPENDENCIES): Likewise.
10561 * conf/i386-ieee1275.rmk: Likewise.
10562 * conf/i386-linuxbios.rmk: Likewise.
10563 * conf/i386-pc.rmk: Likewise.
10564 * conf/powerpc-ieee1275.rmk: Likewise.
10565 * conf/sparc64-ieee1275.rmk: Likewise.
10566
528ad8f2 105672008-05-29 Pavel Roskin <proski@gnu.org>
10568
d1dff95d 10569 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
10570 when scanning metadata for volume group name.
10571
528ad8f2 10572 * include/grub/script.h: Don't include grub_script.tab.h. It's
10573 a generated file, which may only be included from the files with
10574 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
10575 use union YYSTYPE, as the later allows forward declaration.
10576 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
10577
47248e08 105782008-05-29 Robert Millan <rmh@aybabtu.com>
10579
10580 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
10581 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
10582 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
10583 (grub_console_checkkey): Add grub_dprintf() call to report unknown
10584 scan codes.
10585
ee632529 105862008-05-29 Robert Millan <rmh@aybabtu.com>
10587
10588 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
10589 control key combinations.
10590
eee96e08 105912008-05-29 Robert Millan <rmh@aybabtu.com>
10592
10593 * util/powerpc/ieee1275/grub-install.in: Move from here ...
10594 * util/ieee1275/grub-install.in: ... to here.
10595 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
10596 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
10597 (grub_install_SOURCES): Likewise.
10598
da9a6a94 105992008-05-29 Robert Millan <rmh@aybabtu.com>
10600
10601 * fs/affs.c: Update copyright year.
10602 * fs/ext2.c: Likewise.
10603 * fs/fshelp.c: Likewise.
10604 * fs/hfsplus.c: Likewise.
10605 * fs/ntfs.c: Likewise.
10606 * fs/xfs.c: Likewise.
10607 * include/grub/fshelp.h: Likewise.
10608 * util/grub-mkdevicemap.c: Likewise.
10609
12e65f3a 106102008-05-28 Robert Millan <rmh@aybabtu.com>
10611
10612 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
10613 might need to be fatfs to support some firmware implementations
10614 (e.g. OFW or EFI).
10615
23023641 106162008-05-28 Robert Millan <rmh@aybabtu.com>
10617
10618 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
10619 devices.
10620 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10621 (make_device_map): Likewise.
10622
887d2619 106232008-05-20 Bean <bean123ch@gmail.com>
10624
10625 * fs/fshelp.c (grub_fshelp_map_block): New function.
10626 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
10627 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
10628
10629 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
10630 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
10631 (grub_fshelp_journal): New structure.
10632 (grub_fshelp_map_block): New function prototype.
10633 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
10634 (grub_fshelp_map_block): Likewise.
10635
10636 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
10637 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
10638 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
10639 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
10640 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
10641 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
10642 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
10643 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
10644 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
10645 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
10646 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
10647 (grub_ext2_sblock): New members for journal support.
10648 (grub_ext3_journal_header): New structure.
10649 (grub_ext3_journal_revoke_header): Likewise.
10650 (grub_ext3_journal_block_tag): Likewise.
10651 (grub_ext3_journal_sblock): Likewise.
10652 (grub_fshelp_node): New members logfile and journal.
10653 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
10654 grub_fshelp_map_block to get real block number.
10655 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
10656 number.
10657 (grub_ext2_read_inode): Likewise.
10658 (grub_ext3_get_journal): New function.
10659 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
10660 (grub_ext2_close): Release memory used by journal.
10661
10662 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
10663 (REISERFS_MAGIC_DESC_BLOCK): New macro.
10664 (grub_reiserfs_transaction_header): Renamed to
10665 grub_reiserfs_description_block, replace field data with real_blocks.
10666 (grub_reiserfs_commit_block): New structure.
10667 (grub_reiserfs_data): New member journal.
10668 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
10669 number.
10670 (grub_reiserfs_read_symlink): Likewise.
10671 (grub_reiserfs_iterate_dir): Likewise.
10672 (grub_reiserfs_open): Likewise.
10673 (grub_reiserfs_read): Likewise.
10674 (grub_reiserfs_get_journal): New function.
10675 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
10676 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
10677 using grub_reiserfs_get_journal.
10678 (grub_reiserfs_close): Release memory used by journal.
10679
10680 * fs/affs.c (grub_affs_read_block): Change block type to
10681 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
10682
10683 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
10684
10685 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
10686
10687 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
10688
10689 * fs/udf.c (grub_udf_read_block): Change block type to
10690 grub_disk_addr_t. Use type cast to avoid warning.
10691
10692 * fs/xfs.c (grub_xfs_read_block): Likewise.
10693
b7c6bed5 106942008-05-16 Christian Franke <franke@computer.org>
10695
10696 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
10697 to ensure that break with ESC will always work.
10698 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
10699 Remove ESC from keyboard queue.
10700
eedf167f 107012008-05-16 Christian Franke <franke@computer.org>
10702
10703 * util/biosdisk.c: [__CYGWIN__] Add includes.
10704 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
10705 (get_os_disk): Move variable declarations to OS specific
10706 parts to avoid warning.
10707 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
10708 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
10709 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
10710 Cygwin.
10711 * util/getroot.c: [__CYGWIN__] Add includes.
10712 (strip_extra_slashes): Fix "/" case.
10713 [__CYGWIN__] (get_win32_path): New function.
10714 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
10715 [__CYGWIN__] (find_root_device): Disable.
10716 [__CYGWIN__] (get_bootsec_serial): New function.
10717 [__CYGWIN__] (find_cygwin_root_device): Likewise.
10718 [__linux__] (grub_guess_root_device): Add early returns to simplify
10719 structure.
10720 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
10721 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
10722 check for Linux only.
10723
a079699e 107242008-05-15 Bean <bean123ch@gmail.com>
10725
10726 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
10727 keyboard hang problem in apple's intel mac.
10728
1cf4059a 107292008-05-09 Robert Millan <rmh@aybabtu.com>
10730
10731 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
10732 devices.
10733 * util/grub-mkdevicemap.c (get_virtio_disk_name)
10734 (make_device_map): Likewise.
10735 Reported by Aurelien Jarno <aurel32@debian.org>
10736
ed759390 107372008-05-07 Ian Campbell <ijc@hellion.org.uk>
10738
10739 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
10740 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
10741 (make_device_map): Output entries for xvd type disks.
10742
b56c4eaa 107432008-05-07 Robert Millan <rmh@aybabtu.com>
10744
10745 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
10746 devices.
10747 * util/grub-mkdevicemap.c (get_cciss_disk_name)
10748 (make_device_map): Likewise.
10749 Reported by Roland Dreier <rdreier@cisco.com>
10750
7f8866ed 107512008-05-07 Robert Millan <rmh@aybabtu.com>
10752
10753 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
10754 grub_strstr() call. Correct a few mistakes in failure path handling.
10755
b0346e0f 107562008-05-06 Robert Millan <rmh@aybabtu.com>
10757
10758 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
10759 Do not print a trailing slash (therefore, the root directory is an
10760 empty string).
10761 (convert_system_path_to_grub_path): Do not remove trailing slash
10762 from make_system_path_relative_to_its_root() output.
10763
10764 * util/i386/pc/grub-install.in: Add trailing slash to output from
10765 make_system_path_relative_to_its_root().
10766
6cf12cbd 107672008-05-06 Robert Millan <rmh@aybabtu.com>
10768
10769 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
10770 ensures that output lines aren't intermangled with those sent to
10771 stderr (via grub_util_info()).
10772 * util/grub-probe.c (grub_refresh): Likewise.
10773 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
10774
0fbb3117 107752008-05-05 Christian Franke <franke@computer.org>
10776
10777 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
10778 Add Cygwin device names.
10779 (get_ide_disk_name) [__CYGWIN__]: Likewise.
10780 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
10781 (check_device): Return error instead of success on empty name.
10782 (make_device_map): Move label inside linux specific code to
10783 prevent compiler warning.
10784
8124cdb7 107852008-04-30 Robert Millan <rmh@aybabtu.com>
10786
10787 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
10788 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
10789 first boot option.
10790 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
10791
094c01d0 107922008-04-29 Robert Millan <rmh@aybabtu.com>
10793
10794 * docs/grub.cfg: New file (example GRUB configuration).
10795
f4b1fc02 107962008-04-26 Robert Millan <rmh@aybabtu.com>
10797
329ce2a5 10798 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
10799 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
10800 and `disk/ieee1275/nand.c'.
f4b1fc02 10801
25f16ec1 108022008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 10803
25f16ec1 10804 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
10805 i386-linuxbios.
10806
10807 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
10808 change the buffer size to 4096 for cdrom device.
10809
10810 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
10811 and nand.mod.
10812 (_linux_mod_SOURCES): New variable.
10813 (_linux_mod_CFLAGS): Likewise.
10814 (_linux_mod_LDFLAGS): Likewise.
10815 (linux_mod_SOURCES): Likewise.
10816 (linux_mod_CFLAGS): Likewise.
10817 (linux_mod_LDFLAGS): Likewise.
10818 (nand_mod_SOURCES): Likewise.
10819 (nand_mod_CFLAGS): Likewise.
10820 (nand_mod_LDFLAGS): Likewise.
10821
10822 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
10823 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
10824 type property. (nand device in olpc don't have this property)
10825
10826 * include/grub/disk.h (grub_disk_dev_id): New macro
10827 GRUB_DISK_DEVICE_NAND_ID.
10828
10829 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
10830 function prototype.
10831 (grub_rescue_cmd_initrd): Likewise.
10832
10833 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
10834 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
10835 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 10836
25f16ec1 10837 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
10838 GRUB_MACHINE_IEEE1275 is defined.
10839
10840 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
10841 Use NESTED_FUNC_ATTR attribute on the hook parameter.
10842
10843 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
10844 on nested function heap_init.
10845 (grub_upper_mem): New variable for i386-ieee1275.
10846 (grub_get_extended_memory): New function for i386-ieee1275.
10847 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
10848
10849 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
10850 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
10851 property.
f19dbdb7 10852
25f16ec1 10853 * loader/i386/ieee1275/linux.c: New file.
10854
10855 * loader/i386/ieee1275/linux_normal.c: New file.
10856
10857 * disk/ieee1275/nand.c: New file.
10858
e89d61e9 108592008-04-18 Thomas Schwinge <tschwinge@gnu.org>
10860
10861 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
10862 value.
10863 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
10864
602566f6 108652008-04-18 Robert Millan <rmh@aybabtu.com>
10866
10867 Restructures early code path on ieee1275 to unify grub_main() as
10868 the first C function that is executed in every platform.
10869
10870 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
10871 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
10872 cmain().
10873 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
10874 * kern/ieee1275/cmain.c (cmain): Rename to ...
10875 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
10876 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
10877 at the beginning.
10878
57490c2b 108792008-04-18 Robert Millan <rmh@aybabtu.com>
10880
10881 * util/update-grub.in: Fix syntax error when setting
10882 `GRUB_PRELOAD_MODULES'.
10883 Reported by Stephane Chazelas <stephane@artesyncp.com>
10884
1977517d 108852008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
10886
10887 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
10888 section into account, newer toolchains generate unique build ids
10889 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 10890 we want build ids to be preserved
1977517d 10891 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
10892 far from other sections don't cause the raw binary images grow
10893 size
10894
bfb1f1a2 108952008-04-15 Robert Millan <rmh@aybabtu.com>
10896
10897 * disk/lvm.c: Update copyright year.
10898 * kern/misc.c: Likewise.
10899
01979850 109002008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
10901
10902 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 10903 there is no memory left for physical volume name.
01979850 10904
0a1150e2 109052008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
10906
10907 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
10908 volume name mapping to support bigger than 9 character names properly.
10909
82ead3fe 109102008-04-13 Robert Millan <rmh@aybabtu.com>
10911
10912 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
10913 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
10914
e54a72f5 109152008-04-13 Christian Franke <franke@computer.org>
10916
10917 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
10918 to create a floppy emulation boot CD when non emulation mode
10919 does not work.
10920 Enable Joliet CD filesystem extension.
10921
9fe86034 109222008-04-13 Robert Millan <rmh@aybabtu.com>
10923
10924 * kern/misc.c (grub_strncat): Fix off-by-one error.
10925 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
10926
10927 * kern/env.c (grub_env_context_close): Clear current context, not
10928 previous one.
10929 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
10930
10931 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
10932
7ceeee39 109332008-04-13 Robert Millan <rmh@aybabtu.com>
10934
10935 Improve robustness when handling LVM.
10936
10937 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 10938 (and leave `*p' unmodified).
7ceeee39 10939 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
10940 through it.
10941 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
10942 iterating through it.
10943 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
10944 through it.
fe6b695a 10945 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 10946 when due) on each grub_lvm_getvalue() or grub_strstr() call.
10947 Don't assume `vg->pvs != NULL' when iterating through it.
10948
58cd3d85 109492008-04-13 Robert Millan <rmh@aybabtu.com>
10950
10951 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
10952 * genmk.rb (partmap): New variable.
10953 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
10954 (#{partmap}): New target rule.
10955 * genpartmaplist.sh: New file.
10956 * Makefile.in (pkglib_DATA): Add partmap.lst.
10957 (partmap.lst): New target rule.
10958 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
10959 modules (including all partition maps), instead of preloading them.
10960
78b51059 109612007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
10962
10963 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
10964 `linux-boot-prober' (if installed) to detect other operating
10965 systems which are installed on the computer and add them to
10966 the boot menu.
10967 * conf/common.rmk: Build and install 30_os-prober.
10968
a91627b4 109692008-04-12 Robert Millan <rmh@aybabtu.com>
10970
10971 * kern/powerpc/ieee1275/init.c: Move from here ...
10972 * kern/ieee1275/init.c: ... to here. Update all users.
10973
10974 * kern/powerpc/ieee1275/cmain.c: Move from here ...
10975 * kern/ieee1275/cmain.c: ... to here. Update all users.
10976
10977 * kern/powerpc/ieee1275/openfw.c: Move from here ...
10978 * kern/ieee1275/openfw.c: ... to here. Update all users.
10979
10980 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
10981 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
10982
322562ea 109832008-04-10 Pavel Roskin <proski@gnu.org>
10984
10985 * configure.ac: Always use "_cv_" in cache variables for
10986 compatibility with Autoconf 2.62.
10987
a02a73c5 109882008-04-07 Robert Millan <rmh@aybabtu.com>
10989
10990 Revert grub/machine/init.h addition by Pavel (since it breaks on
10991 i386-ieee1275 and others):
10992 * util/i386/pc/misc.c: Remove grub/machine/init.h.
10993 * util/powerpc/ieee1275/misc.c: Likewise.
10994
25c024b1 109952008-04-07 Robert Millan <rmh@aybabtu.com>
10996
10997 * util/grub-probe.c (probe): Improve error message.
10998
3cbd2f98 109992008-04-07 Robert Millan <rmh@aybabtu.com>
11000
11001 * util/biosdisk.c (read_device_map): Skip devices that don't exist
11002 (this prevents the presence of a bogus entry from ruining the whole
11003 thing).
11004
87a297bf 110052008-04-06 Pavel Roskin <proski@gnu.org>
11006
36747a62 11007 * util/biosdisk.c: Include grub/util/biosdisk.h.
11008 * util/grub-fstest.c (execute_command): Make static.
11009 * util/grub-mkdevicemap.c (check_device): Likewise.
11010 * util/i386/pc/misc.c: Include grub/machine/init.h.
11011 * util/powerpc/ieee1275/misc.c: Likewise.
11012 * util/lvm.c: Include grub/util/lvm.h.
11013 * util/misc.c: Include grub/kernel.h, grub/misc.h and
11014 grub/cache.h.
11015 * util/raid.c: Include grub/util/raid.h.
11016 (grub_util_getdiskname): Make static.
11017
87a297bf 11018 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
11019 grub_hostfs_fini(), as they are called from grub_init_all() and
11020 grub_fini_all() respectively. This fixes an infinite loop in
11021 grub-fstest due to double registration of hostfs.
11022 Reported by Christian Franke <Christian.Franke@t-online.de>
11023
f6ce7629 110242008-04-05 Pavel Roskin <proski@gnu.org>
11025
11026 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
11027 all 8 functions. Otherwise, probe function 0 only.
11028
070e49e4 110292008-04-04 Pavel Roskin <proski@gnu.org>
11030
8b088a4c 11031 * commands/lspci.c (grub_lspci_iter): Print the bus number
11032 correctly.
11033
4f657021 11034 * commands/lspci.c (grub_pci_classes): Fix typos.
11035 (grub_lspci_iter): Don't print func twice. Print vendor ID
11036 before device ID, as it's normally done.
11037
070e49e4 11038 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11039 Fix signedness warnings.
11040 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
11041 Likewise.
11042 * util/ieee1275/get_disk_name.c: Include config.h so that
11043 _GNU_SOURCE is defined and getline() is declared. Mark an
11044 unused argument as such. Fix a signedness warning.
11045
ba7328dc 110462008-04-02 Pavel Roskin <proski@gnu.org>
11047
26887f22 11048 * genkernsyms.sh.in: Use more robust assignments for CC and
11049 srcdir. Quote srcdir.
11050 * gensymlist.sh.in: Likewise. Assert at the compile time that
11051 the symbol table is not empty.
11052
ba7328dc 11053 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
11054 * fs/cpio.c (grub_cpio_read): Likewise.
11055
0f582c6b 110562008-04-01 Pavel Roskin <proski@gnu.org>
11057
4b6e1995 11058 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
11059 * disk/host.c (grub_host_open): Likewise.
11060 * disk/loopback.c (grub_loopback_open): Likewise.
11061 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
11062 disk->id as in disk/host.c, not a multi-character constant.
11063
828a2768 11064 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
11065 later is obsolete, potentially dangerous and sets a bad example.
11066 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
11067 * util/misc.c (grub_util_get_image_size): Likewise.
11068
2bb4fb47 11069 * disk/loopback.c (options): Improve help for "--partitions".
11070
0f582c6b 11071 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
11072 options to align them with the short options, e.g. "echo -e".
11073
a33224e0 110742008-03-31 Bean <bean123ch@gmail.com>
11075
11076 * video/reader/png.c (grub_png_data): New member is_16bit and
11077 image_data.
11078 (grub_png_decode_image_header): Detect 16 bit png image.
11079 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
11080 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
11081 (grub_video_reader_png): Release memory occupied by image_data.
11082
11083 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
11084 4096 bytes.
11085 (grub_nfs_mount): Skip the test for sector per cluster.
11086
11087 * include/grub/ntfs.h (MAX_SPC): Removed.
11088
86cb4f54 110892008-03-31 Bean <bean123ch@gmail.com>
11090
11091 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
11092 (grub_probe_SOURCES): Add fs/afs.c.
11093 (grub_fstest_SOURCES): Likewise.
11094 (afs_mod_SOURCES): New variable.
11095 (afs_mod_CFLAGS): Likewise.
11096 (afs_mod_LDFLAGS): Likewise.
11097
11098 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
11099 (grub_emu_SOURCES): Likewise.
11100
11101 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11102
11103 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11104
11105 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11106
11107 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11108
11109 * fs/afs.c: New file.
11110
17c74c21 111112008-03-30 Pavel Roskin <proski@gnu.org>
11112
4cb68e89 11113 * disk/host.c: Include grub/misc.h to fix a warning.
11114 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
11115 warnings about implicit declarations.
11116
8790bb04 11117 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
11118 variable.
11119 * include/grub/i386/loader.h: Change declaration of
11120 grub_linux_boot() to match what grub_loader_set() expects.
11121 * util/getroot.c (grub_guess_root_device): Return const char* to
11122 fix a warning.
11123 * util/grub-probe.c (probe): Fix a warning about uninitialized
11124 abstraction_name variable.
11125 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
11126 second argument as unused to fix a warning.
11127
9a3f3296 11128 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
11129 missing grub_error() call.
11130
0ecef90d 11131 * util/update-grub_lib.in: Define datarootdir, since Autoconf
11132 2.60 and newer uses it to define datadir.
11133
0bf6d401 11134 * commands/sleep.c: Fix warning about implicit declaration.
11135 * disk/memdisk.c: Likewise.
11136 * loader/aout.c: Likewise.
11137 * loader/i386/bsd_normal.c: Likewise.
11138 * util/grub-probe.c: Likewise.
11139
7cdacf97 11140 * commands/i386/cpuid.c (has_longmode): Make static.
11141 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
11142 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
11143
17c74c21 11144 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
11145 GDT. This is more robust, as %ds can change.
11146 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
11147 calling real_to_prot().
11148 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
11149
80a3e68b 111502008-03-28 Pavel Roskin <proski@gnu.org>
11151
11152 * kern/i386/pc/startup.S: Assert that uncompressed functions
11153 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
11154 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
11155 code, as they push parts of the code (error handlers) beyond
11156 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
11157 code as correctness and size.
11158
77bcd272 111592008-03-28 Pavel Roskin <proski@gnu.org>
11160
11161 * kern/i386/pc/startup.S
11162 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
11163 data block address to the real mode, keep offset minimal. This
11164 works around a bug in AWARD BIOS on old Athlon systems, which
11165 makes CD detection hang.
11166
c5dfd43b 111672008-03-26 Pavel Roskin <proski@gnu.org>
11168
11169 * normal/color.c (grub_parse_color_name_pair): Make `name' a
11170 const.
11171 * include/grub/normal.h: Add grub_parse_color_name_pair()
11172 declaration.
11173
bf962df2 111742008-03-24 Bean <bean123ch@gmail.com>
11175
11176 * disk/i386/pc/biosdisk.c (cd_start): Removed.
11177 (cd_count): Removed.
11178 (cd_drive): New variable.
11179 (grub_biosdisk_get_drive): Don't check for (cdN) device.
11180 (grub_biosdisk_call_hook): Likewise.
11181 (grub_biosdisk_iterate): Change cdrom detection method.
11182 (grub_biosdisk_open): Replace cd_start with cd_drive.
11183 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
11184 detect cdrom device.
11185
11186 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
11187 Removed.
11188 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
11189 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
11190 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
11191 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
11192 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
11193 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
11194 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
11195 (grub_biosdisk_cdrp): New structure.
11196 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
11197
11198 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
11199
11200 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
11201 device.
11202
11203 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
11204 New function.
11205
68e7fc7a 112062008-03-20 Robert Millan <rmh@aybabtu.com>
11207
11208 Remove 2 TiB limit in ata.mod.
11209 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
11210 (grub_ata_dumpinfo): Print sector count with 0x%llx.
11211 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
11212 grub_uint64_t instead of grub_uint32_t.
11213
38ad2cf5 112142008-03-05 Bean <bean123ch@gmail.com>
11215
11216 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
11217 (grub_multiboot): Set boot device.
11218
11219 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
11220
2b89344e 112212008-03-02 Bean <bean123ch@gmail.com>
11222
11223 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
11224 symlink_buffer.
11225
87a95d1f 112262008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
11227
11228 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
11229 texinfo.tex.
11230
11231 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
11232 modified.
11233
11234 * docs/fdl.texi: New file.
f19dbdb7 11235
87a95d1f 11236 * docs/mdate-sh: New file. Copied from gnulib.
11237 * docs/texinfo.tex: Likewise.
11238
11239 * config.guess: Updated from gnulib.
11240 * install-sh: Likewise.
11241
7dc15d8e 112422008-02-28 Robert Millan <rmh@aybabtu.com>
11243
11244 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
11245 (aout_mod_SOURCES): New variable.
11246 (aout_mod_CFLAGS): Likewise.
11247 (aout_mod_LDFLAGS): Likewise.
11248
11249 * conf/i386-ieee1275.rmk: Likewise.
11250
b00ab696 112512008-02-28 Robert Millan <rmh@aybabtu.com>
11252
11253 * util/update-grub.in: Reorganise terminal validity check. Accept
11254 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
11255 Based on suggestion by Franklin PIAT.
11256
79ca2d78 112572008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
11258
11259 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
11260 function.
11261 * util/getroot.c (grub_util_check_block_device): New function that
11262 returns the given argument if it is a block device and returns NULL else.
11263 * util/grub-probe.c (argument_is_device): New variable.
11264 (probe): Promote device_name from a variable to an argument. Receive
11265 device_name from grub_util_check_block_device() if path is NULL and from
11266 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 11267 (options): Introduce new parameter '-d, --device'.
79ca2d78 11268 (main): Add description of the new parameter to the help screen.
11269 Rename path variable to argument. Set argument_is_device if the '-d'
11270 option is given. Pass argument to probe() depending on
11271 argument_is_device.
11272
0d16e571 112732008-02-24 Bean <bean123ch@gmail.com>
11274
11275 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
11276 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
11277 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
11278 (GRUB_ISO9660_VOLDESC_PART): Likewise.
11279 (GRUB_ISO9660_VOLDESC_END): Likewise.
11280 (grub_iso9660_primary_voldesc): New member escape.
11281 (grub_iso9660_data): New member joliet.
11282 (grub_iso9660_convert_string): New function.
11283 (grub_iso9660_mount): Detect joliet extension.
11284 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
11285 (grub_iso9660_iso9660_label): Likewise.
11286
11287 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
11288 (grub_setup_SOURCES): Add fs/udf.c.
11289 (grub_fstest_SOURCES): Likewise.
11290 (udf_mod_SOURCES): New variable.
11291 (udf_mod_CFLAGS): Likewise.
11292 (udf_mod_LDFLAGS): Likewise.
11293
11294 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
11295 (grub_emu_SOURCES): Likewise.
11296
11297 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11298
11299 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11300
11301 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11302
11303 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11304
11305 * fs/udf.c: New file.
11306
8a594a17 113072008-02-24 Robert Millan <rmh@aybabtu.com>
11308
11309 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
11310 (normal/lexer.c_DEPENDENCIES): New variables.
11311 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11312 (normal/lexer.c_DEPENDENCIES): Likewise.
11313 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
11314 (normal/lexer.c_DEPENDENCIES): Likewise.
11315 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
11316 (normal/lexer.c_DEPENDENCIES): Likewise.
11317 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11318 (normal/lexer.c_DEPENDENCIES): Likewise.
11319 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11320 (normal/lexer.c_DEPENDENCIES): Likewise.
11321
2dc33c03 113222008-02-23 Robert Millan <rmh@aybabtu.com>
11323
11324 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
11325 since they were intended to be in hex. This didn't break previously
11326 because of a bug in gpt_partition_map_iterate() (see below).
11327
11328 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
11329 when checking the validity of GPT header.
11330 Remove `partno', since it always provides the same information as `i'.
11331
f6f4cfb0 113322008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
11333
11334 * include/grub/efi/time.h: Fix a wrong comment.
11335
79ff665f 113362008-02-19 Pavel Roskin <proski@gnu.org>
11337
11338 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
11339 message.
11340
d38e24c2 113412008-02-19 Bean <bean123ch@gmail.com>
11342
11343 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
11344 (aout_mod_SOURCES): New variable.
11345 (aout_mod_CFLAGS): Likewise.
11346 (aout_mod_LDFLAGS): Likewise.
11347 (_bsd_mod_SOURCES): New variable.
11348 (_bsd_mod_CFLAGS): Likewise.
11349 (_bsd_mod_LDFLAGS): Likewise.
11350 (bsd_mod_SOURCES): New variable.
11351 (bsd_mod_CFLAGS): Likewise.
11352 (bsd_mod_LDFLAGS): Likewise.
11353
11354 * include/grub/aout.h: New file.
11355
11356 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
11357
11358 * include/grub/i386/bsd.h: New file.
11359
11360 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
11361 to make it public.
11362
11363 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
11364 function is called, so that it's possible to change it inside the hook.
11365 (grub_elf64_load): Likewise.
11366 (grub_elf_file): Don't close the file if elf header is not found.
11367 (grub_elf_close): Close the file if grub_elf_file fails (The new
11368 grub_elf_file won't close it).
11369 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
11370 (grub_elf64_size): Likewise.
11371
11372 * kern/i386/loader.S (grub_unix_real_boot): New function.
11373
11374 * loader/aout.c: New file.
11375
11376 * loader/i386/bsd.c: New file.
11377
11378 * loader/i386/bsd_normal.c: New file.
11379
11380 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
11381
11382 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 11383 can test other formats.
d38e24c2 11384
b93bdb0f 113852008-02-19 Robert Millan <rmh@aybabtu.com>
11386
11387 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
11388 (grub_gpt_partition_type_empty): Redefine with macro from
11389 `<grub/gpt_partition.h>'.
11390 (gpt_partition_map_iterate): Adjust partition type comparison.
11391
11392 Export `entry' as partmap-specific `part.data' struct.
11393 (grub_gpt_header, grub_gpt_partentry): Move from here ...
11394
11395 * include/grub/gpt_partition.h (grub_gpt_header)
11396 (grub_gpt_partentry): ... to here (new file).
11397
11398 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
11399
11400 (grub_gpt_partition_type_bios_boot): New const variable, defined
11401 with macro from `<grub/gpt_partition.h>'.
11402
11403 (setup): Replace `first_start' with `embed_region', which keeps
11404 track of the embed region (and is partmap-agnostic).
11405
11406 Replace find_first_partition_start() with find_usable_region(),
11407 which finds a usable region for embedding using partmap-specific
11408 knowledge (supports PC/MSDOS and GPT).
11409
11410 Fix all assumptions that the embed region start at sector 1, using
11411 `embed_region.start' from now on. Similarly, use `embed_region.end'
11412 rather than `first_start' to calculate available size.
11413
11414 In grub_util_info() message, replace "into after the MBR" with an
11415 indication of the specific sector our embed region starts at.
11416
66cb40f6 114172008-02-19 Robert Millan <rmh@aybabtu.com>
11418
11419 * DISTLIST: Replace `commands/ieee1275/halt.c' and
11420 `commands/ieee1275/reboot.c' with `commands/halt.c' and
11421 `commands/reboot.c'.
11422 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11423 (halt_mod_SOURCES): Likewise.
11424 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11425 (halt_mod_SOURCES): Likewise.
11426
b7202015 114272008-02-17 Christian Franke <franke@computer.org>
11428
11429 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
11430
32b0fc49 114312008-02-17 Robert Millan <rmh@aybabtu.com>
11432
11433 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11434 set `first_start' to 0 for non-PC/MSDOS partition maps.
11435
aca63502 114362008-02-16 Robert Millan <rmh@aybabtu.com>
11437
11438 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11439 do not assume partition map is PC/MSDOS before performing checks that
11440 are specific to that layout.
11441
0de8be86 114422008-02-13 Robert Millan <rmh@aybabtu.com>
11443
11444 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
11445 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
11446 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
11447
c3db8364 114482008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
11449
11450 * configure.ac: Only a cosmetic change on the handling of
11451 -fno-stack-protector.
11452
f714229e 114532008-02-12 Alexandre Boeglin <alex@boeglin.org>
11454
c3db8364 11455 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
11456 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
11457 reboot.c.
f714229e 11458 (grub_install_SOURCES): Add halt.mod and reboot.mod.
11459 (halt_mod_SOURCES): New variable.
11460 (halt_mod_CFLAGS): Likewise.
11461 (halt_mod_LDFLAGS): Likewise.
11462 (reboot_mod_SOURCES): Likewise.
11463 (reboot_mod_CFLAGS): Likewise.
11464 (reboot_mod_LDFLAGS): Likewise.
11465
c3db8364 11466 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
11467 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
11468 reboot.c.
f714229e 11469 (halt_mod_SOURCES): Likewise.
11470 (reboot_mod_SOURCES): Likewise.
11471
c3db8364 11472 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
11473 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 11474 (reboot_mod_SOURCES): Likewise.
11475
11476 * commands/i386/pc/reboot.c: merge this file ...
11477
11478 * commands/ieee1275/reboot.c: ... and this file ...
11479
11480 * commands/reboot.c: ... to this file.
c3db8364 11481 Add some precompiler directive to include the correct header for
11482 each machine.
f714229e 11483
11484 * commands/ieee1275/halt.c: move this file ...
11485
11486 * commands/halt.c: ... to here.
c3db8364 11487 Add some precompiler directive to include the correct header for
11488 each machine.
f714229e 11489
11490 * include/grub/efi/efi.h (grub_reboot): New function declaration.
11491 (grub_halt): Likewise.
11492
11493 * kern/efi/efi.c (grub_reboot): New function.
11494 (grub_halt): Likewise.
11495
c74493e0 114962008-02-12 Robert Millan <rmh@aybabtu.com>
11497
11498 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
11499 /dev (like it is done for /dev/mapper). This doesn't provide support
11500 for EVMS, but at least it is now easy to identify the problem when it
11501 arises.
11502
d0db4b04 115032008-02-11 Robert Millan <rmh@aybabtu.com>
11504
11505 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
11506 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
11507 comparing it with -1, not 0.
11508
bf748642 115092008-02-10 Robert Millan <rmh@aybabtu.com>
11510
11511 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
11512 `disk/lvm.c'.
11513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11514 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
11515
11516 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
11517 `disk/lvm.c' to the end of the list.
11518 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11519 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11520
b5db202a 115212008-02-10 Robert Millan <rmh@aybabtu.com>
11522
11523 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
11524 grub_print_error() instead. This will let user know why we're entering
11525 rescue mode.
11526 Based on suggestions from Sam Morris.
11527
83abee31 115282008-02-10 Alexandre Boeglin <alex@boeglin.org>
11529
11530 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
11531 on remaining N args, instead of "--" arg N times.
11532
78d5a08b 115332008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
11534
11535 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
11536 (fill_with_default_glyph): Changed to use unknown_glyph for fill
11537 pattern for unknown glyphs.
11538
68807e5f 115392008-02-09 Robert Millan <rmh@aybabtu.com>
11540
11541 * configure.ac: Probe for `help2man'.
11542 * Makefile.in (builddir): New variable.
11543 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
11544 or otherwise add a few flags/options to it.
11545 (install-local): For every executable utility or script that is
11546 installed, invoke $(HELP2MAN) to install a manpage based on --help
11547 output.
11548
11549 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
11550 that it doesn't prevent --help from working in build tree.
11551
11552 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
11553 with `bug-grub@gnu.org'.
11554 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
11555 * util/update-grub.in (usage): New function.
11556 Implement proper argument check, with support for --help and --version
11557 (as well as existing -y).
11558
115592008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 11560
11561 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
11562 avoid overwriting previous output.
11563 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
11564
c1962162 115652008-02-09 Robert Millan <rmh@aybabtu.com>
11566
11567 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
11568 drawing the menu.
11569
3dac2e3f 115702008-02-09 Robert Millan <rmh@aybabtu.com>
11571
11572 * commands/sleep.c: New file.
11573 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
11574 (sleep_mod_SOURCES): New variable.
11575 (sleep_mod_CFLAGS): Likewise.
11576 (sleep_mod_LDFLAGS): Likewise.
11577
7a634e08 115782008-02-09 Robert Millan <rmh@aybabtu.com>
11579
11580 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
11581 situations in which we can deduce the RAID size and the superblock
11582 doesn't match it.
11583
b92f0c18 115842008-02-09 Robert Millan <rmh@aybabtu.com>
11585
11586 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
11587 and return a grub_diskmemberlist_t composed of LVM physical volumes.
11588 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
11589
11590 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
11591 and return a grub_diskmemberlist_t composed of physical array members.
11592 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
11593
11594 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
11595 prototype.
11596 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
11597 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
11598 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
11599
11600 * util/grub-probe.c (probe): Move partmap probing code from here ...
11601 (probe_partmap): ... to here.
11602 (probe): Use probe_partmap() once for the disk we're probing, and
11603 additionally, when such disk contains a memberlist() struct member,
11604 once for each disk that is contained in the structure returned by
11605 memberlist().
11606
91a4bf68 116072008-02-09 Robert Millan <rmh@aybabtu.com>
11608
11609 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
11610 environment variable to 'all' in order to obtain debug output from
11611 non-util/ code.
11612 * util/i386/pc/grub-setup.c (main): Likewise.
11613
a96f9caa 116142008-02-08 Robert Millan <rmh@aybabtu.com>
11615
11616 * disk/raid.c (grub_raid_scan_device): Check for
11617 `array->device[sb.this_disk.number]' rather than for
11618 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 11619 guaranteed to be accessible.
a96f9caa 11620
b37a9222 116212008-02-08 Robert Millan <rmh@aybabtu.com>
11622
11623 * disk/raid.c: Update copyright.
11624 * fs/cpio.c: Likewise.
11625 * include/grub/raid.h: Likewise.
11626 * loader/i386/pc/multiboot.c: Likewise.
11627 * util/hostfs.c: Likewise.
11628
5626aee1 116292008-02-08 Robert Millan <rmh@aybabtu.com>
11630
11631 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
11632 to a grub_disk_t array.
11633 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
11634 `device[x]'.
11635 (grub_raid_scan_device): Replace `device[x].name' accesses with
11636 `device[x]->name'. Simplify initialization of `array->device[x]'.
11637
554f0187 116382008-02-08 Robert Millan <rmh@aybabtu.com>
11639
11640 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
11641 grub_dprintf() calls.
11642 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
11643 error message.
11644
1ec8425d 116452008-02-07 Christian Franke <franke@computer.org>
11646
11647 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
11648 instead of fseek and ftell to support large files.
11649 (grub_hostfs_read): Likewise.
11650
f2156fda 116512008-02-07 Robert Millan <rmh@aybabtu.com>
11652
11653 Patch from Jeroen Dekkers.
11654 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 11655 failure, since successfully reading all array members might not be
f2156fda 11656 required.
11657
9216e0e7 116582008-02-06 Robert Millan <rmh@aybabtu.com>
11659
11660 * util/grub-probe.c (probe): Simplify partmap probing (with the
11661 assumption that the first word up to the underscore equals to
11662 the module name).
11663
b0dfd29a 116642008-02-06 Christian Franke <franke@computer.org>
11665
11666 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
11667 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
11668 last block of a cpio or tar stream.
11669 Check for "TRAILER!!!" instead of any empty data
11670 block to detect last block of a cpio stream.
11671 (grub_cpio_dir): Fix constness of variable np.
11672 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
11673 cpio or tar trailer is detected. This fixes a crash
11674 on open of a non existing file.
11675
c32865bf 116762008-02-05 Bean <bean123ch@gmail.com>
11677
11678 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
11679 address of entry.
11680 (grub_multiboot_load_elf64): Likewise.
11681 (grub_multiboot): Initialize mbi structure.
11682
11683 * util/grub-fstest.c: Don't include unused header file script.h.
11684
fe6b695a 11685 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 11686 of file.
11687 (grub_fstest_SOURCES): Likewise.
11688
409480b7 116892008-02-05 Robert Millan <rmh@aybabtu.com>
11690
11691 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
11692 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
11693 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
11694 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
11695
11696 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
11697 (translation_table): Replace hardcoded values with macros
11698 provided by `<grub/term.h>'.
11699
11700 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
11701 (keyboard_map): Correct/add a few values, with macros provided
11702 by `<grub/term.h>'.
11703 (keyboard_map_shift): Zero values that don't differ from their
11704 `keyboard_map' equivalents.
11705 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
11706 Discard the second scan code that is always sent by Caps lock.
11707 Only use `keyboard_map_shift' when it provides a non-zero value,
11708 otherwise fallback to `keyboard_map'.
11709
99fadbaa 117102008-02-04 Bean <bean123ch@gmail.com>
11711
11712 * Makefile.in (enable_grub_fstest): New variable.
11713
11714 * conf/common.rmk (grub_fstest_init.lst): New rule.
11715 (grub_fstest_init.h): Likewise.
11716 (grub_fstest_init.c): Likewise.
11717 (util/grub-fstest.c_DEPENDENCIES): New variable.
11718 (grub_fstest_SOURCES): Likewise.
11719
11720 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
11721
11722 * util/grub-fstest.c: New file.
11723
bf567c50 117242008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11725
11726 Make grub-setup handle a separate root device.
f19dbdb7 11727
bf567c50 11728 * util/i386/pc/grub-setup.c (setup): Always open the root device,
11729 so that the root device can be compared with the destination
11730 device.
11731 When embedding the core image, if the root and destination devices
11732 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
11733 0xFF.
11734 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 11735
9be6b98b 117362008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11737
11738 Add support for having a grub directory in a different drive. This
11739 is still only the data handling part.
f19dbdb7 11740
9be6b98b 11741 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
11742 (codestart): Save %dh in GRUB_ROOT_DRIVE.
11743 (grub_root_drive): New variable.
11744
11745 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
11746 instead of GRUB_BOOT_DRIVE to construct a device name. Set
11747 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
11748 as it was.
11749
11750 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
11751
11752 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
11753 macro.
11754 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
11755
11756 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
11757 is bogus, because PXE booting does not specify any drive
11758 correctly.
11759
11760 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
11761 am not sure if this is really correct.
11762
11763 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
11764 is always identical to the boot drive when booting from a CD.
11765
11766 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
11767 longer.
11768 (root_drive): New variable.
11769 (real_start): Unconditionally set %dh to ROOT_DRIVE.
11770 (setup_sectors): Push %dx right after popping it, because %dh will
11771 be modified later.
11772 (copy_buffer): Restore %dx.
11773
e0ca0677 117742008-02-03 Robert Millan <rmh@aybabtu.com>
11775
11776 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
11777 use `cdboot.img' for cdrom images.
11778
3b3f6629 117792008-02-03 Robert Millan <rmh@aybabtu.com>
11780
11781 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
11782 only setup gfxterm when `font' command has succeeded.
11783
d42b3672 117842008-02-03 Robert Millan <rmh@aybabtu.com>
11785
11786 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
11787 (grub_rescue_cmd_multiboot_loader)
11788 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
11789
fa370ea6 117902008-02-03 Pavel Roskin <proski@gnu.org>
11791
e0c5dacb 11792 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 11793 %edx and %esi from stack only after grub_gate_a20() is called.
11794 grub_gate_a20() clobbers %edx.
11795
f2a76e1d 117962008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
11797
11798 * configure.ac (AC_INIT): Bumped to 1.96.
11799
11800 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
11801 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
11802 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
11803 video/readers/png.c.
11804
90fd32d1 118052008-02-03 Bean <bean123ch@gmail.com>
9be665dd 11806
11807 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
11808 (cdboot_img_SOURCES): New variable.
11809 (cdboot_img_ASFLAGS): New variable.
11810 (cdboot_img_LDFLAGS): New variable.
11811
11812 * boot/i386/pc/cdboot.S: New file.
11813
11814 * disk/i386/pc/biosdisk.c (cd_start): New variable.
11815 (cd_count): Likewise.
11816 (grub_biosdisk_get_drive): Add support for cd device.
11817 (grub_biosdisk_call_hook): Likewise.
11818 (grub_biosdisk_iterate): Likewise.
11819 (grub_biosdisk_open): Likewise.
11820 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
11821 (grub_biosdisk_rw): Support reading from cd device.
11822 (GRUB_MOD_INIT): Iterate cd devices.
11823
11824 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
11825 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
11826 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
11827
11828 * kern/i386/pc/init.c (make_install_device): Check for cd device.
11829
4020aa53 118302008-02-02 Robert Millan <rmh@aybabtu.com>
11831
11832 * commands/read.c: New file.
11833 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
11834 (read_mod_SOURCES): New variable.
11835 (read_mod_CFLAGS): Likewise.
11836 (read_mod_LDFLAGS): Likewise.
11837
e03a1132 118382008-02-02 Robert Millan <rmh@aybabtu.com>
11839
11840 * normal/main.c (grub_normal_execute): Check for `menu->size' when
11841 determining whether menu has to be displayed.
11842
58c69220 118432008-02-02 Marco Gerards <marco@gnu.org>
11844
11845 * bus/pci.c: New file.
11846
11847 * include/grub/pci.h: Likewise.
11848
11849 * include/grub/i386/pc/pci.h: Likewise.
11850
11851 * commands/lspci.c: Likewise.
11852
11853 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
11854 `lspci.mod'.
11855 (pci_mod_SOURCES): New variable.
11856 (pci_mod_CFLAGS): Likewise.
11857 (pci_mod_LDFLAGS): Likewise.
11858 (lspci_mod_SOURCES): Likewise.
11859 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 11860 (lspci_mod_LDFLAGS): Likewise.
58c69220 11861
c004e1b4 118622008-02-02 Bean <bean123ch@gmail.com>
11863
11864 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
11865 (grub_ufs_get_file_block): Fix indirect block calculation problem.
11866
11867 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
11868 (grub_xfs_btree_node): New structure.
11869 (grub_xfs_btree_root): New structure.
11870 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
11871 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
11872 (GRUB_XFS_EXTENT_BLOCK): Likewise.
11873 (GRUB_XFS_EXTENT_SIZE): Likewise.
11874 (grub_xfs_read_block): Support btree format type.
11875 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
11876 Use directory block as basic unit.
11877
11878 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
11879
11880 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
11881 __attribute__ ((__regparm__ (1))).
11882
f95562bf 118832008-02-01 Robert Millan <rmh@aybabtu.com>
11884
11885 Correct a mistake in previous commit.
11886
11887 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
11888 top.
11889 (normal/command.c_DEPENDENCIES): New variable.
11890
7d31f41f 118912008-02-01 Robert Millan <rmh@aybabtu.com>
11892
11893 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
11894 top.
11895 (normal/command.c_DEPENDENCIES): New variable.
11896 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
11897 * conf/i386-ieee1275.rmk: Likewise.
11898 * conf/i386-linuxbios.rmk: Likewise.
11899 * conf/i386-pc.rmk: Likewise.
11900 * conf/sparc64-ieee1275.rmk: Likewise.
11901 * conf/powerpc-ieee1275.rmk: Likewise.
11902 (grub_emu_SOURCES): Add `fs/fshelp.c'.
11903
11904 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
11905
60b6be74 119062008-02-01 Robert Millan <rmh@aybabtu.com>
11907
11908 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
11909 call at beginning of function.
11910
078522ab 119112008-01-31 Pavel Roskin <proski@gnu.org>
11912
11913 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 11914 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
11915 (grub_mkrescue_SOURCES): Likewise.
078522ab 11916 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
11917
ccaa8a5f 119182008-01-30 Robert Millan <rmh@aybabtu.com>
11919
11920 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
11921 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
11922 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
11923 (grub_probe_SOURCES): ... to here.
11924
11925 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
11926 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
11927 * conf/i386-ieee1275.rmk: Likewise.
11928 * conf/i386-linuxbios.rmk: Likewise.
11929 * conf/powerpc-ieee1275.rmk: Likewise.
11930
ae5a9cd7 119312008-01-30 Tristan Gingold <gingold@free.fr>
11932
11933 * kern/rescue.c: Silently accept empty lines.
11934
70bc2ef2 119352008-01-29 Bean <bean123ch@gmail.com>
11936
11937 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
11938 (real_code_2): Code cleanup and change comment style.
11939 (move_memory): Avoid using 32-bit address mode.
11940
6a4d50ea 119412008-01-29 Bean <bean123ch@gmail.com>
11942
11943 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
11944 (png_mod_SOURCES): New variable.
11945 (png_mod_CFLAGS): Likewise.
11946 (png_mod_LDFLAGS): Likewise.
11947
11948 * video/readers/png.c: New file.
11949
11cc30ac 119502008-01-28 Robert Millan <rmh@aybabtu.com>
11951
11952 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
11953 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
11954 `ifndef GRUB_MOD_GAP' hack.
11955 * util/elf/grub-mkimage.c (add_segments): Likewise.
11956
3abc589f 119572008-01-27 Robert Millan <rmh@aybabtu.com>
11958
11959 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
11960 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 11961 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 11962
e1907778 119632008-01-27 Robert Millan <rmh@aybabtu.com>
11964
11965 Get grub-emu to build again (including parallel builds).
11966
11967 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
11968 Split into ...
11969 (util/grub-emu.c_DEPENDENCIES): ... this, ...
11970 (normal/execute.c_DEPENDENCIES): ... this, ...
11971 (grub-emu_DEPENDENCIES): ... and this.
11972
11973 * conf/i386-efi.rmk: Likewise.
11974 * conf/i386-linuxbios.rmk: Likewise.
11975 * conf/i386-ieee1275.rmk: Likewise.
11976 * conf/powerpc-ieee1275.rmk: Likewise.
11977 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
11978
2216b101 119792008-01-27 Robert Millan <rmh@aybabtu.com>
11980
11981 * NEWS: Add a few items.
11982
f75172d9 119832008-01-27 Robert Millan <rmh@aybabtu.com>
11984
11985 Fix parallel builds with grub-emu. Based on earlier commit for
11986 grub-probe and grub-setup.
11987
11988 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11989 (util/grub-emu.c_DEPENDENCIES): ... this.
11990 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11991 (util/grub-emu.c_DEPENDENCIES): ... this.
11992 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11993 (util/grub-emu.c_DEPENDENCIES): ... this.
11994 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11995 (util/grub-emu.c_DEPENDENCIES): ... this.
11996 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11997 (util/grub-emu.c_DEPENDENCIES): ... this.
11998
3f51de77 119992008-01-27 Pavel Roskin <proski@gnu.org>
12000
12001 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
12002 to create a gap between _end and the modules added to the image
12003 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
12004 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
12005 * util/elf/grub-mkimage.c (add_segments): Likewise.
12006
2033f53e 120072008-01-26 Pavel Roskin <proski@gnu.org>
12008
12009 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
12010 just return an error.
12011
22da1f6f 120122008-01-26 Bean <bean123ch@gmail.com>
12013
12014 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
12015 (grub_reiserfs_get_item): Save offset of the next item.
12016 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
12017
2a9525e6 120182008-01-25 Robert Millan <rmh@aybabtu.com>
12019
12020 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
12021 make all filesystem sources appear together (possibly fixing omissions
12022 while at it).
12023 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
12024 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12025 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
12026 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12027
12028 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
12029 add `kern/file.c'.
12030 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
12031 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
12032 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
12033 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
12034
12035 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
12036 (probe): Add a sanity check to make sure of our ability to read
12037 requested files when probing for filesystem type.
12038
12039 * genmk.rb: Update copyright year (2007).
12040
12041 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
12042 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
12043 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
12044 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
12045 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
12046 : Remove function prototypes.
12047
b95f71b5 120482008-01-25 Robert Millan <rmh@aybabtu.com>
12049
12050 Revert my previous commits (based on wrong assumption of how grub_errno
12051 works).
12052
fe6b695a 12053 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 12054 * kern/file.c (grub_file_open): Likewise.
12055
d08bbb49 120562008-01-24 Pavel Roskin <proski@gnu.org>
12057
12058 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
12059 that hang if GRUB tries to setup colors.
12060 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
12061 colors for firmwares that don't support it.
12062 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
12063 Recognize Open Hack'Ware, set flags to work around its
12064 limitations.
12065
605e36ed 120662008-01-24 Robert Millan <rmh@aybabtu.com>
12067
12068 * kern/file.c (grub_file_open): Do not account previous failures of
12069 unrelated functions when grub_errno is checked for.
12070 Reported by Oleg Strikov.
12071
bac332a1 120722008-01-24 Bean <bean123ch@gmail.com>
12073
12074 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
12075 (grub_ufs_sblock): New member volume name.
12076 (grub_ufs_find_file): Fix string copy bug.
12077 (grub_ufs_label): Implement this function properly.
12078
12079 * fs/hfs.c (grub_hfs_cnid_type): New enum.
12080 (grub_hfs_iterate_records): Use the correct file number for extents
12081 and catalog file. Fix problem in next index calculation.
12082 (grub_hfs_find_node): Replace recursive function call with loop.
12083 (grub_hfs_iterate_dir): Replace recursive function call with loop.
12084
15c80c09 120852008-01-23 Robert Millan <rmh@aybabtu.com>
12086
12087 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
12088 `<grub/symbol.h>' and `<grub/multiboot.h>'.
12089 (grub_multiboot2_real_boot): New function prototype.
12090
12091 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
12092 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
12093
12094 * kern/i386/ieee1275/init.c (grub_os_area_addr)
12095 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
12096
305338fd 120972008-01-23 Robert Millan <rmh@aybabtu.com>
12098
12099 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
12100 #ifdef'ed out grub_printf().
12101
3ea52685 121022008-01-23 Robert Millan <rmh@aybabtu.com>
12103
12104 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
12105 grub_dprintf calls, since they make "debug=all" mode unusable.
12106 (grub_console_checkkey): Likewise.
12107
5882ae4b 121082008-01-23 Robert Millan <rmh@aybabtu.com>
12109
12110 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
12111 `term/i386/pc/at_keyboard.c'.
12112 (pkglib_MODULES): Add `serial.mod'.
12113 (serial_mod_SOURCES): New variable.
12114 (serial_mod_CFLAGS): Likewise.
12115 (serial_mod_LDFLAGS): Likewise.
12116
12117 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
12118 `<grub/powerpc/ieee1275/console.h>'.
12119 (grub_keyboard_controller_init): New function prototype.
12120 (grub_console_checkkey): Likewise.
12121 (grub_console_getkey): Likewise.
12122
12123 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
12124 keyboard on i386.
12125
12126 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
12127 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
12128
06ab5303 121292008-01-23 Robert Millan <rmh@aybabtu.com>
12130
12131 * kern/i386/pc/init.c (make_install_device): When memdisk image is
12132 present, "(memdisk)/boot/grub" becomes the default prefix.
12133
12134 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
12135 a memdisk tarball with all the modules. Add --overlay=DIR option that
12136 allows users to overlay additional files into the image.
12137
dbb475a4 121382008-01-23 Robert Millan <rmh@aybabtu.com>
12139
12140 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
12141 and `machine/memory.h'.
12142 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
12143 (_multiboot_mod_SOURCES): New variable.
12144 (_multiboot_mod_CFLAGS): Likewise.
12145 (_multiboot_mod_LDFLAGS): Likewise.
12146 (multiboot_mod_SOURCES): Likewise.
12147 (multiboot_mod_CFLAGS): Likewise.
12148 (multiboot_mod_LDFLAGS): Likewise.
12149
12150 * include/grub/i386/ieee1275/loader.h: New file.
12151
12152 * include/grub/i386/ieee1275/machine.h: Likewise.
12153
12154 * include/grub/i386/ieee1275/memory.h: Likewise.
12155
12156 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
12157 variable declaration.
12158 (grub_os_area_size): Likewise.
12159
12160 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
12161 (grub_lower_mem, grub_upper_mem): New variables.
12162 (grub_stop_floppy): New function (just to make
12163 grub_multiboot2_real_boot() happy).
12164
12165 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
12166 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
12167 (grub_stop): New function.
12168 Include `"../realmode.S"' and `"../loader.S"'.
12169
12170 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
12171 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
12172
12173 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
12174 rely on grub_multiboot2_real_boot() for final boot.
12175
25638629 121762008-01-22 Robert Millan <rmh@aybabtu.com>
12177
12178 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
12179 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
12180 device that doesn't look like an SD card.
12181 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12182 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
12183 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
12184 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
12185 found.
12186
9dad816d 121872008-01-22 Robert Millan <rmh@aybabtu.com>
12188
12189 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
12190 avoid claiming over our own code.
12191
34842f2d 121922008-01-22 Bean <bean123ch@gmail.com>
12193
12194 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
12195 (jpeg_mod_SOURCES): New variable.
12196 (jpeg_mod_CFLAGS): Likewise.
12197 (jpeg_mod_LDFLAGS): Likewise.
12198
12199 * video/readers/jpeg.c : New file.
12200
44023a28 122012008-01-22 Bean <bean123ch@gmail.com>
12202
12203 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
12204 there are no more items.
12205
bc2d8ac6 122062008-01-21 Robert Millan <rmh@aybabtu.com>
12207
12208 * kern/mm.c (grub_mm_init_region): Improve debug message.
12209
261bd4bc 122102008-01-21 Robert Millan <rmh@aybabtu.com>
12211
12212 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
12213 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
12214 address.
12215 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
12216 a C macro.
12217 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
12218 Indicates start of upper memory.
12219 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
12220 (generate_image): Abort when image size is big enough to corrupt
12221 upper memory.
12222
12223 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
12224 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
12225 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
12226 instead of hardcoding 0xA0000.
12227 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
12228 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
12229 instead of hardcoding 0xA0000.
12230
f970b55e 122312008-01-21 Robert Millan <rmh@aybabtu.com>
12232
12233 * disk/memdisk.c (memdisk_size): New variable.
12234 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
12235 `memdisk_size'.
12236 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
12237 image to dynamic memory.
12238 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
12239 `memdisk_size'. Free memdisk block.
12240
1a8b0526 122412008-01-21 Robert Millan <rmh@aybabtu.com>
12242
12243 Fix detection of very small filesystems (like tar).
12244
12245 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
12246 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
12247 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
12248 a problem with this disk).
12249
6e9b4aab 122502008-01-21 Robert Millan <rmh@aybabtu.com>
12251
12252 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
12253 on grub_biosdisk_rw_standard() error.
12254
0d8837b2 122552008-01-21 Robert Millan <rmh@aybabtu.com>
12256
12257 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
12258 recent changes.
12259 * kern/elf.c: Likewise.
12260 * kern/ieee1275/ieee1275.c: Likewise.
12261 * kern/powerpc/ieee1275/openfw.c: Likewise.
12262 * term/ieee1275/ofconsole.c: Likewise.
12263
ffd36e34 122642008-01-21 Robert Millan <rmh@aybabtu.com>
12265
12266 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
12267
3f0093d0 12268 * include/grub/kernel.h (grub_arch_memdisk_addr)
12269 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 12270
3f0093d0 12271 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
12272 (grub_arch_memdisk_size): ... to here.
ffd36e34 12273
6c391b21 122742008-01-21 Robert Millan <rmh@aybabtu.com>
12275
12276 Mostly based on bugfix from Bean.
12277
12278 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
12279 attribute with hook() parameter.
12280 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
12281 declaration.
12282 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
12283 attribute with hook() parameter.
12284 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
12285 declaration.
12286
55a581dc 122872008-01-21 Robert Millan <rmh@aybabtu.com>
12288
12289 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
12290 (pkglib_MODULES): Add `memdisk.mod'.
12291 (memdisk_mod_SOURCES): New variable.
12292 (memdisk_mod_CFLAGS): Likewise.
12293 (memdisk_mod_LDFLAGS): Likewise.
12294
12295 * disk/memdisk.c: New file.
12296
12297 * include/grub/disk.h (grub_disk_dev_id): Add
12298 `GRUB_DISK_DEVICE_MEMDISK_ID'.
12299
12300 * include/grub/i386/pc/kernel.h
12301 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
12302 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
12303 (grub_kernel_image_size): New variable declaration.
12304 (grub_total_module_size): Likewise.
12305 (grub_memdisk_image_size): Likewise.
12306
12307 * include/grub/i386/pc/memory.h
12308 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
12309
12310 * include/grub/kernel.h: Include `<grub/symbol.h>'.
12311 (grub_arch_memdisk_addr): New variable declaration.
12312 (grub_arch_memdisk_size): Likewise.
12313
12314 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
12315 (grub_arch_memdisk_size): Likewise.
12316
12317 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
12318 (codestart): Replace hardcoded `0x100000' with
12319 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
12320
12321 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
12322 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
12323 not NULL, append the contents of the file it refers to, at the end of
12324 the compressed kernel image. Initialize `grub_memdisk_image_size'
12325 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
12326 (options): Add "memdisk"|'m' option.
12327 (main): Parse --memdisk|-m option, and pass user-provided path as
12328 parameter to generate_image().
12329
3d7f54c9 123302008-01-20 Robert Millan <rmh@aybabtu.com>
12331
12332 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
12333 grub_dprintf() calls from here ...
12334 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
12335
0bf74728 123362008-01-20 Robert Millan <rmh@aybabtu.com>
12337
12338 Fix detection of "real mode" when /options/real-mode? doesn't exist.
12339
12340 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
12341 declaration.
12342 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
12343 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
12344 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 12345 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 12346 property).
12347 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
12348 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
12349
33bf70a7 123502008-01-19 Robert Millan <rmh@aybabtu.com>
12351
fe6b695a 12352 Get rid of confusing function (superseded by
33bf70a7 12353 `grub_ieee1275_get_integer_property')
12354 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
12355 prototype.
12356 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
12357 function.
12358 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
12359 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 12360 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 12361
e2da7d26 123622008-01-19 Robert Millan <rmh@aybabtu.com>
12363
12364 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
12365 command after "shut-down", since implementations differ on which
12366 the command for halt is.
12367
59f1fd8d 123682008-01-19 Robert Millan <rmh@aybabtu.com>
12369
12370 * include/grub/i386/linuxbios/console.h: Add header protection.
12371 (grub_keyboard_controller_init): New function prototype.
12372 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
12373 (KEYBOARD_COMMAND_READ): Likewise.
12374 (KEYBOARD_COMMAND_WRITE): Likewise.
12375 (KEYBOARD_SCANCODE_SET1): Likewise.
12376 (grub_keyboard_controller_write): New function.
12377 (grub_keyboard_controller_read): Likewise.
12378 (grub_keyboard_controller_init): Likewise.
12379
12380 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
12381 (grub_console_init): On coreboot/LinuxBIOS, call
12382 grub_keyboard_controller_init().
12383
5f5a7c15 123842008-01-19 Robert Millan <rmh@aybabtu.com>
12385
12386 PowerPC changes provided by Pavel Roskin.
12387
12388 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
12389 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
12390 don't rely on cmain() doing it.
12391 * kern/i386/ieee1275/startup.S (_start): Store %eax in
12392 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
12393
1210e168 123942008-01-16 Robert Millan <rmh@aybabtu.com>
12395
12396 * include/grub/i386/linuxbios/memory.h
12397 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
12398 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
12399 receive `table_header' as argument. Instead, probe for it in the
12400 known memory ranges where it can be present.
12401 (grub_available_iterate): Do not pass a fixed `table_header' address
12402 to grub_linuxbios_table_iterate().
12403
3d04eab8 124042008-01-15 Robert Millan <rmh@aybabtu.com>
12405
12406 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
12407 * conf/i386-ieee1275.rmk: New file.
12408 * include/grub/i386/ieee1275/console.h: Likewise.
12409 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
12410 * include/grub/i386/ieee1275/kernel.h: Likewise.
12411 * include/grub/i386/ieee1275/time.h: Likewise.
12412 * kern/i386/ieee1275/init.c: Likewise.
12413 * kern/i386/ieee1275/startup.S: Likewise.
12414
d1bc1b73 124152008-01-15 Robert Millan <rmh@aybabtu.com>
12416
12417 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
12418 when pointers are 32-bit (but still do set it to one when they are
12419 64-bit).
12420
66a65807 124212008-01-15 Robert Millan <rmh@aybabtu.com>
12422
12423 * include/grub/ieee1275/ieee1275.h
12424 (grub_ieee1275_get_integer_property): New function prototype.
12425
12426 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
12427 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 12428 grub_ieee1275_get_property() to handle endianness.
66a65807 12429
12430 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
12431 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 12432 where appropriate.
66a65807 12433 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
12434 (grub_map): Likewise.
12435 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
12436
a83ccafd 124372008-01-15 Bean <bean123ch@gmail.com>
12438
12439 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
12440 (grub_script_execute_cmdline): Reset grub_errno.
12441
12442 * normal/main.c (read_config_file): Reset grub_errno.
12443
12444 * normal/parse.y (script_init): New.
12445 (script): Move function and menuentry here.
12446 (delimiter): New.
12447 (command): Add delimiter at the end of command.
12448 (commands): Adjust to match the new command.
12449 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 12450 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 12451 (if): Use the new commands.
12452
12453 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
12454
df6ecfc6 124552008-01-15 Robert Millan <rmh@aybabtu.com>
12456
12457 * normal/menu.c (run_menu): Move timeout message from here ...
12458 (print_timeout): ... to here.
12459 (run_menu): Use print_timeout() once during initial draw to print
12460 the whole message, and again in every clock tick to update only
12461 the number of seconds.
12462
87ae25eb 124632008-01-15 Robert Millan <rmh@aybabtu.com>
12464
12465 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
12466 actual size of `available' from grub_ieee1275_get_property(), and
12467 restrict parsing to that bound.
12468
47bf09a4 124692008-01-15 Christian Franke <franke@computer.org>
12470
12471 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
12472 (argp_program_version): Remove variable.
12473 (argp_program_bug_address): Likewise.
12474 (options): Convert from struct argp_option to struct option.
12475 (struct arguments): Remove.
12476 (parse_opt): Remove.
12477 (usage): New function.
12478 (main): Replace struct args members by simple variables.
12479 Replace argp_parse() by getopt_long().
12480 Add switch to evaluate options.
12481 Add missing "(...)" around root_dev in prefix string.
12482
c86f1469 124832008-01-14 Robert Millan <rmh@aybabtu.com>
12484
12485 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
12486 for grub_ieee1275_exit(), in order to improve portability.
12487
e622c559 124882008-01-14 Robert Millan <rmh@aybabtu.com>
12489
12490 * util/grub.d/10_linux.in (prefix): Define.
12491 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
12492
44cb1ec8 124932008-01-13 Pavel Roskin <proski@gnu.org>
12494
12495 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
12496 grub_errno if no errors have been detected.
12497
1eb8c802 124982008-01-12 Robert Millan <rmh@aybabtu.com>
12499
12500 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
12501 (grub_util_get_dev_abstraction): New function prototype.
12502
12503 * util/getroot.c: Include `<grub/util/getroot.h>'
12504 (grub_util_get_grub_dev): Move detection of abstraction type to ...
12505 (grub_util_get_dev_abstraction): ... here (new function).
12506
12507 * util/grub-probe.c: Convert PRINT_* to an enum. Add
12508 `PRINT_ABSTRACTION'.
12509 (probe): Probe for abstraction type when requested.
12510 (main): Understand `--target=abstraction'.
12511
12512 * util/i386/efi/grub-install.in: Add abstraction module to core
12513 image when it is found to be necessary.
12514 * util/i386/pc/grub-install.in: Likewise.
12515 * util/powerpc/ieee1275/grub-install.in: Likewise.
12516
12517 * util/update-grub_lib.in (font_path): Return system path without
12518 converting to GRUB path.
12519 * util/update-grub.in: Convert system path returned by font_path()
12520 to a GRUB path. Use `grub-probe -t abstraction' to determine what
12521 abstraction module is needed for loading fonts (if any). Export
12522 that as `GRUB_PRELOAD_MODULES'.
12523 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
12524 insmod commands).
12525
52bd3de9 125262008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
12527
12528 Remove some unused code from reiserfs.
f19dbdb7 12529
52bd3de9 12530 * fs/reiserfs.c (struct grub_reiserfs_key)
12531 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
12532 (struct grub_reiserfs_node_body): Removed.
12533 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
12534 Likewise.
12535 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12536 Likewise.
12537 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12538 Likewise.
12539 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
12540 Likewise.
12541 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
12542 Likewise.
12543 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
12544 Likewise.
12545 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12546 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12547 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
12548
2f80039d 125492008-01-10 Robert Millan <rmh@aybabtu.com>
12550
12551 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
12552 Determines if a file is garbage left by packaging systems, etc.
12553 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
12554 for processing /etc/grub.d scripts.
12555 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
12556 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
12557 as a condition for processing Linux images.
12558
87888032 125592008-01-10 Pavel Roskin <proski@gnu.org>
12560
12561 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
12562 to compile reiserfs.c on PowerPC.
12563
7e54fced 125642008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 12565
12566 * kern/device.c (grub_device_iterate): Do not abort device iteration
12567 when one of the devices cannot be opened.
12568 * kern/disk.c (grub_disk_open): Do not account previous failures of
12569 unrelated functions when grub_errno is checked for.
12570
5aa541e6 125712008-01-08 Robert Millan <rmh@aybabtu.com>
12572
12573 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
12574 `! grub_linux_is_bzimage', change order of address comparison to make
12575 it more intuitive, and improve "too big zImage" error message.
12576
7076340d 125772008-01-08 Robert Millan <rmh@aybabtu.com>
12578
12579 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
12580 `$(update-grub_DATA)'.
12581 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
12582 targets.
12583
9ca70333 125842008-01-07 Robert Millan <rmh@aybabtu.com>
12585
12586 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
12587 which instruction is modified by grub-setup during installation
12588 (since it wasn't obvious by only looking at this file).
12589
38ccf575 125902008-01-07 Robert Millan <rmh@aybabtu.com>
12591
12592 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
12593 listing actual TODO items.
12594
f5db4291 125952008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12596
868967cf 12597 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
12598 correctly.
12599 (grub_reiserfs_get_key_offset): Likewise.
12600 (grub_reiserfs_set_key_offset): Likewise.
12601 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 12602 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 12603
12604 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
12605 better to remove the bitfield version completely.
f19dbdb7 12606
868967cf 126072008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12608
f5db4291 12609 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
12610 allocated from the heap, due to the fshelp implementation.
12611 (grub_reiserfs_dir): Free NODE, due to the same reason.
12612
492e6d9d 126132008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12614
12615 Mostly from Vincent Pelletier:
f19dbdb7 12616
492e6d9d 12617 * fs/reiserfs.c: New file.
f19dbdb7 12618
492e6d9d 12619 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
12620 (reiserfs_mod_SOURCES): New variable.
12621 (reiserfs_mod_CFLAGS): Likewise.
12622 (reiserfs_mod_LDFLAGS): Likewise.
12623
12624 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
12625 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
12626 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
12627 normal/color.c.
12628
9ce3e7c1 126292008-01-06 Robert Millan <rmh@aybabtu.com>
12630
12631 * normal/color.c: Remove `<grub/env.h>'.
12632
f3b58148 126332008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
12634
12635 * include/grub/normal.h: Include <grub/env.h>.
12636
7ac3bcfa 126372008-01-05 Robert Millan <rmh@aybabtu.com>
12638
12639 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
12640 usage example with `(hd0,1)'.
fb358190 12641 Reported by Samuel Thibault.
7ac3bcfa 12642
c8ee99d7 126432008-01-05 Robert Millan <rmh@aybabtu.com>
12644
12645 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
12646 (grub_linux_boot_zimage): Rename to ...
12647 (grub_linux_boot): ... this.
12648 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
12649 (grub_linux_boot_zimage): Conditionalize zImage copy.
12650
12651 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
12652 (grub_linux_boot_bzimage): Remove prototype.
12653 (grub_linux_boot_zimage): Rename to ...
12654 (grub_linux_boot): ... this.
12655
12656 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
12657 (grub_linux_boot): Remove function.
12658
0ece25b1 126592008-01-05 Robert Millan <rmh@aybabtu.com>
12660
12661 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
12662 (grub_env_write_color_highlight): Likewise.
12663 (grub_wait_after_message): Likewise.
12664
12665 * normal/color.c: New file.
12666
12667 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12668 (normal_mod_DEPENDENCIES): Likewise.
12669
12670 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12671 (normal_mod_DEPENDENCIES): Likewise.
12672
12673 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12674 (normal_mod_DEPENDENCIES): Likewise.
12675
12676 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
12677 (normal_mod_DEPENDENCIES): Likewise.
12678
12679 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
12680 for waiting after a message is printed.
12681 * normal/main.c (read_config_file): Likewise.
12682 (grub_normal_init): Register grub_env_write_color_normal() and
12683 grub_env_write_color_highlight() hooks. Mark `color_normal' and
12684 `color_highlight' variables as global.
12685
12686 * normal/menu.c (grub_wait_after_message): New function.
12687 (grub_color_menu_normal): New variable. Replaces ...
12688 (GRUB_COLOR_MENU_NORMAL): ... this macro.
12689 (grub_color_menu_highlight): New variable. Replaces ...
12690 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
12691 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
12692 `GRUB_TERM_COLOR_STANDARD'.
12693 (print_message): Use `grub_setcolorstate' to reload colors. Rename
12694 `normal_code' and `highlight_code' to `old_color_normal' and
12695 `old_color_highlight', respectively.
12696 (grub_menu_init_page): Update colors when drawing the menu, based on
12697 `menu_color_normal' and `menu_color_highlight' variables.
12698 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
12699 a message is printed.
12700
182dd4e5 127012008-01-05 Robert Millan <rmh@aybabtu.com>
12702
12703 * kern/env.c (grub_env_context_open): Propagate hooks for global
12704 variables to new context.
12705
12706 * kern/main.c (grub_set_root_dev): Export `root' variable.
12707
ddf8f6ad 127082008-01-05 Robert Millan <rmh@aybabtu.com>
12709
12710 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 12711 discs unconditionally, since udev and others have options to provide
ddf8f6ad 12712 them.
12713
d8b43d9b 127142008-01-05 Robert Millan <rmh@aybabtu.com>
12715
12716 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
12717
2bff2de3 127182008-01-04 Christian Franke <franke@computer.org>
12719
12720 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
12721 of eisa_mmap.
12722
97eab917 127232008-01-03 Pavel Roskin <proski@gnu.org>
12724
12725 * kern/i386/linuxbios/init.c: Put "void" to all function
12726 declarations with no arguments.
12727 * kern/powerpc/ieee1275/init.c: Likewise.
12728 * term/i386/pc/at_keyboard.c: Likewise.
12729 * term/i386/pc/vga_text.c: Likewise.
12730 * util/grub-mkdevicemap.c: Likewise.
12731
b9416d00 127322008-01-02 Robert Millan <rmh@aybabtu.com>
12733
12734 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
12735 message when loaded image is out of bounds.
12736 (grub_multiboot_load_elf64): Likewise.
12737
92695df9 127382008-01-02 Pavel Roskin <proski@gnu.org>
12739
12740 * util/grub.d/10_linux.in: Try version without ".old" when
12741 looking for initrd. It's better to use initrd from the newer
12742 kernel of the same version than no initrd at all.
12743
d98d9cad 127442008-01-01 Robert Millan <rmh@aybabtu.com>
12745
12746 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
12747
dbfdce36 127482008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
12749
f19dbdb7 12750 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 12751 grub_video_get_active_render_target.
12752 (grub_video_adapter): Added unmap_color and get_active_render_target.
12753
f19dbdb7 12754 * video/video.c: Added grub_video_unmap_color and
dbfdce36 12755 grub_video_get_active_render_target.
12756 (grub_video_get_info): Changed method to accept NULL pointer as an
12757 argument to allow detection of active video adapter.
12758
12759 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
12760 grub_video_vbe_unmap_color_int.
12761 Added grub_video_vbe_unmap_color and
12762 grub_video_vbe_get_active_render_target.
12763 (grub_video_vbe_adapter): Added unmap_color and
12764 get_active_render_target.
12765
f19dbdb7 12766 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 12767 with grub_video_vbe_unmap_color_int.
12768
12769 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
12770 (DEFAULT_NORMAL_COLOR): Likewise.
12771 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
12772 (DEFAULT_FG_COLOR): Removed.
12773 (DEFAULT_BG_COLOR): Likewise.
12774 (DEFAULT_CURSOR_COLOR): Changed value.
12775 (grub_virtual_screen): Added standard_color_setting,
12776 normal_color_setting, highlight_color_setting and term_color.
12777 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
12778 (bitmap_width): Added.
12779 (bitmap_height): Likewise.
12780 (bitmap): Likewise.
12781 (set_term_color): Likewise.
12782 (grub_virtual_screen_setup): Changed to use new terminal coloring
12783 settings.
12784 (grub_gfxterm_init): Added init for bitmap.
12785 (grub_gfxterm_fini): Added destroy for bitmap.
12786 (redraw_screen_rect): Updated to use background bitmap and new
12787 terminal coloring.
12788 (scroll_up): Added optimization for case when there is no bitmap.
12789 (grub_gfxterm_cls): Fixed to use correct background color.
12790 (grub_virtual_screen_setcolorstate): Changed to use new terminal
12791 coloring.
12792 (grub_virtual_screen_setcolor): Likewise.
12793 (grub_virtual_screen_getcolor): Added.
12794 (grub_gfxterm_background_image_cmd): Likewise.
12795 (grub_video_term): Added setcolor and getcolor.
12796 (MOD_INIT): Added registration of background_image command.
12797 (MOD_TERM): Added unregistration for background_image command.
12798
c3c20931 127992007-12-30 Pavel Roskin <proski@gnu.org>
12800
12801 * loader/multiboot_loader.c: Fix multiboot command
12802 unregistration. Fix all typos in the word "multiboot".
12803
df266716 128042007-12-29 Pavel Roskin <proski@gnu.org>
94239199 12805
12806 * util/grub.d/10_linux.in: Refactor search for initrd. Add
12807 support for initrd names used in Fedora.
12808
fc6e896c 128092007-12-26 Bean <bean123ch@gmail.com>
12810
12811 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
12812 (cpio_mod_SOURCES): New variable.
12813 (cpio_mod_CFLAGS): Likewise.
12814 (cpio_mod_LDFLAGS): Likewise.
12815
12816 * fs/cpio.c: New file.
12817
12818 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
12819
12820 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
12821
12822 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
12823
12824 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12825
533110ad 128262007-12-25 Robert Millan <rmh@aybabtu.com>
12827
12828 * include/grub/term.h (struct grub_term): Add `getcolor' function.
12829 (grub_getcolor): New function.
12830
12831 * kern/term.c (grub_getcolor): New function.
12832 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
12833 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
12834 (print_entry): Set normal and highlight colors to
12835 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
12836 respectively, before printing and restore them to old
12837 values afterwards.
12838 (grub_menu_init_page): Likewise. Fill an additional colored space
12839 that would otherwise be left blank.
12840
12841 * term/efi/console.c (grub_console_getcolor): New function.
12842 (struct grub_console_term.getcolor): New variable.
12843 * term/i386/pc/console.c (grub_console_getcolor): New function.
12844 (struct grub_console_term.getcolor): New variable.
12845 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
12846 (struct grub_console_term.getcolor): New variable.
12847
12848 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
12849 (struct grub_console_term.setcolor): Remove variable.
12850 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
12851 (struct grub_console_term.setcolor): Remove variable.
12852 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
12853 (struct grub_console_term.setcolor): Remove variable.
12854 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
12855 (struct grub_console_term.setcolor): Remove variable.
12856
4931827f 128572007-12-25 Robert Millan <rmh@aybabtu.com>
12858
12859 * configure.ac: Search for possible unifont.hex locations, and
12860 define UNIFONT_HEX if found.
12861
12862 * Makefile.in (UNIFONT_HEX): Define variable.
12863 (DATA): Rename to ...
12864 (PKGLIB): ... this. Update all users.
12865 (PKGDATA): New variable.
12866 (pkgdata_IMAGES): Rename to ...
12867 (pkglib_IMAGES): ... this. Update all users.
12868 (pkgdata_MODULES): Rename to ...
12869 (pkglib_MODULES): ... this. Update all users.
12870 (pkgdata_PROGRAMS): Rename to ...
12871 (pkglib_PROGRAMS): ... this. Update all users.
12872 (pkgdata_DATA): Rename to ...
12873 (pkglib_DATA): ... this. Update all users.
12874 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
12875 (unicode.pff, ascii.pff): New rules.
12876 (all-local): Add `$(PKGDATA)' dependency.
12877 (install-local): Process `$(PKGDATA)'.
12878
12879 * util/update-grub_lib.in (font_path): Search for *.pff files in
12880 a few more locations, including `${pkgdata}'.
12881
57e57e31 128822007-12-23 Robert Millan <rmh@aybabtu.com>
12883
12884 Patch from Bean <bean123ch@gmail.com>:
12885 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
12886 `size'.
12887
4bc72aa9 128882007-12-21 Bean <bean123ch@gmail.com>
12889
12890 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
12891 (ntfscomp_mod_SOURCES): New variable.
12892 (ntfscomp_mod_CFLAGS): Likewise.
12893 (ntfscomp_mod_LDFLAGS): Likewise.
12894
12895 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
12896 (grub_probe_SOURCES): Likewise.
12897 (grub_emu_SOURCES): Likewise.
12898
12899 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12900 (grub_emu_SOURCES): Likewise.
12901
12902 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12903 (grub_emu_SOURCES): Likewise.
12904
12905 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12906 (grub_emu_SOURCES): Likewise.
12907
12908 * fs/ntfs.c (grub_ntfscomp_func): New variable.
12909 (read_run_list): Renamed to grub_ntfs_read_run_list.
12910 (decomp_nextvcn): Moved to ntfscomp.c.
12911 (decomp_getch): Likewise.
12912 (decomp_get16): Likewise.
12913 (decomp_block): Likewise.
12914 (read_block): Likewise.
12915 (read_data): Partially moved to ntfscomp.c.
12916 (fixup): Change unsigned to grub_uint16_t.
12917 (read_mft): Change unsigned long to grub_uint32_t.
12918 (read_attr): Likewise.
12919 (read_data): Likewise.
12920 (read_run_data): Likewise.
12921 (read_run_list): Likewise.
12922 (read_mft): Likewise.
12923
12924 * fs/ntfscomp.c: New file.
12925
12926 * include/grub/ntfs.h: New file.
12927
af680a87 129282007-12-16 Robert Millan <rmh@aybabtu.com>
12929
12930 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
12931 IDE disk check, since Linux is known to support 20 IDE disks.
12932 Reported by Colin Watson.
12933
84be7599 129342007-12-15 Bean <bean123ch@gmail.com>
12935
12936 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
12937 (lnxboot_img_SOURCES): New variable.
12938 (lnxboot_img_ASFLAGS): Likewise.
12939 (lnxboot_img_LDFLAGS): Likewise.
12940
12941 * boot/i386/pc/lnxboot.S: New file.
12942
6af9db01 129432007-11-24 Pavel Roskin <proski@gnu.org>
12944
12945 * configure.ac: Test if '--build-id=none' is supported by the
12946 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
12947 objcopy to generate incorrect binary files (binutils
12948 2.17.50.0.18-1 as shipped by Fedora 8).
12949 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
12950 linking, so that build ID doesn't break the test.
12951
7361cfe6 129522007-11-24 Pavel Roskin <proski@gnu.org>
12953
12954 * include/grub/i386/time.h: use "void" in the argument list
12955 of grub_cpu_idle().
12956 * include/grub/powerpc/time.h: Likewise.
12957 * include/grub/sparc64/time.h: Likewise.
12958
1593e10c 129592007-11-18 Christian Franke <franke@computer.org>
12960
12961 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
12962 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
12963 This fixes the problem that function keys did not work in grub-emu.
12964
3b8db1a8 129652007-11-18 Christian Franke <franke@computer.org>
12966
12967 * disk/host.c (grub_host_open): Remove attribute unused from
12968 name parameter. Add check for "host". This fixes the problem
12969 that grub-emu does not find partitions.
12970
2e29408d 129712007-11-18 Christian Franke <franke@computer.org>
12972
12973 * util/hostfs.c (is_dir): New function.
12974 (grub_hostfs_dir): Handle missing dirent.d_type case.
12975 (grub_hostfs_read): Add missing fseek().
12976 (grub_hostfs_label): Clear label pointer. This fixes a crash
12977 of grub-emu on "ls (host)".
12978
398cd047 129792007-11-18 Christian Franke <franke@computer.org>
12980
12981 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
12982 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
12983 to 64 bit boundary by default.
12984
c405c391 129852007-11-18 Bean <bean123ch@gmail.com>
12986
12987 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
12988 (hexdump_mod_SOURCES): New variable.
12989 (hexdump_mod_CFLAGS): Likewise.
12990 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 12991
c405c391 12992 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12993
12994 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12995
12996 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12997
12998 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12999
13000 * include/grub/hexdump.h: New file.
13001
13002 * commands/hexdump.c: New file.
13003
5cced7fd 130042007-11-10 Robert Millan <rmh@aybabtu.com>
13005
13006 * commands/i386/pc/play.c (beep_off): Switch order of arguments
13007 in grub_outb() calls.
13008 (beep_on): Likewise.
13009
8b714eb0 130102007-11-10 Christian Franke <franke@computer.org>
13011
13012 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
13013 (grub_menu_run): Likewise.
13014
ce0f1839 130152007-11-10 Robert Millan <rmh@aybabtu.com>
13016
13017 * include/grub/i386/efi/machine.h: New file.
13018 * include/grub/i386/linuxbios/machine.h: Likewise.
13019 * include/grub/i386/pc/machine.h: Likewise.
13020 * include/grub/powerpc/ieee1275/machine.h: Likewise.
13021 * include/grub/sparc64/ieee1275/machine.h: Likewise.
13022
13023 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
13024 (serial_hw_io_addr): New variable.
13025 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
13026 instead of `(unsigned short *) 0x400'.
13027
270c237d 130282007-11-10 Bean <bean123ch@gmail.com>
13029
13030 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
13031
a87783bf 130322007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
13033
13034 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
13035 (vga_mod_SOURCES): Added.
13036 (vga_mod_CFLAGS): Likewise.
13037 (vga_mod_LDFLAGS): Likewise.
13038
13039 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
13040 grub_outb() calls.
13041 (set_map_mask): Likewise.
13042 (set_read_map): Likewise.
13043 (set_read_address): Likewise.
13044 (vga_font): Removed variable.
13045 (get_vga_glyph): Removed function.
13046 (invalidate_char): Likewise.
13047 (write_char): Changed to use grub_font_get_glyph() for font
13048 information.
13049 (grub_vga_putchar): Likewise.
13050 (grub_vga_getcharwidth): Likewise.
13051
6433b448 130522007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
13053
13054 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
13055 flags.
13056 (pxeboot_img_LDFLAGS): Likewise.
13057 (diskboot_img_LDFLAGS): Likewise.
13058 (kernel_img_LDFLAGS): Likewise.
13059
49178511 130602007-11-06 Robert Millan <rmh@aybabtu.com>
13061
13062 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
13063 in grub_outb() calls.
13064 (serial_hw_init): Likewise.
13065
53b052de 130662007-11-05 Robert Millan <rmh@aybabtu.com>
13067
13068 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
13069 spaces. Skip non-regular files.
13070
5ab33bba 130712007-11-05 Robert Millan <rmh@aybabtu.com>
13072
13073 * kern/disk.c (grub_disk_firmware_fini)
13074 (grub_disk_firmware_is_tainted): New variables.
13075
13076 * include/grub/disk.h (grub_disk_firmware_fini)
13077 (grub_disk_firmware_is_tainted): Likewise.
13078
13079 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
13080 (grub_disk_biosdisk_fini): ... to here.
13081 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
13082 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
13083 is set. Register grub_disk_biosdisk_fini() in
13084 `grub_disk_firmware_fini'.
13085
13086 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
13087 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
13088 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
13089 to finish existing firmware disk interface.
13090
13091 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
13092 (ata_mod_SOURCES): New variable.
13093 (ata_mod_CFLAGS): Likewise.
13094 (ata_mod_LDFLAGS): Likewise.
13095
0149ab7c 130962007-11-05 Robert Millan <rmh@aybabtu.com>
13097
13098 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
13099 (grub_ata_wait): Reimplement using grub_millisleep().
13100
13101 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
13102 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
13103
be7ac41e 131042007-11-03 Marco Gerards <marco@gnu.org>
13105
13106 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
13107 (CRTC_ADDR_PORT): New macro.
13108 (CRTC_DATA_PORT): Likewise.
13109 (CRTC_CURSOR): Likewise.
13110 (CRTC_CURSOR_ADDR_HIGH): Likewise.
13111 (CRTC_CURSOR_ADDR_LOW): Likewise.
13112 (update_cursor): New function.
13113 (grub_console_real_putchar): Call `update_cursor'.
13114 (grub_console_gotoxy): Likewise.
13115 (grub_console_cls): Set the default color when clearing the
13116 screen.
13117 (grub_console_setcursor): Implemented.
13118
bb06ab2e 131192007-11-03 Marco Gerards <marco@gnu.org>
13120
13121 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
13122 become activate.
13123 (grub_ata_pio_write): Likewise.
13124
13125 (grub_atapi_identify): Wait after issuing an ATA command.
13126 (grub_atapi_packet): Likewise.
13127 (grub_ata_identify): Likewise.
13128 (grub_ata_readwrite): Likewise.
13129
cf8f780b 131302007-11-03 Marco Gerards <marco@gnu.org>
13131
13132 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
13133 (grub_ata_pio_write): Likewise.
13134 (grub_ata_readwrite): Use `grub_error', instead of
13135 returning `grub_errno'.
13136
ed649e54 131372007-11-03 Marco Gerards <marco@gnu.org>
13138
13139 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
13140 grub_ata_pio_write once for every single sector, instead of for
13141 multiple sectors.
13142
ca25d8f0 131432007-10-31 Robert Millan <rmh@aybabtu.com>
13144
13145 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
13146
13147 * conf/i386-linuxbios.rmk: New file.
13148
13149 * kern/i386/pc/hardware.c: Likewise.
13150 * term/i386/pc/at_keyboard.c: Likewise.
13151 * term/i386/pc/vga_text.c: Likewise.
13152
13153 * include/grub/i386/linuxbios/boot.h: Likewise.
13154 * include/grub/i386/linuxbios/console.h: Likewise.
13155 * include/grub/i386/linuxbios/init.h: Likewise.
13156 * include/grub/i386/linuxbios/kernel.h: Likewise.
13157 * include/grub/i386/linuxbios/loader.h: Likewise.
13158 * include/grub/i386/linuxbios/memory.h: Likewise.
13159 * include/grub/i386/linuxbios/serial.h: Likewise.
13160 * include/grub/i386/linuxbios/time.h: Likewise.
13161
13162 * kern/i386/linuxbios/init.c: Likewise.
13163 * kern/i386/linuxbios/startup.S: Likewise.
13164 * kern/i386/linuxbios/table.c: Likewise.
13165
e911ecc1 131662007-10-31 Marco Gerards <marco@gnu.org>
13167
13168 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
13169 (ata_mod_SOURCES): New variable.
13170 (ata_mod_CFLAGS): Likewise.
13171 (ata_mod_LDFLAGS): Likewise.
13172
13173 * disk/ata.c: New file.
13174
13175 * include/grub/disk.h (grub_disk_dev_id): Add
13176 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 13177
7f66d0e0 131782007-10-31 Robert Millan <rmh@aybabtu.com>
13179
13180 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
13181 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
13182
13183 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
13184 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
13185
13186 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
13187 `<grub/types.h>'.
13188
13189 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
13190
5cd7dd46 131912007-10-27 Robert Millan <rmh@aybabtu.com>
13192
3236ca65 13193 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 13194
2ebfc90f 131952007-10-22 Robert Millan <rmh@aybabtu.com>
13196
13197 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
13198 `"../realmode.S"'.
13199 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
13200
73fcb0f3 132012007-10-22 Robert Millan <rmh@aybabtu.com>
13202
13203 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
13204 (pkgdata_MODULES): Add `biosdisk.mod'.
13205 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
13206 variables.
13207
13208 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
13209 (grub_biosdisk_init): Replace with ...
13210 (GRUB_MOD_INIT(biosdisk)): ... this.
13211 (grub_biosdisk_fini): Replace with ...
13212 (GRUB_MOD_FINI(biosdisk)): ... this.
13213
13214 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
13215 (grub_machine_init): Remove call to grub_biosdisk_init().
13216 (grub_machine_fini): Remove call to grub_machine_fini().
13217
13218 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
13219
3381d274 132202007-10-22 Robert Millan <rmh@aybabtu.com>
13221
13222 * include/grub/time.h: New file.
13223 * include/grub/i386/time.h: Likewise.
13224 * include/grub/powerpc/time.h: Likewise.
13225 * include/grub/sparc64/time.h: Likewise.
13226
13227 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
13228 instances to ...
13229 (KERNEL_MACHINE_TIME_HEADER): ... this.
13230 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
13231 instances to ...
13232 (KERNEL_MACHINE_TIME_HEADER): ... this.
13233 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
13234 instances to ...
13235 (KERNEL_MACHINE_TIME_HEADER): ... this.
13236
13237 * kern/i386/efi/init.c: Include `<grub/time.h>'.
13238 (grub_millisleep): New function.
13239 * kern/i386/pc/init.c: Include `<grub/time.h>'.
13240 (grub_millisleep): New function.
13241 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
13242 Remove `grub/machine/time.h' include.
13243 (grub_millisleep): New function.
13244 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
13245 Remove `grub/machine/time.h' include.
13246 (grub_millisleep): New function.
13247
13248 * include/grub/misc.h (grub_div_roundup): New function.
13249
13250 * kern/misc.c: Include `<grub/time.h>'.
13251 (grub_millisleep_generic): New function.
13252
13253 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
13254 Add `time.h'.
13255 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
13256 Add `time.h'.
13257 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
13258 `machine/time.h'. Add `time.h'.
13259 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13260
a39a0312 132612007-10-21 Robert Millan <rmh@aybabtu.com>
13262
13263 * include/grub/misc.h (grub_max): New function.
13264
2aad70e2 132652007-10-21 Robert Millan <rmh@aybabtu.com>
13266
13267 * util/misc.c (grub_util_info): Call fflush() before returning.
13268
54b71c4b 132692007-10-20 Robert Millan <rmh@aybabtu.com>
13270
13271 * genmk.rb (Image): Copy `extra_flags' from here ...
13272 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
13273
13274 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
13275 to `argc' and `args' arguments.
13276
a979f513 132772007-10-17 Robert Millan <rmh@aybabtu.com>
13278
13279 * kern/i386/loader.S: New file.
13280
13281 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
13282 * kern/i386/loader.S (grub_linux_prot_size)... to here.
13283 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
13284 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
13285 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
13286 * kern/i386/loader.S (grub_linux_real_addr)... to here.
13287 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
13288 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
13289 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
13290 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
13291 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
13292 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
13293 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
13294 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
13295
13296 * kern/i386/realmode.S: New file.
13297
13298 * kern/i386/pc/startup.S (protstack): Moved from here ...
13299 * kern/i386/realmode.S (protstack)... to here.
13300 * kern/i386/pc/startup.S (gdt): Moved from here ...
13301 * kern/i386/realmode.S (gdt)... to here.
13302 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
13303 * kern/i386/realmode.S (prot_to_real)... to here.
13304
13305 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
13306 `kern/i386/realmode.S'.
13307
825fc8fd 133082007-10-17 Robert Millan <rmh@aybabtu.com>
13309
13310 * include/grub/i386/loader.h: New file.
13311
13312 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
13313 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
13314 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
13315 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
13316 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
13317 * include/grub/i386/loader.h (grub_linux_prot_size)
13318 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
13319 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
13320 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
13321 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
13322
13323 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
13324
e179b2f4 133252007-10-15 Robert Millan <rmh@aybabtu.com>
13326
13327 * normal/misc.c (grub_normal_print_device_info): Do not probe for
13328 filesystem when dev->disk is unset.
13329 Do probe for filesystem even when dev->disk->has_partitions is set.
13330 In case a filesystem is found, always report it.
13331 In case it isn't, if dev->disk->has_partitions is set, report that
13332 a partition table was found instead of reporting that no filesystem
13333 could be identified.
13334
5db82af6 133352007-10-12 Robert Millan <rmh@aybabtu.com>
13336
13337 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
13338 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
13339
68f6ac74 13340 * include/grub/types.h (grub_host_to_target16): New macro.
13341 (grub_host_to_target32): Likewise.
13342 (grub_host_to_target64): Likewise.
13343 (grub_target_to_host16): Likewise.
13344 (grub_target_to_host32): Likewise.
13345 (grub_target_to_host64): Likewise.
5db82af6 13346
13347 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13348 Renamed from to ...
13349 (GRUB_MOD_ALIGN): ...this. Update all users.
13350
68f6ac74 13351 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
13352 grub_host_to_target32.
13353 Replace grub_be_to_cpu32 with grub_target_to_host32.
13354 (load_modules): Likewise.
13355 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
13356 Replace grub_be_to_cpu32 with grub_target_to_host32.
13357 Replace grub_cpu_to_be16 with grub_host_to_target16.
13358 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 13359
3cf497cc 133602007-10-12 Robert Millan <rmh@aybabtu.com>
13361
13362 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
13363 * util/elf/grub-mkimage.c: ... here.
13364
13365 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
13366 `util/powerpc/ieee1275/grub-mkimage.c'.
13367
c8cc3692 133682007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 13369
c8cc3692 13370 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
13371 and make it easier to figure out.
13372 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
13373 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
13374 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
13375 leave us with less than HEAP_MIN_SIZE total heap.
13376 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 13377
5c58b791 133782007-10-03 Robert Millan <rmh@aybabtu.com>
13379
13380 * include/grub/i386/io.h: New file.
13381 * commands/i386/pc/play.c (inb): Removed.
13382 (outb): Removed.
13383 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13384 with grub_outb().
afcd2ef8 13385 * term/i386/pc/serial.c (inb): Removed.
13386 (outb): Removed.
13387 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13388 with grub_outb().
13389 * term/i386/pc/vga.c (inb): Removed.
13390 (outb): Removed.
13391 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13392 with grub_outb().
5c58b791 13393
1a477ed6 133942007-10-02 Robert Millan <rmh@aybabtu.com>
13395
13396 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
13397 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13398 Reported by Marcin Kurek.
13399
6b5d80fa 134002007-09-07 Robert Millan <rmh@aybabtu.com>
13401
13402 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
13403 SmartFirmware version updates (as released by Sven Luther), and avoid
13404 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
13405 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
13406 known broken.
13407
5618afbf 134082007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13409
13410 From Hitoshi Ozeki:
13411 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
13412 when merging two regions.
13413
6139dcd9 134142007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13415
508e39ee 13416 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
13417 * normal/completion.c (grub_normal_do_completion): Likewise.
13418 Reported by Hitoshi Ozeki.
13419
134202007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13421
6139dcd9 13422 Do not use devices at boot in chainloading.
f19dbdb7 13423
6139dcd9 13424 * loader/i386/pc/chainloader.c (boot_drive): New variable.
13425 (boot_part_addr): Likewise.
13426 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
13427 with BOOT_DRIVE and BOOT_PART_ADDR.
13428 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
13429 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
13430
38da6516 134312007-08-29 Robert Millan <rmh@aybabtu.com>
13432
13433 Patch from Simon Peter <dn.tlp@gmx.net>:
13434 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
13435 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
13436 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
13437 util/i386/pc/grub-setup.c_DEPENDENCIES.
13438 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
13439 util/grub-probe.c_DEPENDENCIES.
13440 * conf/powerpc-ieee1275.rmk: Likewise.
13441
29d0928c 134422007-08-28 Robert Millan <rmh@aybabtu.com>
13443
13444 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
13445 to tell grub-mkdevicemap how to name devices.
13446 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
13447 feature).
13448
13449 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
13450 util/i386/get_disk_name.c.
13451 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
13452 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
13453 util/ieee1275/get_disk_name.c.
13454
13455 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
13456
13457 * DISTLIST: Add util/i386/get_disk_name.c and
13458 util/ieee1275/get_disk_name.c.
13459
13460 * util/grub-mkdevicemap.c: Replace device naming logic with
13461 grub_util_get_disk_name() calls.
13462
5a0d3cca 134632007-08-20 Robert Millan <rmh@aybabtu.com>
13464
13465 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
13466 (so that it works for both plural and singular quantities).
13467
8b72db2f 134682007-08-05 Robert Millan <rmh@aybabtu.com>
13469
13470 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
13471 so that [xz] isn't taken into account when determining order.
13472
352466bf 134732007-08-02 Marco Gerards <marco@gnu.org>
13474
13475 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
13476 `include/multiboot2.h', `include/grub/elfload.h',
13477 `include/multiboot.h', `include/grub/multiboot.h',
13478 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
13479 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
13480 `kern/elf.c', `loader/multiboot_loader.c',
13481 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
13482 `loader/i386/pc/multiboot2.c',
13483 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
13484 `util/i386/pc/grub-mkrescue.in'. Remove
13485 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
13486 `include/grub/i386/pc/util/biosdisk.h' and
13487 `include/grub/powerpc/ieee1275/multiboot.h'.
13488
8f096014 134892007-08-02 Bean <bean123ch@gmail.com>
13490
13491 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
13492 (ntfs_mod_SOURCES): New variable.
13493 (ntfs_mod_CFLAGS): Likewise.
13494 (ntfs_mod_LDFLAGS): Likewise.
13495
13496 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
13497 (grub_probe_SOURCES): Likewise.
13498 (grub_emu_SOURCES): Likewise.
13499
13500 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
13501 (grub_emu_SOURCES): Likewise.
13502
13503 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
13504 (grub_emu_SOURCES): Likewise.
f19dbdb7 13505
8f096014 13506 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
13507
13508 * fs/ntfs.c: New file.
13509
9959f7db 135102007-08-02 Bean <bean123ch@gmail.com>
13511
13512 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
13513
13514 * file.h (grub_file): Likewise.
13515
13516 * fshelp.h (grub_fshelp_read_file): Likewise.
13517
13518 * util/i386/pc/grub-setup.c (setup): Likewise.
13519 (save_first_sector): Likewise.
13520 (save_blocklists): Likewise.
f19dbdb7 13521
9959f7db 13522 * fs/affs.c (grub_affs_read_file): Likewise.
13523
13524 * fs/ext2.c (grub_ext2_read_file): Likewise.
13525
13526 * fs/fat.c (grub_fat_read_data): Likewise.
13527
13528 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
13529
13530 * fs/hfs.c (grub_hfs_read_file): Likewise.
13531
13532 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13533
13534 * fs/jfs.c (grub_jfs_read_file): Likewise.
13535
13536 * fs/minix.c (grub_minix_read_file): Likewise.
13537
13538 * fs/sfs.c (grub_sfs_read_file): Likewise.
13539
13540 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 13541
9959f7db 13542 * fs/xfs.c (grub_xfs_read_file): Likewise.
13543
13544 * command/blocklist.c (read_blocklist): Likewise.
13545 (print_blocklist): Likewise.
13546
0a203f83 135472007-08-02 Marco Gerards <marco@gnu.org>
13548
13549 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
13550 `util/hostfs.c'.
13551
13552 * disk/host.c: New file.
13553
13554 * util/hostfs.c: Likewise.
13555
13556 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
13557 return `GRUB_ERR_BAD_FS'.
13558 * fs/sfs.c (grub_sfs_mount): Likewise.
13559 * fs/xfs.c (grub_xfs_mount): Likewise.
13560
13561 * include/grub/disk.h (enum grub_disk_dev_id): Add
13562 `GRUB_DISK_DEVICE_HOST_ID'.
13563
13564 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
13565
e5dfe777 135662007-07-24 Jerone Young <jerone@gmail.com>
13567
f19dbdb7 13568 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 13569 modules for compilation.
13570 * conf/powerpc-ieee1275.rmk: Likewise.
13571
13572 * include/multiboot.h: Move multiboot definitions to one file. Rename
13573 many definitions to not get grub specific.
13574 * include/multiboot2.h: Create header with multiboot 2 definitions.
13575 * include/grub/multiboot.h: Header for grub specific function
13576 prototypes and definitions.
13577 * include/grub/multiboot2.h: Likewise.
13578 * include/grub/multiboot_loader.h: Likewise.
13579 * include/grub/i386/pc/multiboot.h: Removed.
13580 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
13581
13582 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
13583 and 2 to allow for one multiboot and module commands.
13584 * loader/multiboot2.c: Add multiboot2 functionality.
13585 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
13586 and definition names.
13587 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
13588 2 functions.
13589 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
13590 ieee1275 specific multiboot2 code.
13591
13592 * kern/i386/pc/startup.S: Change headers and definition names for
13593 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
13594
daf0f0ba 135952007-07-22 Robert Millan <rmh@aybabtu.com>
13596
13597 * geninitheader.sh: Process file specified in first parameter rather
13598 than hardcoding grub_modules_init.lst.
fe6b695a 13599 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 13600 than hardcoding grub_modules_init.h.
13601
13602 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
13603 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
13604 grub_probe_init.[ch] and grub_setup_init.[ch].
13605
13606 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
13607 grub_modules_init.h with grub_emu_init.h.
13608 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
13609 grub_probe_init.[ch] files.
13610 * conf/i386-efi.rmk: Likewise.
13611 * conf/i386-pc.rmk: Likewise.
13612 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
13613 grub_setup_init.[ch] files.
13614
13615 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
13616 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
13617 to initialize modules rather than a list of hardcoded functions.
13618 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
13619 grub_init_all() to initialize modules rather than a list of hardcoded
13620 functions.
13621
54cdc1cc 136222007-07-22 Robert Millan <rmh@aybabtu.com>
13623
13624 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
13625 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
13626
ad0686cc 136272007-07-22 Robert Millan <rmh@aybabtu.com>
13628
13629 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
13630 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
13631 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
13632 flag when running on SmartFirmware.
13633 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
13634 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
13635 was set.
13636
13637 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13638 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
13639 rather than decreasing it.
13640
13641 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
13642 there's not enough space to do it, fail in the same way as when it
13643 can't be done because there are no partitions.
13644
13645 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
13646 when nvsetenv failed.
13647
969c02ec 136482007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
13649
13650 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
13651 because this rule is automatically generated.
13652 (grub-mkrescue): Removed for the same reason as above.
13653
5a79f472 136542007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
13655
13656 Migrate to GNU General Public License Version 3.
f19dbdb7 13657
5a79f472 13658 * COPYING: Replaced with the plain text version of GPLv3.
13659
13660 * config.guess: Updated from gnulib.
13661 * config.sub: Likewise.
13662
13663 * geninit.sh: Output a GPLv3 copyright notice.
13664 * geninitheader.sh: Likewise.
13665 * genmodsrc.sh: Likewise.
13666 * gensymlist.sh.in: Likewise.
13667
13668 * boot/i386/pc/boot.S: Upgraded to GPLv3.
13669 * boot/i386/pc/diskboot.S: Likewise.
13670 * boot/i386/pc/pxeboot.S: Likewise.
13671 * commands/blocklist.c: Likewise.
13672 * commands/boot.c: Likewise.
13673 * commands/cat.c: Likewise.
13674 * commands/cmp.c: Likewise.
13675 * commands/configfile.c: Likewise.
13676 * commands/echo.c: Likewise.
13677 * commands/help.c: Likewise.
13678 * commands/ls.c: Likewise.
13679 * commands/search.c: Likewise.
13680 * commands/terminal.c: Likewise.
13681 * commands/test.c: Likewise.
13682 * commands/videotest.c: Likewise.
13683 * commands/i386/cpuid.c: Likewise.
13684 * commands/i386/pc/halt.c: Likewise.
13685 * commands/i386/pc/play.c: Likewise.
13686 * commands/i386/pc/reboot.c: Likewise.
13687 * commands/i386/pc/vbeinfo.c: Likewise.
13688 * commands/i386/pc/vbetest.c: Likewise.
13689 * commands/ieee1275/halt.c: Likewise.
13690 * commands/ieee1275/reboot.c: Likewise.
13691 * commands/ieee1275/suspend.c: Likewise.
13692 * disk/loopback.c: Likewise.
13693 * disk/lvm.c: Likewise.
13694 * disk/raid.c: Likewise.
13695 * disk/efi/efidisk.c: Likewise.
13696 * disk/i386/pc/biosdisk.c: Likewise.
13697 * disk/ieee1275/ofdisk.c: Likewise.
13698 * font/manager.c: Likewise.
13699 * fs/affs.c: Likewise.
13700 * fs/ext2.c: Likewise.
13701 * fs/fat.c: Likewise.
13702 * fs/fshelp.c: Likewise.
13703 * fs/hfs.c: Likewise.
13704 * fs/hfsplus.c: Likewise.
13705 * fs/iso9660.c: Likewise.
13706 * fs/jfs.c: Likewise.
13707 * fs/minix.c: Likewise.
13708 * fs/sfs.c: Likewise.
13709 * fs/ufs.c: Likewise.
13710 * fs/xfs.c: Likewise.
13711 * hello/hello.c: Likewise.
13712 * include/grub/acorn_filecore.h: Likewise.
13713 * include/grub/arg.h: Likewise.
13714 * include/grub/bitmap.h: Likewise.
13715 * include/grub/boot.h: Likewise.
13716 * include/grub/cache.h: Likewise.
13717 * include/grub/device.h: Likewise.
13718 * include/grub/disk.h: Likewise.
13719 * include/grub/dl.h: Likewise.
13720 * include/grub/elfload.h: Likewise.
13721 * include/grub/env.h: Likewise.
13722 * include/grub/err.h: Likewise.
13723 * include/grub/file.h: Likewise.
13724 * include/grub/font.h: Likewise.
13725 * include/grub/fs.h: Likewise.
13726 * include/grub/fshelp.h: Likewise.
13727 * include/grub/gzio.h: Likewise.
13728 * include/grub/hfs.h: Likewise.
13729 * include/grub/kernel.h: Likewise.
13730 * include/grub/loader.h: Likewise.
13731 * include/grub/lvm.h: Likewise.
13732 * include/grub/misc.h: Likewise.
13733 * include/grub/mm.h: Likewise.
13734 * include/grub/net.h: Likewise.
13735 * include/grub/normal.h: Likewise.
13736 * include/grub/parser.h: Likewise.
13737 * include/grub/partition.h: Likewise.
13738 * include/grub/pc_partition.h: Likewise.
13739 * include/grub/raid.h: Likewise.
13740 * include/grub/rescue.h: Likewise.
13741 * include/grub/script.h: Likewise.
13742 * include/grub/setjmp.h: Likewise.
13743 * include/grub/symbol.h: Likewise.
13744 * include/grub/term.h: Likewise.
13745 * include/grub/terminfo.h: Likewise.
13746 * include/grub/tparm.h: Likewise.
13747 * include/grub/types.h: Likewise.
13748 * include/grub/video.h: Likewise.
13749 * include/grub/efi/api.h: Likewise.
13750 * include/grub/efi/chainloader.h: Likewise.
13751 * include/grub/efi/console.h: Likewise.
13752 * include/grub/efi/console_control.h: Likewise.
13753 * include/grub/efi/disk.h: Likewise.
13754 * include/grub/efi/efi.h: Likewise.
13755 * include/grub/efi/pe32.h: Likewise.
13756 * include/grub/efi/time.h: Likewise.
13757 * include/grub/i386/linux.h: Likewise.
13758 * include/grub/i386/setjmp.h: Likewise.
13759 * include/grub/i386/types.h: Likewise.
13760 * include/grub/i386/efi/kernel.h: Likewise.
13761 * include/grub/i386/efi/loader.h: Likewise.
13762 * include/grub/i386/efi/time.h: Likewise.
13763 * include/grub/i386/pc/biosdisk.h: Likewise.
13764 * include/grub/i386/pc/boot.h: Likewise.
13765 * include/grub/i386/pc/chainloader.h: Likewise.
13766 * include/grub/i386/pc/console.h: Likewise.
13767 * include/grub/i386/pc/init.h: Likewise.
13768 * include/grub/i386/pc/kernel.h: Likewise.
13769 * include/grub/i386/pc/loader.h: Likewise.
13770 * include/grub/i386/pc/memory.h: Likewise.
13771 * include/grub/i386/pc/multiboot.h: Likewise.
13772 * include/grub/i386/pc/serial.h: Likewise.
13773 * include/grub/i386/pc/time.h: Likewise.
13774 * include/grub/i386/pc/vbe.h: Likewise.
13775 * include/grub/i386/pc/vbeblit.h: Likewise.
13776 * include/grub/i386/pc/vbefill.h: Likewise.
13777 * include/grub/i386/pc/vbeutil.h: Likewise.
13778 * include/grub/i386/pc/vga.h: Likewise.
13779 * include/grub/ieee1275/ieee1275.h: Likewise.
13780 * include/grub/ieee1275/ofdisk.h: Likewise.
13781 * include/grub/powerpc/libgcc.h: Likewise.
13782 * include/grub/powerpc/setjmp.h: Likewise.
13783 * include/grub/powerpc/types.h: Likewise.
13784 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
13785 * include/grub/powerpc/ieee1275/console.h: Likewise.
13786 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
13787 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
13788 * include/grub/powerpc/ieee1275/loader.h: Likewise.
13789 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
13790 * include/grub/powerpc/ieee1275/time.h: Likewise.
13791 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
13792 * include/grub/sparc64/libgcc.h: Likewise.
13793 * include/grub/sparc64/setjmp.h: Likewise.
13794 * include/grub/sparc64/types.h: Likewise.
13795 * include/grub/sparc64/ieee1275/console.h: Likewise.
13796 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13797 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13798 * include/grub/sparc64/ieee1275/time.h: Likewise.
13799 * include/grub/util/biosdisk.h: Likewise.
13800 * include/grub/util/getroot.h: Likewise.
13801 * include/grub/util/lvm.h: Likewise.
13802 * include/grub/util/misc.h: Likewise.
13803 * include/grub/util/raid.h: Likewise.
13804 * include/grub/util/resolve.h: Likewise.
13805 * io/gzio.c: Likewise.
13806 * kern/device.c: Likewise.
13807 * kern/disk.c: Likewise.
13808 * kern/dl.c: Likewise.
13809 * kern/elf.c: Likewise.
13810 * kern/env.c: Likewise.
13811 * kern/err.c: Likewise.
13812 * kern/file.c: Likewise.
13813 * kern/fs.c: Likewise.
13814 * kern/loader.c: Likewise.
13815 * kern/main.c: Likewise.
13816 * kern/misc.c: Likewise.
13817 * kern/mm.c: Likewise.
13818 * kern/parser.c: Likewise.
13819 * kern/partition.c: Likewise.
13820 * kern/rescue.c: Likewise.
13821 * kern/term.c: Likewise.
13822 * kern/efi/efi.c: Likewise.
13823 * kern/efi/init.c: Likewise.
13824 * kern/efi/mm.c: Likewise.
13825 * kern/i386/dl.c: Likewise.
13826 * kern/i386/efi/init.c: Likewise.
13827 * kern/i386/efi/startup.S: Likewise.
13828 * kern/i386/pc/init.c: Likewise.
13829 * kern/i386/pc/lzo1x.S: Likewise.
13830 * kern/i386/pc/startup.S: Likewise.
13831 * kern/ieee1275/ieee1275.c: Likewise.
13832 * kern/powerpc/cache.S: Likewise.
13833 * kern/powerpc/dl.c: Likewise.
13834 * kern/powerpc/ieee1275/cmain.c: Likewise.
13835 * kern/powerpc/ieee1275/crt0.S: Likewise.
13836 * kern/powerpc/ieee1275/init.c: Likewise.
13837 * kern/powerpc/ieee1275/openfw.c: Likewise.
13838 * kern/sparc64/cache.S: Likewise.
13839 * kern/sparc64/dl.c: Likewise.
13840 * kern/sparc64/ieee1275/init.c: Likewise.
13841 * kern/sparc64/ieee1275/openfw.c: Likewise.
13842 * loader/efi/chainloader.c: Likewise.
13843 * loader/efi/chainloader_normal.c: Likewise.
13844 * loader/i386/efi/linux.c: Likewise.
13845 * loader/i386/efi/linux_normal.c: Likewise.
13846 * loader/i386/pc/chainloader.c: Likewise.
13847 * loader/i386/pc/chainloader_normal.c: Likewise.
13848 * loader/i386/pc/linux.c: Likewise.
13849 * loader/i386/pc/linux_normal.c: Likewise.
13850 * loader/i386/pc/multiboot.c: Likewise.
13851 * loader/i386/pc/multiboot_normal.c: Likewise.
13852 * loader/powerpc/ieee1275/linux.c: Likewise.
13853 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13854 * normal/arg.c: Likewise.
13855 * normal/cmdline.c: Likewise.
13856 * normal/command.c: Likewise.
13857 * normal/completion.c: Likewise.
13858 * normal/execute.c: Likewise.
13859 * normal/function.c: Likewise.
13860 * normal/lexer.c: Likewise.
13861 * normal/main.c: Likewise.
13862 * normal/menu.c: Likewise.
13863 * normal/menu_entry.c: Likewise.
13864 * normal/misc.c: Likewise.
13865 * normal/parser.y: Likewise.
13866 * normal/script.c: Likewise.
13867 * normal/i386/setjmp.S: Likewise.
13868 * normal/powerpc/setjmp.S: Likewise.
13869 * normal/sparc64/setjmp.S: Likewise.
13870 * partmap/acorn.c: Likewise.
13871 * partmap/amiga.c: Likewise.
13872 * partmap/apple.c: Likewise.
13873 * partmap/gpt.c: Likewise.
13874 * partmap/pc.c: Likewise.
13875 * partmap/sun.c: Likewise.
13876 * term/gfxterm.c: Likewise.
13877 * term/terminfo.c: Likewise.
13878 * term/efi/console.c: Likewise.
13879 * term/i386/pc/console.c: Likewise.
13880 * term/i386/pc/serial.c: Likewise.
13881 * term/i386/pc/vesafb.c: Likewise.
13882 * term/i386/pc/vga.c: Likewise.
13883 * term/ieee1275/ofconsole.c: Likewise.
13884 * util/biosdisk.c: Likewise.
13885 * util/console.c: Likewise.
13886 * util/genmoddep.c: Likewise.
13887 * util/getroot.c: Likewise.
13888 * util/grub-emu.c: Likewise.
13889 * util/grub-mkdevicemap.c: Likewise.
13890 * util/grub-probe.c: Likewise.
13891 * util/lvm.c: Likewise.
13892 * util/misc.c: Likewise.
13893 * util/raid.c: Likewise.
13894 * util/resolve.c: Likewise.
13895 * util/update-grub.in: Likewise.
13896 * util/update-grub_lib.in: Likewise.
13897 * util/grub.d/00_header.in: Likewise.
13898 * util/grub.d/10_hurd.in: Likewise.
13899 * util/grub.d/10_linux.in: Likewise.
13900 * util/i386/efi/grub-install.in: Likewise.
13901 * util/i386/efi/grub-mkimage.c: Likewise.
13902 * util/i386/pc/grub-install.in: Likewise.
13903 * util/i386/pc/grub-mkimage.c: Likewise.
13904 * util/i386/pc/grub-mkrescue.in: Likewise.
13905 * util/i386/pc/grub-setup.c: Likewise.
13906 * util/i386/pc/misc.c: Likewise.
13907 * util/powerpc/ieee1275/grub-install.in: Likewise.
13908 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
13909 * util/powerpc/ieee1275/misc.c: Likewise.
13910 * video/bitmap.c: Likewise.
13911 * video/video.c: Likewise.
13912 * video/i386/pc/vbe.c: Likewise.
13913 * video/i386/pc/vbeblit.c: Likewise.
13914 * video/i386/pc/vbefill.c: Likewise.
13915 * video/i386/pc/vbeutil.c: Likewise.
13916 * video/readers/tga.c: Likewise.
13917
3572d015 139182007-07-02 Robert Millan <rmh@aybabtu.com>
13919
13920 * conf/i386-efi.rmk: Replace obsolete reference to
13921 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
13922 with util/getroot.c.
13923 * conf/powerpc-ieee1275.rmk: Likewise.
13924 * conf/sparc64-ieee1275.rmk: Likewise.
13925
13926 * util/grub-emu.c (main): Fix unchecked pointer handling.
13927
2c2a681b 139282007-07-02 Robert Millan <rmh@aybabtu.com>
13929
13930 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
13931 invocation to fail, in order to support partition-less media.
13932
13933 * util/i386/pc/grub-install.in: Likewise.
13934
13935 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
13936 which fs or partmap modules are needed (akin to its sister scripts).
13937
13938 Also use grub-probe to get rid of unportable /proc/mounts check.
13939
13940 Print the same informational message that the other scripts do, before
fe6b695a 13941 exiting.
2c2a681b 13942
6193defe 139432007-06-23 Robert Millan <rmh@aybabtu.com>
13944
fe6b695a 13945 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 13946 a font file can be found and, if so, echo the GRUB path to it.
13947
13948 * util/update-grub.in: Handle multiple terminals depending on user
13949 input, platform availability and font file presence. Propagate
13950 variables of our findings to /etc/grub.d/ children.
13951
13952 * util/grub.d/00_header.in: Handle multiple terminals, based on
13953 environment setup by update-grub.
13954
eface1dc 139552007-06-23 Robert Millan <rmh@aybabtu.com>
13956
ba50d28f 13957 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 13958
bf697e28 139592007-06-21 Robert Millan <rmh@aybabtu.com>
13960
13961 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
13962 indicate end of data section in kernel image.
13963 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
13964 GRUB_KERNEL_MACHINE_DATA_END.
13965
13966 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
13967 space for it.
13968 * kern/i386/efi/startup.S: Likewise.
13969
13970 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
13971 during image generation. Implement --prefix option to override this
13972 patch.
13973 * util/i386/efi/grub-mkimage.c: Likewise.
13974
13975 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
13976 code to make path relative to its root into a separate function.
13977
13978 * util/i386/pc/grub-install.in: Use newly provided
13979 make_system_path_relative_to_its_root() to convert ${grubdir}, then
13980 pass the result to grub-install --prefix.
13981
baa574b4 139822007-06-13 Robert Millan <rmh@aybabtu.com>
13983
13984 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
13985 DEFAULT_DEVICE_MAP.
13986 * util/grub-emu.c: Use above definitions from misc.h instead of
13987 defining them.
13988 * util/grub-mkdevicemap.c: Likewise.
13989 * util/i386/pc/grub-setup.c: Likewise.
13990 * util/grub-probe.c: Likewise.
13991 (probe): Abort with grub_util_error() when either
13992 grub_guess_root_device or grub_util_get_grub_dev fails.
13993
0215dcbf 139942007-06-12 Robert Millan <rmh@aybabtu.com>
13995
13996 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
13997 "pager" assignment.
13998 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
13999 "pcdata".
14000 * util/grub-probe.c (probe): Likewise for "drive_name".
14001
8af2ab7b 140022007-06-11 Robert Millan <rmh@aybabtu.com>
14003
14004 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
14005 not just the cdrom one.
14006
59d31694 140072007-06-11 Robert Millan <rmh@aybabtu.com>
14008
14009 * util/i386/pc/grub-mkrescue.in: Add "set -e".
14010 Add --pkglibdir=DIR option to override pkglibdir.
14011 Mention --image-type=TYPE in help output.
14012 Fix --grub-mkimage (it was a no-op).
fe6b695a 14013 Abort gracefully when no parameter is given.
59d31694 14014
7ee367e4 140152007-06-11 Robert Millan <rmh@aybabtu.com>
14016
14017 * util/i386/pc/grub-mkrescue.in: New file.
14018 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
14019 * Makefile.in: Handle bin_SCRIPTS.
14020
29b0ed46 140212007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
14022
14023 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
14024 list of video modes.
14025
c0f90770 140262007-06-06 Robert Millan <rmh@aybabtu.com>
14027
14028 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
14029 file doesn't exist, or if it is in a filesystem grub can't read.
14030
14031 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
14032 not abort if GRUB_DRIVE could not be defined. Rearrange generated
14033 header comment to fit in 80 columns when the variables are resolved.
14034
14035 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
14036 could be identified by update-grub. Remove redundant check for
fe6b695a 14037 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 14038 handles that).
14039
fb36dc26 140402007-06-04 Robert Millan <rmh@aybabtu.com>
14041
14042 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
14043
14044 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
14045
14046 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
14047
0c68c93e 140482007-06-04 Robert Millan <rmh@aybabtu.com>
14049
14050 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
14051
14052 * include/grub/partition.h: Declare grub_apple_partition_map_init and
14053 grub_apple_partition_map_fini.
14054
14055 * util/biosdisk.c
14056 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
14057 to access >2 TiB disks).
14058
14059 Print disk->total_sectors with %llu instead of %lu, since this
14060 variable is always 64-bit (prevents wrong disk size from being displayed
14061 on either >2 TiB disk or big-endian CPU).
14062
14063 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
14064 into a generic case that supports all (sane) partition maps.
14065
14066 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
14067 breaks big-endian.
14068
14069 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
14070 and grub_apple_partition_map_fini() after that.
14071
0f23eb74 140722007-06-01 Robert Millan <rmh@aybabtu.com>
14073
14074 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
14075
14076 * util/grub.d/00_header.in: Only enable gfxterm when
14077 convert_system_path_to_grub_path() succeeds.
14078
42c71976 140792007-05-20 Robert Millan <rmh@aybabtu.com>
14080
14081 * util/update-grub_lib.in: New file.
14082 * DISTLIST: Add update-grub_lib.in.
14083 * conf/common.rmk: Generate update-grub_lib and install it in
14084 $(lib_DATA).
14085 * Makefile.in: Add install routine for $(lib_DATA).
14086
14087 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
14088 function provided by update-grub_lib to support arbitrary paths of
14089 unifont.pff.
14090 * util/update-grub.in: Use convert_system_path_to_grub_path() to
14091 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
14092
5beb2291 140932007-05-19 Robert Millan <rmh@aybabtu.com>
14094
14095 * commands/i386/cpuid.c: New module.
14096 * DISTLIST: Add it.
14097 * conf/i386-efi.rmk: Enable cpuid.mod.
14098 * conf/i386-pc.rmk: Likewise.
14099
7262eca1 141002007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
14101
14102 * kern/disk.c (grub_disk_read): Check return value of
14103 grub_realloc().
14104
260ba823 141052007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
14106
14107 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
14108 arrays.
14109 * disk/raid.c (grub_raid_open): Likewise.
14110
1ecb6cf2 141112007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
14112
14113 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
14114 stack instead of on the heap.
14115
14116 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
14117 before doing a read on it.
14118
14119 * configure.ac: Only use -fno-stack-protector for the target
14120 environment.
f19dbdb7 14121
21c8cbb1 141222007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
14123
14124 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
14125 __attribute_ ((unused)) to mode_type argument.
14126
14127 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 14128
21c8cbb1 14129 * kern/misc.c (memcmp): Fix prototype.
14130
14131 * include/grub/partition.h [GRUB_UTIL]
14132 (grub_gpt_partition_map_init): Add prototype.
14133 (grub_gpt_partition_map_fini): Likewise.
14134
14135 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
14136 at the right place.
14137
14138 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
14139 (grub_fat_read_data): Likewise.
14140 (grub_fat_find_dir): Likewise.
14141
14142 * font/manager.c (find_glyph): Make table a const.
14143 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 14144
849d55d3 141452007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
14146
14147 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
14148 code, first search for device in /dev/mapper, then in /dev.
14149 (grub_util_get_grub_dev): New function.
14150 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
14151 prototype.
14152 * util/grub-probe.c (probe): Remove check for RAID, call
14153 grub_util_get_grub_dev() instead of
14154 grub_util_biosdisk_get_grub_dev().
14155 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
14156 grub_util_biosdisk_get_grub_dev().
14157 * util/i386/pc/grub-setup.c (main): Likewise.
14158
8fff7c2f 141592007-05-16 Robert Millan <rmh@aybabtu.com>
14160
14161 * DISTLIST: Update for the latest changes.
14162 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
14163 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
14164 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
14165 grub/util/biosdisk.h.
14166 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
14167 grub/util/biosdisk.h.
14168
48e12b52 141692007-05-16 Robert Millan <rmh@aybabtu.com>
14170
14171 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
14172
46b9d128 141732007-05-16 Robert Millan <rmh@aybabtu.com>
14174
14175 * util/i386/efi/grub-install.in: New.
14176 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
14177 newly added grub-install.
14178 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
14179 include.
14180 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
14181 grub/util/biosdisk.h.
14182 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
14183 grub/util/biosdisk.h.
14184
2d1a40a9 141852007-05-16 Robert Millan <rmh@aybabtu.com>
14186
14187 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
14188 * include/grub/util/biosdisk.h: ... here.
14189 * util/i386/pc/biosdisk.c: Moved to ...
14190 * util/biosdisk.c: ... here.
14191 * util/i386/pc/getroot.c: Moved to ...
14192 * util/getroot.c: ... here.
14193 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
14194 * util/grub-mkdevicemap.c: ... here.
14195 * util/i386/pc/grub-probe.c: Moved to ...
14196 * util/grub-probe.c: ... here.
14197
9e26e3bc 141982007-05-15 Robert Millan <rmh@aybabtu.com>
14199
14200 * util/update-grub.in: Remove duplicated line in grub.cfg header
14201 message.
14202
57f96397 142032007-05-13 Robert Millan <rmh@aybabtu.com>
14204
14205 * util/update-grub.in: Fix a few assumptions about the devices holding
14206 /, /boot and /boot/grub being the same.
14207 * util/grub.d/00_header.in: Likewise.
14208 * util/grub.d/10_hurd.in: Likewise.
14209 * util/grub.d/10_linux.in: Likewise.
14210
14211 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
14212 patterns. Use that to define the `.old' suffix as older than `'.
14213
14214 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
14215
14216 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
14217 the grub.cfg header message.
14218
2e610d62 142192007-05-11 Robert Millan <rmh@aybabtu.com>
14220
14221 * util/update-grub.in: Create device.map if it doesn't already exist,
14222 before attempting to run grub-probe.
14223 Check for grub-probe and grub-mkdevicemap with the same code
14224 grub-install is using.
14225 Remove test mode.
14226
3f6a10ef 142272007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
14228
14229 * Makefile.in: Add the datarootdir autoconf variable.
14230
02e7b75e 142312007-05-09 Robert Millan <rmh@aybabtu.com>
14232
14233 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 14234 fail gracefully if dev->disk->partition == NULL.
02e7b75e 14235
75f396cc 142362007-05-07 Robert Millan <rmh@aybabtu.com>
14237
14238 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
14239 determine partition map module.
14240 * util/i386/pc/grub-install.in: Use this feature to decide which
14241 partition module to load, instead of hardcoding pc and gpt.
14242
da65cb36 142432007-05-07 Robert Millan <rmh@aybabtu.com>
14244
14245 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
14246 source directory differs from build directory.
14247
b57d6a91 142482007-05-05 Robert Millan <rmh@aybabtu.com>
14249
14250 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
14251 initialisation.
14252
509d00f1 142532007-05-05 Robert Millan <rmh@aybabtu.com>
14254
14255 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
14256
c48f23ef 142572007-05-05 Robert Millan <rmh@aybabtu.com>
14258
14259 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
14260 command-line arguments via ${GRUB_CMDLINE_LINUX}.
14261
20b97658 142622007-05-05 Robert Millan <rmh@aybabtu.com>
14263
14264 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
14265 (grub_probe_SOURCES): Likewise.
14266 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
14267 GPT and initialize dos_part and bsd_part accordingly.
14268 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
14269 install_bsd_part.
14270 (main): Activate gpt module for use during partition identification,
14271 and deactivate it afterwards.
14272 * util/i386/pc/grub-install.in: Add gpt module to core.img.
14273 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
14274 partition identification, and deactivate it afterwards.
14275
99123174 142762007-05-05 Robert Millan <rmh@aybabtu.com>
14277
14278 * term/i386/pc/console.c (grub_console_fini): Call
14279 grub_term_set_current() before grub_term_unregister().
14280
ebd97f6e 142812007-05-04 Robert Millan <rmh@aybabtu.com>
14282
14283 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
14284 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
14285 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
14286 and update-grub_DATA.
14287 * conf/common.rmk: Build and install update-grub components.
14288 * conf/common.mk: Regenerate.
14289 * util/update-grub.in: New. Core of update-grub.
14290 * util/grub.d/00_header.in: New. Generates grub.cfg header.
14291 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
14292 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
14293 * util/grub.d/README: New. Document grub.d directory layout.
14294
b06a264d 142952007-05-01 Robert Millan <rmh@aybabtu.com>
14296
14297 * util/grub-emu.c: Move initialization functions
14298 grub_util_biosdisk_init() and grub_init_all() before
14299 grub_util_biosdisk_get_grub_dev(), which relies on them.
14300
41f0050e 143012007-04-19 Robert Millan <rmh@aybabtu.com>
14302
14303 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
14304 it is used later.
14305
04582bb3 143062007-04-18 Jerone Young <jerone@gmail.com>
14307
f19dbdb7 14308 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 14309 stanza.
14310
08db4632 143112007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 14312
08db4632 14313 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
14314 continue on and look for device node with real device name.
14315
801b76be 143162007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 14317
fe6b695a 14318 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 14319 ability.
14320 * Makefile.in: Add autoconf package transformation code.
14321 * util/i386/pc/grub-install.in: Likewise.
14322 * util/powerpc/ieee1275/grub-install.in: Likewise.
14323
6795c4e1 143242007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14325
14326 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
14327 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
14328 (EXT2_REVISION): Likewise.
14329 (EXT2_INODE_SIZE): Likewise.
14330 (struct grub_ext2_block_group): Added a missing member
14331 "used_dirs".
14332 (grub_ext2_read_inode): Divide by the inode size in a superblock
14333 instead of 128 to obtain INODES_PER_BLOCK.
14334 Use the macro EXT2_INODE_SIZE instead of directly using
14335 SBLOCK->INODE_SIZE.
14336
d70af616 143372007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14338
14339 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
14340 superblock instead of the structure size to compute an
14341 offset. This fixes the problem that GRUB could not read a
14342 filesystem when inode size is different from 128-byte.
14343
3b801603 143442007-03-05 Marco Gerards <marco@gnu.org>
14345
14346 * normal/main.c (read_config_file): When "menu" is not set, create
14347 an initial context.
14348
4785bfe4 143492007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14350
14351 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
14352 (HEAP_LIMIT): New macro.
14353 (grub_claim_heap): Claim memory up to `heaplimit'.
14354
a0cbb023 143552007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14356
14357 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
14358 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
14359 (_start): Likewise.
14360 (grub_arch_modules_addr): Return address after `_end'.
14361 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
14362 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
14363 (add_segments): Calculate `_end' from phdr size and location.
14364 (ALIGN_UP): Moved to ...
14365 * include/grub/misc.h: here.
14366 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
14367 New macro.
14368 (GRUB_IEEE1275_MODULE_BASE): Removed.
14369
fd7d8eba 143702007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14371
14372 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
14373 loop boundary.
14374
9b09e6fc 143752007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14376
14377 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
14378 All users updated.
14379 (grub_elf64_load_hook_t): Likewise.
14380 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
14381 debug output.
14382
3ce27299 143832007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14384
14385 * kern/mm.c: Update copyright.
14386 (grub_mm_debug): Correct syntax error.
14387 (grub_mm_dump_free): New function.
14388 (grub_debug_free): Call `grub_free'.
14389 * include/grub/mm.h: Update copyright.
14390 (grub_mm_dump_free): Add declaration.
14391
077d5fee 143922007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14393
14394 * include/grub/ieee1275/ieee1275.h: Update copyright.
14395 * kern/powerpc/ieee1275/init.c: Likewise.
14396 * kern/powerpc/ieee1275/openfw.c: Likewise.
14397
14398 * loader/powerpc/ieee1275/linux.c: Likewise.
14399 * include/grub/elfload.h: Likewise.
14400 * kern/elf.c: Likewise.
14401 (grub_elf32_load): Pass `base' and `size' parameters. Update all
14402 callers.
14403 (grub_elf64_load): Likewise.
14404 (grub_elf32_load_segment): Move to a nested function.
14405 (grub_elf64_load_segment): Likewise.
14406
dc946850 144072007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14408
14409 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
14410 prototype.
14411 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
14412 (grub_heap_len): Likewise.
14413 (HEAP_SIZE): New macro.
14414 (grub_claim_heap): New function.
14415 (grub_machine_init): Don't claim heap directly. Call
14416 `grub_claim_heap'.
14417 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
14418 (grub_available_iterate): New function.
14419
baa2a121 144202007-02-03 Thomas Schwinge <tschwinge@gnu.org>
14421
14422 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
14423 * configure.ac: Use it for testing the HOST and TARGET compilers.
14424
4fe9862e 144252006-12-13 Thomas Schwinge <tschwinge@gnu.org>
14426
14427 * Makefile.in (enable_grub_emu): New variable.
14428 * configure.ac (--enable-grub-emu): New option.
14429 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
14430 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
14431 * conf/i386-pc.rmk: Likewise.
14432 * conf/powerpc-ieee1275.rmk: Likewise.
14433 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
14434
a8aa5762 144352006-12-12 Marco Gerards <marco@gnu.org>
14436
14437 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
14438
14439 * kern/env.c (grub_env_unset): Don't free the member `value' when
14440 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
14441 pointer.
14442
14443 * normal/main.c (current_menu): Removed.
14444 (free_menu): Unset the `menu' environment variable.
14445 (grub_normal_menu_addentry): Make use of the environment variable
14446 `menu', instead of using the global `current_menu'. Allocate
14447 memory for the sourcecode of this entry.
14448 (read_config_file): New argument `nested', changed all callers.
14449 Only in the case of a new context, initialize a new menu. Set the
14450 `menu' environment variable.
14451 (grub_normal_execute): Don't set and unset the environment
14452 variable `menu' here anymore. Only free the menu when leaving the
14453 context.
14454
14455 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
14456 leak.
14457
957b3a3e 144582006-12-11 Marco Gerards <marco@gnu.org>
14459
14460 * normal/menu_entry.c (run): Fix off by one bug so the last line
14461 is executed. Move the loader check to outside the loop.
14462
ef875714 144632006-12-08 Hollis Blanchard <hollis@penguinppc.org>
14464
14465 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
14466
4e739985 144672006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
14468
14469 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
14470 the number of sectors. Reported by Andrey Shuvikov
14471 <mr_hyro@yahoo.com>.
f19dbdb7 14472
790707f2 144732006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
14474
14475 * kern/disk.c (grub_disk_read): When there is a read error, always
14476 try to read only the necessary data.
f19dbdb7 14477
790707f2 14478 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
14479 disk/raid.c.
14480 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
14481 prototype.
14482 [GRUB_UTIL] (grub_raid_fini): Likewise.
14483 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 14484 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 14485 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
14486 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
14487 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
14488 and grub_raid_fini().
f19dbdb7 14489
03e58196 144902006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14491
14492 * include/grub/types.h (__unused): Rename to UNUSED.
14493 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
14494 (grub_elf64_size): Likewise.
f19dbdb7 14495
ae4f23bf 144962006-11-03 Hollis Blanchard <hollis@penguinppc.org>
14497
14498 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
14499 grub_error_push and grub_error_pop in the error-handling path.
14500 (grub_elf32_load_segment): Only call grub_file_read with non-zero
14501 length.
14502
2166cc83 145032006-11-03 Hollis Blanchard <hollis@penguinppc.org>
14504
14505 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
14506 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14507 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14508 (kernel_elf_SOURCES): Likewise.
14509 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
14510 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
14511 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
14512 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
14513 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
14514 (elf_mod_SOURCES): New variable.
14515 (elf_mod_CFLAGS): Likewise.
14516 (elf_mod_LDFLAGS): Likewise.
14517 * include/grub/types.h (__unused): New macro.
14518 * include/grub/elfload.h: New file.
14519 * kern/elf.c: Likewise.
14520 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
14521 (ELF32_LOADMASK): New macro.
14522 (ELF64_LOADMASK): Likewise.
14523 (vmlinux): Removed.
14524 (grub_linux_load32): New function.
14525 (grub_linux_load64): Likewise.
14526 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
14527 Use grub_elf_t instead of grub_file_t.
14528
a09d5aa5 145292006-11-02 Hollis Blanchard <hollis@penguinppc.org>
14530
14531 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
14532 `catch_result' to struct set_color_args.
14533
d976fc51 145342006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14535
14536 * normal/menu.c: Include grub/script.h.
14537 * normal/menu_entry.c: Likewise.
14538 * include/grub/normal.h: Do not include grub/script.h.
14539
67507549 145402006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14541
14542 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
14543
69203a99 145442006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14545
14546 * kern/disk.c (grub_disk_open): Print debug messages when opening a
14547 disk.
14548 (grub_disk_close): Print debug messages when closing a disk.
14549 (grub_disk_read): Print debug messages when disk read fails.
14550 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
14551 filesystem type.
14552 * kern/partition.c: Include misc.h.
14553 (grub_partition_iterate): Print debug messages when detecting
14554 partition type.
14555
e2b8278c 145562006-10-27 Hollis Blanchard <hollis@penguinppc.org>
14557
14558 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
14559 is negative.
14560 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
14561
97b2f2ff 145622006-10-26 Hollis Blanchard <hollis@penguinppc.org>
14563
14564 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
14565 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
14566
6555d655 145672006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
14568
14569 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
14570 instead of sizeof(lv). Patch by Michael Guntsche.
14571
4d42b77f 145722006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
14573
14574 * disk/lvm.c: Rename VGS to VG_LIST.
14575 (grub_lvm_iterate): Change VGS->LV to VG-LV.
14576 (grub_lvm_open): Likewise.
14577 Thanks to Michael Guntsche for finding this bug.
14578
5d74d927 145792006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14580
14581 * configure.ac (AC_INIT): Bumped to 1.95.
14582
a1bb27e4 145832006-10-14 Robert Millan <rmh@aybabtu.com>
14584
14585 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
14586 with "/dev/.static/dev/md".
14587
e0994b8b 145882006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
14589
14590 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
14591 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
14592 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
14593 DRIVE_NAME are always freed.
14594
14595 * util/i386/pc/biosdisk.c (make_device_name): Add one into
14596 DOS_PART, as a DOS partition is counted from one instead of zero
14597 now. Reported by Robert Millan.
14598
ddd5cee9 145992006-10-14 Robert Millan <rmh@aybabtu.com>
14600
14601 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
14602 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
14603 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
14604 string returned by grub_guess_root_device.
14605 * util/i386/pc/grub-setup.c: Likewise.
14606 * util/i386/pc/grub-probefs.c: Likewise.
14607
14608 * util/i386/pc/grub-probefs.c: Rename to ...
14609 * util/i386/pc/grub-probe.c: ... this.
14610 * DISTLIST: Remove grub-probefs, add grub-probe.
14611 * conf/i386-efi.rmk: Likewise.
14612 * conf/i386-pc.rmk: Likewise.
14613 * util/i386/pc/grub-install.in: Likewise.
14614
14615 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
14616 choose which information we want to print.
14617
2b002173 146182006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
14619
14620 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
14621 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
14622 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
14623 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
14624 video/readers/tga.c and video/i386/pc/vbeutil.c.
14625
146262006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
14627
14628 Added support for RAID and LVM.
f19dbdb7 14629
2b002173 14630 * disk/lvm.c: New file.
14631 * disk/raid.c: Likewise.
14632 * include/grub/lvm.h: Likewise.
f19dbdb7 14633 * include/grub/raid.h: Likewise.
2b002173 14634 * include/grub/util/lvm.h: Likewise.
14635 * include/grub/util/raid.h: Likewise.
14636 * util/lvm.c: Likewise.
14637 * util/raid.c: Likewise.
14638
14639 * include/grub/disk.h (grub_disk_dev_id): Add
14640 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
14641 (grub_disk_get_size): New prototype.
14642 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
14643 returns a partition.
14644 (grub_disk_get_size): New function.
f19dbdb7 14645
2b002173 14646 * kern/i386/pc/init.c (make_install_device): Copy the prefix
14647 verbatim if grub_install_dos_part is -2.
14648
14649 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
14650 and LVM devices.
14651
14652 * util/i386/pc/grub-setup.c (setup): New argument
14653 MUST_EMBED. Force embedding of GRUB when the argument is
14654 true. Close FILE before returning.
14655 (main): Add support for RAID and LVM.
f19dbdb7 14656
2b002173 14657 * conf/common.rmk: Add RAID and LVM modules.
14658 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
14659 util/lvm.c.
14660 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
14661
14662 * kern/misc.c (grub_strstr): New function.
14663 * include/grub/misc.h (grub_strstr): New prototype.
14664
050548d0 146652006-10-10 Tristan Gingold <tristan.gingold@bull.net>
14666
14667 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
14668
da849d2d 146692006-10-05 Tristan Gingold <tristan.gingold@bull.net>
14670
14671 * kern/misc.c (grub_strtoull): Guess the base only if not
14672 specified.
14673
97b2f2ff 146742006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 14675
14676 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
14677 PowerMac support.
14678
97b2f2ff 146792006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 14680
14681 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
14682
14683 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
14684 Remove `flags' argument. All callers changed.
14685 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
14686 (IEEE1275_IHANDLE_INVALID): New variable.
14687 (IEEE1275_CELL_INVALID): New variable.
14688 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
14689 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
14690 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
14691 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
14692 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
14693 codes from Open Firmware. All callers updated.
14694 (grub_ieee1275_next_property): Directly return Open Firmware return
14695 code.
14696 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
14697 Standardize error checking from `grub_ieee1275_get_property'.
14698 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
14699 `devalias' to `aliases'. Correct comments. Consolidate error paths.
14700
97b2f2ff 147012006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 14702
14703 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
14704 `instance_to_package_args' to `instance_to_path_args'.
14705
14706 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
14707 `grub_ieee1275_chosen'.
14708
14709 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
14710 `grub_ieee1275_interpret'.
14711
97b2f2ff 147122006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 14713
14714 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
14715
97b2f2ff 147162006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 14717
14718 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
14719 (__cmpdi): Likewise.
14720
14721 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
14722 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
14723 `grub_ssize_t'.
14724
02bb8acc 14725 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 14726
14727 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
14728 to type `grub_ssize_t'.
14729 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
14730
7f9a8531 147312006-09-22 Marco Gerards <marco@gnu.org>
14732
14733 * normal/script.c (grub_script_create_cmdmenu): Skip leading
14734 newlines.
14735
b5ef1102 147362006-09-22 Marco Gerards <marco@gnu.org>
14737
14738 * commands/echo.c: New file.
14739
14740 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
14741
14742 * conf/common.rmk (echo_mod_SOURCES): New variable.
14743 (echo_mod_CFLAGS): Likewise.
14744 (echo_mod_LDFLAGS): Likewise.
14745
2cff3677 147462006-09-22 Marco Gerards <marco@gnu.org>
14747
14748 * normal/main.c (get_line): Malloc memory instead of using
14749 preallocated memory. Removed the arguments `cmdline' and
14750 `max_len'. Updated all callers.
14751
6ba4688b 147522006-09-22 Marco Gerards <marco@gnu.org>
14753
14754 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
14755 (normal_mod_DEPENDENCIES): Likewise.
14756
14757 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
14758 (normal_mod_DEPENDENCIES): Likewise.
14759
14760 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
14761
e02ac02c 147622006-09-22 Johan Rydberg <jrydberg@gnu.org>
14763
14764 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
14765 programs.
14766 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
14767 (normal_mod_DEPENDENCIES): Likewise.
14768 * conf/i386-pc.mk: Regenerate.
14769 * conf/i386-efi.mk: Likewise
14770 * conf/common.mk: Likewise.
14771 * conf/powerpc-ieee1275.mk: Likewise.
14772 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 14773
8d252e44 147742006-09-22 Robert Millan <rmh@aybabtu.com>
14775
14776 Sync with i386 version.
14777 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
14778 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
14779
209bf7ac 147802006-09-21 Robert Millan <rmh@aybabtu.com>
14781
14782 Import from GRUB Legacy (lib/device.c):
14783 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
14784 (init_device_map) [__linux__]: Add support for I2O devices.
14785
6b146090 147862006-09-14 Marco Gerards <marco@gnu.org>
14787
14788 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
14789 `-melf_i386'.
14790
e38600a8 147912006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 14792
14793 * util/i386/pc/grub-install.in: Skip menu.lst when removing
14794 /boot/grub/*.lst.
78fa1790 14795
2952da5d 14796 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 14797
2952da5d 14798 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
14799 before adding it to device.map.
14800
01b82a64 148012006-08-15 Johan Rydberg <jrydberg@gnu.org>
14802
fe6b695a 14803 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 14804 compiles a file; using the -MD option.
14805 * conf/common.mk: Regenerate.
14806 * conf/i386-pc.mk: Likewise.
14807 * conf/i386-efi.mk: Likewise.
14808 * conf/powerpc-ieee1275.mk: Likewise.
14809 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 14810
1064790d 148112006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
14812
14813 Move the prototypes of grub_setjmp and grub_longjmp to
14814 cpu/setjmp.h, so that each architecture may specify different
14815 attributes.
f19dbdb7 14816
1064790d 14817 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
14818 (grub_longjmp): Likewise.
14819 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
14820 (grub_longjmp): Likewise.
14821 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
14822 (grub_longjmp): Likewise.
14823
14824 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
14825 [!GRUB_UTIL] (grub_longjmp): Removed.
14826
29dda3ed 148272006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
14828
14829 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
14830 "color!" method does not return any value.
14831
ad2a06ed 148322006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14833
14834 * include/grub/bitmap.h: New file.
14835
14836 * include/grub/i386/pc/vbeutil.h: Likewise.
14837
14838 * video/bitmap.c: Likewise.
14839
14840 * video/readers/tga.c: Likewise.
14841
14842 * video/i386/pc/vbeutil.c: Likewise.
14843
14844 * commands/videotest.c: Code cleanup and updated to reflect to new
14845 video API.
14846
14847 * term/gfxterm.c: Likewise.
14848
14849 * video/video.c: Likewise.
14850
14851 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
14852 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
14853 (bitmap_mod_SOURCES): New entry.
14854 (bitmap_mod_CFLAGS): Likewise.
14855 (bitmap_mod_LDFLAGS): Likewise.
14856 (tga_mod_SOURCES): Likewise.
14857 (tga_mod_CFLAGS): Likewise.
14858 (tga_mod_LDFLAGS): Likewise.
14859
14860 * include/grub/video.h (grub_video_blit_operators): New enum type.
14861 (grub_video_render_target): Changed as forward declaration and moved
14862 actual definition to be video driver specific.
14863 (grub_video_adapter.blit_bitmap): Added blitting operator.
14864 (grub_video_adapter.blit_render_target): Likewise.
14865 (grub_video_blit_bitmap): Likewise.
14866 (grub_video_blit_render_target): Likewise.
14867
14868 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
14869 driver specific render target definition.
14870 (grub_video_vbe_map_rgba): Added driver internal helper.
14871 (grub_video_vbe_unmap_color): Updated to use
14872 grub_video_i386_vbeblit_info.
14873 (grub_video_vbe_get_video_ptr): Likewise.
14874
14875 * include/grub/i386/pc/vbeblit.h
14876 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
14877 grub_video_i386_vbeblit_info.
14878 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
14879 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
14880 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
14881 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
14882 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
14883 (grub_video_i386_vbeblit_index_index): Likewise.
14884 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
14885 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
14886 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
14887 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
14888 operator.
14889 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
14890 operator.
14891
14892 * video/i386/pc/vbeblit.c: Updated to reflect changes on
14893 include/grub/i386/pc/vbeblit.h.
14894
14895 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
14896 Updated to use grub_video_i386_vbeblit_info.
14897 (grub_video_i386_vbefill_R8G8B8): Likewise.
14898 (grub_video_i386_vbefill_index): Likewise.
14899 (grub_video_i386_vbefill): Added generic filler.
14900
14901 * video/i386/pc/vbefill.c: Updated to reflect changes on
14902 include/grub/i386/pc/vbefill.h.
14903
14904 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
14905 grub_video_i386_vbeblit_info.
14906 (grub_video_vbe_unmap_color): Likewise.
14907 (grub_video_vbe_blit_glyph): Likewise.
14908 (grub_video_vbe_scroll): Likewise.
14909 (grub_video_vbe_draw_pixel): Removed function.
14910 (grub_video_vbe_get_pixel): Likewise.
14911 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
14912 updated code to use it.
14913 (common_blitter): Added common blitter for render target and bitmap.
14914 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
14915 (grub_video_vbe_blit_render_target): Likewise.
14916
bc8c036d 149172006-07-30 Johan Rydberg <jrydberg@gnu.org>
14918
14919 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
14920 is in text mode if there is no console control protocol instance
14921 available.
14922
684a8eff 149232006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14924
14925 * include/grub/video.h: Code cleanup.
14926
14927 * include/grub/i386/pc/vbe.h: Likewise.
14928
14929 * video/i386/pc/vbe.c: Likewise.
14930
14931 * video/i386/pc/vbeblit.c: Likewise.
14932
14933 * video/i386/pc/vbefill.c: Likewise.
14934
14935 * video/video.c: Likewise. Also added more comments.
14936
5915059b 149372006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
14938
14939 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
14940 (struct grub_biosdisk_dap): Likewise.
14941
14942 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
14943 linkage settings for all functions.
14944
90ce5d56 149452006-07-12 Marco Gerards <marco@gnu.org>
14946
14947 * configure.ac (--enable-mm-debug): Fix typo.
14948
14949 * genkernsyms.sh.in: Use proper quoting for `CC'.
14950
43e7f879 149512006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
14952
14953 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
14954 (normal_mod_ASFLAGS): Remove "-m32".
14955
4889bdec 149562006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
14957
14958 * util/misc.c: Include config.h.
14959 [!HAVE_MEMALIGN]: Do not include malloc.h.
14960 (grub_memalign): Use posix_memalign, if present. Then, use
14961 memalign, if present. Otherwise, emit an error.
14962
14963 * util/grub-emu.c: Do not include malloc.h.
14964
14965 * include/grub/util/misc.h: Include unistd.h. This is required for
14966 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
14967 D. Eades III <hde@foobar-qux.org>.
14968
14969 * configure.ac (AC_GNU_SOURCE): Added.
14970 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
14971 type.
14972
fd39d4da 149732006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
14974
14975 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
14976 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
14977
b786f3b5 149782006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
14979
14980 * include/grub/types.h (grub_host_addr_t): Rename to
14981 grub_target_addr_t.
14982 (grub_host_off_t): Rename to grub_target_off_t.
14983 (grub_host_size_t): Rename to grub_target_size_t.
14984 (grub_host_ssize_t): Rename to grub_target_ssize_t.
14985 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
14986
14987 * include/grub/kernel.h (struct grub_module_header): Change type
14988 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
14989 (grub_module_info): Likewise.
f19dbdb7 14990
051988bb 149912006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
14992
14993 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
14994 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
14995 Velazquez <jesus.velazquez@gmail.com>.
14996
deae281b 149972006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
14998
14999 Count partitions from 1 instead of 0 in the string representation
15000 of partitions. Still use 0-based internally.
f19dbdb7 15001
deae281b 15002 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
15003 (sun_partition_map_iterate): Use grub_partition_t instead of
15004 struct grub_partition *. Cast DESC->START_CYLINDER to
15005 grub_uint64_t after converting the endian.
15006 (sun_partition_map_probe): Subtract 1 for PARTNUM.
15007 (sun_partition_map_get_name): Add 1 to P->INDEX.
15008
15009 * partmap/pc.c (grub_partition_parse): Subtract 1 for
15010 PCDATA->DOS_PART.
15011 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
15012
15013 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
15014 zero instead of one.
15015 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
15016 (gpt_partition_map_get_name): Add 1 into P->INDEX.
15017
15018 * partmap/apple.c (apple_partition_map_iterate): Change the type
15019 of POS to unsigned.
15020 (apple_partition_map_probe): Subtract 1 for PARTNUM.
15021 (apple_partition_map_get_name): Add 1 into P->INDEX.
15022
15023 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
15024 of POS to unsigned.
15025 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
15026 calculate the offset of a partition.
15027 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
15028 (amiga_partition_map_get_name): Add 1 into P->INDEX.
15029
15030 * partmap/acorn.c (acorn_partition_map_find): Change the type of
15031 SECTOR to grub_disk_addr_t.
15032 (acorn_partition_map_iterate): Likewise.
15033 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
15034 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
15035 top.
15036 (acorn_partition_map_get_name): Add 1 into P->INDEX.
15037
15038 * kern/i386/pc/init.c (make_install_device): Add 1 into
15039 GRUB_INSTALL_DOS_PART.
15040
15041 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
15042 conditional.
15043
524a1e6a 150442006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
15045
15046 Clean up the code to support 64-bit addressing in disks and
15047 files. This change is not enough for filesystems yet.
f19dbdb7 15048
524a1e6a 15049 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
15050 type of "start" to grub_uint64_t.
15051 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
15052 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
15053 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
15054 convert addresses.
15055
15056 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
15057 to grub_disk_addr_t.
15058
15059 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
15060 string.
15061
15062 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15063
15064 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
15065 to char *.
15066
15067 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
15068
15069 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
15070
15071 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
15072
15073 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
15074 to grub_off_t, to detect an error from grub_file_seek.
15075 (grub_multiboot_load_elf32): Likewise.
15076
15077 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
15078 maximum unsigned long value when an overflow is detected.
15079 (grub_strtoull): New function.
15080 (grub_divmod64): Likewise.
15081 (grub_lltoa): use grub_divmod64.
15082
15083 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
15084 grub_disk_addr_t.
15085 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
15086 the pointer to next character. Use grub_strtoull instead of
15087 grub_strtoul.
15088 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
15089 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
15090 respectively.
15091
fe6b695a 15092 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 15093 return value is signed.
15094 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
15095 test if OFFSET is less than zero, as OFFSET is unsigned now.
15096
15097 * kern/disk.c (struct grub_disk_cache): Change the type of
15098 "sector" to grub_disk_addr_t.
15099 (grub_disk_cache_get_index): Change the type of SECTOR to
15100 grub_disk_addr_t. Calculate the hash with SECTOR casted to
15101 unsigned after shifting.
15102 (grub_disk_cache_invalidate): Change the type of SECTOR to
15103 grub_disk_addr_t.
15104 (grub_disk_cache_unlock): Likewise.
15105 (grub_disk_cache_store): Likewise.
15106 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
15107 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
15108 grub_disk_addr_t and grub_uint64_t, respectively.
15109 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
15110 body, as the value of OFFSET is tweaked by
15111 grub_disk_check_range. Change the types of START_SECTOR, LEN and
15112 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
15113 respectively.
15114 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
15115 body, as the value of OFFSET is tweaked by
15116 grub_disk_check_range. Change the types of LEN and N to
15117 grub_size_t.
15118
15119 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
15120 and "saved_offset" to grub_off_t.
15121 (test_header): Cast BUF to char *.
15122 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
15123 to char *.
15124 (grub_gzio_read): Change the types of OFFSET and SIZE to
15125 grub_off_t and grub_size_t, respectively.
15126
15127 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
15128 Removed.
15129 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
15130 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
15131 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
15132 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
15133 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
15134
15135 * include/grub/types.h (grub_off_t): Unconditionally set to
15136 grub_uint64_t.
15137 (grub_disk_addr_t): Changed to grub_uint64_t.
15138
15139 * include/grub/partition.h (struct grub_partition): Change the
15140 types of "start", "len" and "offset" to grub_disk_addr_t,
15141 grub_uint64_t and grub_disk_addr_t, respectively.
15142 (grub_partition_get_start): Return grub_disk_addr_t.
15143 (grub_partition_get_len): Return grub_uint64_t.
15144
15145 * include/grub/misc.h (grub_strtoull): New prototype.
15146 (grub_divmod64): Likewise.
15147
15148 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
15149 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
15150 grub_off_t, respectively.
15151 All callers and references changed.
15152
15153 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
15154 grub_size_t in "read".
15155 All callers and references changed.
15156
15157 * include/grub/file.h (struct grub_file): Change the types of
15158 "offset" and "size" to grub_off_t and grub_off_t,
15159 respectively. Change the type of SECTOR to grub_disk_addr_t in
15160 "read_hook".
15161 (grub_file_read): Change the type of LEN to grub_size_t.
15162 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
15163 grub_off_t.
15164 (grub_file_size): Return grub_off_t.
15165 (grub_file_tell): Likewise.
15166 All callers and references changed.
15167
15168 * include/grub/disk.h (struct grub_disk_dev): Change the types of
15169 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
15170 "write".
15171 (struct grub_disk): Change the type of "total_sectors" to
15172 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 15173 "read_hook".
524a1e6a 15174 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
15175 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
15176 (grub_disk_write): Likewise.
15177 All callers and references changed.
15178
15179 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
15180 char * for grub_strncmp to silence gcc.
15181 (grub_iso9660_mount): Likewise.
15182 (grub_iso9660_mount): Likewise.
15183 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
15184 return statement.
15185 (grub_iso9660_iterate_dir): Likewise.
15186 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
15187
15188 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
15189 LEN to grub_disk_addr_t and grub_size_t, respectively.
15190
15191 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
15192
15193 * fs/jfs.c (grub_jfs_read_file): Likewise.
15194
15195 * fs/minix.c (grub_jfs_read_file): Likewise.
15196
15197 * fs/sfs.c (grub_jfs_read_file): Likewise.
15198
15199 * fs/ufs.c (grub_jfs_read_file): Likewise.
15200
15201 * fs/xfs.c (grub_jfs_read_file): Likewise.
15202
15203 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
15204 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
15205 respectively.
15206
15207 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
15208 BLKNR to -1 instead of returning GRUB_ERRNO.
15209 (grub_ext2_read_file): Change the types of SECTOR and
15210 LEN to grub_disk_addr_t and grub_size_t, respectively.
15211
15212 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
15213 LEN to grub_disk_addr_t and grub_size_t, respectively.
15214
15215 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
15216 grub_file_read.
15217
15218 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
15219 string. Do not cast SECTOR explicitly.
15220
15221 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
15222 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
15223 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
15224 grub_disk_addr_t and grub_size_t, respectively. If the sector is
15225 over 2TB and LBA mode is not supported, raise an error.
15226 (get_safe_sectors): New function.
15227 (grub_biosdisk_read): Use get_safe_sectors.
15228 (grub_biosdisk_write): Likewise.
15229
15230 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
15231 (grub_efidisk_write): Likewise.
15232
15233 * disk/loopback.c (delete_loopback): Cosmetic changes.
15234 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
15235 correctly.
15236 (grub_loopback_open): Likewise.
15237 (grub_loopback_read): Likewise. Also, change the type of POS to
15238 grub_off_t, and fix the usage of grub_memset.
15239
15240 * commands/i386/pc/play.c: Include grub/machine/time.h.
15241
15242 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
15243 print FILE->SIZE.
15244
15245 * commands/configfile.c: Include grub/env.h.
15246
15247 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
15248 GRUB_ERRNO directly instead. Change the type of POS to
15249 grub_off_t. Follow the coding standard.
15250
15251 * commands/blocklist.c: Include grub/partition.h.
15252 (grub_cmd_blocklist): Return an error if the underlying device is
15253 not a disk. Take the starting sector of a partition into account,
15254 if a partition is used.
15255
15256 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
15257 a length field.
15258 (lba_mode): Support 64-bit addresses.
15259 (chs_mode): Likewise.
15260 (copy_buffer): Adapted to the new offsets of a length field and a
15261 segment field.
15262 (blocklist_default_start): Allocate 64-bit space.
15263
15264 * boot/i386/pc/boot.S (force_lba): Removed.
15265 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 15266 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 15267 space.
15268 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
15269 is useless.
15270 (lba_mode): Refactored to support a 64-bit address. More size
15271 optimization.
15272 (setup_sectors): Likewise.
15273
53af98ad 152742006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
15275
15276 * DISTLIST: Added include/grub/i386/linux.h. Removed
15277 include/grub/i386/pc/linux.h
15278
15279 * configure.ac (AC_INIT): Bumped to 1.94.
15280
15281 * config.guess: Updated from gnulib.
15282 * config.sub: Likewise.
15283 * install-sh: Likewise.
15284 * mkinstalldirs: Likewise.
15285
b4c1940a 152862006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
15287
15288 * conf/common.rmk (grub_modules_init.lst): Depended on
15289 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
15290 MODSRCFILES.
15291
15292 * genmk.rb (PModule::rule): Reverted the previous change.
15293
cfca1cfd 152942006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
15295
15296 * conf/common.rmk (grub_modules_init.lst): Depends on
15297 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
15298 that the target does not exist before producing.
15299 (grub_modules_init.h): Remove the target before generating.
15300 (grub_emu_init.c): Likewise.
15301
15302 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
15303
aa6d7826 153042006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
15305
15306 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
15307 for the target-specific tests. Make sure that we also have the
15308 up-to-date target variables for those tests.
15309
26c607b9 153102006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
15311
15312 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
15313 (PModule::rule): Likewise.
15314
0162321a 153152006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
15316
15317 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
15318 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
15319 target-specific flags should be prefixed.
15320 (PModule::rule): Likewise.
15321
6c826348 153222006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
15323
15324 * configure.ac (CMP): Check if cmp is available explicitly.
15325
b977bf01 153262006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
15327
15328 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
15329 (target_cpu): New variable.
15330 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 15331
b977bf01 15332 * util/i386/pc/grub-install.in (host_cpu): Removed.
15333 (target_cpu): New variable.
15334 (pkglibdir): Use target_cpu instead of host_cpu.
15335
15336 * util/genmoddep.c: Removed.
f19dbdb7 15337
b977bf01 15338 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
15339 instead of GRUB_HOST_SIZEOF_VOID_P.
15340 * kern/dl.c: Likewise.
15341
15342 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
15343 ...
15344 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15345 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15346 (GRUB_TARGET_SIZEOF_LONG): ... this.
15347 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15348 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15349 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15350 to ...
15351 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15352 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15353 (GRUB_TARGET_SIZEOF_LONG): ... this.
15354 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15355 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15356 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15357 to ...
15358 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15359 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15360 (GRUB_TARGET_SIZEOF_LONG): ... this.
15361 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15362 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15363
15364 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
15365 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
15366 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
15367 instead of GRUB_HOST_SIZEOF_LONG.
15368 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
15369 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
15370 GRUB_CPU_WORDS_BIGENDIAN.
15371 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
15372 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
15373 grub_host_ssize_t.
15374
15375 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
15376 (genmoddep_SOURCES): Likewise.
15377 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
15378 (genmoddep_SOURCES): Likewise.
15379 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
15380 (genmoddep_SOURCES): Likewise.
15381 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
15382 Likewise.
15383 (genmoddep_SOURCES): Likewise.
15384
15385 * genmoddep.awk: New file.
15386
15387 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
15388 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
15389 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
15390 (PModule::rule): Likewise.
15391 (Program::rule): Likewise.
15392 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
15393 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
15394 respectively.
15395
15396 * configure.ac: Rewritten intensively to use host and target
15397 instead of build and host, respectively.
15398
15399 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
15400 (host_cpu): Removed.
15401 (target_cpu): New variable.
15402 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
15403 (BUILD_CC): Removed.
15404 (BUILD_CFLAGS): Likewise.
15405 (BUILD_CPPFLAGS): Likewise.
15406 (TARGET_CC): New variable.
15407 (TARGET_CFLAGS): Likewise.
15408 (TARGET_CPPFLAGS): Likewise.
15409 (TARGET_LDFLAGS): Likewise.
15410 (AWK): Likewise.
15411 (include): Use target_cpu instead of host_cpu.
15412 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 15413
b977bf01 15414 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
15415
f09771a1 154162006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
15417
15418 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
15419 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
15420 field 'false' to 'exec_on_false'.
15421 (grub_script_create_cmdif): Renamed argument names to reflect above
15422 changes.
15423
15424 * normal/execute.c (grub_script_execute_cmdif): Likewise.
15425
15426 * normal/script.c (grub_script_create_cmdif): Likewise.
15427
118f4fb3 154282006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
15429
15430 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
15431 top.
15432 (grub_hfsplus_btree_recptr): Likewise.
15433 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
15434 FILEBLOCK both to pass a block number and store next block
15435 number.
15436 (grub_hfsplus_read_block): Rewritten heavily to support an extent
15437 overflow file correctly. Specify errors appropriately, because
15438 fshelp expects that GRUB_ERRNO is set when fails. Reuse
15439 grub_hfsplus_btree_recptr to get the pointer to a found key.
15440 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
15441 is found.
15442
15443 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
15444 linux.mod.
15445 (_linux_mod_SOURCES): New variable.
15446 (_linux_mod_CFLAGS): Likewise.
15447 (_linux_mod_LDFLAGS): Likewise.
15448 (linux_mod_SOURCES): Likewise.
15449 (linux_mod_CFLAGS): Likewise.
15450 (linux_mod_LDFLAGS): Likewise.
15451
15452 * DISTLIST: Added loader/i386/efi/linux.c,
15453 loader/i386/efi/linux_normal.c and
15454 include/grub/i386/efi/loader.h.
15455
15456 * loader/i386/efi/linux.c: New file.
15457 * loader/i386/efi/linux_normal.c: Likewise.
15458 * include/grub/i386/efi/loader.h: Likewise.
15459
89a7d726 154602006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
15461
15462 * commands/blocklist.c: New file.
15463
15464 * DISTLIST: Added commands/blocklist.c.
15465
15466 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 15467 color for the background, and a darker color for the foreground.
89a7d726 15468 (grub_console_checkkey): Return READ_KEY.
15469 (grub_console_cls): Set the background to
15470 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
15471
15472 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
15473
15474 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
15475 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
15476
15477 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
15478 prototype.
15479
15480 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
15481 BG. The spec is wrong again.
15482
15483 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
15484 prototype.
15485 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
15486
15487 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15488 commands/blocklist.c.
15489 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 15490
89a7d726 15491 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
15492 (blocklist_mod_SOURCES): New variable.
15493 (blocklist_mod_CFLAGS): Likewise.
15494 (blocklist_mod_LDFLAGS): Likewise.
15495
75c8f258 154962006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
15497
15498 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
15499 duplication.
15500 (lba_mode): Use %eax more intensively to reduce the code size.
15501
da2eb181 155022006-05-20 Marco Gerards <marco@gnu.org>
15503
15504 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
15505
15506 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
15507 for `menuentry'.
15508 (script): Accept leading newlines.
15509 (newlines): New rule to describe 0 or more newlines.
15510 (commands): Accept `command' with trailing newline. Fixed the
15511 order in which arguments were passed to `grub_script_add_cmd'.
15512 Accept commands separated by newlines.
15513 (function): Changed to accept newlines.
15514 (menuentry) Rewritten.
15515
15516 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
15517 front of the list, instead of to the end.
15518
577b4050 155192006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
15520
15521 * util/i386/pc/grub-install.in (bindir): New variable.
15522 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
15523 Shaver <lbgwjl@gmail.com>.
15524
0d6e1189 155252006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
15526
15527 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
15528 grub/machine/linux.h
15529 * loader/i386/pc/linux.c: Likewise.
15530
15531 * include/grub/i386/pc/linux.h: Moved to ...
15532 * include/grub/i386/linux.h: ... here.
15533
15534 * include/grub/i386/linux.h (struct linux_kernel_params): New
15535 struct.
f19dbdb7 15536
31b86e9f 155372006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
15538
15539 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
15540 checking.
15541 (grub_video_vbe_blit_glyph): Likewise.
15542 (grub_video_vbe_blit_bitmap): Likewise.
15543 (grub_video_vbe_blit_render_target): Likewise.
15544
83b984de 155452006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
15546
15547 * configure.ac (--with-platform): Properly quote the square
15548 brackets.
15549
5f0413bd 155502006-05-08 Marco Gerards <marco@gnu.org>
15551
15552 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
15553 this...
15554 (kernel_elf_HEADERS): ...to this. Updated all users.
15555 (grubof_symlist.c): Renamed from this...
15556 (kernel_elf_symlist.c): ...to this. Updated all users.
15557 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
15558 (grubof_SOURCES): Renamed from this...
15559 (kernel_elf_SOURCES): ...to this.
15560 (grubof_HEADERS): Renamed from this...
15561 (kernel_elf_HEADERS): ...to this.
15562 (grubof_CFLAGS): Renamed from this...
15563 (kernel_elf_CFLAGS): ...to this.
15564 (grubof_ASFLAGS): Renamed from this...
15565 (kernel_elf_ASFLAGS): ...to this.
15566 (grubof_LDFLAGS): Renamed from this...
15567 (kernel_elf_LDFLAGS): ...to this.
15568
15569 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
15570 this...
15571 (kernel_elf_HEADERS): ...to this. Updated all users.
15572 (grubof_symlist.c): Renamed from this...
15573 (kernel_elf_symlist.c): ...to this. Updated all users.
15574 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
15575 (grubof_SOURCES): Renamed from this...
15576 (kernel_elf_SOURCES): ...to this.
15577 (grubof_HEADERS): Renamed from this...
15578 (kernel_elf_HEADERS): ...to this.
15579 (grubof_CFLAGS): Renamed from this...
15580 (kernel_elf_CFLAGS): ...to this.
15581 (grubof_ASFLAGS): Renamed from this...
15582 (kernel_elf_ASFLAGS): ...to this.
15583 (grubof_LDFLAGS): Renamed from this...
15584 (kernel_elf_LDFLAGS): ...to this.
15585
15586 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
15587 `kernel.elf' instead of `grubof'.
15588
05568c2e 155892006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
15590
15591 Add --with-platform to configure. Use pkglibdir instead of
15592 pkgdatadir. This is reported by Roger Leigh.
15593
15594 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
15595 (host_vendor): Likewise.
15596 (host_os): Likewise.
15597 (pkgdatadir): Likewise.
15598 (platform): New variable.
15599 (pkglibdir): Likewise.
15600 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 15601
05568c2e 15602 * util/i386/pc/grub-install.in (datadir): Removed.
15603 (host_vendor): Likewise.
15604 (host_os): Likewise.
15605 (pkgdatadir): Likewise.
15606 (platform): New variable.
15607 (pkglibdir): Likewise.
15608 Use PKGLIBDIR instead of PKGDATADIR.
15609
15610 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
15611 instead of GRUB_DATADIR.
15612 (main): Likewise.
15613 * util/i386/pc/grub-mkimage.c (usage): Likewise.
15614 (main): Likewise.
15615 * util/i386/efi/grub-mkimage.c (usage): Likewise.
15616 (main): Likewise.
15617
15618 * configure.ac (--with-platform): New option.
15619 Use PLATFORM instead of HOST_VENDOR to specify a platform.
15620
15621 * Makefile.in: Include a makefile based on PLATFORM instead of
15622 HOST_VENDOR.
15623 (pkgdatadir): Not appended by the machine type.
15624 (pkglibdir): Appended by the machine type.
15625 (host_vendor): Removed.
15626 (platform): New variable.
15627 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
15628 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
15629 (uninstall): Likewise.
15630
4e93851c 156312006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
15632
15633 Use the environment context in the menu. Remove the commands
15634 "default" and "timeout", and use variables instead.
f19dbdb7 15635
4e93851c 15636 * normal/menu.c: Include grub/env.h.
15637 (print_entry): Cast TITLE to silence gcc.
15638 (get_timeout): New function.
15639 (set_timeout): Likewise.
15640 (get_entry_number): Likewise.
15641 (run_menu): Use a default entry, a fallback entry and a timeout
15642 in the environment variables "default", "fallback" and
15643 "timeout". Also, tweak the default entry if it is not within the
15644 current menu entries.
15645 (grub_menu_run): Use a fallback entry in the environment variable
15646 "fallback".
15647
15648 * normal/main.c (read_config_file): Do not initialize
15649 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
15650 NEWMENU->TIMEOUT.
15651 (grub_normal_execute): Use a data slot to store the menu.
15652
15653 * include/grub/normal.h (struct grub_menu): Removed default_entry,
15654 fallback_entry and timeout.
15655 (struct grub_menu_list): Removed.
15656 (grub_menu_list_t): Likewise.
15657 (struct grub_context): Likewise.
15658 (grub_context_t): Likewise.
15659 (grub_context_get): Likewise.
15660 (grub_context_get_current_menu): Likewise.
15661 (grub_context_push_menu): Likewise.
15662 (grub_context_pop_menu): Likewise.
15663 (grub_default_init): Likewise.
15664 (grub_default_fini): Likewise.
15665 (grub_timeout_init): Likewise.
15666 (grub_timeout_fini): Likewise.
15667
15668 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
15669 and timeout.mod.
15670 (normal_mod_SOURCES): Removed normal/context.c.
15671
15672 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
15673 commands/default.c, commands/timeout.c and normal/context.c.
15674 (normal_mod_SOURCES): Removed normal/context.c.
15675
15676 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
15677 commands/timeout.c and normal/context.c.
15678 (normal_mod_SOURCES): Removed normal/context.c.
15679
15680 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
15681 commands/default.c, commands/timeout.c and normal/context.c.
15682 (normal_mod_SOURCES): Removed normal/context.c.
15683
15684 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
15685 timeout.mod.
15686 (default_mod_SOURCES): Removed.
15687 (default_mod_CFLAGS): Likewise.
15688 (default_mod_LDFLAGS): Likewise.
15689 (timeout_mod_SOURCES): Removed.
15690 (timeout_mod_CFLAGS): Likewise.
15691 (timeout_mod_LDFLAGS): Likewise.
15692
15693 * DISTLIST: Removed commands/default.c, commands/timeout.c and
15694 normal/context.c.
15695
15696 * commands/default.c: Removed.
15697 * commands/timeout.c: Likewise.
15698 * normal/context.c: Likewise.
15699
1eb9cc1d 157002006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
15701
15702 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
15703
385bd9c1 157042006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
15705
15706 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
15707 "next" to "prev" for readability.
15708 (struct grub_env_sorted_var): New struct.
15709 (grub_env_context): Renamed to ...
15710 (initial_context): ... this.
15711 (grub_env_var_context): Renamed to ...
15712 (current_context): ... this.
15713 (grub_env_find): Look only at CURRENT_CONTEXT.
15714 (grub_env_context_open): Rewritten to copy exported variables from
15715 previous context.
15716 (grub_env_context_close): Rewritten according to the new
15717 scheme. Also, add an assertion to prevent the initial context from
15718 removed.
15719 (grub_env_insert): Removed the code for the sorted list.
15720 (grub_env_remove): Likewise.
15721 (grub_env_export): Simply mark the variable with
15722 GRUB_ENV_VAR_GLOBAL.
15723 (grub_env_set): A cosmetic change for naming consistency.
15724 (grub_env_get): Likewise.
15725 (grub_env_unset): Likewise.
15726 (grub_env_iterate): Rewritten to sort variables within this
15727 function.
15728 (grub_register_variable_hook): Fixed for naming consistency. Call
15729 grub_env_find again, only if NAME is not found at the first time.
15730 (mangle_data_slot_name): New function.
15731 (grub_env_set_data_slot): Likewise.
15732 (grub_env_get_data_slot): Likewise.
15733 (grub_env_unset_data_slot): Likewise.
15734
15735 * include/grub/env.h (grub_env_var_type): New enum.
15736 (GRUB_ENV_VAR_LOCAL): New constant.
15737 (GRUB_ENV_VAR_GLOBAL): Likewise.
15738 (GRUB_ENV_VAR_DATA): Likewise.
15739 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
15740 "type".
15741 (grub_env_set): Replace VAR with NAME for consistency.
15742 (grub_register_variable_hook): Likewise.
15743 (grub_env_export): Specify the name of the argument.
15744 (grub_env_set_data_slot): New prototype.
15745 (grub_env_get_data_slot): Likewise.
15746 (grub_env_unset_data_slot): Likewise.
15747
7f362539 157482006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
15749
15750 Extend the loader so that GRUB can accept a loader which comes
15751 back to GRUB when a loaded image exits. Also, this change adds
15752 support for a chainloader on EFI.
f19dbdb7 15753
7f362539 15754 * term/efi/console.c: Include grub/misc.h.
15755 (grub_console_checkkey): Display a scan code on the top for
15756 debugging. This will be removed once the EFI port gets stable.
15757 Correct the scan code mapping.
15758
15759 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
15760 allocate memory from larger regions, in order to reduce the number
15761 of allocated regions. Otherwise, the MacOSX loader panics.
15762 (filter_memory_map): Avoid less than 1MB for compatibility with
15763 other loaders.
15764 (add_memory_regions): Allocate from the tail of a region, if
15765 possible, to avoid allocating a region near to 1MB, for the MacOSX
15766 loader.
15767
15768 * kern/efi/init.c (grub_efi_set_prefix): Specify
15769 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
15770
15771 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
15772 argument IMAGE_HANDLE and specify it to get a loaded image.
15773 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
15774 grub_efi_get_loaded_image.
fe6b695a 15775 (grub_efi_get_filename): Divide the length by the size of
7f362539 15776 grub_efi_char16_t.
15777 (grub_efi_get_device_path): New function.
15778 (grub_efi_print_device_path): Print End Device Path nodes. Divide
15779 the length by the size of grub_efi_char16_t for a file path device
15780 path node.
15781
15782 * kern/loader.c (grub_loader_noreturn): New variable.
15783 (grub_loader_set): Accept a new argument NORETURN. Set
15784 GRUB_LOADER_NORETURN to NORETURN.
15785 All callers changed.
15786 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
15787 grub_machine_fini.
15788
15789 * include/grub/efi/efi.h (grub_efi_get_device_path): New
15790 prototype.
15791 (grub_efi_get_loaded_image): Take an argument to specify an image
15792 handle.
15793
15794 * include/grub/loader.h (grub_loader_set): Added one more argument
15795 NORETURN.
15796
15797 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
15798 instead of grub_efi_open_protocol.
15799 (grub_efidisk_get_device_name): Likewise.
15800 (grub_efidisk_close): Print a newline.
15801 (grub_efidisk_get_device_handle): Fixed to use
15802 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
15803 GRUB_EFI_DEVICE_PATH_TYPE.
15804
15805 * disk/efi/efidisk.c (device_path_guid): Moved to ...
15806 * kern/efi/efi.c (device_path_guid): ... here.
15807
15808 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
15809 chain.mod.
15810 (kernel_mod_HEADERS): Added efi/disk.h.
15811 (_chain_mod_SOURCES): New variable.
15812 (_chain_mod_CFLAGS): Likewise.
15813 (_chain_mod_LDFLAGS): Likewise.
15814 (chain_mod_SOURCES): Likewise.
15815 (chain_mod_CFLAGS): Likewise.
15816 (chain_mod_LDFLAGS): Likewise.
15817
15818 * DISTLIST: Added include/grub/efi/chainloader.h,
15819 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
15820
15821 * include/grub/efi/chainloader.h: New file.
15822 * loader/efi/chainloader.c: Likewise.
15823 * loader/efi/chainloader_normal.c: Likewise.
15824
c0111d6e 158252006-04-30 Marco Gerards <marco@gnu.org>
15826
15827 * commands/configfile.c (grub_cmd_source): New function.
15828 (GRUB_MOD_INIT): Register the commands `source' and `.'.
15829 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
15830
df5341da 158312006-04-30 Marco Gerards <marco@gnu.org>
15832
15833 * normal/execute.c (grub_script_execute_cmd): Change the return
15834 type to `grub_err_t'. Correctly return the error.
15835 (grub_script_execute_cmdline): In case a command line is not a
15836 command or a function, try to interpret it as an assignment.
15837
f85934bd 158382006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
15839
15840 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
15841 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
15842 skip a node whose name is obviously invalid as UTF-16,
15843 i.e. contains a NUL character. Stop the iteration when the last
15844 directory entry is found. Instead of using the return value of
15845 grub_hfsplus_btree_iterate_node, store the value in RET and use
15846 it, because the iterator can be stopped by the last directory
15847 entry.
15848
8f8a2cf8 158492006-04-30 Marco Gerards <marco@gnu.org>
15850
15851 * include/grub/env.h (grub_env_export): New prototype. Reported
15852 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
15853
a27e84ce 158542006-04-30 Marco Gerards <marco@gnu.org>
15855
15856 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
15857 size of the extents in a catalog file record.
15858
eaef0553 158592006-04-29 Marco Gerards <marco@gnu.org>
15860
15861 * commands/configfile.c (grub_cmd_configfile): Execute the
15862 configfile within its own context.
15863
15864 * include/grub/env.h (grub_env_context_open): New prototype.
15865 (grub_env_context_close): Likewise.
15866
15867 * kern/env.c (grub_env): Removed.
15868 (grub_env_sorted): Likewise.
15869 (grub_env_context): New variable.
15870 (grub_env_var_context): Likewise.
15871 (grub_env_find): Search both the active context and the global
15872 context.
15873 (grub_env_context_open): New function.
15874 (grub_env_context_close): Likewise.
15875 (grub_env_insert): Likewise.
15876 (grub_env_remove): Likewise.
15877 (grub_env_export): Likewise.
15878 (grub_env_set): Changed to use helper functions to avoid code
15879 duplication.
15880 (grub_env_iterate): Rewritten so both the current context and the
15881 global context are being used.
15882
15883 * normal/command.c (export_command): New function.
15884 (grub_command_init): Register the `export' function.
15885
7b455f4d 158862006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
15887
15888 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
15889 explicitly to suppress gcc's warnings.
15890 * fs/fat.c (grub_fat_find_dir): Likewise.
15891 (grub_fat_label): Likewise.
15892 * fs/xfs.c (grub_xfs_read_inode): Likewise.
15893 (grub_xfs_mount): Likewise.
15894 (grub_xfs_label): Likewise.
15895 * fs/affs.c (grub_affs_mount): Likewise.
15896 (grub_affs_label): Likewise.
15897 (grub_affs_iterate_dir): Likewise.
15898 * fs/sfs.c (grub_sfs_mount): Likewise.
15899 (grub_sfs_iterate_dir): Likewise.
15900 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
15901 * fs/hfs.c (grub_hfs_mount): Likewise.
15902 (grub_hfs_cmp_catkeys): Likewise.
15903 (grub_hfs_find_dir): Likewise.
15904 (grub_hfs_dir): Likewise.
15905 (grub_hfs_label): Likewise.
15906 * fs/jfs.c (grub_jfs_mount): Likewise.
15907 (grub_jfs_opendir): Likewise.
15908 (grub_jfs_getent): Likewise.
15909 (grub_jfs_lookup_symlink): Likewise.
15910 (grub_jfs_label): Likewise.
15911 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
15912 (grub_hfsplus_iterate_dir): Likewise.
15913 (grub_hfsplus_btree_iterate_node): Made static.
15914
15915 * util/grub-emu.c (prefix): New variable.
15916 (grub_machine_set_prefix): New function.
15917 (main): Do not set the environment variable "prefix" here. Only
15918 set PREFIX, which is used later by grub_machine_set_prefix.
15919
15920 * include/grub/video.h: Do not include grub/symbol.h.
15921 (grub_video_register): Not exported. This symbol is not defined in
15922 the kernel.
15923 (grub_video_unregister): Likewise.
15924 (grub_video_iterate): Likewise.
15925 (grub_video_setup): Likewise.
15926 (grub_video_restore): Likewise.
15927 (grub_video_get_info): Likewise.
15928 (grub_video_get_blit_format): Likewise.
15929 (grub_video_set_palette): Likewise.
15930 (grub_video_get_palette): Likewise.
15931 (grub_video_set_viewport): Likewise.
15932 (grub_video_get_viewport): Likewise.
15933 (grub_video_map_color): Likewise.
15934 (grub_video_map_rgb): Likewise.
15935 (grub_video_map_rgba): Likewise.
15936 (grub_video_fill_rect): Likewise.
15937 (grub_video_blit_glyph): Likewise.
15938 (grub_video_blit_bitmap): Likewise.
15939 (grub_video_blit_render_target): Likewise.
15940 (grub_video_scroll): Likewise.
15941 (grub_video_swap_buffers): Likewise.
15942 (grub_video_create_render_target): Likewise.
15943 (grub_video_delete_render_target): Likewise.
15944 (grub_video_set_active_render_target): Likewise.
15945
15946 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
15947 Undefined.
15948 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
15949
15950 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
15951 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15952 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15953 instead of $(srcdir)/genkernsyms.sh.
15954
15955 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
15956 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15957 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15958 instead of $(srcdir)/genkernsyms.sh.
15959
15960 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
15961 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15962 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15963 instead of $(srcdir)/genkernsyms.sh.
15964
15965 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
15966 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15967 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15968 instead of $(srcdir)/genkernsyms.sh.
15969
15970 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
15971 genkernsyms.sh.
15972
15973 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
15974 genkernsyms.sh.
15975 (gensymlist.sh): New target.
15976 (genkernsyms.sh): Likewise.
15977
15978 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
15979 genkernsyms.sh.in and gensymlist.sh.in.
15980
15981 * genkernsyms.sh: Removed.
15982 * gensymlist.sh: Likewise.
f19dbdb7 15983
7b455f4d 15984 * genkernsyms.sh.in: New file.
15985 * gensymlist.sh.in: Likewise.
15986
1885bb27 159872006-04-25 Hollis Blanchard <hollis@penguinppc.org>
15988
15989 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
15990 clobber "prefix", since we may have already set it manually.
15991
71538dff 159922006-04-25 Hollis Blanchard <hollis@penguinppc.org>
15993
15994 * kern/misc.c (abort): New alias for grub_abort.
15995
2965c7cc 159962006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
15997
15998 A new machine-specific function "grub_machine_set_prefix" is
15999 defined. This is called after loading modules, so that a prefix
16000 initialization can use modules. Also, this change adds an
16001 intensive debugging feature for the memory manager via the
16002 configure option "--enable-mm-debug".
f19dbdb7 16003
2965c7cc 16004 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
16005 PART.LEN.
16006
16007 * kern/sparc64/ieee1275/init.c (abort): Removed.
16008 (grub_stop): Likewise.
16009 (grub_exit): New function.
16010 (grub_set_prefix): Renamed to ...
16011 (grub_machine_set_prefix): ... this.
16012 (grub_machine_init): Do not call grub_set_prefix.
16013
16014 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
16015 (grub_machine_set_prefix): ... this.
16016 (grub_machine_init): Do not call grub_set_prefix.
16017
16018 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
16019 (grub_machine_init): Do not set the prefix here.
16020
16021 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
16022
16023 * kern/efi/init.c: Include grub/mm.h.
16024 (grub_efi_set_prefix): New function.
16025
16026 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
16027 (grub_efi_get_filename): New function.
16028 (grub_print_device_path): Renamed to ...
16029 (grub_efi_print_device_path): ... this.
16030
16031 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
16032 [MM_DEBUG] (grub_realloc): Likewise.
16033 [MM_DEBUG] (grub_free): Likewise.
16034 [MM_DEBUG] (grub_memalign): Likewise.
16035 [MM_DEBUG] (grub_mm_debug): New variable.
16036 [MM_DEBUG] (grub_debug_malloc): New function.
16037 [MM_DEBUG] (grub_debug_free): New function.
16038 [MM_DEBUG] (grub_debug_realloc): New function.
16039 [MM_DEBUG] (grub_debug_memalign): New function.
16040
16041 * kern/misc.c (grub_abort): Print a newline to distinguish
16042 the message.
16043
16044 * kern/main.c (grub_main): Call grub_machine_set_prefix and
16045 grub_set_root_dev after loading modules. This is necessary when
16046 setting a prefix depends on modules.
16047
16048 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
16049 (grub_efi_print_device_path): ... this.
16050 (grub_efi_get_filename): New prototype.
16051 (grub_efi_set_prefix): Likewise.
16052
16053 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
16054 and grub/disk.h.
16055 (grub_efidisk_get_device_handle): New prototype.
16056 (grub_efidisk_get_device_name): Likewise.
16057
16058 * include/grub/mm.h: Include config.h.
16059 (MM_DEBUG): Removed.
16060 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
16061 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
16062 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
16063 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
16064 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
16065 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
16066 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
16067 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
16068 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
16069
16070 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
16071
16072 * disk/efi/efidisk.c: Include grub/partition.h.
16073 (iterate_child_devices): New function.
16074 (add_device): First, compare only last device path nodes, so that
16075 devices are sorted by the types.
16076 (grub_efidisk_get_device_handle): New function.
16077 (grub_efidisk_get_device_name): Likewise.
16078
16079 * configure.ac (--enable-mm-debug): New option to enable the
16080 memory manager debugging feature. This makes the binary much
16081 bigger, so is disabled by default.
16082
9cacaa17 160832006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
16084
16085 Use grub_abort instead of grub_stop, and grub_exit must be
16086 define in each architecture now. Also, this change adds support
16087 for EFI disks.
f19dbdb7 16088
9cacaa17 16089 * util/i386/pc/grub-probefs.c: Include grub/term.h.
16090 (grub_getkey): New function.
16091 (grub_term_get_current): Likewise.
16092
16093 * util/i386/pc/grub-setup.c: Include grub/term.h.
16094 (grub_getkey): New function.
16095 (grub_term_get_current): Likewise.
16096
16097 * util/misc.c (grub_stop): Renamed to ...
16098 (grub_exit): ... this.
16099
16100 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
16101 (grub_exit): ... this.
16102 (grub_machine_init): Use grub_abort instead of abort.
16103 (grub_stop): Removed.
16104
16105 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
16106 abort.
16107
16108 * kern/i386/pc/startup.S (grub_exit): New function.
16109 (cold_reboot): New label.
16110
16111 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
16112 (grub_efi_init): Call grub_efidisk_init.
16113 (grub_efi_fini): Call grub_efidisk_fini.
16114
16115 * kern/efi/efi.c: Include grub/mm.h.
16116 (grub_efi_console_control_guid): Renamed to ...
16117 (console_control_guid): ... this.
16118 (grub_efi_loaded_image_guid): Renamed to ...
16119 (loaded_image_guid): ... this.
16120 (grub_efi_locate_handle): New function.
16121 (grub_efi_open_protocol): Likewise.
16122 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
16123 GRUB_EFI_CONSOLE_CONTROL_GUID.
16124 (grub_efi_exit): Removed.
16125 (grub_stop): Likewise.
16126 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
16127 (grub_exit): New function.
16128 (grub_print_device_path): Likewise.
16129
16130 * kern/rescue.c (grub_rescue_cmd_exit): New function.
16131 (grub_enter_rescue_mode): Register "exit".
16132
16133 * kern/misc.c (grub_real_dprintf): A cosmetic change.
16134 (grub_abort): New function.
16135
16136 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
16137
16138 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
16139
16140 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
16141
16142 * include/grub/efi/efi.h (grub_efi_exit): Removed.
16143 (grub_print_device_path): New prototype.
16144 (grub_efi_locate_handle): Likewise.
16145 (grub_efi_open_protocol): Likewise.
16146
16147 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
16148 * disk/efi/efidisk.c: Likewise.
16149
16150 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
16151
16152 * include/grub/efi/console_control.h
16153 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
16154
16155 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
16156 last 8 bytes as an array.
16157 (GRUB_EFI_DISK_IO_GUID): New macro.
16158 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
16159 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
16160 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
16161 grub_uint8_t.
16162 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
16163 (struct grub_efi_device_path): Rename the member "sub_type" to
16164 "subtype".
16165 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
16166 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
16167 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
16168 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
16169 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
16170 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
16171 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
16172 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
16173 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
16174 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
16175 (struct grub_efi_pci_device_path): New structure.
16176 (grub_efi_pci_device_path_t): New type.
16177 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
16178 (struct grub_efi_pccard_device_path): New structure.
16179 (grub_efi_pccard_device_path_t): New type.
16180 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
16181 (struct grub_efi_memory_mapped_device_path): New structure.
16182 (grub_efi_memory_mapped_device_path_t): New type.
16183 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
16184 (struct grub_efi_vendor_device_path): New structure.
16185 (grub_efi_vendor_device_path_t): New type.
16186 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
16187 (struct grub_efi_controller_device_path): New structure.
16188 (grub_efi_controller_device_path_t): New type.
16189 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
16190 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
16191 (struct grub_efi_acpi_device_path): New structure.
16192 (grub_efi_acpi_device_path_t): New type.
16193 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
16194 (struct grub_efi_expanded_acpi_device_path): New structure.
16195 (grub_efi_expanded_acpi_device_path_t): New type.
16196 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
16197 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
16198 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
16199 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
16200 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
16201 (struct grub_efi_atapi_device_path): New structure.
16202 (grub_efi_atapi_device_path_t): New type.
16203 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
16204 (struct grub_efi_fibre_channel_device_path): New structure.
16205 (grub_efi_fibre_channel_device_path_t): New type.
16206 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
16207 (struct grub_efi_1394_device_path): New structure.
16208 (grub_efi_1394_device_path_t): New type.
16209 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
16210 (struct grub_efi_usb_device_path): New structure.
16211 (grub_efi_usb_device_path_t): New type.
16212 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
16213 (struct grub_efi_usb_class_device_path): New structure.
16214 (grub_efi_usb_class_device_path_t): New type.
16215 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
16216 (struct grub_efi_i2o_device_path): New structure.
16217 (grub_efi_i2o_device_path_t): New type.
16218 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
16219 (struct grub_efi_mac_address_device_path): New structure.
16220 (grub_efi_mac_address_device_path_t): New type.
16221 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
16222 (struct grub_efi_ipv4_device_path): New structure.
16223 (grub_efi_ipv4_device_path_t): New type.
16224 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
16225 (struct grub_efi_ipv6_device_path): New structure.
16226 (grub_efi_ipv6_device_path_t): New type.
16227 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
16228 (struct grub_efi_infiniband_device_path): New structure.
16229 (grub_efi_infiniband_device_path_t): New type.
16230 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
16231 (struct grub_efi_uart_device_path): New structure.
16232 (grub_efi_uart_device_path_t): New type.
16233 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
16234 (struct grub_efi_vendor_messaging_device_path): New structure.
16235 (grub_efi_vendor_messaging_device_path_t): New type.
16236 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
16237 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
16238 (struct grub_efi_hard_drive_device_path): New structure.
16239 (grub_efi_hard_drive_device_path_t): New type.
16240 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
16241 (struct grub_efi_cdrom_device_path): New structure.
16242 (grub_efi_cdrom_device_path_t): New type.
16243 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
16244 (struct grub_efi_vendor_media_device_path): New structure.
16245 (grub_efi_vendor_media_device_path_t): New type.
16246 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
16247 (struct grub_efi_file_path_device_path): New structure.
16248 (grub_efi_file_path_device_path_t): New type.
16249 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
16250 (struct grub_efi_protocol_device_path): New structure.
16251 (grub_efi_protocol_device_path_t): New type.
16252 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
16253 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
16254 (struct grub_efi_bios_device_path): New structure.
16255 (grub_efi_bios_device_path_t): New type.
16256 (struct grub_efi_disk_io): New structure.
16257 (grub_efi_disk_io_t): New type.
16258 (struct grub_efi_block_io_media): New structure.
16259 (grub_efi_block_io_media_t): New type.
16260 (struct grub_efi_block_io): New structure.
16261 (grub_efi_block_io_t): New type.
16262
16263 * include/grub/misc.h (grub_stop): Removed.
16264 (grub_exit): New prototype.
16265 (grub_abort): Likewise.
16266
16267 * include/grub/disk.h (enum grub_disk_dev_id): Added
16268 GRUB_DISK_DEVICE_EFIDISK_ID.
16269
16270 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
16271 disk/efi/efidisk.c.
16272 (kernel_syms.lst): Remove the target if an error occurs.
16273
49986a9f 162742006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
16275
16276 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
16277 as it was simply too buggy.
16278
970d3b8a 162792006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
16280
16281 * kern/misc.c (grub_lltoa): New function.
16282 (grub_vsprintf): Added support for the long long suffix,
16283 i.e. "ll".
16284
ff04ec24 162852006-04-20 Hollis Blanchard <hollis@penguinppc.org>
16286
16287 * Makefile.in (LDFLAGS): Add variable.
16288 (LD): Remove variable.
16289 * configure.ac: Add -m32 to LDFLAGS.
16290 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
16291 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
16292 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
16293 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
16294 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
16295 variables.
16296 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
16297 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
16298 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
16299
37e5e1a4 163002006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
16301
16302 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
16303 length for unknown glyph.
16304
c352d8dd 163052006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
16306
2eab1c0d 16307 Add support for pre-loaded modules into the EFI port.
f19dbdb7 16308
2eab1c0d 16309 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
16310 completely. Accept one more argument DIR. The caller has changed.
16311
16312 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
16313
16314 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
16315 (grub_efi_loaded_image_guid): New variable.
16316 (grub_efi_get_loaded_image): New function.
16317 (grub_arch_modules_addr): Likewise.
16318
16319 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
16320 prototype.
16321
16322 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
16323 (struct grub_efi_loaded_image): New structure.
16324 (grub_efi_loaded_image_t): New type.
16325
163262006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 16327
c352d8dd 16328 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
16329 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
16330 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
16331
6d01d6b4 163322006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
16333
16334 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
16335
976a4ea0 163362006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
16337
16338 * DISTLIST: Added include/grub/efi/console.h,
16339 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
16340 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16341
16342 * include/grub/efi/console.h: New file.
16343 * include/grub/efi/time.h: Likewise.
16344 * include/grub/i386/efi/kernel.h: Likewise.
16345 * kern/efi/init.c: Likewise.
16346 * kern/efi/mm.c: Likewise.
16347 * term/efi/console.c: Likewise.
f19dbdb7 16348
976a4ea0 16349 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
16350 (grub_stop): Removed.
16351 (grub_get_rtc): Likewise.
16352 (grub_machine_init): Simply call grub_efi_init.
16353 (grub_machine_fini): Call grub_efi_fini.
16354
16355 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
16356 (grub_efi_output_string): Removed.
16357 (grub_efi_stall): New function.
16358 (grub_stop): Likewise.
16359 (grub_get_rtc): Likewise.
16360
16361 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
16362 (grub_efi_stall): New prototype.
16363 (grub_efi_allocate_pages): Likewise.
16364 (grub_efi_free_pages): Likewise.
16365 (grub_efi_get_memory_map): Likewise.
16366 (grub_efi_mm_init): Likewise.
16367 (grub_efi_mm_fini): Likewise.
16368 (grub_efi_init): Likewise.
16369 (grub_efi_fini): Likewise.
16370
16371 * include/grub/i386/efi/time.h: Do not include
16372 grub/symbol.h. Include grub/efi/time.h.
16373 (GRUB_TICKS_PER_SECOND): Removed.
16374 (grub_get_rtc): Likewise.
16375
16376 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
16377 Added padding. The EFI spec is buggy.
16378 (GRUB_EFI_BLACK): New macro.
16379 (GRUB_EFI_BLUE): Likewise.
16380 (GRUB_EFI_GREEN): Likewise.
16381 (GRUB_EFI_CYAN): Likewise.
16382 (GRUB_EFI_RED): Likewise.
16383 (GRUB_EFI_MAGENTA): Likewise.
16384 (GRUB_EFI_BROWN): Likewise.
16385 (GRUB_EFI_LIGHTGRAY): Likewise.
16386 (GRUB_EFI_BRIGHT): Likewise.
16387 (GRUB_EFI_DARKGRAY): Likewise.
16388 (GRUB_EFI_LIGHTBLUE): Likewise.
16389 (GRUB_EFI_LIGHTGREEN): Likewise.
16390 (GRUB_EFI_LIGHTCYAN): Likewise.
16391 (GRUB_EFI_LIGHTRED): Likewise.
16392 (GRUB_EFI_LIGHTMAGENTA): Likewise.
16393 (GRUB_EFI_YELLOW): Likewise.
16394 (GRUB_EFI_WHITE): Likewise.
16395 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
16396 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
16397 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
16398 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
16399 (GRUB_EFI_BACKGROUND_RED): Likewise.
16400 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
16401 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
16402 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
16403 (GRUB_EFI_TEXT_ATTR): Likewise.
16404
16405 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
16406 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16407 (kernel_mod_HEADERS): Added efi/time.h.
16408
83709125 164092006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
16410
16411 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
16412 include/grub/efi/api.h, include/grub/efi/console_control.h,
16413 include/grub/efi/efi.h, include/grub/efi/pe32.h,
16414 include/grub/i386/efi/time.h, kern/efi/efi.c,
16415 kern/i386/efi/init.c, kern/i386/efi/startup.S,
16416 and util/i386/efi/grub-mkimage.c.
16417
16418 * Makefile.in (RMKFILES): Added i386-efi.rmk.
16419
16420 * genmk.rb (PModule#rule): Do not export symbols if
16421 #{prefix}_EXPORTS is set to "no".
16422
16423 * conf/i386-efi.mk: New file.
16424 * conf/i386-efi.rmk: Likewise.
16425 * include/grub/efi/api.h: Likewise.
16426 * include/grub/efi/console_control.h: Likewise.
16427 * include/grub/efi/efi.h: Likewise.
16428 * include/grub/efi/pe32.h: Likewise.
16429 * include/grub/i386/efi/time.h: Likewise.
16430 * kern/efi/efi.c: Likewise.
16431 * kern/i386/efi/init.c: Likewise.
16432 * kern/i386/efi/startup.S: Likewise.
16433 * util/i386/efi/grub-mkimage.c: Likewise.
16434
164352006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 16436
16437 * include/grub/script.h: Include <grub/parser.h> and
16438 "grub_script.tab.h".
16439 (struct grub_lexer_param): New struct.
16440 (struct grub_parser_param): Likewise.
16441 (grub_script_create_arglist): Pass the state in an argument.
16442 (grub_script_add_arglist): Likewise.
16443 (grub_script_create_cmdline): Likewise.
16444 (grub_script_create_cmdblock): Likewise.
16445 (grub_script_create_cmdif): Likewise.
16446 (grub_script_create_cmdmenu): Likewise.
16447 (grub_script_add_cmd): Likewise.
16448 (grub_script_arg_add): Likewise.
16449 (grub_script_lexer_ref): Likewise.
16450 (grub_script_lexer_deref): Likewise.
16451 (grub_script_lexer_record_start): Likewise.
16452 (grub_script_lexer_record_stop): Likewise.
16453 (grub_script_mem_record): Likewise.
16454 (grub_script_mem_record_stop): Likewise.
16455 (grub_script_malloc): Likewise.
16456 (grub_script_yylex): Likewise.
16457 (grub_script_yyparse): Likewise.
16458 (grub_script_yyerror): Likewise.
16459 (grub_script_yylex): Likewise.
16460 (grub_script_lexer_init): Return the state.
16461
16462 * normal/lexer.c (grub_script_lexer_state): Removed variable.
16463 (grub_script_lexer_done): Likewise.
16464 (grub_script_lexer_getline): Likewise.
16465 (grub_script_lexer_refs): Likewise.
16466 (script): Likewise.
16467 (newscript): Likewise.
16468 (record): Likewise.
16469 (recording): Likewise.
16470 (recordpos): Likewise.
16471 (recordlen): Likewise.
16472 (grub_script_lexer_init): Return the state instead of setting
16473 global variables.
16474 (grub_script_lexer_ref): Use the newly added argument for state
16475 instead of globals.
16476 (grub_script_lexer_deref): Likewise.
16477 (grub_script_lexer_record_start): Likewise.
16478 (grub_script_lexer_record_stop): Likewise.
16479 (recordchar): Likewise.
16480 (nextchar): Likewise.
16481 (grub_script_yylex2): Likewise.
16482 (grub_script_yylex): Likewise.
16483 (grub_script_yyerror): Likewise.
16484
16485 * normal/parser.y (func_mem): Removed variable.
16486 (menu_entry): Likewise.
16487 (err): Likewise.
16488 (%lex-param): New parser option.
16489 (%parse-param): Likewise.
16490 (script): Always return the AST.
16491 (argument): Pass the state around.
16492 (arguments): Likewise.
16493 (grubcmd): Likewise.
16494 (commands): Likewise.
16495 (function): Likewise.
16496 (menuentry): Likewise.
16497 (if_statement): Likewise.
16498 (if): Likewise.
16499
16500 * normal/script.c (grub_script_memused): Removed variable.
16501 (grub_script_parsed): Likewise.
16502 (grub_script_malloc): Added a state argument. Use that instead of
16503 global variables.
16504 (grub_script_mem_record): Likewise.
16505 (grub_script_mem_record_stop): Likewise.
16506 (grub_script_arg_add): Likewise.
16507 (grub_script_add_arglist): Likewise.
16508 (grub_script_create_cmdline): Likewise.
16509 (grub_script_create_cmdif): Likewise.
16510 (grub_script_create_cmdmenu): Likewise.
16511 (grub_script_add_cmd): Likewise.
16512 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 16513
e2a8c904 165142006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 16515
16516 * normal/command.c (grub_command_init): Remove the title command.
16517
16518 * normal/lexer.c (grub_script_yylex): Renamed from this...
16519 (grub_script_yylex2): ... to this.
16520 (grub_script_yylex): New function. Temporary
16521 introduced to filter some tokens.
16522 (grub_script_yyerror): Print a newline.
16523
16524 * normal/main.c (read_config_file): Output information about the
16525 lines that contain errors. Wait for a key after all lines have
16526 been processed. Don't return an empty menu.
16527
16528 * normal/parser.y (func_mem): Don't initialize.
16529 (menu_entry): Likewise.
16530 (err): New variable.
16531 (script): Don't return anything when an error was encountered.
16532 (ws, returns): Removed rules.
16533 (argument): Disabled concatenated variable support.
16534 (arguments): Remove explicit separators.
16535 (grubcmd): Likewise.
16536 (function): Likewise.
16537 (menuentry): Likewise.
16538 (if): Likewise.
16539 (commands): Likewise. Add error handling.
16540
16541 * normal/script.c (grub_script_create_cmdline): If
16542 `grub_script_parsed' is 0, assume the parser encountered an error.
16543
c9a86192 165442006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
16545
16546 * configure.ac: Add support for EFI. Fix the typo
16547 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
16548
70f3b243 165492006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
16550
16551 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
16552 foreign multibyte characters should be shown correctly.
16553
65f201ad 165542006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
16555
16556 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
16557 calculation.
16558 (read_config_file): Made it to close file before returning.
16559
b4b93674 165602006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
16561
16562 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
16563 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
16564 video/i386/pc/vbefill.c.
16565
16566 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
16567 video/i386/pc/vbefill.c.
16568
16569 * include/grub/video.h (grub_video_blit_format): New enum.
16570 (grub_video_mode_info): Added new member blit_format.
16571 (grub_video_get_blit_format): New function prototype.
16572
16573 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
16574 function prototype.
16575 (grub_video_vbe_map_rgb): Likewise.
16576 (grub_video_vbe_unmap_color): Likewise.
16577
16578 * include/grub/i386/pc/vbeblit.h: New file.
16579
16580 * include/grub/i386/pc/vbefill.h: New file.
16581
16582 * video/video.c (grub_video_get_blit_format): New function.
16583 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
16584 (grub_video_vbe_map_rgb): Likewise.
16585 (grub_video_vbe_unmap_color): Likewise.
16586
16587 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
16588 optimized fills.
16589 (grub_video_vbe_blit_render_target): Changed to use more optimized
16590 blits.
16591 (grub_video_vbe_setup): Added detection for optimized settings.
16592 (grub_video_vbe_create_render_target): Likewise.
16593
16594 * video/i386/pc/vbeblit.c: New file.
16595
16596 * video/i386/pc/vbefill.c: New file.
16597
c2379b9c 165982006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
16599
16600 * font/manager.c (grub_font_get_glyph): Removed font fixup from
16601 here...
16602
16603 * util/unifont2pff.rb: ... and moved it to here. Improved argument
16604 parsing to support both hex and dec ranges. If filename was missing
16605 show usage information.
16606
bd0d7896 166072006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
16608
16609 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
16610 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
16611
16612 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
16613 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
16614 (video_mod_SOURCES): Added.
16615 (video_mod_CFLAGS): Likewise.
16616 (video_mod_LDFLAGS): Likewise.
16617 (gfxterm_mod_SOURCES): Likewise.
16618 (gfxterm_mod_CFLAGS): Likewise.
16619 (gfxterm_mod_LDFLAGS): Likewise.
16620 (videotest_mod_SOURCES): Likewise.
16621 (videotest_mod_CFLAGS): Likewise.
16622 (videotest_mod_LDFLAGS): Likewise.
16623 (vesafb_mod_SOURCES): Removed.
16624 (vesafb_mod_CFLAGS): Likewise.
16625 (vesafb_mod_LDFLAGS): Likewise.
16626 (vga_mod_SOURCES): Likewise.
16627 (vga_mod_CFLAGS): Likewise.
16628 (vga_mod_LDFLAGS): Likewise.
16629
16630 * commands/videotest.c: New file.
16631
16632 * font/manager.c (fill_with_default_glyph): Modified to use
16633 grub_font_glyph.
16634 (grub_font_get_glyph): Likewise.
16635 (fontmanager): Renamed from this...
16636 (font_manager): ... to this.
16637
16638 * include/grub/font.h (grub_font_glyph): Added new structure.
16639 (grub_font_get_glyph): Modified to use grub_font_glyph.
16640
16641 * include/grub/misc.h (grub_abs): Added as inline function.
16642
16643 * include/grub/video.h: New file.
16644
16645 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
16646 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
16647 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
16648 (grub_vbe_get_controller_info): Renamed from this...
16649 (grub_vbe_bios_get_controller_info): ... to this.
16650 (grub_vbe_get_mode_info): Renamed from this...
16651 (grub_vbe_bios_get_mode_info): ... to this.
16652 (grub_vbe_set_mode): Renamed from this...
16653 (grub_vbe_bios_set_mode): ... to this.
16654 (grub_vbe_get_mode): Renamed from this...
16655 (grub_vbe_bios_get_mode): ... to this.
16656 (grub_vbe_set_memory_window): Renamed from this...
16657 (grub_vbe_bios_set_memory_window): ... to this.
16658 (grub_vbe_get_memory_window): Renamed from this...
16659 (grub_vbe_bios_get_memory_window): ... to this.
16660 (grub_vbe_set_scanline_length): Renamed from this...
16661 (grub_vbe_set_scanline_length): ... to this.
16662 (grub_vbe_get_scanline_length): Renamed from this...
16663 (grub_vbe_bios_get_scanline_length): ... to this.
16664 (grub_vbe_set_display_start): Renamed from this...
16665 (grub_vbe_bios_set_display_start): ... to this.
16666 (grub_vbe_get_display_start): Renamed from this...
16667 (grub_vbe_bios_get_display_start): ... to this.
16668 (grub_vbe_set_palette_data): Renamed from this...
16669 (grub_vbe_bios_set_palette_data): ... to this.
16670 (grub_vbe_set_pixel_rgb): Removed.
16671 (grub_vbe_set_pixel_index): Likewise.
16672
16673 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
16674 from this...
16675 (grub_vbe_bios_get_controller_info): ... to this.
16676 (grub_vbe_get_mode_info): Renamed from this...
16677 (grub_vbe_bios_get_mode_info): ... to this.
16678 (grub_vbe_set_mode): Renamed from this...
16679 (grub_vbe_bios_set_mode): ... to this.
16680 (grub_vbe_get_mode): Renamed from this...
16681 (grub_vbe_bios_get_mode): ... to this.
16682 (grub_vbe_set_memory_window): Renamed from this...
16683 (grub_vbe_bios_set_memory_window): ... to this.
16684 (grub_vbe_get_memory_window): Renamed from this...
16685 (grub_vbe_bios_get_memory_window): ... to this.
16686 (grub_vbe_set_scanline_length): Renamed from this...
16687 (grub_vbe_set_scanline_length): ... to this.
16688 (grub_vbe_get_scanline_length): Renamed from this...
16689 (grub_vbe_bios_get_scanline_length): ... to this.
16690 (grub_vbe_set_display_start): Renamed from this...
16691 (grub_vbe_bios_set_display_start): ... to this.
16692 (grub_vbe_get_display_start): Renamed from this...
16693 (grub_vbe_bios_get_display_start): ... to this.
16694 (grub_vbe_set_palette_data): Renamed from this...
16695 (grub_vbe_bios_set_palette_data): ... to this.
16696 (grub_vbe_bios_get_controller_info): Fixed problem with registers
16697 getting corrupted after calling it. Added more pushes and pops.
16698 (grub_vbe_bios_set_mode): Likewise.
16699 (grub_vbe_bios_get_mode): Likewise.
16700 (grub_vbe_bios_get_memory_window): Likewise.
16701 (grub_vbe_bios_set_scanline_length): Likewise.
16702 (grub_vbe_bios_get_scanline_length): Likewise.
16703 (grub_vbe_bios_get_display_start): Likewise.
16704 (grub_vbe_bios_set_palette_data): Likewise.
16705
16706 * normal/cmdline.c (cl_set_pos): Refresh the screen.
16707 (cl_insert): Likewise.
16708 (cl_delete): Likewise.
16709
16710 * term/gfxterm.c: New file.
16711
16712 * term/i386/pc/vesafb.c: Removed file.
16713
16714 * video/video.c: New file.
16715
16716 * video/i386/pc/vbe.c (real2pm): Added new function.
16717 (grub_video_vbe_draw_pixel): Likewise.
16718 (grub_video_vbe_get_video_ptr): Likewise.
16719 (grub_video_vbe_get_pixel): Likewise
16720 (grub_video_vbe_init): Likewise.
16721 (grub_video_vbe_fini): Likewise.
16722 (grub_video_vbe_setup): Likewise.
16723 (grub_video_vbe_get_info): Likewise.
16724 (grub_video_vbe_set_palette): Likewise.
16725 (grub_video_vbe_get_palette): Likewise.
16726 (grub_video_vbe_set_viewport): Likewise.
16727 (grub_video_vbe_get_viewport): Likewise.
16728 (grub_video_vbe_map_color): Likewise.
16729 (grub_video_vbe_map_rgb): Likewise.
16730 (grub_video_vbe_map_rgba): Likewise.
16731 (grub_video_vbe_unmap_color): Likewise.
16732 (grub_video_vbe_fill_rect): Likewise.
16733 (grub_video_vbe_blit_glyph): Likewise.
16734 (grub_video_vbe_blit_bitmap): Likewise.
16735 (grub_video_vbe_blit_render_target): Likewise.
16736 (grub_video_vbe_scroll): Likewise.
16737 (grub_video_vbe_swap_buffers): Likewise.
16738 (grub_video_vbe_create_render_target): Likewise.
16739 (grub_video_vbe_delete_render_target): Likewise.
16740 (grub_video_vbe_set_active_render_target): Likewise.
16741 (grub_vbe_set_pixel_rgb): Remove function.
16742 (grub_vbe_set_pixel_index): Likewise.
16743 (index_color_mode): Remove static variable.
16744 (active_mode): Likewise.
16745 (framebuffer): Likewise.
16746 (bytes_per_scan_line): Likewise.
16747 (grub_video_vbe_adapter): Added new static variable.
16748 (framebuffer): Likewise.
16749 (render_target): Likewise.
16750 (initial_mode): Likewise.
16751 (mode_in_use): Likewise.
16752 (mode_list): Likewise.
16753
5f97350b 167542006-03-10 Marco Gerards <marco@gnu.org>
16755
16756 * configure.ac (AC_INIT): Bumped to 1.93.
16757
16758 * DISTLIST: Added `include/grub/hfs.h'.
16759
a3c5c6f8 167602006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
16761
16762 * boot/i386/pc/boot.S (general_error): Before looping, try INT
16763 18H, which might help the BIOS falling back to next boot media.
16764
6de53d26 167652006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
16766
16767 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
16768 Poe Chen <poe.poechen@gmail.com>.
16769
77c4a393 167702006-01-17 Marco Gerards <marco@gnu.org>
16771
16772 * include/grub/normal.h: Include <grub/script.h>.
16773 (grub_command_list): Removed struct.
16774 (grub_command_list_t): Removed type.
16775 (grub_menu_entry): Remove members `num' and `command_list'. Add
16776 members `commands' and `sourcecode'.
16777 * include/grub/script.h: Add inclusion guards.
16778 (grub_script_cmd_menuentry): New struct.
16779 (grub_script_execute_menuentry): New prototype.
16780 (grub_script_lexer_record_start): Likewise.
16781 (grub_script_lexer_record_stop): Likewise.
16782 * normal/execute.c (grub_script_execute_menuentry): New function.
16783 * normal/lexer.c (record, recording, recordpos, recordlen): New
16784 variables.
16785 (grub_script_lexer_record_start): New function.
16786 (grub_script_lexer_record_stop): Likewise.
16787 (recordchar): Likewise.
16788 (nextchar): Likewise.
16789 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
16790 2048 as the buffer size. Add the tokens `menuentry' and `@'.
16791 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
16792 (current_menu): New variable.
16793 (free_menu): Mainly rewritten.
16794 (grub_normal_menu_addentry): New function.
16795 (read_config_file): Rewritten.
16796 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 16797 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 16798 the menu entry.
16799 (run): Mainly rewritten.
16800 * normal/parser.y (menu_entry): New variable.
16801 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
16802 (menuentry): New rule.
16803 (command): Add `menuentry'.
16804 (if_statement): Allow additional returns before `fi'.
16805 * normal/script.c (grub_script_create_cmdmenu): New function.
16806
144f1f98 168072006-01-03 Marco Gerards <marco@gnu.org>
16808
16809 * INSTALL: GNU Bison is required.
16810 * configure.ac: Rewritten the test to detect Bison.
16811 * Makefile.in (YACC): New variable. Reported by Xun Sun
16812 <xun.sun.cn@gmail.com>.
16813
af4b2d89 168142006-01-03 Marco Gerards <marco@gnu.org>
16815
16816 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
16817 the HFS+ filesystem to filesystem blocks.
16818 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
16819 GCC warning is silenced.
16820
15643b71 168212006-01-03 Marco Gerards <marco@gnu.org>
16822
16823 * partmap/apple.c (apple_partition_map_iterate): Convert the data
16824 read from disk from big endian to host byte order.
16825
00905879 168262006-01-03 Hollis Blanchard <hollis@penguinppc.org>
16827
16828 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
16829 documentation.
16830 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
16831 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
16832 embedded HFS+ filesystem.
16833 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
16834 (grub_hfs_sblock): Move from here...
16835 * include/grub/hfs.h: To here... New file.
16836 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
16837 documentation.
16838 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
16839 New macros.
16840 (grub_hfsplus_volheader): Change type of member `magic' to
16841 `grub_uint16_t'.
16842 (grub_hfsplus_data): Add new member `embedded_offset'.
16843 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
16844 returned block.
16845 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
16846 Calculate the offset.
16847
8899bc3e 168482005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16849
16850 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
16851 Removed.
16852 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
16853
ae8c0277 168542005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16855
16856 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
16857 ENV->NAME is NULL after allocating ENV->VALUE.
16858
07084456 168592005-12-25 Marco Gerards <marco@gnu.org>
16860
16861 * kern/env.c (grub_env_set): Rewritten the error handling code.
16862
4750f5f1 168632005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16864
16865 * geninit.sh: Made more robust, and more portable.
16866
50214199 168672005-12-25 Marco Gerards <marco@gnu.org>
16868
16869 Add support for Apple HFS+ filesystems.
f19dbdb7 16870
50214199 16871 * fs/hfsplus.c: New file.
16872
16873 * DISTLIST: Added `fs/hfsplus.c'.
16874
16875 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
16876 (hfsplus_mod_SOURCES): New variable.
16877 (hfsplus_mod_CFLAGS): Likewise.
16878 (hfsplus_mod_LDFLAGS): Likewise.
16879 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
16880 (grub_setup_SOURCES): Likewise.
16881 (grub_mkdevicemap_SOURCES): Likewise.
16882 (grub_emu_SOURCES): Likewise.
16883 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16884
16885 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
16886
16887 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
16888
befaed6c 168892005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
16890
16891 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
16892 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
16893 include/grub/parser.h, include/grub/script.h, kern/parser.c,
16894 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
16895 normal/lexer.c, normal/parser.y, normal/script.c, and
16896 partmap/gpt.c.
16897 Removed kern/sparc64/cache.c.
16898
16899 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
16900 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
16901 grub_emu_init.c.
16902
16903 * configure.ac (AC_INIT): Bumped to 1.92.
16904
6a124103 169052005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
16906
16907 * kern/err.c (grub_error_push): Added new function to support error
16908 stacks.
16909 (grub_error_pop): Likewise.
16910 (grub_error_stack_items): New local variable to support error stacks.
16911 (grub_error_stack_pos): Likewise.
16912 (grub_error_stack_assert): Likewise.
16913 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
16914 stack depth.
16915 (grub_print_error): Added support to print errors from error stack.
16916
16917 * include/grub/err.h (grub_error_push): Added function prototype.
16918 (grub_error_pop): Likewise.
16919
be973c1b 169202005-12-09 Hollis Blanchard <hollis@penguinppc.org>
16921
16922 * configure.ac: Accept `powerpc64' as host_cpu.
16923 (amd64): Rename to `biarch32'.
16924
16925 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
16926 non-cacheline-aligned addresses.
16927
16928 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
16929 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
16930 if `size' is non-zero.
16931
b04216ab 169322005-12-03 Marco Gerards <mgerards@xs4all.nl>
16933
16934 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
16935 and `cd' to make sure the filename is not prefixed with a
16936 directory name.
16937 (pkgdata_MODULES): Add `gpt.mod'.
16938 (gpt_mod_SOURCES): New variable.
16939 (gpt_mod_CFLAGS): Likewise.
16940 (gpt_mod_LDFLAGS): Likewise.
16941
16942 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
16943
16944 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
16945 New macro.
16946
16947 * partmap/gpt.c: New file.
16948
16949 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
16950 GPT partition map is detected.
16951
41730ed9 169522005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
16953
16954 * commands/i386/pc/play.c: New file.
16955 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
16956 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
16957 macros.
f19dbdb7 16958
95dc3643 169592005-11-27 Marco Gerards <mgerards@xs4all.nl>
16960
16961 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
16962 ((unused))' to silence gcc warning.
16963
1569ec51 169642005-11-26 Hollis Blanchard <hollis@penguinppc.org>
16965
16966 * configure.ac: Correct `AC_PROG_YACC' test.
16967
9abde152 169682005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16969
16970 * util/powerpc/ieee1275/grub-install.in: Run the mount point
16971 check before installing files.
16972
44b83271 169732005-11-22 Mike Small <smallm@panix.com>
16974
16975 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
16976 number regex so multidigit numbers are recognized correctly.
16977
169782005-11-22 Mike Small <smallm@panix.com>
16979
16980 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
16981 debugging message before attempting to claim memory.
16982 (grub_rescue_cmd_initrd): Add a claim debugging message and try
16983 multiple addresses in case of failure.
16984
9c12956b 169852005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16986
16987 * term/tparm.c (get_space): Remove empty `if' statement.
16988
16989 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
16990
16991 * kern/parser.c (check_varstate): Rename `state' to 's'.
16992
aeaf81d9 169932005-11-22 Hollis Blanchard <hollis@penguinppc.org>
16994
16995 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
16996 variable definitions to the beginning of each function. Sort stack
16997 variables by size.
16998 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
16999 `buf' argument to `char *'.
17000
79bbb63f 170012005-11-22 Hollis Blanchard <hollis@penguinppc.org>
17002
17003 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
17004 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 17005 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 17006 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
17007 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
17008 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
17009 configfile.mod, search.mod, gzio.mod and test.mod.
17010 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
17011 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
17012 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
17013 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
17014 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
17015 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
17016 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
17017 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
17018 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
17019 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
17020 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17021 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17022 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
17023 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
17024 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
17025 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
17026 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
17027 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
17028 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
17029 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
17030 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
17031 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
17032 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
17033
17034 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
17035 `grep --include'.
17036 (pkgdata_MODULES): Add test.mod.
17037
233b1628 170382005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17039
17040 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
17041 appending to variables with "+=".
17042 (PModule): Use full pathname to generate *.lst filenames.
17043
17044 * Makefile.in: Fixed list rules moved from genmk.rb.
17045 (.DELETE_ON_ERROR): New special target.
17046 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
17047
17048 * conf/i386-pc.rmk: Include conf/common.mk.
17049 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 17050 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 17051 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
17052 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
17053 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
17054 configfile.mod, search.mod, gzio.mod and test.mod.
17055 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
17056 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
17057 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
17058 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
17059 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
17060 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
17061 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
17062 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
17063 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
17064 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
17065 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17066 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17067 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
17068 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
17069 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
17070 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
17071 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
17072 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
17073 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
17074 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
17075 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
17076 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
17077 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
17078 here...
17079 * conf/common.rmk: ... to here. New file.
17080
17081 * conf/common.mk: New file.
17082
16f820c8 170832005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
17084
17085 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
17086 (grub_script.tab.c): ... here.
17087
17088 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
17089 (grub_script.tab.c): ... here.
17090
17091 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
17092 (grub_script.tab.c): ... here.
17093
17094 * normal/command.c (grub_command_find): Fixed a memory leak of
17095 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
17096
63ba1554 170972005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17098
17099 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
17100 "@" which marks the start of a comment on ARM.
17101 (VARIABLE): Likewise.
17102
7f67dc13 171032005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17104
79bbb63f 17105 Add support for Linux/ADFS partition tables.
7f67dc13 17106
17107 * partmap/acorn.c: New file.
17108
17109 * include/grub/acorn_filecore.h: Likewise.
17110
17111 * DISTLIST: Added `partmap/acorn.c' and
17112 `include/grub/acorn_filecore.h'.
f19dbdb7 17113
7f67dc13 17114 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17115 `partmap/acorn.c'.
17116 (pkgdata_MODULES): Add `acorn.mod'.
17117 (acorn_mod_SOURCES): New variable.
17118 (acorn_mod_CFLAGS): Likewise.
17119
17120 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
17121 `partmap/acorn.c'.
17122 (pkgdata_MODULES): Add `acorn.mod'.
17123 (acorn_mod_SOURCES): New variable.
17124 (acorn_mod_CFLAGS): Likewise.
17125
17126 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
17127 (pkgdata_MODULES): Add `acorn.mod'.
17128 (acorn_mod_SOURCES): New variable.
17129 (acorn_mod_CFLAGS): Likewise.
17130 (acorn_mod_LDFLAGS): Likewise.
17131
17132 * include/types.h (grub_disk_addr_t): New typedef.
17133
6d099807 171342005-11-13 Marco Gerards <mgerards@xs4all.nl>
17135
17136 * geninit.sh: New file.
17137
17138 * geninitheader.sh: Likewise.
17139
17140 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
17141 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
17142 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
17143 * commands/configfile.c (grub_configfile_init)
17144 (grub_configfile_fini): Likewise.
17145 * commands/default.c (grub_default_init, grub_default_fini):
17146 Likewise.
17147 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
17148 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
17149 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
17150 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
17151 Likewise.
17152 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
17153 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
17154 Likewise.
17155 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 17156 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 17157 Likewise.
17158 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
17159 Likewise.
fe6b695a 17160 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 17161 Likewise.
17162 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
17163 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
17164 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
17165 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
17166 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
17167 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
17168 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
17169 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
17170 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
17171 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
17172 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
17173 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
17174 * partmap/amiga.c (grub_amiga_partition_map_init)
17175 (grub_amiga_partition_map_fini): Likewise.
17176 * partmap/apple.c (grub_apple_partition_map_init)
17177 (grub_apple_partition_map_fini): Likewise.
17178 * partmap/pc.c (grub_pc_partition_map_init)
17179 (grub_pc_partition_map_fini): Likewise.
17180 * partmap/sun.c (grub_sun_partition_map_init,
17181 grub_sun_partition_map_fini): Likewise.
17182 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
17183 Likewise.
17184
17185 * util/grub-emu.c: Include <grub_modules_init.h>.
17186 (main): Don't initialize and de-initialize any modules directly,
17187 use `grub_init_all' and `grub_fini_all' instead.
17188
17189 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
17190 `grub_vesafb_mod_init'.
17191 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
17192 all users.
17193 * term/i386/pc/vga.c (grub_vga_init): Renamed to
17194 `grub_vga_mod_init'. Updated all users.
17195 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 17196
6d099807 17197 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
17198 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
17199 rules.
17200
17201 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
17202 Generate a function to initialize the module in utilities.
17203 Updated all callers.
17204 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
17205 initialize the module in utilities. Updated all callers.
17206
9046bcf0 172072005-11-09 Hollis Blanchard <hollis@penguinppc.org>
17208
17209 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
17210 escape sequence and a literal ^L to clear the screen.
17211
17212 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
17213 when returning from Open Firmware.
17214
d13ea639 172152005-11-09 Hollis Blanchard <hollis@penguinppc.org>
17216
17217 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
17218 (grub_ofconsole_height): Likewise.
17219 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
17220 manually insert a '\n'.
17221 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
17222 `grub_ofconsole_height'. Return early if these are already set.
17223
a8fcf206 172242005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
17225
17226 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
17227 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
17228 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
17229 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
17230 and `normal/script.c'.
17231 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17232 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17233 (test_mod_SOURCES): New variable.
17234 (test_mod_CFLAGS): Likewise.
17235 (test_mod_LDFLAGS): Likewise.
17236 (pkgdata_MODULES): Add `test.mod'.
17237 (grub_script.tab.c): New rule.
17238 (grub_script.tab.h): Likewise.
17239
b6b32745 172402005-11-07 Marco Gerards <mgerards@xs4all.nl>
17241
17242 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17243 `commands/test.c', `normal/execute.c', `normal/lexer.c',
17244 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17245 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17246 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17247 (test_mod_SOURCES): New variable.
17248 (test_mod_CFLAGS): Likewise.
17249 (pkgdata_MODULES): Add `test.mod'.
17250 (grub_script.tab.c): New rule.
17251 (grub_script.tab.h): Likewise.
17252
daac212a 172532005-11-06 Marco Gerards <mgerards@xs4all.nl>
17254
17255 Add initial scripting support.
17256
17257 * commands/test.c: New file.
17258 * include/grub/script.h: Likewise.
17259 * normal/execute.c: Likewise.
17260 * normal/function.c: Likewise.
17261 * normal/lexer.c: Likewise.
17262 * normal/parser.y: Likewise.
17263 * normal/script.c: Likewise.
17264
17265 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 17266
daac212a 17267 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
17268 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
17269 `normal/function.c' and `normal/script.c'.
17270 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17271 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 17272 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
17273 variables.
daac212a 17274 (pkgdata_MODULES): Add `test.mod'.
17275 (grub_script.tab.c): New rule.
17276 (grub_script.tab.h): Likewise.
17277
17278 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
17279
17280 * include/grub/normal.h (grub_test_init): New prototype.
17281 (grub_test_fini): Likewise.
f19dbdb7 17282
daac212a 17283 * normal/command.c: Include <grub/script.h>.
17284 (grub_command_execute): Rewritten.
f19dbdb7 17285
daac212a 17286 * util/grub-emu.c (main): Call `grub_test_init' and
17287 `grub_test_fini'.
17288
77500b2b 172892005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17290
17291 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
17292 to 0.
17293 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
17294 there are no pending characters.
17295
e45deb9e 172962005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17297
17298 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
17299 `grub_strndup' to drop device arguments. Replace unnecessary
17300 `grub_strndup' with `grub_strdup'.
17301
4ce32619 173022005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17303
17304 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
17305 `debug' environment variable has been set.
17306
173072005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 17308
4ce32619 17309 * Makefile.in (install-local): Use $(DATA).
17310 (uninstall): Likewise.
17311 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
17312 (sbin_UTILITIES): ... to here.
17313 (sbin_SCRIPTS): New variable.
17314 (grub_install_SOURCES): New variable.
17315 * util/powerpc/ieee1275/grub-install.in: New file.
17316 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
17317 variable.
17318 (add_segments): Call `grub_util_get_path'.
17319
25fe6f03 173202005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
17321
17322 From Timothy Baldwin:
17323 * commands/ls.c (grub_ls_list_files): Close FILE with
17324 grub_file_close.
17325 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
17326
04ccf3ec 173272005-10-24 Marco Gerards <mgerards@xs4all.nl>
17328
17329 * include/grub/parser.h: New file.
17330
17331 * kern/parser.c: Likewise.
17332
17333 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
17334 (grub_setup_SOURCES): Likewise.
17335 (grub_probefs_SOURCES): Likewise.
17336 (grub_emu_SOURCES): Likewise.
17337 (kernel_img_HEADERS): Add `parser.h'.
17338
17339 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
17340 (grub_emu_SOURCES): Add `kern/parser.c'.
17341 (grubof_SOURCES): Likewise.
17342
17343 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
17344 (grubof_SOURCES): Add `kern/parser.c'.
17345
17346 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
17347
17348 * kern/misc.c (grub_split_cmdline): Removed function.
17349
17350 * kern/rescue.c: Include <grub/parser.h>.
17351 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
17352 of `grub_split_cmdline'.
17353
17354 * normal/command.c: Include <grub/parser.h>.
17355 (grub_command_execute): Use `grub_parser_split_cmdline' instead
17356 of `grub_split_cmdline'.
17357
17358 * normal/completion.c: Include <grub/parser.h>.
17359 (cmdline_state): New variable.
17360 (iterate_dir): End the filename with a quote depending on the
17361 command line state.
17362 (get_state): new function.
17363 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
17364 split the arguments and determine the current argument. When the
17365 argument string is not quoted, escape all spaces.
17366
6d8f4b0e 173672005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17368
17369 * normal/sparc64/setjmp.S: New file.
17370
15cf03ed 173712005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17372
17373 * include/grub/sparc64/libgcc.h: New file.
17374 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
17375 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
17376 normal/sparc64/setjmp.c.
17377
03e8661a 173782005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17379
17380 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
17381 * kern/sparc64/cache.S: New file.
17382 * kern/sparc64/cache.c: Removed.
17383 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
17384 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
17385 -mtune=ultrasparc.
17386 (COMMON_LDFLAGS): Add -melf64_sparc.
17387 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
17388 (grubof_SOURCES): Use cache.S instead of cache.c.
17389 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
17390 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
17391 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
17392 commented though.
17393 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
17394 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
17395 (linux_mod_CFLAGS): Commented out.
17396 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
17397 out because module isn't built.
17398 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
17399 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
17400 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
17401 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
17402 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
17403 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17404 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17405 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
17406 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
17407 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
17408 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17409 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17410 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
17411 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
17412
34eeec8a 174132005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
17414
17415 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
17416 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
17417 longer, because HFS should not be used on PC.
17418
708367a3 174192005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17420
17421 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
17422 consistently within the loop.
17423
6fa1251a 174242005-10-15 Marco Gerards <mgerards@xs4all.nl>
17425
17426 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
17427 directory can not be read.
17428
4801580b 174292005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17430
17431 * configure.ac (AC_INIT): Increase the version number to 1.91.
17432
17433 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
17434 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
17435 term/i386/pc/serial.c.
17436
219ad426 174372005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17438
17439 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
17440 file size must be permitted.
17441
17442 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
17443 between %ah and %al.
17444
688e5699 174452005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17446
17447 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
17448 grub_uint64_t.
17449 Call the hook with a NUL-terminated filename.
17450 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
17451 grub_cpu_to_be32.
17452
17453 * kern/term.c (cursor_state): New variable.
17454 (grub_term_set_current): Reset the cursor state on a new
17455 terminal.
17456 (grub_setcursor): Rewritten to use CURSOR_STATE.
17457 (grub_getcursor): New function.
17458
17459 * include/grub/term.h (grub_getcursor): New prototype.
17460
17461 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
17462 integers on ARM. Reported by Timothy Baldwin
17463 <T.E.Baldwin99@members.leeds.ac.uk>.
17464
bb34586c 174652005-10-11 Marco Gerards <mgerards@xs4all.nl>
17466
17467 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
17468 allocated.
17469 (grub_sfs_dir): Likewise.
17470
9a909877 174712005-10-09 Marco Gerards <mgerards@xs4all.nl>
17472
17473 Add support for the SFS filesystem.
17474
17475 * fs/sfs.c: New file.
17476
17477 * DISTLIST: Added `fs/sfs.c'.
17478
17479 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
17480 (grub_probefs_SOURCES): Likewise.
17481 (grub_emu_SOURCES): Likewise.
17482 (pkgdata_MODULES): Add `sfs.mod'.
17483 (sfs_mod_SOURCES): New variable.
17484 (sfs_mod_CFLAGS): Likewise.
17485 (sfs_mod_LDFLAGS): Likewise.
17486
17487 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
17488 (pkgdata_MODULES): Add `sfs.mod'.
17489 (sfs_mod_SOURCES): New variable.
17490 (sfs_mod_CFLAGS): Likewise.
17491
17492 * util/grub-emu.c (main): Call `grub_sfs_init' and
17493 `grub_sfs_fini'.
17494
17495 * include/grub/fs.h (grub_sfs_init): New prototype.
17496 (grub_sfs_fini): Likewise.
17497
57bdbde3 174982005-10-07 Marco Gerards <mgerards@xs4all.nl>
17499
17500 Add support for the AFFS filesystem.
17501
17502 * fs/affs.c: New file.
17503
17504 * DISTLIST: Added `fs/affs.c'.
17505
17506 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
17507 (grub_probefs_SOURCES): Likewise.
17508 (grub_emu_SOURCES): Likewise.
17509 (pkgdata_MODULES): Add `affs.mod'.
17510 (affs_mod_SOURCES): New variable.
17511 (affs_mod_CFLAGS): Likewise.
17512 (affs_mod_LDFLAGS): Likewise.
17513
17514 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
17515 (pkgdata_MODULES): Add `affs.mod'.
17516 (affs_mod_SOURCES): New variable.
17517 (affs_mod_CFLAGS): Likewise.
17518
17519 * util/grub-emu.c (main): Call `grub_affs_init' and
17520 `grub_affs_fini'.
17521
17522 * include/grub/fs.h (grub_affs_init): New prototype.
17523 (grub_affs_fini): Likewise.
17524
047b67e0 175252005-10-01 Marco Gerards <mgerards@xs4all.nl>
17526
17527 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
17528
59b8208a 175292005-10-01 Marco Gerards <mgerards@xs4all.nl>
17530
17531 * configure.ac: Accept `x86_64' as host_cpu. In that case add
17532 `-m32' to CFLAGS.
17533
17534 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
17535 linking.
f19dbdb7 17536
59b8208a 17537 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
17538 (COMMON_LDFLAGS): New variable.
17539 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
17540 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
17541 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
17542 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
17543 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
17544 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
17545 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
17546 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
17547 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
17548 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
17549 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17550 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17551 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
17552 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
17553 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
17554 variables.
17555 (normal_mod_ASFLAGS): Add `-m32'.
17556
17557 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
17558 (grub_host_size_t, grub_host_ssize_t): New types.
17559 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 17560 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 17561 `GRUB_HOST_SIZEOF_VOID_P'.
17562
17563 * include/grub/kernel.h (struct grub_module_header): Type of
17564 member offset changed to `grub_host_off_t'. Type of member size
17565 changed to `grub_host_size_t'.
17566 (struct grub_module_info): Type of member offset changed to
17567 `grub_host_off_t'. Type of member size changed to
17568 `grub_host_size_t'.
17569
b4093103 175702005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
17571
17572 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 17573
b4093103 17574 * kern/i386/pc/startup.S (multiboot_header): New label.
17575 (multiboot_entry): Likewise.
17576 (multiboot_trampoline): Likewise.
17577
17578 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17579 Increased to 0x4A0.
17580
17581 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
17582 put parentheses after a question mark.
17583 [!GRUB_UTIL] (my_mod): New variable.
17584
17585 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
17586
b2499b29 175872005-09-28 Marco Gerards <mgerards@xs4all.nl>
17588
17589 Adds support for the XFS filesystem. Btrees are not supported
17590 yet.
17591
17592 * fs/xfs.c: New file.
17593
17594 * DISTLIST: Added `fs/xfs.c'.
17595
17596 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
17597 (grub_probefs_SOURCES): Likewise.
17598 (grub_emu_SOURCES): Likewise.
17599 (pkgdata_MODULES): Add `xfs.mod'.
17600 (xfs_mod_SOURCES): New variable.
17601 (xfs_mod_CFLAGS): Likewise.
17602
17603 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
17604 (pkgdata_MODULES): Add `xfs.mod'.
17605 (xfs_mod_SOURCES): New variable.
17606 (xfs_mod_CFLAGS): Likewise.
17607
17608 * util/grub-emu.c (main): Call `grub_xfs_init' and
17609 `grub_xfs_fini'.
17610
17611 * include/grub/fs.h (grub_xfs_init): New prototype.
17612 (grub_xfs_fini): Likewise.
17613
f19dbdb7 17614
83d37a62 176152005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
17616
17617 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
17618 color modes, allow greater than 16 colors to be configured as
17619 a default palette.
17620
47d2d65e 176212005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
17622
17623 * normal/completion.c (complete_arguments): Add the qualifier
17624 const into OPTIONS.
17625
17626 From Omniflux <omniflux+lists@omniflux.com>:
17627 * include/grub/terminfo.h: New file.
17628 * include/grub/tparm.h: Likewise.
17629 * include/grub/i386/pc/serial.h: Likewise.
17630 * term/terminfo.c: Likewise.
17631 * term/tparm.c: Likewise.
17632 * term/i386/pc/serial.c: Likewise.
17633 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
17634 serial.mod.
17635 (terminfo_mod_SOURCES): New variable.
17636 (terminfo_mod_CFLAGS): Likewise.
17637 (serial_mod_SOURCES): Likewise.
17638 (serial_mod_CFLAGS): Likewise.
17639
48b671ff 176402005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
17641
17642 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
17643 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
17644 and kern/powerpc/ieee1275/cmain.c, respectively.
17645
17646 * boot/powerpc/ieee1275/crt0.S: Moved to ...
17647 * kern/powerpc/ieee1275/crt0.S: ... here.
17648
17649 * boot/powerpc/ieee1275/cmain.c: Moved to ...
17650 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 17651
48b671ff 17652 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
17653 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
17654 instead of boot/powerpc/ieee1275/crt0.S and
17655 boot/powerpc/ieee1275/cmain.c, respectively.
17656
17657 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
17658 sectors. It was not used anyway.
17659
09fc77a7 176602005-08-30 Hollis Blanchard <hollis@penguinppc.org>
17661
17662 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
17663 `unused parameter' warning.
17664
003789c7 176652005-08-30 Hollis Blanchard <hollis@penguinppc.org>
17666
17667 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
17668 function.
17669 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
17670 getcharwidth.
17671
67f44c86 176722005-08-28 Marco Gerards <metgerards@student.han.nl>
17673
17674 * include/grub/normal.h (enum grub_completion_type): Added
17675 `GRUB_COMPLETION_TYPE_ARGUMENT'.
17676
17677 * normal/cmdline.c (print_completion): Handle
17678 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
17679 * normal/menu_entry.c (store_completion): Likewise.
17680
17681 * normal/completion.c (complete_arguments): New function.
17682 (grub_normal_do_completion): Call `complete_arguments' when the
17683 current words start with a dash.
17684
0b5abe02 176852005-08-27 Marco Gerards <metgerards@student.han.nl>
17686
17687 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
17688 `gzio.mod' instead of `io.mod').
17689
d9864ee1 176902005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
17691
17692 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
17693 (DISTDIRS): Added io and video.
17694 Rewrite the search routine to make an output consistently.
17695
17696 * DISTLIST: Added conf/sparc64-ieee1275.mk,
17697 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
17698 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
17699 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
17700 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
17701 util/powerpc/ieee1275/misc.c.
f19dbdb7 17702
d9864ee1 17703 * include/grub/gzio.h: New file.
17704 * io/gzio.c: Likewise.
f19dbdb7 17705
d9864ee1 17706 * kern/file.c (grub_file_close): Call grub_device_close only if
17707 FILE->DEVICE is not NULL.
17708
17709 * include/grub/mm.h [!NULL] (NULL): New macro.
17710
17711 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
17712
17713 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
17714 (pkgdata_MODULES): Added gzio.mod.
17715 (gzio_mod_SOURCES): New variable.
17716 (gzio_mod_CFLAGS): Likewise.
17717
17718 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
17719 (pkgdata_MODULES): Added gzio.mod.
17720 (gzio_mod_SOURCES): New variable.
17721 (gzio_mod_CFLAGS): Likewise.
17722
17723 * commands/cat.c: Include grub/gzio.h.
17724 (grub_cmd_cat): Use grub_gzfile_open instead of
17725 grub_file_open.
f19dbdb7 17726
d9864ee1 17727 * commands/cmp.c: Include grub/gzio.h.
17728 (grub_cmd_cmp): Use grub_gzfile_open instead of
17729 grub_file_open.
17730
17731 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
17732 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
17733 grub_file_open.
17734 (grub_rescue_cmd_module): Likewise.
17735
fa46f4b5 177362005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
17737
17738 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
17739 kern/sparc64/ieee1275/init.c because it contains _start.
17740 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
17741
e9211b5d 177422005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
17743
17744 * configure.ac: Add support for sparc64 host with ieee1275
17745 firmware.
17746 * configure: Generated from configure.ac.
17747 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
17748 instead of int.
17749 (grub_ofdisk_read): Likewise.
17750 (grub_ofdisk_open): Use %p to print pointer values, and cast the
17751 pointers as (void *) to remove a warning.
17752 (grub_ofdisk_close): Likewise.
17753 (grub_ofdisk_read): Likewise.
17754 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
17755 returns, so make it return void to remove a warning.
17756 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
17757 Corresponding prototype change.
17758 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
17759 values, and cast the pointers as (void *) to remove a warning.
17760 (grub_mm_dump): Likewise.
17761 * conf/sparc64-ieee1275.mk: New file.
17762 * conf/sparc64-ieee1275.rmk: Likewise.
17763 * include/grub/sparc64/setjmp.h: Likewise.
17764 * include/grub/sparc64/types.h: Likewise.
17765 * include/grub/sparc64/ieee1275/console.h: Likewise.
17766 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
17767 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
17768 * include/grub/sparc64/ieee1275/time.h: Likewise.
17769 * kern/sparc64/cache.c: Likewise.
17770 * kern/sparc64/dl.c: Likewise.
17771 * kern/sparc64/ieee1275/init.c: Likewise.
17772 * kern/sparc64/ieee1275/openfw.c: Likewise.
17773
385c6a92 177742005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17775
17776 * util/console.c (grub_ncurses_putchar): If C is greater than
17777 0x7f, set C to a question mark.
17778 (grub_ncurses_getcharwidth): New function.
17779 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
17780 getcharwidth.
17781
17782 * normal/menu.c (print_entry): Made aware of Unicode. First,
17783 convert TITLE to UCS-4, and predict the cursor position by
17784 grub_getcharwidth.
17785
17786 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
17787 const to SRC.
17788 * kern/misc.c (grub_utf16_to_utf8): Likewise.
17789
16ccb8b1 177902005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17791
17792 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
17793 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17794 grub_strcat.
17795
17796 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
17797 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17798 grub_strcpy and grub_strlen. Take it into account that a space
17799 character is inserted as a delimiter.
17800
6a85ce79 178012005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17802
17803 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 17804 invalid magic in the error.
6a85ce79 17805
17806 * commands/search.c: New file.
f19dbdb7 17807
6a85ce79 17808 * util/grub-emu.c (main): Call grub_search_init and
17809 grub_search_fini.
17810
17811 * kern/rescue.c (grub_rescue_print_disks): Removed.
17812 (grub_rescue_print_devices): New function.
17813 (grub_rescue_cmd_ls): Use grub_device_iterate with
17814 grub_rescue_print_devices instead of grub_disk_dev_iterate with
17815 grub_rescue_print_disks.
17816
17817 * kern/partition.c (grub_partition_iterate): Return the result of
17818 PARTMAP->ITERATE instead of GRUB_ERRNO.
17819
17820 * kern/device.c: Include grub/partition.h.
17821 (grub_device_iterate): New function.
17822
17823 * include/grub/partition.h (grub_partition_iterate): Return int
17824 instead of grub_err_t.
17825
17826 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
17827 prototype.
17828 [GRUB_UTIL] (grub_search_fini): Likewise.
17829
17830 * include/grub/device.h (grub_device_iterate): New prototype.
17831
17832 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17833 commands/search.c.
17834 (pkgdata_MODULES): Added search.mod.
17835 (search_mod_SOURCES): New variable.
17836 (search_mod_CFLAGS): Likewise.
17837
17838 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
17839 (pkgdata_MODULES): Added search.mod.
17840 (search_mod_SOURCES): New variable.
17841 (search_mod_CFLAGS): Likewise.
17842
17843 * commands/ls.c (grub_ls_list_disks): Renamed to ...
17844 (grub_ls_list_devices): ... this, and use grub_device_iterate.
17845 All callers changed.
17846
17847 * DISTLIST: Added commands/search.c.
17848
ef095434 178492005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
17850
17851 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
17852 conversion.
17853 (grub_getcharwidth): New function.
17854
17855 * kern/misc.c (grub_utf8_to_ucs4): New function.
17856
17857 * include/grub/term.h (struct grub_term): Added a new member
17858 "getcharwidth".
17859 (grub_getcharwidth): New prototype.
17860
17861 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
17862
17863 * term/i386/pc/console.c (map_char): New function. Segregated from
17864 grub_console_putchar.
17865 (grub_console_putchar): Use map_char.
17866 (grub_console_getcharwidth): New function.
17867 (grub_console_term): Specified grub_console_getcharwidth as
17868 getcharwidth.
17869
17870 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
17871 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
17872
17873 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
17874 GRUB_ERRNO.
17875 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
17876 on grub_strtoul completely.
17877 (write_char): Declare local variables in the beginning of the
17878 function.
17879 (grub_vesafb_getcharwidth): New function.
17880 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
17881 getcharwidth.
17882
1f0a95e4 178832005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
17884
17885 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
17886 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
17887 commands/i386/pc/vbetest.c.
17888
17889 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
17890 call grub_vbe_get_controller_info again, because the returned
17891 information is volatile.
17892 (grub_vbe_set_video_mode): Mostly rewritten.
17893 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
17894 grub_vbe_status_t correctly.
17895 (grub_vbe_get_video_mode_info): Likewise.
17896 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
17897 several if statements.
17898
17899 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
17900 * commands/i386/pc/vbeinfo.c: ... this.
17901
17902 * commands/i386/pc/vbe_test.c: Renamed to ...
17903 * commands/i386/pc/vbetest.c: ... this.
17904
17905 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
17906 ...
17907 (grub_cmd_vbeinfo): ... this. Save video modes before
17908 iterating. Skip a video mode, if it is not available, not enough
17909 information is given or it is monochrome. Show the memory
17910 model. Leave the interpretation of MODEVAR to grub_strtoul
17911 completely.
17912 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
17913 (GRUB_MOD_FINI): Likewise.
17914
17915 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
17916 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
17917 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
17918 duplicated grub_env_get. Leave the interpretation of MODEVAR to
17919 grub_strtoul completely.
17920 (real2pm): Removed.
17921 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
17922 (GRUB_MOD_FINI): Likewise.
17923
17924 * normal/misc.c: Include grub/mm.h.
17925
17926 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
17927 vbe_list_modes with vbetest.mod and vbeinfo.mod.
17928 (vbe_list_modes_mod_SOURCES): Removed.
17929 (vbe_list_modes_mod_CFLAGS): Likewise.
17930 (vbe_test_mod_SOURCES): Likewise.
17931 (vbe_test_mod_CFLAGS): Likewise.
17932 (vbeinfo_mod_SOURCES): New variable.
17933 (vbeinfo_mod_CFLAGS): Likewise.
17934 (vbetest_mod_SOURCES): Likewise.
17935 (vbetest_mod_CFLAGS): Likewise.
17936
992ffbbe 179372005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
17938
17939 * normal/misc.c: New file.
17940
17941 * DISTLIST: Added normal/misc.c.
f19dbdb7 17942
992ffbbe 17943 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
17944 DISK to HOOK. Call HOOK with DISK.
17945 * partmap/apple.c (apple_partition_map_iterate): Likewise.
17946 * partmap/pc.c (pc_partition_map_iterate): Likewise.
17947 * partmap/sun.c (sun_partition_map_iterate): Likewise.
17948
17949 * normal/menu_entry.c (struct screen): Added a new member
17950 "completion_shown".
17951 (completion_buffer): New global variable.
17952 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
17953 (store_completion): New function.
17954 (complete): Likewise.
17955 (clear_completions): Likewise.
17956 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
17957 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
17958 a tab, call complete.
17959
17960 * normal/completion.c (disk_dev): Removed.
17961 (print_simple_completion): Likewise.
17962 (print_partition_completion): Likewise.
17963 (print_func): New global variable.
17964 (add_completion): Do not take the arguments WHAT or PRINT any
17965 longer. Added a new argument TYPE. Instead of printing directly,
17966 call PRINT_FUNC if not NULL.
17967 All callers changed.
17968 (complete_device): Use a local variable DEV instead of
17969 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
17970 (grub_normal_do_completion): Take a new argument HOOK. Do not
17971 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
17972 empty string, return NULL instead.
17973 All callers changed.
17974
17975 * normal/cmdline.c (print_completion): New function.
17976
17977 * kern/partition.c (grub_partition_iterate): Add an argument DISK
17978 to HOOK.
17979 All callers changed.
17980
17981 * kern/disk.c (grub_print_partinfo): Removed.
17982
17983 * include/grub/partition.h (struct grub_partition_map): Add a new
17984 argument DISK into HOOK of ITERATE.
17985 (grub_partition_iterate): Add a new argument DISK to HOOK.
17986
17987 * include/grub/normal.h (enum grub_completion_type): New enum.
17988 (grub_completion_type_t): New type.
17989 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
17990 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
17991 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
17992 (GRUB_COMPLETION_TYPE_FILE): Likewise.
17993 (grub_normal_do_completion): Added a new argument HOOK.
17994 (grub_normal_print_device_info): New prototype.
17995
17996 * include/grub/disk.h (grub_print_partinfo): Removed.
17997
17998 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
17999 (normal_mod_SOURCES): Likewise.
18000 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
18001 (normal_mod_SOURCES): Likewise.
18002
18003 * commands/ls.c (grub_ls_list_disks): Use
18004 grub_normal_print_device_info instead of grub_print_partinfo. Free
18005 PNAME.
18006 (grub_ls_list_files): Use grub_normal_print_device_info instead of
18007 duplicating the code.
18008
0bd41162 180092005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
18010
18011 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 18012 follow GCS more precisely.
18013 * commands/i386/pc/vbe_test.c: Likewise.
18014 * include/grub/i386/pc/vbe.h: Likewise.
18015 * term/i386/pc/vesafb.c: Likewise.
18016 * video/i386/pc/vbe.c: Likewise.
0bd41162 18017
6323696a 180182005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
18019
18020 * DISTLIST: Added term/i386/pc/vesafb.c
18021 DISTLIST: Added video/i386/pc/vbe.c
18022 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
18023 DISTLIST: Added commands/i386/pc/vbe_test.c.
18024 * commands/i386/pc/vbe_list_modes.c: New file.
18025 * commands/i386/pc/vbe_test.c: Likewise.
18026 * term/i386/pc/vesafb.c: Likewise.
18027 * video/i386/pc/vbe.c: Likewise.
18028 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
18029 (grub_vbe_probe) Added prototype.
18030 (grub_vbe_set_video_mode) Likewise.
18031 (grub_vbe_get_video_mode) Likewise.
18032 (grub_vbe_get_video_mode_info) Likewise.
18033 (grub_vbe_set_pixel_rgb) Likewise.
18034 (grub_vbe_set_pixel_index) Likewise.
18035 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
18036 (pkgdata_MODULES): Added vesafb.mod.
18037 (pkgdata_MODULES): Added vbe_list_modes.mod.
18038 (pkgdata_MODULES): Added vbe_test.mod.
18039 (vbe_mod_SOURCES): Added.
18040 (vbe_mod_CFLAGS): Likewise.
18041 (vesafb_mod_SOURCES): Likewise.
18042 (vesafb_mod_CFLAGS): Likewise.
18043 (vbe_list_modes_mod_SOURCES): Likewise.
18044 (vbe_list_modes_mod_CFLAGS): Likewise.
18045 (vbe_test_mod_SOURCES): Likewise.
18046 (vbe_test_mod_CFLAGS): Likewise.
18047
0a74e62f 180482005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
18049
0a74e62f 18050 * normal/command.c (grub_command_execute): If INTERACTIVE is
18051 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
18052 CMDLINE. Disable the pager if INTERACTIVE is true.
18053 All callers are changed.
18054
18055 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
18056 before reading a config file.
18057 * normal/main.c (read_config_file): Even if a command is not
18058 found, register it if it is within an entry.
18059
18060 * util/grub-emu.c: Include sys/types.h and unistd.h.
18061 (options): Added --hold.
18062 (struct arguments): Added a new member "hold".
18063 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
18064 missing.
18065 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
18066 cleared by a debugger, if it is not zero.
18067
18068 * include/grub/normal.h (grub_command_execute): Add an argument
18069 INTERACTIVE.
18070
e51f85ae 180712005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
18072
18073 * DISTLIST: Added include/grub/i386/pc/vbe.h.
18074
e9c6f39b 180752005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
18076
18077 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
18078 program with another one, because the old one didn't detect a bug
18079 in gcc-3.4. Always use regparm 2, because the new test is still
18080 not enough for gcc-4.0. Someone must investigate a simple test
18081 case which detects a bug in gcc-4.0.
18082
8de3495c 180832005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
18084
18085 * DISTLIST: Added normal/completion.c.
18086
18087 * normal/completion.c: New file.
f19dbdb7 18088
8de3495c 18089 * term/i386/pc/console.c (grub_console_getwh): New function.
18090 (grub_console_term): Assign grub_console_getwh to getwh.
18091
18092 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
18093 function is defined in normal/completion.c as
18094 grub_normal_do_completion.
18095 (grub_cmdline_get): Use grub_normal_do_completion instead of
18096 grub_tab_complete.
18097
18098 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
18099 returns non-zero, otherwise return 0.
18100 (grub_partition_iterate): First, probe the partition map. Then,
18101 call ITERATE only for this partition map.
18102
18103 * kern/misc.c (grub_strncmp): Rewritten.
18104
18105 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
18106 returns non-zero. Otherwise return 0.
18107
18108 * include/grub/partition.h (grub_partition_map_iterate): Return
18109 int instead of void.
18110
18111 * include/grub/normal.h (grub_normal_do_completion): New prototype.
18112
18113 * include/grub/misc.h (grub_strncmp): Change the type of N to
18114 grub_size_t.
18115
18116 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
18117 of void.
18118
18119 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 18120 unsigned explicitly before comparing it with I.
8de3495c 18121
18122 * kern/main.c (grub_env_write_root): Add the attribute unused into
18123 VAR.
18124
18125 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18126 normal/completion.c.
18127 (normal_mod_SOURCES): Likewise.
18128 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
18129 (normal_mod_SOURCES): Likewise.
18130
18131 * normal/command.c (grub_iterate_commands): If ITERATE returns
18132 non-zero, return one immediately.
18133
e85e144b 181342005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
18135
18136 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
18137 * kern/i386/pc/startup.S: Updated Global Descriptor table's
18138 descriptions.
18139 (grub_vbe_get_controller_info): New function.
18140 (grub_vbe_get_mode_info): Likewise.
18141 (grub_vbe_set_mode): Likewise.
18142 (grub_vbe_get_mode): Likewise.
18143 (grub_vbe_set_memory_window): Likewise.
18144 (grub_vbe_get_memory_window): Likewise.
18145 (grub_vbe_set_scanline_length): Likewise.
18146 (grub_vbe_get_scanline_length): Likewise.
18147 (grub_vbe_set_display_start): Likewise.
18148 (grub_vbe_get_display_start): Likewise.
18149 (grub_vbe_set_palette_data): Likewise.
18150 * include/grub/i386/pc/vbe.h: New file.
18151
c46153d2 181522005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18153
18154 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
18155 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
18156 * DISTLIST: Likewise.
18157 * kern/ieee1275/of.c: Moved to ...
18158 * kern/ieee1275/ieee1275.c: ... here.
18159
0cb90c45 181602005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18161
18162 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
18163 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
18164 Pass 0 as `end' parameter to grub_strtoul().
18165
a19fb360 181662005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18167
18168 * include/grub/powerpc/ieee1275/console.h: Do not include
18169 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
18170 ifdef.
18171 (grub_console_cur_color): Remove i386-specific prototype.
18172 (grub_console_real_putchar): Likewise.
18173 (grub_console_checkkey): Likewise.
18174 (grub_console_getkey): Likewise.
18175 (grub_console_getxy): Likewise.
18176 (grub_console_gotoxy): Likewise.
18177 (grub_console_cls): Likewise.
18178 (grub_console_setcursor): Likewise.
18179 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
18180 Include <grub/machine/console.h>.
18181 * term/ieee1275/ofconsole.c: Likewise.
18182
4ac9bd04 181832005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
18184
18185 * Makefile.in (LIBLZO): New variable.
18186
18187 * configure.ac: Check for LZO version 2.
18188
18189 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
18190 lzo/lzo1x.h instead of lzo1x.h.
18191
18192 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
18193 of -llzo.
18194
18195 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
18196 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
18197
18198 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
18199 copying the data from PARTITION to P.
18200
f4917dfd 182012005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18202
18203 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
18204 negative, unload the module.
18205
18206 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
18207 map is "pc_partition_map" but not "pc".
18208 (usage): Fix the description. The options are --boot-image and
18209 --core-image but not --boot-file or --core-file.
18210 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
18211 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
18212 DEFAULT_DIRECTORY.
18213
18214 * util/i386/pc/grub-install.in: Do not specify --boot-file or
18215 --core-file. Specify INSTALL_DEVICE as an argument.
18216
18217 * util/console.c: Include config.h.
18218 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
18219 [HAVE_NCURSES_H]: Include ncurses.h.
18220 [HAVE_CURSES_H]: Include curses.h.
18221 [!A_NORMAL] (A_NORMAL): Defined as zero.
18222 [!A_STANDOUT] (A_STANDOUT): Likewise.
18223
18224 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
18225 -lncurses.
18226 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
18227
18228 * configure.ac: Check for curses libraries and headers.
18229
18230 * Makefile.in (LIBCURSES): New variable.
18231
18232 * genmk.rb (Script::rule): Set the executable bits.
18233
18234 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
18235 name of the PC partition map is "pc_partition_map" but not "pc".
18236
0e143073 182372005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18238
18239 * util/i386/pc/grub-install.in (grub_probefs): New variable.
18240 (modules): Likewise.
18241 (usage): Added descriptions for --modules and --grub-probefs.
18242 Handle --modules and --grub-probefs. Save the arguments in MODULES
18243 and GRUB_PROBEFS, respectively.
18244 Auto-detect a filesystem module against GRUBDIR. If the result is
18245 empty and modules are not specified explicitly, abort the
18246 installation. Add the result to MODULES.
18247
18248 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
18249 disk/powerpc/ieee1275/ofdisk.c,
18250 include/grub/powerpc/ieee1275/init.h and
18251 term/powerpc/ieee1275/ofconsole.c.
18252 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
18253 term/ieee1275/ofconsole.c.
18254
18255 * include/grub/powerpc/ieee1275/console.h: Resurrected.
18256
18257 * COPYING: Upgraded to the latest version. Only the address of the
18258 FSF office has changed.
f19dbdb7 18259
efd6e6d5 182602005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18261
18262 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
18263 kern/ieee1275.c with kern/ieee1275/of.c.
18264
18265 * kern/ieee1275.c: Moved to ...
18266 * kern/ieee1275/of.c: ... here.
18267
8ceafda2 182682005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
18269
18270 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 18271 readability.
8ceafda2 18272
18273 * config.guess: Updated to the latest version from gnulib.
18274 * config.sub: Likewise.
18275 * install.sh: Likewise.
18276 * mkinstalldirs: Likewise.
18277
18278 * include/grub/console.h: Removed. This file is arch-specific. Do
18279 not put this in include/grub.
18280
18281 * include/grub/i386/pc/console.h: Resurrected.
18282
18283 * util/console.c: Include grub/machine/console.h instead of
18284 grub/console.h.
18285 * util/grub-emu.c: Likewise.
18286
267f6cd9 182872005-08-04 Marco Gerards <metgerards@student.han.nl>
18288
18289 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
18290 hardcoded value.
f19dbdb7 18291
267f6cd9 18292 From Vincent Pelletier <subdino2004@yahoo.fr>
18293 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
18294 Redefined to use grub_getwh.
18295 (grub_term): New member named getwh.
18296 (grub_getwh): New prototype.
18297 * kern/term.c (grub_getwh): New function.
18298 * term/i386/pc/console.c (grub_console_getwh): New function.
18299 (grub_console_term): New member `getwh'.
18300 * term/i386/pc/vga.c (grub_vga_getwh): New function.
18301 (grub_vga_term): New member `getwh'.
0b5abe02 18302 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 18303 grub_ssize_t.
18304 (grub_ofconsole_getw): New function.
18305 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
18306 (grub_ofconsole_term): New field named getwh and new initial
18307 value.
18308
3be7266d 183092005-08-03 Hollis Blanchard <hollis@penguinppc.org>
18310
18311 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
18312 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
18313 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
18314 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
18315 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
18316 of <grub/machine/ieee1275.h>.
18317 * commands/ieee1275/reboot.c: Likewise.
18318 * boot/powerpc/ieee1275/ieee1275.c: Move ...
18319 * kern/ieee1275.c: ... to here. All users updated. Change all
18320 parameter structs to use new type `grub_ieee1275_cell_t'.
18321 * term/powerpc/ieee1275/ofconsole.c: Move ...
18322 * term/ieee1275/ofconsole.c: ... to here. All users updated.
18323 * disk/powerpc/ieee1275/ofdisk.c: Move ...
18324 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
18325 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
18326 to return int.
18327 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
18328 Remove unused prototypes. All users updated.
18329 * include/grub/powerpc/ieee1275/console.h: Removed.
18330 * include/grub/powerpc/ieee1275/ieee1275.h: Define
18331 `grub_ieee1275_cell_t'.
18332 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
18333 Cast comparisons with -1 to the correct type.
18334 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
18335 type to match `grub_ieee1275_entry_fn'.
18336
8b5f3938 183372005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
18338
18339 * DISTLIST: Added util/i386/pc/grub-probefs.c.
18340
18341 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
18342 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
18343 partmap/sun.c.
18344 (grub_probefs_SOURCES): New variable.
18345
18346 * util/i386/pc/grub-probefs.c: New file.
18347
18348 * util/i386/pc/grub-setup.c (main): Call
18349 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
18350 grub_hfs_init and grub_jfs_init to initialize the system. Call
18351 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
18352 grub_pc_partition_map_fini to finish the system.
18353
ea409713 183542005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
18355
18356 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
18357 function.
18358 (grub_multiboot_load_elf32): Likewise.
18359 (grub_multiboot_is_elf64): Likewise.
18360 (grub_multiboot_load_elf64): Likewise.
18361 (grub_multiboot_load_elf): Likewise.
18362 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
18363 an ELF32 or ELF64 file.
18364 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
18365
18366 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
18367 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
18368 NULL before calling FS->LABEL.
18369 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
18370 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
18371 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
18372 before calling FS->LABEL.
18373
141a288b 183742005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
18375
18376 * util/i386/pc/grub-install.in (datadir): New variable.
18377 (libdir): Removed.
18378 (pkgdatadir): New variable.
18379 (pkglibdir): Removed.
18380
0d5f8a54 183812005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
18382
18383 * DISTLIST: Added util/i386/pc/grub-install.in.
18384
18385 * util/i386/pc/grub-install.in: New file.
18386
18387 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
18388 (grub_install_SOURCES): Likewise.
18389
18390 * genmk.rb: Added support for scripts.
18391 (Script): New class.
18392 (scripts): New variable.
18393
18394 * Makefile.in (install-local): Install sbin_SCRIPTS by
18395 INSTALL_SCRIPT.
18396 (uninstall): Remove sbin_SCRIPTS.
18397
18398 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
18399 device, try to get a GRUB device by
18400 grub_util_biosdisk_get_grub_dev.
18401 Free DEST_DEV.
18402
18403 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
18404 description for --device-map.
18405
5f968e1e 184062005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18407
18408 Change the semantics of variable hooks. They now return strings
18409 instead of error values.
f19dbdb7 18410
5f968e1e 18411 * util/i386/pc/grub-setup.c: Include grub/env.h.
18412 (setup): Use grub_device_set_root instead of grub_env_set.
18413
18414 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
18415 grub_env_get instead of grub_device_set_root and
18416 grub_device_get_root, respectively.
18417
18418 * kern/main.c (grub_env_write_root): New function.
18419 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
18420 grub_env_set instead of grub_device_set_root.
18421
18422 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
18423 many variables.
18424 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
18425 rather than calling ENV->WRITE_HOOK afterwards.
18426 (grub_env_get): Return the result of ENV->READ_HOOK rather than
18427 passing a pointer of a pointer.
18428 (grub_register_variable_hook): Change the types of "read_hook" and
18429 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
18430 respectively.
18431 Allocate the default empty string on the heap, because this string
18432 may be freed later.
18433
18434 * kern/device.c: Include grub/env.h.
18435 (grub_device_set_root): Removed.
18436 (grub_device_get_root): Likewise.
18437 (grub_device_open): Use grub_env_get instead of
18438 grub_device_get_root.
18439
18440 * include/grub/env.h (grub_env_read_hook_t): New type.
18441 (grub_env_write_hook_t): Likewise.
18442 (grub_env_var): Change the types of "read_hook" and "write_hook"
18443 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
18444 (grub_register_variable_hook): Likewise.
18445
18446 * include/grub/device.h (grub_device_set_root): Removed.
18447 (grub_device_set_root): Likewise.
18448
18449 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
18450 make sure that DIRNAME terminates with '/', so that
18451 grub_fat_find_dir will fail if PATH is not a directory.
18452
18453 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
18454 from DIRNAME.
18455 Use the qualifier auto for print_files and print_files_long.
18456 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
18457 as a regular file.
18458 Put a newline only if there is no error.
18459 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
18460 used.
18461
896f0afd 184622005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18463
18464 * kern/partition.c (grub_partition_probe): Initialize PART to
18465 NULL. Otherwise, when no partition map is registered, this returns
18466 a garbage.
18467
b28b81b2 184682005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
18469
18470 * partmap/apple.c (apple_partition_map_iterate): Check if POS
18471 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
18472 valid.
18473
5f3607e0 184742005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
18475
18476 * commands/ls.c (grub_ls_list_disks): Print the filesystem
18477 information on each device, if it does not have partitions. Print
18478 "Device" instead of "Disk", because this function is not specific
18479 to disk devices.
18480
18481 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
18482 static to ensure that it is put on the memory rather than a
18483 register.
18484
502c87e8 184852005-07-17 Yoshinori Okuji <okuji@enbug.org>
18486
18487 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
18488 (grub_cat_init): Likewise.
18489 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
18490 (options): Likewise.
18491 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
18492 (grub_configfile_init): Likewise.
18493 * font/manager.c (GRUB_MOD_INIT): Likewise.
18494 * commands/help.c (GRUB_MOD_INIT): Likewise.
18495 (grub_help_init): Likewise.
18496 * normal/command.c (grub_command_init): Likewise.
18497 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
18498 * disk/loopback.c (grub_loop_init): Likewise.
18499 (GRUB_MOD_INIT): Likewise.
18500 * commands/ls.c (grub_ls_init): Likewise.
18501 (GRUB_MOD_INIT): Likewise.
18502 (options): Likewise.
18503 * commands/boot.c (grub_boot_init): Likewise.
18504 (GRUB_MOD_INIT): Likewise.
18505 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
18506 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
18507 (GRUB_MOD_INIT): Likewise.
18508 * commands/cmp.c (grub_cmp_init): Likewise.
18509 (GRUB_MOD_INIT): Likewise.
18510
18511 * normal/arg.c: Use <> instead of "" to include header files.
18512 (SHORT_ARG_HELP): New macro.
18513 (SHORT_ARG_USAGE): Likewise.
18514 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
18515 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
18516 descriptions.
18517 (find_short): Check if C is 'h' or 'u' explicitly.
18518 (grub_arg_show_help): Use space characters instead of tabs. Treat
18519 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
18520 are shown with --help and --usage only if they are not used for
18521 the command itself.
18522 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
18523 'h' and 'u'.
18524
18525 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
18526 const into "longarg". Change the type of "shortarg" to int.
18527
f806d18e 185282005-07-17 Yoshinori Okuji <okuji@enbug.org>
18529
18530 * boot/i386/pc/boot.S (boot_drive_check): New label.
18531
18532 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
18533 macro.
18534
18535 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
18536 which do not pass a boot drive correctly. Copied from GRUB Legacy.
18537
e293232b 185382005-07-17 Yoshinori Okuji <okuji@enbug.org>
18539
18540 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
18541 When turning off Gate A20, skip the check and return immediately,
18542 because this is not fatal usually.
18543
ebedfd00 185442005-07-17 Yoshinori Okuji <okuji@enbug.org>
18545
18546 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
18547 be 0x7C00 instead of 0x8000.
18548
18549 * boot/i386/pc/pxeboot.S: Rewritten.
18550
18551 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
18552 EXT_C.
18553 (gate_a20_check_state): Read a byte from 0x108000. Invert the
18554 result.
18555
654fc59f 185562005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
18557
18558 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
18559 robustness. This routine now supports a BIOS call and System
18560 Control Port A to modify the gate A20.
18561
18562 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
18563 Increased to 0x440.
18564
09f9923f 185652005-07-12 Hollis Blanchard <hollis@penguinppc.org>
18566
18567 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
18568 device path and resulting ihandle.
18569 (grub_ofdisk_close): dprintf the ihandle being closed.
18570 (grub_ofdisk_read): dprintf function parameters.
18571 * kern/mm.c (grub_mm_init_region): Likewise.
18572 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
18573 (grub_linux_boot): dprintf the Linux entry point, initrd address and
18574 size, and boot arguments.
18575 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
18576 before loading into memory.
18577 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
18578 before loading into memory.
18579
7ef504d8 185802005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
18581
18582 * kern/mm.c: Added much documentation.
18583 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
18584 8, set to 5 instead of 8.
18585
e0f050c2 185862005-07-10 Yoshinori Okuji <okuji@enbug.org>
18587
18588 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
18589
18590 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
18591 (grub_mkdevicemap_SOURCES): New variable.
18592
18593 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
18594 lib/device.c of GRUB Legacy.
18595
7224189a 185962005-07-10 Yoshinori Okuji <okuji@enbug.org>
18597
18598 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
18599 instead of PATH is NULL.
18600
68c864eb 186012005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
18602
18603 * commands/cmp.c (BUFFER_SIZE): New macro.
18604 (grub_cmd_cmp): Close the right file at the right time. Compare
18605 only data just read. Don't report files of different size as
18606 identical. Dynamically allocate buffers. Move variable
18607 declarations at the beginning of function.
18608
e6f3e614 186092005-07-09 Yoshinori Okuji <okuji@enbug.org>
18610
18611 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
18612 reverse.
18613
f8f1559a 186142004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
18615
18616 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
18617 when backspace is pressed at beginning of line.
18618
39c9d41d 186192005-07-03 Yoshinori Okuji <okuji@enbug.org>
18620
18621 * DISTLIST: Added genfslist.sh.
18622
18623 * normal/main.c (fs_module_list): New variable.
18624 (autoload_fs_module): New function.
18625 (read_fs_list): Likewise.
18626 (grub_normal_execute): Call read_fs_list.
18627
18628 * kern/fs.c (grub_fs_autoload_hook): New variable.
18629 (grub_fs_probe): Added support for auto-loading.
18630
18631 * include/grub/normal.h (struct grub_fs_module_list): New struct.
18632 (grub_fs_module_list_t): New type.
18633
18634 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
18635 (grub_fs_autoload_hook): New prototype.
18636
18637 * genfslist.sh: New file.
f19dbdb7 18638
39c9d41d 18639 * genmk.rb: Added a rule to generate a filesystem list.
18640
121c1d83 186412005-06-30 Marco Gerards <metgerards@student.han.nl>
18642
18643 * configure.ac: Fix the test for cross-compiling.
18644
18645 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
18646 define GRUB_UTIL anymore.
18647
18648 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
18649 so this function works on other systems than just big endian.
18650 (load_modules): Likewise.
18651 (add_segments): Likewise.
18652
e75d76e1 186532005-06-23 Hollis Blanchard <hollis@penguinppc.org>
18654
18655 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
18656 contains `l' modifier, get a long from va_arg().
18657
50b5a0a7 186582005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
18659
18660 * kern/mm.c (grub_free): If the next free block which is being
18661 merged is the first free block, set the first block to the block
18662 being freed.
18663 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
18664
89371b20 186652005-05-08 Hollis Blanchard <hollis@penguinppc.org>
18666
18667 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
18668 `grub_ieee1275_chosen'.
18669
168d6e58 186702005-05-08 Hollis Blanchard <hollis@penguinppc.org>
18671
18672 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
18673 (grub_ieee1275_chosen): New variable.
18674 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
18675 `chosen'.
18676 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
18677 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18678 Rename first argument to `phandle' for consistency.
18679 (grub_ieee1275_get_property_length): Likewise.
18680 (grub_ieee1275_next_property): Likewise. Change type of first argument
18681 to grub_ieee1275_phandle_t.
18682 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
18683 Move export next to declaration.
18684 (grub_ieee1275_chosen): New variable.
18685 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
18686 Correct cosmetic typo.
18687 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
18688 `grub_ieee1275_chosen'.
18689 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
18690 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
18691 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
18692 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
18693 `grub_ieee1275_chosen'.
18694
ca5baa3f 186952005-05-10 Hollis Blanchard <hollis@penguinppc.org>
18696
18697 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
18698 /chosen/bootargs.
18699 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
18700 /chosen/bootargs as "variable=value" pairs.
18701
708b345f 187022005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
18703
18704 * include/grub/misc.h (grub_dprintf): New macro.
18705 (grub_real_dprintf): New prototype.
18706 (grub_strword): Likewise.
18707 (grub_iswordseparator): Likewise.
18708 * kern/misc.c (grub_real_dprintf): New function.
18709 (grub_strword): Likewise.
18710 (grub_iswordseparator): Likewise.
18711
f4c5e67c 187122005-04-30 Hollis Blanchard <hollis@penguinppc.org>
18713
18714 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
18715 (roundup): Remove macro.
18716 (grub_ieee1275_flags): Make static.
18717 (grub_ieee1275_realmode): Remove.
18718 (grub_ieee1275_test_flag): New function.
18719 (grub_ieee1275_set_flag): Likewise.
18720 (find_options): Rename to `grub_ieee1275_find_options'; update
18721 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
18722 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
18723 (cmain): New prototype.
18724 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
18725 `grub_ieee1275_flags' directly.
18726 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
18727 machine/biosdisk.h.
18728 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
18729 Don't include grub/machine/init.h.
18730 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
18731 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18732 Remove prototype.
18733 (grub_ieee1275_realmode): Likewise.
18734 (grub_ieee1275_flag): New enum.
18735 (grub_ieee1275_test_flag): New prototype.
18736 (grub_ieee1275_set_flag): New prototype.
18737 * include/grub/powerpc/ieee1275/init.h: Remove file.
18738 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
18739 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
18740 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
18741 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
18742 comment.
18743 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
18744 `grub_ieee1275_test_flag'.
18745 (grub_ieee1275_encode_devname): Likewise.
18746
ed16607e 187472005-04-21 Hollis Blanchard <hollis@penguinppc.org>
18748
18749 * include/grub/powerpc/ieee1275/ieee1275.h
18750 (grub_ieee1275_encode_devname): New prototype.
18751 (grub_ieee1275_get_filename): Likewise.
18752 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
18753 function.
18754 (grub_set_prefix): Likewise.
18755 (grub_machine_init): Call grub_set_prefix.
18756 * kern/powerpc/ieee1275/openfw.c: Fix typos.
18757 (grub_parse_type): New enum.
18758 (grub_ieee1275_get_devargs): New function.
18759 (grub_ieee1275_get_devname): Likewise.
18760 (grub_ieee1275_parse_args): Likewise.
18761 (grub_ieee1275_get_filename): Likewise.
18762 (grub_ieee1275_encode_devname): Likewise.
18763
be369920 187642005-03-30 Marco Gerards <metgerards@student.han.nl>
18765
18766 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
18767 `grub_loader_unset'.
18768
a5ce3a4a 187692005-03-26 Hollis Blanchard <hollis@penguinppc.org>
18770
18771 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
18772 instead of grub_ieee1275_interpret.
18773 (grub_halt_init): New function.
18774 (grub_halt_fini): Likewise.
18775 (GRUB_MOD_INIT): Correct message grammar.
18776 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
18777 instead of grub_ieee1275_interpret.
18778 (grub_reboot_init): New function.
18779 (grub_reboot_fini): Likewise.
18780 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
18781 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
18782 util/i386/pc/misc.c with commands/ieee1275/halt.c,
18783 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
18784 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
18785 function.
18786 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
18787 Add prototype.
18788 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
18789 prototype.
18790 (grub_halt): Likewise.
18791 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
18792 (cmain): Remove __attribute__((unused)).
18793 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
18794 (grub_heap_len): Likewise.
18795 (grub_machine_fini): New function.
18796 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
18797 (grub_halt): Likewise.
18798 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
18799 function.
18800 * util/powerpc/ieee1275/misc.c: New file.
18801
0058f771 188022005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
18803
18804 * DISTLIST: New file.
18805 * gendistlist.sh: Likewise.
f19dbdb7 18806
0058f771 18807 * Makefile.in (COMMON_DISTFILES): Removed.
18808 (BOOT_DISTFILES): Likewise.
18809 (CONF_DISTFILES): Likewise.
18810 (DISK_DISTFILES): Likewise.
18811 (FS_DISTFILES): Likewise.
18812 (INCLUDE_DISTFILES): Likewise.
18813 (KERN_DISTFILES): Likewise.
18814 (LOADER_DISTFILES): Likewise.
18815 (TERM_DISTFILES): Likewise.
18816 (UTIL_DISTFILES): Likewise.
18817 (DISTFILES): Likewise.
18818 (uninstall): Uninstall files in $(pkgdata_DATA).
18819 (DISTLIST): New target.
18820 (distdir): Use the contents of the file DISTLIST to get a list of
18821 distributed files.
18822
46b3b8a5 188232005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
18824
18825 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
18826 descriptor. This is ported from GRUB Legacy.
18827
18828 * gencmdlist.sh: Added an extra semicolon to make it work with
18829 old sed versions. Reported by Robert Bihlmeyer
18830 <robbe@orcus.priv.at>.
18831
5822ff87 188322005-03-08 Yoshinori Okuji <okuji@enbug.org>
18833
18834 Automatic loading of commands is supported.
f19dbdb7 18835
5822ff87 18836 * normal/main.c (read_command_list): New function.
18837 (grub_normal_execute): Call read_command_list.
18838
18839 * normal/command.c (grub_register_command): Return zero or CMD.
18840 Allocate CMD->NAME from the heap.
18841 Initialize CMD->MODULE_NAME to zero.
18842 Find the same name as well. If the same command is found and it is
18843 a dummy command, overwrite members. If it is not a dummy command,
18844 return zero.
18845 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
18846 (grub_command_find): If a dummy command is found, load a module
18847 and retry to find a command only once.
18848
18849 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
18850 make sure that each command is loaded.
18851
18852 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
18853 macro.
18854 (struct grub_command): Remove const from the member `name'.
18855 Add a new member `module_name'.
18856 (grub_register_command): Return grub_command_t.
18857
18858 * commands/help.c (grub_cmd_help): Call grub_command_find to make
18859 sure that each command is loaded.
18860
18861 * genmk.rb (PModule::rule): Specify a module name without the
18862 suffix ".mod" to gencmdlist.sh.
18863
7b1f4b57 188642005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
18865
18866 * gencmdlist.sh: New file.
f19dbdb7 18867
7b1f4b57 18868 * genmk.rb (PModule::rule): Generate a rule for a command list.
18869 Clean command.lst.
18870 Generate command.lst from $(COMMANDFILES).
18871
18872 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
18873 (DATA): Added $(pkgdata_DATA).
18874 (install-local): Install files in $(pkgdata_DATA).
18875
062aaf39 188762005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
18877
18878 * term/i386/pc/vga.c (debug_command): Removed.
18879 (GRUB_MOD_INIT): Do not register the command "debug".
18880
18881 From Hollis Blanchard:
18882 * commands/configfile.c: New file.
18883 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18884 commands/configfile.c.
18885 (pkgdata_MODULES): Added configfile.mod.
18886 (configfile_mod_SOURCES): New variable.
18887 (configfile_mod_CFLAGS): Likewise.
18888 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18889 commands/configfile.c.
18890 (pkgdata_MODULES): Added configfile.mod.
18891 (configfile_mod_SOURCES): New variable.
18892 (configfile_mod_CFLAGS): Likewise.
18893 * util/grub-emu.c (main): Call grub_configfile_init and
18894 grub_configfile_fini.
18895 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
18896 prototype.
18897 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 18898
cee01aa6 188992005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
18900
18901 * normal/arg.c (grub_arg_show_help): Do not show the bug report
18902 address.
18903
18904 * commands/help.c (grub_cmd_help): Do not print newlines after
18905 the last command in print_command_help.
18906
93f3a1d8 189072005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
18908
18909 * commands/default.h: New file.
18910 * commands/timeout.h: Likewise.
18911 * normal/context.c: Likewise.
f19dbdb7 18912
93f3a1d8 18913 * util/misc.c: Do not include sys/times.h.
18914 Include sys/time.h and grub/machine/time.h.
18915 (grub_get_rtc): Rewritten with gettimeofday.
18916
18917 * util/grub-emu.c (main): Call grub_default_init and
18918 grub_timeout_init before grub_normal_init, and call
18919 grub_timeout_fini and grub_default_fini after grub_main.
18920
18921 * util/console.c (grub_ncurses_checkkey): Return the read
18922 character or -1.
18923
18924 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
18925 timeouts.
18926
18927 * normal/main.c (read_config_file): Push MENU. If this fails,
18928 print an error and wait for a user input.
18929 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
18930 If a menu is empty or an error occurs, pop MENU.
18931 (grub_normal_execute): Pop and free MENU after grub_menu_run
18932 returns.
18933
18934 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
18935
18936 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
18937 include time.h.
18938 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18939 without GRUB_UTIL.
18940 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
18941 time.h.
18942 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18943 without GRUB_UTIL.
18944
18945 * include/grub/normal.h (struct grub_menu_list): New struct.
18946 (grub_menu_list_t): New type.
18947 (struct grub_context): New struct.
18948 (grub_context_t): New type.
18949 (grub_register_command): Got rid of EXPORT_FUNC.
18950 (grub_unregister_command): Likewise.
18951 (grub_context_get): New prototype.
18952 (grub_context_get_current_menu): Likewise.
18953 (grub_context_push_menu): Likewise.
18954 (grub_context_pop_menu): Likewise.
18955 [GRUB_UTIL] (grub_default_init): Likewise.
18956 [GRUB_UTIL] (grub_default_fini): Likewise.
18957 [GRUB_UTIL] (grub_timeout_init): Likewise.
18958 [GRUB_UTIL] (grub_timeout_fini): Likewise.
18959
18960 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
18961 commands/timeout.c and normal/context.c.
18962 (pkgdata_MODULES): Added default.mod and timeout.mod.
18963 (normal_mod_SOURCES): Added normal/context.c.
18964 (default_mod_SOURCES): New variable.
18965 (default_mod_CFLAGS): Likewise.
18966 (timeout_mod_SOURCES): Likewise.
18967 (timeout_mod_CFLAGS): Likewise.
18968 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
18969 conf/i386-pc.rmk.
18970 (pkgdata_MODULES): Added default.mod and timeout.mod.
18971 (normal_mod_SOURCES): Added normal/context.c.
18972 (default_mod_SOURCES): New variable.
18973 (default_mod_CFLAGS): Likewise.
18974 (timeout_mod_SOURCES): Likewise.
18975 (timeout_mod_CFLAGS): Likewise.
18976
18977 * Makefile.in (all-local): Added $(MKFILES).
18978
4ed2e1dd 189792005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
18980
18981 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
18982 (grub_emu_SOURCES): Likewise.
18983 (pkgdata_MODULES): Add `sun.mod'.
18984 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18985 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18986 `partmap/sun.c'.
18987 (pkgdata_MODULES): Add `sun.mod'.
18988 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18989 * include/grub/partition.h (grub_sun_partition_map_init): New
18990 prototype.
18991 (grub_sun_partition_map_fini): Likewise.
18992 * partmap/sun.c: New file.
18993 * util/grub-emu.c (main): Initialize and de-initialize the sun
18994 partitionmap support.
18995
4d4e372e 189962005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
18997
18998 This implements an Emacs-like menu entry editor.
f19dbdb7 18999
4d4e372e 19000 * normal/menu_entry.c: New file.
f19dbdb7 19001
4d4e372e 19002 * util/console.c (grub_ncurses_putchar): Translate some Unicode
19003 characters to ASCII.
19004 (saved_char): New variable.
19005 (grub_ncurses_checkkey): Rewritten completely.
19006 (grub_ncurses_getkey): Likewise.
19007 (grub_ncurses_init): Call raw instead of cbreak.
19008
19009 * normal/menu.c (print_entry): Do not put a space.
19010 (init_page): Renamed to ...
19011 (grub_menu_init_page): ... this. All callers changed.
19012 (edit_menu_entry): Removed.
19013 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
19014
19015 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
19016
19017 * kern/misc.c (grub_vprintf): Call grub_refresh.
19018
19019 * normal/menu.c (DISP_LEFT): Renamed to ...
19020 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
19021 * normal/menu.c (DISP_UP): Renamed to ...
19022 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
19023 * normal/menu.c (DISP_RIGHT): Renamed to ...
19024 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
19025 * normal/menu.c (DISP_DOWN): Renamed to ...
19026 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
19027 * normal/menu.c (DISP_HLINE): Renamed to ...
19028 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
19029 * normal/menu.c (DISP_VLINE): Renamed to ...
19030 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
19031 * normal/menu.c (DISP_UL): Renamed to ...
19032 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
19033 * normal/menu.c (DISP_UR): Renamed to ...
19034 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
19035 * normal/menu.c (DISP_LL): Renamed to ...
19036 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
19037 * normal/menu.c (DISP_LR): Renamed to ...
19038 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
19039 * normal/menu.c (TERM_WIDTH): Renamed to ...
19040 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
19041 * normal/menu.c (TERM_HEIGHT): Renamed to ...
19042 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
19043 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
19044 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
19045 * normal/menu.c (TERM_MARGIN): Renamed to ...
19046 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
19047 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
19048 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
19049 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
19050 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
19051 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
19052 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
19053 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
19054 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
19055 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
19056 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
19057 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
19058 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
19059 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
19060 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
19061 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
19062 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
19063 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
19064 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
19065 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
19066 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
19067 All callers changed.
19068
19069 * include/grub/normal.h: New prototype.
19070
19071 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
19072 normal/menu_entry.c.
19073 (normal_mod_SOURCES): Likewise.
19074 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
19075 (normal_mod_SOURCES): Likewise.
19076
e6b92c8a 190772005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
19078
19079 * include/grub/normal.h (grub_halt_init): New prototype.
19080 (grub_halt_fini): Likewise.
19081 (grub_reboot_init): Likewise.
19082 (grub_reboot_fini): Likewise.
19083
19084 * util/grub-emu.c: Include signal.h.
19085 (main_env): New global variable.
19086 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
19087 catch C-c.
19088 (grub_machine_fini): New function.
19089 (main): Call grub_halt_init and grub_reboot_init before
19090 grub_main, and grub_reboot_fini and grub_halt_fini after it.
19091 Call setjmp with MAIN_ENV to go back afterwards.
19092 Call grub_machine_fini right before return.
19093
19094 * include/grub/util/misc.h: Include setjmp.h.
19095 (main_env): New prototype.
19096
19097 * include/grub/kernel.h (grub_machine_fini): New prototype.
19098 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
19099 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
19100
19101 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
19102 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
19103 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 19104
e6b92c8a 19105 * util/i386/pc/misc.c: New file.
f19dbdb7 19106
e6b92c8a 19107 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
19108 util/i386/pc/misc.c, commands/i386/pc/halt.c and
19109 commands/i386/pc/reboot.c.
19110
c642636f 191112005-02-14 Guillem Jover <guillem@hadrons.org>
19112
19113 * include/grub/dl.h (grub_dl_check_header): New prototype.
19114 (grub_arch_dl_check_header): Change return type to grub_err_t,
19115 remove size parameter and export function. Update all callers.
19116 * kern/dl.c (grub_dl_check_header): New function.
19117 (grub_dl_load_core): Use `grub_dl_check_header' instead of
19118 `grub_arch_dl_check_header'. Check ELF type. Check if sections
19119 are inside the core.
19120 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
19121 independent ELF header checks.
19122 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
19123 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
19124 `grub_dl_check_header' instead of explicit checks. Check for the
19125 ELF type.
19126 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
19127 `grub_dl_check_header' instead of explicit checks. Remove arch
19128 specific ELF header checks.
19129
e6b92c8a 19130 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
19131 argument SIZE.
19132
5eabe94b 191332005-02-13 Hollis Blanchard <hollis@penguinppc.org>
19134
19135 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
19136 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
19137
1b14a681 191382005-02-12 Hollis Blanchard <hollis@penguinppc.org>
19139
19140 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 19141 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 19142 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 19143 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 19144 * partmap/amiga.c (amiga_partition_map_iterate): Return
19145 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
19146 * partmap/apple.c (apple_partition_map_iterate): Likewise.
19147
aca108aa 191482005-02-01 Guillem Jover <guillem@hadrons.org>
19149
19150 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
19151 help info.
19152
c9f9c556 191532005-01-31 Marco Gerards <metgerards@student.han.nl>
19154
19155 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
19156 Removed prototype.
19157 (grub_rescue_cmd_linux): New prototype.
19158 (grub_rescue_cmd_initrd): Likewise.
19159 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
19160 `bi_rec'.
19161 (grub_linux_release_mem): Release the memory for the initrd.
19162 (grub_load_linux): Renamed from this...
19163 (grub_rescue_cmd_linux): ...To this. Changed all callers.
19164 Changed `entry' not to be static. Loop over memory regions to
19165 find another one when the default fails.
19166 (grub_rescue_cmd_initrd): New function.
19167 (grub_linux_init): Remove function.
19168 (grub_linux_fini): Likewise.
19169 (GRUB_MOD_INIT): Register `initrd'.
19170 (GRUB_MOD_FINI): Unregister `initrd'.
19171 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
19172 Function removed.
19173 (grub_linux_normal_fini): Likewise.
19174 (GRUB_MOD_INIT): Register `initrd'.
19175 (GRUB_MOD_FINI): Unregister `initrd'.
19176
990cf3aa 191772005-01-31 Marco Gerards <metgerards@student.han.nl>
19178
19179 * commands/help.c: New file.
19180 * normal/arg.c (show_help): Renamed to...
19181 (grub_arg_show_help): ... this.
19182 * commands/i386/pc/halt.c: New file.
19183 * commands/i386/pc/reboot.c: Likewise.
19184 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
19185 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
19186 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
19187 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
19188 variables.
19189 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
19190 `commands/help.c'.
19191 (pkgdata_MODULES): Add `help.mod'.
19192 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
19193 * grub/i386/pc/init.h (grub_reboot): New prototype.
19194 (grub_halt): Likewise.
19195 * include/grub/normal.h (grub_arg_show_help): New prototype.
19196 (grub_help_init): Likewise.
19197 (grub_help_fini): Likewise.
19198 * util/grub-emu.c (main): Initialize and deinitialize the help
19199 command.
19200
19201 * normal/cmdline.c (grub_cmdline_get): Doc fix.
19202
19203 * normal/command.c (grub_command_init): Fixed the description of
19204 the `set' and `unset' commands.
19205
192062005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 19207
19208 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
19209 function.
19210 * commands/ieee1275/halt.c: New file.
19211 * commands/ieee1275/reboot.c: Likewise.
19212 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
19213 `__attribute__ ((unused))'. Some GCS related fixed.
19214 (grub_suspend_init) [GRUB_UTIL]: Function removed.
19215 (grub_suspend_fini): Likewise.
19216 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
19217 and `halt.mod'.
19218 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
19219 (halt_mod_CFLAGS): New variables.
19220 * include/grub/powerpc/ieee1275/ieee1275.h
19221 (grub_ieee1275_interpret): New prototype.
19222
1ab09cc7 192232005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
19224
19225 * include/grub/misc.h (memmove): New prototype.
19226 (memcpy): Likewise.
19227
8b8cbdb2 192282005-01-22 Hollis Blanchard <hollis@penguinppc.org>
19229
19230 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
19231 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
19232
e3741a27 192332005-01-22 Marco Gerards <metgerards@student.han.nl>
19234
19235 * kern/misc.c (grub_strndup): Function rewritten.
19236
776bd780 192372005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
19238
19239 * normal/menu.c (TERM_WIDTH): Macro redefined.
19240 (TERM_TOP_BORDER_Y): Likewise.
19241 (draw_border): Replaced while-loop by a for-loop. Make the number
19242 of lines consistent with the number of lines displayed in
19243 print_entries. Added a margin below the rectangle.
19244 (print_entry): Make the entry fit in the rectangle.
19245 (print_entries): Display the scroll arrows next to the right
19246 border.
19247
78026bce 192482005-01-21 Marco Gerards <metgerards@student.han.nl>
19249
19250 * fs/minix.c (grub_minix_find_file): Reserve more space for
19251 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
19252 `grub_strncpy' to copy `path' into it.
19253
67bbaf0f 192542005-01-21 Marco Gerards <metgerards@student.han.nl>
19255
19256 Add the loopback device, a device via which files can be accessed
19257 as devices.
f19dbdb7 19258
67bbaf0f 19259 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
19260 (pkgdata_MODULES): Add loopback.mod.
19261 (loopback_mod_SOURCES): New variable.
19262 (loopback_mod_CFLAGS): Likewise.
19263 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
19264 `disk/loopback.c'.
19265 (pkgdata_MODULES): Add loopback.mod.
19266 (loopback_mod_SOURCES): New variable.
19267 (loopback_mod_CFLAGS): Likewise.
19268 * disk/loopback.c: new file.
19269 * include/grub/normal.h (grub_loop_init): New prototype.
19270 (grub_loop_fini): New prototype.
19271 * util/grub-emu.c (main): Initialize and de-initialize loopback
19272 support.
19273 * include/grub/disk.h (grub_disk_dev_id): Add
19274 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
19275
6f1c18bd 192762005-01-20 Hollis Blanchard <hollis@penguinppc.org>
19277
19278 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
19279 function.
19280 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
19281 (suspend_mod_SOURCES): New variable.
19282 (suspend_mod_CFLAGS): Likewise.
19283 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
19284 New prototype.
19285 * commands/ieee1275/suspend.c: New file.
19286
b38551da 192872005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
19288
19289 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 19290 ((unused))' to `__attribute__ ((used))'.
b38551da 19291 (GRUB_MOD_FINI): Likewise.
19292 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
19293 * genmk.rb (PModule): Assign space to common symbols when linking
19294 modules.
19295
777aff39 192962005-01-20 Marco Gerards <metgerards@student.han.nl>
19297
19298 * include/grub/mm.h (grub_mm_init_region): Change the type of the
19299 `unsigned' arguments to `grub_size_t'.
19300 (grub_malloc): Likewise.
19301 (grub_realloc): Likewise.
19302 (grub_memalign): Likewise.
19303 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
19304 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
19305 * util/misc.c (grub_malloc): Likewise.
19306 (grub_realloc): Likewise.
19307 * kern/mm.c (get_header_from_pointer): Change the casts to
19308 `unsigned' into a cast to `grub_size_t'.
19309
19310 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
19311 point to `currnode' when `currnode' is changed.
19312
19313 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
19314 Schottelius <nico-linux@schottelius.org>.
19315
d0ff18e1 193162005-01-09 Hollis Blanchard <hollis@penguinppc.org>
19317
19318 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
19319 (note_path): Remove variable.
19320 (GRUB_IEEE1275_NOTE_NAME): New macro.
19321 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
19322 (grub_ieee1275_note_hdr): New structure.
19323 (grub_ieee1275_note_desc): Likewise.
19324 (grub_ieee1275_note): Likewise.
19325 (load_note): Remove `dir' argument. All callers updated. Remove
19326 `note_img' and `path'. Do not load a file from `note_path'.
19327 Initialize a struct grub_ieee1275_note and write that to `out'.
19328 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
19329
4ca7004c 193302005-01-05 Marco Gerards <metgerards@student.han.nl>
19331
19332 * util/misc.c (grub_util_read_image): Revert last change. It
19333 called `grub_util_read_at', which seeks from the beginning of the
19334 file.
19335
0b412211 193362005-01-04 Hollis Blanchard <hollis@penguinppc.org>
19337
19338 * TODO: Add note about endianness in grub-mkimage.
19339 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
19340 section.
19341 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
19342 (grub_mkimage_SOURCES): New target.
19343 * include/grub/kernel.h (grub_start_addr): Remove variable.
19344 (grub_end_addr): Likewise.
19345 (grub_total_module_size): Likewise.
19346 (grub_kernel_image_size): Likewise.
19347 (GRUB_MODULE_MAGIC): New constant.
19348 (grub_module_info): New structure.
19349 (grub_arch_modules_addr): New prototype.
19350 (grub_get_end_addr): Remove prototype.
19351 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
19352 * include/grub/powerpc/ieee1275/kernel.h: New file.
19353 * include/grub/util/misc.h (grub_util_get_fp_size): New
19354 prototype.
19355 (grub_util_read_at): Likewise.
19356 (grub_util_write_image_at): Likewise.
19357 * kern/main.c (grub_get_end_addr): Remove function.
19358 (grub_load_modules): Call grub_arch_modules_addr instead of using
19359 grub_end_addr. Look for a grub_module_info struct in memory. Use
19360 the grub_module_info fields instead of calling grub_get_end_addr
19361 as loop conditions. Move grub_add_unused_region code here.
19362 (grub_add_unused_region): Remove function.
19363 * kern/i386/pc/init.c: Include grub/cache.h.
19364 (grub_machine_init): Remove call to grub_get_end_addr. Remove
19365 one call to add_mem_region.
19366 (grub_arch_modules_addr): New function.
19367 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
19368 (grub_total_module_size): Likewise.
19369 Include grub/machine/kernel.h.
19370 (grub_arch_modules_addr): New function.
19371 * util/grub-emu.c (grub_end_addr): Remove variable.
19372 (grub_total_module_size): Likewise.
19373 (grub_arch_modules_addr): New function.
19374 * util/misc.c: Include unistd.h.
19375 (grub_util_get_fp_size): New function.
19376 (grub_util_read_at): Likewise.
19377 (grub_util_write_image_at): Likewise.
19378 (grub_util_read_image): Call grub_util_read_at.
19379 (grub_util_write_image): Call grub_util_write_image_at.
19380 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
19381 additional memory in kernel_img for a struct grub_module_info.
19382 Fill in that grub_module_info.
19383 * util/powerpc/ieee1275/grub-mkimage.c: New file.
19384
458786f8 193852005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19386
19387 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
19388 New function.
19389 * include/grub/powerpc/ieee1275/ieee1275.h
19390 (grub_ieee1275_milliseconds): New prototype.
19391 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
19392 Change to 1000.
19393 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
19394 grub_ieee1275_milliseconds.
19395
ac507d1b 193962005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19397
19398 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
19399 variable.
19400 (find_options): New function.
19401 (cmain): Call find_options.
19402 * include/grub/powerpc/ieee1275/ieee1275.h
19403 (grub_ieee1275_realmode): New extern variable.
19404 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
19405 grub_map if grub_ieee1275_realmode is false.
19406
6b8fd1c4 194072004-12-29 Marco Gerards <metgerards@student.han.nl>
19408
19409 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
19410 lines are inserted and make it work like readline. Reported by
19411 Vincent Pelletier <subdino2004@yahoo.fr>.
19412
8514a1e0 194132004-12-28 Marco Gerards <metgerards@student.han.nl>
19414
19415 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
19416
19417 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
19418 `kern/powerpc/cache.S'.
19419
924b6140 194202004-12-27 Marco Gerards <metgerards@student.han.nl>
19421
19422 * genmk.rb: Handle the `Program' class in the main loop. Written
19423 by Johan Rydberg <jrydberg@gnu.org>.
19424 (Program): New class.
19425 (programs): New variable.
19426 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
19427 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
19428 instead of "grub/kernel.h". Include <grub/machine/init.h>.
19429 (help_arch): Function removed.
19430 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
19431 `powerpc/libgcc.h' and `loader.h'.
19432 (pkgdata_PROGRAMS): New variable.
19433 (sbin_UTILITIES): Variable removed.
19434 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
19435 (grubof_SOURCES): Variable re-defined so it only includes the
19436 core functionality.
19437 (grubof_CFLAGS): Remove `-DGRUBOF'.
19438 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
19439 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
19440 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
19441 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
19442 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
19443 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
19444 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
19445 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
19446 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
19447 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
19448 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
19449 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
19450 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
19451 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
19452 (pc_mod_CFLAGS): New variables.
19453 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
19454 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
19455 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
19456 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
19457 Moved from here...
19458 * include/grub/i386/pc/init.h (grub_os_area_addr)
19459 (rub_os_area_size): ... to here.
19460 * include/grub/powerpc/ieee1275/ieee1275.h
19461 (grub_ieee1275_entry_fn): Export symbol.
19462 * include/grub/powerpc/ieee1275/init.h: New file.
19463 * include/grub/powerpc/libgcc.h: Likewise.
19464 * include/grub/cache.h: Likewise.
19465 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
19466 <hollis@penguinppc.org>.
19467 * kern/dl.c: Include <grub/cache.h>.
19468 (grub_dl_flush_cache): New function.
19469 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
19470 for this module.
19471 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
19472 (grub_console_init): Removed prototypes.
19473 (grub_machine_init): Don't initialize the modules anymore.
19474 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
19475 static.
19476 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
19477 Macro undef removed.
19478 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
19479 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
19480 relocation `R_PPC_REL32'. Return an error when the relocation is
19481 unknown.
19482 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
19483 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
19484 * util/misc.c (grub_arch_sync_caches): Likewise.
19485
e4b47e0c 194862004-12-19 Marco Gerards <metgerards@student.han.nl>
19487
19488 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
19489 `symlist.c', add `grubof_symlist.c'.
19490 (symlist.c): Variable removed.
19491 (grubof_HEADERS): Variable added.
19492 (grubof_symlist.c): New target.
19493 (kernel_syms.lst): Use `grubof_HEADERS' instead of
19494 `kernel_img_HEADERS'.
19495 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
19496 * kern/powerpc/dl.c: New file.
19497 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
19498 Function removed.
19499 (grub_arch_dl_relocate_symbols): Likewise.
19500 (grub_register_exported_symbols): Likewise.
19501
4ceb3636 195022004-12-13 Marco Gerards <metgerards@student.han.nl>
19503
19504 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
19505 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
19506 to fail instead. Reported by Vincent Pelletier
19507 <subdino2004@yahoo.fr>.
19508
19509 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
19510 it is not allocated. Reported by Vincent Pelletier
19511 <subdino2004@yahoo.fr>.
19512
19513 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
19514 output so the output looks better.
f19dbdb7 19515
3f1578fe 195162004-12-04 Marco Gerards <metgerards@student.han.nl>
19517
19518 Modulize the partition map support and add support for the amiga
19519 partition map.
f19dbdb7 19520
3f1578fe 19521 * commands/ls.c: Include <grub/partition.h> instead of
19522 <grub/machine/partition.h>.
19523 * kern/disk.c: Likewise.
19524 * kern/rescue.c: Likewise.
19525 * loader/i386/pc/chainloader.c: Likewise.
19526 * normal/cmdline.c: Likewise.
19527 * kern/powerpc/ieee1275/init.c: Likewise.
19528 (grub_machine_init): Call `grub_pc_partition_map_init',
19529 `grub_amiga_partition_map_init' and
19530 `grub_apple_partition_map_init'.
19531 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
19532 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
19533 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
19534 `partition.h' and `pc_partition.h'.
19535 (grub_setup_SOURCES): Remove
19536 `disk/i386/pc/partition.c'. Add `kern/partition.c',
19537 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
19538 (grub_emu_SOURCES): Likewise.
19539 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
19540 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
19541 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
19542 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
19543 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
19544 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
19545 (grubof_SOURCES): Likewise.
19546 * disk/i386/pc/partition.c: File removed.
19547 * disk/powerpc/ieee1275/partition.c: Likewise.
19548 * include/grub/powerpc/ieee1275/partition.h: Likewise.
19549 * include/grub/i386/pc/partition.h: Likewise.
19550 * kern/partition.c: New file.
19551 * partmap/amiga.c: Likewise.
19552 * partmap/apple.c: Likewise.
19553 * partmap/pc.c: Likewise.
19554 * include/grub/partition.h: Likewise..
19555 * include/grub/pc_partition.h: Likewise.
19556 * util/grub-emu.c: Include <grub/partition.h> instead of
19557 <grub/machine/partition.h>.
19558 (main): Call `grub_pc_partition_map_init',
19559 `grub_amiga_partition_map_init' and
19560 `grub_apple_partition_map_init' and deinitialize afterwards.
19561 * util/i386/pc/biosdisk.c: Include `#include
19562 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
19563 `<grub/machine/partition.h>'.
19564 * util/i386/pc/grub-setup.c: Likewise.
19565 * util/i386/pc/biosdisk.c: Likewise.
19566 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
19567 partition information in case of a PC partition.
19568 * util/i386/pc/grub-setup.c: Include `#include
19569 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
19570 `<grub/machine/partition.h>'.
19571 (setup): Only access the PC specific partition information in case
19572 of a PC partition.
19573
0ef4ced9 195742004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 19575
0ef4ced9 19576 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
19577 (grub_longjmp): Likewise.
19578 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
19579 20.
19580 * normal/powerpc/setjmp.S: New file.
19581 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19582 `normal/powerpc/setjmp.S'.
19583 (grubof_CFLAGS): Add `-DGRUBOF'.
19584 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
19585 [GRUB_UTIL && !GRUBOF].
f19dbdb7 19586
19950e29 195872004-11-16 Marco Gerards <metgerards@student.han.nl>
19588
19589 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
19590 property named `name'. Correctly handle the error returned by
19591 `grub_ieee1275_finddevice' if a device can not be opened.
19592
a2fea427 195932004-11-02 Hollis Blanchard <hollis@penguinppc.org>
19594
19595 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
19596 `actual' for negativity.
19597 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
19598 kern/fshelp.c.
19599
41ea0ea3 196002004-11-01 Marco Gerards <metgerards@student.han.nl>
19601
19602 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
19603 (PAGE_OFFSET): New macro.
19604 (CRTC_ADDR_PORT): Likewise.
19605 (CRTC_DATA_PORT): Likewise.
19606 (START_ADDR_HIGH_REGISTER): Likewise.
19607 (START_ADDR_LOW_REGISTER): Likewise.
19608 (GRAPHICS_ADDR_PORT): Likewise.
19609 (GRAPHICS_DATA_PORT): Likewise.
19610 (READ_MAP_REGISTER): Likewise.
19611 (INPUT_STATUS1_REGISTER): Likewise.
19612 (INPUT_STATUS1_VERTR_BIT): Likewise.
19613 (page): New variable.
19614 (wait_vretrace): New function.
19615 (set_read_map): Likewise.
19616 (set_start_address): Likewise.
19617 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
19618 the right page.
19619 (check_vga_mem): Take the page into account.
19620 (write_char): Likewise.
19621 (write_cursor): Likewise.
19622 (scroll_up): Likewise. Copy the page to the page that is not
19623 shown and switch between both pages.
19624 (grub_vga_putchar): Fix off by one error.
19625 (grub_vga_cls): Wait for the vertical retrace. Take the page into
19626 account.
19627
ad0bd20b 196282004-11-01 Marco Gerards <metgerards@student.han.nl>
19629
19630 Add support for iso9660 (including rockridge).
f19dbdb7 19631
ad0bd20b 19632 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
19633 (iso9660_mod_SOURCES): New variable.
19634 (iso9660_mod_CFLAGS): Likewise.
19635 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
19636 * include/grub/fs.h (grub_iso9660_init): New prototype.
19637 * util/grub-emu.c (main): Call `grub_iso9660_init'.
19638 * fs/iso9660.c: New file.
19639
19640 * include/grub/misc.h (grub_strncat): New prototype.
19641 * kern/misc.c (grub_strncat): New function.
f19dbdb7 19642
ad0bd20b 19643 * fs/hfs.c (grub_hfs_mount): Translate the error
19644 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
19645 * fs/jfs.c (grub_jfs_mount): Likewise.
19646 * fs/ufs.c (grub_ufs_mount): Likewise.
19647
a5477a59 196482004-10-28 Hollis Blanchard <hollis@penguinppc.org>
19649
19650 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
19651 which initialized BAT registers.
19652 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
19653 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
19654 Move from here...
19655 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
19656 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
19657 ... to here.
19658 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
19659 (grub_mapclaim): Likewise.
19660 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
19661 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
19662 hand.
19663
9304c1f8 196642004-10-19 Hollis Blanchard <hollis@penguinppc.org>
19665
19666 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
19667 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
19668 -ffreestanding and -msoft-float.
19669
86f4ae25 196702004-10-15 Hollis Blanchard <hollis@penguinppc.org>
19671
19672 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
19673 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
19674 set in grub_ieee1275_flags.
19675
38912228 196762004-10-14 Hollis Blanchard <hollis@penguinppc.org>
19677
19678 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
19679 prototype.
19680 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
19681 grub_console_init first.
19682 Change the memory range used for grub_ieee1275_claim and
19683 grub_mm_init_region.
19684 Print an error message if the claim fails.
19685 Include <grub/misc.h>.
19686
d1923dc8 196872004-10-13 Hollis Blanchard <hollis@penguinppc.org>
19688
19689 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
19690 Call grub_children_iterate for device nodes of type `scsi',
19691 `ide', or `ata'.
19692 (grub_ofdisk_open): Remove manual device alias resolution.
19693 Fix memory leak when device cannot be opened.
f19dbdb7 19694 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 19695 (grub_children_iterate): New prototype.
19696 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
19697 New function.
19698 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
19699 Return -1 if args.size was -1.
19700
4512e4f3 197012004-10-11 Hollis Blanchard <hollis@penguinppc.org>
19702
19703 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
19704 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
19705 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
19706 Open Firmware's memory for it; claim memory from _start to _end.
19707 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
19708 (_end): New extern.
19709 (_start): Zero BSS from __bss_start to _end.
19710 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
19711 New extern.
19712 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
19713
4d61feb0 197142004-10-11 Hollis Blanchard <hollis@penguinppc.org>
19715
ad0bd20b 19716 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
19717 -1 if args.base was -1.
4d61feb0 19718
026fa2f9 197192004-10-08 Hollis Blanchard <hollis@penguinppc.org>
19720
19721 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
19722 escape sequence instead of a literal ^L. Also call
19723 grub_ofconsole_gotoxy.
19724
9f2220ef 197252004-10-03 Hollis Blanchard <hollis@penguinppc.org>
19726
19727 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
19728 void * arguments to grub_addr_t. All callers updated. Also make
19729 the `result' argument optional.
19730 (grub_ieee1275_release): change void * arguments to grub_addr_t.
19731 All callers updated.
19732
8a572cd7 197332004-09-22 Hollis Blanchard <hollis@penguinppc.org>
19734
19735 * commands/ls.c (grub_ls_list_files): Use the string following the
19736 initial ')', if present, as the filesystem path.
19737 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
19738
19739 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
19740
18aa81f2 197412004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
19742
19743 Make the source code of the menu interface more readable.
f19dbdb7 19744
18aa81f2 19745 * normal/menu.c: Include grub/mm.h.
19746 (TERM_WIDTH): New macro.
19747 (TERM_HEIGHT): Likewise.
19748 (TERM_INFO_HEIGHT): Likewise.
19749 (TERM_MARGIN): Likewise.
19750 (TERM_SCROLL_WIDTH): Likewise.
19751 (TERM_TOP_BORDER_Y): Likewise.
19752 (TERM_LEFT_BORDER_X): Likewise.
19753 (TERM_BORDER_WIDTH): Likewise.
19754 (TERM_MESSAGE_HEIGHT): Likewise.
19755 (TERM_BORDER_HEIGHT): Likewise.
19756 (TERM_NUM_ENTRIES): Likewise.
19757 (TERM_FIRST_ENTRY_Y): Likewise.
19758 (TERM_ENTRY_WIDTH): Likewise.
19759 (TERM_CURSOR_X): Likewise.
19760 (draw_border): Use macros instead of magic numbers.
19761 (print_entry): Likewise.
19762 (print_entries): Likewise.
19763 (run_menu): Likewise. Also, handle the key 'e'.
19764 (run_menu_entry): Ignore empty command lines.
19765 (print_message): Added a new argument EDIT. If EDIT is true,
19766 print a different message.
19767 (init_page): Likewise.
19768 (edit_menu_entry): New function. Not implemented yet.
19769
b47efe30 197702004-09-17 Marco Gerards <metgerards@student.han.nl>
19771
19772 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
19773 can be loaded from normal mode.
f19dbdb7 19774
b47efe30 19775 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
19776 `multiboot.mod'.
19777 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
19778 (multiboot_mod_CFLAGS): New variables.
19779 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 19780 * loader/i386/pc/multiboot_normal.c: Likewise.
19781
b47efe30 19782 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
19783 attribute `unused'.
f19dbdb7 19784
b47efe30 19785 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
19786 `fdiro' to read the mode information from instead of `diro'.
19787
19788 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
19789 looking up a symlink.
19790
19791 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
19792 macro.
19793 * normal/command.c (grub_command_execute): Don't parse the
19794 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
19795 flags of the command.
19796
19797 * normal/menu.c (grub_menu_run): Fix typo.
19798
da75ac71 197992004-09-14 Hollis Blanchard <hollis@penguinppc.org>
19800
19801 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
19802
19803 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
19804 `y + 1' instead of `y - 1'.
19805
19806 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 19807
062b24c2 198082004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
19809
19810 From Hollis Blanchard <hollis@penguinppc.org>:
19811 * kern/misc.c (memmove): New alias for grub_memmove.
19812 (memcmp): New alias for grub_memcmp.
19813 (memset): New alias for grub_memset.
f19dbdb7 19814 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 19815 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 19816 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 19817 (grub_ieee1275_get_property): Likewise.
f19dbdb7 19818
8ddad845 198192004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
19820
19821 Added normal mode command `chainloader' as module chain.mod, which
19822 depends on normal.mod and _chain.mod.
f19dbdb7 19823
8ddad845 19824 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
19825 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
19826 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
19827 Deleted prototype.
19828 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
19829 but arguments parsing moved to ...
19830 (grub_chainloader_cmd): ... here. New function.
19831 * include/grub/i386/pc/chainloader.h: New file.
19832 * loader/i386/pc/chainloader_normal.c: Likewise.
19833
2c1f4ce3 198342004-09-11 Marco Gerards <metgerards@student.han.nl>
19835
19836 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
19837 (grub_mkimage_LDFLAGS): Likewise.
19838 (grub_emu_SOURCES): Likewise.
19839 (kernel_img_HEADERS): Added fshelp.h.
19840 * fs/ext2.c: Include <grub/fshelp.h>.
19841 (FILETYPE_REG): New macro.
19842 (FILETYPE_INO_REG): Likewise.
19843 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
19844 Changed all users.
19845 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
19846 all users.
19847 (grub_fshelp_node): New struct.
19848 (grub_ext2_data): Added member `diropen'. Changed member `inode'
19849 to a pointer.
19850 (grub_ext2_get_file_block): Removed function.
19851 (grub_ext2_read_block): New function.
19852 (grub_ext2_read_file): Replaced parameter `data' by `node'.
19853 This function was written.
19854 (grub_ext2_mount): Read the root inode. Create a diropen struct.
19855 (grub_ext2_find_file): Removed function.
19856 (grub_ext2_read_symlink): New function.
19857 (grub_ext2_iterate_dir): Likewise.
19858 (grub_ext2_open): Rewritten.
19859 (grub_ext2_dir): Rewritten.
19860 * include/grub/fshelp.h: New file.
19861 * fs/fshelp.c: Likewise.
19862
3c52136a 198632004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
19864
19865 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
19866 (print_message): Add a missing newline.
19867 (run_menu): Added timeout support.
19868 (run_menu_entry): New local function.
19869 (grub_menu_run): Added support for booting.
19870
19871 * kern/loader.c (grub_loader_is_loaded): New function.
19872
19873 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
19874 (grub_get_rtc): Exported.
19875
19876 * include/grub/i386/pc/time.h: Include grub/symbol.h.
19877 (grub_get_rtc): Exported.
19878
19879 * include/grub/normal.h (struct grub_command_list): Remove
19880 constant from the member `command'.
19881
19882 * include/grub/loader.h (grub_loader_is_loaded): Declared.
19883
19884 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
19885
19886 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
19887
aa033560 198882004-08-28 Marco Gerards <metgerards@student.han.nl>
19889
19890 Add support for the JFS filesystem.
19891
19892 * fs/jfs.c: New file.
19893 * include/grub/fs.h (grub_jfs_init): New prototype.
19894 (grub_jfs_fini): New prototype.
19895 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
19896 (grub_emu_SOURCES): Likewise.
19897 (pkgdata_MODULES): Add jfs.mod.
19898 (jfs_mod_SOURCES): New variable.
19899 (jfs_mod_CFLAGS): Likewise.
19900 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
19901 (grubof_SOURCES): Likewise.
19902 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
19903
19904 * fs/fat.c (grub_fat_find_dir): Convert the filename little
19905 endian to the host endian.
19906 (grub_fat_utf16_to_utf8): Move function from there...
19907 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 19908 the endianness of the source string anymore.
aa033560 19909 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
19910
94bc45af 199112004-08-24 Marco Gerards <metgerards@student.han.nl>
19912
19913 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
19914 (grub_boot_fini) [GRUB_UTIL]: Likewise.
19915 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
19916 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 19917
94bc45af 19918 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
19919 (grub_hfs_iterate_dir): Make the function static. Add prototypes
19920 for `node_found' and `it_dir'.
19921 (grub_hfs_dir): Add prototype for `dir_hook'.
19922
19923 * fs/minix.c (grub_minix_get_file_block): Add prototype for
19924 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
19925 and `indir32' to silence a gcc warning.
19926
19927 * include/grub/fs.h (grub_hfs_init): New prototype.
19928 (grub_hfs_fini): Likewise.
f19dbdb7 19929
19930
97543f08 199312004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
19932
19933 Each disk device has its own id now. This is useful to make use
19934 of multiple disk devices.
f19dbdb7 19935
97543f08 19936 * include/grub/disk.h (grub_disk_dev_id): New enum.
19937 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
19938 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
19939
19940 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
19941 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19942
19943 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
19944 GRUB_DISK_DEVICE_OFDISK_ID as an id.
19945
19946 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
19947 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19948
19949 * include/grub/disk.h (struct grub_disk_dev): Added a new member
19950 "id" which is used by the cache manager.
19951
19952 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
19953 of just "GRUB".
19954
64372eb4 199552004-08-18 Marco Gerards <metgerards@student.han.nl>
19956
19957 * fs/hfs.c: New file.
19958 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
19959 (grub_emu_SOURCES): Likewise.
19960 (pkgdata_MODULES): Add hfs.mod.
19961 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
19962 (grubof_SOURCES): Likewise.
19963 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
19964
19965 * include/grub/misc.h (grub_strncasecmp): Add prototype.
19966 * kern/misc.c (grub_strncasecmp): Add function.
19967
cc61b58f 199682004-08-14 Marco Gerards <metgerards@student.han.nl>
19969
19970 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
19971 with parentheses.
19972
19973 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
19974 (grub_ext2_dir): In case the directory entry type is unknown, read
19975 it from the inode.
19976
0ef123f6 199772004-08-02 Peter Bruin <pjbruin@dds.nl>
19978
19979 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
19980 grub_load_linux instead of grub_rescue_cmd_linux as second
19981 argument of grub_rescue_register_command.
19982
19983 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
19984
a447c5df 199852004-07-27 Marco Gerards <metgerards@student.han.nl>
19986
19987 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
19988 function.
19989 * commands/boot.c: Remove the check for `GRUB_UTIL'.
19990 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19991 `loader/powerpc/ieee1275/linux.c',
19992 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
19993 * include/grub/powerpc/ieee1275/ieee1275.h
19994 (grub_ieee1275_release): New prototype.
19995 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
19996 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
19997 normal, boot, linux and linux_normal.
19998 * loader/powerpc/ieee1275/linux.c: New file.
19999 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
20000
5a9e3546 200012004-07-12 Marco Gerards <metgerards@student.han.nl>
20002
20003 * normal/arg.c (grub_arg_parse): Correct error handling after
20004 reallocating the argumentlist (check if `argl' is not null instead
20005 of checking if `args' is not null).
20006 * kern/mm.c (grub_realloc): Return the same pointer when using the
20007 same region, instead of returning the header address.
20008
e15199cb 200092004-07-11 Marco Gerards <metgerards@student.han.nl>
20010
20011 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
20012 one block instead of two when looking for the initial partition.
20013 (grub_partition_probe): Initialize the local variable `p' with 0.
20014 Use base 10 for the grub_strtoul call.
20015 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
20016 need for one local variable.
20017 (grub_strtoul): Don't add the new value to `num', instead of that
20018 just assign it.
20019
020616c2 200202004-07-11 Marco Gerards <metgerards@student.han.nl>
20021
20022 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
20023 (pxeboot_img_SOURCES): New variable.
20024 (pxeboot_img_ASFLAGS): Likewise.
20025 (pxeboot_img_LDFLAGS): Likewise.
20026 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
20027 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
20028 <lode_leroy@hotmail.com>.
20029
6c51eb64 200302004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
20031
20032 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
20033 there was no input.
20034
cfb12aff 200352004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
20036
20037 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
20038 the history buffer logic.
20039
6eabba74 200402004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
20041
20042 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
20043 (FILETYPE_INO_SYMLINK): New macros.
20044 (grub_ext2_find_file): Check if the node is a directory using the
20045 inode stat information instead of using the filetype in the
20046 dirent. Exclude the first character of an absolute symlink.
20047 (grub_ext2_dir): Mask out the filetype part of the mode member of
20048 the inode.
20049
66e19ef8 200502004-05-24 Marco Gerards <metgerards@student.han.nl>
20051
20052 Add support for UFS version 1 and 2. Add support for the minix
20053 filesystem version 1 and 2, both the variants with 14 and 30 long
20054 filenames.
f19dbdb7 20055
66e19ef8 20056 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
20057 fs/minix.c.
20058 (grub_emu_SOURCES): Likewise.
20059 (pkgdata_MODULES): Add ufs.mod and minix.mod.
20060 (ufs_mod_SOURCES): New variable.
20061 (ufs_mod_CFLAGS): Likewise.
20062 (minix_mod_SOURCES): Likewise.
20063 (minix_mod_CFLAGS): Likewise.
20064 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
20065 fs/minix.c.
20066 (grubof_SOURCES): Likewise.
20067 * fs/ufs.c: New file.
20068 * fs/minix.c: New file.
20069 * include/grub/fs.h (grub_ufs_init): New prototype.
20070 (grub_ufs_fini): Likewise.
20071 (grub_minix_init): Likewise.
20072 (grub_minix_fini): Likewise.
20073 * util/grub-emu.c (main): Initialize and deinitialize UFS and
20074 minix fs.
20075
cc2e748a 200762004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
20077
20078 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
20079 commands/ls.c, commands/terminal.c, commands/boot.c,
20080 commands/cmp.c and commands/cat.c.
20081 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
20082
20083 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
20084 "env.h"
20085
4b13b216 200862004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
20087
20088 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
20089 and grub_, respectively. Because the conversion is trivial and
20090 mechanical, I omit the details here. Please refer to the CVS
20091 if you need more information.
20092
6a142551 200932004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
20094
20095 * include/pupa: Renamed to ...
20096 * include/grub: ... this.
20097 * util/i386/pc/pupa-mkimage.c: Renamed to ...
20098 * util/i386/pc/grub-mkimage.c: ... this.
20099 * util/i386/pc/pupa-setup.c: Renamed to ...
20100 * util/i386/pc/grub-setup.c: ... this.
20101 * util/pupa-emu.c: Renamed to ...
20102 * util/grub-emu.c: ... this.
20103
e56cdf21 201042004-03-29 Marco Gerards <metgerards@student.han.nl>
20105
20106 Add support for the newworld apple macintosh (PPC). This has been
20107 tested on the powerbook 2000 only. It only adds support for
20108 generic ieee1275 functions, console and disk support. This should
20109 be easy to port to other architectures with support for Open
20110 Firmware.
f19dbdb7 20111
e56cdf21 20112 * configure.ac: Accept the powerpc as host_cpu. In the case of
20113 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
20114 specific tests are only executed while building for the i386.
20115 Inverse test for crosscompile.
20116 * genmk.rb (Utility): Allow assembler files.
20117 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
20118 * conf/powerpc-ieee1275.rmk: New file.
20119 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
20120 * disk/powerpc/ieee1275/partition.c: Likewise.
20121 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
20122 * include/pupa/powerpc/ieee1275/console.h: Likewise.
20123 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
20124 * include/pupa/powerpc/ieee1275/time.h: Likewise.
20125 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
20126 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
20127 * include/pupa/powerpc/ieee1275/loader.h
20128 * include/pupa/powerpc/setjmp.h: Likewise.
20129 * include/pupa/powerpc/types.h: Likewise.
20130 * kern/powerpc/ieee1275/init.c: Likewise.
20131 * kern/powerpc/ieee1275/openfw.c: Likewise.
20132 * term/powerpc/ieee1275/ofconsole.c: Likewise.
20133
20134 These files were written by Johan Rydberg
20135 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 20136
e56cdf21 20137 * boot/powerpc/ieee1275/cmain.c: New file.
20138 * boot/powerpc/ieee1275/crt0.S: Likewise.
20139 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
20140 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
20141
8c8cc205 201422004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
20143
20144 * Makefile.in: Update copyright.
20145 * genmodsrc.sh: Likewise.
20146 * gensymlist.sh: Likewise.
20147 * term/i386/pc/vga.c: Indent correctly.
20148
20149 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
20150 bugreporting address.
20151 * util/i386/pc/pupa-setup.c (usage): Likewise,
20152 (main): Call pupa_ext2_init and pupa_ext2_fini.
20153
f19dbdb7 20154 * fs/fat.c (log2): Renamed to ...
8c8cc205 20155 (fat_log2): ... this.
20156 All callers changed.
20157 * kern/misc.c (memcpy): Alias to pupa_memmove.
20158 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
20159 lvalue cast.
20160 * util/console.c (pupa_ncurses_fini): Return 0.
20161
20162 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
20163 Move fail label here.
20164 [__GNU__]: Don't warn when using stat.
20165 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
20166 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
20167 long int. Use strtol instead of strtoul.
f19dbdb7 20168
db1771cf 201692004-03-14 Marco Gerards <metgerards@student.han.nl>
20170
20171 * commands/boot.c: New file.
20172 * commands/cat.c: Likewise.
20173 * commands/cmp.c: Likewise.
20174 * commands/ls.c: Likewise.
20175 * commands/terminal.c: Likewise.
20176 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
20177 (pupa_register_command): Changed interface to match the new
20178 argument parser.
20179 (pupa_command_execute): Changed (almost rewritten) so it uses
20180 pupa_split_command. Added support for setting variables using the
20181 syntax `foo=bar'.
20182 (rescue_command): Changed to work with the new argument parser.
20183 (terminal_command): Moved from here to commands/terminal.c.
20184 (set_command): New function.
20185 (unset_command): New function.
20186 (insmod_command): New function.
20187 (rmmod_command): New function.
20188 (lsmod_command): New function.
20189 (pupa_command_init): Don't initialize the command terminal
20190 anymore. Initialize the commands set, unset, insmod, rmmod and
20191 lsmod.
20192 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
20193 (kernel_img_HEADERS): Add arg.h and env.h.
20194 (pupa_mkimage_LDFLAGS): Add kern/env.c.
20195 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
20196 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
20197 normal/arg.c.
20198 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
20199 terminal.mod.
20200 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
20201 (boot_mod_SOURCES): New variable.
20202 (terminal_mod_SOURCES): Likewise.
20203 (ls_mod_SOURCES): Likewise.
20204 (cmp_mod_SOURCES): Likewise.
20205 (cat_mod_SOURCES): Likewise.
20206
20207 * normal/arg.c: New file.
20208 * kern/env.c: Likewise.
20209 * include/pupa/arg.h: Likewise.
20210 * include/pupa/env.h: Likewise.
20211 * font/manager.c (font_command): Changed to match argument parsing
20212 interface changes.
20213 (PUPA_MOD_INIT): Likewise.
20214 * hello/hello.c (pupa_cmd_hello): Likewise.
20215 (PUPA_MOD_INIT): Likewise.
20216 * include/pupa/disk.h: Include <pupa/device.h>.
20217 (pupa_print_partinfo): New prototype.
20218 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
20219 (pupa_dl_get_prefix): Likewise.
20220 * include/pupa/misc.h: Include <pupa/err.h>.
20221 (pupa_isgraph): New prototype.
20222 (pupa_isdigit): Likewise.
20223 (pupa_split_cmdline): Likewise.
20224 * include/pupa/normal.h: Include <pupa/arg.h>.
20225 (pupa_command): Changed the prototype of the member `func' to
20226 match the argument parsing interface. Added member `options'.
20227 (pupa_register_command): Updated to match function.
20228 (pupa_arg_parse): New prototype.
20229 (pupa_hello_init) [PUPA_UTIL]: New prototype.
20230 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
20231 (pupa_ls_init) [PUPA_UTIL]: Likewise.
20232 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
20233 (pupa_cat_init) [PUPA_UTIL]: Likewise.
20234 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
20235 (pupa_boot_init) [PUPA_UTIL]: Likewise.
20236 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
20237 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
20238 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
20239 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
20240 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
20241 * kern/disk.c: Include <pupa/file.h>.
20242 (pupa_print_partinfo): New function.
20243 * kern/dl.c: Include <pupa/env.h>.
20244 (pupa_dl_dir): Variable removed.
20245 (pupa_dl_load): Use the environment variable `prefix' instead of
20246 the variable pupa_dl_dir.
20247 (pupa_dl_set_prefix): Function removed.
20248 (pupa_dl_get_prefix): Likewise.
20249 * kern/i386/pc/init.c: Include <pupa/env.h>.
20250 (pupa_machine_init): Use the environment variable `prefix' instead of
20251 using pupa_dl_set_prefix to set the prefix.
20252 * kern/main.c: Include <pupa/env.h>.
20253 (pupa_set_root_dev): Use the environment variable `prefix' instead of
20254 using pupa_dl_get_prefix to get the prefix.
20255 * kern/misc.c: Include <pupa/env.h>.
20256 (pupa_isdigit): New function.
20257 (pupa_isgraph): Likewise.
20258 (pupa_ftoa): Likewise.
20259 (pupa_vsprintf): Added support for printing values of the type
20260 `double'. Make it possible to format variable output when using
20261 formatting like `%1.2%f'.
20262 (pupa_split_cmdline): New function.
20263 * kern/rescue.c: Include <pupa/env.h>.
20264 (next_word): Removed function.
20265 (pupa_rescue_cmd_prefix): Likewise.
20266 (pupa_rescue_cmd_set): New function.
20267 (pupa_rescue_cmd_unset): New function.
20268 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
20269 split the command line instead of splitting it here. Added
20270 support for setting variables using the syntax `foo=bar'. Don't
20271 initialize the prefix command anymore. Initialized the set and
20272 unset commands.
20273 * normal/cmdline.c: Include <pupa/env.h>.
20274 (pupa_tab_complete): Added prototypes for print_simple_completion,
20275 print_partition_completion, add_completion, iterate_commands,
20276 iterate_dev, iterate_part and iterate_dir. Moved code to print
20277 partition information from here to kern/disk.c.
fe6b695a 20278 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 20279 * normal/main.c: Include <pupa/env.h>.
20280 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
20281 instead of using pupa_dl_get_prefix to get the prefix.
20282 * term/i386/pc/vga.c: Include <pupa/arg.h>.
20283 (check_vga_mem): Cast pointers to `void *' to silence a gcc
20284 warning.
20285 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
20286 (pupa_vga_setcolor): Declare unused variables with `__attribute__
20287 ((unused))' to silence a gcc warning.
20288 (pupa_vga_setcolor): Likewise.
20289 (debug_command): Changed to match argument parsing
20290 interface changes.
20291 * util/pupa-emu.c: Include <pupa/env.h>.
20292 (options): Added 0's for unused fields to silence a gcc warning.
20293 (argp): Likewise.
20294 (main): Use the environment variable `prefix' instead of using
20295 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
20296 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
20297 and terminal.
20298
20299 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
20300 * util/misc.c: Include <malloc.h>.
20301 (pupa_malloc): Rewritten so errors are correctly reported.
20302 (pupa_realloc): Likewise.
20303 (pupa_memalign): Likewise.
20304 (pupa_mm_init_region): Declare unused variables with
20305 `__attribute__ ((unused))' to silence a gcc warning.
20306 * normal/i386/setjmp.S: Remove tab at the end of the file to
20307 silence a gcc warning.
20308 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
20309 variables with `__attribute__ ((unused))' to silence a gcc
20310 warning.
20311 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
20312 local variable i unsigned to silence a gcc warning.
20313
20314 * kern/term.c: Include <pupa/misc.h>.
20315 (pupa_more_lines): New variable.
20316 (pupa_more): Likewise.
20317 (pupa_putcode): When the pager is active pause at the end of every
20318 screen.
20319 (pupa_set_more): New function.
20320 * include/pupa/term.h (pupa_set_more): New prototype.
20321
20322
3b1139cb 203232004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
20324
20325 Now this project is GRUB 2 rather than PUPA. The location of
20326 the CVS repository was moved to GRUB's.
f19dbdb7 20327
3b1139cb 20328 * configure.ac: Use bug-grub as the reporting address.
20329 Use GRUB instead of PUPA.
20330 Change the version number to 1.90.
20331
8367695c 203322004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
20333
20334 * genkernsyms.sh: Updated copyright information.
20335 * genmk.rb: Likewise.
20336 * genmodsrc.sh: Likewise.
20337 * gensymlist.sh: Likewise.
20338 * boot/i386/pc/boot.S: Likewise.
20339 * boot/i386/pc/diskboot.S: Likewise.
20340 * disk/i386/pc/biosdisk.c: Likewise.
20341 * disk/i386/pc/partition.c: Likewise.
20342 * font/manager.c: Likewise.
20343 * fs/ext2.c: Likewise.
20344 * fs/fat.c: Likewise.
20345 * include/pupa/boot.h: Likewise.
20346 * include/pupa/device.h: Likewise.
20347 * include/pupa/disk.h: Likewise.
20348 * include/pupa/dl.h: Likewise.
20349 * include/pupa/elf.h: Likewise.
20350 * include/pupa/err.h: Likewise.
20351 * include/pupa/file.h: Likewise.
20352 * include/pupa/font.h: Likewise.
20353 * include/pupa/fs.h: Likewise.
20354 * include/pupa/kernel.h: Likewise.
20355 * include/pupa/loader.h: Likewise.
20356 * include/pupa/misc.h: Likewise.
20357 * include/pupa/mm.h: Likewise.
20358 * include/pupa/net.h: Likewise.
20359 * include/pupa/normal.h: Likewise.
20360 * include/pupa/rescue.h: Likewise.
20361 * include/pupa/setjmp.h: Likewise.
20362 * include/pupa/symbol.h: Likewise.
20363 * include/pupa/term.h: Likewise.
20364 * include/pupa/types.h: Likewise.
20365 * include/pupa/i386/setjmp.h: Likewise.
20366 * include/pupa/i386/types.h: Likewise.
20367 * include/pupa/i386/pc/biosdisk.h: Likewise.
20368 * include/pupa/i386/pc/boot.h: Likewise.
20369 * include/pupa/i386/pc/console.h: Likewise.
20370 * include/pupa/i386/pc/init.h: Likewise.
20371 * include/pupa/i386/pc/kernel.h: Likewise.
20372 * include/pupa/i386/pc/linux.h: Likewise.
20373 * include/pupa/i386/pc/loader.h: Likewise.
20374 * include/pupa/i386/pc/memory.h: Likewise.
20375 * include/pupa/i386/pc/multiboot.h: Likewise.
20376 * include/pupa/i386/pc/partition.h: Likewise.
20377 * include/pupa/i386/pc/time.h: Likewise.
20378 * include/pupa/i386/pc/vga.h: Likewise.
20379 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
20380 * include/pupa/util/getroot.h: Likewise.
20381 * include/pupa/util/misc.h: Likewise.
20382 * include/pupa/util/resolve.h: Likewise.
20383 * kern/device.c: Likewise.
20384 * kern/disk.c: Likewise.
20385 * kern/dl.c: Likewise.
20386 * kern/err.c: Likewise.
20387 * kern/file.c: Likewise.
20388 * kern/fs.c: Likewise.
20389 * kern/loader.c: Likewise.
20390 * kern/main.c: Likewise.
20391 * kern/misc.c: Likewise.
20392 * kern/mm.c: Likewise.
20393 * kern/rescue.c: Likewise.
20394 * kern/term.c: Likewise.
20395 * kern/i386/dl.c: Likewise.
20396 * kern/i386/pc/init.c: Likewise.
20397 * kern/i386/pc/lzo1x.S: Likewise.
20398 * kern/i386/pc/startup.S: Likewise.
20399 * loader/i386/pc/chainloader.c: Likewise.
20400 * loader/i386/pc/linux.c: Likewise.
20401 * loader/i386/pc/multiboot.c: Likewise.
20402 * normal/cmdline.c: Likewise.
20403 * normal/command.c: Likewise.
20404 * normal/main.c: Likewise.
20405 * normal/menu.c: Likewise.
20406 * normal/i386/setjmp.S: Likewise.
20407 * term/i386/pc/console.c: Likewise.
20408 * term/i386/pc/vga.c: Likewise.
20409 * util/console.c: Likewise.
20410 * util/genmoddep.c: Likewise.
20411 * util/misc.c: Likewise.
20412 * util/pupa-emu.c: Likewise.
20413 * util/resolve.c: Likewise.
20414 * util/unifont2pff.rb: Likewise.
20415 * util/i386/pc/biosdisk.c: Likewise.
20416 * util/i386/pc/getroot.c: Likewise.
20417 * util/i386/pc/pupa-mkimage.c: Likewise.
20418 * util/i386/pc/pupa-setup.c: Likewise.
20419
e6eced71 204202004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
20421
20422 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
20423 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
20424 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
20425 reading and reset it after reading.
20426 (pupa_ext2_close): Return PUPA_ERR_NONE.
20427
20428 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
20429 Correct value.
20430 (struct linux_kernel_header): Add kernel_version and
20431 initrd_addr_max.
20432 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
20433 pupa_file_read succeeds.
20434 (pupa_rescue_cmd_initrd): Implement.
20435
5aded270 204362003-12-03 Marco Gerards <metgerards@student.han.nl>
20437
20438 * fs/ext2.c (pupa_ext2_label): New function.
20439 (pupa_ext2_fs): Added label.
20440 * fs/fat.c (pupa_fat_label): New function.
20441 (pupa_fat_fs): Added label.
20442 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
20443
20444 * kern/misc.c (pupa_strndup): New function.
20445 * include/pupa/misc.h (pupa_strndup): New prototype.
20446
20447 * include/pupa/normal.h: Include <pupa/err.h>.
20448 (pupa_set_history): New prototype.
20449 (pupa_iterate_commands): New prototype.
20450 * normal/cmdline.c: Include <pupa/machine/partition.h>,
20451 <pupa/disk.h>, <pupa/file.h>.
20452 (hist_size): New variable.
20453 (hist_lines): Likewise.
20454 (hist_end): Likewise.
20455 (hist_used): Likewise.
20456 (pupa_set_history): New function.
20457 (pupa_history_get): Likewise.
20458 (pupa_history_add): Likewise.
20459 (pupa_history_replace): Likewise.
20460 (pupa_tab_complete): Likewise.
20461 (pupa_cmdline_run): Added tab completion and history buffer. Tab
20462 completion shows partitionnames while completing partitions, this
20463 feature was suggested by Jeff Bailey.
20464 * normal/command.c (pupa_iterate_commands): New function.
20465 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
20466 (pupa_normal_init): Initialize history buffer.
20467 (PUPA_MOD_INIT): Likewise.
20468 (pupa_normal_fini): Free the history buffer.
20469 (PUPA_MOD_FINI): Likewise.
20470
20471 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
20472 key.
20473
20474 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
20475 * configure.ac [i386]: Check for regparam bug.
20476 (NESTED_FUNC_ATTR) [! i386]: Defined.
20477
1f7315a3 204782003-11-17 Marco Gerards <metgerards@student.han.nl>
20479
20480 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
20481 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
20482 (pupa_emu_SOURCES): New variable.
20483 (pupa_emu_LDFLAGS): Likewise.
20484 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
20485 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
20486 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
20487 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
20488 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
20489 (pupa_jmp_buf): New typedef.
20490 (pupa_setjmp) [PUPA_UTIL]: New macro.
20491 (pupa_longjmp) [PUPA_UTIL]: Likewise.
20492 * include/pupa/term.h (struct pupa_term): New member `refresh'.
20493 (pupa_refresh): New prototype.
20494 * include/pupa/util/getroot.h: New file.
20495 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
20496 it.
20497 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
20498 (pupa_rescue_cmd_cat): Likewise.
20499 (pupa_rescue_cmd_ls): Likewise.
20500 (pupa_rescue_cmd_testload): Likewise.
20501 (pupa_rescue_cmd_lsmod): Likewise.
20502 * normal/cmdline.c (pupa_cmdline_get): Likewise.
20503 * normal/menu.c (run_menu): Likewise.
20504 * kern/term.c (pupa_cls): Likewise.
20505 (pupa_refresh): New function.
20506 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
20507 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
20508 * util/console.c: New file.
f19dbdb7 20509
1f7315a3 20510 * util/i386/pc/getroot.c: New file.
20511 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
20512 (pupa_putchar): New function.
20513 (pupa_refresh): Likewise.
20514 (xgetcwd): Function moved to ...
20515 (strip_extra_slashes): Likewise.
20516 (get_prefix): Likewise.
f19dbdb7 20517 * util/i386/pc/getroot.c: ... here.
1f7315a3 20518 (find_root_device): Function moved and renamed to...
20519 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
20520 Changed all callers.
20521 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
20522 and renamed to...
20523 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
20524 Changed all callers.
20525 * util/misc.c (pupa_memalign): New function.
20526 (pupa_mm_init_region): Likewise.
20527 (pupa_register_exported_symbols): Likewise.
20528 (pupa_putchar): Function removed.
20529 * util/pupa-emu.c: New file.
20530
9a5c1ade 205312003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
20532
20533 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
20534 (_multiboot_mod_SOURCES): New variable.
20535 (_multiboot_mod_CFLAGS): Likewise.
20536 * loader/i386/pc/multiboot.c: New file.
20537 * include/pupa/i386/pc/multiboot.h: Likewise.
20538 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
20539 (pupa_multiboot_real_boot): New function.
20540 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
20541 (pupa_multiboot_real_boot): New prototype.
20542 (pupa_rescue_cmd_multiboot): Likewise
20543 (pupa_rescue_cmd_module): Likewise.
20544
20545 * kern/loader.c (pupa_loader_set): Continue when
20546 pupa_loader_unload_func() fails.
20547 (pupa_loader_unset): New function.
20548 * include/pupa/loader.h (pupa_loader_unset): New prototype.
20549
20550 * kern/misc.c (pupa_stpcpy): New function.
20551 * include/pupa/misc.h (pupa_stpcpy): New prototype.
20552
8e72a9c0 205532003-11-12 Marco Gerards <metgerards@student.han.nl>
20554
20555 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
20556 for available extensions.
20557
20558 * include/pupa/i386/pc/time.h: New file.
20559 * kern/disk.c: Include <pupa/machine/time.h>.
20560 (PUPA_CACHE_TIMEOUT): New macro.
20561 (pupa_last_time): New variable.
20562 (pupa_disk_open): Flush the cache when there was a timeout.
20563 (pupa_disk_close): Reset the timer.
20564 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
20565 pupa_currticks.
20566 * util/misc.c: Include <sys/times.h>
20567 (pupa_get_rtc): New function.
20568
c4adbd32 205692003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
20570
20571 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
20572 as blocks.
20573 (pupa_ext2_get_file_block): Use blocks member.
20574
20575 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
20576 first block. Return -1 instead of pupa_errno on error.
20577
bfd30f06 205782003-10-27 Marco Gerards <metgerards@student.han.nl>
20579
20580 * README: In the pupa-mkimage example use _chain instead of chain
20581 and ext2 instead of fat.
20582 * TODO: Replace ext2fs with jfs as an example. Add an item for
20583 adding journal playback for ext2fs.
20584 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
20585 (pkgdata_MODULES): Added ext2.mod.
20586 (ext2_mod_SOURCES): New variable.
20587 (ext2_mod_CFLAGS): Likewise.
20588 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
20589 * include/pupa/misc.h (pupa_strncpy): New prototype.
20590 (pupa_strcat): Likewise.
20591 (pupa_strncmp): Likewise.
20592 * kern/misc.c (pupa_strcat): Enable function.
20593 (pupa_strncpy): New function.
20594 (pupa_strncmp): Likewise.
20595 * fs/ext2.c: New file.
f19dbdb7 20596
bfd30f06 20597 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
20598 when the read failed before retrying.
20599 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
20600 (_FILE_OFFSET_BITS): Likewise.
20601 * configure.ac: Added AC_SYS_LARGEFILE.
20602
98d15063 206032003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
20604
20605 * genmk.rb (PModule#rule): Make sure to get only symbol names
20606 from the output of nm.
20607 Reported by Robert Millan <zeratul2@wanadoo.es>.
20608
18d9c7cd 206092003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
20610
20611 I forgot to check in these changes for a long time. This adds
20612 incomplete support for VGA console, and this is still very
20613 buggy. Also, a lot of consideration is required for I18N,
20614 UNICODE, and VGA font issues. Therefore, assume that this is
20615 such that "better than nothing".
f19dbdb7 20616
18d9c7cd 20617 * font/manager.c: New file.
20618 * include/pupa/font.h: Likewise.
20619 * include/pupa/i386/pc/vga.h: Likewise.
20620 * term/i386/pc/vga.c: Likewise.
20621 * util/unifont2pff.rb: Likewise.
20622
20623 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
20624 (pkgdata_MODULES): Added vga.mod and font.mod.
20625 (vga_mod_SOURCES): New variables.
20626 (vga_mod_CFLAGS): Likewise.
20627 (font_mod_SOURCES): Likewise.
20628 (font_mod_CFLAGS): Likewise.
20629
20630 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
20631
20632 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 20633 (struct pupa_term): Added init and fini.
18d9c7cd 20634 Changed the argument of putchar to pupa_uint32_t.
20635
20636 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
20637 (pupa_console_real_putchar): New prototype.
20638 (pupa_console_putchar): Removed.
20639 (pupa_console_checkkey): Exported.
20640 (pupa_console_getkey): Likewise.
20641
20642 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
20643 characters.
20644
20645 * kern/term.c (pupa_term_set_current): Rewritten.
20646 (pupa_putchar): Likewise.
20647 (pupa_putcode): New function.
20648
20649 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
20650 (pupa_console_real_putchar): ... this.
20651 (pupa_vga_set_mode): New function.
20652 (pupa_vga_get_font): Likewise.
20653
20654 * normal/command.c: Include pupa/term.h.
20655 (terminal_command): New function.
20656 (pupa_command_init): Register the command "terminal".
20657
20658 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
20659 (DISP_UP): Likewise.
20660 (DISP_RIGHT): Likewise.
20661 (DISP_DOWN): Likewise.
20662 (DISP_HLINE): Likewise.
20663 (DISP_VLINE): Likewise.
20664 (DISP_UL): Likewise.
20665 (DISP_UR): Likewise.
20666 (DISP_LL): Likewise.
20667 (DISP_LR): Likewise.
20668
20669 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 20670
977329f5 206712003-02-08 NIIBE Yutaka <gniibe@m17n.org>
20672
20673 * util/resolve.c (pupa_util_resolve_dependencies): BUG
20674 FIX. Reverse the path_list.
20675
20676 * include/pupa/normal.h: Export pupa_register_command and
20677 pupa_unregister_command.
20678
20679 * hello/hello.c (pupa_cmd_hello): New module.
20680 * conf/i386-pc.rmk: Added hello.mod.
20681
1f5ab428 206822003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
20683
20684 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 20685
1f5ab428 20686 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
20687 (compress_kernel): New variable.
20688 (generate_image): Heavily modified to support compressing a
20689 large part of the core image.
20690
20691 * util/misc.c (pupa_util_read_image): Fix a file descriptor
20692 leak.
20693 (pupa_util_load_image): New function.
20694
20695 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
20696 (pupa_compressed_size): New variable.
20697 (codestart): Enable Gate A20 here.
20698 Decompress the compressed part of the core image.
20699 Rearrange the code to put functions and variables which are
20700 required for initialization in the non-compressed part.
20701 Include lzo1x.S.
20702
20703 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
20704 here.
20705
20706 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
20707
f19dbdb7 20708 * include/pupa/i386/pc/kernel.h
1f5ab428 20709 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
20710 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
20711 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20712 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20713 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
20714
20715 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
20716
20717 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
20718 (Utility#rule): Likewise.
20719
20720 * configure.ac: Check if LZO is available.
20721
ce5bf700 207222003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
20723
20724 * include/pupa/normal.h: New file.
20725 * include/pupa/setjmp.h: Likewise.
20726 * include/pupa/i386/setjmp.h: Likewise.
20727 * normal/cmdline.c: Likewise.
20728 * normal/command.c: Likewise.
20729 * normal/main.c: Likewise.
20730 * normal/menu.c: Likewise.
20731 * normal/i386/setjmp.S: Likewise.
f19dbdb7 20732
ce5bf700 20733 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
20734 (pupa_rescue_cmd_initrd): Likewise.
20735
20736 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
20737 Likewise.
20738
20739 * kern/i386/pc/startup.S (translation_table): New variable.
20740 (translate_keycode): New function.
20741 (pupa_console_getkey): Call translate_keycode.
20742
20743 * kern/rescue.c (attempt_normal_mode): New function.
20744 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
20745 it failed, print a message.
20746
20747 * kern/mm.c (pupa_real_malloc): Print more information when a
20748 free magic is broken.
20749 (pupa_free): If the first free header is not free actually, set
20750 it to P.
20751
20752 * kern/main.c (pupa_load_normal_mode): Just load the module
20753 "normal".
20754 (pupa_main): Don't print the message
20755 "Entering into rescue mode..." here.
20756
20757 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
20758 Declared.
20759 (pupa_rescue_cmd_initrd): Likewise.
20760 (pupa_rescue_cmd_initrd): Likewise.
20761
20762 * include/pupa/symbol.h (FUNCTION): Specify the type.
20763 (VARIABLE): Likewise.
20764
20765 * include/pupa/err.h (pupa_err_t): Added
20766 PUPA_ERR_UNKNOWN_COMMAND.
20767
20768 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
20769 (pupa_dl_get_prefix): Likewise.
20770
20771 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
20772 Added _chain.mod and _linux.mod instead of chain.mod and
20773 linux.mod.
20774 (chain_mod_SOURCES): Renamed to ...
20775 (_chain_mod_SOURCES): ... this.
20776 (chain_mod_CFLAGS): Renamed to ...
20777 (_chain_mod_CFLAGS): ... this.
20778 (linux_mod_SOURCES): Renamed to ...
20779 (_linux_mod_SOURCES): ... this.
20780 (linux_mod_CFLAGS): Renamed to ...
20781 (_linux_mod_CFLAGS): ... this.
20782 (normal_mod_SOURCES): New variable.
20783 (normal_mod_CFLAGS): Likewise.
20784 (normal_mod_ASFLAGS): Likewise.
20785
207862003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
20787
20788 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
20789 possible.
20790
fe6b695a 20791 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 20792 recursively.
20793 (pupa_dl_unref): Unrefer depending modules recursively.
20794 Don't call pupa_dl_unload implicitly, because PUPA can crash if
20795 a module is unloaded before one depending on that module is
20796 unloaded.
20797 (pupa_dl_unload): Unload depending modules explicitly,
20798 if possible.
20799
c04da074 208002003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
20801
20802 * include/pupa/i386/pc/linux.h: New file.
20803 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 20804
c04da074 20805 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
20806 Removed.
20807 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
20808 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
20809 of PUPA_CHAINLOADER_BOOT_SECTOR.
20810
20811 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
20812 (pupa_linux_prot_size): New variable.
20813 (pupa_linux_tmp_addr): Likewise.
20814 (pupa_linux_real_addr): Likewise.
20815 (pupa_linux_boot_zimage): New function.
20816 (pupa_linux_boot_bzimage): Likewise.
20817
20818 * kern/i386/pc/init.c (struct mem_region): New structure.
20819 (MAX_REGIONS): New macro.
20820 (mem_regions): New variable.
20821 (num_regions): Likewise.
20822 (pupa_os_area_addr): Likewise.
20823 (pupa_os_area_size): Likewise.
20824 (pupa_lower_mem): Likewise.
20825 (pupa_upper_mem): Likewise.
20826 (add_mem_region): New function.
20827 (compact_mem_regions): Likewise.
20828 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
20829 the size of the conventional memory and that of so-called upper
20830 memory (before the first memory hole).
20831 Instead of adding each found region to free memory, use
20832 add_mem_region and add them after removing overlaps.
20833 Also, add only 1/4 of the upper memory to free memory. The rest
20834 is used for loading OS images. Maybe this is ad hoc, but this
20835 makes it much easier to relocate OS images when booting.
20836
20837 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
20838 (pupa_enter_rescue_mode): Don't register initrd and module.
20839
20840 * kern/mm.c: Include pupa/dl.h.
20841
20842 * kern/main.c: Include pupa/file.h and pupa/device.h.
20843
20844 * kern/loader.c (pupa_loader_load_module_func): Removed.
20845 (pupa_loader_load_module): Likewise.
20846
20847 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
20848 ``.o''.
20849
20850 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
20851 (pupa_linux_tmp_addr): Likewise.
20852 (pupa_linux_real_addr): Likewise.
20853 (pupa_linux_boot_zimage): Likewise.
20854 (pupa_linux_boot_bzimage): Likewise.
20855
20856 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
20857 (pupa_upper_mem): Likewise.
20858 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
20859 module is too dangerous.
20860
20861 * include/pupa/loader.h (pupa_os_area_addr): Declared.
20862 (pupa_os_area_size): Likewise.
20863 (pupa_loader_set): Remove the first argument. Loader doesn't
20864 manage modules or initrd any longer.
20865 (pupa_loader_load_module): Removed.
20866
20867 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
20868 (linux_mod_SOURCES): New variable.
20869 (linux_mod_CFLAGS): Likewise.
20870
a13f9237 208712003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
20872
20873 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
20874 the length of a blocklist correctly.
20875
20876 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
20877 Use ioctl only if the OS file is a block device.
20878 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
20879 not very useful for normal files.
20880
20881 * kern/main.c (pupa_set_root_dev): New function.
20882 (pupa_load_normal_mode): Likewise.
20883 (pupa_main): Call those above.
20884
20885 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
20886 pupa_uint16_t.
20887
20888 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
20889
a5ffe966 208902003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
20891
20892 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
20893 (setup): Configure the installed partition information and the
20894 dl prefix.
20895
20896 * loader/i386/pc/chainloader.c (my_mod): New variable.
20897 (pupa_chainloader_unload): New function.
20898 (pupa_rescue_cmd_chainloader): Refer itself.
20899 (PUPA_MOD_INIT): Save its own module in MY_MOD.
20900
20901 * kern/i386/pc/startup.S (install_partition): Removed.
20902 (version_string): Likewise.
20903 (config_file): Likewise.
20904 (pupa_install_dos_part): New variable.
20905 (pupa_install_bsd_part): Likewise.
20906 (pupa_prefix): Likewise.
20907 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
20908
20909 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
20910 and pupa/misc.h.
20911 (make_install_device): New function.
20912 (pupa_machine_init): Set the dl prefix.
20913
20914 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
20915 (buf): Renamed to ...
20916 (linebuf): ... this.
20917 (pupa_rescue_cmd_prefix): New function.
20918 (pupa_rescue_cmd_insmod): Likewise.
20919 (pupa_rescue_cmd_rmmod): Likewise.
20920 (pupa_rescue_cmd_lsmod): Likewise.
20921 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
20922 rmmod and lsmod.
20923
20924 * kern/mm.c (pupa_memalign): If failed even after invalidating
20925 disk caches, unload unneeded modules and retry.
20926
20927 * kern/misc.c (pupa_memmove): New function.
20928 (pupa_memcpy): Removed.
20929 (pupa_strcpy): New function.
20930 (pupa_itoa): Made static.
20931
20932 * kern/dl.c (pupa_dl_iterate): New function.
20933 (pupa_dl_ref): Likewise.
20934 (pupa_dl_unref): Likewise.
20935 (pupa_dl_unload): Return if succeeded or not.
20936 (pupa_dl_unload_unneeded): New function.
20937 (pupa_dl_unload_all): Likewise.
20938 (pupa_dl_init): Renamed to ...
20939 (pupa_dl_set_prefix): ... this.
20940 (pupa_dl_get_prefix): New function.
20941
20942 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
20943 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
20944 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20945 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20946 (pupa_install_dos_part): Declared.
20947 (pupa_install_bsd_part): Likewise.
20948 (pupa_prefix): Likewise.
20949 (pupa_boot_drive): Likewise.
20950
20951 * include/pupa/types.h: Fix a typo.
20952
20953 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
20954 pupa_memmove.
20955 (pupa_memmove): Declared.
20956 (pupa_strcpy): Likewise.
20957
20958 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
20959 pupa_mod_init takes one argument, its own module.
20960 (pupa_dl_unload_unneeded): Declared.
20961 (pupa_dl_unload_all): Likewise.
20962 (pupa_dl_ref): Likewise.
20963 (pupa_dl_unref): Likewise.
20964 (pupa_dl_iterate): Likewise.
20965 (pupa_dl_init): Renamed to ...
20966 (pupa_dl_set_prefix): ... this.
20967 (pupa_dl_get_prefix): Declared.
20968
20969 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 20970 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 20971 unloaded.
20972 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
20973 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
20974
20975 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
20976 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
20977
012d7999 209782003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
20979
20980 * util/i386/pc/pupa-setup.c (setup): Define the internal
20981 function find_first_partition_start at the top level, because GCC
20982 3.0.x cannot compile internal functions in deeper scopes
20983 correctly.
20984 (find_root_device): Use lstat instead of stat.
20985 Don't follow symbolic links.
20986 Fix the path-constructing code.
20987
20988 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
20989 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
20990 by a BLKGETSIZE ioctl first, because block devices don't fill
20991 the member st_mode of the structure stat on Linux.
20992 [__linux__] (linux_find_partition): Use a temporary buffer
20993 REAL_DEV for the working space. Copy it to DEV before returning.
20994 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
20995 buffer cache consistent.
20996 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
20997 strncmp. The previous value was merely wrong.
20998 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
20999
21000 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
21001 FAT size is 12. The previous value was merely wrong.
21002
21003 * kern/main.c (pupa_main): Don't split the starting message from
21004 newlines.
21005
21006 * kern/term.c (pupa_putchar): Put CR after LF instead of before
21007 LF, because BIOS goes crazy about character attributes in this
21008 case.
21009
1cc73a62 210102003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
21011
21012 * include/i386/pc/util/biosdisk.h: New file.
21013 * util/i386/pc/biosdisk.c: Likewise.
21014 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 21015
1cc73a62 21016 * Makefile.in (INCLUDE_DISTFILES): Added
21017 include/pupa/i386/pc/util/biosdisk.h.
21018 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
21019 directory util/i386/pc.
21020 (install-local): Added a rule for sbin_UTILITIES.
21021 (uninstall): Likewise.
21022
21023 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
21024
21025 * util/misc.c (xrealloc): New function.
21026 (pupa_malloc): Likewise.
21027 (pupa_free): Likewise.
21028 (pupa_realloc): Likewise.
21029 (pupa_stop): Likewise.
21030 (pupa_putchar): Likewise.
21031
21032 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
21033
21034 * include/pupa/util/misc.h (xrealloc): Declared.
21035
21036 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
21037 macro.
21038 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
21039 (PUPA_BOOT_MACHINE_BPB_END): ... this.
21040
21041 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
21042 [PUPA_UTIL] (pupa_fat_fini): Likewise.
21043
21044 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
21045 way should be implemented.
21046 [PUPA_UTIL] (pupa_fat_fini): Likewise.
21047
21048 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
21049 the size of NAME for safety.
21050 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
21051 0x88.
21052
21053 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
21054 (pupa_setup_SOURCES): Likewise.
21055
21056 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
21057
08b70fe8 210582002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
21059
21060 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
21061 bunch of pushl's from pusha, because this destroys the return
21062 value.
21063
62ddcc8f 210642002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
21065
21066 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
21067 This means that any missing prototypes could be fatal. Also, you
21068 must take care when writing assembly code. See the comments at
21069 the beginning of startup.S, for more details.
f19dbdb7 21070
62ddcc8f 21071 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
21072 compilation mechanism.
21073 (pupa_chainloader_real_boot): Likewise.
21074 (pupa_biosdisk_rw_int13_extensions): Likewise.
21075 (pupa_biosdisk_rw_standard): Likewise.
21076 (pupa_biosdisk_check_int13_extensions): Likewise.
21077 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
21078 (pupa_biosdisk_get_diskinfo_standard): Likewise.
21079 (pupa_get_memsize): Likewise.
21080 (pupa_get_mmap_entry): Likewise.
21081 (pupa_console_putchar): Likewise.
21082 (pupa_console_setcursor): Likewise.
21083 (pupa_getrtsecs): Use pushl instead of push.
21084
21085 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
21086 memory instead of the stack for a mmap entry, because some
21087 BIOSes may ignore the maximum size and overflow.
21088
21089 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
21090
21091 * genmk.rb (PModule#rule): Compile automatically generated
21092 sources with module-specific CFLAGS as well as other sources.
21093
9962ed99 210942002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
21095
21096 * configure.ac: Check ld.
21097 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
21098 respectively, before checking endianness and sizes.
21099
21100 * Makefile.in (LD): New variable.
f19dbdb7 21101
abdfc3c5 211022002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
21103
21104 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
21105
6a161fa9 211062002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
21107
21108 * Changelog: New file.
21109