]> git.proxmox.com Git - grub2.git/blame - ChangeLog
Merge pciaccess branch
[grub2.git] / ChangeLog
CommitLineData
2a3aa4d5
RM
12009-12-11 Vladimir Serbinenko <phcoder@gmail.com>
2
3 libpciaccess support.
4
5 * Makefile.in (LIBPCIACCESS): New variable.
6 (enable_grub_emu_pci): Likewise.
7 * conf/any-emu.rmk (grub_emu_SOURCES) [enable_grub_emu_pci]: Add
8 util/pci.c and commands/lspci.c.
9 (grub_emu_LDFLAGS) [enable_grub_emu_pci]: Add $(LIBPCIACCESS).
10 * configure.ac (grub-emu-pci): New option.
11 * include/grub/i386/pci.h (grub_pci_device_map_range): New function.
12 (grub_pci_device_unmap_range): Likewise.
13 * include/grub/pci.h [GRUB_UTIL]: Include grub/pciutils.h.
14 (grub_pci_device) [!GRUB_UTIL]: New structure. All users updated.
15 (grub_pci_address_t) [!GRUB_UTIL]: New type.
16 (grub_pci_device_t) [!GRUB_UTIL]: Likewise.
17 (grub_pci_get_bus) [!GRUB_UTIL]: New function.
18 (grub_pci_get_device) [!GRUB_UTIL]: Likewise.
19 (grub_pci_get_function) [!GRUB_UTIL]: Likewise.
20 * include/grub/pciutils.h: New file.
21 * util/pci.c: Likewise.
22
8d0502d9
FZ
232009-12-11 Felix Zielcke <fzielcke@z-51.de>
24
25 * util/misc.c: Don't include <errno.h> twice.
26
0d56ed64
FZ
272009-12-10 Felix Zielcke <fzielcke@z-51.de>
28
29 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Show the disk
30 name in an error message.
31 (grub_biosdisk_rw): Likewise.
32
2e59983c
VS
332009-12-10 Vladimir Serbinenko <phcoder@gmail.com>
34
35 Eliminate NTFS 4Gib barrier.
36
37 * fs/ntfs.c (read_attr): Use grub_disk_addr_t and grub_size_t.
38 (read_run_data): Likewise.
39 (grub_ntfs_read_run_list): Likewise.
40 (grub_ntfs_read_block): Likewise.
41 (grub_ntfs_iterate_dir): Likewise.
42 (read_mft): Likewise.
43 (read_data): Likewise.
44 Use COM_LOG_LEN.
45 * fs/ntfscomp.c (read_block): Cast ctx->target_vcn & 0xF to unsigned
46 to avoid 64-bit division
47 * include/grub/ntfs.h (COM_LOG_LEN): New definition.
48 (grub_ntfs_rlst): Use grub_disk_addr_t.
49
71ee178a
VS
502009-12-10 Vladimir Serbinenko <phcoder@gmail.com>
51
52 Eliminate grub-fstest 4Gib barrier.
53
54 * util/grub-fstest.c (skip, leng): Use grub_disk_addr_t.
55 (read_file): Fix error reporting.
56
2520d4b8
VS
572009-12-10 Vladimir Serbinenko <phcoder@gmail.com>
58
59 Eliminate hexdump 4Gib barrier.
60
61 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_addr_t.
62 * lib/arg.c (grub_arg_parse): Use grub_strtoull.
63
e1f27065
VS
642009-12-10 Vladimir Serbinenko <phcoder@gmail.com>
65
66 * kern/device.c (grub_device_iterate): Ignore errors during first scan.
67 Fixes amarsh bug.
68
1a0f7f45
RM
692009-12-09 Bruce Dubbs <bruce.dubbs@gmail.com>
70
71 Remove miscellaneous files in distclean target.
72
73 * Makefile.in: Remove docs/{grub.info,version.texi,stamp-vti}
74
c631d9fb
CW
752009-12-09 Colin Watson <cjwatson@ubuntu.com>
76
77 * util/grub-mkconfig_lib.in: Don't set grub_probe or grub_mkrelpath
78 if they're already set. This resolves the conflict between my
79 grub-install change on 2009-10-06 and Felix' change on 2009-11-11,
80 fixing the --grub-probe option again.
81 * util/sparc64/ieee1275/grub-install.in: Revert the last piece of my
82 change on 2009-10-06, so that we now once again source
83 `${libdir}/grub/grub-mkconfig_lib' after options have been parsed.
84
7c7b6106
RM
852009-12-08 Robert Millan <rmh.grub@aybabtu.com>
86
87 * conf/common.rmk [sparc64-ieee1275] (grub_mkdevicemap_SOURCES): Use
88 `util/ieee1275/ofpath.c' and `util/ieee1275/devicemap.c' instead of
89 `util/devicemap.c'.
90
e3069ec1
CPE
912009-12-08 Carles Pina i Estany <carles@pina.cat>
92
93 * include/grub/misc.h (grub_printf_): New declaration.
94 * kern/misc.c (grub_printf_): New definition.
95 * normal/main.c (grub_normal_reader_init): Use `grub_printf_' and `N_'
96 instead of `grub_printf' and `_'.
97 * normal/menu_entry.c (store_completion): Likewise.
98 (run): Likewise.
99 (grub_menu_entry_run): Likewise.
100 * normal/menu_text.c (grub_wait_after_message): Likewise.
101 (notify_booting): Likewise.
102 (notify_fallback): Likewise.
103 (notify_execution_failure): Likewise.
104
d6ceebf1
CW
1052009-12-07 Colin Watson <cjwatson@ubuntu.com>
106
107 * configure.ac: Check for vasprintf.
108 * util/misc.c (asprintf): Move allocation from here ...
109 (vasprintf): ... to here. New function.
110 (xasprintf): New function.
111 * include/grub/util/misc.h (vasprintf, xasprintf): Add
112 prototypes.
113 * util/getroot.c (grub_util_get_grub_dev): Use xasprintf.
114 * util/grub-mkfont.c (write_font): Likewise.
115 * util/grub-probe.c (probe): Likewise.
116 * util/hostdisk.c (make_device_name): Likewise.
117
de6daa8b
DM
1182009-12-06 David S. Miller <davem@sunset.davemloft.net>
119
120 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Recognize
121 anything even prefixed with 'cdrom' as a cdrom.
122
df91e679
FZ
1232009-12-06 Felix Zielcke <fzielcke@z-51.de>
124
125 * util/misc.c (make_system_path_relative_to_its_root): Correctly cope with
126 mount points.
127
98d3dc02
CPE
1282009-12-05 Carles Pina i Estany <carles@pina.cat>
129
130 * gettext/gettext.c: Include `<grub/list.h>'. Define grub_gettext_msg,
131 grub_gettext_msg_list.
132 (grub_gettext_gettranslation_from_position): Return const char *
133 and not char *.
134 (grub_gettext_translate): Add the translated strings into a list,
135 returns from the list if existing there.
136 (grub_gettext_init_ext): Add \n at the end of grub_dprintf string.
137 (grub_gettext_delete_list): Delete the list.
138 (grub_gettext_env_write_lang): Call grub_gettext_delete_list when
139 lang environment variable is changed.
140 (GRUB_MOD_FINI): Call grub_gettext_delete_list.
141
b283f108
VS
1422009-12-05 Vladimir Serbinenko <phcoder@gmail.com>
143
144 Rename kernel.mod to kernel.img.
145
146 * conf/i386-efi.rmk (pkglib_MODULES): Change kernel.mod to kernel.img.
147 (kernel_mod_EXPORTS): Rename to ...
148 (kernel_img_EXPORTS): ... this.
149 (kernel_mod_SOURCES): Rename to ...
150 (kernel_img_SOURCES): ... this.
151 (kernel_mod_HEADERS): Rename to ...
152 (kernel_img_HEADERS): ... this. All users updated.
153 (kernel_mod_CFLAGS): Rename to ...
154 (kernel_img_CFLAGS): ... this.
155 (kernel_mod_ASFLAGS): Rename to ...
156 (kernel_img_ASFLAGS): ... this.
157 (kernel_mod_LDFLAGS): Rename to ...
158 (kernel_img_LDFLAGS): ... this.
159 * conf/x86_64-efi.rmk: Likewise.
160 * util/i386/efi/grub-mkimage.c (read_kernel_module): Rename to ...
161 (read_kernel_image): ... this. All users updated.
162 (read_kernel_image): Read "kernel.img" instead of "kernel.mod".
163
69055f8a
CPE
1642009-12-05 Carles Pina i Estany <carles@pina.cat>
165
166 * normal/menu_text.c (grub_color_menu_high): Gettexttize string.
167 (print_spaces): New function.
168 (grub_print_ucs4): New function.
169 (getstringwidth): New function.
170 (print_message_indented): New function.
171 (print_message): Gettexttize strings using print_message_indented.
172 (run_menu): Replaces grub_printf by print_spaces and dynamic terminal
173 width.
174 (get_entry_number): Gettextize and uses dynamic terminal width.
175 (notify_booting, notify_fallback, notify_execution_failure):
176 Gettextize.
177 * normal/menu_entry.c (store_completion): Cleanup the gettextized
178 string.
179 (run): Likewise.
180 (grub_menu_entry_run): Likewise.
181 * PO/POTFILES: Add normal/menu_entry.c.
182
f616f51c
VS
1832009-12-05 Vladimir Serbinenko <phcoder@gmail.com>
184
185 * configure.ac (TARGET_ASFLAGS): Add "-D<MACHINE>".
186
57bbe3be
CPE
1872009-12-05 Carles Pina i Estany <carles@pina.cat>
188
189 * util/grub-install.in: Install gettext .mo files.
190 * util/grub-mkrescue.in (process_input_dir): Copy gettext .mo files.
191
013d67a1
CPE
1922009-12-05 Carles Pina i Estany <carles@pina.cat>
193
194 * gettext/gettext.c (grub_gettext_init_ext): Replace grub_printf with
195 grub_dprintf.
196
fb954db0
RM
1972009-12-05 Robert Millan <rmh.grub@aybabtu.com>
198
199 * kern/ieee1275/openfw.c (grub_reboot): Disable for i386. The
200 non-firmware-dependant one in realmode.S takes precedence.
201
6b8474f8
RM
2022009-12-04 Robert Millan <rmh.grub@aybabtu.com>
203
204 * commands/halt.c: Replace misc arch-specific headers with
205 `<grub/misc.h>'.
206 * commands/reboot.c: Likewise.
207 * commands/i386/pc/halt.c: Replace `<grub/machine/init.h>' with
208 `<grub/misc.h>'.
209 * conf/i386-coreboot.rmk (kernel_img_HEADERS): Remove `cpu/reboot.h'.
210 (halt_mod_SOURCES): Move `kern/i386/halt.c' from here ...
211 (kernel_img_SOURCES): ... to here.
212
213 * include/grub/efi/efi.h (grub_reboot, grub_halt): Remove prototypes.
214 * include/grub/i386/pc/init.h: Likewise.
215 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
216 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
217
218 * include/grub/misc.h (grub_reboot, grub_halt): New prototypes.
219
220 * include/grub/i386/halt.h: Remove.
221 * include/grub/i386/reboot.h: Likewise.
222
223 * kern/i386/halt.c: Remove `<grub/cpu/halt.h>'.
224
4b2e6ca2
DM
2252009-12-03 David S. Miller <davem@sunset.davemloft.net>
226
227 * conf/sparc64-ieee1275.rmk (grub_mkimage_SOURCES,
228 grub_setup_SOURCES, grub_ofpathname_SOURCES): Add gnulib/progname.c
229 * util/sparc64/ieee1275/grub-mkimage.c: Include <grub/i18n.h> and
230 "progname.h"
231 * util/sparc64/ieee1275/grub-ofpathname.c: Likewise.
232 * util/sparc64/ieee1275/grub-setup.c: Likewise.
233 (usage): Add missing comma in printf.
234
5239348f
RM
2352009-12-02 Robert Millan <rmh.grub@aybabtu.com>
236
237 Use the same reboot approach on i386 coreboot and qemu as we do on
238 BIOS.
239
240 * conf/i386-coreboot.rmk (kernel_img_HEADERS): Add `cpu/reboot.h'.
241 (reboot_mod_SOURCES): Remove `kern/i386/reboot.c'.
242 * kern/i386/reboot.c: Remove.
243 * include/grub/i386/reboot.h (grub_reboot): Export function.
244 * kern/i386/pc/startup.S (grub_reboot): Move from here ...
245 * kern/i386/realmode.S (grub_reboot): ... to here. Jump to
246 0xf000:0xfff0 instead of 0xffff:0x0000.
247 [!GRUB_MACHINE_PCBIOS] (prot_to_real): Do not restore interrupts.
248 * kern/i386/qemu/startup.S: Include `"../realmode.S"'.
249
ef34cbd4
RM
2502009-11-30 Robert Millan <rmh.grub@aybabtu.com>
251
252 Fix $srcdir != $objdir build.
253
254 * Makefile.in (po/%.po): Rewrite as ...
255 ($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po)): ... this.
256
dc9837ea
ST
2572009-11-29 Samuel Thibault <samuel.thibault@ens-lyon.org>
258
259 Fix GNU/Hurd grub-install crash.
260 * util/grub-probe.c (probe): Try to access `path' only when it is not
261 NULL.
262
2f857f98
VS
2632009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
264
265 Correct module naming.
266
267 * video/efi_uga.c (GRUB_MOD_INIT(efi_fb)): Renamed from this ...
268 (GRUB_MOD_INIT(efi_uga)): ... to this
269 (GRUB_MOD_FINI(efi_fb)): Renamed from this ...
270 (GRUB_MOD_FINI(efi_uga)): ... to this
271 * video/efi_gop.c (GRUB_MOD_INIT(efi_fb)): Renamed from this ...
272 (GRUB_MOD_INIT(efi_gop)): ... to this
273 (GRUB_MOD_FINI(efi_fb)): Renamed from this ...
274 (GRUB_MOD_FINI(efi_gop)): ... to this
275
c5448046
RM
2762009-11-28 Robert Millan <rmh.grub@aybabtu.com>
277
278 * util/mkisofs/mkisofs.c (ld_options): Mark all `arg' strings as
279 translatable.
280 (usage): Translate `arg' strings using gettext().
281 Thanks to Jordi Mallach for the suggestion.
282
c85184ad
VS
2832009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
284
285 GOP support. Based on patch from Bean
286 (http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00384.html)
287
288 * video/efi_gop.c: New file.
289 * include/grub/efi/graphics_output.h: Likewise.
290 * conf/i386-efi.rmk (pkglib_MODULES): Add `efi_gop.mod'.
291 (efi_fb_mod_SOURCES, efi_fb_mod_CFLAGS, efi_fb_mod_LDFLAGS): New
292 variables.
293 * conf/x86_64-efi.rmk: Likewise.
294
8a4c48d8
VS
2952009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
296
297 Rename efi_fb to efi_uga.
298
299 * conf/i386-efi.rmk (pkglib_MODULES): Rename 'efi_fb.mod' to
300 'efi_uga.mod'.
301 (efi_fb_mod_SOURCES): Rename this ...
302 (efi_uga_mod_SOURCES): ... to this.
303 (efi_fb_mod_CFLAGS): Rename this ...
304 (efi_uga_mod_CFLAGS): ... to this.
305 (efi_fb_mod_LDFLAGS): Rename this ...
306 (efi_uga_mod_LDFLAGS): ... to this.
307 * conf/x86_64-efi.rmk (pkglib_MODULES): Rename 'efi_fb.mod' to
308 'efi_uga.mod'.
309 (efi_fb_mod_SOURCES): Rename this ...
310 (efi_uga_mod_SOURCES): ... to this.
311 (efi_fb_mod_CFLAGS): Rename this ...
312 (efi_uga_mod_CFLAGS): ... to this.
313 (efi_fb_mod_LDFLAGS): Rename this ...
314 (efi_uga_mod_LDFLAGS): ... to this.
315 * video/efi_fb.c: Move this ...
316 * video/efi_uga.c: ... to this. Change prefix to 'grub_video_uga_'.
317
fb6c1a7b
RM
3182009-11-27 Robert Millan <rmh.grub@aybabtu.com>
319
320 * po/README: New file. Explain our PO file workflow.
321
3bc7896c
RM
3222009-11-27 Robert Millan <rmh.grub@aybabtu.com>
323
324 * po/ChangeLog: Remove. Move relevant entries back to ...
325 * ChangeLog: ... here.
326 * po/ca.po: Remove (now handled by TLP).
327 * po/id.po: Likewise.
328 * po/zh_CN.po: Likewise.
329 * Makefile.in (LINGUAS): Initialize in a way that supports
330 empty set.
331
9ed4841d
RM
3322009-11-27 Robert Millan <rmh.grub@aybabtu.com>
333
334 * Makefile.in (LINGUAS): Rewrite by scanning po/ directory instead of
335 reliing on po/LINGUAS.
336 ($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po)): Rewrite as ...
337 (po/%.po): ... this.
338
242668a2
FZ
3392009-11-26 Felix Zielcke <fzielcke@z-51.de>
340
341 * util/i386/efi/grub-mkimage.c: Include "progname.h".
342 (main): Use `program_name' instead of nonexistent `progname'.
343
e30dd392
FZ
3442009-11-26 Felix Zielcke <fzielcke@z-51.de>
345
346 * conf/i386-efi.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
347 * conf/x86_64-efi.rmk (grub_mkimage_SOURCES): Likewise.
348
7656de4f
RM
3492009-11-26 Robert Millan <rmh.grub@aybabtu.com>
350
351 * conf/i386-coreboot.rmk: Cleanup stale filenames from my previous
352 commit.
353 * conf/i386-efi.rmk: Likewise.
354 * conf/i386-ieee1275.rmk: Likewise.
355 * conf/powerpc-ieee1275.rmk: Likewise.
356 * conf/sparc64-ieee1275.rmk: Likewise.
357 * conf/x86_64-efi.rmk: Likewise.
358
db77c4d4
FZ
3592009-11-26 Felix Zielcke <fzielcke@z-51.de>
360
361 * conf/any-emu.rmk (grub_emu_SOURCES): Add `gnulib/progname.c'.
362
a755bb04
FZ
3632009-11-26 Felix Zielcke <fzielcke@z-51.de>
364
365 * conf/any-emu.rmk (grub_mkfont_SOURCES): Add `gnulib/progname.c'.
366
8a4c07fd
RM
3672009-11-26 Robert Millan <rmh.grub@aybabtu.com>
368
369 * conf/common.rmk (sbin_UTILITIES): Add `grub-mkdevicemap'.
370 (grub_mkdevicemap_SOURCES): New variable.
371 (grub_probe_SOURCES, grub_fstest_SOURCES, grub_mkfont_SOURCES)
372 (grub_mkrelpath_SOURCES, grub_editenv_SOURCES)
373 (grub_pe2elf_SOURCES): Add `gnulib/progname.c'.
374 * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-mkdevicemap'.
375 (grub_mkdevicemap_SOURCES): Remove.
376 * conf/i386-efi.rmk: Likewise.
377 * conf/i386-ieee1275.rmk: Likewise.
378 * conf/i386-pc.rmk: Likewise.
379 * conf/powerpc-ieee1275.rmk: Likewise.
380 * conf/sparc64-ieee1275.rmk: Likewise.
381 * conf/x86_64-efi.rmk: Likewise.
382 * util/elf/grub-mkimage.c: Include `<grub/i18n.h>' and `"progname.h"'.
383 (usage): Fix strings to use `program_name'.
384 (main): Initialize gettext.
385 * util/grub-editenv.c: Likewise.
386 * util/grub-emu.c: Likewise.
387 * util/grub-fstest.c: Likewise.
388 * util/grub-mkdevicemap.c: Likewise.
389 * util/grub-mkfont.c: Likewise.
390 * util/grub-mkrelpath.c: Likewise.
391 * util/grub-pe2elf.c: Likewise.
392 * util/grub-probe.c: Likewise.
393 * util/sparc64/ieee1275/grub-mkimage.c: Likewise.
394 * util/sparc64/ieee1275/grub-ofpathname.c: Likewise.
395 * util/sparc64/ieee1275/grub-setup.c: Likewise.
396
397 * util/misc.c: Include `"progname.h"'.
398 (progname): Remove variable.
399 (grub_util_warn, grub_util_info, grub_util_error): Use `program_name'.
400
6f61ed55
FZ
4012009-11-25 Felix Zielcke <fzielcke@z-51.de>
402
403 * util/grub.d/10_linux.in (linux_entry): Quote the arguments to
404 printf and print a newline after the menuentry header line.
405 * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
406
f022876b
FZ
4072009-11-25 Felix Zielcke <fzielcke@z-51.de>
408
409 autoconf >= 2.60 support $(localedir).
410
411 * INSTALL: Note that autoconf 2.60 is required.
412 * configure.ac (AC_PREREQ): Bump to 2.60.
413 * util/grub.d/10_kfreebsd.in (TEXTDOMAINDIR): Set to lowercased @localedir@.
414 * util/grub.d/10_linux.in (TEXTDOMAINDIR): Likewise.
415
6717926e
YB
4162009-11-25 Yves Blusseau <yves.blusseau@zetam.org>
417
418 * configure.ac: move the call to AM_GNU_GETTEXT to avoid warnings when
419 aclocal is run.
420
08806a54
RM
4212009-11-25 Robert Millan <rmh.grub@aybabtu.com>
422
423 * normal/main.c (grub_normal_read_line): Fix off-by-one
424 buffer overflow.
425
13b33fba
RM
4262009-11-25 Robert Millan <rmh.grub@aybabtu.com>
427
428 * normal/main.c (grub_normal_execute): Replace "parser.sh" with
429 "parser.grub" in grub_command_execute() call.
430
4a8572e9
CPE
4312009-11-24 Carles Pina i Estany <carles@pina.cat>
432
433 * conf/i386-coreboot.rmk (kernel_img_HEADERS): Add i18n.h.
434 * conf/i386-efi.rmk: Likewise.
435 * conf/i386-ieee1275.rmk: Likewise.
436 * conf/i386-pc.rmk: Likewise.
437 * conf/powerpc-ieee1275.rmk: Likewise.
438 * conf/sparc64-ieee1275.rmk: Likewise.
439 * conf/x86_64-efi.rmk: Likewise.
440 * gettext/gettex.c: Include <grub/i18n.h>.
441 * include/grub/misc.h (grub_gettext_dummy, grub_gettext): Move from
442 here ...
443 * include/grub/i18n.h: ... to here
444 * include/grub/i18n.h: ... to here.
445 * kern/misc.c: Include <grub/i18n.h>
446 (grub_gettext_dummy): Move above user.
447
bee48093
FZ
4482009-11-24 Felix Zielcke <fzielcke@z-51.de>
449
450 * util/Makefile.in (install-local): Convert a `for' into a normal
451 shell expansion.
452
a031e91c
RM
4532009-11-24 Robert Millan <rmh.grub@aybabtu.com>
454
455 * autogen.sh: Add automake call.
456 * config.guess: Remove.
457 * config.sub: Likewise.
458 * install-sh: Likewise.
459
26bec39d
FZ
4602009-11-24 Felix Zielcke <fzielcke@z-51.de>
461
462 * util/Makefile.in (install-local): Fix the use of $lang shell variable.
463
8e2532fd
FZ
4642009-11-24 Felix Zielcke <fzielcke@z-51.de>
465
466 * util/Makefile.in (install-local): Convert a make `$(foreach)'
467 function to a normal shell `for'.
468
fefa1b7d
FZ
4692009-11-24 Felix Zielcke <fzielcke@z-51.de>
470
471 * conf/i386-coreboot.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
472
4501250b
FZ
4732009-11-24 Felix Zielcke <fzielcke@z-51.de>
474
475 * util/grub-mkrelpath.c: New file.
476 * conf/common.rmk (bin_UTILITIES): Add grub-mkrelpath.
477 (grub_mkrelpath_SOURCES): New variable.
478 * include/grub/util/misc.h: New function prototype.
479 * util/misc.c (make_system_path_relative_to_its_root): New function.
480
481 * util/grub-mkconfig_lib.in (bindir): New variable.
482 (grub_mkrelpath): Likewise.
483 (make_system_path_relative_to_its_root): Use grub-mkrelpath.
484
485 * util/probe.c (probe): Make the file path relative to its root.
486 Change a info message to use the GRUB path. Enable again the
487 check if we can read the file with GRUB facilities.
488
489 * util/i386/pc/grub-setup.c (setup): Make core.img path relative
490 to its root.
491
11d9778b
FZ
4922009-11-24 Felix Zielcke <fzielcke@z-51.de>
493
494 * Makefile.in: Don't include GRUB_CONTRIB makefiles with emu
495 platform.
496
4465287d
FZ
4972009-11-24 Felix Zielcke <fzielcke@z-51.de>
498
499 * util/getroot.c (grub_util_get_dev_abstraction): Properly use
500 strncmp().
501
62b47f22
FZ
5022009-11-24 Felix Zielcke <fzielcke@z-51.de>
503
504 * util/getroot.c (grub_util_is_dmraid): New function.
505 (grub_util_get_dev_abstraction): Treat dmraid and multipath
506 devices as normal ones, not as LVM.
507
1eafb9b9 5082009-11-23 Carles Pina i Estany <carles@pina.cat>
c3ea6bd4
CPE
509
510 * conf/common.rmk: Add grub-gettext_lib target and updates
511 lib_DATA and CLEANFILES. Adds gettext.mod SOURCES, CFLAGS,
512 LDFLAGS.
513 * gettext/gettext.c: New file. (Reads mo files).
514 * include/grub/file.h (grub_file_pread): New prototype.
515 * include/grub/i18n.h (_): New prototype.
516 * include/grub/misc.h (grub_gettext_dummy, grub_gettext): New
517 prototypes.
518 * kern/misc.c (grub_gettext_dummy): New function.
519 * normal/menu_text.c: Include <grub/i18n.h>.
520 * normal/menu_text.c (print_timeout): Gettexttize string.
521 * normal/menu_text.c (print_message): Gettexttize string.
3bc7896c
RM
522 * po/POTFILES: Add `normal/menu_text.c'.
523 * po/ca.po: Add new translations.
c3ea6bd4
CPE
524 * util/grub.d/00_header.in: Define locale_dir and lang. insmod
525 gettext module and defines locale_dir and lang in grub.cfg.
526 * NEWS: Add gettext support.
527
0fdb2568
RM
5282009-11-23 Robert Millan <rmh.grub@aybabtu.com>
529
530 * util/hostdisk.c: Include `<grub/i18n.h>'.
531 (find_grub_drive): Use ARRAY_SIZE for map size calculation.
532 (make_device_name): Rewrite using asprintf.
533 (convert_system_partition_to_system_disk): Replace 0 with NULL.
534 (find_system_device): If a device is not found, generate one just
535 by reusing the OS path name.
536 (read_device_map): Make it permissible for device.map not to exist.
537
f515aa62
RM
5382009-11-23 Robert Millan <rmh.grub@aybabtu.com>
539
540 * script/sh/execute.c: Move from here ...
541 * script/execute.c: ... to here. Update all users.
542 * script/sh/function.c: Move from here ...
543 * script/function.c: ... to here. Update all users.
544 * script/sh/lexer.c: Move from here ...
545 * script/lexer.c: ... to here. Update all users.
546 * script/sh/main.c: Move from here ...
547 * script/main.c: ... to here. Update all users.
548 * script/sh/parser.y: Move from here ...
549 * script/parser.y: ... to here. Update all users.
550 * script/sh/script.c: Move from here ...
551 * script/script.c: ... to here. Update all users.
552
f84b481b
RM
5532009-11-23 Robert Millan <rmh.grub@aybabtu.com>
554
555 * configure.ac: Detect all `emu' platforms. Define
556 GRUB_MACHINE_* macros in TARGET_CFLAGS. Remove
557 --enable-grub-emu logic. Disable include/grub/machine
558 symlink on `emu' platforms.
559
560 * genkernsyms.sh.in: Use @TARGET_CFLAGS@ during symbol generation.
561 * gensymlist.sh.in: Likewise.
562
563 * include/grub/i386/coreboot/machine.h: Remove file.
564 * include/grub/i386/efi/machine.h: Likewise.
565 * include/grub/i386/ieee1275/machine.h: Likewise.
566 * include/grub/i386/pc/machine.h: Likewise.
567 * include/grub/i386/qemu/machine.h: Likewise.
568 * include/grub/powerpc/ieee1275/machine.h: Likewise.
569 * include/grub/sparc64/ieee1275/machine.h: Likewise.
570 * include/grub/x86_64/efi/machine.h: Likewise.
571
572 * commands/acpi.c: Remove `<grub/machine/machine.h>'.
573 * commands/halt.c: Likewise.
574 * commands/reboot.c: Likewise.
575 * include/grub/autoefi.h: Likewise.
576 * include/grub/i386/at_keyboard.h: Likewise.
577 * include/grub/i386/kernel.h: Likewise.
578 * include/grub/i386/loader.h: Likewise.
579 * include/grub/i386/pc/memory.h: Likewise.
580 * kern/dl.c: Likewise.
581 * kern/i386/coreboot/init.c: Likewise.
582 * loader/i386/bsd.c: Likewise.
583 * loader/i386/linux.c: Likewise.
584 * loader/multiboot_loader.c: Likewise.
585 * term/i386/pc/serial.c: Likewise.
586 * term/usb_keyboard.c: Likewise.
587
588 * include/grub/time.h [!GRUB_MACHINE_EMU]: Remove
589 `<grub/machine/machine.h>'
590 [!GRUB_MACHINE_EMU] (GRUB_TICKS_PER_SECOND): New macro.
591 * util/misc.c: Remove `<grub/machine/machine.h>' and
592 `<grub/machine/time.h>'.
593
594 * Makefile.in (enable_grub_emu): Remove variable.
595 Include $(srcdir)/conf/any-emu.mk for the `emu' platform.
596
597 * conf/any-emu.rmk: New file.
598 * conf/common.rmk (grub_emu_init.lst, grub_emu_init.h)
599 (grub_emu_init.c): Move from here ...
600 * conf/any-emu.rmk: ... to here.
601
602 * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-emu'.
603 (grub_emu_SOURCES, grub_emu_LDFLAGS): Move from here ...
604 * conf/any-emu.rmk: ... to here.
605
4efeab03
RM
6062009-11-23 Robert Millan <rmh.grub@aybabtu.com>
607
608 * include/grub/parser.h (grub_parser_register): Document need
609 of `name' parameter.
610 * normal/main.c (grub_normal_read_line): Simplify prompt string.
611 * script/sh/main.c (grub_sh_parser, GRUB_MOD_INIT(sh)): Rename
612 "sh" to "grub".
613
ea1dd8bf
RM
6142009-11-23 Robert Millan <rmh.grub@aybabtu.com>
615
616 * Makefile.in ($(srcdir)/po/$(PACKAGE).pot): Pass --keyword=N_ to
617 `$(XGETTEXT)'.
618 * include/grub/i18n.h (N_): New macro.
619 * util/mkisofs/mkisofs.h: Likewise.
620 * util/mkisofs/mkisofs.c (ld_options): Wrap all translatable strings
621 around N_().
622 (usage): Use gettext() to translate help strings when printing them.
623
0c140626
RM
6242009-11-23 Robert Millan <rmh.grub@aybabtu.com>
625
626 Based on patch from Bean
627 (http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00384.html)
628
629 * video/efi_fb.c: New file.
630 * conf/i386-efi.rmk (pkglib_MODULES): Add `efi_fb.mod'.
631 (efi_fb_mod_SOURCES, efi_fb_mod_CFLAGS, efi_fb_mod_LDFLAGS): New
632 variables.
633 * conf/x86_64-efi.rmk: Likewise.
634
87d58298
RM
6352009-11-22 Robert Millan <rmh.grub@aybabtu.com>
636
637 * util/i386/pc/grub-mkimage.c: Ungettextize grub_util_info() strings.
638 * util/i386/pc/grub-setup.c: Likewise.
639
994cc3a3
ST
6402009-11-21 Samuel Thibault <samuel.thibault@ens-lyon.org>
641
642 * util/getroot.c [__GNU__]: Include <hurd.h>, <hurd/lookup.h>, and
643 <hurd/fs.h>
644 [__GNU__] (grub_guess_root_device): Call file_name_lookup and
645 file_get_storage_info to implement grub_guess_root_device.
646
26a61d6a
FZ
6472009-11-21 Felix Zielcke <fzielcke@z-51.de>
648
649 * Makefile.in (target): Use make's builtin $(shell) function
650 instead of calling directly $(SHELL) to create the locale directories,
651 inside the $(foreach) function.
652
74ff1dd5
FZ
6532009-11-21 Felix Zielcke <fzielcke@z-51.de>
654
655 * util/grub-mkrescue.in: Print an error and usage if output option
656 has not been given.
657
0b787d0e
FZ
6582009-11-21 Felix Zielcke <fzielcke@z-51.de>
659
660 Patch from Loïc Minier <loic.minier@ubuntu.com>.
661 * util/grub.d/30_os-prober.in: Cope with Linux entries where
662 root and /boot are on different devices.
663
1164b270
RM
6642009-11-21 Robert Millan <rmh.grub@aybabtu.com>
665
666 Fix build for srcdir != objdir.
667
668 * Makefile.in (po/$(PACKAGE).pot): Rename to ...
669 ($(srcdir)/po/$(PACKAGE).pot): ... this. Run $(XGETTEXT) from
670 $(srcdir).
671 ($(foreach lang, $(LINGUAS), po/$(lang).po)): Rename to ...
672 ($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): ... this. Use $^
673 reference for input.
674
13774a2f
RM
6752009-11-21 Robert Millan <rmh.grub@aybabtu.com>
676
677 * util/grub-mkrescue.in: Use source directory direcly (without copiing
678 or hardlinking it). Remove -J option, Joliet is not compatible with
679 multiple source directories.
680
efda854e
RM
6812009-11-21 Carles Pina i Estany <carles@pina.cat>
6822009-11-21 Robert Millan <rmh.grub@aybabtu.com>
683
684 * util/grub-mkrescue.in: Recognize `--override-directory' option.
685 (process_input_dir): New function. Process an arbitrary input
686 directory.
687 Misc adjustments to support both "override mode" and system-wide mode.
688
6c09890c
FZ
6892009-11-20 Felix Zielcke <fzielcke@z-51.de>
690
691 * configure.ac (UNIFONT_BDF): Rename to ...
692 (FONT_SOURCE): ... this. Update all users.
693
a797824f
FZ
6942009-11-20 Felix Zielcke <fzielcke@z-51.de>
695
696 * configure.ac: Add `/usr/share/fonts/X11/misc/unifont.pcf.gz'
697 to the list of unifont files to look for.
698
cd4f42b0
RM
6992009-11-19 Robert Millan <rmh.grub@aybabtu.com>
700
701 Patch from Joe Auricchio <jauricchio@gmail.com>
702 * commands/minicmd.c (grub_mini_cmd_clear): New function.
703 (GRUB_MOD_INIT(minicmd)): Register grub_mini_cmd_clear().
704 (GRUB_MOD_FINI(minicmd)): Unregister grub_mini_cmd_clear().
705
393c783d
FZ
7062009-11-19 Felix Zielcke <fzielcke@z-51.de>
707
708 * Makefile.in (install-local): Add a missing backslash.
709
b2f1e327
FZ
7102009-11-19 Felix Zielcke <fzielcke@z-51.de>
711
712 * include/grub/x86_64/io.h: New file.
713
f577f7a0
RM
7142009-11-19 Robert Millan <rmh.grub@aybabtu.com>
715
716 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `gnulib/progname.c'.
717 * util/i386/pc/grub-setup.c: Include `<grub/i18n.h>'.
718 Include `"progname.h"'.
719 (main): Initialize gettext.
720 * util/i386/pc/grub-setup.c: Gettexttize.
721 * util/i386/pc/grub-mkimage.c: Likewise.
722
723 * Makefile.in (po/*.po): Redefine as ...
724 ($(foreach lang, $(LINGUAS), po/$(lang).po)): ... this.
725
3bc7896c
RM
726 * po/POTFILES: Add `util/i386/pc/grub-setup.c'.
727
c37943b6
RM
7282009-11-19 Robert Millan <rmh.grub@aybabtu.com>
729
730 * conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/progname.c'.
731 * util/mkisofs/mkisofs.c: Include `"progname.h"'.
732 (program_name): Remove.
733 (main): Initialize gettext support.
6323f705
RM
734 * util/mkisofs/mkisofs.h: Include `<locale.h>'.
735 Include `<libintl.h>'.
736 (_): New macro.
c37943b6
RM
737
738 * util/mkisofs/eltorito.c: Gettexttize.
739 * util/mkisofs/joliet.c: Likewise.
740 * util/mkisofs/mkisofs.c: Likewise.
c37943b6
RM
741 * util/mkisofs/multi.c: Likewise.
742 * util/mkisofs/rock.c: Likewise.
743 * util/mkisofs/tree.c: Likewise.
744 * util/mkisofs/write.c: Likewise.
745
3bc7896c
RM
746 * po/POTFILES: Update with new files.
747
5ce77c6e
RM
7482009-11-18 Robert Millan <rmh.grub@aybabtu.com>
749
750 * util/mkisofs/eltorito.c: Fix minor mistake in license text.
751 * util/mkisofs/iso9660.h: Likewise.
752 * util/mkisofs/joliet.c: Likewise.
753 * util/mkisofs/mkisofs.c: Likewise.
754 * util/mkisofs/mkisofs.h: Likewise.
755 * util/mkisofs/rock.c: Likewise.
756 * util/mkisofs/tree.c: Likewise.
757 * util/mkisofs/write.c: Likewise.
758
759 * util/mkisofs/eltorito.c (rcsid): Remove.
760 * util/mkisofs/hash.c: Likewise.
761 * util/mkisofs/joliet.c: Likewise.
762 * util/mkisofs/name.c: Likewise.
763 * util/mkisofs/rock.c: Likewise.
764 * util/mkisofs/tree.c: Likewise.
765 * util/mkisofs/write.c: Likewise.
766
1dabbc77
RM
7672009-11-18 Robert Millan <rmh.grub@aybabtu.com>
768
769 * util/mkisofs/match.c: Rewrite from scratch, using a linked list
770 instead of static allocation.
771 * util/mkisofs/match.h: Likewise.
772
633877cb
RM
7732009-11-18 Robert Millan <rmh.grub@aybabtu.com>
774
3bc7896c
RM
775 * po/POTFILES-shell: New file. List `util/grub.d/10_kfreebsd.in'
776 and `util/grub.d/10_linux.in'.
633877cb
RM
777 * Makefile.in (po/$(PACKAGE).pot): Process `po/POTFILES-shell' for
778 translatable Shell files.
779
af1c0c85
RM
7802009-11-18 Robert Millan <rmh.grub@aybabtu.com>
781
782 * Makefile.in ($(srcdir)/aclocal.m4): New target.
783
769ae37b
RM
7842009-11-17 Robert Millan <rmh.grub@aybabtu.com>
785
786 * INSTALL: Document Automake is needed for bootstrap.
3bc7896c 787 * po/ca.po: Fix PO-Revision-Date and Language-Team fields.
769ae37b
RM
788 * util/grub.d/10_kfreebsd.in (bindir): New variable.
789 Add gettext initialization.
790 (kfreebsd_entry): Make menuentry output translatable.
791
7922009-11-17 Robert Millan <rmh.grub@aybabtu.com>
793
794 * Makefile.in (XGETTEXT, MSGMERGE, MSGFMT): New variables.
795 (po/$(PACKAGE).pot): Replace `xgettext' with `$(XGETTEXT)'.
796 (po/*.po): Replace `msgmerge' with `$(MSGMERGE)'.
797 (po/%.mo): Replace `msgfmt' with `$(MSGFMT)'.
798 (LINGUAS): Auto-generate using `po/LINGUAS'.
3bc7896c 799 * po/LINGUAS: New file.
769ae37b
RM
800
8012009-11-17 Robert Millan <rmh.grub@aybabtu.com>
802
803 * configure.ac: Call AM_GNU_GETTEXT() (defines localedir, among
804 other things).
805 * Makefile.in (CPPFLAGS): Add `-DLOCALEDIR=\"$(localedir)\"'.
806 * util/i386/pc/grub-mkimage.c (main): Issue setlocale() and
807 bindtextdomain() calls for gettext initialization.
808
8092009-11-17 Robert Millan <rmh.grub@aybabtu.com>
810
811 * gnulib/progname.c: New file (imported from Gnulib).
812 * gnulib/progname.h: Likewise.
813 * conf/i386-pc.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
814 * util/i386/pc/grub-mkimage.c: Include `"progname.h"'.
815 (usage): Replace `progname' with `program_name'.
816 (main): Use set_program_name() for program name initialization.
817
8182009-11-17 Robert Millan <rmh.grub@aybabtu.com>
819
820 * conf/common.rmk (grub_mkisofs_CFLAGS): Move `-I$(srcdir)/gnulib'
821 from here ...
822 * Makefile.in (CPPFLAGS): ... to here.
823
8242009-11-16 Robert Millan <rmh.grub@aybabtu.com>
825
826 * aclocal.m4: Move from here ...
827 * acinclude.m4: ... to here.
828 * autogen.sh: Add call to `aclocal'.
829 * configure.ac: Add AM_INIT_AUTOMAKE() after AC_INIT() call.
830
8312009-11-16 Robert Millan <rmh.grub@aybabtu.com>
832
833 * Makefile.in (CLEANFILES): Add `po/*.mo'.
834 (LINGUAS): New variable.
835 (all-local): Add `$(foreach lang, $(LINGUAS), po/$(lang).mo)'.
836 (install-local): Install MO files.
837 (po/$(PACKAGE).pot, po/*.po, po/%.mo): New rules.
838 * include/grub/i18n.h: New file.
3bc7896c
RM
839 * po/POTFILES: New file.
840 * po/ca.po: New file.
769ae37b
RM
841 * util/grub.d/10_linux.in (bindir): New variable.
842 Add gettext initialization.
843 (linux_entry): Make menuentry output translatable.
844 * util/i386/pc/grub-mkimage.c: Include `<grub/i18n.h>'.
845 (usage): Make --help output translatable.
846 (main): Initialize gettext.
847
02c0a6ad
RM
8482009-11-17 Robert Millan <rmh.grub@aybabtu.com>
849
850 * import_gcry.py: New file (written by Vladimir with minor
851 adjustments).
852 * autogen.sh: Use import_gcry.py to auto-generate GRUB-ified
853 ciphers.
854 * INSTALL: Document that Python is required for bootstrap.
855
8562009-11-17 Robert Millan <rmh.grub@aybabtu.com>
857
858 Import ciphers from libgcrypt 1.4.4.
859
860 * lib/libgcrypt/cipher/ChangeLog
861 * lib/libgcrypt/cipher/ac.c
862 * lib/libgcrypt/cipher/arcfour.c
863 * lib/libgcrypt/cipher/bithelp.h
864 * lib/libgcrypt/cipher/blowfish.c
865 * lib/libgcrypt/cipher/camellia-glue.c
866 * lib/libgcrypt/cipher/camellia.c
867 * lib/libgcrypt/cipher/camellia.h
868 * lib/libgcrypt/cipher/cast5.c
869 * lib/libgcrypt/cipher/cipher.c
870 * lib/libgcrypt/cipher/crc.c
871 * lib/libgcrypt/cipher/des.c
872 * lib/libgcrypt/cipher/dsa.c
873 * lib/libgcrypt/cipher/ecc.c
874 * lib/libgcrypt/cipher/elgamal.c
875 * lib/libgcrypt/cipher/hash-common.c
876 * lib/libgcrypt/cipher/hash-common.h
877 * lib/libgcrypt/cipher/hmac-tests.c
878 * lib/libgcrypt/cipher/md.c
879 * lib/libgcrypt/cipher/md4.c
880 * lib/libgcrypt/cipher/md5.c
881 * lib/libgcrypt/cipher/primegen.c
882 * lib/libgcrypt/cipher/pubkey.c
883 * lib/libgcrypt/cipher/rfc2268.c
884 * lib/libgcrypt/cipher/rijndael-tables.h
885 * lib/libgcrypt/cipher/rijndael.c
886 * lib/libgcrypt/cipher/rmd.h
887 * lib/libgcrypt/cipher/rmd160.c
888 * lib/libgcrypt/cipher/rsa.c
889 * lib/libgcrypt/cipher/seed.c
890 * lib/libgcrypt/cipher/serpent.c
891 * lib/libgcrypt/cipher/sha1.c
892 * lib/libgcrypt/cipher/sha256.c
893 * lib/libgcrypt/cipher/sha512.c
894 * lib/libgcrypt/cipher/tiger.c
895 * lib/libgcrypt/cipher/twofish.c
896 * lib/libgcrypt/cipher/whirlpool.c
897
af2f93ac
RM
8982009-11-16 Robert Millan <rmh.grub@aybabtu.com>
899
900 Fix build for systems without error().
901
902 * gnulib/error.c: New file (imported from Gnulib).
903 * gnulib/error.h: Likewise.
904 * conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/error.c'.
905 * util/mkisofs/mkisofs.c (program_name): Remove `static' qualifier
906 (this variable is now used by error()).
907
73fb3dd5
FZ
9082009-11-16 Felix Zielcke <fzielcke@z-51.de>
909
814f5e96
FZ
910 * util/mkisofs/name.c (iso9660_file_length): Use isascii macro
911 instead of relying that char is signed.
73fb3dd5 912
a691ca33
VS
9132009-11-16 Vladimir Serbinenko <phcoder@gmail.com>
914
915 * fs/i386/pc/pxe.c (grub_pxefs_open): Correctly handle PXE choosing
916 blocksize different from specified.
917 (grub_pxefs_read): Likewise.
918
2af8f0f4
FZ
9192009-11-16 Felix Zielcke <fzielcke@z-51.de>
920
921 Enable ata.mod on x86_64-efi, i386-efi and i386-ieee1275.
922
923 * disk/ata.c (grub_ata_dumpinfo): Add a cast.
924 (grub_ata_readwrite): Likewise. Update 2 format strings.
925 (grub_atapi_read): Likewise.
926
927 * conf/i386-coreboot.rmk (pkglib_MODULES): Move `ata.mod' from here ...
928 * conf/i386.rmk (pkglib_MODULES): ... to here ...
929 * conf/x86_64-efi.rmk (pkglib_MODULES): ... and here.
930 * conf/i386-coreboot.rmk (ata_mod_SOURCES, ata_mod_CFLAGS)
931 (ata_mod_LDFLAGS): Move from here ...
932 * conf/i386.rmk: ... to here ...
933 * conf/x86_64-efi.rmk: ... and here.
934 * conf/i386-pc.rmk (pkglib_MODULES): Remove `ata.mod'
935 (ata_mod_SOURCES, ata_mod_CFLAGS, ata_mod_LDFLAGS): Remove.
936
83bdecaf
RM
9372009-11-16 Robert Millan <rmh.grub@aybabtu.com>
938
939 Relicense multiboot.h, with RMS' blessing.
940
941 * include/multiboot.h: Change to X11 license.
942
fd6fd3d7
RM
9432009-11-15 Robert Millan <rmh.grub@aybabtu.com>
944
945 Support --version in grub-mkisofs.
946
947 * util/mkisofs/mkisofs.c (rcsid): Remove variable.
948 (OPTION_VERSION): New macro.
949 (ld_options): Recognize --version.
950 (usage): Move `program_name' from here ...
951 (program_name): ... to here. Add `static' qualifier.
952 (main): Recognize `OPTION_VERSION'.
953
16a88c49
FZ
9542009-11-15 Felix Zielcke <fzielcke@z-51.de>
955
956 * Makefile.in (TARGET_CPPFLAGS): Replace `-isystem=$(srcdir)/include'
957 with `-nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include)'.
958
a4158476
RM
9592009-11-14 Robert Millan <rmh.grub@aybabtu.com>
960
961 Fix help2man generation for mkisofs.
962
963 * util/mkisofs/mkisofs.c (ld_options): Recognize --help.
964 (usage): Send output to stdout (rather than stderr).
965
fc2208b0
RM
9662009-11-14 Robert Millan <rmh.grub@aybabtu.com>
967
968 * conf/i386-coreboot.rmk (grub_mkrescue_SOURCES): Replace
969 `util/i386/coreboot/grub-mkrescue.in' with `util/grub-mkrescue.in'.
970 * conf/i386-pc.rmk (grub_mkrescue_SOURCES): Replace
971 `util/i386/pc/grub-mkrescue.in' with `util/grub-mkrescue.in'.
972 (bin_SCRIPTS): Add `grub-mkfloppy'.
973 (grub_mkfloppy_SOURCES): New variable.
974
975 * util/grub-mkrescue.in: New file.
976 * util/i386/pc/grub-mkfloppy.in: New file.
977
978 * util/i386/coreboot/grub-mkrescue.in: Remove.
979 * util/i386/pc/grub-mkrescue.in: Remove.
980
8d0edf4a
RM
9812009-11-13 Robert Millan <rmh.grub@aybabtu.com>
982
983 * include/grub/multiboot.h (struct grub_multiboot_header): Move
984 from here ...
985 * include/multiboot.h (struct multiboot_header): ... to here. Update
986 all users.
987 * include/grub/multiboot.h (struct grub_multiboot_info): Move
988 from here ...
989 * include/multiboot.h (struct multiboot_info): ... to here. Update
990 all users.
991 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): Move
992 from here ...
993 * include/multiboot.h (struct multiboot_mmap_entry): ... to here.
994 Update all users.
995 * include/grub/multiboot.h (struct grub_mod_list): Move
996 from here ...
997 * include/multiboot.h (struct multiboot_mod_list): ... to here.
998 Update all users.
999
a73f5969
RM
10002009-11-13 Robert Millan <rmh.grub@aybabtu.com>
1001
1002 * include/multiboot2.h (multiboot_word): Rename from this ...
1003 (multiboot2_word): ... to this. Update all users.
1004 (multiboot_header): Rename from this ...
1005 (multiboot2_header): ... to this. Update all users.
1006 (multiboot_tag_header): Rename from this ...
1007 (multiboot2_tag_header): ... to this. Update all users.
1008 (multiboot_tag_start): Rename from this ...
1009 (multiboot2_tag_start): ... to this. Update all users.
1010 (multiboot_tag_name): Rename from this ...
1011 (multiboot2_tag_name): ... to this. Update all users.
1012 (multiboot_tag_module): Rename from this ...
1013 (multiboot2_tag_module): ... to this. Update all users.
1014 (multiboot_tag_memory): Rename from this ...
1015 (multiboot2_tag_memory): ... to this. Update all users.
1016 (multiboot_tag_unused): Rename from this ...
1017 (multiboot2_tag_unused): ... to this. Update all users.
1018 (multiboot_tag_end): Rename from this ...
1019 (multiboot2_tag_end): ... to this. Update all users.
1020
1c8927f0
RM
10212009-11-13 Robert Millan <rmh.grub@aybabtu.com>
1022
1023 Disable Multiboot2 in i386-ieee1275. It didn't actually work, and on
1024 this platform we should support Multiboot1 first.
1025
1026 * conf/i386-ieee1275.rmk (pkglib_MODULES): Remove `multiboot.mod'.
1027 (multiboot_mod_SOURCES, multiboot_mod_CFLAGS)
1028 (multiboot_mod_LDFLAGS, multiboot_mod_ASFLAGS): Remove.
1029
6e1e0d89
RM
10302009-11-12 Robert Millan <rmh.grub@aybabtu.com>
1031
1032 * util/mkisofs/eltorito.c (init_boot_catalog): Handle return code
1033 of write calls (converting them to fwrite() if they aren't already).
1034 (get_torito_desc): Likewise.
1035 * util/mkisofs/rock.c (generate_rock_ridge_attributes): Likewise.
1036
7f2b34d8
RM
10372009-11-12 Robert Millan <rmh.grub@aybabtu.com>
1038
1039 * util/i386/pc/grub-install.in: Move from here ...
1040 * util/grub-install.in: ... to here. Update all users.
1041
c0ef3311
CW
10422009-11-11 Colin Watson <cjwatson@ubuntu.com>
1043
1044 * util/powerpc/ieee1275/grub-mkrescue.in: Fix --version output.
1045
e1f240ff
RM
10462009-11-11 Robert Millan <rmh.grub@aybabtu.com>
1047
1048 Support for El Torito without floppy emulation.
1049
1050 * util/mkisofs/eltorito.c: Include `<errno.h>'.
1051 (init_boot_catalog): Improve error handling.
1052 (get_torito_desc): Don't use floppy emulation unless requested by
1053 user. Patch boot information table when requested via
1054 `-boot-info-table'.
1055 * util/mkisofs/iso9660.h (struct eltorito_boot_info): New struct.
1056 * util/mkisofs/mkisofs.c (use_eltorito_emul_floppy)
1057 (use_boot_info_table): New variables.
1058 (OPTION_BOOT_INFO_TABLE, OPTION_NO_EMUL_BOOT)
1059 (OPTION_ELTORITO_EMUL_FLOPPY): New macros.
1060 (ld_options): Handle `-boot-info-table', `-no-emul-boot' and
1061 `--eltorito-emul-floppy'.
1062 (main): Handle `OPTION_BOOT_INFO_TABLE', `OPTION_NO_EMUL_BOOT'
1063 and `OPTION_ELTORITO_EMUL_FLOPPY'.
1064 * util/mkisofs/mkisofs.h (use_eltorito_emul_floppy)
1065 (use_boot_info_table, get_731): New prototypes.
1066 * util/mkisofs/write.c (get_731): New function.
1067
af7d4de5
FZ
10682009-11-11 Felix Zielcke <fzielcke@z-51.de>
1069
1070 Fix the generation of the man page.
1071
1072 * util/pc/i386/grub-install.in: Source
1073 `${libdir}/grub/grub-mkconfig_lib' after options have been parsed.
1074
2c55dbc0
RM
10752009-11-11 Robert Millan <rmh.grub@aybabtu.com>
1076
1077 Large file support for grub-mkisofs.
1078
1079 * conf/common.rmk (grub_mkisofs_CFLAGS): Add `-D_FILE_OFFSET_BITS=64'.
1080 * util/mkisofs/mkisofs.c (next_extent, last_extent)
1081 (session_start): Upgrade type to `uint64_t'. Update all users.
1082 * util/mkisofs/mkisofs.h: Include `<stdint.h>'.
1083 (struct directory_entry): Upgrade type of `starting_block' and
1084 `size' to `uint64_t'. Update all users.
1085 (struct deferred): Remove unused structure.
1086 (xfwrite): Upgrade type of `count' and `size' to `uint64_t'.
1087 Update all users.
1088 * util/mkisofs/tree.c (stat_filter, lstat_filter): Return -1 when
1089 file is larger than `UINT32_MAX'.
1090 * util/mkisofs/write.c (xfwrite): Upgrade type of `count' and
1091 `size' to `uint64_t'. Update all users. Fix handling of fwrite()
1092 return value.
1093 (struct deferred_write): Upgrade type of `extent' and `size' to
1094 `uint64_t'. Update all users.
1095 (last_extent_written): Upgrade type to `uint64_t'. Update all
1096 users.
1097 (write_one_file): Upgrade type of `count' and `size' to `uint64_t'.
1098 Update all users. Upgrade type of `remain' to `int64_t' and
1099 `use' to `size_t'. Use error() to handle fread() errors.
1100 (write_files): Rely on write_one_file() rather than calling
1101 xfwrite() directly.
1102
6a9cead5
FZ
11032009-11-09 Felix Zielcke <fzielcke@z-51.de>
1104
1105 * util/mkisofs/mkisofs.c (ld_options): Fix a spelling mistake.
1106
4825d790
RM
11072009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1108
1109 * util/mkisofs/fnmatch.c: Remove.
1110 * util/mkisofs/getopt1.c: Likewise.
1111 * util/mkisofs/getopt.c: Likewise.
1112 * conf/common.rmk (grub_mkisofs_SOURCES): Replace
1113 `util/mkisofs/fnmatch.c', `util/mkisofs/getopt1.c' and
1114 `util/mkisofs/getopt.c' with `gnulib/fnmatch.c',
1115 `gnulib/getopt1.c' and `gnulib/getopt.c'.
1116 (grub_mkisofs_CFLAGS): Add `-I$(srcdir)/gnulib'.
1117
1118 * configure.ac: Detect `mingw32msvc' host_os.
1119 Check for lstat(), getuid() and getgid().
1120
1121 * util/mkisofs/joliet.c: Include `<stdint.h>'. Replace all
1122 instances of `u_char' with `uint8_t'.
1123
1124 * util/mkisofs/mkisofs.h: Include `<sys/stat.h>'.
1125 [!HAVE_GETUID] (getuid): New function (stub).
1126 [!HAVE_GETGID] (getgid): Likewise.
1127 [!HAVE_LSTAT] (lstat): Likewise.
1128 [!S_IROTH] (S_IROTH): New macro (dummy).
1129 [!S_IRGRP] (S_IRGRP): Likewise.
1130
84b860d8
RM
11312009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1132
1133 * gnulib/fnmatch_loop.c (EXT): Fix warning (signed and unsigned type in
1134 conditional expression).
1135
66e9b712
RM
11362009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1137
1138 Import from Gnulib.
1139
1140 * gnulib/fnmatch.c: New file.
1141 * gnulib/fnmatch.h: Likewise.
1142 * gnulib/fnmatch_loop.c: Likewise.
1143 * gnulib/getopt.c: Likewise.
1144 * gnulib/getopt.h: Likewise.
1145 * gnulib/getopt1.c: Likewise.
1146 * gnulib/getopt_int.h: Likewise.
1147 * gnulib/gettext.h: Likewise.
1148
34f4a5b0
RM
11492009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1150
1151 * normal/dyncmd.c (read_command_list): Replace `0' with `NULL'.
1152 * normal/handler.c (read_handler_list): Likewise.
1153
ac451143
RM
11542009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1155
1156 Misc cleanup.
1157
1158 * kern/command.c (grub_register_command_prio): Use
1159 grub_zalloc() instead of explicitly zeroing data.
1160 * kern/list.c: Include `<grub/mm.h>'.
1161 (grub_named_list_find): Replace `0' with `NULL'.
1162 * normal/autofs.c (struct grub_fs_module_list): Remove ad-hoc type.
1163 (fs_module_list): Change type to `grub_named_list_t'. Update all
1164 users.
1165 * normal/dyncmd.c (read_command_list): Add space between function
1166 call and parenthesis.
1167 * normal/handler.c (read_handler_list): Likewise.
1168
4089b167
RM
11692009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1170
1171 * normal/auth.c (punishment_delay): Moved from here ...
1172 (grub_auth_strcmp): ... to here (inside function).
1173
325f5037
RM
11742009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1175
1176 * include/grub/list.h (struct grub_named_list): Remove `const'
1177 qualifier from `name'.
1178 (struct grub_prio_list): Likewise.
1179
7aea29a3
RM
11802009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1181
1182 * normal/auth.c: Include `<grub/time.h>'.
1183 (grub_auth_strcmp): Replace `strcmp' with `grub_strcmp'.
1184
3fd6f044
RM
11852009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1186
1187 * normal/auth.c (punishment_delay): New variable.
1188 (grub_auth_strcmp): Rewrite using grub_get_time_ms ().
1189 (grub_auth_check_authentication): Punish failed login attempts with
1190 an incremental (2^N) delay.
1191
a4cd68e4
RM
11922009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1193
1194 * conf/common.rmk (grub_mkisofs_CFLAGS): Prefix include
1195 path with $(srcdir).
1196
7ad12f43
VS
11972009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
1198
1199 * normal/auth.c (grub_auth_strcmp): Fixed incorrect variable usage.
1200
c1129f03
RM
12012009-11-09 Robert Millan <rmh.grub@aybabtu.com>
1202
1203 * util/i386/coreboot/grub-mkrescue.in: New file.
1204 * conf/i386-coreboot.rmk (bin_SCRIPTS, grub_mkrescue_SOURCES): New
1205 variables.
1206
1207 * conf/common.rmk (bin_UTILITIES): Add `grub-mkisofs'.
1208 (grub_mkisofs_SOURCES, grub_mkisofs_CFLAGS): New variables.
1209 * configure.ac: Add header and function checks to satisfy grub-mkisofs
1210 requirements.
1211 * util/mkisofs/defaults.h: New file.
1212 * util/mkisofs/eltorito.c: Likewise.
1213 * util/mkisofs/exclude.h: Likewise.
1214 * util/mkisofs/fnmatch.c: Likewise.
1215 * util/mkisofs/getopt.c: Likewise.
1216 * util/mkisofs/getopt1.c: Likewise.
1217 * util/mkisofs/hash.c: Likewise.
1218 * util/mkisofs/include/fctldefs.h: Likewise.
1219 * util/mkisofs/include/mconfig.h: Likewise.
1220 * util/mkisofs/include/prototyp.h: Likewise.
1221 * util/mkisofs/include/statdefs.h: Likewise.
1222 * util/mkisofs/iso9660.h: Likewise.
1223 * util/mkisofs/joliet.c: Likewise.
1224 * util/mkisofs/match.c: Likewise.
1225 * util/mkisofs/match.h: Likewise.
1226 * util/mkisofs/mkisofs.c: Likewise.
1227 * util/mkisofs/mkisofs.h: Likewise.
1228 * util/mkisofs/multi.c: Likewise.
1229 * util/mkisofs/name.c: Likewise.
1230 * util/mkisofs/rock.c: Likewise.
1231 * util/mkisofs/tree.c: Likewise.
1232 * util/mkisofs/write.c: Likewise.
1233
ec8bb77d
VS
12342009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
1235
1236 * normal/auth.c (grub_auth_strcmp): Fix bug which resulted in function
1237 being insecure.
1238
3716b12c
RM
12392009-11-08 Robert Millan <rmh.grub@aybabtu.com>
1240
1241 * util/i386/pc/grub-mkrescue.in: Fix miss-identification as
1242 `grub-mkimage' (and use $0 when possible).
1243
b97b7b91
RM
12442009-11-08 Robert Millan <rmh.grub@aybabtu.com>
1245
1246 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve
1247 error message for excessively large memory map.
1248
04114812
RM
12492009-11-08 Robert Millan <rmh.grub@aybabtu.com>
1250
1251 * autogen.sh: Use `sh gendistlist.sh' to avoid reliing on
1252 executable bit.
1253
e4eb2373
RM
12542009-11-08 Robert Millan <rmh.grub@aybabtu.com>
1255
1256 * kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve error
1257 message for coreboot users.
1258
c926e1d5 12592009-11-07 Robert Millan <rmh.grub@aybabtu.com>
1260
1261 Fix build with GNU gold.
1262
1263 * conf/i386-pc.rmk (boot_img_LDFLAGS, pxeboot_img_LDFLAGS)
1264 (diskboot_img_LDFLAGS, lnxboot_img_LDFLAGS)
1265 (cdboot_img_LDFLAGS): Prepend `0x' qualifier to hexadecimal
1266 link addresses.
1267 * aclocal.m4: Likewise.
1268
86e5b1db 12692009-11-04 Felix Zielcke <fzielcke@z-51.de>
1270
1271 * configure.ac (AC_PREREQ): Bump to 2.59d.
1272 * INSTALL: Make it more clear when Autoconf and Ruby are
1273 needed and when to run `./autogen.sh'.
1274
246cd78f 12752009-11-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
1276
1277 * util/grub.d/30_os-prober.in: Restore default behavior for unsupported
1278 OSes.
1279
4f9dfb37 12802009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
1281
1282 * util/grub.d/30_os-prober.in: Add GNU/Hurd support
1283
b82bd5e1 12842009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
1285
1286 * util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
1287 giving it to GNU Mach.
1288
ff1a9bca 12892009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
1290
1291 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Subtract 1 from
1292 GNU partition number to get internal GRUB partition number.
1293
61697d9c 12942009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
1295
1296 * util/grub.d/10_hurd.in: Call prepare_grub_to_access_device
1297 ${GRUB_DEVICE_BOOT} before loading /boot kernel.
1298
a50569e1 12992009-11-01 Robert Millan <rmh.grub@aybabtu.com>
1300
1301 Based on patch from BVK Chaitanya <bvk.groups@gmail.com>
1302 * kern/misc.c (grub_strchr, grub_strrchr): Fix to handle c == '\0'
1303 case.
1304
5b153867 13052009-11-01 Felix Zielcke <fzielcke@z-51.de>
1306
1307 * Makefile.in (TARGET_CPPFLAGS): Add `-I$(srcdir)/include'.
1308
d9e2cd70 13092009-10-30 Robert Millan <rmh.grub@aybabtu.com>
1310
1311 Fix build problem.
1312
1313 * Makefile.in (TARGET_CPPFLAGS): Replace `-nostdinc' with
1314 `-isystem=$(srcdir)/include'.
1315
805111a4 13162009-10-30 Robert Millan <rmh.grub@aybabtu.com>
1317
1318 * util/i386/pc/grub-install.in: Remove hint that device.map should be
1319 checked (grub-install doesn't currently rely on it).
1320
fa6e945f 13212009-10-29 Robert Millan <rmh.grub@aybabtu.com>
1322
1323 Revert SVN r2660.
1324
1325 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): Moved from here ...
1326 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
1327 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): ... and here.
1328 * conf/i386-ieee1275.rmk: Likewise.
1329 * conf/i386-pc.rmk: Likewise.
1330 * conf/powerpc-ieee1275.rmk: Likewise.
1331 * conf/sparc64-ieee1275.rmk: Likewise.
1332 * conf/x86_64-efi.rmk: Likewise.
1333
cee15086 13342009-10-28 Robert Millan <rmh.grub@aybabtu.com>
1335
1336 * Makefile.in (TARGET_CPPFLAGS): Add `-nostdinc'.
1337
95b9239e 13382009-10-28 Robert Millan <rmh.grub@aybabtu.com>
1339
1340 * include/grub/misc.h: Stop checking for APPLE_CC.
1341
2ed19dfd 13422009-10-28 Robert Millan <rmh.grub@aybabtu.com>
1343
1344 * kern/i386/coreboot/init.c (grub_exit): Reimplement in a way that
1345 doesn't cause an infinite call loop.
1346
fdcdde19 13472009-10-28 Felix Zielcke <fzielcke@z-51.de>
1348
1349 * commands/acpi.c (grub_cmd_acpi): Fix the out of memory error
1350 strings.
1351
cefabfe1 13522009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1353
1354 * autogen.sh: Support addition of external modules via `GRUB_CONTRIB'
1355 variable.
1356 * Makefile.in: Likewise.
1357
ed96ab6d 13582009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1359
1360 * gendistlist.sh: Simplify .svn check. Skip .bzr as well.
1361
0579b753 13622009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1363
1364 * Makefile.in (RMKFILES): Rewrite using $(wildcard).
1365
478df409 13662009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1367
1368 * disk/scsi.c: Remove `<grub/machine/kernel.h>' (not needed).
1369
083d1679 13702009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1371
1372 * gensymlist.sh.in (COMPILE_TIME_ASSERT): Copy macro declaration
1373 from here ...
1374 * include/grub/misc.h (COMPILE_TIME_ASSERT): ... to here.
1375
5947ae32 13762009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1377
1378 * Makefile.in (docs/grub.info): Use make syntax to ignore errors
1379 in $(MAKEINFO) invocation. This makes it clear in output that
1380 errors are being ignored.
1381
94180ff6 13822009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1383
1384 * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): Moved
1385 from here ...
1386 * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
1387 * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): Remove.
1388 * conf/i386-ieee1275.rmk: Likewise.
1389 * conf/i386-pc.rmk: Likewise.
1390 * conf/powerpc-ieee1275.rmk: Likewise.
1391 * conf/sparc64-ieee1275.rmk: Likewise.
1392 * conf/x86_64-efi.rmk: Likewise.
1393
9031b03a 13942009-10-26 Colin Watson <cjwatson@ubuntu.com>
1395
1396 * util/grub-editenv.c (main): If only a command is given, use
1397 DEFAULT_DIRECTORY "/" GRUB_ENVBLK_DEFCFG as a default file name.
1398 (usage): FILENAME is now optional and has a default.
1399
e4f6809b 14002009-10-26 Colin Watson <cjwatson@ubuntu.com>
1401
1402 Improve grub-mkconfig performance when there are several menu
1403 entries on a single filesystem.
1404
1405 * util/grub.d/10_linux.in (linux_entry): Cache the output of
1406 prepare_grub_to_access_device.
1407 * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
1408 * util/grub.d/30_os-prober.in: Likewise.
1409
67937d4d 14102009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1411
1412 * util/grub.d/10_freebsd.in: Remove.
1413 * util/grub.d/10_kfreebsd.in: New file (based on 10_linux.in).
1414 * configure.ac: Set host_kernel=kfreebsd for FreeBSD and GNU/kFreeBSD.
1415
ee3756cc 14162009-10-26 Robert Millan <rmh.grub@aybabtu.com>
1417
5c35048e 1418 * docs/grub.cfg: Fix example usage of *BSD loaders.
ee3756cc 1419
4dea1c6f 14202009-10-25 Robert Millan <rmh.grub@aybabtu.com>
1421
1422 * util/i386/pc/grub-setup.c (setup): Add missing parameter to
1423 grub_util_error() call.
1424
042484d7 14252009-10-25 Robert Millan <rmh.grub@aybabtu.com>
1426
1427 * include/grub/fs.h [GRUB_UTIL] (struct grub_fs): Add
1428 `reserved_first_sector' member.
1429 * fs/ext2.c [GRUB_UTIL] (grub_ext2_fs): Initialize
1430 `reserved_first_sector' to 1.
1431 * fs/fat.c [GRUB_UTIL] (grub_fat_fs): Likewise.
1432 * fs/ntfs.c [GRUB_UTIL] (grub_ntfs_fs): Likewise.
1433 * fs/hfsplus.c [GRUB_UTIL] (grub_hfsplus_fs): Likewise.
1434 * util/i386/pc/grub-setup.c (setup): Add safety check that probes for
1435 filesystems which begin at first sector.
1436 (options): New option --skip-fs-probe.
1437 (main): Handle --skip-fs-probe and pass it to setup().
1438
d64448a7 14392009-10-25 Robert Millan <rmh.grub@aybabtu.com>
1440
1441 * include/grub/misc.h: Fix wrong evaluation of APPLE_CC.
1442 (memset): Fix function prototype.
1443
508d42ec 14442009-10-25 Robert Millan <rmh.grub@aybabtu.com>
14452009-10-25 Vasily Averin <vvs@parallels.com>
1446
1447 * fs/ext2.c (grub_ext2_iterate_dir): Avoid infinite loop when
1448 `dirent.direntlen == 0'.
1449
b240e30c 14502009-10-25 Robert Millan <rmh.grub@aybabtu.com>
1451
1452 * fs/cpio.c [MODE_USTAR]: Initialize `tar' module instead of
1453 `cpio'.
1454 [! MODE_USTAR]: Initialize `cpio' module instead of `tar'.
1455
346e7fbe 14562009-10-25 Robert Millan <rmh.grub@aybabtu.com>
1457
1458 * configure.ac: Check for `__ashldi3', `__ashrdi3', `__lshrdi3',
1459 `__trampoline_setup' and `__ucmpdi2'.
1460 * include/grub/powerpc/libgcc.h: Only export symbols for functions
1461 that libgcc provides.
1462
cdb308b0 14632009-10-25 Robert Millan <rmh.grub@aybabtu.com>
1464
1465 * include/grub/powerpc/libgcc.h (memset): Remove function prototype.
1466 * include/grub/sparc64/libgcc.h (memset): Likewise.
1467 * include/grub/misc.h (memset, memcmp): New function prototypes.
1468
fb26abc2 14692009-10-25 Robert Millan <rmh.grub@aybabtu.com>
1470
1471 * fs/cpio.c [MODE_USTAR]: Finish `tar' module instead of
1472 `cpio'.
1473 [! MODE_USTAR]: Finish `cpio' module instead of `tar'.
1474
f6693890 14752009-10-25 Robert Millan <rmh.grub@aybabtu.com>
1476
1477 Patch from Samuel Thibault <samuel.thibault@ens-lyon.org>
1478 * docs/grub.cfg: Compensate for recent change in multiboot
1479 loader (since 2009-08-14 it won't pass filename to payload).
1480 * util/grub.d/10_hurd.in: Likewise.
1481
0933cdc0 14822009-10-21 Felix Zielcke <fzielcke@z-51.de>
1483
1484 * config.guess: Update to latest version from config git
1485 repository.
1486 * config.sub: Likewise.
1487
3b2fe8c2 14882009-10-20 Robert Millan <rmh.grub@aybabtu.com>
1489
1490 Fix build on sparc64.
1491
1492 * configure.ac: Perform checks for libgcc symbols before
1493 adding `-nostdlib' to LDFLAGS.
1494
46695a62 14952009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
1496
1497 Let user specify OpenBSD root device.
1498
1499 * loader/i386/bsd.c (openbsd_root): New variable.
1500 (openbsd_opts): New option 'root'.
1501 (OPENBSD_ROOT_ARG): New macro.
1502 (grub_openbsd_boot): Use 'openbsd_root'.
1503 (grub_cmd_openbsd): Fill 'openbsd_root'.
1504
d2b6b7fc 15052009-10-16 Robert Millan <rmh.grub@aybabtu.com>
1506
1507 * NEWS: Misc adjustments.
1508
421bd7ac 15092009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
1510
1511 * NEWS: Mentioned XNU, ACPI, gptsync, password and parttool.
1512
f1d29d87 15132009-10-16 Robert Millan <rmh.grub@aybabtu.com>
1514
1515 * configure.ac: Bump version to 1.97.
1516
6f3cd880 15172009-10-16 Colin Watson <cjwatson@ubuntu.com>
1518
1519 * configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2
1520 -mno-3dnow on x86 architectures. Some toolchains enable these
1521 features by default, but they rely on registers that aren't enabled
1522 in GRUB. Thanks to Vladimir Serbinenko for the suggestion.
1523
035f7122 15242009-10-15 Robert Millan <rmh.grub@aybabtu.com>
1525
1526 Make entry text a bit more readable.
1527
1528 * util/grub.d/10_linux.in: Add `with' before `Linux'.
1529
44998e58 15302009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
1531
1532 * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
1533
cd2851b3 15342009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
1535
1536 * commands/xnu_uuid.c (grub_cmd_xnu_uuid): Remove duplicated bitwise
1537 operations.
1538
c6f3b249 15392009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
1540
1541 * configure.ac: Add missing dollar.
1542
6b5886ba 15432009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
1544
1545 Revert 2009-06-10 Pavel Roskin <proski@gnu.org>
1546
1547 * configure.ac: Put checks for __bswapsi2 and __bswapdi2.
1548 * include/grub/powerpc/libgcc.h: Don't use weak attribute for all
1549 exports.
1550 * include/grub/sparc64/libgcc.h: Likewise. Use
1551 preprocessor conditionals.
1552
e9d66f6d 15532009-10-14 Robert Millan <rmh.grub@aybabtu.com>
1554
1555 * conf/common.rmk (grub-dumpbios): Remove rule.
1556 (sbin_SCRIPTS, CLEANFILES): Remove `grub-dumpbios'.
1557 * util/grub-dumpbios.in: Remove file.
1558
9155bc17 15592009-10-14 Robert Millan <rmh.grub@aybabtu.com>
1560
1561 Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
1562 the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).
1563
1564 * loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
1565 from "kFreeBSD" namespace (rather than "FreeBSD"). Update all
1566 users.
1567
1568 (GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
1569 "openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
1570 to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
1571 and "freebsd_module_elf" to "kfreebsd_module_elf". Update all
1572 users.
1573
bf7f7a18 15742009-10-12 Robert Millan <rmh.grub@aybabtu.com>
1575
1576 * term/tparm.c: Switch to GPLv3.
1577
86564c26 15782009-10-09 Robert Millan <rmh.grub@aybabtu.com>
1579
1580 * include/grub/i386/cpuid.h: Add header protection.
1581
5c936493 15822009-10-09 Robert Millan <rmh.grub@aybabtu.com>
1583
1584 Fail gracefuly when attempting to load 64-bit kFreeBSD on IA32 CPU.
1585
1586 * include/grub/i386/cpuid.h: New file.
1587 * commands/i386/cpuid.c: Include `<grub/i386/cpuid.h>'.
1588 (has_longmode): Rename to ...
1589 (grub_cpuid_has_longmode): ... this. Update all users. Remove
1590 `static' attribute.
1591 * loader/i386/bsd.c: Include `<grub/i386/cpuid.h>'.
1592 (grub_bsd_load_elf): Fail if load of 64-bit kernel was requested
1593 on a CPU that doesn't implement AMD64 instruction set.
1594
186e7cf2 15952009-10-06 Colin Watson <cjwatson@ubuntu.com>
1596
1597 * Makefile.in (docs/stamp-vti): Depend on configure.ac as well, so
1598 that version.texi is rebuilt on version number changes.
1599
83b65c4a 16002009-10-06 Colin Watson <cjwatson@ubuntu.com>
1601
1602 * Makefile.in: Don't set info_INFOS unless makeinfo was found.
1603 Fixes bug #27602.
1604
d244281c 16052009-10-06 Colin Watson <cjwatson@ubuntu.com>
1606
1607 * util/i386/pc/grub-install.in: Source
1608 ${libdir}/grub/grub-mkconfig_lib before option processing, in order
1609 that the --grub-probe option will work.
1610 * util/sparc64/ieee1275/grub-install.in: Likewise.
1611
da25306d 16122009-10-05 Robert Millan <rmh.grub@aybabtu.com>
1613
1614 * configure.ac: Bump version to 1.97~beta4.
1615
e8ee83c0 16162009-10-03 Robert Millan <rmh.grub@aybabtu.com>
1617
1618 Resync grub-mkdevicemap in x86_64-efi.
1619
1620 * conf/x86_64-efi.rmk (sbin_UTILITIES): Enable `grub-mkdevicemap'.
1621 (grub_mkdevicemap_SOURCES): Add missing `util/deviceiter.c' and
1622 `util/devicemap.c'.
1623
50dcabcf 16242009-10-01 Colin Watson <cjwatson@ubuntu.com>
1625
1626 * util/grub-editenv.c (create_envblk_file): Write new block with a
1627 .new suffix and then rename it into place, to ensure atomic
1628 creation.
1629
0e51c3a7 16302009-09-28 Robert Millan <rmh.grub@aybabtu.com>
1631
1632 Do not automatically install headers.
1633
1634 * Makefile.in (include_DATA): Remove. Update all users.
1635
31299a95 16362009-09-26 Robert Millan <rmh.grub@aybabtu.com>
1637
1638 * conf/common.rmk (pkglib_MODULES): Remove `lua.mod'.
1639 (lua_mod_SOURCES, lua_mod_CFLAGS, lua_mod_LDFLAGS): Remove.
1640
1641 * util/osdetect.lua: Remove.
1642 * script/lua/lauxlib.c: Likewise.
1643 * script/lua/ldebug.c: Likewise.
1644 * script/lua/grub_main.c: Likewise.
1645 * script/lua/lauxlib.h: Likewise.
1646 * script/lua/ldebug.h: Likewise.
1647 * script/lua/ltablib.c: Likewise.
1648 * script/lua/liolib.c: Likewise.
1649 * script/lua/lstrlib.c: Likewise.
1650 * script/lua/lualib.h: Likewise.
1651 * script/lua/ldo.c: Likewise.
1652 * script/lua/ldump.c: Likewise.
1653 * script/lua/ldo.h: Likewise.
1654 * script/lua/loslib.c: Likewise.
1655 * script/lua/lundump.c: Likewise.
1656 * script/lua/grub_lib.c: Likewise.
1657 * script/lua/ldblib.c: Likewise.
1658 * script/lua/lundump.h: Likewise.
1659 * script/lua/lmem.c: Likewise.
1660 * script/lua/grub_lib.h: Likewise.
1661 * script/lua/lmathlib.c: Likewise.
1662 * script/lua/lstate.c: Likewise.
1663 * script/lua/ltm.c: Likewise.
1664 * script/lua/lvm.c: Likewise.
1665 * script/lua/lmem.h: Likewise.
1666 * script/lua/lstate.h: Likewise.
1667 * script/lua/ltm.h: Likewise.
1668 * script/lua/ltable.c: Likewise.
1669 * script/lua/lvm.h: Likewise.
1670 * script/lua/llex.c: Likewise.
1671 * script/lua/lgc.c: Likewise.
1672 * script/lua/grub_lua.h: Likewise.
1673 * script/lua/loadlib.c: Likewise.
1674 * script/lua/lfunc.c: Likewise.
1675 * script/lua/lopcodes.c: Likewise.
1676 * script/lua/lparser.c: Likewise.
1677 * script/lua/ltable.h: Likewise.
1678 * script/lua/llex.h: Likewise.
1679 * script/lua/lgc.h: Likewise.
1680 * script/lua/lfunc.h: Likewise.
1681 * script/lua/lbaselib.c: Likewise.
1682 * script/lua/lopcodes.h: Likewise.
1683 * script/lua/lparser.h: Likewise.
1684 * script/lua/lzio.c: Likewise.
1685 * script/lua/linit.c: Likewise.
1686 * script/lua/lobject.c: Likewise.
1687 * script/lua/llimits.h: Likewise.
1688 * script/lua/lstring.c: Likewise.
1689 * script/lua/lzio.h: Likewise.
1690 * script/lua/lapi.c: Likewise.
1691 * script/lua/lcode.c: Likewise.
1692 * script/lua/lua.h: Likewise.
1693 * script/lua/lobject.h: Likewise.
1694 * script/lua/lstring.h: Likewise.
1695 * script/lua/lapi.h: Likewise.
1696 * script/lua/lcode.h: Likewise.
1697 * script/lua/luaconf.h: Likewise.
1698
cb8a2c38 16992009-09-26 Colin Watson <cjwatson@ubuntu.com>
1700
1701 * docs/grub.texi (Command-line and menu entry commands): Document
1702 date and echo commands.
1703
6b9b6276 17042009-09-24 Pavel Roskin <proski@gnu.org>
1705
1706 * include/grub/kernel.h (struct grub_module_header): Remove
1707 `grub_module_header_types'. Make `type' unsigned. Make `size'
1708 32-bit on all platforms.
1709 * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
1710 8-bit field. Use grub_host_to_target32() for `size'.
1711 * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
1712 * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
1713 * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
1714
4e5a02a7 17152009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1716
1717 Fix "lost keypress" bug in at_keyboard.
1718
1719 * term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
1720 Checks for readyness of input buffer (without flushing it).
1721 (grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
1722 than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
1723
c6dcedf6 17242009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1725
1726 * util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
1727 size check within GRUB_MACHINE_PCBIOS section.
1728
74c958b1 17292009-09-24 Robert Millan <rmh.grub@aybabtu.com>
1730
1731 * include/grub/i386/at_keyboard.h (KEYBOARD_ISREADY): Negate
1732 return value.
1733 * term/i386/pc/at_keyboard.c (grub_keyboard_getkey): Negate
1734 KEYBOARD_ISREADY check.
1735 (grub_at_keyboard_checkkey): Rename to ...
1736 (grub_at_keyboard_getkey_noblock): ... this. Update all users.
1737 Remove gratuitous cast.
1738
ff420223 17392009-09-23 Colin Watson <cjwatson@ubuntu.com>
1740
1741 * configure.ac: Call AC_PROG_MKDIR_P.
1742 * Makefile.in (docs/stamp-vti): Create docs directory. Create
1743 version.texi in $(builddir) rather than $(srcdir).
1744 (docs/grub.info): Create docs directory. Prepend $(builddir)/docs
1745 to makeinfo's @include search path.
1746
d96875df 17472009-09-23 Felix Zielcke <fzielcke@z-51.de>
1748
1749 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'
1750
9b3f8365 17512009-09-23 Felix Zielcke <fzielcke@z-51.de>
1752
1753 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
1754 for `*.dpkg-new'.
1755
c44c90db 17562009-09-21 Colin Watson <cjwatson@ubuntu.com>
1757
1758 Build info documentation. Some code borrowed from Automake.
1759
1760 * configure.ac: Check for makeinfo.
1761 * Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
1762 (MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
1763 docs/version.texi.
1764 (MOSTLYCLEANFILES): Add vti.tmp.
1765 (docs/version.texi, docs/stamp-vti): Update automatically.
1766 (docs/grub.info): Build info documentation. Use --force and ignore
1767 errors for now.
1768 (all-local): Add $(INFOS).
1769 (install-local): Install info files.
1770 (uninstall): Uninstall info files.
1771 * docs/version.texi: Remove from revision control. This file is
1772 automatically generated on build now.
1773 * gendistlist.sh: Add `*.info'.
1774
e0b37bb5 17752009-09-21 Felix Zielcke <fzielcke@z-51.de>
1776
1777 * kern/term.c: Fix indentation.
1778
5a78865b 17792009-09-21 Felix Zielcke <fzielcke@z-51.de>
1780
1781 * util/hostdisk.c: Fix a comment.
1782
dace7e8a 17832009-09-20 Robert Millan <rmh.grub@aybabtu.com>
1784
1785 Fix regression introduced in r2539.
1786
1787 * term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
1788 to 0xA1.
1789
a83d079b 17902009-09-19 Colin Watson <cjwatson@ubuntu.com>
1791
1792 * util/grub.d/30_os-prober.in: Don't throw away stderr from
4cbbccec 1793 os-prober. Under normal operation, it does not print anything to
1794 stderr; if it does, we need to debug it, and throwing away stderr
1795 makes that excessively difficult.
a83d079b 1796
be94a509 17972009-09-16 Vladimir Serbinenko <phcoder@gmail.com>
1798
1799 * mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.
1800
63f745e8 18012009-09-16 Robert Millan <rmh.grub@aybabtu.com>
1802
1803 * aclocal.m4 (AC_LANG_PROGRAM): New macro. Overrides stock
1804 AC_LANG_PROGRAM from autoconf.
1805 (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
1806 prototypes (fixes warning).
1807
1808 * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
1809 `--disable-werror' was used.
1810
bbb2a70f 18112009-09-16 Robert Millan <rmh.grub@aybabtu.com>
1812
1813 * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
1814 uninitialized `lastaddr'.
1815
77c24f1d 18162009-09-15 Vladimir Serbinenko <phcoder@gmail.com>
1817
0f0b8c87 1818 * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
77c24f1d 1819
07197f23 18202009-09-14 Colin Watson <cjwatson@ubuntu.com>
1821
1822 * commands/test.c (get_fileinfo): Return immediately if
1823 grub_fs_probe fails.
1824
dabf1798 18252009-09-14 José Martínez <xosemp@gmail.com>
1826
1827 * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
1828
d52109a7 18292009-09-14 Colin Watson <cjwatson@ubuntu.com>
1830
1831 * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
1832 output.
1833
56532179 18342009-09-13 Robert Millan <rmh.grub@aybabtu.com>
1835
1836 * configure.ac: Remove --enable-grub-pe2elf. Only build
1837 grub-pe2elf when needed by the build system itself.
1838 * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
1839
8ef070f5 18402009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1841
1842 * configure.ac: Bump version to 1.97~beta3.
1843 * docs/version.texi: Likewise.
1844
61229557 18452009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1846
1847 * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
1848 mode special handling (grub_vbe_bios_set_dac_palette_width() call)
1849 from here ...
1850 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
1851 (grub_linux_setup_video): ... to here (with some adjustments).
1852
5c9f8d84 18532009-09-12 Robert Millan <rmh.grub@aybabtu.com>
1854
1855 Fix memory corruption issue (spotted by Colin Watson).
1856
1857 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
1858 causing returned size to be stored in an incorrect memory location.
1859 Fix use of uninitialized value when storing the returned size.
1860
e8f5d6e9 18612009-09-12 Yves Blusseau <blusseau@zetam.org>
1862
1863 Change clean rules to properly remove files
1864
1865 * genmk.rb: add new clean rules
1866 * Makefile.in (clean): add the new targets
1867 (mostlyclean): likewise
1868
cda2a409 18692009-09-11 Colin Watson <cjwatson@ubuntu.com>
1870
1871 * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
1872 to grub_uint64_t.
1873 * fs/ntfs.c (init_file): Understand 64-bit sizes for
1874 non-resident files.
1875
86695375 18762009-09-11 Colin Watson <cjwatson@ubuntu.com>
1877
1878 * configure.ac: Don't look for help2man when cross-compiling. Fixes
1879 part of bug #27349.
1880
8aa1541a 18812009-09-10 Felix Zielcke <fzielcke@z-51.de>
1882
1883 * util/grub-mkconfig.in: Make the created config mode 400 and
1884 print a warning if it fails.
1885
48d9bb0a 18862009-09-10 Robert Millan <rmh.grub@aybabtu.com>
1887
1888 * util/grub.d/40_custom.in: Ask user to type custom entries below
1889 comment, rather than below 'exec tail' line.
1890
3b0521be 18912009-09-10 Colin Watson <cjwatson@ubuntu.com>
1892
1893 * util/grub.d/40_custom.in: Make sure that the explanatory text is
1894 visible in grub.cfg.
1895
50051d55 18962009-09-10 Colin Watson <cjwatson@ubuntu.com>
1897
1898 * util/grub.d/40_custom.in: Make it a little clearer how to use this
1899 file.
1900
c0d34387 19012009-09-10 Felix Zielcke <fzielcke@z-51.de>
1902
1903 * docs/grub.cfg: Add an example menu entry for memtest86+.
1904
80a608f3 19052009-09-09 Felix Zielcke <fzielcke@z-51.de>
1906
a2094832 1907 * config.guess: Update to latest version from config git.
80a608f3 1908 * config.sub: Likewise.
1909
99423078 19102009-09-08 Colin Watson <cjwatson@ubuntu.com>
1911
1912 * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
1913 unknown-command case. Fixes bug #27320.
1914
44454e4c 19152009-09-08 Felix Zielcke <fzielcke@z-51.de>
1916
1917 * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
1918 `help' if the command exists.
1919
e30d87ad 19202009-09-06 Robert Millan <rmh.grub@aybabtu.com>
1921
1922 * INSTALL: Require GCC 4.1.3 or later.
1923
9a86f1ec 19242009-09-06 Yves Blusseau <blusseau@zetam.org>
1925
1926 * Makefile.in (RMKFILES): add i386-qemu.rmk
1927 (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
1928 $(srcdir)/stamp-h.in
1929
7f26d466 19302009-09-05 Robert Millan <rmh.grub@aybabtu.com>
1931
1932 * util/grub-probe.c (probe): Comment out buggy codepath, which
1933 was unexpectedly enabled by Colin Watson's 2009-09-02 fix. This
1934 should be re-enabled after 1.97.
1935
3a613259 19362009-09-05 Felix Zielcke <fzielcke@z-51.de>
1937
1938 * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
1939 find searches for.
1940
197f76c7 19412009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
1942
1943 * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
1944 unnecessary calls to grub_error.
1945
70ba68ce 19462009-09-04 Colin Watson <cjwatson@ubuntu.com>
1947
1948 * NEWS: Mention `keystatus' and Unicode fonts.
1949
4ff0d7a4 19502009-09-04 Robert Millan <rmh.grub@aybabtu.com>
1951
1952 * configure.ac: Bump version to 1.97~beta2.
1953 * docs/version.texi: Likewise.
1954
77c55a87 19552009-09-03 Colin Watson <cjwatson@ubuntu.com>
1956
1957 * configure.ac: By default, GCC 4.4 generates .eh_frame sections
1958 containing unwind information in some cases where it previously did
1959 not. Use -fno-dwarf2-cfi-asm if available to restore the old
1960 behaviour. See http://patchwork.kernel.org/patch/8555/ for related
1961 discussion.
1962
f79572cd 19632009-09-02 Yves BLUSSEAU <blusseau@zetam.org>
1964
1965 Embedding loadenv module into grub-emu
1966
1967 * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
1968 commands/loadenv.c
1969 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
1970 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
1971 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
1972 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
1973 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
1974 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
1975
93a81088 19762009-09-03 Magnus Granberg <zorry@ume.nu>
1977
1978 * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
1979 include -fPIE in the default specs.
1980 * configure.ac: Check if pie_possible is yes and add -fno-PIE
1981 to TARGET_CFLAGS.
1982
160034b2 19832009-09-03 Felix Zielcke <fzielcke@z-51.de>
1984
1985 * INSTALL: Note that GNU Bison 2.3 or later is required.
1986
087c07c4 19872009-09-03 Colin Watson <cjwatson@ubuntu.com>
1988
1989 * kern/i386/pc/startup.S: Fix typo.
1990
cbf978c0 19912009-09-02 Vladimir Serbinenko <phcoder@gmail.com>
1992
1993 * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
1994 according to GCS.
1995
19962009-09-02 Colin Watson <cjwatson@ubuntu.com>
f0910644 1997
1998 * docs/grub.texi (Naming convention): Describe one-based partition
1999 numbering.
2000 (Device syntax): Likewise.
2001 (File name syntax): Likewise.
2002 (Block list syntax): Likewise.
2003 (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
2004 menu.lst.
2005 (File name syntax): Likewise.
2006 (Command-line and menu entry commands): Document acpi, blocklist,
2007 crc, export, insmod, keystatus, ls, set, and unset commands.
2008
f3e8cdfd 20092009-09-02 Colin Watson <cjwatson@ubuntu.com>
2010
2011 * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
2012 to avoid implying that only one of --shift, --ctrl, or --alt may be
2013 used.
2014
c0bc232b 20152009-09-02 Colin Watson <cjwatson@ubuntu.com>
2016
2017 * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
2018 rather than comparing against S_IFREG, which will almost never work.
2019
aa0f752d 20202009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
2021
2022 * commands/loadenv.c (check_blocklists): Fix off-by-one error.
2023 (write_blocklists): Likewise.
2024
ecb3166a 20252009-09-01 Colin Watson <cjwatson@ubuntu.com>
2026
2027 * script/lua/grub_lua.h (fputs): Supply a format string as the first
2028 argument to grub_printf.
2029
c403a125 20302009-09-01 Felix Zielcke <fzielcke@z-51.de>
31aba781 2031
2032 * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
c403a125 2033 non GNU test.
31aba781 2034
b5e7312c 20352009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
2036
2037 * kern/file.c (grub_file_read): Spelling fix
2038
fe00f472 20392009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
2040
2041 * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
2042 loading of headers in some cases.
2043
cc55302e 20442009-08-30 Robert Millan <rmh.grub@aybabtu.com>
2045
2046 * configure.ac: Bump version to 1.97~beta1.
2047 * docs/version.texi: Likewise.
2048
5c90cdd2 20492009-08-29 Vladimir Serbinenko <phcoder@gmail.com>
64bf71d0 2050
2051 * include/grub/i386/xnu.h: Add license header.
2052 include grub/err.h explicitly.
2053
c90edae4 20542009-08-29 Robert Millan <rmh.grub@aybabtu.com>
2055
2056 * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
2057 to `ufs' in the vfs.root.mountfrom kernel parameter.
2058
d8888b5c 20592009-08-29 Robert Millan <rmh.grub@aybabtu.com>
2060
2061 * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
2062
2063 [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
2064 value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
2065
2066 [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
2067 `ARRAY_SIZE' macro.
2068
6f07b921 20692009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
2070
2071 * kern/file.c (grub_file_read): Check offset.
2072 * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
2073 * fs/jfs.c (grub_jfs_read_file): Likewise.
2074 * fs/ntfs.c (grub_ntfs_read): Likewise.
2075 * fs/reiserfs.c (grub_reiserfs_read): Likewise.
2076 * fs/minix.c (grub_minix_read_file): Correct offset check.
2077 * fs/ufs.c (grub_ufs_read_file): Likewise.
2078
b4f34077 20792009-08-28 Colin Watson <cjwatson@ubuntu.com>
2080
2081 * term/i386/pc/console.c (bios_data_area): Cast
2082 GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
2083
e7c69859 20842009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
2085
2086 1-bit optimised blitters.
2087
2088 * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
2089 prototype.
2090 (grub_video_fbblit_replace_24bit_1bit): Likewise.
2091 (grub_video_fbblit_replace_16bit_1bit): Likewise.
2092 (grub_video_fbblit_replace_8bit_1bit): Likewise.
2093 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
2094 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
2095 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
2096 * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
2097 function.
2098 (grub_video_fbblit_replace_24bit_1bit): Likewise.
2099 (grub_video_fbblit_replace_16bit_1bit): Likewise.
2100 (grub_video_fbblit_replace_8bit_1bit): Likewise.
2101 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
2102 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
2103 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
2104 * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
2105 when possible.
2106 * video/video.c (grub_video_get_blit_format): Return
2107 GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
2108
a57da43f 21092009-08-28 Colin Watson <cjwatson@ubuntu.com>
2110
2111 * normal/cmdline.c (grub_cmdline_get): Supply a format string as
2112 the first argument to grub_printf.
2113
4cbe67e5 21142009-08-28 Colin Watson <cjwatson@ubuntu.com>
21152009-08-28 Robert Millan <rmh.grub@aybabtu.com>
2116
2117 Add `getkeystatus' terminal method. Add a new `keystatus' command
2118 to query it.
2119
2120 * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
2121 GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
2122 modifier key bitmasks.
2123 (struct grub_term_input): Add `getkeystatus' member.
2124 (grub_getkeystatus): Add prototype.
2125 * kern/term.c (grub_getkeystatus): New function.
2126
2127 * include/grub/i386/pc/memory.h
2128 (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
2129 (struct grub_machine_bios_data_area): Define necessary parts of BIOS
2130 Data Area layout.
2131 * term/i386/pc/console.c (grub_console_getkeystatus): New function.
2132 (grub_console_term_input): Set `getkeystatus' member.
2133 * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
2134 constants.
2135 (grub_usb_keyboard_getreport): Likewise.
2136 (grub_usb_keyboard_checkkey): Likewise.
2137 (grub_usb_keyboard_getkeystatus): New function.
2138 (grub_usb_keyboard_term): Set `getkeystatus' member.
2139
2140 * commands/keystatus.c: New file.
2141 * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
2142 (keystatus_mod_SOURCES): New variable.
2143 (keystatus_mod_CFLAGS): Likewise.
2144 (keystatus_mod_LDFLAGS): Likewise.
2145 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
2146 commands/keystatus.c.
2147 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2148 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2149 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2150 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2151 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2152 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4cbe67e5 2153
6e2a9085 21542009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
2155
2156 Split befs.mod and afs.mod into *_be.mod and *.mod
2157
2158 * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
2159 (grub_fstest_SOURCES): Likewise.
2160 (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
2161 (afs_be_mod_SOURCES): New variable.
2162 (afs_be_mod_CFLAGS): Likewise.
2163 (afs_be_mod_LDFLAGS): Likewise.
2164 (befs_be_mod_SOURCES): Likewise.
2165 (befs_be_mod_CFLAGS): Likewise.
2166 (befs_be_mod_LDFLAGS): Likewise.
2167 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
2168 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2169 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2170 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
2171 (grub_emu_SOURCES): Likewise.
2172 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2173 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2174 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2175 * fs/afs_be.c: New file.
2176 * fs/befs_be.c: New file.
2177 * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
2178 (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
2179 (U16): Replaced with ...
2180 (grub_afs_to_cpu16): ...this. All users updated.
2181 (U32): Replaced with ...
2182 (grub_afs_to_cpu32): ...this. All users updated.
2183 (U64): Replaced with ...
2184 (grub_afs_to_cpu64): ...this. All users updated.
2185 (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
2186 (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
ad8ea1f4 2187 (grub_afs_validate_sblock): Check only one endianness.
6e2a9085 2188 (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
2189 (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
2190 (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
2191 (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
2192 (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
2193 (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
2194 (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
2195 (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
2196
32a71655 21972009-08-26 Bean <bean123ch@gmail.com>
2198
2199 * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
2200 64-bit number.
2201 (GRUB_XFS_FSB_TO_BLOCK): Likewise.
2202 (grub_xfs_inode_block): Change return type to grub_uint64_t.
2203 (grub_xfs_read_inode): Change type of block to grub_uint64_t.
2204
552bf6c5 22052009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
2206
2207 NetBSD memory map support.
2208
2209 * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
2210 (grub_netbsd_btinfo_mmap_header): New structure.
2211 (grub_netbsd_btinfo_mmap_entry): Likewise.
2212 * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
2213
1ae2078c 22142009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
2215
2216 Enable bsd.mod on coreboot.
2217
2218 * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
2219 (bsd_mod_SOURCES): New variable.
2220 (bsd_mod_CFLAGS): Likewise.
2221 (bsd_mod_LDFLAGS): Likewise.
2222 (bsd_mod_ASFLAGS): Likewise.
2223 * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
2224 (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
2225
beefc598 22262009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
2227
2228 Cleanup NetBSD root support.
2229
2230 * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
2231 grub_bsd_get_device.
2232 Fix typo.
2233
3b76e68b 22342009-08-25 Felix Zielcke <fzielcke@z-51.de>
2235
2236 * util/grub.d/00_header.in: Move check for the video backend of
2237 gfxterm from here ...
2238 * util/grub-mkconfig.in: ... to here. Enable gfxterm if there's
2239 a suitable video backend.
2240
aea664ea 22412009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
2242
2243 Fix breakage in grub-setup.
2244
2245 * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
2246 "msdos_partition_map".
2247
ff747d50 22482009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
2249
2250 Fix breakage in normal/auth.c.
2251
2252 * normal/auth.c (grub_iswordseparator): New function.
2253
e7e1f93f 22542009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
2255
2256 Authentication support.
2257
2258 * commands/password.c: New file.
2259 * conf/common.rmk (pkglib_MODULES): Add password.mod.
2260 (password_mod_SOURCES): New variable.
2261 (password_mod_CFLAGS): Likewise.
2262 (password_mod_LDFLAGS): Likewise.
2263 (normal_mod_SOURCES): Add normal/auth.c.
2264 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
2265 normal/auth.c.
2266 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2267 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2268 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2270 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2271 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2272 * include/grub/auth.h: New file.
2273 * include/grub/err.h (grub_err_t): New enum value
2274 GRUB_ERR_ACCESS_DENIED.
2275 * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
2276 'users'.
2277 * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
2278 * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
2279 users updated.
2280 * normal/auth.c: New file.
2281 * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
2282 (grub_cmdline_run): Don't allow to go to command line without
2283 authentication.
2284 * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
2285 * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
2286 menuentry without superuser rights.
2287 * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
2288 user isn't a superuser.
2289
70f1161d 22902009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
2291
2292 Save space by inlining misc.c functions.
2293
2294 * kern/misc.c (grub_iswordseparator): Made static.
2295 * kern/misc.c (grub_strcat): Moved from here ...
2296 * include/grub/misc.h (grub_strcat): ... here. Inlined.
2297 * kern/misc.c (grub_strncat): Moved from here ...
2298 * include/grub/misc.h (grub_strncat): ... here. Inlined.
2299 * kern/misc.c (grub_strcasecmp): Moved from here ...
2300 * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
2301 * kern/misc.c (grub_strncasecmp): Moved from here ...
2302 * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
2303 * kern/misc.c (grub_isalpha): Moved from here ...
2304 * include/grub/misc.h (grub_isalpha): ... here. Inlined.
2305 * kern/misc.c (grub_isdigit): Moved from here ...
2306 * include/grub/misc.h (grub_isdigit): ... here. Inlined.
2307 * kern/misc.c (grub_isgraph): Moved from here ...
2308 * include/grub/misc.h (grub_isgraph): ... here. Inlined.
2309 * kern/misc.c (grub_tolower): Moved from here ...
2310 * include/grub/misc.h (grub_tolower): ... here. Inlined.
2311
48e40bff 23122009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
2313
2314 * script/sh/function.c (grub_script_function_find): Cut error message
2315 not to flood terminal.
2316 * script/sh/lexer.c (grub_script_yylex): Remove command line length
2317 limit.
2318 * script/sh/script.c (grub_script_arg_add): Duplicate string.
2319
c385bfc3 23202009-08-24 Colin Watson <cjwatson@ubuntu.com>
2321
2322 * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
2323 `report' grub_uint8_t *.
2324 (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
2325 Use a 50-millisecond timeout rather than just repeating
2326 grub_usb_keyboard_getreport 50 times.
2327 (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
2328
2d21e3e8 23292009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
2330
2331 Rename *_partition_map to part_*
2332
2333 * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
2334 * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
2335 * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
2336 * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
2337 All users updated.
2338 * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
2339 All users updated.
2340 * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
2341 * util/grub-probe.c (probe_partmap): Don't transform partition name
2342 to get module name.
2343
dd103c4e 23442009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
2345
2346 Fix OpenBSD and NetBSD support.
2347
2348 * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
2349 memory address conflict.
2350 (OPENBSD_MMAP_ACPI): New definition.
2351 (OPENBSD_MMAP_NVS): Likewise.
2352 * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
2353 and OPENBSD_MMAP_NVS.
2354 Add memory map terminator
2355 Explicit cast when calling grub_unix_real_boot.
ad8ea1f4 2356 (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
dd103c4e 2357
16c84d74 23582009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
2359
2360 Let user specify NetBSD root device.
2361
2362 * loader/i386/bsd.c (netbsd_root): New variable.
2363 (netbsd_opts): New option 'root'.
2364 (NETBSD_ROOT_ARG): New macro.
2365 (grub_netbsd_boot): Use 'netbsd_root'.
2366 (grub_bsd_unload): Free 'netbsd_root'.
2367 (grub_cmd_netbsd): Fill 'netbsd_root'.
2368
adb29902 23692009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
2370
2371 Support for 64-bit NetBSD.
2372
2373 * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
2374 point when booting non-FreeBSD.
2375
f5ae9f74 23762009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
2377
2378 Support --no-smp and --no-acpi for NetBSD.
2379
2380 * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
2381 (NETBSD_AB_NOACPI): Likewise.
2382 * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
2383 (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
2384
de74f136 23852009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
2386
2387 * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
2388 errors.
2389 (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
2390 errors. Call grub_error when needed.
2391
e9a925da 23922009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
2393
2394 * commands/search.c (search_fs): Try searching without autoload first.
2395 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
2396 filesystem module explicitly for faster booting.
2397
5174302b 23982009-08-23 Colin Watson <cjwatson@ubuntu.com>
2399
2400 * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
2401
c8c80635 24022009-08-23 Colin Watson <cjwatson@ubuntu.com>
2403
2404 * util/grub.d/30_os-prober.in: Disable os-prober if
2405 `GRUB_DISABLE_OS_PROBER' was set to true.
2406
71acf5e5 24072009-08-23 Robert Millan <rmh.grub@aybabtu.com>
2408
2409 * partmap/pc.c: Rename to ...
2410 * partmap/msdos.c: ... this. Update all users.
2411 (grub_pc_partition_map): Rename to ...
2412 (grub_msdos_partition_map): ... this. Update all users.
2413
2414 * parttool/pcpart.c: Rename to ...
2415 * parttool/msdospart.c: ... this. Update all users.
2416
2417 * include/grub/pc_partition.h: Rename to ...
2418 * include/grub/msdos_partition.h: ... this. Update all users.
2419 (grub_pc_partition_bsd_entry): Rename to ...
2420 (grub_msdos_partition_bsd_entry): ... this. Update all users.
2421 (grub_pc_partition_disk_label): Rename to ...
2422 (grub_msdos_partition_disk_label): ... this. Update all users.
2423 (grub_pc_partition_entry): Rename to ...
2424 (grub_msdos_partition_entry): ... this. Update all users.
2425 (grub_pc_partition_mbr): Rename to ...
2426 (grub_msdos_partition_mbr): ... this. Update all users.
2427 (grub_pc_partition): Rename to ...
2428 (grub_msdos_partition): ... this. Update all users.
2429 (grub_pc_partition_is_empty): Rename to ...
2430 (grub_msdos_partition_is_empty): ... this. Update all users.
2431 (grub_pc_partition_is_extended): Rename to ...
2432 (grub_msdos_partition_is_extended): ... this. Update all users.
2433 (grub_pc_partition_is_bsd): Rename to ...
2434 (grub_msdos_partition_is_bsd): ... this. Update all users.
2435
2436 * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
2437 (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
2438 (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
2439 (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
2440 (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
2441 (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
2442 (gpt_mod_LDFLAGS): Rename to ...
2443 (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
2444 (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
2445 (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
2446 (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
2447 (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
2448 (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
2449 (part_gpt_mod_LDFLAGS): ... this.
2450 (pkglib_MODULES): Prefix partition modules with `part_'. Rename
2451 `pcpart.mod' to `msdospart.mod'.
2452 (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
2453 to ...
2454 (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
2455 (msdospart_mod_LDFLAGS): ... this.
2456
c11fded5 24572009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
2458
2459 * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
2460 (openbsd_opts): Likewise.
2461 (netbsd_opts): Likewise.
2462 (freebsd_flags): Added 0 terminator.
2463 (openbsd_flags): Likewise.
2464 (netbsd_flags): Likewise.
2465 (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
2466 (grub_cmd_freebsd): Transformed into extended command.
2467 (grub_cmd_openbsd): Likewise.
2468 (grub_cmd_netbsd): Likewise.
2469 (cmd_freebsd): Changed type to grub_extcmd_t.
2470 (cmd_openbsd): Likewise.
2471 (cmd_netbsd): Likewise.
2472 (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
2473 grub_cmd_openbsd as extended commands.
2474 (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
2475 cmd_netbsd and cmd_openbsd
2476
11d1c769 24772009-08-22 Vladimir Serbinenko <phcoder@gmail.com>
2478
2479 * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
2480
7a9094e5 24812009-08-21 Pavel Roskin <proski@gnu.org>
2482
5496c37e 2483 * Makefile.in (install-local): When checking if a file is in the
2484 build directory, use "test -e" to detect symlinks.
2485
7a9094e5 2486 * Makefile.in (install-local): Remove all files in
2487 $(DESTDIR)$(pkglibdir) before installing new files there.
2488
e53cea11 24892009-08-18 Felix Zielcke <fzielcke@z-51.de>
2490
2491 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
2492 grub-mkelfimage.
2493
9aced544 24942009-08-18 Felix Zielcke <fzielcke@z-51.de>
2495
2496 * util/grub-mkconfig.in: Don't use gfxterm by default if not
2497 explicitly specified by the user.
2498
b7da6bab 24992009-08-18 Pavel Roskin <proski@gnu.org>
2500
2501 * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
2502 grub_uint8_t pointer for data.
2503 * include/grub/fbutil.h (struct grub_video_fbblit_info):
2504 Likewise.
2505 * video/fb/fbutil.c: Remove unnecessary casts.
2506
19f1b335 25072009-08-17 Michal Suchanek <hramrach@centrum.cz>
2508
2509 VBE cleanup.
2510
2511 * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
2512 (grub_vbe_set_video_mode): Save active mode info
2513 only after setting the mode.
2514 (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
2515 second argument.
2516
2f467aa9 25172009-08-17 Michal Suchanek <hramrach@centrum.cz>
2518
2519 Rename variables for clarity.
2520
2521 * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
2522 (active_vbe_mode_info): ... this. All users updated.
2523 (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
2524 All users updated.
2525 (initial_mode): Rename to ...
2526 (initial_vbe_mode): ... this. All users updated.
2527 (mode_in_use): Rename to ..
2528 (vbe_mode_in_use): ... this. All users updated.
2529 (mode_list): Rename to ..
2530 (vbe_mode_list): ... this. All users updated.
2531 (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
2532 'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
2533 (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
2534 'mode_list_size' to 'vbe_mode_list_size'.
2535 (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
2536 'best_mode_info' to 'best_vbe_mode_info' and
2537 'best_mode' to 'best_vbe_mode'
2538
6025fcd7 25392009-08-17 Michal Suchanek <hramrach@centrum.cz>
2540
2541 Remove duplicate grub_video_fb_get_video_ptr.
2542
2543 * include/grub/fbutil.h (get_data_ptr): Rename to ...
2544 (grub_video_fb_get_video_ptr): ... this.
2545 * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
2546 * video/fb/fbutil.c: Add comment about addressing.
2547 (get_data_ptr): Rename to ...
2548 (grub_video_fb_get_video_ptr): ... this. All users updated.
2549 * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
2550
cc8c6faf 25512009-08-17 Robert Millan <rmh.grub@aybabtu.com>
2552
2553 * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
2554 grub_dprintf() that was just added.
2555
08aa61f0 25562009-08-17 Robert Millan <rmh.grub@aybabtu.com>
2557
2558 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
2559 (DEFAULT_VIDEO_MODE): Remove macros.
2560 (grub_linux_boot): Remove assumption that Linux has FB support,
2561 and use "text" as default video mode.
2562
7cef4f75 25632009-08-15 Vladimir Serbinenko <phcoder@gmail.com>
2564
2565 * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
2566 grub_dprintf.
2567 * fs/fat.c (grub_fat_read_data): Likewise.
2568
e1f39873 25692009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2570
2571 * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
2572 payload.
2573 (grub_module): Likewise.
2574
c166d79e 25752009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2576
2577 * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
2578 mbi->cmdline but free playground.
2579
c60cee8e 25802009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2581
2582 Handle group offset on UFS1.
2583
2584 * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
2585 (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
2586
c0d8b5d4 25872009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2588
2589 Split ufs.mod into ufs1.mod and ufs2.mod.
2590
2591 * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
2592 (grub_fstest_SOURCES): Likewise.
2593 (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
2594 (ufs_mod_SOURCES): Remove.
2595 (ufs_mod_CFLAGS): Likewise.
2596 (ufs_mod_LDFLAGS): Likewise.
2597 (ufs1_mod_SOURCES): New variable.
2598 (ufs1_mod_CFLAGS): Likewise.
2599 (ufs1_mod_LDFLAGS): Likewise.
25fbd77a 2600 (ufs2_mod_SOURCES): New variable.
2601 (ufs2_mod_CFLAGS): Likewise.
2602 (ufs2_mod_LDFLAGS): Likewise.
c0d8b5d4 2603 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
2604 * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
2605 Likewise.
2606 (grub_emu_SOURCES): Likewise.
2607 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2608 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2609 (grub_setup_SOURCES): Likewise.
2610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2611 * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
2612 (grub_setup_SOURCES): Likewise.
2613 * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
2614 Likewise.
2615 * fs/ufs2.c: New file.
2616 * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
2617
d3539132 26182009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2619
2620 Framebuffer split.
2621
2622 * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
2623 subsystem at the end.
2624 * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
2625 (video_fb_mod_SOURCES): New variable.
2626 (video_fb_mod_CFLAGS): Likewise.
2627 (video_fb_mod_LDFLAGS): Likewise.
2628 * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
2629 video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
2630 * video/i386/pc/vbeblit.c: Moved from here ...
2631 * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
2632 * video/i386/pc/vbefill.c: Moved from here ...
2633 * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
2634 * video/i386/pc/vbeutil.c: Moved from here ...
2635 * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
2636 * include/grub/i386/pc/vbeblit.h: Moved from here ...
2637 * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
2638 * include/grub/i386/pc/vbefill.h: Moved from here ...
2639 * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
2640 * include/grub/i386/pc/vbeutil.h: Moved from here ...
2641 * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
2642 * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
2643 * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
2644 * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
2645 (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
2646 (grub_video_adapter): Added 'get_info_and_fini'.
2647 (grub_video_get_info_and_fini): New prototype.
2648 (grub_video_set_mode): make modestring const char *.
2649 * loader/i386/linux.c (grub_linux_setup_video): Use
2650 grub_video_get_info_and_fini.
2651 (grub_linux_boot): Move modesetting just before booting.
2652 * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
2653 grub_video_get_info_and_fini.
2654 * video/i386/pc/vbe.c: Moved framebuffer part ...
2655 * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
2656 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
2657 grub_video_fbstd_colors and grub_video_fb_set_palette.
2658 (grub_video_vbe_init): Clear 'framebuffer' variable and use
2659 grub_video_fb_init.
2660 (grub_video_vbe_fini): Use grub_video_fb_fini.
2661 (grub_video_vbe_setup): Use framebuffer.render_target instead of
2662 render_target and use grub_video_fb_set_active_render_target and
2663 grub_video_fb_set_palette.
2664 (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
2665 (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
2666 (grub_video_vbe_adapter): Use framebuffer.
2667 * video/video.c (grub_video_get_info_and_fini): New function.
2668 (grub_video_set_mode): Make modestring const char *.
2669 (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
2670 values are already initialised.
2671
d404ee56 26722009-08-14 Pavel Roskin <proski@gnu.org>
2673
2674 * boot/i386/pc/cdboot.S: Use LOCAL for local labels. Eliminate
2675 ABS and APPLE_CC.
2676 * boot/i386/pc/diskboot.S: Likewise.
2677 * boot/i386/pc/lnxboot.S: Likewise. Hardcode the number of code
2678 sectors allow compilation on MacOSX.
2679 * conf/i386-pc.rmk: Enable unconditional compilation of
2680 lnxboot.img.
2681
9a10df16 26822009-08-13 Colin Watson <cjwatson@ubuntu.com>
2683
2684 * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
2685 * util/grub.d/00_header.in: Enter interruptible sleep if
2686 GRUB_HIDDEN_TIMEOUT is set.
2687
be3c9ca7 26882009-08-13 Yves Blusseau <blusseau@zetam.org>
2689
2690 * include/grub/symbol.h: Add the LOCAL macro.
2691 * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
2692 starting with "L_".
2693
1f9e557e 26942009-08-13 Pavel Roskin <proski@gnu.org>
2695
9ca62843 2696 * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
2697 any modern compilers we support.
2698
1f9e557e 2699 * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
2700 Use local labels starting with "L_" so that Apple assembler
2701 knows they are local.
2702
81623db6 27032009-08-10 Robert Millan <rmh.grub@aybabtu.com>
2704
2705 * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
2706 (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
2707 (bsd_kernel_types): ... this enum.
2708
2709 * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
2710 (grub_cmd_freebsd_module_elf): Abort with "You need to load the
2711 kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
2712
2713 (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
2714 (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
2715 (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
2716 messages.
2717
f5d35e7a 27182009-08-08 Robert Millan <rmh.grub@aybabtu.com>
2719
2720 * util/grub-dumpdevtree: Moved from here ...
2721 * util/i386/efi/grub-dumpdevtree: ... to here.
2722 (hexify): New function. Converts a string to its hex version.
2723 Generate hex versions of "efi" and "device-properties" by calling
2724 hexify() on the ASCII strings rather than by hardcoding numbers.
2725
d1e1d527 27262009-08-08 Robert Millan <rmh.grub@aybabtu.com>
2727
2728 * fs/jfs.c: Update copyright year.
2729
1ebbe064 27302009-08-08 Felix Zielcke <fzielcke@z-51.de>
2731
2732 * util/grub.d/00_header.in: Fix a comment.
2733 * util/grub.d/10_linux.in: Likewise.
2734 * util/grub.d/10_windows.in: Likewise.
2735 * util/grub.d/10_hurd.in: Likewise.
2736
a78c8d24 27372009-08-08 Felix Zielcke <fzielcke@z-51.de>
2738
2739 * util/grub-mkconfig.in: Allow the user to specify the used font
2740 with GRUB_FONT.
2741
29a6b9e8 27422009-08-08 Pavel Roskin <proski@gnu.org>
2743
b5f16cc4 2744 * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
2745 available, xfs.mod needs it now.
2746
2f5cb827 2747 * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
2748 the "g" modifier in sed when the intention is to strip something
2749 once. This fixes comparison of kernels with multiple dashes.
2750
29a6b9e8 2751 * util/grub-mkconfig.in: Define datarootdir, datadir may depend
2752 on it. Add missing space before closing bracket. Fix
2753 misleading formatting.
2754
892a3d98 27552009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2756
2757 * docs/grub.texi: Major overhaul. Remove all sections that are
2758 specific to GRUB Legacy, or mostly composed of Legacy-specific
2759 information.
2760
ed94253f 27612009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2762
2763 * docs/version.texi: New file. Provides version information for
2764 grub.texi.
2765
126d6628 27662009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2767
2768 * docs/grub.texi: Update CVS information to SVN.
2769 Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
2770
998b5aa9 27712009-08-07 Felix Zielcke <fzielcke@z-51.de>
2772
2773 * util/grub-mkconfig.in: Remove a wrong `fi'.
2774
818e094a 27752009-08-07 Felix Zielcke <fzielcke@z-51.de>
2776
2777 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
2778 (grub_jfs_uuid): New function.
2779 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
2780
b969c52f 27812009-08-07 Felix Zielcke <fzielcke@z-51.de>
2782
2783 * util/grub-mkconfig_lib.in (font_path): Move the functionality
2784 of it to ...
2785 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
2786 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
2787
7a4894cc 27882009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2789
2790 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
2791 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
2792 Update all users.
2793
2794 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
2795 not just "vmlinu[zx]".
2796 Moved from here ...
2797 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
2798 all users.
2799
2800 * util/grub.d/10_linux.in (find_latest): Moved from here ...
2801 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
2802 all users.
2803
4e2171f8 28042009-08-07 Robert Millan <rmh.grub@aybabtu.com>
2805
2806 * util/grub.d/10_freebsd.in: Use an absolute device path for
2807 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
2808
6dcfcb32 28092009-08-06 Felix Zielcke <fzielcke@z-51.de>
2810
2811 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
2812 handling of multiple abstraction modules.
2813
f56a8756 28142009-08-04 Robert Millan <rmh.grub@aybabtu.com>
2815
2816 Fix a bug resulting in black screen when loading Linux using a
2817 packed video mode.
2818
2819 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
2820 function.
2821
2822 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
2823 (grub_vbe_bios_getset_dac_palette_width): New function.
2824 (grub_vbe_bios_get_dac_palette_width)
2825 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
2826 grub_vbe_bios_getset_dac_palette_width()).
2827
2828 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
2829 check for return status.
2830 (grub_vbe_get_video_mode_info): When getting information for a packed
2831 mode (<= 8 bpp), obtain DAC palette width using
2832 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
2833 {red,green,blue}_mark_size.
2834
222671b2 28352009-08-04 Felix Zielcke <fzielcke@z-51.de>
2836
ecb1a6d9 2837 * commands/search.c (options): Fix help output to match actual code.
222671b2 2838
f84114f5 28392009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
2840
2841 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
2842 of homegrown code.
2843
bd288a20 28442009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
e768b770 2845
2846 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
2847 on XFS or ReiserFS.
2848
8aab5e25 28492009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
2850
2851 Support Apple partition map with sector size different from 512 bytes.
2852
2853 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
2854 (apple_partition_map_iterate): Respect 'aheader.blocksize'
2855 and 'apart.partmap_size'.
2856
6ad6258a 28572009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
28582009-08-01 Robert Millan <rmh.grub@aybabtu.com>
2859
2860 Fix cpuid command.
2861
2862 * commands/i386/cpuid.c (options): New variable.
2863 (grub_cmd_cpuid): Return real error.
2864 (GRUB_MOD_INIT(cpuid)): Declare options.
2865
67459bc6 28662009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
2867
2868 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
2869 valid.
2870
fbc6ab54 28712009-07-31 Bean <bean123ch@gmail.com>
2872
2873 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
2874 log2_inode.
2875 (grub_fshelp_node): Move inode field to the end.
2876 (grub_xfs_data): Remove inode field.
2877 (grub_xfs_inode_block): Calculate inode size using sblock.
2878 (grub_xfs_inode_offset): Likewise.
2879 (grub_xfs_read_inode): Calculate inode size using sblock.
2880 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
2881 (grub_xfs_iterate_dir): Calculate inode size using sblock.
2882 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
2883 to match inode size.
2884 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
2885 not accessible when data is null.
2886 (grub_xfs_open): Likewise.
2887
f45d6cfc 28882009-07-31 Bean <bean123ch@gmail.com>
2889
2890 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
2891 Don't change pv->disk if it's already set.
2892
2893 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
2894 (grub_raid_register): ... here.
2895 (grub_raid_rescan): Removed.
2896
2897 * include/grub/raid.h (grub_raid_rescan): Removed.
2898
2899 * util/grub-fstest.c: Remove include file <grub/raid.h>.
2900 (fstest): Replace grub_raid_rescan with module fini function followed
2901 by init function.
2902
2903 * util/grub-probe.c: Add include file <grub/raid.h>.
2904 (probe_raid_level): New function.
2905 (probe): Detect abstraction by walking the disk device, support two
2906 level of abstraction (LVM on RAID) when detecting partition map.
2907
24443b5a 29082009-07-31 Pavel Roskin <proski@gnu.org>
2909
2910 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
2911 to grub_zalloc(), it was erroneous.
2912 Reported by Bean <bean123ch@gmail.com>
2913
a275d9e7 29142009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
2915
2916 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
ad8ea1f4 2917 embedding zone, not only the first one.
a275d9e7 2918
56c5a47f 29192009-07-29 Joe Auricchio <jauricchio@gmail.com>
2920
2921 * term/gfxterm.c (clear_char): New function.
2922 (grub_virtual_screen_setup): Use clear_char.
2923 (scroll_up): Likewise.
2924 (grub_virtual_screen_cls): Likewise.
2925
67bb323a 29262009-07-29 Felix Zielcke <fzielcke@z-51.de>
2927
2928 * util/deviceiter.c (get_acceleraid_disk_name): New static
2929 function.
2930 (grub_util_iterate_devices): Handle Accelraid devices.
2931 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
2932
388a7c75 29332009-07-28 Robert Millan <rmh.grub@aybabtu.com>
2934
2935 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
2936 separator for the suggested gfxpayload string (';' collides with the
2937 parser and needs escaping).
2938
3bb7abcf 29392009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
2940
2941 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
2942 Clear direction flag before jumping to OS.
2943 (grub_multiboot2_real_boot): Likewise.
2944
2ddd36d7 29452009-07-28 Felix Zielcke <fzielcke@z-51.de>
2946
2947 * util/i386/pc/grub-install: Fix parsing of --disk-module
2948 option.
2949
c521b62b 29502009-07-28 Felix Zielcke <fzielcke@z-51.de>
2951
2952 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
2953 when embedding.
2954
880e0a0c 29552009-07-26 Felix Zielcke <fzielcke@z-51.de>
2956
2957 * util/grub-mkconfig.in (package_version): New variable.
2958 Use it do display the version.
2959
2366e356 29602009-07-25 Felix Zielcke <fzielcke@z-51.de>
2961
2962 * kern/file.c (grub_file_open): Revert to previous check with
2963 grub_errno.
2964
7ad8c80e 29652009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2966
2967 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
2968 from help line. It's out of sync with code.
2969
72b9658b 29702009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
2971
2972 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
2973 entries on failed boot.
2974
77435277 29752009-07-25 Felix Zielcke <fzielcke@z-51.de>
2976
2977 * kern/file.c (grub_file_open): Fix an error check.
2978
fcaa8b21 29792009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
2980
35d16c74 2981 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
2982 partition map couldn't be identified.
fcaa8b21 2983
48904cd1 29842009-07-23 Pavel Roskin <proski@gnu.org>
2985
ef3c317f 2986 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
2987 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
2988 case of little endian words becomes just an optimization.
2989 Respect const modifier.
ad8ea1f4 2990 (md5_final): Use code that doesn't depend on endianness.
ef3c317f 2991
48904cd1 2992 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
2993 to avoid loss of upper bits if align is unsigned and shorter
2994 than addr.
2995
260c9a89 29962009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
2997
2998 UUID support for UFS
2999
3000 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
3001 (grub_ufs_uuid): New function.
3002 (grub_ufs_fs): add .uuid
3003
f76ce889 30042009-07-21 Pavel Roskin <proski@gnu.org>
3005
3006 * kern/dl.c (grub_dl_check_header): Make static.
3007
6a6cbcaf 30082009-07-21 Felix Zielcke <fzielcke@z-51.de>
3009
3010 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
3011 add drivemap for Vista. It breaks Windows 7.
3012
cffcddb2 30132009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
3014
3015 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
3016 128 bytes
3017
1ef44b80 30182009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
3019
3020 Add BFS support
3021
3022 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
3023 (grub_fstest_SOURCES): Likewise.
3024 (pkglib_MODULES): Add befs.mod.
3025 (befs_mod_SOURCES): New variable.
3026 (befs_mod_CFLAGS): Likewise.
3027 (befs_mod_LDFLAGS): Likewise.
3028 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3029 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3030 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3031 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3032 (grub_setup_SOURCES): Likewise.
3033 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3034 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3035 (grub_setup_SOURCES): Likewise.
3036 * fs/befs.c: New file.
3037 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
3038 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
3039 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
3040 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
3041 (B_KEY_INDEX_ALIGN): New declaration.
3042 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
3043 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
3044 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
3045 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
3046 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
3047 (grub_afs_mount) [MODE_BFS]: Likewise.
3048 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
3049 (grub_afs_fs): Use GRUB_AFS_FSNAME
3050 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
3051 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
3052 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
3053 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
3054
4f253044 30552009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
3056
3057 * util/getroot.c (find_root_device): Add support for MacOSX.
3058 * util/hostdisk.c: Likewise.
3059
57a55913 30602009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
3061
3062 * font/font.c (find_glyph): Check whether a font is present to avoid
3063 segmentation fault.
75421ca9 3064
30652009-07-20 Joe Auricchio <jauricchio@gmail.com>
04c7c429 3066
3067 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
3068
e98cd0c2 30692009-07-20 Pavel Roskin <proski@gnu.org>
3070
3071 * configure.ac: Trim excessively wordy excuses.
3072
1d2d169a 30732009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
3074
3075 Add symlink, mtime and label support to AtheFS.
3076
3077 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
3078 (grub_afs_iterate_dir): Handle symlinks.
3079 (grub_afs_open): Use grub_afs_read_symlink.
3080 (grub_afs_dir): Likewise.
3081 Pass mtime.
3082 (grub_afs_label): New function.
3083 (grub_afs_fs): Add grub_afs_label.
3084 (grub_afs_read_symlink): New function.
3085
186f3189 30862009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
3087
3088 Fix AtheFS support.
3089
3090 * fs/afs.c: Fix comments style.
3091 (grub_afs_blockrun): Declare as packed.
3092 (grub_afs_datastream): Likewise.
3093 (grub_afs_bnode): Likewise.
3094 (grub_afs_btree): Likewise.
3095 (grub_afs_sblock): Likewise.
3096 Declare `name' as char.
3097 (grub_afs_inode): Declare as packed.
3098 Change void *vnode to grub_uint32_t unused.
3099 (grub_afs_iterate_dir): Check that key_size is positive.
3100 (grub_afs_mount): Don't read superblock twice.
75421ca9 3101 (grub_afs_dir): Don't free node in case of error,
186f3189 3102 grub_fshelp_find_file already handles this.
3103 (grub_afs_open): Likewise.
3104
5680109e 31052009-07-19 Pavel Roskin <proski@gnu.org>
3106
3107 * Makefile.in: Remove LIBLZO and enable_lzo.
3108 * conf/i386-pc.rmk: Remove lzo support.
3109 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
3110 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
3111 support.
3112 * kern/i386/pc/lzo1x.S: Remove.
3113 * kern/i386/pc/startup.S: Remove lzo support.
3114 * util/i386/pc/grub-mkimage.c: Likewise.
3115
ac70fa32 31162009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
3117
3118 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
3119 * fs/xfs.c (grub_xfs_dir): Likewise.
3120 * fs/afs.c (grub_afs_dir): Likewise.
3121 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
3122 (grub_iso9660_open): Likewise.
3123 * fs/jfs.c (grub_jfs_open): Likewise.
3124 * fs/ext2.c (grub_ext2_dir): Likewise.
3125 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
3126 * script/sh/lexer.c (grub_script_yylex): Likewise.
75421ca9 3127
eab58da2 31282009-07-16 Pavel Roskin <proski@gnu.org>
3129
d2838156 3130 * configure.ac: Never add "-c" to CFLAGS.
3131
55c70904 3132 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
3133
43e6200c 3134 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
3135 grub_cv_cc_efiemu should be used.
3136
ce7a733d 3137 * configure.ac: Typo fixes.
3138
eab58da2 3139 * kern/mm.c (grub_zalloc): New function.
3140 (grub_debug_zalloc): Likewise.
3141 * include/grub/mm.h: Declare grub_zalloc() and
3142 grub_debug_zalloc().
3143 * util/misc.c (grub_zalloc): New function.
3144 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
3145 instead of grub_malloc(), remove unneeded initializations.
3146 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
3147 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
3148 * commands/parttool.c (grub_cmd_parttool): Likewise.
3149 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
3150 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
3151 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
3152 * disk/usbms.c (grub_usbms_finddevs): Likewise.
3153 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
3154 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
3155 (grub_cmd_efiemu_pnvram): Likewise.
3156 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
3157 * fs/iso9660.c (grub_iso9660_mount): Likewise.
3158 (grub_iso9660_iterate_dir): Likewise.
3159 * fs/jfs.c (grub_jfs_opendir): Likewise.
3160 * fs/ntfs.c (list_file): Likewise.
3161 (grub_ntfs_mount): Likewise.
3162 * kern/disk.c (grub_disk_open): Likewise.
3163 * kern/dl.c (grub_dl_load_core): Likewise.
3164 * kern/elf.c (grub_elf_file): Likewise.
3165 * kern/env.c (grub_env_context_open): Likewise.
3166 (grub_env_set): Likewise.
3167 (grub_env_set_data_slot): Likewise.
3168 * kern/file.c (grub_file_open): Likewise.
3169 * kern/fs.c (grub_fs_blocklist_open): Likewise.
3170 * loader/i386/multiboot.c (grub_module): Likewise.
3171 * loader/xnu.c (grub_xnu_create_key): Likewise.
3172 (grub_xnu_create_value): Likewise.
3173 * normal/main.c (grub_normal_add_menu_entry): Likewise.
3174 (read_config_file): Likewise.
3175 * normal/menu_entry.c (make_screen): Likewise.
3176 * partmap/sun.c (sun_partition_map_iterate): Likewise.
3177 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
3178 * script/sh/script.c (grub_script_parse): Likewise.
3179 * video/bitmap.c (grub_video_bitmap_create): Likewise.
3180 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
3181 * video/readers/png.c (grub_png_output_byte): Likewise.
3182 (grub_video_reader_png): Likewise.
3183
830afef7 31842009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
5ce5507f 3185
3186 Enable all targets that can be built by default
3187
830afef7 3188 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
5ce5507f 3189 grub-mkfont and grub-fstest if they can be built
3190
ee293aee 31912009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
3192
3193 Fix hang and segmentation fault in grub-emu-usb
3194
3195 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
3196 * util/usb.c (grub_libusb_devices): likewise
3197 (grub_libusb_init): rename to ...
3198 (GRUB_MOD_INIT (libusb)):...this
3199 (grub_libusb_fini): rename to ..
3200 (GRUB_MOD_FINI (libusb)):...this
3201 * disk/usbms.c (grub_usbms_transfer): fix retry logic
3202 * include/grub/disk.h (grub_raid_init): removed, it's useless
3203 (grub_raid_fini): likewise
3204 (grub_lvm_init): likewise
3205 (grub_lvm_fini): likewise
3206 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
3207 by grub_init_all
3208
94414221 32092009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
3210
3211 Fix libusb
3212
3213 * Makefile.in (LIBUSB): new macro
3214 * genmk.rb (Utility/print_tail): new method
3215 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
3216 (top level): call util.print_tail at the end.
3217
59ade63d 32182009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
3219
3220 Make FreeBSD accept zpool.cache
3221
3222 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
3223 type is /boot/zfs/zpool.cache
3224
a58da8c7 32252009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
3226
3227 Fix 64-bit efiemu
3228
3229 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
3230 correct wrong typedef
3231 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
3232
20591577 32332009-07-15 Pavel Roskin <proski@gnu.org>
3234
560ca572 3235 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
3236 * kern/disk.c (struct grub_disk_cache): Likewise.
3237
e8e8e4fd 3238 * commands/probe.c (options): Typo fix.
3239
fde24e10 3240 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
3241 Increase to 0x5a to accommodate FAT32. Adjust other offsets
3242 accordingly.
3243 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
3244
379c54c1 3245 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
3246 the end of "Error" to make the message more readable.
3247
7bd8f5bf 3248 * boot/i386/pc/boot.S (kernel_segment): Remove.
3249 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
3250 for destination.
3251
40b132c5 3252 * boot/i386/pc/boot.S (boot_version): Remove.
3253 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
3254 Remove.
3255
20591577 3256 * include/grub/i386/pc/boot.h: Sort all offsets.
3257 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
3258 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
3259 * boot/i386/pc/boot.S: Assert location of every offset listed in
3260 include/grub/i386/pc/boot.h.
3261
2df32b2c 32622009-07-13 Pavel Roskin <proski@gnu.org>
3263
44b5d879 3264 * include/grub/i386/coreboot/machine.h: Rename
3265 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
3266 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
3267 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
3268
17dc3751 3269 * kern/dl.c: Force native word size to suppress warnings when
3270 compiling grub-emu.
3271
2df32b2c 3272 * kern/device.c (grub_device_iterate): Change struct part_ent to
3273 hold the name, not a pointer to it. Use one grub_malloc() per
3274 partition, not two. Free partition_name if grub_malloc() fails.
3275 Set ents to NULL only before grub_partition_iterate() is called.
3276
75c59f59 32772009-07-11 Bean <bean123ch@gmail.com>
3278
3279 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
3280 childname.
3281
0ae1bf88 32822009-07-10 Bean <bean123ch@gmail.com>
32832009-07-10 Robert Millan <rmh.grub@aybabtu.com>
3284
3285 * kern/ieee1275/openfw.c (grub_children_iterate)
3286 (grub_devalias_iterate): Fix size evaluation for property or path
3287 strings, which was broken since r2132.
3288
8279cade 32892009-07-07 Pavel Roskin <proski@gnu.org>
3290
7d8a52d3 3291 * commands/search.c (search_file): Merge into ...
3292 (search_fs): ... this. Accept search type as argument.
3293 (grub_cmd_search): Pass search type to search_fs().
3294
25f9a05a 3295 * include/grub/util/console.h: New file.
3296 * util/console.c: Use it instead of grub/machine/console.h.
3297 * util/grub-emu.c: Likewise.
3298
8279cade 3299 * lib/arg.c (find_long_option): Remove.
3300 (find_long): Add `len' argument, make `s' const char *.
3301 (grub_arg_parse): Parse long options in place, not in a
3302 temporary buffer.
3303
4a11b60f 33042009-07-06 Pavel Roskin <proski@gnu.org>
3305
99f68041 3306 * commands/search.c (search_fs): Fix potential NULL pointer
3307 dereference.
3308
4a11b60f 3309 * commands/search.c (search_fs): Replace QUID macro with quid_fn
3310 function pointer.
3311
e110f4de 33122009-07-06 Daniel Mierswa <impulze@impulze.org>
3313
3314 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
3315 comparison.
3316
46eeb6a2 33172009-07-05 Pavel Roskin <proski@gnu.org>
3318
bab74958 3319 * include/grub/i386/linux.h (struct linux_kernel_params):
3320 Restore padding3, it's still needed.
3321
46eeb6a2 3322 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
3323 FreeBSD.
3324 * util/osdetect.lua: Likewise.
3325
b4a1dc79 33262009-07-05 Bean <bean123ch@gmail.com>
3327
3328 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
3329
3330 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
3331 (grub_lua_getenv): Likewise.
3332 (grub_lua_setenv): Likewise.
3333 (save_errno): New function.
3334 (push_result): Likewise.
3335 (grub_lua_enum_device): Likewise.
3336 (grub_lua_enum_file): Likewise.
3337 (grub_lua_file_open): Likewise.
3338 (grub_lua_file_close): Likewise.
3339 (grub_lua_file_seek): Likewise.
3340 (grub_lua_file_read): Likewise.
3341 (grub_lua_file_getline): Likewise.
3342 (grub_lua_file_getsize): Likewise.
3343 (grub_lua_file_getpos): Likewise.
3344 (grub_lua_file_eof): Likewise.
3345 (grub_lua_file_exist): Likewise.
3346 (grub_lua_add_menu): Likewise.
3347
3348 * script/lua/grub_lua.h (isupper): New inline function.
3349 (islower): Likewise.
3350 (ispunct): Likewise.
3351 (isxdigit): Likewise.
3352 (strcspn): Change to normal function.
3353 (strpbkr): New function declaration.
3354 (memchr): Likewise.
3355
3356 * script/lua/grub_main.c (scan_str): New function.
3357 (strcspn): Likewise.
3358 (strpbrk): Likewise.
3359 (memchr): Likewise.
3360
3361 * script/lua/linit.c (lualibs): Enable the string library.
3362
3363 * util/osdetect.lua: New file.
3364
2da92295 33652009-07-04 Robert Millan <rmh.grub@aybabtu.com>
3366
3367 * include/grub/i386/linux.h (struct linux_kernel_params): Add
3368 `capabilities' member.
3369
b2582ec9 33702009-07-02 Pavel Roskin <proski@gnu.org>
3371
3372 * genparttoollist.sh: Add missing newline at the end.
3373
32622956 33742009-07-01 Pavel Roskin <proski@gnu.org>
3375
87a7339e 3376 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
3377
d23af54e 3378 * util/hostdisk.c (open_device): Remove `const' from
3379 `sysctl_size', as sysctlbyname() can change it (in this case it
3380 doesn't actually happen).
3381
c94b18a9 3382 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
3383 using signed long int constants.
3384
c6cd3ef0 3385 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
3386 constant to avoid a warning on FreeBSD.
3387
0df63420 3388 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
3389 where it's needed.
3390
999577f1 3391 * Makefile.in: Install include/grub/machine symlink.
3392
6f41557f 3393 * Makefile.in: When installing symlinks, use "cp -fR", which
3394 works on FreeBSD and MacOSX.
3395 From Yves Blusseau <cl7m42e02@sneakemail.com>
3396
c8d22988 3397 * kern/dl.c (grub_dl_resolve_symbol): Make static.
3398 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
3399
1b96e952 3400 * util/misc.c: Move grub_reboot() and grub_halt() ...
3401 * util/grub-emu.c: ... here. Make main_env static.
3402 * include/grub/util/misc.h: Remove main_env.
3403
2ef0084d 3404 * kern/mm.c: Use correct format to print size_t.
3405
32622956 3406 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
3407 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
3408 * kern/powerpc/dl.c: Likewise.
3409 * kern/sparc64/dl.c: Likewise.
3410 * kern/x86_64/dl.c: Likewise.
3411
3f7f0cd0 34122009-07-01 Robert Millan <rmh.grub@aybabtu.com>
3413
3414 Fix grub-emu build on sparc64-ieee1275.
3415
75421ca9 3416 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
3f7f0cd0 3417 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
3418
211d06b5 34192009-07-01 Robert Millan <rmh.grub@aybabtu.com>
3420
3421 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
3422 (grub_reboot, grub_halt): New functions.
3423
3424 * util/i386/pc/misc.c: Delete. Update all users.
3425 * util/sparc64/ieee1275/misc.c: Likewise.
3426 * util/powerpc/ieee1275/misc.c: Likewise.
3427
aaf53e3c 34282009-07-01 Robert Millan <rmh.grub@aybabtu.com>
3429
3430 * conf/i386.rmk (setjmp_mod_SOURCES)
3431 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
3432 * conf/common.rmk (setjmp_mod_SOURCES)
3433 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
3434 to use $(target_cpu).
3435 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
3436 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
3437 * conf/powerpc-ieee1275.rmk: Likewise.
3438 * conf/sparc64-ieee1275.rmk: Likewise.
3439
3440 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
3441 $(target_cpu) for kern/$(target_cpu)/dl.c.
3442 * conf/i386-efi.rmk: Likewise.
3443 * conf/i386-ieee1275.rmk: Likewise.
3444 * conf/x86_64-efi.rmk: Likewise.
3445 * conf/i386-coreboot.rmk: Likewise.
3446 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
3447 $(target_cpu) for kern/$(target_cpu)/dl.c and for
3448 kern/$(target_cpu)/cache.S.
3449 * conf/sparc64-ieee1275.rmk: Likewise.
3450
a337130b 34512009-07-01 Robert Millan <rmh.grub@aybabtu.com>
3452
3453 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
3454 type to `grub_uint8_t', and adjust `padding9' accordingly.
3455
c6fe4d53 34562009-06-29 Robert Millan <rmh.grub@aybabtu.com>
3457
b09db61d 3458 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
3459
c6fe4d53 3460 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
3461 assembly in final jump, using register constraints.
3462
b09db61d 3463 (grub_linux_boot): For text mode, initialize `have_vga' using
3464 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
3465
3466 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
3467 right before the final jump.
3468
3469 Set `video_mode' to 0x3.
3470
3471 Document initialization of `video_page', `video_mode' and
3472 `video_ega_bx'.
3473
28333ad0 34742009-06-29 Robert Millan <rmh.grub@aybabtu.com>
3475
3476 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
3477 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
75421ca9 3478 and set GRUB_LINUX_FLAG_QUIET appropriately.
28333ad0 3479
02164e1b 34802009-06-29 Robert Millan <rmh.grub@aybabtu.com>
3481
3482 Fix build on Debian / sparc.
3483
3484 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
3485
18b6c557 34862009-06-28 Pavel Roskin <proski@gnu.org>
3487
85f2aab6 3488 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
3489 fix a warning.
3490
18b6c557 3491 * util/grub.d/10_linux.in: Match SUSE style initrd names.
3492
ad760f81 34932009-06-27 Robert Millan <rmh.grub@aybabtu.com>
3494
3495 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
3496 `err'.
3497
87a4623b 34982009-06-27 Robert Millan <rmh.grub@aybabtu.com>
3499
3500 Revert r2338.
3501
3502 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
3503 file can't be opened. grub_file_open() is already supposed to set
75421ca9 3504 grub_errno / grub_errmsg appropriately.
87a4623b 3505 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
3506
8231fb77 35072009-06-27 Pavel Roskin <proski@gnu.org>
35082009-06-27 Robert Millan <rmh.grub@aybabtu.com>
3509
3510 * include/grub/dl.h: Include grub/elf.h.
3511 (struct grub_dl): Add symtab field.
3512 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
3513 GRUB_MODULES_MACHINE_READONLY.
3514 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
3515 of the header for read-only modules.
3516 (grub_dl_unload): Free mod->symtab for read-only modules.
3517 * kern/i386/dl.c: Use mod->symtab.
3518 * kern/powerpc/dl.c: Likewise.
3519 * kern/sparc64/dl.c: Likewise.
3520 * kern/x86_64/dl.c: Likewise.
3521
3522 * conf/i386-qemu.rmk: New file.
3523 * kern/i386/qemu/startup.S: Likewise.
3524 * kern/i386/qemu/mmap.c: Likewise.
3525 * boot/i386/qemu/boot.S: Likewise.
3526 * include/grub/i386/qemu/time.h: Likewise.
3527 * include/grub/i386/qemu/serial.h: Likewise.
3528 * include/grub/i386/qemu/kernel.h: Likewise.
3529 * include/grub/i386/qemu/console.h: Likewise.
3530 * include/grub/i386/qemu/boot.h: Likewise.
3531 * include/grub/i386/qemu/init.h: Likewise.
3532 * include/grub/i386/qemu/machine.h: Likewise.
3533 * include/grub/i386/qemu/loader.h: Likewise.
3534 * include/grub/i386/qemu/memory.h: Likewise.
3535
3536 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
3537 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
3538 [qemu] (pkglib_IMAGES): Add `boot.img'.
3539 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
3540 [qemu] (boot_img_FORMAT): New variables.
3541 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
3542 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
3543 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
3544 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
3545 [qemu] (kernel_img_FORMAT): New variables.
3546
3547 * configure.ac: Recognise `i386-qemu'.
3548
3549 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
3550 (for no compression).
3551 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
3552 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
3553 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
3554 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
3555 ifdefs).
3556
97fe384e 35572009-06-27 Pavel Roskin <proski@gnu.org>
3558
3559 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
3560 read.
3561 * efiemu/prepare32.c: Likewise.
3562 * efiemu/prepare64.c: Likewise.
3563
c402ab17 35642009-06-26 Pavel Roskin <proski@gnu.org>
3565
3566 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
3567 * include/grub/elf.h: Define symbols without "32" or "64" based
3568 on GRUB_TARGET_WORDSIZE.
3569 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
3570 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
3571 ELF definitions.
3572 * efiemu/loadcore64.c: Likewise.
3573 * loader/i386/bsd32.c: Likewise.
3574 * loader/i386/bsd64.c: Likewise.
3575 * kern/dl.c: Remove own ELF definitions.
3576 * util/i386/efi/grub-mkimage.c: Likewise.
3577
9bbdfd4d 35782009-06-23 Robert Millan <rmh.grub@aybabtu.com>
3579
3580 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
3581 segment 0x0 unconditionally, because the reference generated by
3582 GAS is an absolute address.
3583
a42ce6e9 35842009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3585
3586 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
3587 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
3588
c952cf92 35892009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3590
3591 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
3592 indexes. Check for -f explicitly.
cc3752ad 3593 (search_file): Improve error message.
3594 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 3595
132a0a59 35962009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3597
3598 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
3599 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
3600
387a140c 36012009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3602
3603 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
3604 * conf/i386-ieee1275.rmk: Likewise.
3605 * conf/i386-coreboot.rmk: Likewise.
3606
3607 * kern/i386/pc/startup.S (grub_stop): Remove function.
3608 * kern/i386/ieee1275/startup.S: Likewise.
3609 * kern/i386/coreboot/startup.S: Likewise.
3610 * kern/i386/misc.S (grub_stop): New function.
3611
41da9665 36122009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3613
3614 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
3615 * kern/i386/realmode.S (real_to_prot): ... to here.
3616
bf337234 36172009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3618
3619 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
3620 with `kernel.img'.
3621 (kernel_elf_SOURCES): Rename to ...
3622 (kernel_img_SOURCES): ... this.
3623 (kernel_elf_HEADERS): Rename to ...
3624 (kernel_img_HEADERS): ... this. Update all users.
3625 (kernel_elf_ASFLAGS): Rename to ...
3626 (kernel_img_ASFLAGS): ... this.
3627 (kernel_elf_CFLAGS): Rename to ...
3628 (kernel_img_CFLAGS): ... this.
3629 (kernel_elf_LDFLAGS): Rename to ...
3630 (kernel_img_LDFLAGS): ... this.
3631 * conf/i386-coreboot.rmk: Likewise.
3632 * conf/powerpc-ieee1275.rmk: Likewise.
3633
3634 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
3635 with "kernel.img".
3636
f52196ff 36372009-06-21 Pavel Roskin <proski@gnu.org>
3638
c3cee413 3639 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
3640 to match nested functions.
3641 * loader/sparc64/ieee1275/linux.c: Likewise.
3642
f52196ff 3643 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
3644
58750afc 36452009-06-21 Robert Millan <rmh.grub@aybabtu.com>
3646
3647 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
3648 all i386 platforms.
3649
15355c7d 36502009-06-21 Robert Millan <rmh.grub@aybabtu.com>
3651
3652 Fix asm file handling on ELF, and remove workarounds.
3653
3654 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
75421ca9 3655 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
15355c7d 3656 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
3657 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
3658
3f3ec72b 36592009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
3660
3661 Load BSD ELF modules
3662
3663 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
3664 and loader/i386/bsd64.c
3665 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
3666 (FREEBSD_MODTYPE_ELF_MODULE): New definition
3667 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
3668 (grub_freebsd_load_elfmodule32): New declaration
3669 (grub_freebsd_load_elfmoduleobj64): Likewise
3670 (grub_freebsd_load_elf_meta32): Likewise
3671 (grub_freebsd_load_elf_meta64): Likewise
3672 (grub_freebsd_add_meta): Likewise
3673 (grub_freebsd_add_meta_module): Likewise
3674 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
3675 (grub_freebsd_add_meta_module): Likewise and move module-specific
3676 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
3677 (grub_cmd_freebsd): Add elf-kernel specific parts
3678 based on grub_freebsd_add_meta_module
3679 (grub_cmd_freebsd_module): Add type parsing moved from
3680 grub_freebsd_add_meta_module
3681 (grub_cmd_freebsd_module_elf): New function
3682 (cmd_freebsd_module_elf): New variable
3683 (GRUB_MOD_INIT): Register freebsd_module_elf
3684 * loader/i386/bsd32.c: New file
3685 * loader/i386/bsd64.c: Likewise
3686 * loader/i386/bsdXX.c: Likewise
3687 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
3688 (grub_elf64_load): Likewise
3689 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
3690 All users updated
3691 (grub_elf64_load_hook_t): Likewise
3692
0db15301 36932009-06-21 Colin Watson <cjwatson@ubuntu.com>
3694
3695 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
3696 variable.
3697 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
3698 don't write a menu entry for recovery mode.
3699
546796c1 37002009-06-20 Robert Millan <rmh.grub@aybabtu.com>
3701
3702 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
3703 after it's no longer needed.
3704
cd7310d5 37052009-06-20 Robert Millan <rmh.grub@aybabtu.com>
3706
3707 * include/grub/i386/loader.h (grub_linux_prot_size)
3708 (grub_linux_tmp_addr, grub_linux_real_addr)
3709 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
3710 GRUB_MACHINE_PCBIOS.
3711 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
3712 common grub_util_info() call to ...
3713 (generate_image): ... here.
3714 Fix use of uninitialized memory, comparison of signed with
3715 unsigned integers and memory leak.
3716 Remove bogus module address message.
3717
ab32d3b5 37182009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
3719
3720 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
3721 grub_raid_register
3722 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
3723
024ef597 37242009-06-19 Pavel Roskin <proski@gnu.org>
3725
3726 * configure.ac: Remove stray AC_MSG_CHECKING.
3727
3ac72b51 37282009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
3729
3730 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 3731
e14cd814 37322009-06-18 Pavel Roskin <proski@gnu.org>
3733
3734 * conf/common.rmk: Add fs_file.mod.
3735 * disk/fs_file.c: New file.
3736 * include/grub/disk.h (enum grub_disk_dev_id): Add
3737 GRUB_DISK_DEVICE_FILE_ID.
3738
26586d98 37392009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3740
3741 Fix build with Apple's toolchain. Part 2
3742
3743 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
3744 a fake start
3745
26de2bcd 37462009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3747
3748 Fix build with Apple's toolchain. Part 1
3749
3750 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
3751 for long calls
3752 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 3753 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 3754 Apple's toolchain
3755
09b3490b 37562009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
3757
3758 Fix warnings
3759
3760 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
3761 (decomp_block): initialize ch
3762 use grub_memcpy instead of memcpy
3763
c22a006a 37642009-06-17 Pavel Roskin <proski@gnu.org>
3765
d3638678 3766 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
3767 version, use declarations needed to use vga_text as the startup
3768 console.
3769
c22a006a 3770 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
3771 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
3772 the kernel.
3773 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
3774 and grub_at_keyboard_fini(), it's done on module load and
3775 unload.
3776
05b129e0 37772009-06-17 Felix Zielcke <fzielcke@z-51.de>
3778
3779 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
3780 file can't be found.
3781 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
3782
cf24ed9e 37832009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
3784
3785 Fix newline handling
3786
3787 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 3788 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 3789 (grub_script_yylex): don't segfault on unterminated script
3790 newline terminates command and variable
3791
74aa8e4b 37922009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
3793
3794 avoid double grub_adjust_range call. Bug reported by David Simner
3795
3796 * kern/disk.c (grub_disk_write): change to raw disk access before
3797 calling disk_read
3798
1bd265f3 37992009-06-17 Colin Watson <cjwatson@ubuntu.com>
3800
3801 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
3802 spaces, for the benefit of help2man.
3803 * util/i386/efi/grub-mkimage.c (usage): Likewise.
3804
a2d08c06 38052009-06-16 Pavel Roskin <proski@gnu.org>
3806
3807 * kern/i386/halt.c: Include grub/machine/init.h.
3808 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
3809
b97bcb19 38102009-06-16 Felix Zielcke <fzielcke@z-51.de>
3811
3812 * util/grub.d/30_os-prober.in: Use ${root} in the generated
3813 drivemap menuentry.
3814
0644f96c 38152009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
3816
3817 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
3818 `echo' command.
3819
3ef17a2e 38202009-06-16 Pavel Roskin <proski@gnu.org>
3821
3822 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
3823 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
3824 save %dx, we only need %dl and we never change it.
3825 * boot/i386/pc/cdboot.S: Don't set the root drive.
3826 * boot/i386/pc/pxeboot.S: Likewise.
3827 * include/grub/i386/pc/boot.h: Remove
3828 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
3829 GRUB_BOOT_MACHINE_DRIVE_CHECK.
3830 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
3831 * kern/i386/pc/init.c (make_install_device): Remove references
3832 to grub_root_drive.
3833 * kern/i386/pc/startup.S: Likewise.
3834 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
3835
693fe637 38362009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
3837
3838 xnu_uuid command
3839
3840 * commands/xnu_uuid.c: new file
3841 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
3842 (xnu_uuid_mod_SOURCES): new variable
3843 (xnu_uuid_mod_CFLAGS): likewise
3844 (xnu_uuid_mod_LDFLAGS): likewise
3845 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
3846 * conf/i386-ieee1275.rmk: likewise
3847 * conf/i386-pc.rmk: likewise
3848 * conf/powerpc-ieee1275.rmk: likewise
3849 * conf/sparc64-ieee1275.rmk: likewise
3850 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
3851
c9da87d0 38522009-06-16 Pavel Roskin <proski@gnu.org>
3853
3854 * configure.ac: Avoid '==' in test command, it's not portable.
3855
9c6f4596 38562009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
3857
3858 Probe command
3859
3860 * commands/probe.c: new file
3861 * conf/common.rmk (pkglib_MODULES): add probe.mod
3862 (probe_mod_SOURCES): new variable
3863 (probe_mod_CFLAGS): likewise
3864 (probe_mod_LDFLAGS): likewise
3865 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
3866 * conf/i386-ieee1275.rmk: likewise
3867 * conf/i386-pc.rmk: likewise
3868 * conf/powerpc-ieee1275.rmk: likewise
3869 * conf/sparc64-ieee1275.rmk: likewise
3870
70b7f9fd 38712009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
3872
3873 Fix handling of string like \"hello\" and "a
3874 b"
3875
3876 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
3877 (grub_script_yylex): fix parsing of quoting, escaping and newline
3878
71c79a6b 38792009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
3880
dd74360c 3881 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 3882 handling
dd74360c 3883
0644f96c 38842009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 3885
3886 * util/grub-mkconfig.in: Fix parsing of --output option.
3887
e40893c3 38882009-06-12 Pavel Roskin <proski@gnu.org>
3889
3890 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
3891 genmk.rb don't need to be generated or installed.
3892
3a1acfe2 38932009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
3894
3895 * commands/i386/pc/drivemap_int13h.S: add more comments
3896
3a4575d4 38972009-06-11 Pavel Roskin <proski@gnu.org>
3898
0658e928 3899 * Makefile.in (uninstall): Uninstall manuals.
3900
ca0388f0 3901 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
3902 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
3903 and update-grub_lib in two places.
3904 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
3905
e3b27c39 3906 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
3907 a compiler warning.
3908
3a4575d4 3909 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
3910 `entry_lo' to fix variable shadowing.
3911
af1f4f55 39122009-06-11 Christian Franke <franke@computer.org>
3913
3914 * kern/misc.c (__enable_execute_stack): Add missing return type
3915 to prevent gcc warning.
3916
5225e649 39172009-06-11 Felix Zielcke <fzielcke@z-51.de>
3918
3919 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
3920
7d83bd47 39212009-06-11 Pavel Roskin <proski@gnu.org>
3922
c1cb63ba 3923 * Makefile.in: Don't rely on any scripts being executable.
3924 Always use $(SHELL) to run shell scripts.
3925
7d83bd47 3926 * configure.ac: Always define ___main if using -nostdlib. This
3927 fixes tests on Cygwin.
3928
948f48e7 39292009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
3930
3931 UDF fix
3932
7d83bd47 3933 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 3934 is in bytes and not in blocks
7d83bd47 3935
8ada9bc1 39362009-06-11 Pavel Roskin <proski@gnu.org>
3937
3938 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
3939 warning.
3940
25ad2323 39412009-06-11 Felix Zielcke <fzielcke@z-51.de>
3942
3943 * util/grub.d/30_os-prober.in: Fix a comment. Source
3944 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
3945 to set the root device. Place drivemap command in the generated
3946 chain entry.
3947
e65acb0c 39482009-06-11 Pavel Roskin <proski@gnu.org>
3949
3950 * configure.ac: Remove host_m32. Issues with 64-bit utilities
3951 have long been resolved.
3952
f285fe2d 39532009-06-11 Colin Watson <cjwatson@ubuntu.com>
3954
bd47b0b5 3955 * util/grub.d/10_linux.in: Capitalise "Linux".
3956
f285fe2d 3957 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
3958
a0c62e4e 39592009-06-11 Pavel Roskin <proski@gnu.org>
3960
b6783cb2 3961 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
3962 fix a gcc warning and ensure that the function won't ever exit.
3963
dde032e8 3964 * kern/i386/ieee1275/init.c: Add missing prototype for
3965 grub_stop_floppy().
3966
22cd079d 3967 * loader/ieee1275/multiboot2.c [__i386__]: Include
3968 grub/cpu/multiboot.h.
3969
a0c62e4e 3970 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
3971 casts to short - they are not portable and cause warnings. Fix
3972 use of uninitialized values in input_buf. Use ARRAY_SIZE.
3973
63963d17 39742009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
3975
3976 Drivemap fixes
3977
3978 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
3979 new function
3980 (grub_get_root_biosnumber_saved): new variable
3981 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
3982 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 3983 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 3984 %dx after the call if necessary
3985 * conf/common.rmk (pkglib_MODULES): remove boot.mod
3986 (boot_mod_SOURCES): remove
3987 (boot_mod_CFLAGS): remove
3988 (boot_mod_LDFLAGS): remove
3989 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
3990 (boot_mod_SOURCES): new variable
3991 (boot_mod_CFLAGS): likewise
3992 (boot_mod_LDFLAGS): likewise
3993 * conf/i386-efi.rmk: likewise
3994 * conf/i386-ieee1275.rmk: likewise
3995 * conf/i386-pc.rmk: likewise
3996 * conf/powerpc-ieee1275.rmk: likewise
3997 * conf/sparc64-ieee1275.rmk: likewise
3998 * conf/x86_64-efi.rmk: likewise
3999 * include/grub/i386/pc/biosnum.h: new file
4000 * lib/i386/pc/biosnum.c: likewise
4001 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
4002 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
4003 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 4004
33abf7ae 40052009-06-10 Pavel Roskin <proski@gnu.org>
4006
5ac35b35 4007 * io/gzio.c (test_header): Don't reuse one buffer for all data.
4008 Use separate variables. Read only the file size at the end, but
4009 not the checksum that we don't use.
4010
5c5215d5 4011 * kern/file.c (grub_file_read): Use void pointer for the buffer.
4012 Adjust all callers.
4013
27d5fef7 4014 * kern/ieee1275/openfw.c: Remove libc includes.
4015 * kern/ieee1275/cmain.c: Likewise.
4016 * include/grub/ieee1275/ieee1275.h: Likewise.
4017
33abf7ae 4018 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
4019 compiler warnings.
4020
19d50c2b 40212009-06-10 Felix Zielcke <fzielcke@z-51.de>
4022
4023 * Makefile.in: Remove all trailing whitespace.
4024 * conf/i386-pc.rmk: Likewise.
4025 * conf/powerpc-ieee1275.rmk: Likewise.
4026 * conf/sparc64-ieee1275.rmk: Likewise.
4027 * docs/grub.texi: Likewise.
4028 * docs/texinfo.tex: Likewise.
4029 * disk/fs_uuid.c: Likewise.
4030 * disk/lvm.c: Likewise.
4031 * disk/scsi.c: Likewise.
4032 * disk/ata.c: Likewise.
4033 * disk/ieee1275/ofdisk.c: Likewise.
4034 * disk/i386/pc/biosdisk.c: Likewise.
4035 * disk/host.c: Likewise.
4036 * disk/raid.c: Likewise.
4037 * disk/efi/efidisk.c: Likewise.
4038 * disk/usbms.c: Likewise.
4039 * disk/memdisk.c: Likewise.
4040 * disk/loopback.c: Likewise.
4041 * kern/powerpc/dl.c: Likewise.
4042 * kern/device.c: Likewise.
4043 * kern/dl.c: Likewise.
4044 * kern/sparc64/dl.c: Likewise.
4045 * kern/ieee1275/ieee1275.c: Likewise.
4046 * kern/term.c: Likewise.
4047 * kern/fs.c: Likewise.
4048 * kern/i386/dl.c: Likewise.
4049 * kern/i386/pc/startup.S: Likewise.
4050 * kern/i386/pc/init.c: Likewise.
4051 * kern/i386/pc/mmap.c: Likewise.
4052 * kern/i386/pc/lzo1x.S: Likewise.
4053 * kern/i386/ieee1275/init.c: Likewise.
4054 * kern/i386/realmode.S: Likewise.
4055 * kern/i386/tsc.c: Likewise.
4056 * kern/partition.c: Likewise.
4057 * kern/corecmd.c: Likewise.
4058 * kern/file.c: Likewise.
4059 * kern/efi/efi.c: Likewise.
4060 * kern/efi/init.c: Likewise.
4061 * kern/efi/mm.c: Likewise.
4062 * kern/main.c: Likewise.
4063 * kern/err.c: Likewise.
4064 * kern/env.c: Likewise.
4065 * kern/disk.c: Likewise.
4066 * kern/generic/millisleep.c: Likewise.
4067 * kern/generic/rtc_get_time_ms.c: Likewise.
4068 * kern/misc.c: Likewise.
4069 * kern/parser.c: Likewise.
4070 * genmk.rb: Likewise.
4071 * configure.ac: Likewise.
4072 * boot/i386/pc/diskboot.S: Likewise.
4073 * boot/i386/pc/pxeboot.S: Likewise.
4074 * boot/i386/pc/boot.S: Likewise.
4075 * boot/i386/pc/lnxboot.S: Likewise.
4076 * boot/i386/pc/cdboot.S: Likewise.
4077 * parttool/pcpart.c: Likewise.
4078 * video/readers/tga.c: Likewise.
4079 * video/video.c: Likewise.
4080 * video/bitmap.c: Likewise.
4081 * lib/envblk.c: Likewise.
4082 * lib/i386/setjmp.S: Likewise.
4083 * fs/xfs.c: Likewise.
4084 * fs/afs.c: Likewise.
4085 * fs/fat.c: Likewise.
4086 * fs/ntfs.c: Likewise.
4087 * fs/udf.c: Likewise.
4088 * fs/affs.c: Likewise.
4089 * fs/iso9660.c: Likewise.
4090 * fs/hfs.c: Likewise.
4091 * fs/fshelp.c: Likewise.
4092 * fs/ext2.c: Likewise.
4093 * fs/jfs.c: Likewise.
4094 * fs/reiserfs.c: Likewise.
4095 * fs/hfsplus.c: Likewise.
4096 * fs/minix.c: Likewise.
4097 * fs/cpio.c: Likewise.
4098 * fs/sfs.c: Likewise.
4099 * fs/ufs.c: Likewise.
4100 * efiemu/prepare.c: Likewise.
4101 * efiemu/loadcore_common.c: Likewise.
4102 * efiemu/runtime/efiemu.sh: Likewise.
4103 * efiemu/runtime/efiemu.S: Likewise.
4104 * efiemu/runtime/efiemu.c: Likewise.
4105 * efiemu/pnvram.c: Likewise.
4106 * efiemu/main.c: Likewise.
4107 * efiemu/i386/pc/cfgtables.c: Likewise.
4108 * efiemu/i386/loadcore64.c: Likewise.
4109 * efiemu/i386/loadcore32.c: Likewise.
4110 * efiemu/loadcore.c: Likewise.
4111 * efiemu/symbols.c: Likewise.
4112 * efiemu/mm.c: Likewise.
4113 * include/grub/autoefi.h: Likewise.
4114 * include/grub/datetime.h: Likewise.
4115 * include/grub/term.h: Likewise.
4116 * include/grub/hfs.h: Likewise.
4117 * include/grub/lvm.h: Likewise.
4118 * include/grub/i386/tsc.h: Likewise.
4119 * include/grub/i386/linux.h: Likewise.
4120 * include/grub/i386/xnu.h: Likewise.
4121 * include/grub/i386/efiemu.h: Likewise.
4122 * include/grub/i386/pc/biosdisk.h: Likewise.
4123 * include/grub/i386/pc/memory.h: Likewise.
4124 * include/grub/i386/pc/vbe.h: Likewise.
4125 * include/grub/parttool.h: Likewise.
4126 * include/grub/video.h: Likewise.
4127 * include/grub/memory.h: Likewise.
4128 * include/grub/fs.h: Likewise.
4129 * include/grub/partition.h: Likewise.
4130 * include/grub/xnu.h: Likewise.
4131 * include/grub/efi/api.h: Likewise.
4132 * include/grub/efi/pe32.h: Likewise.
4133 * include/grub/efi/memory.h: Likewise.
4134 * include/grub/multiboot.h: Likewise.
4135 * include/grub/usbdesc.h: Likewise.
4136 * include/grub/multiboot2.h: Likewise.
4137 * include/grub/acpi.h: Likewise.
4138 * include/grub/efiemu/efiemu.h: Likewise.
4139 * include/grub/disk.h: Likewise.
4140 * include/grub/ieee1275/ieee1275.h: Likewise.
4141 * include/grub/net.h: Likewise.
4142 * include/grub/machoload.h: Likewise.
4143 * include/grub/macho.h: Likewise.
4144 * include/multiboot.h: Likewise.
4145 * genmoddep.awk: Likewise.
4146 * normal/main.c: Likewise.
4147 * normal/menu_entry.c: Likewise.
4148 * normal/menu_viewer.c: Likewise.
4149 * normal/completion.c: Likewise.
4150 * normal/cmdline.c: Likewise.
4151 * normal/misc.c: Likewise.
4152 * normal/datetime.c: Likewise.
4153 * bus/usb/usbtrans.c: Likewise.
4154 * bus/usb/ohci.c: Likewise.
4155 * bus/usb/uhci.c: Likewise.
4156 * bus/usb/usb.c: Likewise.
4157 * mmap/efi/mmap.c: Likewise.
4158 * mmap/i386/pc/mmap_helper.S: Likewise.
4159 * mmap/i386/pc/mmap.c: Likewise.
4160 * mmap/i386/mmap.c: Likewise.
4161 * mmap/i386/uppermem.c: Likewise.
4162 * mmap/mmap.c: Likewise.
4163 * commands/acpi.c: Likewise.
4164 * commands/echo.c: Likewise.
4165 * commands/blocklist.c: Likewise.
4166 * commands/loadenv.c: Likewise.
4167 * commands/usbtest.c: Likewise.
4168 * commands/boot.c: Likewise.
4169 * commands/parttool.c: Likewise.
4170 * commands/search.c: Likewise.
4171 * commands/cat.c: Likewise.
4172 * commands/i386/pc/play.c: Likewise.
4173 * commands/i386/pc/drivemap.c: Likewise.
4174 * commands/i386/pc/vbeinfo.c: Likewise.
4175 * commands/i386/pc/acpi.c: Likewise.
4176 * commands/i386/pc/vbetest.c: Likewise.
4177 * commands/ls.c: Likewise.
4178 * commands/cmp.c: Likewise.
4179 * commands/test.c: Likewise.
4180 * commands/efi/acpi.c: Likewise.
4181 * commands/gptsync.c: Likewise.
4182 * commands/help.c: Likewise.
4183 * partmap/amiga.c: Likewise.
4184 * partmap/apple.c: Likewise.
4185 * partmap/acorn.c: Likewise.
4186 * partmap/pc.c: Likewise.
4187 * partmap/sun.c: Likewise.
4188 * partmap/gpt.c: Likewise.
4189 * script/sh/lexer.c: Likewise.
4190 * script/sh/function.c: Likewise.
4191 * font/font.c: Likewise.
4192 * font/font_cmd.c: Likewise.
4193 * loader/powerpc/ieee1275/linux.c: Likewise.
4194 * loader/efi/chainloader.c: Likewise.
4195 * loader/multiboot_loader.c: Likewise.
4196 * loader/macho.c: Likewise.
4197 * loader/i386/multiboot.c: Likewise.
4198 * loader/i386/linux.c: Likewise.
4199 * loader/i386/pc/linux.c: Likewise.
4200 * loader/i386/pc/multiboot2.c: Likewise.
4201 * loader/i386/pc/chainloader.c: Likewise.
4202 * loader/i386/pc/xnu.c: Likewise.
4203 * loader/i386/bsd_trampoline.S: Likewise.
4204 * loader/i386/efi/linux.c: Likewise.
4205 * loader/i386/multiboot_elfxx.c: Likewise.
4206 * loader/i386/bsd_helper.S: Likewise.
4207 * loader/i386/bsd.c: Likewise.
4208 * loader/i386/linux_trampoline.S: Likewise.
4209 * loader/i386/xnu_helper.S: Likewise.
4210 * loader/i386/xnu.c: Likewise.
4211 * loader/i386/bsd_pagetable.c: Likewise.
4212 * loader/i386/multiboot_helper.S: Likewise.
4213 * loader/xnu.c: Likewise.
4214 * loader/xnu_resume.c: Likewise.
4215 * io/gzio.c: Likewise.
4216 * term/efi/console.c: Likewise.
4217 * term/terminfo.c: Likewise.
4218 * term/ieee1275/ofconsole.c: Likewise.
4219 * term/i386/pc/serial.c: Likewise.
4220 * term/i386/pc/vesafb.c: Likewise.
4221 * term/i386/pc/vga.c: Likewise.
4222 * term/usb_keyboard.c: Likewise.
4223 * term/gfxterm.c: Likewise.
4224 * aclocal.m4: Likewise.
4225 * util/lvm.c: Likewise.
4226 * util/grub.d/30_os-prober.in: Likewise.
4227 * util/grub.d/10_hurd.in: Likewise.
4228 * util/console.c: Likewise.
4229 * util/grub-macho2img.c: Likewise.
4230 * util/grub-probe.c: Likewise.
4231 * util/hostfs.c: Likewise.
4232 * util/i386/pc/grub-mkimage.c: Likewise.
4233 * util/i386/pc/grub-setup.c: Likewise.
4234 * util/i386/efi/grub-mkimage.c: Likewise.
4235 * util/grub-mkconfig.in: Likewise.
4236 * util/raid.c: Likewise.
4237 * util/resolve.c: Likewise.
4238 * util/grub-mkdevicemap.c: Likewise.
4239 * util/grub-emu.c: Likewise.
4240 * util/getroot.c: Likewise.
4241 * util/hostdisk.c: Likewise.
4242 * util/usb.c: Likewise.
4243 * util/grub-editenv.c: Likewise.
4244 * util/misc.c: Likewise.
4245
d2d49665 42462009-06-10 Felix Zielcke <fzielcke@z-51.de>
4247
4248 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
4249 `genparttoollist.sh'.
4250 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
4251 Add `*.sh' to the list find searches for and change `mdate.sh'
4252 to `mdate-sh'.
4253
fe052e37 42542009-06-10 Pavel Roskin <proski@gnu.org>
4255
2763ac18 4256 * include/grub/multiboot2.h: Provide compatibility defines for
4257 multiboot2.h.
4258 * include/multiboot2.h: Include stdint.h only if needed, using
4259 angle brackets.
4260 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
4261 grub/multiboot2.h.
4262 * loader/ieee1275/multiboot2.c: Likewise.
4263 * loader/multiboot2.c: Likewise.
4264 * loader/multiboot_loader.c: Likewise.
4265
437e6adc 4266 * configure.ac: Use -nostdlib when probing for the target. It
4267 should not be required to have libc for the target.
4268
06a6836c 4269 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
4270 they fail without libc headers for the target.
4271 * include/grub/powerpc/libgcc.h: Use weak attribute for all
4272 exports.
4273 * include/grub/sparc64/libgcc.h: Likewise. Don't use
4274 preprocessor conditionals.
4275
fe052e37 4276 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
4277 build system doesn't need to be aware of the tar.c internals.
4278
afd22553 42792009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 4280
afd22553 4281 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 4282
6b787c4f 42832009-06-09 Robert Millan <rmh.grub@aybabtu.com>
4284
4285 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
4286 disk limit to 26 for IDE, Virtio, Xen and SCSI.
4287
42882009-06-09 Felix Zielcke <fzielcke@z-51.de>
4289
4290 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 4291 aren't available if ata.mod gets used.
6b787c4f 4292
473d1e45 42932009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 4294
473d1e45 4295 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 4296 initialising controller.
473d1e45 4297 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 4298
255a27d4 42992009-06-08 Felix Zielcke <fzielcke@z-51.de>
4300
4301 * util/i386/pc/grub-install.in: Add a parameter --disk-module
4302 to choose between ata and biosdisk module on i386-pc.
4303
473d1e45 43042009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 4305
d55842d8 4306 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
4307 Subclass and Programming Interface fields in terms of the 3 byte
4308 Class Code register.
4309 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4310
fa5db0b1 4311 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
4312 interface is OHCI. Add grub_dprintf for symmetry with
4313 bus/usb/uhci.c.
4314 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
4315 interface is UHCI. Add interf variable for programming
4316 interface. Print interface with class/subclass.
4317
c0947beb 4318 * bus/usb/ohci.c: Set interf with correct field.
4319
69da8877 4320 * bus/usb/uhci.c: Remove unneeded doubled lines.
4321 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
4322 Remove whitespace inside comment.
4323
9e172e30 43242009-06-08 Robert Millan <rmh.grub@aybabtu.com>
4325
4326 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
4327 as fallback an equivalent option without depth.
4328
de65ee2b 43292009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
4330
4331 Not fail if unable to retrieve C/H/S on LBA disks
4332
473d1e45 4333 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 4334 if unable to retrieve C/H/S on LBA disks
4335
b57ea2c9 43362009-06-08 Pavel Roskin <proski@gnu.org>
4337
4338 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
4339 about aliasing.
4340
af361263 43412009-06-08 Felix Zielcke <fzielcke@z-51.de>
4342
4343 * Makefile.in (uninstall): Remove all $lib_DATA files.
4344
4c9ec6b3 43452009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
4346
4347 Bugfix: install on partitionless device
4348
4349 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
4350 is a whole disk
4351
e76fc924 43522009-06-08 Felix Zielcke <fzielcke@z-51.de>
4353
4354 * Makefile.in (uninstall): Remove all $include_DATA files.
4355
ba5a0d05 43562009-06-08 Felix Zielcke <fzielcke@z-51.de>
4357
4358 * commands/true.c: New file. Implement the true and false commands.
4359 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
4360 (true_mod_SOURCES): New variable.
4361 (true_mod_CFLAGS): Likewise.
4362 (true_mod_LDFLAGS): Likewise.
4363
c8048e32 43642009-06-05 Colin D Bennett <colin@gibibit.com>
4365
4366 Optimized font character lookup using binary search instead of linear
4367 search. Fonts now are required to have the character index ordered by
4368 code point.
4369
4370 * font/font.c (load_font_index): Verify that fonts have ordered
4371 character indices.
4372 (find_glyph): Use binary search instead of linear search to find a
4373 character in a font.
4374
408305be 43752009-06-05 Michael Scherer <misc@mandriva.org>
4376
4377 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
4378 uses case sensitive btree.
4379 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
4380 only for case insensitive filesystems.
4381
8ee1e0d9 43822009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
4383
4384 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
4385 * conf/common.rmk (search_mod_CFLAGS): likewise
4386
a9966eb1 43872009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4388
473d1e45 4389 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 4390 compensate a compiler bug
4391
9e7100fb 43922009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4393
473d1e45 4394 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 4395 instead of '\b'
473d1e45 4396
ede21d71 43972009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4398
4399 Definitions for creating asm symbols with Apple's CC
4400
4401 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
4402 [APPLE_CC] (VARIABLE): likewise
4403
9dbf7653 44042009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4405
4406 Disable lnxboot.img when compiled
4407 with Apple's CC
4408
4409 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
4410 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
4411 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
4412 [! APPLE_CC] (CODE_LENG): skip
4413 [! APPLE_CC] (setup_sects): likewise
4414 [! APPLE_CC]: skip filling
473d1e45 4415
e93cdc3d 44162009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4417
4418 Address in trampolines based on 32-bit registers when compiled
4419 with Apple's CC
4420
473d1e45 4421 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 4422 for addresses
4423 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
4424
6c688477 44252009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4426
4427 Avoid aliases when compiling with Apple's CC for PCBIOS machine
4428
4429 * kern/misc.c [APPLE_CC] (memcpy): new function
4430 [APPLE_CC] (memmove): likewise
4431 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 4432 (memcpy): define alias conditionally on !APPLE_CC
6c688477 4433 (memset): likewise
4434 (abort): likewise
4435 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
4436 APPLE_CC are defined
4437 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
4438 (grub_assert_fail): make prototype conditional
4439
e37ffc5c 44402009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4441
4442 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
4443
473d1e45 4444 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
4445 grub-macho2img
e37ffc5c 4446 (CLEANFILES): add grub-macho2img
4447 (grub_macho2img_SOURCES): new variable
4448 * kern/i386/pc/startup.S (bss_start): new variable
4449 (bss_end): likewise
4450 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
4451 * util/grub-macho2img.c: new file
4452
cf00df31 44532009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4454
4455 Use objconv when compiling with Apple's CC
4456
4457 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
4458 (efiemu64.o): likewise
4459 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
4460 when compiling with Apple's CC
4461 (efiemu64_s.o): likewise
4462 * configure.ac: check for objconv when compiling with Apple's CC
4463 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 4464
d119a20c 44652009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4466
4467 Define segment as well as section when compiling with
4468 Apple's CC
4469
4470 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
4471 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
4472 (efiemu_convert_pointer): likewise
4473 (efiemu_set_virtual_address_map): likewise
4474 (efiemu_convert_pointer): likewise
4475 (efiemu_getcrc32): likewise
4476 (init_crc32_table): likewise
4477 (reflect): likewise
4478 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
4479 (GRUB_MOD_DEP): likewise
473d1e45 4480
c8600122 44812009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4482
4483 Allow a compilation without -mcmodel=large
4484
4485 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
4486 when compiled without -mcmodel=large
473d1e45 4487 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 4488 without -mcmodel=large
473d1e45 4489 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 4490 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 4491
e8df1d4e 44922009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4493
4494 Remove nested functions in efiemu core
4495
4496 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 4497
cc6c3ac1 44982009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4499
4500 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
4501
4502 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
4503 temporary storage
473d1e45 4504 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
4505 using Apple's CC
cc6c3ac1 4506 (grub_cpu_is_tsc_supported): likewise
4507 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 4508
3e325901 45092009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4510
4511 Absolute addressing through constant with Apple's cc
4512
4513 * kern/i386/pc/startup.S: Define necessary constants
4514 and address through it when using ABS with Apple's CC
4515 * boot/i386/pc/diskboot.S: likewise
4516 * boot/i386/pc/boot.S: likewise
4517 * boot/i386/pc/lnxboot.S: likewise
4518 * boot/i386/pc/cdboot.S: likewise
4519 * mmap/i386/pc/mmap_helper.S: likewise
4520 * commands/i386/pc/drivemap_int13h.S: likewise
4521
2b167a72 45222009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4523
4524 Check if compiler is apple cc
4525
4526 * Makefile.in (ASFLAGS): new variable
4527 (TARGET_ASFLAGS): likewise
4528 (TARGET_MODULE_FORMAT): likewise
4529 (TARGET_APPLE_CC): likewise
4530 (OBJCONV): likewise
4531 (TARGET_IMG_CFLAGS): likewise
4532 (TARGET_CPPFLAGS): add includedir
4533 * configure.ac: call grub_apple_cc and grub_apple_target_cc
4534 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
4535 Check for linker script only if compiler isn't Apple's CC
4536 (TARGET_MODULE_FORMAT): set
4537 (TARGET_APPLE_CC): likewise
4538 (TARGET_ASFLAGS): likewise
4539 (ASFLAGS): likewise
4540 Check for objcopy only if compiler isn't Apple's CC
4541 Check for BSS symbol only if compiler isn't Apple's CC
4542 * genmk.rb: adapt nm options if we use Apple's utils
4543 * aclocal.m4 (grub_apple_cc): new test
4544 (grub_apple_target_cc): likewise
473d1e45 4545
fb14123e 45462009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4547
4548 Simplify sed expressions and improve awk
4549
4550 * Makefile.in (install-local): simplify sed expression
4551 * gencmdlist.sh: likewise
4552 * genmoddep.awk: avoid adding module as a dependency of itself
4553
5b889789 45542009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4555
4556 Add missing start symbols
4557
4558 * boot/i386/pc/boot.S: add start
fb14123e 4559 * boot/i386/pc/pxeboot.S: likewise
473d1e45 4560
fd2bf2e3 45612009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4562
4563 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 4564
4565 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 4566 (relocate_addresses): consider both r_addend and value at offset
4567 (make_mods_section): zerofill modinfo and header
4568 (convert_elf): write prefix here
473d1e45 4569
5389763d 45702009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4571
4572 Use .asciz instead of .string
4573
4574 * i386/pc/diskboot.S: use .asciz instead of .string
4575 * i386/pc/boot.S: likewise
4576 * include/grub/dl.h (GRUB_MOD_DEP): likewise
4577 (GRUB_MOD_NAME): likewise
473d1e45 4578
3eb5ed4e 45792009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4580
4581 gfxpayload support
4582
4583 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
4584 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
4585 (grub_video_setup): remove
4586 (grub_video_set_mode): new prototype
4587 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
4588 (vid_mode): remove
4589 (linux_vesafb_res): compile only on PCBIOS
4590 (grub_linux_boot): support gfxpayload
4591 * loader/i386/pc/xnu.c (video_hook): new function
4592 (grub_xnu_set_video): support gfxpayload
4593 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
4594 (DEFAULT_VIDEO_HEIGHT): likewise
4595 (DEFAULT_VIDEO_FLAGS): likewise
4596 (DEFAULT_VIDEO_MODE): new definition
4597 (video_hook): new function
4598 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 4599 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 4600 loading xnu
4601 * video/video.c (grub_video_setup): removed
473d1e45 4602 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 4603 grub_video_setup
4604
4b0e1143 46052009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4606
4607 Avoid calling biosdisk in drivemap
4608
4609 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
4610 (revparse_biosdisk): likewise
4611 (list_mappings): derive name from id directly
4612 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 4613
fda6cb98 46142009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
4615
4616 Script fixes
4617
4618 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
4619 (grub_lexer_param): add tokenonhold
4620 (grub_script_create_cmdline): remove cmdline. All callers updated
4621 (grub_script_function_create): make functionname
4622 grub_script_arg. All callers updated
4623 (grub_script_execute_argument_to_string): new prototype
4624 * kern/parser.c (state_transitions): reorder
4625 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 4626 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 4627 make global
4628 (grub_script_execute_cmdline): use new format
4629 * script/sh/function.c (grub_script_function_create): make functionname
4630 grub_script_arg. All callers updated
473d1e45 4631 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 4632 (grub_script_yylex): remove
4633 (grub_script_yylex2): renamed to ...
4634 (grub_script_yylex): ...renamed
4635 parse the expressions like a${b}c
4636 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
4637 (GRUB_PARSER_TOKEN_VAR): remove
4638 (GRUB_PARSER_TOKEN_NAME): likewise
4639 ("if"): declare as typeless
4640 ("while"): likewise
4641 ("function"): likewise
4642 ("else"): likewise
4643 ("then"): likewise
4644 ("fi"): likewise
4645 (text): remove
4646 (argument): likewise
4647 (script): accept empty scripts and make exit on error
4648 (arguments): use GRUB_PARSER_TOKEN_ARG
4649 (function): likewise
4650 (command): move error handling to script
4651 (menuentry): move grub_script_lexer_ref before
473d1e45 4652 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 4653 argument. All callers updated
4654
f4448a07 46552009-06-04 Robert Millan <rmh.grub@aybabtu.com>
4656
4657 Prevent GRUB from probing floppies during boot.
4658
4659 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
4660 * commands/search.c (options): Add --no-floppy.
4661 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
4662 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
4663 --no-floppy when searching for UUIDs.
4664
2bf5885a 46652009-06-04 Robert Millan <rmh.grub@aybabtu.com>
4666
4667 Simplify the code duplication in commands/search.c.
4668
4669 * commands/search.c (search_label, search_fs_uuid): Merge into ...
4670 (search_fs): ... this. Update all users.
4671
f6fd460a 46722009-06-03 Felix Zielcke <fzielcke@z-51.de>
4673
4674 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
4675
cbb3c83e 46762009-05-28 Pavel Roskin <proski@gnu.org>
4677
57788cfd 4678 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
4679 Remove the original symlink explicitly.
4680
cbb3c83e 4681 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
4682 just one slash. That's how grub_fshelp_find_file() does it.
4683
cd0d5e30 46842009-05-26 Pavel Roskin <proski@gnu.org>
4685
f0f8bbe2 4686 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
4687 to `str'.
4688
cd0d5e30 4689 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
4690 possibly unused.
4691
8c2cab51 46922009-05-25 Christian Franke <franke@computer.org>
4693
4694 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
4695 register.
4696 (grub_atapi_identify): Add wait after drive select.
4697 (grub_ata_identify): Do more strict status register check before
4698 calling grub_atapi_identify (). Suppress error message if status
4699 register is 0x00 after command failure. Add status register
4700 check after PIO read to avoid bogus identify due to stuck DRQ.
4701 Thanks to Pavel Roskin for testing.
4702 (grub_device_initialize): Remove unsafe status register check.
4703 Thanks to 'phcoder' for problem report and patch.
4704 Prevent sign extension in debug message.
4705
230c0ad6 47062009-05-23 Colin D Bennett <colin@gibibit.com>
4707
4708 Cleaned up `include/grub/normal.h'. Grouped prototypes by
4709 definition file, and functions defined in `normal/menu.c' have had
4710 their prototypes moved to `include/grub/menu.h' for consistency.
4711
4712 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
4713 from normal.h.
4714 (grub_menu_get_entry): Likewise.
4715 (grub_menu_get_timeout): Likewise.
4716 (grub_menu_set_timeout): Likewise.
4717 (grub_menu_execute_entry): Likewise.
4718 (grub_menu_execute_with_fallback): Likewise.
4719 (grub_menu_entry_run): Likewise.
4720
4721 * include/grub/normal.h: Re-ordered and grouped function
4722 prototypes by file that the function is defined in.
4723 (grub_menu_execute_callback): Removed; moved to menu.h.
4724 (grub_menu_get_entry): Likewise.
4725 (grub_menu_get_timeout): Likewise.
4726 (grub_menu_set_timeout): Likewise.
4727 (grub_menu_execute_entry): Likewise.
4728 (grub_menu_execute_with_fallback): Likewise.
4729 (grub_menu_entry_run): Likewise.
4730 (grub_menu_addentry): Renamed from this ...
4731 (grub_normal_add_menu_entry): ... to this.
4732
4733 * normal/main.c (grub_menu_addentry): Renamed from this ...
4734 (grub_normal_add_menu_entry): ... to this.
4735
4736 * script/sh/execute.c (grub_script_execute_menuentry): Update
4737 reference to renamed grub_menu_addentry function.
4738
861f03a5 47392009-05-23 Felix Zielcke <fzielcke@z-51.de>
4740
4741 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
4742
96b1619a 47432009-05-22 Pavel Roskin <proski@gnu.org>
4744
bf6a5fb2 4745 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
4746 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
4747 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
4748 compiling for the i386 targets, but not for the utilities.
4749
96b1619a 4750 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
4751 to grub_uint8_t.
4752 (grub_root_drive): Likewise.
4753 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
4754 remove alignment.
4755 (grub_root_drive): Change size to byte.
4756 (grub_start_addr): Remove.
4757 (grub_end_addr): Likewise.
4758 (grub_apm_bios_info): Likewise.
4759
b729776b 47602009-05-21 Felix Zielcke <fzielcke@z-51.de>
4761
4762 * normal/i386: Remove.
4763 * normal/powerpc: Likewise.
4764 * normal/sparc64: Likewise.
4765 * normal/x86_64: Likewise.
4766
0a15ce80 47672009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
4768
4769 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 4770 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 4771 * loader/i386/xnu_helper.S: Likewise
d6da58e6 4772
33db9015 47732009-05-18 Colin D Bennett <colin@gibibit.com>
4774
d6da58e6 4775 Display error messages when parsing a Lua statement fails.
4776 Previously, executing a syntactically invalid statement like
4777 ")foo" or "bar;" would silently fail.
33db9015 4778
4779 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 4780 (grub_lua_parse_line): Improved reporting of Lua parser and
4781 execution errors.
33db9015 4782
46422c89 47832009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
4784
4785 Remove -Werror which causes build to fail on some systems
4786
4787 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
4788 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
4789 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 4790
22f53a96 47912009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
4792
4793 trampoline for linux on 64-bit platform
4794
18f547ad 4795 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
4796 loader/i386/efi/linux_trampoline.S
4797 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 4798 declaration
d6da58e6 4799 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
4800 here
22f53a96 4801 * loader/i386/linux_trampoline.S: moved here
d6da58e6 4802 * loader/i386/efi/linux.c (allocate_pages): reserve space for
4803 trampoline
22f53a96 4804 (jumpvector): removed
4805 (grub_linux_trampoline_start): new declaration
4806 (grub_linux_trampoline_end): likewise
4807 (grub_linux_boot): use trampoline when on 64-bit platform
4808 * loader/i386/linux.c: likewise
4809
cb5a0f40 48102009-05-16 Pavel Roskin <proski@gnu.org>
4811
4812 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
4813 const to avoid a warning.
4814 (grub_lua_setenv): Likewise.
4815 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
4816 lmsg to fix a warning.
4817
334f2c28 48182009-05-16 Felix Zielcke <fzielcke@z-51.de>
4819
4820 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 4821 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4822 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
4823 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4824 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
4825 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
4826 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
4827 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 4828
59e5d3ec 48292009-05-16 Felix Zielcke <fzielcke@z-51.de>
4830
4831 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
4832
9d87a1ba 48332009-05-16 Bean <bean123ch@gmail.com>
4834
4835 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
4836 (lua_mod_SOURCES): New variable.
4837 (lua_mod_CFLAGS): Likewise.
4838 (lua_mod_LDFLAGS): Likewise.
4839
4840 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
4841 (setjmp_mod_SOURCES): New variable.
4842 (setjmp_mod_CFLAGS): Likewise.
4843 (setjmp_LDFLAGS): Likewise.
4844
4845 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
4846 (setjmp_mod_SOURCES): New variable.
4847 (setjmp_mod_CFLAGS): Likewise.
4848 (setjmp_LDFLAGS): Likewise.
4849
4850 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
4851 (setjmp_mod_SOURCES): New variable.
4852 (setjmp_mod_CFLAGS): Likewise.
4853 (setjmp_LDFLAGS): Likewise.
4854
4855 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
4856 (setjmp_mod_SOURCES): New variable.
4857 (setjmp_mod_CFLAGS): Likewise.
4858 (setjmp_LDFLAGS): Likewise.
4859
4860 * normal/i386/setjmp.S: Moved from here ...
4861 * lib/i386/setjmp.S: ... Moved here
4862 * normal/x86_64/setjmp.S: Moved from here ...
4863 * lib/x86_64/setjmp.S: ... Moved here
4864 * normal/powerpc/setjmp.S: Moved from here ...
4865 * lib/powerpc/setjmp.S: ... Moved here
4866 * normal/sparc64/setjmp.S: Moved from here ...
4867 * lib/sparc64/setjmp.S: ... Moved here
4868
4869 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
4870 returns_twice in mingw.
4871
4872 * script/lua/grub_lib.c: New file.
4873 * script/lua/grub_lib.h: Likewise.
4874 * script/lua/grub_lua.h: Likewise.
4875 * script/lua/grub_main.c: Likewise.
4876 * script/lua/lapi.c: Likewise.
4877 * script/lua/lapi.h: Likewise.
4878 * script/lua/lauxlib.c: Likewise.
4879 * script/lua/lauxlib.h: Likewise.
4880 * script/lua/lbaselib.c: Likewise.
4881 * script/lua/lcode.c: Likewise.
4882 * script/lua/lcode.h: Likewise.
4883 * script/lua/ldblib.c: Likewise.
4884 * script/lua/ldebug.c: Likewise.
4885 * script/lua/ldebug.h: Likewise.
4886 * script/lua/ldo.c: Likewise.
4887 * script/lua/ldo.h: Likewise.
4888 * script/lua/ldump.c: Likewise.
4889 * script/lua/lfunc.c: Likewise.
4890 * script/lua/lfunc.h: Likewise.
4891 * script/lua/lgc.c: Likewise.
4892 * script/lua/lgc.h: Likewise.
4893 * script/lua/linit.c: Likewise.
4894 * script/lua/liolib.c: Likewise.
4895 * script/lua/llex.c: Likewise.
4896 * script/lua/llex.h: Likewise.
4897 * script/lua/llimits.h: Likewise.
4898 * script/lua/lmathlib.c: Likewise.
4899 * script/lua/lmem.c: Likewise.
4900 * script/lua/lmem.h: Likewise.
4901 * script/lua/loadlib.c: Likewise.
4902 * script/lua/lobject.c: Likewise.
4903 * script/lua/lobject.h: Likewise.
4904 * script/lua/lopcodes.c: Likewise.
4905 * script/lua/lopcodes.h: Likewise.
4906 * script/lua/loslib.c: Likewise.
4907 * script/lua/lparser.c: Likewise.
4908 * script/lua/lparser.h: Likewise.
4909 * script/lua/lstate.c: Likewise.
4910 * script/lua/lstate.h: Likewise.
4911 * script/lua/lstring.c: Likewise.
4912 * script/lua/lstring.h: Likewise.
4913 * script/lua/lstrlib.c: Likewise.
4914 * script/lua/ltable.c: Likewise.
4915 * script/lua/ltable.h: Likewise.
4916 * script/lua/ltablib.c: Likewise.
4917 * script/lua/ltm.c: Likewise.
4918 * script/lua/ltm.h: Likewise.
4919 * script/lua/lua.h: Likewise.
4920 * script/lua/luaconf.h: Likewise.
4921 * script/lua/lualib.h: Likewise.
4922 * script/lua/lundump.c: Likewise.
4923 * script/lua/lundump.h: Likewise.
4924 * script/lua/lvm.c: Likewise.
4925 * script/lua/lvm.h: Likewise.
4926 * script/lua/lzio.c: Likewise.
4927 * script/lua/lzio.h: Likewise.
4928
5e898c9d 49292009-05-16 Bean <bean123ch@gmail.com>
4930
4931 * include/grub/kernel.h (grub_module_header_types): Add type
4932 OBJ_TYPE_CONFIG.
4933
4934 * kern/main.c (grub_load_config): New function.
4935 (grub_main): Call grub_load_config to read boot config.
4936
4937 * grub-mkimage (generate_image): New parameter config_path.
4938 (options): New option --config.
4939 (main): Parse --config option, and pass it to generate_image.
4940
cf353a47 49412009-05-14 Christian Franke <franke@computer.org>
4942
4943 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
4944 This fixes build on Cygwin.
4945
3834887f 49462009-05-14 Pavel Roskin <proski@gnu.org>
4947
4948 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
4949 jump. This saves two bytes, so the typical case of 2 swapped
4950 drives would fit 32 bytes.
4951
8090fc01 49522009-05-13 Pavel Roskin <proski@gnu.org>
4953
ac963883 4954 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
4955 grub_uint32_t to avoid a warning.
4956
8090fc01 4957 * loader/i386/linux.c (allocate_pages): When assigning
4958 real_mode_mem, cast through grub_size_t to fix a warning. The
4959 code already makes sure that the value would fit a pointer.
4960 (grub_linux_setup_video): Cast render_target->data to
4961 grub_size_t to fix a warning.
4962
18f547ad 49632009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 4964
4965 * commands/i386/pc/drivemap.c: New file - implement drivemap
4966 command.
4967 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
4968 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
4969
6f6a8b28 49702009-05-13 Pavel Roskin <proski@gnu.org>
4971
4972 * util/i386/pc/grub-setup.c (setup): Remove unused variable
4973 embedding_area_exists.
4974
15fbf4c4 49752009-05-13 Robert Millan <rmh.grub@aybabtu.com>
4976
4977 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
4978 it easier to understand / work with.
59978c8a 4979 Improve warning messages for cases where there's no embedding area,
4980 or when it is too small (or core.img too large).
15fbf4c4 4981
238e871f 49822009-05-13 Pavel Roskin <proski@gnu.org>
4983
0ab3a9a4 4984 * loader/i386/pc/multiboot2.c: Add necessary includes for
4985 grub_multiboot2_real_boot().
4986
a2c8c5f8 4987 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
4988 PX record is always little-endian. We only need the lower 2
4989 bytes of the mode.
4990
faec96af 4991 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
4992 facilitate code reuse.
4993 (grub_cpio_mount): Use "struct head", not a char buffer. This
4994 fixes a warning reported by gcc 4.4.
4995
238e871f 4996 * kernel/disk.c (grub_disk_read): Use void pointer for the
4997 buffer.
4998 (grub_disk_write): Use const void pointer for the buffer.
4999 Adjust all callers. Remove unnecessary casts.
5000
901d2f0c 50012009-05-10 Robert Millan <rmh.grub@aybabtu.com>
5002
5003 * util/i386/pc/grub-install.in: Update copyright year.
5004
18f547ad 50052009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 5006
5007 gptsync
5008
5009 * commands/gptsync.c: new file
5010 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
5011 (gptsync_mod_SOURCES): new variable
5012 (gptsync_mod_CFLAGS): likewise
5013 (gptsync_mod_LDFLAGS): likewise
18f547ad 5014 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 5015 new definition
5016 (GRUB_PC_PARTITION_TYPE_HFS): likewise
5017 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
5018 * conf/i386-ieee1275.rmk: likewise
5019 * conf/i386-pc.rmk: likewise
5020 * conf/powerpc-ieee1275.rmk: likewise
5021
b4ba690a 50222009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
5023
5024 Fixed grub-emu
5025
5026 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
5027 (grub_dl_ref): likewise
5028
317e1a44 50292009-05-08 Robert Millan <rmh.grub@aybabtu.com>
5030
5031 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
5032 split in two functions (one for msdos and one for gpt).
5033
041b8094 50342009-05-08 Pavel Roskin <proski@gnu.org>
5035
752473c2 5036 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
5037 not modified.
5038
041b8094 5039 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
5040 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
5041 Initialize them with -1. Add sanity check for bad1. Eliminate
5042 nerr variable.
5043
172800ce 50442009-05-08 David S. Miller <davem@davemloft.net>
5045
5046 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
5047
29aa5e81 50482009-05-06 Robert Millan <rmh.grub@aybabtu.com>
5049
5050 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 5051 existence.
29aa5e81 5052
96613b62 50532009-05-05 Felix Zielcke <fzielcke@z-51.de>
5054
5055 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 5056 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 5057
eef73c8a 50582009-05-05 David S. Miller <davem@davemloft.net>
5059
5060 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
5061
119494b5 50622009-05-05 Pavel Roskin <proski@gnu.org>
5063
5064 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
5065 of grub_dl_ref() and grub_dl_unref().
5066 * commands/parttool.c: Remove preprocessor conditionals around
5067 grub_dl_ref() and grub_dl_unref().
5068 * fs/affs.c: Likewise.
5069 * fs/afs.c: Likewise.
5070 * fs/cpio.c: Likewise.
5071 * fs/ext2.c: Likewise.
5072 * fs/fat.c: Likewise.
5073 * fs/hfs.c: Likewise.
5074 * fs/hfsplus.c: Likewise.
5075 * fs/iso9660.c: Likewise.
5076 * fs/jfs.c: Likewise.
5077 * fs/minix.c: Likewise.
5078 * fs/ntfs.c: Likewise.
5079 * fs/reiserfs.c: Likewise.
5080 * fs/sfs.c: Likewise.
5081 * fs/udf.c: Likewise.
5082 * fs/ufs.c: Likewise.
5083 * fs/xfs.c: Likewise.
5084 * include/grub/dl.h: Likewise.
5085 * loader/xnu.c: Likewise.
5086
de5fd76e 50872009-05-04 Pavel Roskin <proski@gnu.org>
5088
5089 * commands/acpi.c: Remove unused variable my_mod.
5090 * partmap/amiga.c: Likewise.
5091 * partmap/apple.c: Likewise.
5092 * partmap/gpt.c: Likewise.
5093 * partmap/pc.c: Likewise.
5094 * partmap/sun.c: Likewise.
5095 * term/gfxterm.c: Likewise.
5096 * term/i386/pc/vesafb.c: Likewise.
5097 * term/i386/pc/vga.c: Likewise.
5098
983598ad 50992009-05-04 David S. Miller <davem@davemloft.net>
5100
5101 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
5102 pointer args to grub_ieee1275_get_property().
5103
8aadec43 5104 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
5105
9554b15e 5106 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
5107 devices, and do not traverse down under controller nodes.
5108
67e23c90 5109 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
5110 (grub_ofdisk_open): Use it to un-escape "," characters.
5111 * kern/disk.c (find_part_sep): New.
5112 (grub_disk_open): Use it to find the first non-escaped ','
5113 character in the disk name.
5114 * util/ieee1275/devicemap.c (escape_of_path): New.
5115 (grub_util_emit_devicemap_entry): Use it.
5116 * util/sparc64/ieee1275/grub-install.in: Update script to
5117 strip partition specifiers properly by not triggering on
5118 '\' escaped ',' characters.
5119
74bfdd2f 51202009-05-04 Robert Millan <rmh.grub@aybabtu.com>
5121
5122 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
5123 to 0x300.
5124 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
5125 resolutions.
5126 (linux_vesafb_modes): Add a lot of additional modes to the list (based
5127 on documentation from Wikipedia).
5128
4241d2b1 51292009-05-04 Pavel Roskin <proski@gnu.org>
5130
5131 * disk/ata.c: Spelling fixes.
5132 * disk/raid.c: Likewise.
5133 * disk/usbms.c: Likewise.
5134 * disk/dmraid_nvidia.c: Likewise.
5135 * kern/ieee1275/openfw.c: Likewise.
5136 * kern/ieee1275/init.c: Likewise.
5137 * kern/ieee1275/cmain.c: Likewise.
5138 * boot/i386/pc/cdboot.S: Likewise.
5139 * video/readers/png.c: Likewise.
5140 * video/i386/pc/vbe.c: Likewise.
5141 * fs/udf.c: Likewise.
5142 * fs/hfs.c: Likewise.
5143 * fs/reiserfs.c: Likewise.
5144 * efiemu/runtime/efiemu.c: Likewise.
5145 * efiemu/main.c: Likewise.
5146 * efiemu/mm.c: Likewise.
5147 * include/grub/elf.h: Likewise.
5148 * include/grub/xnu.h: Likewise.
5149 * include/grub/usbdesc.h: Likewise.
5150 * include/grub/usb.h: Likewise.
5151 * include/grub/script_sh.h: Likewise.
5152 * include/grub/lib/LzmaEnc.h: Likewise.
5153 * include/grub/efiemu/efiemu.h: Likewise.
5154 * include/grub/command.h: Likewise.
5155 * normal/menu.c: Likewise.
5156 * normal/main.c: Likewise.
5157 * normal/datetime.c: Likewise.
5158 * bus/usb/uhci.c: Likewise.
5159 * mmap/i386/uppermem.c: Likewise.
5160 * mmap/mmap.c: Likewise.
5161 * commands/acpi.c: Likewise.
5162 * commands/test.c: Likewise.
5163 * partmap/apple.c: Likewise.
5164 * font/font.c: Likewise.
5165 * loader/sparc64/ieee1275/linux.c: Likewise.
5166 * loader/macho.c: Likewise.
5167 * loader/i386/bsd_trampoline.S: Likewise.
5168 * loader/i386/bsd.c: Likewise.
5169 * loader/xnu.c: Likewise.
5170 * term/i386/pc/vesafb.c: Likewise.
5171 * term/usb_keyboard.c: Likewise.
5172 * util/resolve.c: Likewise.
5173 * util/getroot.c: Likewise.
5174
0cfc0083 51752009-05-04 Felix Zielcke <fzielcke@z-51.de>
5176
5177 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
5178
7c1d00cd 51792009-05-04 Robert Millan <rmh.grub@aybabtu.com>
5180
5181 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
5182 build error.
5183
b01f0548 51842009-05-04 Robert Millan <rmh.grub@aybabtu.com>
5185
5186 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
5187 parameter only available on BIOS.
5188
ecc3eb22 51892009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
5190
5191 Removed wrong semicolon in declaration
5192
5193 * grub/misc.h (grub_dprintf): remove semicolon
5194
112972a9 51952009-05-04 Robert Millan <rmh.grub@aybabtu.com>
5196
5197 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
5198 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
5199 is done by grub_cmd_linux() now).
5200 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
5201 restore video to text mode.
5202 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
5203 indicates lack of "vga=" parameter. "vga=0" is mapped to
5204 `GRUB_LINUX_VID_MODE_NORMAL'.
5205
afd5c115 52062009-05-04 Felix Zielcke <fzielcke@z-51.de>
5207
5208 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
5209 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
5210 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 5211 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 5212 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
5213 `grub_script.tab.c'.
5214
5215 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5216 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5217 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5218 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5219 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5220
faa517ce 5221 * Makefile.in: Remove duplicated 2008 in Copyright line.
5222
ae0c0bdc 52232009-05-04 Robert Millan <rmh.grub@aybabtu.com>
5224
473d1e45 5225 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 5226 unconditionally.
5227 * include/grub/util/misc.h (grub_util_warn): New declaration.
5228
5229 * util/i386/pc/grub-install.in: Understand --force and pass it down
5230 to grub-setup.
5231
5232 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
5233 down to setup().
5234 (setup): Improve error messages and add warnings when requested to
5235 install in odd layouts. Refuse to install using blocklists unless
5236 --force was set.
5237
18f547ad 52382009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 5239
5240 * disk/raid.c (grub_raid_scan_device): Improve debug message.
5241
6d260daa 52422009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
5243
5244 Updated copyright year
5245
5246 * fs/hfsplus.c: updated copyright year
18f547ad 5247
69f853f8 52482009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
5249
5250 HFS+ UUID
5251
18f547ad 5252 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 5253 in the space previously used by unused3
5254 (grub_hfsplus_uuid): new function
5255 (grub_hfsplus_fs): added uuid field
5256
4c402e73 52572009-05-03 Pavel Roskin <proski@gnu.org>
5258
5259 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
5260 suppress warnings. It's no longer needed.
5261 * disk/host.c: Likewise.
5262 * disk/ata_pthru.c: Likewise.
5263 * disk/loopback.c: Likewise.
5264 * hook/datehook.c: Likewise.
5265 * parttool/pcpart.c: Likewise.
5266 * fs/i386/pc/pxe.c: Likewise.
5267 * fs/ntfscomp.c: Likewise.
5268 * efiemu/main.c: Likewise.
5269 * mmap/mmap.c: Likewise.
5270 * commands/crc.c: Likewise.
5271 * commands/hexdump.c: Likewise.
5272 * commands/hdparm.c: Likewise.
5273 * commands/acpi.c: Likewise.
5274 * commands/echo.c: Likewise.
5275 * commands/minicmd.c: Likewise.
5276 * commands/blocklist.c: Likewise.
5277 * commands/memrw.c: Likewise.
5278 * commands/loadenv.c: Likewise.
5279 * commands/usbtest.c: Likewise.
5280 * commands/lsmmap.c: Likewise.
5281 * commands/boot.c: Likewise.
5282 * commands/parttool.c: Likewise.
5283 * commands/configfile.c: Likewise.
5284 * commands/search.c: Likewise.
5285 * commands/ieee1275/suspend.c: Likewise.
5286 * commands/cat.c: Likewise.
5287 * commands/i386/pc/pxecmd.c: Likewise.
5288 * commands/i386/pc/play.c: Likewise.
5289 * commands/i386/pc/halt.c: Likewise.
5290 * commands/i386/pc/vbeinfo.c: Likewise.
5291 * commands/i386/pc/vbetest.c: Likewise.
5292 * commands/lspci.c: Likewise.
5293 * commands/date.c: Likewise.
5294 * commands/handler.c: Likewise.
5295 * commands/ls.c: Likewise.
5296 * commands/test.c: Likewise.
5297 * commands/cmp.c: Likewise.
5298 * commands/efi/loadbios.c: Likewise.
5299 * commands/efi/fixvideo.c: Likewise.
5300 * commands/halt.c: Likewise.
5301 * commands/help.c: Likewise.
5302 * commands/reboot.c: Likewise.
5303 * hello/hello.c: Likewise.
5304 * script/sh/main.c: Likewise.
5305 * loader/xnu.c: Likewise.
5306 * term/terminfo.c: Likewise.
5307 * term/i386/pc/serial.c: Likewise.
5308 * term/usb_keyboard.c: Likewise.
5309
515b5079 53102009-05-03 David S. Miller <davem@davemloft.net>
5311
5312 * normal/menu.c: Include grub/parser.h
5313
dfc31a22 53142009-05-03 Pavel Roskin <proski@gnu.org>
5315
2fee74f1 5316 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
5317 not char*.
5318 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
5319 Suggested by Javier Martín <lordhabbit@gmail.com>
5320
dfc31a22 5321 * util/i386/pc/grub-mkrescue.in: Allow for the case when
5322 efiemu??.o doesn't exist.
5323 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
5324 copying.
5325
18f547ad 53262009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 5327
5328 FreeBSD 64-bit support
5329
18f547ad 5330 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 5331 and loader/i386/bsd_trampoline.S
5332 (bsd_mod_ASFLAGS): new variable
5333 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
5334 (FREEBSD_MODTYPE_KERNEL64): likewise
5335 (grub_bsd64_trampoline_start): likewise
5336 (grub_bsd64_trampoline_end): likewise
5337 (grub_bsd64_trampoline_selfjump): likewise
5338 (grub_bsd64_trampoline_gdt): likewise
5339 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
5340 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
5341 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
5342 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 5343 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 5344 of "attrib" member
5345 * loader/i386/bsd_pagetable.c: new file
5346 * loader/i386/bsd_trampoline.S: likewise
5347 * loader/i386/bsd.c (ALIGN_QWORD): new macro
5348 (ALIGN_VAR): likewise
5349 (entry_hi): new variable
5350 (kern_end_mdofs): likewise
5351 (is_64bit): likewise
5352 (grub_freebsd_add_meta): use ALIGN_VAR
5353 (grub_e820_mmap): new declaration
5354 (grub_freebsd_add_mmap): new function
5355 (grub_freebsd_add_meta_module): support 64 bit kernels
5356 (grub_freebsd_list_modules): use ALIGN_VAR
5357 (gdt_descriptor): new declaration
5358 (grub_freebsd_boot): support 64 bit kernels
5359 (grub_bsd_elf64_hook): new function
5360 (grub_bsd_load_elf): support elf64
5361
038c5720 53622009-05-03 Bean <bean123ch@gmail.com>
5363
5364 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
5365 after we get the result of if statement.
5366
fc45fb58 53672009-05-03 Bean <bean123ch@gmail.com>
5368
5369 * Makefile.in (enable_efiemu): New variable.
5370
5371 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
5372 set.
5373 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
5374 path.
5375 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
5376 path, add -mno-red-zone option.
5377 (efiemu64_s.o): Likewise.
5378 (efiemu64.o): Use macro $^ for source file.
5379
5380 * configure.ac (--enable-efiemu): New option.
5381
bbee0f2b 53822009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
5383
5384 xnu support
5385
5386 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
5387 (pkglib_MODULES): add xnu.mod
5388 (xnu_mod_SOURCES): new variable
5389 (xnu_mod_CFLAGS): likewise
5390 (xnu_mod_LDFLAGS): likewise
5391 (xnu_mod_ASFLAGS): likewise
5392 * conf/i386-pc.rmk: likewise
5393 * conf/x86_64-efi.rmk: likewise
7dd4a573 5394 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 5395 new declaration
5396 * include/grub/i386/macho.h: new file
5397 * include/grub/i386/xnu.h: likewise
5398 * include/grub/macho.h: likewise
5399 * include/grub/machoload.h: likewise
5400 * include/grub/x86_64/macho.h: likewise
5401 * include/grub/x86_64/xnu.h: likewise
5402 * include/grub/xnu.h: likewise
5403 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
5404 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
5405 * loader/i386/efi/xnu.c: new file
5406 * loader/i386/pc/xnu.c: likewise
5407 * loader/i386/xnu.c: likewise
5408 * loader/i386/xnu_helper.S: likewise
5409 * loader/macho.c: likewise
5410 * loader/xnu.c: likewise
5411 * loader/xnu_resume.c: likewise
5412 * util/grub-dumpdevtree: likewise
5413 * include/grub/i386/pit.h: include grub/err.h
5414 (grub_pit_wait): export
5415 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 5416
5caf964d 54172009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
5418
5419 Efiemu
7dd4a573 5420
5caf964d 5421 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 5422 _linux_efi, linux_efi.
5423 new files in grub-emu
5caf964d 5424 new targets efiemu32.o and efiemu64.o
5425 * loader/linux_normal_efiemu.c: likewise
5426 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 5427 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 5428 files to copy
5429 * include/grub/autoefi.h: new file
7dd4a573 5430 * include/grub/i386/efiemu.h: likewise
5caf964d 5431 * include/grub/i386/pc/efiemu.h: likewise
5432 * include/grub/efi/api.h: add LL suffix when necessary
5433 new definitions relating to tables
5434 * include/grub/efiemu/efiemu.h: new file
5435 * include/grub/efiemu/runtime.h: likewise
5436 * efiemu/prepare.c: likewise
5437 * efiemu/loadcore_common.c: likewise
5438 * efiemu/loadcore64.c: likewise
5439 * efiemu/runtime/efiemu.sh: likewise
5440 * efiemu/runtime/efiemu.S: likewise
5441 * efiemu/runtime/efiemu.c: likewise
5442 * efiemu/runtime/config.h: likewise
5443 * efiemu/prepare32.c: likewise
5444 * efiemu/main.c: likewise
5445 * efiemu/modules/pnvram.c: likewise
5446 * efiemu/modules/i386: likewise
5447 * efiemu/modules/i386/pc: likewise
5448 * efiemu/modules/acpi.c: likewise
5449 * efiemu/i386/pc/cfgtables.c: likewise
5450 * efiemu/i386/loadcore64.c: likewise
5451 * efiemu/i386/loadcore32.c: likewise
5452 * efiemu/prepare64.c: likewise
5453 * efiemu/loadcore.c: likewise
5454 * efiemu/symbols.c: likewise
5455 * efiemu/mm.c: likewise
5456 * efiemu/loadcore32.c: likewise
7dd4a573 5457
54582009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 5459
5460 ACPI spoofing
5461
5462 * commands/acpi.c: new file
5463 * commands/i386/pc/acpi.c: likewise
5464 * commands/efi/acpi.c: likewise
5465 * include/grub/acpi.h: likewise
5466 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
5467 (acpi_mod_SOURCES): new variable
5468 (acpi_mod_CFLAGS): likewise
5469 (acpi_mod_LDFLAGS): likewise
5470 * conf/i386-efi.rmk: likewise
5471 * conf/x86_64-efi.rmk: likewise
5472
7dd4a573 54732009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 5474
5475 Missing part from mmap patch
5476
5477 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
5478 (grub_mmap_unregister)
5479 (grub_mmap_free_and_unregister): use grub_mmap_register
5480
7dd4a573 54812009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 5482
5483 Mmap services
5484
5485 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
5486 * loader/i386/linux.c (find_mmap_size): likewise
5487 (allocate_pages): likewise
5488 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
5489 (grub_fill_multiboot_mmap): likewise
5490 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
5491 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
5492 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
5493 (OPENBSD_MMAP_RESERVED): likewise
5494 * include/grub/i386/pc/memory.h: include grub/memory.h
5495 (grub_lower_mem): removed
5496 (grub_upper_mem): likewise
5497 (GRUB_MACHINE_MEMORY_ACPI): new definition
5498 (GRUB_MACHINE_MEMORY_NVS): likewise
5499 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
5500 (GRUB_MACHINE_MEMORY_HOLE): likewise
5501 (grub_machine_mmap_register): likewise
5502 (grub_machine_mmap_unregister): likewise
5503 (grub_machine_get_upper): likewise
5504 (grub_machine_get_lower): likewise
5505 (grub_machine_get_post64): likewise
5506 * include/grub/i386/efi/memory.h: new file
5507 * include/grub/x86_64/efi/memory.h: likewise
5508 * include/grub/efi/memory.h: likewise
5509 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
5510 (mmap_mod_SOURCES): new variable
5511 (mmap_mod_LDFLAGS): likewise
5512 (mmap_mod_ASFLAGS): likewise
5513 * conf/i386-coreboot.rmk: likewise
5514 * conf/i386-ieee1275.rmk: likewise
5515 * conf/i386-efi.rmk: likewise
5516 * conf/x86_64-efi.rmk: likewise
5517 * include/grub/types.h (UINT_TO_PTR): new macro
5518 (PTR_TO_UINT32): likewise
5519 (PTR_TO_UINT64): likewise
5520 * include/grub/memory.h: new file
5521 * mmap/i386/pc/mmap.c: likewise
5522 * mmap/i386/pc/mmap_helper.S: likewise
5523 * mmap/i386/uppermem.c: likewise
5524 * mmap/mmap.c: likewise
5525 * mmap/efi/mmap.c: likewise
7dd4a573 5526 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 5527 grub_upper_mem
5528 * kern/i386/pc/init.c (grub_lower_mem): removed variable
5529 (grub_upper_mem): likewise
5530 (grub_machine_init): don't use grub_upper_mem,
5531 make grub_lower_mem local
5532 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
5533 grub_mmap_iterate and grub_mmap_get_upper
5534 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
5535
d558e6b5 55362009-05-02 Bean <bean123ch@gmail.com>
5537
5538 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
5539 script/sh/parser.y.
5540 (pkglib_MODULES): Add normal.mod and sh.mod.
5541 (normal_SOURCES): New variable.
5542 (normal_mod_CFLAGS): Likewise.
5543 (normal_mod_LDFLAGS): Likewise.
5544 (sh_mod_SOURCES): Likewise.
5545 (sh_mod_CFLAGS): Likewise.
5546 (sh_mod_LDFLAGS): Likewise.
5547
5548 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
5549 script/sh/lexer.c_DEPENDENCIES.
5550 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
5551 kern/rescue_reader.c and kern/rescue_parser.c.
5552 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
5553 (grub_emu_SOURCES): Change source files.
5554 (pkglib_MODULES): Remove normal.mod.
5555 (normal_SOURCES): Removed.
5556 (normal_mod_CFLAGS): Likewise.
5557 (normal_mod_LDFLAGS): Likewise.
5558 * conf/i386-coreboot.rmk: Likewise.
5559 * conf/i386-efi.rmk: Likewise.
5560 * conf/i386-ieee1276.rmk: Likewise.
5561 * conf/powerpc-ieee1275.rmk: Likewise.
5562 * conf/sparc64-ieee1275.rmk: Likewise.
5563 * conf/x86_64-efi.rmk: Likewise.
5564
5565 * include/grub/command.h (grub_command_execute): New inline function.
5566
5567 * include/grub/menu.h (grub_menu_entry): Removed commands field.
5568
5569 * include/grub/normal.h: Remove <grub/setjmp.h>.
5570 (grub_fs_module_list): Moved to normal/autofs.c.
5571 (grub_exit_env): Removed.
5572 (grub_command_execute): Likewise.
5573 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
5574 parameter script.
5575 (read_command_list): New function declaration.
5576 (read_fs_list): Likewise.
5577
5578 * include/parser.h: Include <grub/reader.h>.
5579 (grub_parser_split_cmdline): Change type of getline parameter.
5580 (grub_parser): New structure.
5581 (grub_parser_class): New variable.
5582 (grub_parser_execute): New function declaration.
5583 (grub_register_rescue_parser): Likewise.
5584 (grub_parser_register): New inline function.
5585 (grub_parser_unregister): Likewise.
5586 (grub_parser_get_current): Likewise.
5587 (grub_parser_set_current): Likewise.
5588
5589 * include/grub/reader.h: New file.
5590 * kern/reader.c: Likewise.
5591 * kern/rescue_parser.c: Likewise.
5592 * kern/rescue_reader.c: Likewise.
5593 * normal/autofs.c: Likewise.
5594 * normal/dyncmd.c: Likewise.
5595
5596 * include/grub/rescue.h: Removed.
5597 * normal/command.h: Likewise.
5598
5599 * include/grub/script.h: Moved to ...
5600 * include/grub/script_sh.h: ... Moved here.
5601 * normal/execute.c: Moved to ...
5602 * script/sh/execute.c: ... Moved here.
5603 * normal/function.c: Moved to ...
5604 * script/sh/function.c: ... Moved here.
5605 * normal/lexer.c: Moved to ...
5606 * script/sh/lexer.c: ... Moved here.
5607 * normal/parser.y: Moved to ...
5608 * script/sh/parser.y: ... Moved here.
5609 * normal/script.c: Moved to ...
5610 * script/sh/script.c: ... Moved here.
5611
5612 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
5613 <grub/reader.h>.
5614 (grub_exit_env): Removed.
5615 (fs_module_list): Moved to normal/autofs.c.
5616 (grub_file_getline): Don't handle comment here.
5617 (free_menu): Skip removed field entry->commands.
5618 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
5619 script parameter.
5620 (read_config_file): Removed nested parameter, change getline function.
5621 (grub_enter_normal_mode): Removed.
5622 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
5623 (read_command_list): Likewise.
5624 (autoload_fs_module): Moved to normal/autofs.c.
5625 (read_fs_list): Likewise.
5626 (reader_nested): New variable.
5627 (grub_normal_execute): Run parser.sh to switch to sh parser.
5628 (grub_cmd_rescue): Removed.
5629 (cmd_normal): Removed.
5630 (grub_cmd_normal): Unregister itself at the beginning. Don't register
5631 rescue command.
5632 (grub_cmdline_run): New function.
5633 (grub_normal_reader_init): Likewise.
5634 (grub_normal_read_line): Likewise.
5635 (grub_env_write_pager): Likewise.
5636 (cmdline): New variable.
5637 (grub_normal_reader): Likewise.
5638 (GRUB_MOD_INIT): Register normal reader and set as current, register
5639 pager hook, register normal command with grub_register_command_prio,
5640 so that it won't show up in command.lst.
5641 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
5642 grub_fs_autoload_hook.
5643
5644 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
5645 (grub_menu_execute_entry): Replace grub_script_execute with
5646 grub_parser_execute, change parameter to grub_command_execute.
5647
5648 * normal/menu_text.c: Remove <grub/script.h>.
5649
5650 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
5651 and <grub/parser.h>.
5652 (run): Change editor_getline to use new parser interface. Change
5653 parameter to grub_command_execute.
5654
5655 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
5656 <grub/reader.h> and <grub/parser.h>.
5657 (grub_load_normal_mode): Execute normal command.
5658 (grub_main): Call grub_register_core_commands,
5659 grub_register_rescue_parser and grub_register_rescue_reader, use
5660 grub_reader_loop to enter input loop.
5661
7dd4a573 5662 * kern/parser.c (grub_parser_split_cmdline): Change type of
5663 getline parameter.
d558e6b5 5664 (grub_parser_class): New variable.
5665 (grub_parser_execute): New function.
5666
5667 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
5668 * loader/multiboot2.c: Likewise.
5669 * loader/sparc64/ieee1275/linux.c: Likewise.
5670
5671 * util/grub-emu.c (read_command_list): New dummy function.
5672
18db813d 56732009-05-02 Robert Millan <rmh.grub@aybabtu.com>
5674
5675 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
5676 count to 16 for CCISS and IDA.
5677
6c67de15 56782009-05-02 Robert Millan <rmh.grub@aybabtu.com>
5679
5680 * normal/menu_text.c (grub_wait_after_message): Print a newline
5681 after waiting for user input.
5682
5683 * loader/i386/linux.c: Include `<grub/normal.h>'.
5684 (grub_cmd_linux): Improve the error message about `ask' mode, by
5685 waiting for user input so it's not missed (we can do this, since
5686 user requested interaction).
5687
d9dc87b0 56882009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
5689
5690 Added missing lst to grub-mkrescue
5691
5692 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
5693 and ${input_dir}/parttool.lst
5694
ac8a2baa 56952009-04-30 David S. Miller <davem@davemloft.net>
5696
ad22a610 5697 * util/hostdisk.c (device_is_wholedisk): New function.
5698 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
5699 zero only if device_is_wholedisk() returns true.
5700
6966215d 5701 * util/hostdisk.c (convert_system_partition_to_system_disk):
5702 Handle virtual disk devices named /dev/vdiskX as found on sparc
5703 and powerpc.
5704
ac8a2baa 5705 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
5706 lettered partition specifier is found, convert to numbered.
5707
979b4fb4 57082009-04-29 David S. Miller <davem@davemloft.net>
5709
e2bf39b2 5710 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
5711 * include/grub/sparc64/ieee1275/memory.h: Likewise.
5712
3c64e104 5713 * normal/command.c: Add missing newline at end of file.
5714
979b4fb4 5715 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
5716 warnings.
5717 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
5718 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
5719 grub_ofdisk_read): Likewise, and deal similarly with the fact that
5720 ihandles have a 32-bit type but need to be stored in a "void *".
5721
136d9f82 57222009-04-28 Pavel Roskin <proski@gnu.org>
5723
9459c306 5724 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
5725 not disk. Adjust all dependencies.
2e08a26a 5726 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 5727 grub_disk_close().
5728
136d9f82 5729 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
5730 parent's partition, don't copy it by reference, as it gets freed
5731 on close.
5732
7dd4a573 57332009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 5734
5735 Preboot hooks support
5736
5737 * commands/boot.c (struct grub_preboot_t): new declaration
5738 (preboots_head): new variable
5739 (preboots_tail): likewise
5740 (grub_loader_register_preboot_hook): new function
5741 (grub_loader_unregister_preboot_hook): likewise
5742 (grub_loader_set): launch preboot hooks
5743 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
5744 (grub_loader_register_preboot_hook): new declaration
5745 (grub_loader_unregister_preboot_hook): likewise
5746
5af922b5 57472009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
5748
5749 Warning fix
5750
7dd4a573 5751 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 5752 calling grub_dprintf
5753
a5562c30 57542009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
5755
5756 Bug and warning fixes
5757
7dd4a573 5758 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 5759 declaration
5760 * commands/test.c (test_parse): fixed bug with file tests and corrected
5761 declaration of find_file
5762
4006f85c 57632009-04-26 Pavel Roskin <proski@gnu.org>
5764
5765 * Makefile.in: Don't install empty manual pages if help2man is
5766 missing. Use help2man option for output, not shell redirection.
5767
5c77c3de 57682009-04-26 David S. Miller <davem@davemloft.net>
5769
5770 * util/grub-mkdevicemap.c (make_device_map): Add missing
5771 NESTED_FUNC_ATTR to process_device().
5772
033b10a8 57732009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
5774
5775 Test command
5776
5777 * commands/test.c: rewritten to use bash-like test
5778
e4343593 57792009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
5780
5781 Parttool autoloading and improvements
5782
7dd4a573 5783 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 5784 (parttool.lst): new target
5785 * genmk.rb: generate parttool-*
5786 (CLEANFILES): add #{parttool}
5787 (PARTTOOLFILES): new variable
5788 * genparttoollist.sh: new file
7dd4a573 5789 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 5790 (grub_pcpart_type): likewise
5791 * commands/parttool.c (helpmsg): new variable
5792 (grub_cmd_parttool): output help if not enough arguments are supplied
5793 autoload modules
5794 (GRUB_MOD_INIT(parttool)): use helpmsg
5795
0d312500 57962009-04-24 David S. Miller <davem@davemloft.net>
5797
7dd4a573 5798 Avoiding opening same device multiple times in device iterator.
0d312500 5799
5800 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 5801 and use it to build a list of partitions in iterate_disk() and
0d312500 5802 iterate_partition().
5803
ac20caff 5804 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
5805 on disk->data.
5806
0dcf7495 5807 * disk/ieee1275/nand.c (grub_nand_iterate): Return
5808 grub_devalias_iterate() result instead of unconditional 0.
5809 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
5810 Also, capture hook return value, either directly or via
5811 grub_children_iterate(), and propagate to caller.
5812 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
5813 grub_children_iterate): Return value is now 'int' instead of
5814 'grub_err_t'.
5815 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
5816 like a proper iterator, stopping when hooks return non-zero.
5817 (grub_devalias_iterate): Likewise.
5818
c8c08833 58192009-04-23 David S. Miller <davem@davemloft.net>
5820
5821 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
5822
f01005a8 58232009-04-22 David S. Miller <davem@davemloft.net>
5824
5825 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
5826 is larger than address_cells, use that value for address_cells too.
5827
4e8269da 5828 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
5829 IEEE1275_MAX_PATH_LEN): Define.
5830 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
5831 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
5832 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
5833 'devtype'. Explicitly NULL terminate devalias expansion.
5834
a1447506 5835 * util/sparc64/ieee1275/misc.c: New file.
5836 * util/sparc64/ieee1275/grub-setup.c: New file.
5837 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
5838 * util/sparc64/ieee1275/grub-mkimage.c: New file.
5839 * util/sparc64/ieee1275/grub-install.in: New file.
5840 * util/ieee1275/ofpath.c: New file.
5841 * util/ieee1275/devicemap.c: New file.
5842 * util/devicemap.c: New file.
5843 * util/deviceiter.c: New file.
5844 * kern/sparc64/ieee1275/init.c: New file.
5845 * include/grub/util/ofpath.h: New file.
5846 * include/grub/util/deviceiter.h: New file.
5847 * util/grub-mkdevicemap.c: Include deviceiter.h.
5848 Implement using grub_util_emit_devicemap_entry and
5849 grub_util_iterate_devices.
5850 * conf/i386-corebook.rmk: Build util/deviceiter.c and
5851 util/devicemap.c into grub-mkdevicemap
5852 * conf/i386-efi.rmk: Likewise.
5853 * conf/i386-ieee1275.rmk: Likewise.
5854 * conf/i386-pc.rmk: Likewise.
5855 * conf/powerpc-ieee1275.rmk: Likewise.
5856 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
5857 images and installation utilities. Build kernel as image
5858 instead of as elf binary. Use common rules as much as possible.
5859
7dd4a573 58602009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 5861
5862 Correct GPT definition
5863
7dd4a573 5864 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 5865 of "attrib" member
5866
c6c5219f 58672009-04-19 Felix Zielcke <fzielcke@z-51.de>
5868
5869 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
5870
0552ff9f 58712009-04-19 David S. Miller <davem@davemloft.net>
5872
5873 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
5874 (grub_rescue_cmd_linux): Rename to...
5875 (grub_cmd_linux): and fix prototype.
5876 (grub_rescue_cmd_initrd): Rename to...
5877 (grub_cmd_initrd): and fix prototype.
5878 (cmd_linux, cmd_initrd): New.
5879 (GRUB_MOD_INIT(linux)): Use grub_register_command().
5880 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
5881
d1a282fc 58822009-04-17 Pavel Roskin <proski@gnu.org>
5883
07c5039f 5884 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
5885 format.
5886 (grub_ohci_transfer): Likewise.
5887
b012002d 5888 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
5889
1bc09c35 5890 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
5891 return without a value. Fix inconsistent indentation.
5892
e0ff9126 5893 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
5894 match struct grub_fs.
5895
d1a282fc 5896 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
5897 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
5898 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
5899 * commands/lspci.c (grub_lspci_iter): Likewise.
5900
a96df3f2 59012009-04-16 Bean <bean123ch@gmail.com>
5902
5903 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
5904 value.
5905
41bb0fe9 59062009-04-15 Pavel Roskin <proski@gnu.org>
5907
5908 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
5909 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
5910 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
5911 definitions.
5912
596c6970 59132009-04-15 Felix Zielcke <fzielcke@z-51.de>
5914
5915 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 5916 that no multiple data or metadata areas are supported and `Unknown
596c6970 5917 metadata header'.
5918
7dd4a573 59192009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 5920
5921 Move loader out of the kernel
5922
5923 * kern/loader.c: moved to ...
5924 * commands/boot.c: ... moved here
5925 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
5926 * commands/boot.c (grub_cmd_boot): moved here. All users updated
5927 * include/grub/kernel.h (grub_machine_fini): export
5928 * include/grub/loader.h (grub_loader_is_loaded): update declaration
5929 (grub_loader_set): likewise
5930 (grub_loader_unset): likewise
5931 (grub_loader_boot): likewise
5932 * conf/common.rmk: new module boot.mod
5933 (pkglib_MODULES): add boot.mod
5934 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
5935 (grub_emu_SOURCES): likewise
5936 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
5937 (grub_emu_SOURCES): likewise
5938 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
5939 (grub_emu_SOURCES): likewise
5940 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
5941 (grub_emu_SOURCES): likewise
5942 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
5943 (grub_emu_SOURCES): likewise
7dd4a573 5944 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
5945 (grub_emu_SOURCES): likewise
0d5d5653 5946 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 5947 (grub_emu_SOURCES): likewise
0d5d5653 5948
7dd4a573 59492009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 5950
5951 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 5952
5999d619 5953 * kern/misc.c (grub_itoa): Removed function
5954 (grub_ltoa): likewise
5955 (grub_vsprintf): use grub_lltoa
5956
7dd4a573 59572009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 5958
5959 Restore grub-emu
5960
5961 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
5962 * conf/i386-coreboot.rmk: likewise
5963 * conf/i386-ieee1275.rmk: likewise
5964 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 5965
20318222 59662009-04-15 Felix Zielcke <fzielcke@z-51.de>
5967
5968 * INSTALL: Add that `./autogen.sh' needs to be run before
5969 `./configure.'.
5970
d05f0df3 59712009-04-14 Bean <bean123ch@gmail.com>
5972
5973 * Makefile.in (pkglib_DATA): Add handler.lst.
5974 (handler.lst): New rule.
5975
5976 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
5977 * conf/i386-coreboot.rmk: Likewise.
5978 * conf/i386-ieee1275.rmk: Likewise.
5979 * conf/i386-efi.rmk: Likewise.
5980 * conf/x86_64-efi.rmk: Likewise.
5981 * conf/powerpc-ieee1275.rmk: Likewise.
5982 * conf/sparc64-ieee1275.rmk: Likewise.
5983
5984 * genhandlerlist.sh: New file.
5985
5986 * genmk.rb: Add rules to generate handler.lst.
5987
5988 * include/grub/normal.h (grub_file_getline): New function definition.
5989 (read_handler_list): Likewise.
5990 (free_handler_list): Likewise.
5991
5992 * include/grub/term.h (grub_term_register_input): Add name parameter
5993 for auto generation of handler.lst.
5994 (grub_term_register_output): Likewise.
5995
5996 * normal/handler.c: New file.
5997
5998 * normal/main.c (get_line): Renamed to grub_file_getline.
5999 (read_config_file): Use the newly renamed grub_file_getline.
6000 (read_command_list): Likewise.
6001 (read_fs_list): Likewise.
6002 (grub_normal_execute): Call read_handler_list to parse handler.lst.
6003 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
6004
6005 * term/efi/console.c (grub_console_init): Add name parameter for auto
6006 generation of handler.lst.
6007 * term/gfxterm.c: Likewise.
6008 * term/i386/pc/at_keyboard.c: Likewise.
6009 * term/i386/pc/console.c: Likewise.
6010 * term/i386/pc/serial.c: Likewise.
6011 * term/i386/pc/vesafb.c: Likewise.
6012 * term/i386/pc/vga.c: Likewise.
6013 * term/i386/pc/vga_text.c: Likewise.
6014 * term/ieee1275/ofconsole.c: Likewise.
6015 * term/usb_keyboard.c: Likewise.
6016
33c846be 60172009-04-14 Bean <bean123ch@gmail.com>
6018
6019 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
6020 properly with null character.
6021
4484e01e 60222009-04-14 Felix Zielcke <fzielcke@z-51.de>
6023
6024 * configure: Remove.
6025 * config.h.in: Likewise.
f93d668e 6026 * stamp-h.in: Likewise.
4484e01e 6027 * DISTLIST: Likewise.
6028 * conf/common.mk: Likewise.
6029 * conf/i386-coreboot.mk: Likewise.
6030 * conf/i386-efi.mk: Likewise.
6031 * conf/i386-ieee1275.mk: Likewise.
6032 * conf/i386.mk: Likewise.
6033 * conf/i386-pc.mk: Likewise.
6034 * conf/powerpc-ieee1275.mk: Likewise.
6035 * conf/sparc64-ieee1275.mk: Likewise.
6036 * conf/x86_64-efi.mk: Likewise.
6037
6038 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
6039 develop on GRUB.
6040
7dd4a573 60412009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 6042 David S. Miller <davem@davemloft.net>
6043
6044 * util/hostdisk.c (make_device_name): Fix buffer length
6045 calculations.
6046
e25b5a8c 60472009-04-14 Felix Zielcke <fzielcke@z-51.de>
6048
6049 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
6050 <sys/param.h> and <sys/sysctl.h>.
6051 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
6052 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
6053 opening the device and reset them afterwards.
6054
1f1f580c 60552009-04-13 Pavel Roskin <proski@gnu.org>
6056
6057 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
6058 Reported by John Stanley <jpsinthemix@verizon.net>
6059
7ebc2d6b 60602009-04-13 Robert Millan <rmh@aybabtu.com>
6061
6062 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 6063 that name for menuentries when appropriate.
7ebc2d6b 6064
d8ba3667 60652009-04-13 Felix Zielcke <fzielcke@z-51.de>
6066
6067 * util/grub.d/10_freebsd.in: Add a missing `fi'.
6068
cba416eb 60692009-04-13 Robert Millan <rmh@aybabtu.com>
6070
6071 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
6072 to Linux, simply abort telling the user it's no longer supported.
6073
a547a745 60742009-04-13 Felix Zielcke <fzielcke@z-51.de>
6075
6076 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 6077 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 6078 `freebsd_loadenv' only when devices.hints exist.
6079
232a769c 60802009-04-13 Pavel Roskin <proski@gnu.org>
6081
6082 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
6083
c3012039 60842009-04-13 Felix Zielcke <fzielcke@z-51.de>
6085
6086 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
6087 partition number.
6088 (grub_drive): Likewise.
6089
234022fe 60902009-04-13 David S. Miller <davem@davemloft.net>
6091
6092 * kern/sparc64/ieee1275/ieee1275.c: New file.
6093 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
6094 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
6095 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
6096 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
6097 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
6098 grub_ieee1275_alloc_physmem): Declare new exported functions.
6099
d8e1836c 6100 * include/grub/sparc64/ieee1275/loader.h: New file.
6101 * include/grub/sparc64/ieee1275/memory.h: Likewise.
6102 * include/grub/sparc64/kernel.h: Likewise.
6103 * loader/sparc64/ieee1275/linux.c: Likewise.
6104
96bd81ec 6105 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
6106 (grub_fstest_SOURCES): Likewise.
6107
6a4737e5 6108 * util/hostdisk.c (make_device_name): Do not make any assumptions
6109 about the length of drive names.
6110
1d7a72fd 6111 * kern/dl.c (grub_dl_load_file): Close file immediately when
6112 we are done using it.
6113
56bc2471 61142009-04-12 David S. Miller <davem@davemloft.net>
6115
6116 * kern/misc.c (grub_ltoa): Fix cast when handling negative
6117 values. Noticed by Pavel Roskin.
6118
df38d0bb 6119 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
6120 target compiler.
7dd4a573 6121
e382e93a 6122 * genmk.rb: Add more flexible image type specification, also
6123 pass --strip-unneeded to objcopy.
6124 * conf/i386-pc.rmk: Use *_FORMAT.
6125 * conf/i386-pc.mk: Rebuilt.
6126
f5dbbca9 6127 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
6128 (OFDISK_HASH_SZ): Define.
6129 (ofdisk_hash): New hash table.
6130 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
6131 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
6132 instead of device phandle which is not unique.
6133
91c88b12 6134 * kern/sparc64/ieee1275/init.c: Delete, replace with...
6135 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
6136 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
6137 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
6138 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
6139 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
6140 GRUB_KERNEL_MACHINE_DATA_END): Define.
6141 (grub_kernel_image_size, grub_total_module_size): Declare.
6142
5b5d4aa5 61432009-04-12 Pavel Roskin <proski@gnu.org>
6144
7dd4a573 6145 * configure.ac: Change the logic when we check for target tools.
6146 Do it when the target is specified and it's different from the
6147 specified value of the host.
5b5d4aa5 6148
c91e1793 61492009-04-11 Felix Zielcke <fzielcke@z-51.de>
6150
6151 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
6152 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
6153 GNU/kFreeBSD. Check if a device is a character device. Use
6154 DIOCGMEDIASIZE to get the size.
6155 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
6156 support for GNU/kFreeBSD.
6157 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
6158 is a character device instead of a block device. Add support for
6159 FreeBSD device names.
6160
6161 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
6162 is a character device instead of a block device.
6163
6164 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
6165 is a character device instead of a block device.
6166
b1ac8644 61672009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
6168
6169 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
6170 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
6171 FreeBSD. Check if a device is a character device. Use
6172 DIOCGMEDIASIZE to get the size.
6173 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
6174 support for FreeBSD.
6175 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
6176 is a character device instead of a block device. Add support for
6177 FreeBSD device names.
6178
6179 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
6180 a character device instead of a block device.
6181 (grub_util_check_char_device): New function.
6182
6183 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
6184 a character device instead of a block device.
6185
6186 * include/grub/util/getroot.h (grub_util_check_char_device): New
6187 prototype.
6188
a3f7515a 61892009-04-11 David S. Miller <davem@davemloft.net>
6190
6191 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
6192 static libgcc.
6193 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
6194 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
6195 function, if present.
6196 (__bswapdi2): Likewise.
6197
0d44993d 6198 * include/grub/sparc64/ieee1275/boot.h: New file.
6199 * boot/sparc64/ieee1275/boot.S: Likewise.
6200 * boot/sparc64/ieee1275/diskboot.S: Likewise.
6201
ed3d2bc2 6202 * kern/misc.c (grub_ltoa): New function.
6203 (grub_vsprintf): Use it to format 'long' integers.
6204
d3bfb59c 62052009-04-10 David S. Miller <davem@davemloft.net>
6206
6207 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
6208 slots are of type grub_ieee1275_cell_t.
6209 (grub_nand_read): Likewise.
6210 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
6211 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
6212 macros are used to compare values in arg/ret block of the call.
6213 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6214 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
6215 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
6216 grub_ieee1275_instance_to_path, grub_ieee1275_write,
6217 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
6218 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
6219 grub_ieee1275_close, grub_ieee1275_set_property,
6220 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
6221 grub_ieee1275_cell_t.
6222 * kern/ieee1275/openfw.c (grub_map): Likewise.
6223 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
6224 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
6225
450e2238 6226 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
6227 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
6228 (grub_devalias_iterate): Likewise.
6229
7dd4a573 62302009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 6231
6232 UFS improvements
6233
6234 * fs/ufs.c (INODE_NBLOCKS): new definition
6235 (struct grub_ufs_dirent): added fields for non-BSD dirents
6236 (grub_ufs_get_file_block): fixed double indirect handling
6237 (grub_ufs_lookup_symlink): use more robust way to determine whether
6238 symlink is inline
6239 (grub_ufs_find_file): support for non-BSD dirents
6240 (grub_ufs_dir): support for non-BSD dirents
6241
e7e6862a 62422009-04-10 Bean <bean123ch@gnail.com>
6243
6244 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
6245 attribute, otherwise the size would be wrong for i386 platform.
6246
6247 * include/grub/pci.h (grub_pci_read_word): New inline function.
6248 (grub_pci_read_byte): Likewise.
6249 (grub_pci_write): Likewise.
6250 (grub_pci_write_word): Likewise.
6251 (grub_pci_write_byte): Likewise.
6252
6253 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
6254
6255 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
6256 (find_framebuf): Scan pci to locate the frame buffer address.
6257
6258 * commands/efi/fixvideo.c: New file.
6259
6260 * commands/efi/loadbios.c: Likewise.
6261
6262 * commands/memrw.c: Likewise.
6263
6264 * util/grub-dumpbios.in: Likewise.
6265
6266 * conf/common.rmk (grub-dumpbios): New utility.
6267 (pkglib_MODULES): New module memrw.mod.
6268 (memrw_mod_SOURCE): New macro.
6269 (memrw_mod_CFLAGS): Likewise.
6270 (memrw_mod_LDFLAGS): Likewise.
6271
7dd4a573 6272 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 6273 fixvideo.mod.
6274 (loadbios_mod_SOURCE): New macro.
6275 (loadbios_mod_CFLAGS): Likewise.
6276 (loadbios_mod_LDFLAGS): Likewise.
6277 (fixvideo_mod_SOURCE): Likewise.
6278 (fixvideo_mod_CFLAGS): Likewise.
6279 (fixvideo_mod_LDFLAGS): Likewise.
6280
7dd4a573 6281 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 6282 fixvideo.mod.
6283 (loadbios_mod_SOURCE): New macro.
6284 (loadbios_mod_CFLAGS): Likewise.
6285 (loadbios_mod_LDFLAGS): Likewise.
6286 (fixvideo_mod_SOURCE): Likewise.
6287 (fixvideo_mod_CFLAGS): Likewise.
6288 (fixvideo_mod_LDFLAGS): Likewise.
6289
af63ada2 62902009-04-08 Felix Zielcke <fzielcke@z-51.de>
6291
6292 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
6293
c2cdde70 62942009-04-07 David S. Miller <davem@davemloft.net>
6295
6296 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
6297 support for R_SPARC_OLO10 relocations. Fix compile warning for
6298 R_SPARC_WDISP30 case.
ea3f72cf 6299 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 6300
761319cf 63012009-04-06 Pavel Roskin <proski@gnu.org>
6302
1007d1f5 6303 * include/grub/misc.h (ARRAY_SIZE): New macro.
6304 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
6305 New macro.
6306 * loader/i386/linux.c (allocate_pages): Use free_pages().
6307 (grub_linux_unload): Don't use free_pages().
6308 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
6309 wrong index. Treat all other modes as text modes.
6310 (grub_cmd_linux): Initialize vid_mode unconditionally to
6311 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
6312
761319cf 6313 * commands/help.c (print_command_help): Use cmd->prio, not
6314 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
6315
ea761d40 63162009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 6317
ea761d40 6318 Parttool
6319
6320 * parttool/pcpart.c: new file
6321 * commands/parttool.c: likewise
6322 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
6323 (parttool_mod_SOURCES): new variable
6324 (parttool_mod_CFLAGS): likewise
6325 (parttool_mod_LDFLAGS): likewise
6326 (pcpart_mod_SOURCES): likewise
6327 (pcpart_mod_CFLAGS): likewise
6328 (pcpart_mod_LDFLAGS): likewise
7dd4a573 6329 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 6330 and parttool/pcpart.c
6331 * conf/i386-efi.rmk: likewise
6332 * conf/i386-ieee1275.rmk: likewise
6333 * conf/i386-pc.rmk: likewise
6334 * conf/powerpc-ieee1275.rmk: likewise
6335 * conf/sparc64-ieee1275.rmk: likewise
6336 * conf/x86_64-ieee1275.rmk: likewise
6337
05aaebfb 63382009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
6339
6340 Support for mtime and further expandability of dir command
6341
6342 * include/grub/lib/datetime.h: moved to ...
7dd4a573 6343 * include/grub/datetime.h: ... moved here and added
05aaebfb 6344 declaration of grub_unixtime2datetime. All users updated
7dd4a573 6345 * include/grub/fs.h: new syntax for dir and mtime functions in
6346 struct grub_fs
05aaebfb 6347 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
6348 and GRUB_FSHELP_FLAGS_MASK
6349 * commands/ls.c (grub_ls_list_files): Write mtime in long format
6350 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
6351 (grub_ext2_mtime): new function
6352 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
6353 (grub_hfsplus_mtime): new function
6354 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
6355 (GRUB_UFS_ATTR_FILE): likewise
6356 (GRUB_UFS_ATTR_LNK): likewise
6357 (struct grub_ufs_sblock): new fields mtime
6358 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
6359 all users updated
6360 (grub_ufs_dir): mtime support
6361 (grub_ufs_mtime): new function
6362 * fs/affs.c (grub_affs_dir): use new dir syntax
6363 * fs/afs.c (grub_afs_dir): likewise
6364 * fs/cpio.c (grub_cpio_dir): likewise
6365 * fs/fat.c (grub_fat_find_dir): likewise
6366 * fs/hfs.c (grub_hfs_dir): likewise
6367 * fs/iso9660.c (grub_iso9660_dir): likewise
6368 * fs/jfs.c (grub_jfs_dir): likewise
6369 * fs/minix.c (grub_minix_dir): likewise
6370 * fs/ntfs.c (grub_ntfs_dir): likewise
6371 * fs/reiserfs.c (grub_reiserfs_dir): likewise
6372 * fs/sfs.c (grub_sfs_dir): likewise
6373 * fs/xfs.c (grub_xfs_dir): likewise
6374 * util/hostfs.c (grub_hostfs_dir): likewise
6375 * lib/datetime.c: moved to ...
6376 * normal/datetime.c: ... moved here
6377 (grub_unixtime2datetime): new function
6378 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 6379 * normal/completion.c (iterate_dir): use new dir syntax
6380 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 6381 last modification time of a volume
7dd4a573 6382 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 6383 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 6384 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 6385 (normal_mod_SOURCES): likewise
6386 (datetime_mod_SOURCES): Removed lib/datetime.c
6387 * conf/i386-efi.rmk: likewise
7dd4a573 6388 * conf/i386-ieee1275.rmk: likewise
05aaebfb 6389 * conf/i386-pc.rmk: likewise
6390 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 6391 * conf/sparc64-ieee1275.rmk: likewise
6392 * conf/x86_64-efi.rmk: likewise
05aaebfb 6393
8a7e1a14 63942009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
6395
6396 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 6397
6398 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 6399 on grub_fat_find_dir
6400 (grub_fat_find_dir): use grub_fat_iterate_dir
6401 (grub_fat_label): likewise
6402
04186a9c 64032009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
6404
7dd4a573 6405 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 6406 and command.h
6407 remove extraneous kernel_elf_HEADERS
6408
da4c0bb6 64092009-04-04 Bean <bean123ch@gnail.com>
6410
6411 * include/grub/util/misc.h: Add dummy function fsync for mingw.
6412
6413 * util/misc.c: Likewise.
6414
54ad9555 64152009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
6416
6417 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
6418 instead of grub_printf.
6419
7a6bf9f2 64202009-04-03 Robert Millan <rmh@aybabtu.com>
6421
6422 * loader/i386/linux.c (grub_linux_setup_video): Fill
6423 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
6424 values from `mode info' structure instead of hardcoded
6425 values.
6426
3fcc2083 64272009-04-01 Pavel Roskin <proski@gnu.org>
6428
6429 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
6430 unused now.
6431 * genmk.rb: Likewise.
6432 * configure.ac: Likewise.
6433
5ec9740b 64342009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
6435
6436 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
6437 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
6438
5270cec8 64392009-04-01 David S. Miller <davem@davemloft.net>
6440
6441 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 6442 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 6443 (grub_setjmp): Mark with 'returns_twice' attribute.
6444 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
6445 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
6446 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
6447
9c3dd854 64482009-04-01 Robert Millan <rmh@aybabtu.com>
6449
6450 Reapply fix from 2008-07-28 which was accidentally reverted; also
6451 perform the same fix to a similar check in same function.
6452
6453 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6454 with the same number are found, just use issue a warning with
6455 grub_dprintf(), as this error has been reported to be non-fatal.
6456
0d818b7e 64572009-03-31 Pavel Roskin <proski@gnu.org>
6458
6459 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
6460 for cross-compilation.
6461
95646d92 64622009-03-30 Robert Millan <rmh@aybabtu.com>
6463
6464 Fix i386-ieee1275 build.
6465
6466 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
6467 Remove declaration.
6468
6a003ed1 64692009-03-30 Pavel Roskin <proski@gnu.org>
6470
6471 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
6472 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
6473 zero-terminated, rely only on the strlen value. Fix comparison
6474 of strings differing in length.
6475
92f33540 64762009-03-30 Robert Millan <rmh@aybabtu.com>
6477
6478 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
6479 checking for abi version. Improve error messages on BIOS to notify
6480 user about `linux16' command.
6481
a8c48fd5 64822009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
6483
f968172e 6484 Leak fixes
a8c48fd5 6485
f968172e 6486 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
6487 in case of collision
6488 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 6489
9c323f09 64902009-03-29 Robert Millan <rmh@aybabtu.com>
6491
6492 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
6493 set `vid_mode' accordingly.
6494 (grub_linux_boot): Process `vid_mode' and set video mode.
6495
ae68f423 64962009-03-29 Robert Millan <rmh@aybabtu.com>
6497
6498 * util/grub.d/10_linux.in (linux_entry): New function.
6499 Factorize generation of Linux boot entries.
6500
5709cfc4 65012009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
6502
6503 Make the format of Environment Block plain text. The boot loader
6504 part is not tested well yet.
7dd4a573 6505
5709cfc4 6506 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
6507 (buffer): Removed.
6508 (envblk): Likewise.
6509 (usage): Remove "info" and "clear". Add "unset". Update the
6510 description of "set", as this does not delete variables any
6511 longer.
6512 (create_envblk_file): Complete rewrite.
6513 (open_envblk_file): Likewise.
6514 (cmd_info): Removed.
6515 (cmd_list): Likewise.
6516 (cmd_set): Likewise.
6517 (cmd_clear): Likewise.
6518 (list_variables): New function.
6519 (write_envblk): Likewise.
6520 (set_variables): Likewise.
6521 (unset_variables): Likewise.
6522 (main): Complete rewrite.
6523
6524 * commands/loadenv.c (buffer): Removed.
6525 (envblk): Likewise.
6526 (open_envblk_file): New function.
6527 (read_envblk_file): Complete rewrite.
6528 (grub_cmd_load_env): Likewise.
6529 (grub_cmd_list_env): Likewise.
6530 (struct blocklist): New struct.
6531 (free_blocklists): New function.
6532 (check_blocklists): Likewise.
6533 (write_blocklists): Likewise.
6534 (grub_cmd_save_env): Complete rewrite.
6535
6536 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
6537 a plain text signature.
6538 (GRUB_ENVBLK_MAXLEN): Removed.
6539 (struct grub_envblk): Complete rewrite.
6540 (grub_envblk_find): Removed.
6541 (grub_envblk_insert): Likewise.
6542 (grub_envblk_open): New prototype.
6543 (grub_envblk_set): Likewise.
6544 (grub_envblk_delete): Put const to VALUE.
6545 (grub_envblk_iterate): Put const to NAME and VALUE.
6546 (grub_envblk_close): New prototype.
6547 (grub_envblk_buffer): New inline function.
6548 (grub_envblk_size): Likewise.
6549
6550 * lib/envblk.c: Include grub/mm.h.
6551 (grub_env_find): Removed.
6552 (grub_envblk_open): New function.
6553 (grub_envblk_close): Likewise.
6554 (escaped_value_len): Likewise.
6555 (find_next_line): Likewise.
6556 (grub_envblk_insert): Removed.
6557 (grub_envblk_set): New function.
6558 (grub_envblk_delete): Complete rewrite.
6559 (grub_envblk_iterate): Likewise.
6560
a9368fd3 65612009-03-28 Robert Millan <rmh@aybabtu.com>
6562
6563 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
6564 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
6565 variables. Use 16-bit loader.
6566 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
6567 loader.
6568 * kern/i386/loader.S (grub_linux_boot): Rename to ...
6569 (grub_linux16_boot): ... this. Update all users.
6570 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
6571 (grub_linux_boot): ... this. Update all users.
6572
6573 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
6574 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
6575 commands to `linux16' and `initrd16'.
6576 (GRUB_MOD_FINI(linux)): Rename to ...
6577 (GRUB_MOD_FINI(linux16)): ... this.
6578
e4dd5a7e 65792009-03-24 Pavel Roskin <proski@gnu.org>
6580
6581 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
6582 not just for compilation.
6583
c04d6e05 65842009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
6585
6586 Move multiboot helper out of kernel
6587
6588 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
6589 `loader/i386/multiboot_helper.S'.
6590 * conf/i386-coreboot.rmk: Likewise
6591 * conf/i386-ieee1275.rmk: Likewise
6592
6593 * kern/i386/loader.S: Move multiboot helpers from here...
6594 * loader/i386/multiboot_helper.S: ...moved here
6595 * include/grub/i386/loader.h: Move declarations of multiboot
6596 helpers from here...
6597 * include/grub/i386/multiboot.h: ...moved here
6598 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
6599
42a5b3fc 66002009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
6601
6602 * kern/env.c (grub_env_context_open): Added an argument to specify
6603 whether a new context inherits exported variables from current
6604 one. This is useful when making a sandbox to interpret a config
6605 file.
6606 All callers updated.
6607
6608 * include/grub/env.h (grub_env_context_open): Updated the prototype.
6609
b28bbc4e 66102009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
6611
6612 * kern/env.c (grub_env_context_close): Fix memory leaks.
6613
f04f02e4 66142009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
6615
6616 * normal/main.c (grub_normal_execute): Added an argument
6617 BATCH to specify if an interactive interface should be provided
6618 after reading a config file.
6619 All callers updated.
6620 (read_command_list): Prevent being executed twice.
6621 (read_fs_list): Likewise.
6622
42a5b3fc 6623 * include/grub/normal.h (grub_normal_execute): Updated the
6624 prototype.
f04f02e4 6625
41473ac2 66262009-03-22 Pavel Roskin <proski@gno.org>
6627
fbc00b0c 6628 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
6629 _start.
6630 * kern/i386/pc/startup.S: Likewise.
6631 * kern/i386/efi/startup.S: Likewise.
6632 * kern/i386/ieee1275/startup.S: Likewise.
6633 * kern/i386/coreboot/startup.S: Likewise.
6634 * kern/x86_64/efi/startup.S: Likewise.
6635
41473ac2 6636 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
6637 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
6638 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
6639
2274cc8f 66402009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
6641
6642 Bugfixes in multiboot for bugs uncovered by solaris kernel.
6643
6644 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
6645 limit detection.
6646 Use vaddr of correct segment for entry_point.
6647
b1b797cb 66482009-03-21 Bean <bean123ch@gmail.com>
6649
6650 * commands/blocklist.c: Add include file <grub/command.h>, remove
6651 <grub/normal.h> and <grub/arg.h>.
6652 (grub_cmd_blocklist): Use the new command interface.
6653 (GRUB_MOD_INIT): Likewise.
6654 (GRUB_MOD_FINI): Likewise.
6655 * commands/boot.c: Likewise.
6656 * commands/cat.c: Likewise.
6657 * commands/cmp.c: Likewise.
6658 * commands/configfile.c: Likewise.
6659 * commands/crc.c: Likewise.
6660 * commands/echo.c: Likewise.
6661 * commands/halt.c: Likewise.
6662 * commands/handler.c: Likewise.
6663 * commands/hdparm.c: Likewise.
6664 * commands/help.c: Likewise.
6665 * commands/hexdump.c: Likewise.
6666 * commands/loadenv.c: Likewise.
6667 * commands/ls.c: Likewise.
6668 * commands/lsmmap.c: Likewise.
6669 * commands/lspci.c: Likewise.
6670 * commands/loadenv.c: Likewise.
6671 * commands/read.c: Likewise.
6672 * commands/reboot.c: Likewise.
6673 * commands/search.c: Likewise.
6674 * commands/sleep.c: Likewise.
6675 * commands/test.c: Likewise.
6676 * commands/usbtest.c: Likewise.
6677 * commands/videotest.c: Likewise.
6678 * commands/i386/cpuid.c: Likewise.
6679 * commands/i386/pc/halt.c: Likewise.
6680 * commands/i386/pc/play.c: Likewise.
6681 * commands/i386/pc/pxecmd.c: Likewise.
6682 * commands/i386/pc/vbeinfo.c: Likewise.
6683 * commands/i386/pc/vbetest.c: Likewise.
6684 * commands/ieee1275/suspend.c: Likewise.
6685 * disk/loopback.c: Likewise.
6686 * font/font_cmd.c: Likewise.
6687 * hello/hello.c: Likewise.
6688 * loader/efi/appleloader.c: Likewise.
6689 * loader/efi/chainloader.c: Likewise.
6690 * loader/i386/bsd.c: Likewise.
6691 * loader/i386/efi/linux.c: Likewise.
6692 * loader/i386/ieee1275/linux.c: Likewise.
6693 * loader/i386/linux.c: Likewise.
6694 * loader/i386/pc/chainloader.c: Likewise.
6695 * loader/i386/pc/linux.c: Likewise.
6696 * loader/powerpc/ieee1275/linux.c: Likewise.
6697 * loader/multiboot_loader.c: Likewise.
6698 * term/gfxterm.c: Likewise.
6699 * term/i386/pc/serial.c: Likewise.
6700 * term/terminfo.c: Likewise.
6701
6702 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
6703 * term/i386/pc/vga.c: Likewise.
6704 * video/readers/jpeg.c: Likewise.
6705 * video/readers/png.c: Likewise.
6706 * video/readers/tga.c: Likewise.
6707
6708 * util/grub-fstest (cmd_loopback): Removed.
6709 (cmd_blocklist): Likewise.
6710 (cmd_ls): Likewise.
6711 (grub_register_command): Likewise.
6712 (grub_unregister_command): Likewise.
6713 (execute_command): Use grub_command_find to locate command and execute
6714 it.
6715
6716 * include/grub/efi/chainloader.h: Removed.
6717 * loader/efi/chainloader_normal.c: Likewise.
6718 * loader/i386/bsd_normal.c: Likewise.
6719 * loader/i386/pc/chainloader_normal.c: Likewise.
6720 * loader/i386/pc/multiboot_normal.c: Likewise.
6721 * loader/linux_normal.c: Likewise.
6722 * loader/multiboot_loader_normal.c: Likewise.
6723 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6724
6725 * gencmdlist.sh: Scan new registration command grub_register_extcmd
6726 and grub_register_command_p1.
6727
6728 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
6729 kern/command.c, lib/arg.c and commands/extcmd.c.
6730 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
6731 (minicmd_mod_SOURCES): New variable.
6732 (minicmd_mod_CFLAGS): Likewise.
6733 (minicmd_mod_LDFLAGS): Likewise.
6734 (extcmd_mod_SOURCES): Likewise.
6735 (extcmd_mod_CFLAGS): Likewise.
6736 (extcmd_mod_LDFLAGS): Likewise.
6737 (boot_mod_SOURCES): Removed.
6738 (boot_mod_CFLAGS): Likewise.
6739 (boot_mod_LDFLAGS): Likewise.
6740
6741 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
6742 kern/corecmd.c.
6743 (kernel_img_HEADERS): Add command.h.
6744 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
6745 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
6746 and lib/arg.c.
6747 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
6748 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
6749 remove the corresponding normal mode command.
6750 (normal_mod_SOURCES): Remove normal/arg.c.
6751 * conf/i386-coreboot.rmk: Likewise.
6752 * conf/i386-efi.rmk: Likewise.
6753 * conf/i386-ieee1275.rmk: Likewise.
6754 * conf/powerpc-ieee1275.rmk: Likewise.
6755 * conf/x86_64-efi.rmk: Likewise.
6756
6757 * include/grub/arg.h: Move from here ...
6758 * include/grub/lib/arg.h: ... to here.
6759
6760 * normal/arg.c: Move from here ...
6761 * lib/arg.c: ... to here.
6762
6763 * commands/extcmd.c: New file.
6764 * commands/minicmd.c: Likewise.
6765 * include/grub/command.h: Likewise.
6766 * include/grub/extcmd.h: Likewise.
6767 * kern/command.c: Likewise.
6768 * kern/corecmd.c: Likewise.
6769
6770 * kern/list.c (grub_list_iterate): Return int instead of void.
6771 (grub_list_insert): New function.
6772 (grub_prio_list_insert): Likewise.
6773
6774 * kern/rescue.c (grub_rescue_command): Removed.
6775 (grub_rescue_command_list): Likewise.
6776 (grub_rescue_register_command): Likewise.
6777 (grub_rescue_unregister_command): Likewise.
6778 (grub_rescue_cmd_boot): Move to minicmd.c
6779 (grub_rescue_cmd_help): Likewise.
6780 (grub_rescue_cmd_info): Likewise.
6781 (grub_rescue_cmd_boot): Likewise.
6782 (grub_rescue_cmd_testload): Likewise.
6783 (grub_rescue_cmd_dump): Likewise.
6784 (grub_rescue_cmd_rmmod): Likewise.
6785 (grub_rescue_cmd_lsmod): Likewise.
6786 (grub_rescue_cmd_exit): Likewise.
6787 (grub_rescue_print_devices): Moved to corecmd.c.
6788 (grub_rescue_print_files): Likewise.
6789 (grub_rescue_cmd_ls): Likewise.
6790 (grub_rescue_cmd_insmod): Likewise.
6791 (grub_rescue_cmd_set): Likewise.
6792 (grub_rescue_cmd_unset): Likewise.
7d074e3c 6793 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 6794 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 6795 commands, remove grub_rescue_register_command calls.
b1b797cb 6796
7d074e3c 6797 * normal/command.c (grub_register_command): Removed.
b1b797cb 6798 (grub_unregister_command): Likewise.
6799 (grub_command_find): Likewise.
6800 (grub_iterate_commands): Likewise.
6801 (rescue_command): Likewise.
6802 (export_command): Moved to corecmd.c.
6803 (set_command): Removed.
6804 (unset_command): Likewise.
6805 (insmod_command): Likewise.
6806 (rmmod_command): Likewise.
6807 (lsmod_command): Likewise.
6808 (grub_command_init): Likewise.
6809
6810 * normal/completion.c (iterate_command): Use cmd->prio to check for
6811 active command.
6812 (complete_arguments): Use grub_extcmd_t structure to find options.
6813 (grub_normal_do_completion): Change function grub_iterate_commands to
6814 grub_command_iterate.
6815
6816 * normal/execute.c (grub_script_execute_cmd): No need to parse
6817 argument here.
6818
6819 * normal/main.c (grub_dyncmd_dispatcher): New function.
6820 (read_command_list): Register unload commands as dyncmd.
6821 (grub_cmd_normal): Use new command interface, register rescue,
6822 unregister normal at entry, register normal, unregister rescue at exit.
6823
6824 * include/grub/list.h (grub_list_test_t): New type.
6825 (grub_list_iterate): Return int instead of void.
6826 (grub_list_insert): New function.
6827 (GRUB_AS_NAMED_LIST_P): New macro.
6828 (GRUB_AS_PRIO_LIST): Likewise.
6829 (GRUB_AS_PRIO_LIST_P): Likewise.
6830 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
6831 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
6832 (grub_prio_list): New structure.
6833 (grub_prio_list_insert): New function.
6834 (grub_prio_list_remove): New inline function.
6835
6836 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
6837 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
6838 (GRUB_COMMAND_FLAG_MENU): Likewise.
6839 (GRUB_COMMAND_FLAG_BOTH): Likewise.
6840 (GRUB_COMMAND_FLAG_TITLE): Likewise.
6841 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
6842 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
6843 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
6844 (grub_command): Likewise.
6845 (grub_register_command): Likewise.
6846 (grub_command_find): Likewise.
6847 (grub_iterate_commands): Likewise.
6848 (grub_command_init): Likewise.
6849 (grub_arg_parse): Likewise.
6850 (grub_arg_show_help): Likewise.
6851
6852 * include/grub/rescue.h (grub_rescue_register_command): Removed.
6853 (grub_rescue_unregister_command): Likewise.
6854
6855 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
6856 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
6857 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
6858
6859 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
6860 grub_rescue_cmd_initrd.
6861 * include/grub/i386/loader.h: Likewise.
6862 * include/grub/x86_64/loader.h: Likewise.
6863
6864 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
6865
1f4147aa 68662009-03-21 Bean <bean123ch@gmail.com>
6867
6868 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
6869 instead of stat in mingw environment.
6870
6871 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
6872
6873 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
6874
6875 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
6876 AC_CONFIG_LINKS.
6877
2156d5ba 68782009-03-21 Bean <bean123ch@gmail.com>
6879
6880 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
6881 out of range error.
6882
177b82ca 68832009-03-18 Michel Dänzer <michel@daenzer.net>
6884
6885 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
6886 checking inode flags for EXT4_EXTENTS_FLAG.
6887
14aad807 68882009-03-18 Robert Millan <rmh@aybabtu.com>
6889
6890 * loader/i386/linux.c: Include `<grub/video.h>' and
6891 `<grub/i386/pc/vbe.h>'..
6892 (grub_linux_setup_video): New function. Loosely based on the EFI one.
6893 (grub_linux32_boot): Attempt to configure video settings with
6894 grub_linux_setup_video().
6895 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
6896 to avoid grub_console_fini() which would step out of graphical mode
6897 unconditionally.
6898
8cf83a27 68992009-03-14 Robert Millan <rmh@aybabtu.com>
6900
6901 Fix build on powerpc.
6902 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
6903
40164e75 69042009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
6905
6906 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
6907 background image command.
6908
c58bc32a 69092009-03-12 Colin D Bennett <colin@gibibit.com>
6910
6911 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
6912 (grub_gfxterm_putchar): Extract pairs of identical calls to
6913 draw_cursor out of conditional blocks.
6914
5415144a 69152009-03-11 Pavel Roskin <proski@gnu.org>
6916
6917 * fs/hfs.c (grub_hfs_strncasecmp): New function.
6918 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
6919
6394042e 69202009-03-11 Robert Millan <rmh@aybabtu.com>
6921
6922 * loader/i386/multiboot_elfxx.c
6923 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
6924
b7b50e5f 69252009-03-11 Felix Zielcke <fzielcke@z-51.de>
6926
6927 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
6928 `kern/handler.c'.
6929
1ca7fc96 69302009-03-11 Robert Millan <rmh@aybabtu.com>
6931
6932 * loader/i386/multiboot.c (code_size): New variable.
6933 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 6934 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 6935 4-byte alignment to MBI and others by increasing
7d074e3c 6936 `boot_loader_name_length' appropriately.
1ca7fc96 6937
6938 * loader/i386/multiboot_elfxx.c
6939 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
6940
a83ea1d2 69412009-03-09 Felix Zielcke <fzielcke@z-51.de>
6942
6943 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
6944 `fs/ext2.c'.
6945
aa9f3bff 69462009-03-08 Robert Millan <rmh@aybabtu.com>
6947
6948 Make loader/i386/linux.c usable on i386-pc again.
6949
6950 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
6951 memory to heap.
6952 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
6953 `#error' stanza.
6954
d8b3b60e 69552009-03-07 Bean <bean123ch@gmail.com>
6956
6957 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
6958 allocation.
6959
b362c9e9 69602009-03-06 Robert Millan <rmh@aybabtu.com>
6961
6962 Fix display issue on terminals with screen size other than 80x25
6963 (e.g. gfxterm with resolution higher than 640x480).
6964
6965 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 6966 position relative to the center of the terminal instead of relying
b362c9e9 6967 on a hardcoded offset.
6968
9304eef1 69692009-03-04 Robert Millan <rmh@aybabtu.com>
6970
6971 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
6972 installed.
6973
6974 * Makefile.in (host_kernel): New variable.
6975 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
6976 scripts instead of just the windows one.
6977 * configure.ac: Initialize and AC_SUBST `host_kernel'.
6978
eabc95fb 69792009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 6980
6981 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
6982 `kern/handler.c'.
6983 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6984 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6985 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6986 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6987 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6988 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6989
ceb1223c 69902009-03-04 Felix Zielcke <fzielcke@z-51.de>
6991
6992 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
6993 or if there's no space for the disk label and print the partition number on a
6994 invalid magic.
6995
4910684a 69962009-03-04 Felix Zielcke <fzielcke@z-51.de>
6997
6998 * util/misc.c: Include <time.h>.
6999 (grub_millisleep): New function.
7000
7e9ca17a 70012009-03-04 Bean <bean123ch@gmail.com>
7002
7003 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
7004 another option -mno-red-zone.
7005
7006 * commands/handler.c: Change module description.
7007
7008 * kern/handler.c: Add missing space at the end of description line.
7009
7010 * kern/list.c: Likewise.
7011
f501677c 70122009-03-03 Robert Millan <rmh@aybabtu.com>
7013
7014 Move more components to the relocation area, and fix mbi pointer
7015 handling to use the destination rather than the origin (thanks to
7016 Vladimir Serbinenko for spotting).
7017
7018 * loader/i386/multiboot.c (mbi_dest): New variable.
7019 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
7020 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
7021 relocation area.
7022
9902d047 70232009-03-01 Bean <bean123ch@gmail.com>
7024
50fb7002 7025 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 7026 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
7027 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
7028 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
7029
7030 * loader/i386/efi/linux.c (acpi_guid): New variable.
7031 (acpi_guid): Likewise.
7032 (EBDA_SEG_ADDR): New constant.
7033 (LOW_MEM_ADDR): Likewise.
7034 (FAKE_EBDA_SEG): Likewise.
7035 (fake_bios_data): New function.
7036 (grub_linux_boot): Call fake_bios_data.
7037
71b9f361 70382009-03-01 Bean <bean123ch@gmail.com>
7039
7040 * commands/terminal.c: Removed.
7041
7042 * commands/handler.c: New file.
7043
7044 * include/grub/list.h: Likewise.
7045
7046 * include/grub/handler.h: Likewise.
7047
7048 * kern/list.c: Likewise.
7049
7050 * kern/handler.c: Likewise.
7051
7052 * kern/term.h: Include header file <grub/handler.h>.
7053 (grub_term_input): Move next field to the beginning.
7054 (grub_term_output): Likewise.
7055 (grub_term_input_class): New variable.
7056 (grub_term_output_class): Likewise.
7057 (grub_term_register_input): Changed to inline function.
7058 (grub_term_register_output): Likewise.
7059 (grub_term_unregister_input): Likewise.
7060 (grub_term_unregister_output): Likewise.
7061 (grub_term_set_current_input): Likewise.
7062 (grub_term_set_current_output): Likewise.
7063 (grub_term_get_current_input): Likewise.
7064 (grub_term_get_current_output): Likewise.
7065 (grub_term_iterate_input): Removed.
7066 (grub_term_iterate_output): Likewise.
7067
7068 * kern/term.c (grub_term_list_input): Removed.
7069 (grub_term_list_output): Likewise.
7070 (grub_term_input_class): New variable.
7071 (grub_term_output_class): Likewise.
50fb7002 7072 (grub_cur_term_input): Change variable as macro.
71b9f361 7073 (grub_cur_term_output): Likewise.
7074 (grub_term_register_input): Removed.
7075 (grub_term_register_output): Likewise.
7076 (grub_term_unregister_input): Likewise.
7077 (grub_term_unregister_output): Likewise.
7078 (grub_term_set_current_input): Likewise.
7079 (grub_term_set_current_output): Likewise.
7080 (grub_term_iterate_input): Likewise.
7081 (grub_term_iterate_output): Likewise.
7082 (grub_term_get_current_input): Likewise.
7083 (grub_term_get_current_output): Likewise.
7084
7085 * util/grub-editenv.c: Include header file <grub/handler.h>.
7086 (grub_term_get_current_input): Removed.
7087 (grub_term_get_current_output): Likewise.
7088 (grub_term_input_class): New variable.
50fb7002 7089 (grub_term_output_class): Likewise.
71b9f361 7090
7091 * util/grub-fstest.c (grub_term_get_current_input): Removed.
7092 (grub_term_get_current_output): Likewise.
7093 (grub_term_input_class): New variable.
50fb7002 7094 (grub_term_output_class): Likewise.
71b9f361 7095
7096 * util/grub-probe.c (grub_term_get_current_input): Removed.
7097 (grub_term_get_current_output): Likewise.
7098 (grub_term_input_class): New variable.
50fb7002 7099 (grub_term_output_class): Likewise.
71b9f361 7100
7101 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
7102 (grub_term_get_current_output): Likewise.
7103 (grub_term_input_class): New variable.
50fb7002 7104 (grub_term_output_class): Likewise.
71b9f361 7105
7106 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
7107 (terminal_mod_SOURCES): Likewise.
7108 (terminal_mod_CFLAGS): Likewise.
7109 (terminal_mod_LDFLAGS): Likewise.
7110
7111 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
7112 handler.c.
7113 (kernel_img_SOURCES): Add list.c and handler.c.
7114 (kernel_img_HEADERS): Add list.h and handler.h.
7115
7116 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
7117 handler.c.
7118 (kernel_mod_SOURCES): Add list.c and handler.c.
7119 (kernel_mod_HEADERS): Add list.h and handler.h.
7120
7121 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
7122 handler.c.
7123 (kernel_elf_SOURCES): Add list.c and handler.c.
7124 (kernel_elf_HEADERS): Add list.h and handler.h.
7125
7126 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
7127 handler.c.
7128 (kernel_elf_SOURCES): Add list.c and handler.c.
7129 (kernel_elf_HEADERS): Add list.h and handler.h.
7130
7131 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
7132 handler.c.
7133 (kernel_mod_SOURCES): Add list.c and handler.c.
7134 (kernel_mod_HEADERS): Add list.h and handler.h.
7135
7136 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
7137 handler.c.
7138 (kernel_elf_SOURCES): Add list.c and handler.c.
7139 (kernel_elf_HEADERS): Add list.h and handler.h.
7140
8a31787f 71412009-02-27 Robert Millan <rmh@aybabtu.com>
7142
7143 Factorize elf32 / elf64 code in Multiboot loader. This will
7144 prevent it from getting out of sync again.
7145
7146 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
7147 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
7148 grub_multiboot_load_elf64): Move from here ...
7149 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
7150 grub_multiboot_load_elf): ... to here (new file).
7151
51cd3dfc 71522009-02-27 Robert Millan <rmh@aybabtu.com>
7153
7154 * util/grub.d/10_linux.in: Rename "single-user mode" to
7155 "recovery mode".
7156
6e8c9c3a 71572009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
7158
7159 Don't leak in SCSI code.
7160 * disk/scsi.c (grub_scsi_close): free `scsi'.
7161
4b6bf4f9 71622009-02-27 Robert Millan <rmh@aybabtu.com>
7163
7164 * loader/i386/pc/multiboot.c: Move from here ...
7165 * loader/i386/multiboot.c: ... to here. Update all users.
7166
b9413424 71672009-02-27 Robert Millan <rmh@aybabtu.com>
7168
7169 Patch from Alexandre Bique <bique.alexandre@gmail.com>
7170 * util/i386/pc/grub-setup.c (setup): Fix directory path.
7171
50fb7002 71722009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 7173
7174 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
7175 b-tree.
7176
8cc50345 71772009-02-27 Robert Millan <rmh@aybabtu.com>
7178
7179 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
7180 `0x' qualifier as 0 when base is specified as parameter).
7181
6e09b8b7 71822009-02-24 Bean <bean123ch@gmail.com>
7183
7184 * configure.ac: Check for -mcmodel=large in x86_64 target.
7185
7186 * include/grub/efi/api.h (efi_call_10): New macro.
7187 (efi_wrap_10): New function.
7188
7189 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
7190 (GRUB_PE32_REL_BASED_HIGH): Likewise.
7191 (GRUB_PE32_REL_BASED_LOW): Likewise.
7192 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
7193 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
7194 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
7195 (GRUB_PE32_REL_BASED_SECTION): Likewise.
7196 (GRUB_PE32_REL_BASED_REL): Likewise.
7197 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
7198 (GRUB_PE32_REL_BASED_DIR64): Likewise.
7199 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
7200
7201 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
7202 issue.
7203
7204 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
7205 (efi_wrap_10): New function.
7206
7207 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
7208
7209 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
7210 MB/MBP model (NV chipset).
7211 (devdata_devs): Add devpath_5 to the list.
7212
7213 * load/i386/efi/linux.c (video_base): Remove variable.
7214 (RGB_MASK): New macro.
7215 (RGB_MAGIC): Likewise.
7216 (LINE_MIN): Likewise.
7217 (LINE_MAX): Likewise.
7218 (FBTEST_STEP): Likewise.
7219 (FBTEST_COUNT): Likewise.
7220 (fb_list): New variable.
7221 (grub_find_video_card): Remove function.
7222 (find_framebuf): New function.
7223 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
7224 line length.
7225
7226 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
7227 problem for x86_64.
7228
74b21bee 72292009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
7230
7231 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
7232
7233 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
7234 coding tool name.
7235
a455f472 72362009-02-22 Robert Millan <rmh@aybabtu.com>
7237
7238 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
7239 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
7240 in our relocation, instead of using it directly from heap. Also
7241 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
7242
6374daf3 72432009-02-21 Robert Millan <rmh@aybabtu.com>
7244
7245 Implement USB keyboard support (based on patch by Marco Gerards)
7246
7247 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
7248 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
7249 (usb_keyboard_mod_LDFLAGS): New variables.
7250
7251 * term/usb_keyboard.c: New file.
7252
8fa4ea70 72532009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
7254
7255 Corrected wrong declaration
7256
7257 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
7258
353976ac 72592009-02-14 Christian Franke <franke@computer.org>
7260
7261 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
7262 (grub_lspci_iter): Print class code and programming interface byte.
7263
6aa1169b 72642009-02-14 Christian Franke <franke@computer.org>
7265
7266 * gendistlist.sh: Ignore `.svn' directories.
7267
265372ca 72682009-02-14 Felix Zielcke <fzielcke@z-51.de>
7269
7270 * fs/fat.c: Add 2009 to Copyright line.
7271
9ff516f3 72722009-02-14 Christian Franke <franke@computer.org>
7273
7274 * commands/hdparm.c: New file. Provides `hdparm' command
7275 which sends ATA commands via grub_disk_ata_pass_through ().
7276
7277 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
7278
7279 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
7280 and <grub/cpu/io.h> to include/grub/ata.h.
7281 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
7282 (GRUB_CDROM_SECTOR_SIZE): Remove.
7283 (GRUB_ATA_*): Move to include/grub/ata.h.
7284 (GRUB_ATAPI_*): Likewise.
7285 (enum grub_ata_commands): Likewise.
7286 (enum grub_ata_timeout_milliseconds): Likewise.
7287 (struct grub_ata_device): Likewise.
7288 (grub_ata_regset): Likewise.
7289 (grub_ata_regget): Likewise.
7290 (grub_ata_regset2): Likewise.
7291 (grub_ata_regget2): Likewise.
7292 (grub_ata_check_ready): Likewise.
7293 (grub_ata_wait_not_busy): Remove static, exported in
7294 include/grub/ata.h.
7295 (grub_ata_wait_drq): Likewise.
7296 (grub_ata_pio_read): Likewise.
7297
7298 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
7299 function for hdparm.mod.
7300
7301 * include/grub/ata.h: New file, contains declarations from
7302 disk/ata.c.
7303 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
7304
7305 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
7306 (grub_disk_ata_pass_through): New exported variable.
7307
7308 * kern/disk.c (grub_disk_ata_pass_through): New variable.
7309
772e23da 73102009-02-13 Colin D Bennett <colin@gibibit.com>
7311
7312 Support multiple fallback entries, and provide an API to support
7313 executing default+fallback menu entries. Renamed the `terminal' menu
7314 viewer to `text'.
7315
7316 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
7317 variable declaration.
7318 (grub_menu_execute_callback): New structure declaration.
7319 (grub_menu_execute_callback_t): New typedef.
7320 (grub_menu_execute_with_fallback): New function declaration.
7321 (grub_menu_get_entry): Likewise.
7322 (grub_menu_get_timeout): Likewise.
7323 (grub_menu_set_timeout): Likewise.
7324
7325 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
7326
7327 * normal/menu.c (grub_wait_after_message): Moved to
7328 `normal/menu_text.c'.
7329 (draw_border): Likewise.
7330 (print_message): Likewise.
7331 (print_entry): Likewise.
7332 (print_entries): Likewise.
7333 (grub_menu_init_page): Likewise.
7334 (get_entry_number): Likewise.
7335 (print_timeout): Likewise.
7336 (run_menu): Likewise.
7337 (grub_menu_execute_entry): Likewise.
7338 (show_text_menu): Likewise.
7339 (get_and_remove_first_entry_number): New function.
7340 (grub_menu_execute_with_fallback): Likewise.
7341 (get_entry): Renamed to ...
7342 (grub_menu_get_entry): .. this and made it global.
7343 (get_timeout): Renamed to ...
7344 (grub_menu_get_timeout): ... this and made it global.
7345 (set_timeout): Renamed to ...
7346 (grub_menu_set_timeout): ... this and made it global.
7347 (grub_normal_terminal_menu_viewer): Renamed to ...
7348 (grub_normal_text_menu_viewer): ... this.
7349
7350 * normal/menu_text.c: New file. Extracted text-menu-specific code
7351 from normal/menu.c.
7352
7353 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
7354 (normal_mod_SOURCES): Likewise.
7355
7356 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7357 (normal_mod_SOURCES): Likewise.
7358
7359 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7360 (normal_mod_SOURCES): Likewise.
7361
7362 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
7363 (normal_mod_SOURCES): Likewise.
7364
7365 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7366 (normal_mod_SOURCES): Likewise.
7367
7368 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7369 (normal_mod_SOURCES): Likewise.
7370
7371 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7372 (normal_mod_SOURCES): Likewise.
7373
16ac430e 73742009-02-11 Robert Millan <rmh@aybabtu.com>
7375
7376 * util/grub.d/00_header.in: Update old reference to `font' command.
7377
06ff20fc 73782009-02-10 Felix Zielcke <fzielcke@z-51.de>
7379
7380 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
7381
7382 Based on patch from Javier Martín.
7383
96da9407 73842009-02-09 Felix Zielcke <fzielcke@z-51.de>
7385
7386 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 7387 to avoid false positives with FAT.
96da9407 7388 (grub_fstest_SOURCES): Likewise.
7389 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7390 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7391 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7392 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
7393 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7394 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7395
6dca6fe4 73962009-02-09 Felix Zielcke <fzielcke@z-51.de>
7397
06ff20fc 7398 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 7399 bpb.version_specific.fat12_or_fat16.fstype and
7400 bpb.version_specific.fat32.fstype.
7401
2550c62f 74022009-02-08 Robert Millan <rmh@aybabtu.com>
7403
be110b30 7404 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 7405
56978920 74062009-02-08 Robert Millan <rmh@aybabtu.com>
7407
7408 * Makefile.in (host_os, host_cpu): New variables.
7409 (target_os): Remove. Update all users.
7410
d64399b5 74112009-02-08 Marco Gerards <marco@gnu.org>
7412
7413 * Makefile.in (enable_grub_emu_usb): New variable.
7414 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
7415 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
7416 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
7417 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
7418 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
7419 `usbtest.mod' and `usbms.mod'.
7420 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
7421 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
7422 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
7423 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
7424 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
7425 variables.
7426
7427 * disk/usbms.c: New file.
7428
7429 * include/grub/usb.h: Likewise.
7430
7431 * include/grub/usbtrans.h: Likewise.
7432
7433 * include/grub/usbdesc.h: Likewise.
7434
7435 * bus/usb/usbtrans.c: Likewise.
7436
7437 * bus/usb/ohci.c: Likewise.
7438
7439 * bus/usb/uhci.c: Likewise.
7440
7441 * bus/usb/usbhub.c: Likewise.
7442
7443 * bus/usb/usb.c: Likewise.
7444
7445 * commands/usbtest.c: Likewise.
7446
7447 * util/usb.c: Likewise.
50fb7002 7448
d64399b5 7449 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
7450
7451 * configure.ac: Test for libusb presence.
50fb7002 7452
d64399b5 7453 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
7454
2b40d6bb 74552009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
7456
7457 * kern/mm.c: Add more comments.
7458
73a4ce81 74592009-02-08 Robert Millan <rmh@aybabtu.com>
7460
7461 Patch from Javier Martín.
7462 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
7463 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
7464
f821ce59 74652009-02-08 Robert Millan <rmh@aybabtu.com>
7466
7467 * fs/cpio.c: Split tar functionality to ...
7468 * fs/tar.c: ... here (new file). Update all users.
7469
aebfc4b0 74702009-02-07 Robert Millan <rmh@aybabtu.com>
7471
7472 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
7473 backward-incompatible features.
7474
7475 Based on patch from Javier Martín, with some adjustments.
7476
50fb7002 74772009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 7478
7479 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
7480
0bb5115e 74812009-02-07 Robert Millan <rmh@aybabtu.com>
7482
7483 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
7484 position of `disk/lvm.c' to ensure grub_init_all() always picks it
7485 after the RAID stuff.
7486
38a0f8e7 74872009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
7488
50fb7002 7489 Fixes problem when running vbetest command as reported by
38a0f8e7 7490 Vladimir Serbinenko <phcoder@gmail.com>.
7491
7492 * (grub_vbe_set_video_mode): Fixed problem with text modes.
7493
3143cc1c 74942009-02-04 Felix Zielcke <fzielcke@z-51.de>
7495
7496 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
7497 /dev/md/NpN style mdraid devices.
7498
9cba6fce 74992009-02-03 Felix Zielcke <fzielcke@z-51.de>
7500
7501 * util/unifont2pff.rb: Remove.
7502
e507a2c1 75032009-02-03 Felix Zielcke <fzielcke@z-51.de>
7504
7505 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
7506 `#'.
7507
d2c2b4cd 75082009-02-03 Felix Zielcke <fzielcke@z-51.de>
7509
7510 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
7511 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7512 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7513 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
7514 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7515 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7516 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7517
b4315fb0 75182009-02-02 Christian Franke <franke@computer.org>
7519
7520 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
7521
de3aa260 75222009-02-01 Felix Zielcke <fzielcke@z-51.de>
7523
7c3ff286 7524 * INSTALL: Note that we now require at least autoconf 2.59 and
7525 that LZO is optional.
de3aa260 7526
825a182b 75272009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
7528
7529 Base on patch on bug #24154 created by Tomas Tintera
7530 <trosos@seznam.cz>.
7531
7532 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
7533
a69ef770 75342009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
7535
7c3ff286 7536 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 7537 <bero@arklinux.org>.
7538
7539 * normal/parser.y (script_init): Add missing semicolon.
7540
6fa42fa6 75412009-01-31 Colin D Bennett <colin@gibibit.com>
7542
7c3ff286 7543 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 7544 (free_menu_entry_classes): Added.
7545 (grub_normal_menu_addentry): Added class property handling.
7546 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
7547 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
7548
7549 * normal/menu_viewer.c: New file.
7550
7551 * normal/menu.c (run_menu_entry): Renamed to ...
7552 (grub_menu_execute_entry): ... this and made it as global.
7553 (grub_menu_run): Renamed to ...
7554 (show_text_menu): ... this and made it local.
7555 (show_text_menu): Adapt to new function names.
7556 (grub_normal_terminal_menu_viewer): New global variable.
7557
7558 * include/grub/menu.h: New file.
7559
7560 * include/grub/menu_viewer.h: New file.
7561
7562 * include/grub/normal.h: Added include to grub/menu.h.
7563 (grub_menu_entry): Moved to include/grub/menu.h.
7564 (grub_menu_entry_t): Likewise.
7565 (grub_menu): Likewise.
7566 (grub_menu_t): Likewise.
7567 (grub_normal_terminal_menu_viewer): Added.
7568 (grub_menu_execute_entry): Likewise.
7569 (grub_menu_run): Removed.
7570
7571 * DISTLIST: Added include/grub/menu.h.
7572 Added include/grub/menu_viewer.h.
7573 Added normal/menu_viewer.c.
7574
75752009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
7576
7577 * normal/execute.c (grub_script_execute_menuentry): Changed to use
7578 arglist for menutitle arguments.
7579
7580 * normal/main.c (grub_normal_menu_addentry): Likewise.
7581
7582 * normal/parser.y (menuentry): Likewise.
7583
7584 * normal/script.c (grub_script_create_cmdmenu): Likewise.
7585
7586 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
7587 (grub_script_create_cmdmenu): Likewise.
7588
7589 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
7590
7591 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
7592 changes.
7593
7594 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
7595
7596 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
7597
7598 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
7599
7600 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
7601
7602 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
7603
7604 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
7605
56192c23 76062009-01-30 Christian Franke <franke@computer.org>
7607
7608 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
7609 in option help text.
7610
d72521b3 76112009-01-27 Pavel Roskin <proski@gnu.org>
7612
7613 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
7614
994b5e84 76152009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
7616
7617 * commands/lsmmap.c: Add include to grub/machine/memory.h.
7618
7619 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
7620
7621 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
7622 unregister function.
7623
6a7eab2c 76242009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
7625
7626 * disk/scsi.c (grub_scsi_read): Fix sign problem.
7627
7628 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
7629
7630 * util/grub-mkfont.c (usage): Fix typo.
7631
7632 * util/elf/grub-mkimage.c (load_modules): Fix warning.
7633
1806b56e 76342009-01-26 Daniel Mierswa <impulze@impulze.org>
7635
3fb18f09 7636 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
7637
336e1fb9 7638 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
7639
1806b56e 7640 * kern/misc.c (grub_strcasecmp): New function.
7641 (grub_strcasecmp): Use grub_size_t instead of int for length.
7642 Fix return value.
7643 * include/grub/misc.h: Update function prototypes.
7644
580b2a0f 76452009-01-26 Robert Millan <rmh@aybabtu.com>
7646
7647 * configure.ac: Fix cross-compilation check.
ef257b36 7648
d31c24f1 76492009-01-22 Christian Franke <franke@computer.org>
7650
7651 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
7652 (precision) digit string. Allow `.format2' without `format1' (width).
7653 Limit input chars for `%s' output to `format2' if specified. This is
7654 compatible with standard printf ().
7655
3138b44c 76562009-01-22 Christian Franke <franke@computer.org>
7657
7658 * disk/ata.c (grub_ata_wait_status): Replace by ...
7659 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
7660 other status bits may be invalid while BSY is asserted.
7661 (grub_ata_check_ready): New function.
7662 (grub_ata_cmd): Removed.
7663 (grub_ata_wait_drq): New function.
7664 (grub_ata_strncpy): Remove inline.
7665 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
7666 and error check now done by grub_ata_wait_drq ().
7667 (grub_ata_pio_write): Likewise.
7668 (grub_atapi_identify): Set DEV before check for !BSY. Use
7669 grub_ata_wait_drq () to wait for data.
7670 (grub_ata_device_initialize): Add status register check to
7671 detect missing SATA slave devices. Add debug messages.
7672 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
7673 (grub_atapi_packet): Set DEV before check for !BSY. Replace
7674 transfer loop by grub_ata_pio_write ().
7675 (grub_ata_identify): Set DEV before check for !BSY. Use
7676 grub_ata_wait_drq () to wait for data.
ef257b36 7677 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 7678 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
7679 read/write in one loop. Fix invalid command on write. Fix incomplete
7680 command on (size % batch) == 0. Add missing error check after write of
7681 last block. Add debug messages.
7682 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
7683
59a64ef6 76842009-01-19 Christian Franke <franke@computer.org>
7685
7686 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
7687 (GRUB_ATAPI_IREASON_*): Likewise.
7688 (grub_ata_pio_write): Fix timeout error return.
7689 (grub_atapi_identify): Add grub_ata_wait () after cmd.
7690 (grub_atapi_wait_drq): New function.
7691 (grub_atapi_packet): New parameter `size'.
7692 Use grub_atapi_wait_drq () and direct write instead of
7693 grub_ata_pio_write ().
7694 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
7695 reads the number of bytes requested by the device for each DRQ
7696 assertion.
7697 (grub_atapi_write): Remove old implementation, return not
7698 implemented instead.
7699
1cfe20b3 77002009-01-19 Christian Franke <franke@computer.org>
7701
7702 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
7703 of 512 to calculate data size.
7704 (grub_scsi_read12): Likewise.
7705 (grub_scsi_write10): Likewise.
7706 (grub_scsi_write12): Likewise.
7707 (grub_scsi_read): Adjust size according to blocksize.
7708 Add checks for invalid blocksize and unaligned transfer.
7709
bee5fe5d 77102009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
7711
7712 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
7713
ef257b36 7714 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 7715 width glyphs.
7716
3e643f8c 77172009-01-19 Robert Millan <rmh@aybabtu.com>
7718
7719 * config.guess: Update to latest version from config git.
7720 * config.sub: Likewise.
7721
4fa80998 77222009-01-17 Felix Zielcke <fzielcke@z-51.de>
7723
7724 * Makefile.in: Change font compilation to use new grub-mkfont instead
7725 of java version.
7726
7727 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
7728 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
7729 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
7730 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
7731 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
7732 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
7733 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
7734 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
7735 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
7736
7086085b 77372009-01-16 Christian Franke <franke@computer.org>
7738
7739 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
7740 (enum grub_ata_timeout_milliseconds): New enum.
7741 (grub_ata_wait_status): Add parameter milliseconds.
7742 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
7743 recovery from timed-out commands.
7744 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
7745 return grub_errno instead of REG_ERROR.
7746 (grub_ata_pio_write): Add parameter milliseconds.
7747 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
7748 Pass milliseconds to grub_ata_wait_status () and
7749 grub_ata_pio_read ().
7750 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
7751 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
7752 grub_ata_wait_status (). Fix IDENTIFY timeout check.
7753 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
7754 It is not suitable for device detection, because DEV bit is ignored,
7755 the command may run too long, and not all devices set the signature
7756 properly.
7757 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
7758 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
7759 Fix device selection, DEV bit must be set first to address the registers
7760 of the correct device.
7761 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
7762 grub_ata_pio_read/write ().
7763 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
7764 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
7765
4a412913 77662009-01-13 Carles Pina i Estany <carles@pina.cat>
7767
7768 * util/grub-editenv.c (main): Use fseeko(), not fseek().
7769
7795c55e 77702009-01-13 Bean <bean123ch@gmail.com>
d913988c 7771
7772 * util/grub-mkfont.c (write_font): forget to remove some debug code.
7773
7795c55e 77742009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 7775
7776 * Makefile.in: (enable_grub_mkfont): New variable.
7777 (freetype_cflags): Likewise.
7778 (freetype_libs): Likewise.
7779
7780 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
7781 (grub_mkfont_SOURCES): New variable.
7782 (grub_mkfont_CFLAGS): Likewise.
7783 (grub_mkfont_LDFLAGS): Likewise.
7784
7785 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
7786 library if `--enable-grub-mkfont' is requested.
7787 (enable_grub_mkfont): New variable.
7788 (freetype_cflags): Likewise.
7789 (freetype_libs): Likewise.
7790
7791 * util/grub-mkfont.c: New file.
7792
093af1fe 77932009-01-12 Christian Franke <franke@computer.org>
7794
7795 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
7796 mode check. Fix setting of compat_use[].
7797
f36cc108 77982009-01-10 Robert Millan <rmh@aybabtu.com>
7799
7800 Update a few copyright years which we forgot to do in 2008 (only for
7801 files whose changes made in 2008 were copyright-significant)
7802
7803 * Makefile.in: Add 2008 to Copyright line.
7804 * disk/ieee1275/ofdisk.c: Likewise.
7805 * disk/efi/efidisk.c: Likewise.
7806 * kern/dl.c: Likewise.
7807 * kern/sparc64/ieee1275/init.c: Likewise.
7808 * kern/mm.c: Likewise.
7809 * kern/efi/mm.c: Likewise.
7810 * boot/i386/pc/boot.S: Likewise.
7811 * genfslist.sh: Likewise.
7812 * fs/iso9660.c: Likewise.
7813 * fs/hfs.c: Likewise.
7814 * fs/jfs.c: Likewise.
7815 * fs/minix.c: Likewise.
7816 * fs/ufs.c: Likewise.
7817 * gensymlist.sh.in: Likewise.
7818 * genkernsyms.sh.in: Likewise.
7819 * include/grub/misc.h: Likewise.
7820 * include/grub/types.h: Likewise.
7821 * include/grub/symbol.h: Likewise.
7822 * include/grub/elf.h: Likewise.
7823 * include/grub/kernel.h: Likewise.
7824 * include/grub/disk.h: Likewise.
7825 * include/grub/dl.h: Likewise.
7826 * include/grub/i386/linux.h: Likewise.
7827 * include/grub/i386/pc/biosdisk.h: Likewise.
7828 * include/grub/efi/api.h: Likewise.
7829 * include/grub/efi/pe32.h: Likewise.
7830 * include/grub/util/misc.h: Likewise.
7831 * normal/execute.c: Likewise.
7832 * normal/arg.c: Likewise.
7833 * normal/completion.c: Likewise.
7834 * normal/lexer.c: Likewise.
7835 * normal/parser.y: Likewise.
7836 * normal/misc.c: Likewise.
7837 * commands/i386/pc/vbeinfo.c: Likewise.
7838 * commands/hexdump.c: Likewise.
7839 * commands/terminal.c: Likewise.
7840 * commands/ls.c: Likewise.
7841 * commands/help.c: Likewise.
7842 * partmap/pc.c: Likewise.
7843 * loader/efi/chainloader.c: Likewise.
7844 * loader/multiboot_loader.c: Likewise.
7845 * loader/i386/pc/multiboot2.c: Likewise.
7846 * term/efi/console.c: Likewise.
7847 * term/i386/pc/serial.c: Likewise.
7848 * util/lvm.c: Likewise.
7849 * util/console.c: Likewise.
7850 * util/i386/efi/grub-mkimage.c: Likewise.
7851 * util/raid.c: Likewise.
7852
7f02114b 78532009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
7854
7855 * commands/videotest.c: Removed include to grub/machine/memory.h.
7856
7857 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
7858 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
7859 (video_mod_SOURCES): Removed.
7860 (video_mod_CFLAGS): Likewise.
7861 (video_mod_LDFLAGS): Likewise.
7862 (gfxterm_mod_SOURCES): Likewise.
7863 (gfxterm_mod_CFLAGS): Likewise.
7864 (gfxterm_mod_LDFLAGS): Likewise.
7865 (videotest_mod_SOURCES): Likewise.
7866 (videotest_mod_CFLAGS): Likewise.
7867 (videotest_mod_LDFLAGS): Likewise.
7868 (bitmap_mod_SOURCES): Likewise.
7869 (bitmap_mod_CFLAGS): Likewise.
7870 (bitmap_mod_LDFLAGS): Likewise.
7871 (tga_mod_SOURCES): Likewise.
7872 (tga_mod_CFLAGS): Likewise.
7873 (tga_mod_LDFLAGS): Likewise.
7874 (jpeg_mod_SOURCES): Likewise.
7875 (jpeg_mod_CFLAGS): Likewise.
7876 (jpeg_mod_LDFLAGS): Likewise.
7877 (png_mod_SOURCES): Likewise.
7878 (png_mod_CFLAGS): Likewise.
7879 (png_mod_LDFLAGS): Likewise.
7880
7881 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
7882 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
7883 (video_mod_SOURCES): Added.
7884 (video_mod_CFLAGS): Likewise.
7885 (video_mod_LDFLAGS): Likewise.
7886 (videotest_mod_SOURCES): Likewise.
7887 (videotest_mod_CFLAGS): Likewise.
7888 (videotest_mod_LDFLAGS): Likewise.
7889 (bitmap_mod_SOURCES): Likewise.
7890 (bitmap_mod_CFLAGS): Likewise.
7891 (bitmap_mod_LDFLAGS): Likewise.
7892 (tga_mod_SOURCES): Likewise.
7893 (tga_mod_CFLAGS): Likewise.
7894 (tga_mod_LDFLAGS): Likewise.
7895 (jpeg_mod_SOURCES): Likewise.
7896 (jpeg_mod_CFLAGS): Likewise.
7897 (jpeg_mod_LDFLAGS): Likewise.
7898 (png_mod_SOURCES): Likewise.
7899 (png_mod_CFLAGS): Likewise.
7900 (png_mod_LDFLAGS): Likewise.
7901 (gfxterm_mod_SOURCES): Likewise.
7902 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 7903 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 7904
7905 * term/gfxterm.c: Removed include to grub/machine/memory.h,
7906 grub/machine/console.h.
7907
644fff97 79082009-01-04 Jerone Young <jerone@gmail.com>
7909
7910 Make on screen instructions clearer
7911
7912 Based on patch created by Jidanni <jidanni@jidanni.org>
7913
7914 * normal/menu.c: print clearer instructions on the screen
7915
1e901a75 79162009-01-02 Colin D Bennett <colin@gibibit.com>
7917
7918 New font engine.
34c44600 7919
1e901a75 7920 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
7921 build system and fixed gfxterm.c to work with different sized fonts.
7922
7923 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 7924
1e901a75 7925 * configure: Re-generated.
34c44600 7926
1e901a75 7927 * DISTLIST: Removed font/manager.c.
7928 Added font/font.c.
7929 Added font/font_cmd.c.
34c44600 7930
1e901a75 7931 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
7932 compilation.
34c44600 7933
1e901a75 7934 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 7935
7936 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 7937
7938 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 7939
1e901a75 7940 * normal/menu.c: Likewise.
34c44600 7941
1e901a75 7942 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
7943 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 7944
1e901a75 7945 * include/grub/font.h: Replaced with new file.
34c44600 7946
1e901a75 7947 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
7948 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
7949 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
7950 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
7951 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 7952 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 7953 fg_red, fg_green, fg_blue, fg_alpha.
7954 (grub_video_adapter): Removed blit_glyph.
34c44600 7955 (grub_video_blit_glyph): Removed.
7956
1e901a75 7957 * font/manager.c: Removed file.
34c44600 7958
7959 * font/font.c: New file.
7960
1e901a75 7961 * font/font_cmd.c: Likewise.
34c44600 7962
1e901a75 7963 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 7964
1e901a75 7965 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
7966 (grub_video_vbe_map_rgba): Likewise.
7967 (grub_video_vbe_unmap_color_int): Likewise.
7968 (grub_video_vbe_blit_glyph): Removed.
7969 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 7970
1e901a75 7971 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
7972 (get_pixel): Likewise.
34c44600 7973 (set_pixel): Likewise.
7974
1e901a75 7975 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 7976
1e901a75 7977 * term/gfxterm.c: Adapted to new font engine.
34c44600 7978
1e901a75 7979 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 7980
1e901a75 7981 * term/i386/pc/vga.c: Likewise.
34c44600 7982
1e901a75 7983 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 7984
1e901a75 7985 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 7986
1e901a75 7987 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7988
1e901a75 7989 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 7990
1e901a75 7991 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 7992
1e901a75 7993 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 7994
1e901a75 7995 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 7996
1e901a75 7997 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 7998
1e901a75 7999 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
8000
8001 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 8002
1e901a75 8003 * util/grub-mkconfig_lib.in: Changed font extension.
8004
278922e8 80052008-12-28 Felix Zielcke <fzielcke@z-51.de>
8006
8007 * util/getroot.c (grub_util_get_grub_dev): Add support for
8008 /dev/md/dNNpNN style partitionable mdraid devices.
8009
3ced05cf 80102008-12-12 Alex Smith <alex@alex-smith.me.uk>
8011
8012 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
8013 at a time limit of the PXE TFTP API correctly.
8014 (grub_pxefs_close): Likewise.
8015
7fd0ee30 80162008-11-29 Robert Millan <rmh@aybabtu.com>
8017
34c44600 8018 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 8019 grub_ata_device_initialize() calls.
8020
34c44600 80212008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 8022
8023 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
8024 iteration failed.
8025 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
8026
89313780 80272008-11-28 Robert Millan <rmh@aybabtu.com>
8028
8029 Fix build on powerpc-ieee1275. Based on patch created by
8030 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
8031 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8032 `kern/ieee1275/mmap.c'.
8033 * include/grub/powerpc/ieee1275/memory.h: New file.
8034
15257703 8035 Provide grub-install on coreboot.
8036 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
8037 (grub_install_SOURCES): New variable.
8038 * util/i386/pc/grub-install.in: Add a few condition checks to make it
8039 usable on coreboot.
8040
9fc5388a 80412008-11-25 Felix Zielcke <fzielcke@z-51.de>
8042
8043 * util/grub-fstest.c (grub_term_get_current_input): Change return type
8044 to `grub_term_input_t'.
8045 (grub_term_get_current_output): Change return type to
8046 `grub_term_output_t'.
8047
bc3a2f31 80482008-11-22 Robert Millan <rmh@aybabtu.com>
8049
34c44600 8050 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 8051 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
8052 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
8053 grub_vga_text_cls().
8054
80fc88f2 8055 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 8056 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 8057
cbf36fd3 8058 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
8059 to 0x200000 (avoids trouble with some OFW implementations, and matches
8060 with the one in Yaboot).
8061 Reported by Manoel Abranches
8062
73e8e268 80632008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 8064
8065 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
8066 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
8067
73e8e268 8068 * util/grub-mkconfig_lib.in (grub_warn): New function.
8069 (convert_system_path_to_grub_path): Use grub_warn() when issuing
8070 warnings, to obtain consistent formatting.
8071 * util/grub.d/00_header.in: Likewise.
8072 * util/update-grub_lib.in: Likewise.
8073
e94045a1 8074 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 8075 Move comment text to `#error' stanza.
e94045a1 8076
79d29fd7 8077 Harmonize ieee1275's grub_available_iterate() with the generic
8078 grub_machine_mmap_iterate() interface (fixes a recently-introduced
8079 build problem on i386-ieee1275):
8080 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
8081 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
8082 parameter `type'. Update all users of this function.
8083 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8084 `kern/ieee1275/mmap.c'.
8085 * kern/ieee1275/init.c
8086 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
8087 with ...
8088 (grub_machine_mmap_iterate): ... this.
8089 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
8090 return type to `grub_err_t'. Update all implementations of this
8091 function prototype.
8092 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
8093 Likewise.
8094
60d6b16e 8095 Add `lsmmap' command (lists firmware-provided memory map):
8096 * commands/lsmmap.c: New file.
8097 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
8098 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
8099 variables.
8100 * conf/powerpc-ieee1275.rmk: Likewise.
8101 * conf/i386-coreboot.rmk: Likewise.
8102 * conf/i386-ieee1275.rmk: Likewise.
8103
ebaaf49b 81042008-11-19 Robert Millan <rmh@aybabtu.com>
8105
8106 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 8107 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
8108 constraints to initrd allocation (based on code from
8109 loader/i386/pc/linux.c). Without them, initrd was allocated too high
8110 for Linux to find it.
ebaaf49b 8111
dfab719f 81122008-11-14 Robert Millan <rmh@aybabtu.com>
8113
8114 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
8115 order to cope with duplicate slashes.
8116
10fc3eb9 81172008-11-14 Robert Millan <rmh@aybabtu.com>
8118
8119 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
8120 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
8121 don't want to mess with lower memory, because it is used in the Linux
8122 loader.
8123
8124 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 8125 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 8126 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
8127 is in our heap (probably as a result of it being corrupted during
2f2a3442 8128 decompression). Add #error instance with comment to explain why this
8129 loader isn't currently usable on PC/BIOS.
10fc3eb9 8130
e2e07847 81312008-11-14 Robert Millan <rmh@aybabtu.com>
8132
8133 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 8134 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 8135
fe8e8d69 81362008-11-12 Robert Millan <rmh@aybabtu.com>
8137
8138 Make loader/i386/linux.c buildable on i386-pc (although disabled).
8139
8140 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
8141 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
8142 from here ...
8143 * include/grub/i386/pc/memory.h: ... to here.
8144
976b07d0 81452008-11-12 Robert Millan <rmh@aybabtu.com>
8146
8147 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
8148 split).
8149
8150 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
8151 (grub_console_cur_color, grub_console_real_putchar)
8152 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
8153 (grub_console_setcolorstate, grub_console_setcolor)
8154 (grub_console_getcolor): Move from here ...
8155 * include/grub/i386/vga_common.h: ... to here (new file).
8156
8157 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
8158 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
8159 `<grub/i386/io.h>'.
8160 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
8161 `<grub/i386/vga_common.h>'.
8162
76679cd3 81632008-11-12 Robert Millan <rmh@aybabtu.com>
8164
8165 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
8166 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
8167 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
8168 variables.
8169 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
8170 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
8171
8172 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
8173 grub_console_init() with call to grub_vga_text_init().
8174 (grub_machine_fini): Replace call to
8175 grub_console_fini() with call to grub_vga_text_fini() and
8176 grub_at_keyboard_fini().
8177
8178 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
8179 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
8180 (grub_console_setcolorstate, grub_console_setcolor)
8181 (grub_console_getcolor): New function prototypes.
8182
8183 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
8184 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
8185 (grub_vga_text_setcursor): Static-ize.
8186 (grub_vga_text_term): New structure.
8187 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
8188
8189 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
8190 (grub_console_cur_color, grub_console_standard_color)
8191 (grub_console_normal_color, grub_console_highlight_color)
8192 (map_char, grub_console_putchar, grub_console_getcharwidth)
8193 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
8194 (grub_console_getcolor): Move from here ...
8195 * term/i386/vga_common.c: ... to here (same function names).
8196
95b841d3 81972008-11-12 Robert Millan <rmh@aybabtu.com>
8198
8199 Use newly-added Multiboot support in coreboot.
8200
8201 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
8202 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
8203
8204 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
8205 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
8206 (codestart): Store the MBI in `startup_multiboot_info' when we're
8207 being loaded using Multiboot.
8208
8209 * kern/i386/coreboot/init.c (grub_machine_init): Move
8210 grub_at_keyboard_init() call to beginning of function (useful for
8211 debugging). Call grub_machine_mmap_init() before attempting to use
8212 grub_machine_mmap_iterate().
8213 (grub_lower_mem, grub_upper_mem): Move from here ...
8214 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
8215 here (new file).
8216
8217 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
8218 function prototype.
8219
761ca975 82202008-11-12 Robert Millan <rmh@aybabtu.com>
8221
8222 Fix a regression introduced by the at_keyboard.mod split. Because
8223 some terminals are default on some platforms and non-default on
8224 others, the first terminal being registered determines which is
8225 going to be default.
8226
8227 * kern/term.c (grub_term_register_input): If this is the first
8228 terminal being registered, set it as the current one.
8229 (grub_term_register_output): Likewise.
8230
8231 * term/efi/console.c (grub_console_init): Do not call
8232 grub_term_set_current_output() or grub_term_set_current_input().
8233 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
8234 * term/i386/pc/console.c (grub_console_init): Likewise.
8235 (grub_console_fini): Do not call grub_term_set_current_input()
8236 (but leave grub_term_set_current_output() to restore text mode).
8237
6c529df7 82382008-11-10 Robert Millan <rmh@aybabtu.com>
8239
8240 * util/grub.d/00_header.in: Add backward compatibility check for
8241 versions of terminal.mod that don't understand `terminal_input' or
8242 `terminal_output'.
8243
132e4113 82442008-11-09 Robert Millan <rmh@aybabtu.com>
8245
8246 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
8247 `terminal_input' / `terminal_output', not `terminal'.
8248
ac293d50 82492008-11-08 Robert Millan <rmh@aybabtu.com>
8250
8251 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 8252 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 8253
0025933a 82542008-11-08 Robert Millan <rmh@aybabtu.com>
8255
8256 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 8257 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 8258 members. Update all users.
8259 * util/console.c (grub_ncurses_term): Split in ...
8260 (grub_ncurses_term_input): ... this, and ...
8261 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 8262 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 8263
37c86336 82642008-11-08 Robert Millan <rmh@aybabtu.com>
8265
8266 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
8267 (PKGDATA): Add $(pkgdata_SRCDIR).
8268 (pkglib_BUILDDIR): New variable.
8269 (pkgdata_SRCDIR): New variable.
8270 (build_env.mk): New target.
8271 (include_DATA): New variable.
8272 (install-local): Install $(include_DATA) files in $(includedir).
8273
b6c15a2d 82742008-11-07 Pavel Roskin <proski@gnu.org>
8275
d99d46f1 8276 * gendistlist.sh: Use C locale for sorting to ensure consistent
8277 output on all systems.
8278
b6c15a2d 8279 * util/grub.d/00_header.in: Remove incorrect space before
8280 "serial".
8281
c32ee8c9 82822008-11-07 Robert Millan <rmh@aybabtu.com>
8283
8284 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
8285 per specification.
8286 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
8287 * loader/multiboot_loader.c (find_multi_boot2_header): New function
8288 (based on find_multi_boot1_header).
8289 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
8290 using find_multi_boot2_header(), and abort if neither Multiboot or
8291 Multiboot headers were found.
8292
651c29b7 82932008-11-07 Robert Millan <rmh@aybabtu.com>
8294
8295 Modularize at_keyboard.mod:
8296
8297 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
8298 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
8299 (at_keyboard_mod_LDFLAGS): New variables.
8300
8301 Actual terminal split:
8302
8303 * include/grub/term.h (struct grub_term): Split in ...
8304 (struct grub_term_input): ... this, and ...
8305 (struct grub_term_output): ... this. Update all users.
8306 (grub_term_set_current): Split in ...
8307 (grub_term_set_current_input): ... this, and ...
8308 (grub_term_set_current_output): ... this.
8309 (grub_term_get_current): Split in ...
8310 (grub_term_get_current_input): ... this, and ...
8311 (grub_term_get_current_output): ... this.
8312 (grub_term_register): Split in ...
8313 (grub_term_register_input): ... this, and ...
8314 (grub_term_register_output): ... this.
8315 (grub_term_unregister): Split in ...
8316 (grub_term_unregister_input): ... this, and ...
8317 (grub_term_unregister_output): ... this.
8318 (grub_term_iterate): Split in ...
8319 (grub_term_iterate_input): ... this, and ...
8320 (grub_term_iterate_output): ... this.
8321
8322 * kern/term.c (grub_term_list): Split in ...
8323 (grub_term_list_input): ... this, and ...
8324 (grub_term_list_output): ... this. Update all users.
8325 (grub_cur_term): Split in ...
8326 (grub_cur_term_input): ... this, and ...
8327 (grub_cur_term_output): ... this. Update all users.
8328 (grub_term_set_current): Split in ...
8329 (grub_term_set_current_input): ... this, and ...
8330 (grub_term_set_current_output): ... this.
8331 (grub_term_get_current): Split in ...
8332 (grub_term_get_current_input): ... this, and ...
8333 (grub_term_get_current_output): ... this.
8334 (grub_term_register): Split in ...
8335 (grub_term_register_input): ... this, and ...
8336 (grub_term_register_output): ... this.
8337 (grub_term_unregister): Split in ...
8338 (grub_term_unregister_input): ... this, and ...
8339 (grub_term_unregister_output): ... this.
8340 (grub_term_iterate): Split in ...
8341 (grub_term_iterate_input): ... this, and ...
8342 (grub_term_iterate_output): ... this.
8343
8344 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
8345 a check for input and one for output (and only attempt to get keys
8346 from user when input works).
8347
8348 * util/grub-probe.c (grub_term_get_current): Split in ...
8349 (grub_term_get_current_input): ... this, and ...
8350 (grub_term_get_current_output): ... this.
8351 * util/grub-fstest.c: Likewise.
8352 * util/i386/pc/grub-setup.c: Likewise.
8353 * util/grub-editenv.c: Likewise.
8354
8355 Portability adjustments:
8356
8357 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
8358 `term/i386/pc/at_keyboard.c'.
8359 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
8360 grub_keyboard_controller_init() (now handled by terminal .init).
8361 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
8362 grub_at_keyboard_init().
8363 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
8364 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
8365 at_keyboard.mod via input terminal interface).
8366 * include/grub/i386/coreboot/console.h: Convert into a stub for
8367 `<grub/i386/pc/console.h>'.
8368
8369 Migrate full terminals to new API:
8370
8371 * term/efi/console.c (grub_console_term): Split into ...
8372 (grub_console_term_input): ... this, and ...
8373 (grub_console_term_output): ... this. Update all users.
8374 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
8375 (grub_ofconsole_init): Split into ...
8376 (grub_ofconsole_init_input): ... this, and ...
8377 (grub_ofconsole_init_output): ... this.
8378 (grub_ofconsole_term): Split into ...
8379 (grub_ofconsole_term_input): ... this, and ...
8380 (grub_ofconsole_term_output): ... this. Update all users.
8381 * term/i386/pc/serial.c (grub_serial_term): Split into ...
8382 (grub_serial_term_input): ... this, and ...
8383 (grub_serial_term_output): ... this. Update all users.
8384 * term/i386/pc/console.c (grub_console_term): Split into ...
8385 (grub_console_term_input): ... this, and ...
8386 (grub_console_term_output): ... this. Update all users.
8387 (grub_console_term_input): Only enable it on PC/BIOS platform.
8388 (grub_console_init): Remove grub_keyboard_controller_init() call.
8389
8390 Migrate input terminals to new API:
8391
8392 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
8393 `i386' and `i386/pc' to enable build on x86_64 (this driver is
8394 i386-specific anyway).
8395 (grub_console_checkkey): Rename to ...
8396 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
8397 users.
8398 (grub_keyboard_controller_orig): New variable.
8399 (grub_console_getkey): Rename to ...
8400 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
8401 users.
8402 (grub_keyboard_controller_init): Static-ize. Save original
8403 controller value so that it can be restored ...
8404 (grub_keyboard_controller_fini): ... here (new function).
8405 (grub_at_keyboard_term): New structure.
8406 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
8407 functions.
8408
8409 Migrate output terminals to new API:
8410
8411 * term/i386/pc/vga.c (grub_vga_term): Change type to
8412 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
8413 members. Update all users.
8414 * term/gfxterm.c (grub_video_term): Change type to
8415 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
8416 members. Update all users.
8417 * include/grub/i386/pc/console.h (grub_console_checkkey)
8418 (grub_console_getkey): Do not export (no longer needed by gfxterm,
8419 etc).
8420
8421 Migrate `terminal' command and userland tools to new API:
8422
8423 * commands/terminal.c (grub_cmd_terminal): Split into ...
8424 (grub_cmd_terminal_input): ... this, and ...
8425 (grub_cmd_terminal_output): ... this.
8426 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
8427 `terminal_input' and `terminal_output'.
8428 * util/grub.d/00_header.in: Adjust `terminal' calls to new
8429 `terminal_input' / `terminal_output' API.
8430 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
8431 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
8432 provided ${GRUB_TERMINAL}, convert it).
8433
96e5d876 84342008-11-04 Robert Millan <rmh@aybabtu.com>
8435
8436 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
8437 for FreeBSD.
8438 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
8439
556f3775 84402008-11-03 Bean <bean123ch@gmail.com>
8441
8442 * kern/elf.c (grub_elf32_load): Revert to previous code.
8443 (grub_elf64_load): Likewise.
8444
8445 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
8446
926b9823 84472008-11-01 Robert Millan <rmh@aybabtu.com>
8448
8449 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
8450 (TARGET_CPPFLAGS): Likewise.
8451 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
8452
1432e958 84532008-11-01 Carles Pina i Estany <carles@pina.cat>
8454
8455 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
8456
dba3f844 84572008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 8458
8459 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
8460 addition of objects until the code is not going to be able to fail.
8461
dba3f844 84622008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 8463
8464 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
8465 (add a missing NULL check, and correct them by moving the pointer
8466 operations after the actual check).
8467
7ab28c21 84682008-10-29 Robert Millan <rmh@aybabtu.com>
8469
8470 * util/i386/pc/grub-install.in: Handle empty string as output from
8471 make_system_path_relative_to_its_root().
8472
1b7748eb 84732008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
8474
8475 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
8476 circular metadata worst case scenario. If the metadata is circular
8477 then copy the wrap in place.
8478 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
8479 project lib/format_text/layout.h
8480 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
8481
c9618ab2 84822008-10-03 Felix Zielcke <fzielcke@z-51.de>
8483
7a36edca 8484 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 8485
bf981c62 84862008-10-03 Felix Zielcke <fzielcke@z-51.de>
8487
8488 * util/update-grub_lib.in: Mention filename in warning message.
8489
6d994591 84902008-09-29 Felix Zielcke <fzielcke@z-51.de>
8491
8492 * NEWS: Update for rename of update-grub to grub-mkconfig.
8493
18ade780 84942008-09-29 Felix Zielcke <fzielcke@z-51.de>
8495
8496 * util/update-grub_lib.in: Copy to ...
8497 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 8498 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 8499 * util/update-grub.in: Rename to ...
8500 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
8501 option. Add `--output' option to allow users to specify the generated
8502 configuration file. Default to stdout.
8503 (update_grub_dir): Rename to ...
8504 (grub_mkconfig_dir): ... this.
8505 (grub_cfg): Default to an empty string.
8506 * conf/common.rmk (update-grub): Rename to ...
8507 (grub-mkconfig): ... this.
8508 (update-grub_lib): Copy to ...
8509 (grub-mkconfig_lib): ... this.
8510 (update-grub_SCRIPTS): Copy to ...
8511 (grub-mkconfig_SCRIPTS): ... this. Update all users.
8512 (update-grub_DATA): Rename to ...
8513 (grub-mkconfig_DATA): ... this.
8514
556ce6ac 85152008-09-28 Robert Millan <rmh@aybabtu.com>
8516
8517 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
8518 to `modified'. Add the real `created' field.
8519 (grub_iso9660_uuid): Use `modified' rather than `created' for
8520 constructing the UUID.
8521
85222008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 8523
8524 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
8525 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
8526
92274e85 85272008-09-28 Bean <bean123ch@gmail.com>
8528
8529 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
8530 Thanks to Christian Franke for finding this bug.
8531
add6f17a 85322008-09-25 Robert Millan <rmh@aybabtu.com>
8533
8534 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
8535 instances of grub_util_get_disk_name() (see previous commit).
8536
d2a367b8 85372008-09-25 Robert Millan <rmh@aybabtu.com>
8538
8539 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
8540 `util/i386/get_disk_name.c'.
8541 * conf/i386-efi.rmk: Likewise.
8542 * conf/x86_64-efi.rmk: Likewise.
8543 * conf/i386-coreboot.rmk: Likewise.
8544 * conf/i386-ieee1275.rmk: Likewise.
8545 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
8546 `util/ieee1275/get_disk_name.c'.
8547 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
8548 * util/ieee1275/get_disk_name.c: Remove file.
8549 * util/i386/get_disk_name.c: Remove file.
8550 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
8551 "hd%d" for device.map entries, rather than using
8552 grub_util_get_disk_name().
8553
81a06771 85542008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 8555
8556 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
8557 warning.
8558 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
8559
5a004279 85602008-09-24 Carles Pina i Estany <carles@pina.cat>
8561
8562 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
8563 Changed to 0x5100.
8564 (GRUB_TERM_PPAGE): Changed to 0x4900.
8565
397093d3 85662008-09-24 Robert Millan <rmh@aybabtu.com>
8567
8568 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
8569 macros (they were i386-pc specific).
8570 * include/grub/sparc64/ieee1275/console.h: Likewise.
8571 * include/grub/efi/console.h: Likewise.
8572
a91b6c7c 85732008-09-22 Bean <bean123ch@gmail.com>
8574
8575 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
8576 resident and in attribute list.
8577
8578 * include/grub/ntfs.h (BMP_LEN): Removed.
8579
c40fd116 85802008-09-22 Bean <bean123ch@gmail.com>
8581
81a06771 8582 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 8583 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
8584
8585 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
8586 error occurs, as grub_disk_open will call grub_disk_close, which will
8587 call p->close (scsi).
8588
81a06771 85892008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 8590
8591 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
8592 (AC_PREREQ): Bumped to 2.59.
8593 (AC_TRY_COMPILE): Replace obsolete macro with ...
8594 (AC_COMPILE_IFELSE): ... this.
8595 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
8596 (AC_LINK_IFELSE): ... this.
8597
5dc43410 85982008-09-21 Felix Zielcke <fzielcke@z-51.de>
8599
8600 * autogen.sh: Add a call to `gendistlist.sh'.
8601
9035dce4 86022008-09-19 Christian Franke <franke@computer.org>
8603
8604 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
8605 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
8606 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
8607 Export __enable_execute_stack() to modules.
8608 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
8609 New function.
8610
7fd75377 86112008-09-09 Felix Zielcke <fzielcke@z-51.de>
8612
040030b3 8613 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
8614 Sort the list.
8615
86162008-09-09 Felix Zielcke <fzielcke@z-51.de>
8617
8618 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 8619 #include <grub/util/hostdisk.h>.
8620
89d5ffcf 86212008-09-08 Robert Millan <rmh@aybabtu.com>
8622
8623 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
8624 segments when their filesz is zero (grub_file_read() interprets
81a06771 8625 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 8626 Use `lowest_segment' rather than 0 for calculating the current
8627 segment load address.
8628
40da438f 86292008-09-08 Robert Millan <rmh@aybabtu.com>
8630
8631 * util/hostdisk.c (open_device): Replace a grub_util_info() call
8632 with grub_dprintf("hostdisk", ...), as it was so verbose that it
8633 clobbered useful information.
8634
ddbf5556 86352008-09-08 Robert Millan <rmh@aybabtu.com>
8636
8637 * include/grub/util/biosdisk.h: Move to ...
8638 * include/grub/util/hostdisk.h: ... here. Update all users.
8639 * util/biosdisk.c: Move to ...
8640 * util/hostdisk.c: ... here. Update all users.
8641
783d0f48 86422008-09-07 Robert Millan <rmh@aybabtu.com>
8643
8644 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
8645 variables.
8646 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
8647 and length can be stored directly in the `mbi->mmap_addr' and
8648 `mbi->mmap_length' struct fields.
8649
548e2ea5 86502008-09-07 Robert Millan <rmh@aybabtu.com>
8651
8652 * conf/i386.rmk: New file. Provides declaration for building
8653 `cpuid.mod'.
8654 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
8655 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
8656 variables.
8657 Include `conf/i386.mk'.
8658 * conf/i386-efi.rmk: Likewise.
8659 * conf/x86_64-efi.rmk: Likewise.
8660 * conf/i386-coreboot.rmk: Likewise.
8661 * conf/i386-ieee1275.rmk: Likewise.
8662
0ea85a37 86632008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
8664
8665 Based on patch created by Colin D Bennett <colin@gibibit.com>.
8666 Adds optimization support for BGR based modes.
8667
8668 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
8669 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
8670 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8671 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8672 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8673 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8674 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8675 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8676 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8677 (grub_video_i386_vbeblit_index_index): Likewise.
8678 (grub_video_i386_vbeblit_replace_directN): Added.
8679 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
8680 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
8681 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
8682 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
8683 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
8684 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 8685 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 8686 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
8687 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
8688 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
8689 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
8690 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
8691 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
8692
8693 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
8694 (grub_video_i386_vbefill_R8G8B8): Likewise.
8695 (grub_video_i386_vbefill_index): Likewise.
8696 (grub_video_i386_vbefill_direct32): Added.
8697 (grub_video_i386_vbefill_direct24): Likewise.
8698 (grub_video_i386_vbefill_direct16): Likewise.
8699 (grub_video_i386_vbefill_direct8): Likewise.
8700
81a06771 8701 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 8702 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
8703 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
8704 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
8705 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
8706 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 8707
0ea85a37 8708 * video/video.c (grub_video_get_blit_format): Updated to use new
8709 blit formats. Added handling for 16 bit color modes.
81a06771 8710
8711 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 8712 fillers.
8713 (common_blitter): Updated to use new blitters.
8714
8715 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
8716 Removed.
8717 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
8718 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8719 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8720 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8721 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8722 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8723 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8724 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8725 (grub_video_i386_vbeblit_index_index): Likewise.
8726 (grub_video_i386_vbeblit_replace_directN): Added.
8727 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
8728 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
8729 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
8730 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
8731 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
8732 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
8733 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
8734 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
8735 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
8736 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
8737 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
8738 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
8739 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 8740
0ea85a37 8741 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
8742 (grub_video_i386_vbefill_R8G8B8): Likewise.
8743 (grub_video_i386_vbefill_index): Likewise.
8744 (grub_video_i386_vbefill_direct32): Added.
8745 (grub_video_i386_vbefill_direct24): Likewise.
8746 (grub_video_i386_vbefill_direct16): Likewise.
8747 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 8748
0ea85a37 8749 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
8750 types.
81a06771 8751
0ea85a37 8752 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
8753 types.
81a06771 8754
0ea85a37 8755 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
8756 blitter types.
81a06771 8757
0ea85a37 8758 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
8759 types.
8760
e8a83df6 87612008-09-06 Felix Zielcke <fzielcke@z-51.de>
8762
8763 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
8764 RAID level 1.
8765
6bcd8ee5 87662008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 8767
6bcd8ee5 8768 * fs/iso9660.c (grub_iso9660_date): New structure.
8769 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
8770 (grub_iso9660_uuid): New function.
c375ae58 8771
59261157 87722008-09-05 Bean <bean123ch@gmail.com>
8773
8774 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
8775
8776 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
8777 insensitive bit for names in Win32 and Win32 & DOS namespace.
8778
8779 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
8780
8781 * include/grub/types.h (LONG_MAX): Likewise.
8782
58b6645a 87832008-09-04 Felix Zielcke <fzielcke@z-51.de>
8784
4ee55921 8785 * util/getroot.c: Include <config.h>.
8786 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
8787 add support for /dev/md/N devices and handle LVM double dash escaping.
8788
87892008-09-04 Felix Zielcke <fzielcke@z-51.de>
8790
8791 * config.guess: Update to latest version from config git.
8792 * config.sub: Likewise.
58b6645a 8793
9124f65d 87942008-09-03 Robert Millan <rmh@aybabtu.com>
8795
8796 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
8797 `disk->total_sectors'.
8798
81a06771 87992008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 8800
8801 * include/grub/normal.h: Fixed incorrect comment for
8802 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
8803
81a06771 88042008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 8805
8806 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
8807 values with defines.
8808
8809 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
8810 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
8811 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
8812 (GRUB_VBE_MODEATTR_COLOR): Likewise.
8813 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
8814 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
8815 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
8816 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
8817 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
8818 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
8819 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
8820 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
8821 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
8822 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
8823 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
8824 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
8825 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
8826 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
8827 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
8828
93d5cbf8 88292008-08-31 Robert Millan <rmh@aybabtu.com>
8830
8831 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
8832 declaration.
8833 (grub_multiboot): Fix a few warnings.
8834
21751d50 88352008-08-31 Robert Millan <rmh@aybabtu.com>
8836
8837 * loader/i386/pc/multiboot.c: Update comment not to say that
8838 boot_device support is unimplemented.
8839
e27a75c5 88402008-08-31 Robert Millan <rmh@aybabtu.com>
8841
8842 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
8843 or memory map support are unimplemented.
8844
81a06771 88452008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 8846
8847 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
8848
81a06771 88492008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 8850
8851 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
8852 total video memory in 'vbeinfo' output; show color format details for
8853 each video mode.
8854
7c5d8d95 88552008-08-30 Pavel Roskin <proski@gnu.org>
8856
8857 * util/genmoddep.c: Remove for real this time.
8858 * DISTLIST: Remove util/genmoddep.c.
8859
4cebd25a 88602008-08-30 Robert Millan <rmh@aybabtu.com>
8861
8862 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
8863 as required by Multiboot spec (it was already 4-byte aligned, but
8864 only by chance).
8865
b497a269 88662008-08-29 Pavel Roskin <proski@gnu.org>
8867
e3925185 8868 * kern/powerpc/ieee1275/crt0.S: Rename to ...
8869 * kern/powerpc/ieee1275/startup.S: ... this.
8870 * conf/powerpc-ieee1275.rmk: Adjust for the above.
8871 * DISTLIST: Likewise.
8872
b497a269 8873 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
8874 grub/cpu/kernel.h. Add start label for consistency with other
8875 platforms. Add grub_prefix immediately after start. Add jump
8876 to the code after grub_prefix.
8877 * include/grub/powerpc/kernel.h: Provide valid values for
8878 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
8879
6e5a42fe 88802008-08-29 Bean <bean123ch@gmail.com>
8881
8882 * configure.ac: Change host_os to cygwin for mingw.
8883 (asprintf): New check for function.
8884
8885 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
8886 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
8887
8888 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 8889 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 8890 sync, sleep and grub_util_get_disk_size for mingw.
8891
8892 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
8893 to get size in mingw.
8894 (open_device): Use flag O_BINARY if it's defined.
8895 (find_root_device): Add dummy code for mingw.
8896
8897 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
8898 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
8899 (get_scsi_disk_name): Return 0 for mingw.
8900
8901 * util/hostfs.c: #include <grub/util/misc.h>.
8902 (grub_hostfs_open): Use "rb" flag to open file, use
8903 grub_util_get_disk_size to get disk size for mingw.
8904
8905 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
8906 (asprintf): New function if HAVE_ASPRINTF is not set.
8907 (sync): New function for mingw.
8908 (sleep): Likewise.
8909 (grub_util_get_disk_size): Likewise.
8910
ab3f2673 89112008-08-28 Pavel Roskin <proski@gnu.org>
8912
8913 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8914 kern/time.c.
8915
1c282483 89162008-08-28 Robert Millan <rmh@aybabtu.com>
8917
8918 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
8919
678e849c 89202008-08-28 Robert Millan <rmh@aybabtu.com>
8921
8922 Change find_grub_drive() syntax so it doesn't prevent it from
8923 detecting NULL names as errors.
8924
8925 * util/biosdisk.c (find_grub_drive): Move free slot search code
8926 from here ...
8927 (find_free_slot): ... to here.
8928 (read_device_map): Use find_free_slot() to search for free slots.
8929
965c75ca 89302008-08-27 Marco Gerards <marco@gnu.org>
8931
8932 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
8933 (scsi_mod_SOURCES): New variable.
8934 (scsi_mod_CFLAGS): Likewise
8935 (scsi_mod_LDFLAGS): Likewise.
8936
8937 * disk/scsi.c: New file.
8938
8939 * include/grub/scsi.h: Likewise.
8940
8941 * include/grub/scsicmd.h: Likewise.
8942
8943 * disk/ata.c: Include <grub/scsi.h>.
8944 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
8945 instead.
8946 (grub_ata_iterate): Skip ATAPI devices.
8947 (grub_ata_open): Only handle ATAPI devices.
8948 (struct grub_atapi_read): Removed.
8949 (grub_atapi_readsector): Likewise.
8950 (grub_ata_read): No longer handle ATAPI devices.
8951 (grub_ata_write): Likewise.
8952 (grub_atapi_iterate): New function.
8953 (grub_atapi_read): Likewise.
8954 (grub_atapi_write): Likewise.
8955 (grub_atapi_open): Likewise.
8956 (grub_atapi_close): Likewise.
8957 (grub_atapi_dev): New variable.
8958 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
8959 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
8960
8961 * include/grub/disk.h (enum grub_disk_dev_id): Add
8962 `GRUB_DISK_DEVICE_SCSI_ID'.
8963
c07ae501 89642008-08-26 Robert Millan <rmh@aybabtu.com>
8965
8966 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
8967 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
8968 descriptive.
8969
5ed20adc 89702008-08-23 Bean <bean123ch@gmail.com>
8971
8972 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
8973 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8974 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
8975 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
8976 dm_nv.mod.
8977 (raid5rec_mod_SOURCES): New macro.
8978 (raid5rec_mod_CFLAGS): Likewise.
8979 (raid5rec_mod_LDFLAGS): Likewise.
8980 (raid6rec_mod_SOURCES): Likewise.
8981 (raid6rec_mod_CFLAGS): Likewise.
8982 (raid6rec_mod_LDFLAGS): Likewise.
8983 (mdraid_mod_SOURCES): Likewise.
8984 (mdraid_mod_CFLAGS): Likewise.
8985 (mdraid_mod_LDFLAGS): Likewise.
8986 (dm_nv_mod_SOURCES): Likewise.
8987 (dm_nv_mod_CFLAGS): Likewise.
8988 (dm_nv_mod_LDFLAGS): Likewise.
8989
8990 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
8991 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
8992 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8993
8994 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
8995 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
8996
8997 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8998
8999 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
9000
9001 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9002
9003 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9004
9005 * disk/raid5_recover.c: New file.
9006
9007 * disk/raid6_recover.c: Likewise.
9008
9009 * disk/mdraid_linux.c: Likewise.
9010
9011 * disk/dmraid_nvidia.c: Likewise.
9012
9013 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
9014 ULONG_MAX.
9015
9016 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
9017 calculate the size of raid device.
9018 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
9019 different layout of raid5.
9020 (grub_raid_scan_device): Remove code specific to mdraid.
9021 (grub_raid_list): New variable.
9022 (free_array): New function.
9023 (grub_raid_register): Likewise.
9024 (grub_raid_unregister): Likewise.
9025 (grub_raid_rescan): Likewise.
9026 (GRUB_MOD_INIT): Don't iterate device here.
9027 (GRUB_MOD_FINI): Use free_array to release resource.
9028
9029 * include/grub/raid.h: Remove macro and structure specific to mdraid.
9030 (grub_raid5_recover_func_t): New function variable type.
9031 (grub_raid6_recover_func_t): Likewise.
9032 (grub_raid5_recover_func): New variable.
9033 (grub_raid6_recover_func): Likewise.
9034 (grub_raid_register): New function.
9035 (grub_raid_unregister): Likewise.
9036 (grub_raid_rescan): Likewise.
9037 (grub_raid_block_xor): Likewise.
9038
9039 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
9040 (CMD_CRC): New macro.
9041 (part): Removed.
9042 (read_file): Handle device as well as file.
9043 (cmd_crc): New function.
9044 (fstest): Handle multiple disks.
9045 (options): Remove part, raw and long, add root and diskcount.
9046 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 9047 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 9048 add handling for the new options, support multiple disks.
9049
9050 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
9051
29c18915 90522008-08-23 Bean <bean123ch@gmail.com>
9053
9054 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
9055
9056 * genfslist.sh: Ignore kernel.mod.
9057
9058 * genpartmaplist.sh: Likewise.
9059
8415f261 90602008-08-23 Robert Millan <rmh@aybabtu.com>
9061
9062 * util/getroot.c (find_root_device): Skip anything that starts with
9063 a dot, not just directories. This avoids things like /dev/.tmp.md0.
9064
d5a7dc5b 90652008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 9066
d5a7dc5b 9067 * util/update-grub.in (GRUB_GFXMODE): Export variable.
9068 * util/grub.d/00_header.in: Allow the administrator to change default
9069 gfxmode via ${GRUB_GFXMODE}.
9070
380cfbb4 90712008-08-21 Felix Zielcke <fzielcke@z-51.de>
9072
9073 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
9074
c9baafe7 90752008-08-21 Robert Millan <rmh@aybabtu.com>
9076
9077 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
9078 loader.
9079 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
9080 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
9081
e290bef2 90822008-08-20 Carles Pina i Estany <carles@pina.cat>
9083
9084 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
9085 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
9086
f9dbfc96 90872008-08-19 Robert Millan <rmh@aybabtu.com>
9088
9089 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
9090 (struct grub_virtual_screen): Remove `cursor_color'.
9091 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
9092 initialization.
9093 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
9094
dd6bd6ab 90952008-08-18 Robert Millan <rmh@aybabtu.com>
9096
9097 Unify (identical) linux_normal.c files.
9098 * loader/i386/efi/linux_normal.c: Move from here ...
9099 * loader/linux_normal.c: ... to here. Update all users.
9100 * loader/i386/pc/linux_normal.c: Delete. Update all users.
9101 * loader/i386/ieee1275/linux_normal.c: Likewise.
9102
7f42f83e 91032008-08-18 Robert Millan <rmh@aybabtu.com>
9104
9105 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
9106 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
9107 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
9108 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
9109 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
9110 New macros.
9111 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
9112 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
9113 (GRUB_LINUX_CL_END_OFFSET): ... to here.
9114 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
9115 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
9116 (GRUB_EFI_CL_END_OFFSET): Rename to ...
9117 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
9118 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
9119 Initialize `params->video_cursor_x' and `params->video_cursor_y'
9120 portably using grub_getxy().
9121 Replace `-EFI' with `-bzImage' in boot message.
9122
38487ddb 91232008-08-17 Robert Millan <rmh@aybabtu.com>
9124
9125 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
9126
deceb3ec 91272008-08-17 Robert Millan <rmh@aybabtu.com>
9128
9129 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
9130
9131 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
9132 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
9133 (grub_machine_mmap_iterate): New function declaration.
9134 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
9135 structure.
9136 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
9137 macros.
9138
9139 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
9140 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
9141 Move e820 parsing from here ...
9142 * kern/i386/pc/mmap.c: New file.
9143 (grub_machine_mmap_iterate): ... to here.
9144
9145 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
9146 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
9147 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
9148 (grub_available_iterate): Redeclare to return `void', and redeclare
9149 its hook to use grub_uint64_t as addr and size parameters, and rename
9150 to ...
9151 (grub_machine_mmap_iterate): ... this. Update all users.
9152
9153 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
9154 to make it more readable. Rename to ...
9155 (grub_machine_mmap_iterate): ... this.
9156
9157 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
9158 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
9159 (grub_multiboot): Allocate an extra region after the payload, and fill
9160 it with a Multiboot memory map. Adjust a.out loader to calculate size
9161 with the extra space.
9162 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
9163 with the extra space.
9164
f8aa0f43 91652008-08-17 Carles Pina i Estany <carles@pina.cat>
9166
9807deb9 9167 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 9168
605f5bb6 91692008-08-17 Felix Zielcke <fzielcke@z-51.de>
9170
9171 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
9172 mdate-sh to the list `find' searches for.
9173 * DISTLIST: Regenerated.
9174
210db6c6 91752008-08-16 Felix Zielcke <fzielcke@z-51.de>
9176
9177 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
9178 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 9179 genmoddep.awk, gensymlist.sh.in.
9180 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 9181 * DISTLIST: Regenerated.
48cdbfd4 9182 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 9183
1082b929 91842008-08-16 Robert Millan <rmh@aybabtu.com>
9185
9186 * disk/raid.c (grub_raid_init): Handle/report errors set by
9187 grub_device_iterate().
9188 * disk/lvm.c (grub_lvm_init): Likewise.
9189
42ce5170 91902008-08-15 Bean <bean123ch@gmail.com>
9191
9192 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
9193 and datehook.mod.
9194 (datetime_mod_SOURCES): New macro.
9195 (datetime_mod_CFLAGS): Likewise.
9196 (datetime_mod_LDFLAGS): Likewise.
9197 (date_mod_SOURCES): Likewise.
9198 (date_mod_CFLAGS): Likewise.
9199 (date_mod_LDFLAGS): Likewise.
9200 (datehook_mod_SOURCES): Likewise.
9201 (datehook_mod_CFLAGS): Likewise.
9202 (datehook_mod_LDFLAGS): Likewise.
9203
9204 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
9205 and datehook.mod.
9206 (datetime_mod_SOURCES): New macro.
9207 (datetime_mod_CFLAGS): Likewise.
9208 (datetime_mod_LDFLAGS): Likewise.
9209 (date_mod_SOURCES): Likewise.
9210 (date_mod_CFLAGS): Likewise.
9211 (date_mod_LDFLAGS): Likewise.
9212 (datehook_mod_SOURCES): Likewise.
9213 (datehook_mod_CFLAGS): Likewise.
9214 (datehook_mod_LDFLAGS): Likewise.
9215
9216 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
9217 and datehook.mod.
9218 (datetime_mod_SOURCES): New macro.
9219 (datetime_mod_CFLAGS): Likewise.
9220 (datetime_mod_LDFLAGS): Likewise.
9221 (date_mod_SOURCES): Likewise.
9222 (date_mod_CFLAGS): Likewise.
9223 (date_mod_LDFLAGS): Likewise.
9224 (datehook_mod_SOURCES): Likewise.
9225 (datehook_mod_CFLAGS): Likewise.
9226 (datehook_mod_LDFLAGS): Likewise.
9227
9228 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
9229 and datehook.mod.
9230 (datetime_mod_SOURCES): New macro.
9231 (datetime_mod_CFLAGS): Likewise.
9232 (datetime_mod_LDFLAGS): Likewise.
9233 (date_mod_SOURCES): Likewise.
9234 (date_mod_CFLAGS): Likewise.
9235 (date_mod_LDFLAGS): Likewise.
9236 (datehook_mod_SOURCES): Likewise.
9237 (datehook_mod_CFLAGS): Likewise.
9238 (datehook_mod_LDFLAGS): Likewise.
9239
9240 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
9241 and datehook.mod.
9242 (datetime_mod_SOURCES): New macro.
9243 (datetime_mod_CFLAGS): Likewise.
9244 (datetime_mod_LDFLAGS): Likewise.
9245 (date_mod_SOURCES): Likewise.
9246 (date_mod_CFLAGS): Likewise.
9247 (date_mod_LDFLAGS): Likewise.
9248 (datehook_mod_SOURCES): Likewise.
9249 (datehook_mod_CFLAGS): Likewise.
9250 (datehook_mod_LDFLAGS): Likewise.
9251
9252 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
9253
9254 * commands/date.c: New file.
9255
9256 * hook/datehook.c: Likewise.
9257
9258 * include/grub/lib/datetime.h: Likewise.
9259
9260 * include/grub/i386/cmos.h: Likewise.
9261
9262 * lib/datetime.c: Likewise.
9263
9264 * lib/i386/datetime.c: Likewise.
9265
9266 * lib/efi/datetime.c: Likewise.
9267
0e9242da 92682008-08-14 Robert Millan <rmh@aybabtu.com>
9269
9270 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
9271 (grub_mkelfimage_SOURCES): New variable.
9272 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
9273
9274 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
9275 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
9276 * conf/powerpc-ieee1275.rmk: Likewise.
9277 * conf/i386-ieee1275.rmk: Likewise.
9278
9279 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
9280 * kern/i386/coreboot/init.c: Likewise.
9281
9282 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
9283 with `<grub/cpu/kernel.h>'.
9284 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
9285 to ...
9286 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
9287 * kern/i386/coreboot/startup.S: Likewise.
9288
9289 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
9290 (GRUB_MOD_GAP): Remove.
9291 * include/grub/powerpc/kernel.h: New file.
9292 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
9293 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
9294 * include/grub/i386/kernel.h: New file.
9295 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
9296 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
9297 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
9298
9299 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
9300 `grub-mkelfimage'.
9301 Use --directory when invoking grub_mkimage.
9302
9303 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
9304 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
9305 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
9306 and GRUB_KERNEL_CPU_PREFIX.
9307
b86408f8 93082008-08-14 Felix Zielcke <fzielcke@z-51.de>
9309
d5e619ca 9310 * include/grub/err.h (grub_err_printf): New function prototype.
9311 * util/misc.c (grub_err_printf): New function.
9312 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
9313 grub_printf.
9314 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 9315
7161f0e0 93162008-08-13 Robert Millan <rmh@aybabtu.com>
9317
9318 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
9319
a1967522 93202008-08-13 Robert Millan <rmh@aybabtu.com>
9321
9322 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
9323 boot entry.
9324
371458b5 93252008-08-12 Robert Millan <rmh@aybabtu.com>
9326
9327 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
9328 of the relocation code from here ...
9329 (grub_multiboot): ... to here.
9330 (forward_relocator, backward_relocator): Move from here ...
9331 * kern/i386/loader.S (grub_multiboot_forward_relocator)
9332 (grub_multiboot_backward_relocator): ... to here.
9333 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
9334 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
9335 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
9336 (grub_multiboot_forward_relocator_end)
9337 (grub_multiboot_backward_relocator)
9338 (grub_multiboot_backward_relocator_end): New variables.
9339
05f9452b 93402008-08-12 Bean <bean123ch@gmail.com>
9341
9342 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
9343
20024ab0 93442008-08-11 Robert Millan <rmh@aybabtu.com>
9345
9346 * kern/i386/linuxbios/startup.S: Move from here ...
9347 * kern/i386/coreboot/startup.S: ... to here.
9348
9349 * kern/i386/linuxbios/init.c: Move from here ...
9350 * kern/i386/coreboot/init.c: ... to here.
9351
9352 * kern/i386/linuxbios/table.c: Move from here ...
9353 * kern/i386/coreboot/mmap.c: ... to here.
9354
9355 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
9356
e352e9cd 93572008-08-11 Robert Millan <rmh@aybabtu.com>
9358
9359 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
9360 errors. Leave it to the upper layer to handle them.
9361
2d05bc6a 93622008-08-09 Christian Franke <franke@computer.org>
9363
9364 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
9365 * conf/common.rmk: Install `grub-pe2elf' only if requested.
9366 Install `grub.d/10_windows' only on Cygwin.
9367 * configure.ac: Add subst of `target_os'.
9368 Check `target_os' also before setting TARGET_OBJ2ELF.
9369 Add `--enable-grub-pe2elf'.
9370
042bd419 93712008-08-08 Robert Millan <rmh@aybabtu.com>
9372
9373 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
9374 (grub_last_time): Change type to grub_uint64_t.
9375 (grub_disk_open): Migrate code from to using grub_get_time_ms().
9376 (grub_disk_close): Likewise.
9377
9378 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
9379 (run_menu): Migrate code from to using grub_get_time_ms().
9380
9381 * util/misc.c (grub_get_time_ms): New function.
9382
7f280db5 93832008-08-08 Marco Gerards <marco@gnu.org>
9384
9385 * disk/ata.c (grub_ata_regget): Change return type to
9386 `grub_uint8_t'.
9387 (grub_ata_regget2): Likewise.
9388 (grub_ata_wait_status): New function.
9389 (grub_ata_wait_busy): Removed function, updated all users to use
9390 `grub_ata_wait_status'.
9391 (grub_ata_wait_drq): Likewise.
9392 (grub_ata_cmd): New function.
9393 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
9394 error handling.
9395 (grub_ata_pio_write): Add error handling.
9396 (grub_atapi_identify): Likewise.
9397 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
9398 handling.
9399 (grub_ata_identify): Use `grub_ata_cmd' and improve error
9400 handling. Actually use the detected registers. Reorder the
9401 detection logic such that it is easier to read.
9402 (grub_ata_pciinit): Do not assign the same ID to each controller.
9403 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
9404 handling.
9405 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
9406
9407 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
9408
1fbc5e66 94092008-08-08 Marco Gerards <marco@gnu.org>
9410
9411 * NEWS: Update.
9412
819ce6c0 94132008-08-07 Bean <bean123ch@gmail.com>
9414
9415 * include/grub/x86_64/pci.h: New file.
9416
5c41d44d 94172008-08-07 Christian Franke <franke@computer.org>
9418
9419 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
9420 (TIMER2_GATE): Likewise.
9421 (grub_pit_wait): Add enable/disable of the timer2 gate
9422 bit of port 0x61. This fixes a possible infinite loop.
9423
5ebc275d 94242008-08-07 Bean <bean123ch@gmail.com>
9425
9426 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
9427 kern/i386/tsc.c and kern/i386/pit.c.
9428
9429 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
9430 x86_64 platform.
9431
9432 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
9433 <grub/i386/tsc.h>.
9434
9435 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
9436
e383b3d0 94372008-08-07 Bean <bean123ch@gmail.com>
9438
9439 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
9440
9441 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
9442
9443 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
9444 multiple inclusion. Add #include <grub/types.h>.
9445
1cbb58ac 94462008-08-06 Christian Franke <franke@computer.org>
9447
9448 * conf/common.rmk: Build and install `10_windows'.
9449 * util/grub.d/10_windows.in: New script.
9450
337f5a1e 94512008-08-06 Pavel Roskin <proski@gnu.org>
9452
9453 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
9454
057bc4ac 94552008-08-06 Robert Millan <rmh@aybabtu.com>
9456
9457 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
9458 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
9459
2b99f123 94602008-08-06 Bean <bean123ch@gmail.com>
9461
9462 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
9463 (grub_pxefs_fs_int): Remove dummy definition.
9464 (grub_pxefs_open): Use data->block_size to store the current block
9465 size setting.
9466 (grub_pxefs_read): Use block size stored in data->block_size. As the
9467 value of grub_pxe_blksize can be changed after the file is opened.
9468
9f0234cb 94692008-08-06 Bean <bean123ch@gmail.com>
9470
9471 * fs/i386/pc/pxe.c (curr_file): new variable.
9472 (grub_pxefs_open): Simply the handling of pxe file system. Don't
9473 require the dummy internal file system anymore.
9474 (grub_pxefs_read): Removed.
9475 (grub_pxefs_close): Likewise.
9476 (grub_pxefs_fs_int): Likewise.
9477 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
9478 connection when we switch file.
9479 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
9480
a55d42e0 94812008-08-06 Robert Millan <rmh@aybabtu.com>
9482
9483 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
9484 `halt.mod'.
9485 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
9486 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
9487
9488 * kern/i386/halt.c: New file.
9489 * kern/i386/reboot.c: Likewise.
9490 * include/grub/i386/reboot.h: Likewise.
9491 * include/grub/i386/halt.h: Likewise.
9492
9493 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
9494 Include `<grub/cpu/halt.h>'.
9495 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
9496 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
9497
9498 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
9499 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
9500 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
9501 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
9502 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
9503 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
9504 from here ...
9505 * include/grub/i386/at_keyboard.h: ... to here.
9506
24371d26 95072008-08-05 Robert Millan <rmh@aybabtu.com>
9508
9509 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
9510 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
9511 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
9512 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
9513 `kern/generic/millisleep.c'.
9514
9515 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
9516 instead of grub_get_rtc().
9517 (grub_tsc_init): Initialize `tsc_boot_time'.
9518
9519 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
9520 (grub_machine_init): Use grub_tsc_init() rather than
9521 installing an RTC-based handler via grub_install_get_time_ms().
9522
9523 * kern/i386/pit.c: New file.
9524 * include/grub/i386/pit.h: Likewise.
9525
9e7007b3 95262008-08-05 Bean <bean123ch@gmail.com>
9527
9528 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
9529
9530 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
9531 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
9532 (pxe_mod_SOURCES): New macro.
9533 (pxe_mod_CFLAGS): Likewise.
9534 (pxe_mod_LDFLAGS): Likewise.
9535 (pxecmd_mod_SOURCES): Likewise.
9536 (pxecmd_mod_CFLAGS): Likewise.
9537 (pxecmd_mod_LDFLAGS): Likewise.
9538
9539 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
9540 (grub_pxe_call): Likewise.
9541
9542 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
9543
9544 * commands/i386/pc/pxecmd.c: New file.
9545
9f0234cb 9546 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 9547
9548 * include/grub/i386/pc/pxe.h: Likewise.
9549
6977d49f 95502008-08-05 Bean <bean123ch@gmail.com>
9551
9552 * util/console.c (grub_console_cur_color): New variable.
9553 (grub_console_standard_color): Likewise.
9554 (grub_console_normal_color): Likewise.
9555 (grub_console_highlight_color): Likewise.
9556 (color_map): Likewise.
9557 (use_color): Likewise.
9558 (NUM_COLORS): New macro.
9559 (grub_ncurses_setcolorstate): Handle color properly.
9560 (grub_ncurses_setcolor): Don't change color here, just remember the
9561 settings, color will be set in grub_ncurses_setcolorstate.
9562 (grub_ncurses_getcolor): New function.
9563 (grub_ncurses_init): Initialize color pairs.
9564 (grub_ncurses_term): New member grub_ncurses_getcolor.
9565
9c2ff3ee 95662008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 9567
9c2ff3ee 9568 High resolution timer support. Implemented for x86 CPUs using TSC.
9569 Extracted generic grub_millisleep() so it's linked in only as needed.
9570 This requires a Pentium compatible CPU; if the RDTSC instruction is
9571 not supported, then it falls back on the generic grub_get_time_ms()
9572 implementation that uses the machine's RTC.
9573
9574 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
9575 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
9576 `kern/generic/millisleep.c'.
9577
9578 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
9579 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
9580
9581 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
9582 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
9583
9584 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
9585
9586 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
9587 `kern/generic/millisleep.c'.
9588
9589 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
9590
9591 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
9592
9593 * kern/generic/rtc_get_time_ms.c: New file.
9594
9595 * kern/generic/millisleep.c: New file.
337f5a1e 9596
9c2ff3ee 9597 * kern/misc.c: Don't include
9598 <kern/time.h> anymore.
9599 (grub_millisleep_generic): Removed.
9600
9601 * commands/sleep.c (grub_interruptible_millisleep): Uses
9602 grub_get_time_ms() instead of grub_get_rtc().
9603
9604 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
9605 function.
9606 (grub_cpu_is_cpuid_supported): New inline function.
9607 (grub_cpu_is_tsc_supported): New inline function.
9608 (grub_tsc_init): New function prototype.
9609 (grub_tsc_get_time_ms): New function prototype.
9610
9611 * kern/i386/tsc.c (grub_get_time_ms): New file.
9612
9613 * include/grub/time.h: Include <grub/types.h.
9614 (grub_millisleep_generic): Removed.
9615 (grub_get_time_ms): New prototype.
9616 (grub_install_get_time_ms): New prototype.
9617 (grub_rtc_get_time_ms): New prototype.
9618
9619 * kern/time.c (grub_get_time_ms): New function.
9620 (grub_install_get_time_ms): New function.
9621
9622 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
9623 <grub/time.h> anymore.
9624 (grub_millisleep): Removed.
9625 (grub_machine_init): Call grub_tsc_init.
9626
9627 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
9628 get_time_ms() implementation.
9629
9630 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
9631 (ieee1275_get_time_ms): New function.
9632 (grub_machine_init): Install get_time_ms() implementation.
9633
9634 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
9635 (grub_machine_init): Call grub_tsc_init().
9636 (grub_millisleep): Removed.
bf06a93f 9637
9c2ff3ee 9638 * kern/ieee1275/init.c (grub_millisleep): Removed.
9639 (grub_machine_init): Install ieee1275_get_time_ms()
9640 implementation.
9641 (ieee1275_get_time_ms): New function.
9642 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
9643 real work.
9644
9ec92aaf 96452008-08-05 Marco Gerards <marco@gnu.org>
9646
9647 * disk/ata.c: Include <grub/pci.h>.
9648 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
9649 (grub_ata_initialize): Rewritten.
9650 (grub_ata_device_initialize): New function.
9651
8d23f507 96522008-08-04 Pavel Roskin <proski@gnu.org>
9653
9654 * kern/main.c: Include grub/mm.h.
9655
5e15ee3d 96562008-08-04 Robert Millan <rmh@aybabtu.com>
9657
9658 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
9659 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
9660 corruption problem).
9661
a9053f8f 96622008-08-04 Robert Millan <rmh@aybabtu.com>
9663
9664 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
9665 warnings introduced in my last commit.
9666
dd19c7d7 96672008-08-03 Robert Millan <rmh@aybabtu.com>
9668
9669 Make PCI available on all i386 architectures.
9670
9671 * include/grub/i386/pc/pci.h: Move from here ...
9672 * include/grub/i386/pci.h: ... to here.
9673
9674 * include/grub/i386/pc/pci.h: Remove.
9675 * include/grub/i386/efi/pci.h: Remove.
9676 * include/grub/x86_64/efi/pci.h: Remove.
9677
9678 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
9679 `<grub/cpu/pci.h>'.
9680
9681 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
9682 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
9683 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
9684
9685 * conf/i386-ieee1275.rmk: Likewise.
9686
e14a6184 96872008-08-03 Robert Millan <rmh@aybabtu.com>
9688
9689 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
9690 (grub_console_setcursor): Make it possible to set cursor off.
9691
52768e37 96922008-08-03 Robert Millan <rmh@aybabtu.com>
9693
9694 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
9695 of modules instead of assuming which platform provides what.
9696 * util/update-grub.in: Likewise.
9697
2d52f57f 96982008-08-03 Robert Millan <rmh@aybabtu.com>
9699
9700 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
9701 instead of `grub_install_dos_part' to determine whether a drive needs
9702 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 9703 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 9704
2a5cd121 97052008-08-02 Robert Millan <rmh@aybabtu.com>
9706
9707 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
9708
93808428 97092008-08-02 Robert Millan <rmh@aybabtu.com>
9710
9711 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
9712 of informational grub_dprintf() calls.
9713
3bd0a12a 97142008-08-02 Robert Millan <rmh@aybabtu.com>
9715
9716 * disk/memdisk.c (memdisk_size): Don't initialize.
9717 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
9718
9719 * include/grub/i386/pc/kernel.h
9720 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
9721 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
9722 (grub_memdisk_image_size, grub_arch_memdisk_addr)
9723 (grub_arch_memdisk_size): Remove.
9724
9725 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
9726 field (was only used to transfer a constant). Add `type' field to
9727 support multiple module types.
9728 (grub_module_iterate): New function.
9729
9730 * kern/device.c (grub_device_open): Do not hide error messages
9731 when grub_disk_open() fails. Use grub_print_error() instead.
9732
9733 * kern/i386/pc/init.c (grub_arch_modules_addr)
9734 (grub_arch_memdisk_size): Remove functions.
9735 (grub_arch_modules_addr): Return the module address in high memory
9736 (now that it isn't copied anymore).
9737
9738 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
9739 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
9740 decompression routine (grub_total_module_size already includes that
9741 now). Don't copy modules back to low memory.
9742
9743 * kern/main.c: Include `<grub/mm.h>'.
9744 (grub_load_modules): Split out (and use) ...
9745 (grub_module_iterate): ... this function, which iterates through
9746 module objects and runs a hook.
9747 Comment out grub_mm_init_region() call, as it would cause non-ELF
9748 modules to be overwritten.
9749
9750 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
9751 the memdisk image in its own region, make it part of the module list.
9752 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
9753 (main): Parse --memdisk|-m option, and pass user-provided path as
9754 parameter to generate_image().
9755 (add_segments): Pass `memdisk_path' down to load_modules().
9756 (load_modules): Embed memdisk image in module section when requested.
9757 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
9758 `header.type' instead of `header.offset'.
9759
9760 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
9761 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
9762 (memdisk_mod_LDFLAGS): New variables.
9763 * conf/i386-coreboot.rmk: Likewise.
9764 * conf/i386-ieee1275.rmk: Likewise.
9765
a927cc73 97662008-08-02 Robert Millan <rmh@aybabtu.com>
9767
9768 * loader/i386/pc/multiboot.c (playground, forward_relocator)
9769 (backward_relocator): New variables. Used to allocate and relocate
9770 the payload, respectively.
9771 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 9772 address, install the appropriate relocator code in each bound of
a927cc73 9773 the payload, and set the entry point such that
9774 grub_multiboot_real_boot() will jump to one of them.
9775
9776 * kern/i386/loader.S (grub_multiboot_payload_size)
9777 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
9778 (grub_multiboot_payload_entry_offset): New variables.
9779 (grub_multiboot_real_boot): Set cpu context to what the relocator
9780 expects, and jump to the relocator instead of the payload.
9781
9782 * include/grub/i386/loader.h (grub_multiboot_payload_size)
9783 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
9784 (grub_multiboot_payload_entry_offset): Export.
9785
b15d8a0c 97862008-08-01 Bean <bean123ch@gmail.com>
9787
9788 * normal/menu_entry.c (editor_getline): Don't return the original
9789 string as result, as it will be released by lexer once it has done
9790 using it.
9791
cdfb3d22 97922008-08-01 Robert Millan <rmh@aybabtu.com>
9793
9794 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
9795 within menuentries, not before them.
9796 util/grub.d/10_hurd.in: Likewise.
9797
9175e93d 97982008-08-01 Bean <bean123ch@gmail.com>
9799
9800 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
9801 (bufio_mod_SOURCES): New macro.
9802 (bufio_mod_CFLAGS): Likewise.
9803 (bufio_mod_LDFLAGS): Likewise.
9804
9805 * include/grub/bufio.h: New file.
9806
9807 * io/bufio.c: Likewise.
9808
9809 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
9810 (grub_video_reader_png): Use grub_buffile_open to open file.
9811
9812 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
9813 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
9814
9815 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
9816 (grub_video_reader_tga): Use grub_buffile_open to open file.
9817
9818 * font/manager.c: Include <grub/bufio.h>.
9819 (add_font): Use grub_buffile_open to open file.
9820
3d8383e7 98212008-07-31 Robert Millan <rmh@aybabtu.com>
9822
9823 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
9824 ELF segments, use a macro for arbitrarily accessing any of them instead
9825 of preparing a pointer that allows access to one at a time.
9826 (grub_multiboot_load_elf64): Likewise.
9827
16e641b6 98282008-07-31 Bean <bean123ch@gmail.com>
9829
9830 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
9831 GRUB_KERNEL_MACHINE_DATA_END.
9832
59198b72 98332008-07-30 Robert Millan <rmh@aybabtu.com>
9834
9835 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
9836 Increase from 0x50 to 0x60.
9837 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
9838 use UUIDs to identify the root drive for them. If that's not
9839 possible, abort.
9840 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
9841 check, for cross-disk installs.
9842
ae88bca3 98432008-07-30 Robert Millan <rmh@aybabtu.com>
9844
9845 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
9846 is non-empty, use it to set the `prefix' environment variable instead
9847 of the usual approach.
9848 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
9849 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
9850 environment variable instead of dummy make_install_device().
9851
9852 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
9853 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 9854 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 9855
9856 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
9857 New variable reference.
9858 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
9859 New macro. Defines offset of `grub_prefix' within startup.S (relative
9860 to `start').
9861 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
9862 section within startup.S (relative to `start').
9863 * include/grub/i386/coreboot/kernel.h: Likewise.
9864
9865 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
9866 Overwrite grub_prefix with its contents, at the beginning of the
9867 first segment.
9868 (main): Understand -p|--prefix.
9869
14f41dd1 98702008-07-30 Robert Millan <rmh@aybabtu.com>
9871
9872 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
9873
4ca049a3 98742008-07-30 Robert Millan <rmh@aybabtu.com>
9875
9876 * term/i386/pc/vga_text.c (grub_console_cls): Use
9877 grub_console_gotoxy() to go back to beginning of the screen.
9878 Found by Patrick Georgi <patrick.georgi@coresystems.de>
9879
2921d337 98802008-07-29 Christian Franke <franke@computer.org>
9881
9882 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9883 Add conversion of emulated mount points on Cygwin.
9884
b609876d 98852008-07-29 Christian Franke <franke@computer.org>
9886
9887 * util/update-grub.in: Add a check for admin
9888 group on Cygwin.
9889 Remove old `grub.cfg.new' before creation.
9890 Add `-f' to `mv' to handle the different filesystem
9891 semantics of Windows.
9892
e93e4679 98932008-07-29 Bean <bean123ch@gmail.com>
9894
9895 * normal/main.c (get_line): Fix buffer overflow bug.
9896
41694fd0 98972008-07-28 Robert Millan <rmh@aybabtu.com>
9898
9899 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
9900 (struct grub_apple_header): New struct. Describes the layout of
9901 the partmap header.
9902 (apple_partition_map_iterate): Check the header magic as well as the
9903 partition magic (which was already being checked).
9904
cfd0b4e6 99052008-07-28 Pavel Roskin <proski@gnu.org>
9906
9907 * genmk.rb: Add a warning to the beginning of the output that
9908 it's a generated file and should not be edited.
9909
93cce016 99102008-07-28 Robert Millan <rmh@aybabtu.com>
9911
9912 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
9913 with the same number are found, just use issue a warning with
9914 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 9915
cd1df915 99162008-07-27 Robert Millan <rmh@aybabtu.com>
9917
9918 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
9919 information.
9920
b70a8427 99212008-07-27 Bean <bean123ch@gmail.com>
9922
9923 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
9924 (grub_fat_find_dir): Ignore case when comparing filename.
9925
8f5e379f 99262008-07-27 Bean <bean123ch@gmail.com>
9927
9928 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
9929 smallino, as it's more descriptive, and i8count can be confused with
9930 the other field count.
9931 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
9932 inode type.
9933
a85cd5a0 99342008-07-27 Bean <bean123ch@gmail.com>
9935
9936 * commands/crc.c: New file.
9937
9938 * lib/crc.c: Likewise.
9939
9940 * include/grub/lib/crc.h: Likewise.
9941
9942 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
9943
9944 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
9945 (hexdump): Move this function to ...
9946
9947 * lib/hexdump.c: ... here.
9948
9949 * include/grub/hexdump.h: Renamed to ...
9950
9951 * include/grub/lib/hexdump.h: ... this.
9952
9953 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
9954
9955 * util/grub-editenv.c: Likewise.
9956
9957 * include/envblk.h: Renamed to ...
9958
9959 * include/lib/envblk.h: ... this.
9960
9961 * util/envblk.c: Renamed to ...
9962
9963 * lib/envblk.c: ... this.
9964
9965 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
9966 lib/hexdump.c.
9967 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
9968 (pkglib_MODULES): Add crc.mod.
9969 (hexdump_mod_SOURCES): Add lib/hexdump.c.
9970 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
9971 (crc_mod_SOURCES): New macro.
9972 (crc_mod_CFLAGS): Likewise.
9973 (crc_mod_LDFLAGS): Likewise.
9974
9975 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
9976
9977 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9978
9979 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9980
9981 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9982
9983 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
9984
c298def0 99852008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 9986
9987 * commands/help.c: Include <grub/term.h>.
9988 (TERM_WIDTH): Removed. Updated all users.
9989
cc349fb3 99902008-07-27 Pavel Roskin <proski@gnu.org>
9991
9992 * util/getroot.c (find_root_device): Rephrase a comment to avoid
9993 spurious warnings about a comment within a comment.
9994
9051607e 99952008-07-25 Robert Millan <rmh@aybabtu.com>
9996
9997 * util/getroot.c (find_root_device): Skip devices that match
9998 /dev/dm-[0-9]. This lets the real device be found for any type of
9999 abstraction (LVM, EVMS, RAID..).
10000 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
10001 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
10002 device is found first, find_root_device() will now skip it.
10003
01453bfc 100042008-07-24 Pavel Roskin <proski@gnu.org>
10005
10006 * include/grub/types.h: Use __builtin_bswap32() and
10007 __builtin_bswap64() with gcc 4.3 and newer.
10008
6af9849f 100092008-07-24 Christian Franke <franke@computer.org>
10010
3a0fa256 10011 * util/i386/pc/grub-install.in: If `--debug' is specified,
10012 pass `--verbose' to grub-setup.
10013 Abort script if make_system_path_relative_to_its_root() fails.
10014
7810e747 100152008-07-24 Bean <bean123ch@gmail.com>
10016
10017 * configure.ac: Fixed a bug caused by the previous cygwin patch,
10018 variable `target_platform' should be `platform'.
10019
42290e17 100202008-07-24 Bean <bean123ch@gmail.com>
10021
51cc5193 10022 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 10023 (grub_png_init_fixed_block): New function.
10024 (grub_png_decode_image_data): Handle fixed huffman code compression.
10025
2a8a80e4 100262008-07-24 Bean <bean123ch@gmail.com>
10027
10028 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
10029 (grub_pe2elf_SOURCES): New macro.
10030 (CLEANFILES): Add grub-pe2elf.
10031
10032 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
10033 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
10034 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
10035 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
10036 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
10037 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
10038 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
10039 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
10040 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
10041 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
10042 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
10043 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
10044 (GRUB_PE32_DT_FUNCTION): Likewise.
10045 (GRUB_PE32_REL_I386_DIR32): Likewise.
10046 (GRUB_PE32_REL_I386_REL32): Likewise.
10047 (grub_pe32_symbol): New structure.
10048 (grub_pe32_reloc): Likewise.
10049
10050 * util/grub-pe2elf.c: New file.
10051
10052 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
10053 start symbol in non pc platform.
10054
10055 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
10056
10057 The following patches are from Christian Franke.
10058
10059 * include/grub/dl.h: Remove .previous, gas supports this only
10060 for ELF format.
10061
10062 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
10063 Remove .type, gas supports this only for ELF format.
10064
10065 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
10066 nullbytes in symbol table. This fixes an infinite loop if table is
10067 zero filled.
10068
10069 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
10070 TARGET_IMG_LDFLAGS and EXEEXT.
10071
10072 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
10073 TARGET_IMG_LDFLAGS_AC.
10074 (grub_CHECK_STACK_ARG_PROBE): New function.
10075
10076 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
10077
10078 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
10079
10080 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
10081 to set TARGET_IMG_LD* accordingly.
10082 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
10083 Add call to grub_CHECK_STACK_ARG_PROBE.
10084 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
10085
10086 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
10087
10088 * genmk.rb: Add EXEEXT to CLEANFILES.
10089
12ccdb75 100902008-07-23 Robert Millan <rmh@aybabtu.com>
10091
10092 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
10093 define the codes for arrows and lines used for the menu).
10094 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
10095 as well.
10096
10097 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
10098 fonts, because the latter are too slow.
10099
18eeaf04 101002008-07-21 Bean <bean123ch@gmail.com>
10101
10102 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
10103 a20. Run keyboard test last, as it will cause macbook to halt.
10104
b095e2ad 101052008-07-18 Pavel Roskin <proski@gnu.org>
10106
10107 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
10108 load foreign architecture modules correctly anyway. Keep
10109 support for loading host architecture modules, whether we
10110 compile them or not.
10111
737feb35 101122008-07-17 Pavel Roskin <proski@gnu.org>
10113
3f4ce737 10114 * configure.ac: Use -m32 or -m64 regardless of whether we had to
10115 change target_cpu. The compiler default can mismatch target_cpu
10116 in any case.
10117
4ad2d049 10118 * disk/efi/efidisk.c: Fix format warnings on x86_64.
10119 * kern/efi/efi.c: Likewise.
10120
f6130a12 10121 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
10122 target compiler is functional.
10123 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
10124 are set up.
10125
58393a2d 10126 * configure.ac: Default to efi platform for x86_64-apple. Allow
10127 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
10128 adjustments from the rest, only do them if target is not
10129 explicitly given. Merge other adjustments with the final sanity
10130 check. Remove an extraneous check for supported CPU. Be
10131 specific which CPU and which platform is not supported.
10132
737feb35 10133 * configure.ac: Default to pc platform for x86_64.
10134
546f966a 101352008-07-17 Robert Millan <rmh@aybabtu.com>
10136
10137 Partial LinuxBIOS -> Coreboot rename.
10138
10139 * conf/i386-linuxbios.rmk: Renamed to ...
10140 * conf/i386-coreboot.rmk: ... this.
10141 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
10142 * configure.ac: Accept "coreboot" as input platform (but maintain
10143 compatibility with "linuxbios").
10144 * include/grub/i386/linuxbios: Renamed to ...
10145 * include/grub/i386/coreboot: ... this.
10146
20011694 101472008-07-17 Bean <bean123ch@gmail.com>
10148
10149 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 10150 (appleldr_mod_SOURCE): New variable.
20011694 10151 (appleldr_mod_CFLAGS): Likewise.
10152 (appleldr_mod_LDFLAGS): Likewise.
10153 (pci_mod_SOURCES): Likewise.
10154 (pci_mod_CFLAGS): Likewise.
10155 (pci_mod_LDFLAGS): Likewise.
10156 (lspci_mod_SOURCES): Likewise.
10157 (lspci_mod_CFLAGS): Likewise.
10158 (lspci_mod_LDFLAGS): Likewise.
10159
10160 * conf/x86_64-efi.rmk: New file.
10161
10162 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
10163 macro.
10164 (grub_efidisk_write): Likewise.
10165
10166 * include/efi/api.h (efi_call_0): New macro.
10167 (efi_call_1): Likewise.
10168 (efi_call_2): Likewise.
10169 (efi_call_3): Likewise.
10170 (efi_call_4): Likewise.
10171 (efi_call_5): Likewise.
10172 (efi_call_6): Likewise.
10173
10174 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
10175 grub_rescue_cmd_chainloader.
10176
10177 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
10178 (grub_pe32_optional_header): Change some fields based on i386 or
10179 x86_64 platform.
10180 (GRUB_PE32_PE32_MAGIC): Likewise.
10181
10182 * include/grub/efi/uga_draw.h: New file.
10183
10184 * include/grub/elf.h (STN_ABS): New constant.
10185 (R_X86_64_NONE): Relocation constant for x86_64.
10186 (R_X86_64_64): Likewise.
10187 (R_X86_64_PC32): Likewise.
10188 (R_X86_64_GOT32): Likewise.
10189 (R_X86_64_PLT32): Likewise.
10190 (R_X86_64_COPY): Likewise.
10191 (R_X86_64_GLOB_DAT): Likewise.
10192 (R_X86_64_JUMP_SLOT): Likewise.
10193 (R_X86_64_RELATIVE): Likewise.
10194 (R_X86_64_GOTPCREL): Likewise.
10195 (R_X86_64_32): Likewise.
10196 (R_X86_64_32S): Likewise.
10197 (R_X86_64_16): Likewise.
10198 (R_X86_64_PC16): Likewise.
10199 (R_X86_64_8): Likewise.
10200 (R_X86_64_PC8): Likewise.
10201
10202 * include/grub/i386/efi/pci.h: New file.
10203
10204 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
10205 Change it value based on platform.
10206 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
10207 (GRUB_E820_RAM): Likewise.
10208 (GRUB_E820_RESERVED): Likewise.
10209 (GRUB_E820_ACPI): Likewise.
10210 (GRUB_E820_NVS): Likewise.
10211 (GRUB_E820_EXEC_CODE): Likewise.
10212 (GRUB_E820_MAX_ENTRY): Likewise.
10213 (grub_e820_mmap): New structure.
10214 (linux_kernel_header): Change the efi field according to different
10215 kernel version, also field from linux_kernel_header.
10216
10217 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
10218
10219 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
10220 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
10221 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
10222 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
10223 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
10224 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
10225 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
10226 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
10227 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
10228 (GRUB_PCI_ADDR_IO_MASK): Likewise.
10229
10230 * include/grub/x86_64/efi/kernel.h: New file.
10231
10232 * include/grub/x86_64/efi/loader.h: Likewise.
10233
10234 * include/grub/x86_64/efi/machine.h: Likewise.
10235
10236 * include/grub/x86_64/efi/pci.h: Likewise.
10237
10238 * include/grub/x86_64/efi/time.h: Likewise.
10239
10240 * include/grub/x86_64/linux.h: Likewise.
10241
10242 * include/grub/x86_64/setjmp.h: Likewise.
10243
10244 * include/grub/x86_64/time.h: Likewise.
10245
10246 * include/grub/x86_64/types.h: Likewise.
10247
10248 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
10249 GRUB_TARGET_SIZEOF_VOID_P.
10250
10251 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
10252 (grub_efi_locate_handle): Likewise.
10253 (grub_efi_open_protocol): Likewise.
10254 (grub_efi_set_text_mode): Likewise.
10255 (grub_efi_stall): Likewise.
10256 (grub_exit): Likewise.
10257 (grub_reboot): Likewise.
10258 (grub_halt): Likewise.
10259 (grub_efi_exit_boot_services): Likewise.
10260 (grub_get_rtc): Likewise.
10261
10262 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
10263 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
10264 (grub_efi_allocate_pages): Wrap efi calls.
10265 (grub_efi_free_pages): Wrap efi calls.
10266 (grub_efi_get_memory_map): Wrap efi calls.
10267
10268 * kern/x86_64/dl.c: New file.
10269
10270 * kern/x86_64/efi/callwrap.S: Likewise.
10271
10272 * kern/x86_64/efi/startup.S: Likewise.
10273
10274 * loader/efi/appleloader.c: Likewise.
10275
10276 * loader/efi/chainloader.c (cmdline): New variable.
10277 (grub_chainloader_unload): Wrap efi calls.
10278 (grub_chainloader_boot): Likewise.
10279 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
10280 command line.
10281
10282 * loader/efi/chainloader_normal.c (chainloader_command):
10283 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
10284 command line.
10285
10286 * loader/i386/efi/linux.c (allocate_pages): Change allocation
10287 method.
10288 (grub_e820_add_region): New function.
10289 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
10290 booting.
10291 (grub_find_video_card): New function.
10292 (grub_linux_setup_video): New function.
10293 (grub_rescue_cmd_linux): Probe for video information.
10294
10295 * normal/x86_64/setjmp.S: New file.
10296
10297 * term/efi/console.c (map_char): New function.
10298 (grub_console_putchar): Map unicode char.
10299 (grub_console_checkkey): Wrap efi calls.
10300 (grub_console_getkey): Likewise.
10301 (grub_console_getwh): Likewise.
10302 (grub_console_gotoxy): Likewise.
10303 (grub_console_cls): Likewise.
10304 (grub_console_setcolorstate): Likewise.
10305 (grub_console_setcursor): Likewise.
10306
10307 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
10308
59652a20 103092008-07-16 Pavel Roskin <proski@gnu.org>
10310
ef294055 10311 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
10312 format strings.
10313
59652a20 10314 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
10315 pointer, not an integer. This fixes a warning and prevents
10316 precision loss on 64-bit systems.
10317 (relocate_addresses): Remove unneeded cast.
10318
afc3b5d7 103192008-07-15 Pavel Roskin <proski@gnu.org>
10320
506b2b3e 10321 * kern/i386/ieee1275/init.c: Include grub/cache.h.
10322
62ead89c 10323 * term/ieee1275/ofconsole.c: Disable code unused on i386.
10324
c4cd51d7 10325 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
10326 Fix comparison between signed and unsigned.
10327
0d3d8f28 10328 * include/grub/i386/ieee1275/console.h: Declare
10329 grub_console_init() and grub_console_fini().
10330
8804b286 10331 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
10332 It's empty and unused.
10333
ee01cf35 10334 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
10335 beginning to avoid warnings with some compilers.
10336
afc3b5d7 10337 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
10338 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
10339
e4e8eaa5 103402008-07-14 Pavel Roskin <proski@gnu.org>
10341
407aceb4 10342 * kern/env.c (grub_register_variable_hook): Don't copy empty
10343 string, it leaks memory. Pass "" to grub_env_set(), it should
10344 handle constant strings.
10345
e4e8eaa5 10346 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
10347 * commands/cmp.c (grub_cmd_cmp): Likewise.
10348 * kern/dl.c (grub_dl_flush_cache): Likewise.
10349 (grub_dl_load_core): Likewise.
10350 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
10351 (grub_elf64_load_phdrs): Likewise.
10352
d4e2dad3 103532008-07-13 Pavel Roskin <proski@gnu.org>
10354
10355 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
10356 between signed and unsigned.
10357 (LzmaEnc_Finish): Fix warning about an unused parameter.
10358
aa24b516 103592008-07-13 Bean <bean123ch@gmail.com>
10360
10361 * Makefile.in (enable_lzo): New rule.
10362
10363 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
10364
10365 * configure.ac (ENABLE_LZO): New option --enable-lzo.
10366
10367 * boot/i386/pc/lnxboot.S: #include <config.h>.
10368
10369 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 10370 its value according to the compression algorithm used, lzo or lzma.
aa24b516 10371
10372 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
10373 compression algorithm according to configure macro.
10374
10375 * kern/i386/pc/startup.S (codestart): Likewise.
10376
10377 * kern/i386/pc/lzma_decode.S: New file.
10378
10379 * include/grub/lib/LzFind.h: Likewise.
10380
10381 * include/grub/lib/LzHash.h: Likewise.
10382
10383 * include/grub/lib/LzmaDec.h: Likewise.
10384
10385 * include/grub/lib/LzmaEnc.h: Likewise.
10386
10387 * include/grub/lib/LzmaTypes.h: Likewise.
10388
10389 * lib/LzFind.c: Likewise.
10390
10391 * lib/LzmaDec.c: Likewise.
10392
10393 * lib/LzmaEnc.c: Likewise.
10394
4ae821ac 103952008-07-13 Bean <bean123ch@gmail.com>
10396
10397 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
10398 (grub_ext4_extent_header): New structure.
10399 (grub_ext4_extent): Likewise.
10400 (grub_ext4_extent_idx): Likewise.
10401 (grub_ext4_find_leaf): New function.
10402 (grub_ext2_read_block): Handle extents.
10403
9a745147 104042008-07-12 Robert Millan <rmh@aybabtu.com>
10405
10406 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
10407
d49a4cf6 104082008-07-11 Robert Millan <rmh@aybabtu.com>
10409
10410 * util/grub.d/40_custom.in: New file. Example on how to add custom
10411 entries to /etc/grub.d.
10412 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
10413 40_custom (implicitly, by merging all the grub.d rules).
10414
947414b4 104152008-07-11 Pavel Roskin <proski@gnu.org>
10416
0059cf6f 10417 * commands/read.c (grub_getline): Fix invalid memory access.
10418 Don't add newline to the variable value.
10419
947414b4 10420 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
10421 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
10422 (serial_hw_get_port): Check validity of the port number.
10423 (grub_cmd_serial): Check return value of serial_hw_get_port().
10424
62a02d00 104252008-07-07 Pavel Roskin <proski@gnu.org>
10426
10427 * boot/i386/pc/diskboot.S (notification_string): Replace
10428 "Loading kernel" with just "loading". This is shorter, less
10429 confusing and saves a few bytes for possible future changes.
10430
3e5581b0 104312008-07-05 Pavel Roskin <proski@gnu.org>
10432
ea387a48 10433 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
10434 size for ATAPI devices, they are undefined. Output sector
10435 number in decimal form.
10436
3e5581b0 10437 * disk/ata.c: Use named constants for status bits.
10438
fdecb8fd 104392008-07-04 Pavel Roskin <proski@gnu.org>
10440
bcd35b90 10441 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
10442 grub_addr_t before casting it to the void pointer to fix a
10443 warning. Non-addressable regions are discarded earlier.
10444 (grub_arch_modules_addr): Cast _end to grub_addr_t.
10445 * kern/i386/linuxbios/table.c: Include grub/misc.h.
10446 (check_signature): Don't shadow table_header.
10447 (grub_linuxbios_table_iterate): Cast numeric constants to
10448 grub_linuxbios_table_header_t.
10449 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
10450 grub_stop().
10451
af58ab3d 10452 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
10453 prevent warnings.
10454
1759aa57 10455 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
10456 pointer, which can cause warnings. Support 64-bit addresses.
10457
fdecb8fd 10458 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
10459 of sizeof(long). This fixes PowerPC image generation on x86_64.
10460
8516d2a8 104612008-07-04 Robert Millan <rmh@aybabtu.com>
10462
10463 This fixes a performance issue when pc & gpt partmap iterators
10464 didn't abort iteration even after our hook found what it was
fe987087 10465 looking for (often causing expensive probes of non-existent drives).
8516d2a8 10466
10467 Some callers relied on previous buggy behaviour, since they would
34c44600 10468 raise an error when their own hooks caused early abortion of its
8516d2a8 10469 iteration.
10470
10471 * kern/device.c (grub_device_open): Improve error message.
10472 * disk/lvm.c (grub_lvm_open): Likewise.
10473 * disk/raid.c (grub_raid_open): Likewise.
10474
10475 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
10476 when hook requests it, independently of grub_errno.
10477 (pc_partition_map_probe): Do not fail when find_func() caused
10478 early abortion of pc_partition_map_iterate().
10479
10480 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
10481 when hook requests it, independently of grub_errno.
10482 (gpt_partition_map_probe): Do not fail when find_func() caused
10483 early abortion of gpt_partition_map_iterate().
10484
10485 * kern/partition.c (grub_partition_iterate): Abort parent iteration
10486 when hook requests it, independently of grub_errno. Do not fail when
10487 part_map_iterate_hook() caused early abortion of p->iterate().
10488
10489 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
10490 when grub_partition_iterate() returned with non-zero.
10491
277d0de9 104922008-07-03 Pavel Roskin <proski@gnu.org>
10493
10494 * disk/ata.c (grub_ata_pio_write): Check status before writing,
10495 like we do in grub_ata_pio_read().
10496 (grub_ata_readwrite): Always write individual sectors. Fix the
10497 sector count for the remainder.
10498 (grub_ata_write): Enable writing to ATA devices. Correctly
10499 report error for ATAPI devices.
10500
d4c9b428 105012008-07-02 Pavel Roskin <proski@gnu.org>
10502
e43fc690 10503 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
10504 warning.
10505
f707af42 10506 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
10507 for every read sector, we already increment it for the whole
10508 batch. This fixes reading more than 256 sectors at once.
10509
11e16b15 10510 * util/grub-editenv.c (cmd_info): Cast argument to long
10511 explicitly. ptrdiff_t reduces to int on i386.
10512
cbabfdd4 10513 * util/grub-editenv.c (main): Be specific which parameter is
10514 missing.
10515
b8fbce0a 10516 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
10517 (memdisk): Make memdisk_orig_addr a pointer.
10518
c9c8e606 10519 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
10520 for file offsets, use grub_off_t instead. Fix printf format
10521 warnings.
10522
ca62e598 10523 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
10524 there. Real unexpected warnings should not drown in the noise
10525 about known problems.
10526
ce8d1766 10527 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
10528 grub_disk_addr_t for memory addresses.
10529
00c7a56a 10530 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
10531 explicitly to fix a warning.
10532
08d3ef09 10533 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
10534
cb71ba20 10535 * Makefile.in (MODULE_LDFLAGS): New variable.
10536 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
10537 the linker accepts --build-id=none.
10538 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
10539 MODULE_LDFLAGS.
10540 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
10541
d4c9b428 10542 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
10543 those in Linux XFS code. Provide a way to access 64-bit parent
10544 inode.
10545 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
10546 the end of struct grub_xfs_dir_header.
10547
d4156eee 105482008-07-02 Bean <bean123ch@gmail.com>
10549
10550 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
10551 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
10552 and GRUB_IEEE1275_FLAG_NO_ANSI.
10553
10554 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
10555 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
10556 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
10557
10558 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
10559 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
10560
10561 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
10562 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
10563
10564 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
10565 esc sequence on non ANSI terminal.
10566 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
10567
10568 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
10569 beginning of file.
10570
2270f77b 105712008-07-02 Bean <bean123ch@gmail.com>
10572
10573 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
10574 (grub_editenv_SOURCES): New variable.
10575 (pkglib_MODULES): Add loadenv.mod.
10576 (loadenv_mod_SOURCES): New variable.
10577 (loadenv_mod_CFLAGS): Likewise.
10578 (loadenv_mod_LDFLAGS): Likewise.
10579
10580 * include/grub/envblk.h: New file.
10581
10582 * util/envblk.c: New file.
10583
10584 * util/grub-editenv.c: New file.
10585
10586 * commands/loadenv.c: New file.
10587
0e9e51ec 105882008-07-01 Pavel Roskin <proski@gnu.org>
10589
d89b7634 10590 * include/multiboot2.h (struct multiboot_tag_module): Use char,
10591 not unsigned char. This fixes warnings and is consistent with
10592 other tags.
10593
bf1835b1 10594 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
10595
8222a04b 10596 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
10597
6a42d99d 10598 * term/tparm.c (analyze): Always set *popcount.
10599
10b159d1 10600 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
10601 cast to fix a warning.
10602
b8789f6c 10603 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
10604 cast to suppress a warning.
10605
29d7e38a 10606 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
10607 grub_fshelp_read_file() expects.
10608
f341f669 10609 * fs/fat.c: Fix UUID calculation on big-endian systems. We
10610 write uuid as a 32-bit value in CPU byte order, so declare and
10611 use it as such.
10612
0e9e51ec 10613 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
10614 long if the format specifier expects it.
10615 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
10616 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10617 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
10618 long to fix a warning.
10619 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
10620 grub_dprintf() arguments to fix warnings.
10621
3aefa857 106222008-06-30 Pavel Roskin <proski@gnu.org>
10623
56c7668b 10624 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
10625 install_bsd_part immediately before core.img is embedded or
10626 modified on disk. This fixes core.img verification if core.img
10627 cannot be embedded.
10628
3aefa857 10629 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
10630 core_path to calculate the blocklist.
10631 Patch from Javier Martín <lordhabbit@gmail.com>
10632
5444088d 106332008-06-29 Robert Millan <rmh@aybabtu.com>
10634
10635 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
10636 block to disk block.
10637 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
10638 Patch from Niels Böhm <bitbucket@arcor.de>
10639
674835c8 106402008-06-29 Robert Millan <rmh@aybabtu.com>
10641
10642 * util/update-grub_lib.in (font_path): Search for fonts in
10643 /boot/grub first, which is more likely to be readable (we aren't
10644 deciding where fonts live, just looking for them).
10645
f527dbc8 106462008-06-26 Pavel Roskin <proski@gnu.org>
10647
6c2d8df6 10648 * util/biosdisk.c (read_device_map): Don't leave dead map
10649 entries for devices failing stat() check.
10650
f527dbc8 10651 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
10652 core_path_dev for the core.img path on the target device.
10653
aebe3d13 106542008-06-26 Robert Millan <rmh@aybabtu.com>
10655
10656 * disk/fs_uuid.c: New file.
10657 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
10658 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
10659 (fs_uuid_mod_LDFLAGS): New variables.
10660 * include/grub/disk.h (grub_disk_dev_id): Add
10661 `GRUB_DISK_DEVICE_UUID_ID'.
10662 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
10663 implement iterate().
10664
37aaf354 106652008-06-26 Robert Millan <rmh@aybabtu.com>
10666
10667 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
10668 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
10669 Linux image includes no initrd.
10670
25ff262a 106712008-06-21 Javier Martín <lordhabbit@gmail.com>
10672
10673 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
10674 call to resolve the core image location that effectively appended the
10675 name twice.
10676
76a2bd44 106772008-06-21 Robert Millan <rmh@aybabtu.com>
10678
10679 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
10680 call from here ...
10681
10682 * util/grub.d/10_hurd.in: ... to here ...
10683 * util/grub.d/10_linux.in: ... and here.
10684
650e1c79 106852008-06-19 Robert Millan <rmh@aybabtu.com>
10686
fe987087 10687 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 10688 after it has been set by grub_machine_set_prefix().
10689
6ce63911 106902008-06-19 Robert Millan <rmh@aybabtu.com>
10691
10692 * commands/search.c (search_label, search_fs_uuid, search_file): Print
10693 search result when not saving to variable, not the other way around.
10694 When saving to variable, abort iteration as soon as a match is found.
10695
73940cec 106962008-06-19 Robert Millan <rmh@aybabtu.com>
10697
10698 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
10699 check for partition that provides /boot/grub. Its logic is flawed,
10700 as it prevents prepare_grub_to_access_device() from being called
10701 multiple times.
10702
3c62a39d 107032008-06-19 Robert Millan <rmh@aybabtu.com>
10704
10705 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
10706 "insmod" command directly when abstraction modules are needed,
fe987087 10707 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 10708 since it had already been processed).
10709
47395a42 107102008-06-19 Pavel Roskin <proski@gnu.org>
10711
10712 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
10713 changed. This is needed in case GRUB_LIBDIR changes.
10714 * conf/i386-ieee1275.rmk: Likewise.
10715 * conf/i386-linuxbios.rmk: Likewise.
10716 * conf/i386-pc.rmk: Likewise.
10717 * conf/powerpc-ieee1275.rmk: Likewise.
10718
a145ac2d 107192008-06-18 Pavel Roskin <proski@gnu.org>
10720
10721 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
10722 kernel_elf_symlist.c to symlist.c for consistency with other
10723 architectures. Update all users.
10724 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
10725
7847c51e 107262008-06-18 Robert Millan <rmh@aybabtu.com>
10727
10728 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
10729 it in prefix.
10730
10731 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
10732 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
10733 a RAID device, run setup() for all members independently on whether
10734 LVM abstraction is being used.
10735 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
10736 If grub-mkimage has set `*install_dos_part == -2', don't override this
10737 value.
10738 Perform *install_dos_part adjustments independently on whether
10739 we're embedding or not.
10740 Clarify error message when image is too big for embedding.
10741 Remove duplicate *install_dos_part stanza.
10742
b23e5644 107432008-06-17 Robert Millan <rmh@aybabtu.com>
10744
10745 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
10746 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
10747 variables.
10748 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
10749 values in grub_ofconsole_normal_color and
10750 grub_ofconsole_highlight_color (they're not directly related to
10751 background and foreground).
10752 (grub_ofconsole_setcolorstate): Extract background and foreground
10753 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
10754
0aac2f79 107552008-06-17 Robert Millan <rmh@aybabtu.com>
10756
10757 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
10758 /boot/grub for the check in last commit, not /boot (they could be
10759 different partitions).
10760
3cca7ef3 107612008-06-16 Robert Millan <rmh@aybabtu.com>
10762
10763 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
10764 asked to setup access for the same partition that provides /boot,
10765 don't bother using UUIDs since our root already has the value we
10766 want.
10767
347396d8 107682008-06-16 Robert Millan <rmh@aybabtu.com>
10769
10770 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
10771 I2O devices.
10772 Patch from Sven Mueller <sven@debian.org>.
10773
991477f8 107742008-06-16 Robert Millan <rmh@aybabtu.com>
10775
10776 * util/update-grub.in: Check for $EUID instead of $UID.
10777 Reported by Vincent Zweije.
10778
d31a32a1 107792008-06-16 Bean <bean123ch@gmail.com>
10780
fe987087 10781 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 10782 (grub_ext2_read_block): Likewise.
10783 (grub_ext2_read_inode): Likewise.
10784 (grub_ext2_mount): Likewise.
10785 (grub_ext2_close): Likewise.
10786 (grub_ext3_get_journal): Removed.
10787
fe987087 10788 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 10789 (grub_reiserfs_read_symlink): Likewise.
10790 (grub_reiserfs_mount): Likewise.
10791 (grub_reiserfs_open): Likewise.
10792 (grub_reiserfs_read): Likewise.
10793 (grub_reiserfs_close): Likewise.
10794 (grub_reiserfs_get_journal): Removed.
10795
10796 * fs/fshelp.c (grub_fshelp_read): Removed.
10797 (grub_fshelp_map_block): Likewise.
10798
10799 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
10800 (grub_fshelp_journal): Likewise.
10801 (grub_fshelp_read): Likewise.
10802 (grub_fshelp_map_block): Likewise.
10803
3540a760 108042008-06-16 Pavel Roskin <proski@gnu.org>
10805
10806 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
10807 floating point anymore.
10808 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
10809
95614c84 108102008-06-15 Pavel Roskin <proski@gnu.org>
10811
10812 * commands/ls.c (grub_ls_list_files): Use integer calculations
10813 for human readable format, avoid floating point use.
10814 * kern/misc.c (grub_ftoa): Remove.
10815 (grub_vsprintf): Remove floating point support.
10816
50465dd6 108172008-06-15 Robert Millan <rmh@aybabtu.com>
10818
fe6b695a 10819 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 10820 devices.
10821 Reported by Max Vozeler.
10822
a9207284 108232008-06-15 Robert Millan <rmh@aybabtu.com>
10824
10825 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
10826 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
10827 skipped later.
10828 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
10829 the beginning of the prefix.
10830
10831 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
10832 It is assumed that if we have a memdisk, grub-mkimage has set
10833 grub_prefix to include the "(memdisk)" drive in it.
10834
a7cbd45a 108352008-06-15 Robert Millan <rmh@aybabtu.com>
10836
10837 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
10838 Initialize keyboard controller after registering the terminal, so that
10839 grub_printf() can be called from grub_keyboard_controller_init().
10840
21cf716a 108412008-06-15 Robert Millan <rmh@aybabtu.com>
10842
10843 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
10844 extent-btree which is written as big endian on disk.
10845 Reported by Alain Greppin <al@chilibi.org>.
10846
23a64d8e 108472008-06-14 Robert Millan <rmh@aybabtu.com>
10848
10849 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
10850 * util/i386/pc/grub-install.in (modules): Likewise.
10851
d687651c 108522008-06-13 Pavel Roskin <proski@gnu.org>
10853
10854 * commands/ls.c (grub_ls_list_files): Fix format warnings.
10855
dfe9ddd4 108562008-06-13 Bean <bean123ch@gmail.com>
10857
10858 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
10859
10860 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
10861
10862 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
10863 to indicate sparse block.
10864
16ae7781 108652008-06-12 Pavel Roskin <proski@gnu.org>
10866
e6d1a308 10867 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
10868 number, grub_fshelp_read() does it for us.
10869
16ae7781 10870 * fs/fshelp.c (grub_fshelp_read): New function. Implement
10871 linear disk read with journal translation.
10872 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
10873 * include/grub/fshelp.h: Declare grub_fshelp_read().
10874
40fd3a2b 108752008-06-09 Pavel Roskin <proski@gnu.org>
10876
10877 * fs/minix.c (grub_minix_mount): Handle error reading
10878 superblock.
10879
f5679726 108802008-06-08 Robert Millan <rmh@aybabtu.com>
10881
10882 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
10883 don't append the RAID prefix afterwards.
10884 Reported by Clint Adams.
10885
ce525529 108862008-06-08 Robert Millan <rmh@aybabtu.com>
10887
10888 Based on description from Pavel:
10889 * kern/disk.c (grub_disk_check_range): Rename to ...
10890 (grub_disk_adjust_range): ... this. Add a comment explaining the
10891 tasks performed by this function.
10892
ad4936a0 108932008-06-08 Robert Millan <rmh@aybabtu.com>
10894
10895 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
10896 `num_serial' (for consistency with other variables).
10897 (struct grub_ntfs_data): Add `uuid' member.
10898 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
10899 (grub_ntfs_uuid): New function.
10900 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
10901
dc20b0f9 109022008-06-07 Pavel Roskin <proski@gnu.org>
10903
10904 * util/biosdisk.c (open_device): Revert last change to the
10905 function, it broke installation. The sector needs to be
10906 different dependent on which device is opened.
10907
c5e3cfba 109082008-06-06 Robert Millan <rmh@aybabtu.com>
10909
10910 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
10911 rest of GRUB, and breakage doesn't happen if its value were modified.
10912
10913 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10914 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
10915 a constant (same value).
10916 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
10917 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
10918
26a1f8c4 109192008-06-06 Robert Millan <rmh@aybabtu.com>
10920
10921 * util/biosdisk.c (open_device): Do not modify sector offset when
10922 accessing a partition. kern/disk.c already handles this for us.
10923
25d6b327 109242008-06-06 Robert Millan <rmh@aybabtu.com>
10925
10926 * util/grub-emu.c (grub_machine_init): Move code in this function from
10927 here ...
10928 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
10929 segfault in case grub_printf() is called).
10930
10931 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
10932 grub_probe. Update all users not to explicitly add it again.
10933 (grub_device): New variable; contains corresponding device for grubdir.
10934 (fs_module, partmap_module, devabstraction_module): Pass
10935 `--device ${grub_device}' to grub_probe to avoid traversing /dev
10936 every time.
10937
9ece62fb 109382008-06-05 Robert Millan <rmh@aybabtu.com>
10939
10940 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
10941 is found, print it (same layout as with labels).
10942
1ad36d37 109432008-06-04 Robert Millan <rmh@aybabtu.com>
10944
10945 * util/biosdisk.c (get_drive): Rename to ...
10946 (find_grub_drive): ... this. Update all users.
10947
10948 (get_os_disk): Rename to ...
10949 (convert_system_partition_to_system_disk): ... this. Update all users.
10950
10951 (find_drive): Rename to ...
10952 (find_system_device): ... this. Update all users.
10953
e6a30859 109542008-06-04 Robert Millan <rmh@aybabtu.com>
10955
10956 * util/biosdisk.c (get_os_disk): Handle IDA devices.
10957 * util/grub-mkdevicemap.c (get_mmc_disk_name)
10958 (make_device_map): Likewise.
10959
00c108a4 109602008-06-01 Robert Millan <rmh@aybabtu.com>
10961
10962 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
10963 before dereferencing it.
10964
10965 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
10966 union with fat12/fat16-specific ones. Add some new fields, including
10967 `num_serial' for both versions.
10968 (struct grub_fat_data): Add `uuid' member.
10969 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
10970 names. Initialize `data->uuid' using `num_serial'.
10971 (grub_fat_uuid): New function.
10972 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
10973
10974 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
10975 (grub_reiserfs_uuid): New function.
10976 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
10977 member.
10978
10979 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
10980 (grub_xfs_uuid): New function.
10981 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
10982
1385c5bb 109832008-06-01 Robert Millan <rmh@aybabtu.com>
10984
10985 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
10986 code that is backward compatible with pre-uuid search command.
10987
c682dfd7 109882008-05-31 Robert Millan <rmh@aybabtu.com>
10989
10990 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
10991 floppies after everything else, to ensure floppy drive isn't accessed
10992 unnecessarily (patch from Bean).
10993
b7db5d47 109942008-05-31 Robert Millan <rmh@aybabtu.com>
10995
10996 * commands/search.c (search_label, search_fs_uuid, search_file): Do
10997 not print device names when we were asked to set a variable.
10998
6e037aa9 109992008-05-31 Robert Millan <rmh@aybabtu.com>
11000
11001 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
11002 using "cursor-on" and "cursor-off" commands (understood at least by
11003 the Open Firmware flavour on OLPC).
11004
41305bc8 110052008-05-31 Michael Gorven <michael@gorven.za.net>
11006
11007 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
11008 on and off sequences.
11009
69ba137e 110102008-05-31 Robert Millan <rmh@aybabtu.com>
11011
11012 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
11013 * util/update-grub.in: Likewise.
11014
520ae21b 110152008-05-30 Pavel Roskin <proski@gnu.org>
11016
11017 * util/biosdisk.c (linux_find_partition): Simplify logic and
11018 make the code more universal. Keep special processing for
11019 devfs, but use a simple rule for all other devices. If the
11020 device ends with a number, append 'p' and the partition number.
11021 Otherwise, append only the partition number.
11022
5786569b 110232008-05-30 Robert Millan <rmh@aybabtu.com>
11024
11025 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
11026 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
11027 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
11028 the `root' parameter to Linux.
11029
51500452 110302008-05-30 Robert Millan <rmh@aybabtu.com>
11031
11032 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
11033 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
11034 --fs_uuid with --fs-uuid.
11035 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
11036 all filesystems support them).
11037
811d3878 110382008-05-30 Robert Millan <rmh@aybabtu.com>
11039
11040 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 11041 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 11042
cab63c95 110432008-05-30 Robert Millan <rmh@aybabtu.com>
11044
11045 * util/grub.d/00_header.in: Remove obsolete comment referencing
11046 convert_system_path_to_grub_path().
11047 * util/update-grub.in: Likewise.
11048 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
11049 (convert_system_path_to_grub_path): Add a warning message explaining
11050 that this function is deprecated. Rely on is_path_readable_by_grub()
11051 for the readability checks.
11052 (font_path): Use is_path_readable_by_grub() for the readability
11053 check rather than convert_system_path_to_grub_path().
11054
972e2f7a 110552008-05-30 Robert Millan <rmh@aybabtu.com>
11056
11057 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
11058 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
11059 converting it first.
11060 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
11061 grub.cfg for access to font file, and afterwards call it again to set
11062 the root device.
11063
62191274 110642008-05-30 Robert Millan <rmh@aybabtu.com>
11065
11066 * commands/search.c (options): Add --fs_uuid option.
11067 (search_fs_uuid): New function.
11068 (grub_cmd_search): Fix --set argument passing.
11069 Use search_fs_uuid() when requested via --fs_uuid.
11070 (grub_search_init): Update help message.
11071 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
11072 and redeclare it as an array of 16-bit words.
11073 (grub_ext2_uuid): New function.
11074 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
11075 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
11076 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
11077 (GRUB_DEVICE_BOOT_UUID): New variables.
11078 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
11079 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
11080 whenever possible.
11081 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
11082 just assume `root' variable has the right value.
11083 * util/grub.d/10_linux.in: Likewise.
11084 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
11085 via PRINT_FS_UUID.
11086 (main): Recognise `-t fs_uuid' argument.
11087
01b73ec8 110882008-05-30 Robert Millan <rmh@aybabtu.com>
11089
11090 * util/biosdisk.c (map): Redefine structure to hold information
11091 about GRUB drive name.
fe6b695a 11092 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 11093 drive names.
11094 (call_hook): Remove.
11095 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
11096 member. Assume drive has partitions.
11097 (grub_util_biosdisk_open): Access device names via `.device' struct
11098 member.
11099 (open_device): Likewise.
11100 (find_drive): Likewise.
11101 (read_device_map): Adjust map[] usage to match the new struct
11102 definition. Don't check for duplicates (still possible, but not cheap
11103 anymore).
11104 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
11105 (make_device_name): Remove assumption of BIOS-like drive names.
11106
22f16596 111072008-05-30 Pavel Roskin <proski@gnu.org>
11108
11109 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
11110 compiling execute.c doesn't need grub_script.tab.h anymore.
11111 (normal/command.c_DEPENDENCIES): Likewise.
11112 (normal/function.c_DEPENDENCIES): Likewise.
11113 * conf/i386-ieee1275.rmk: Likewise.
11114 * conf/i386-linuxbios.rmk: Likewise.
11115 * conf/i386-pc.rmk: Likewise.
11116 * conf/powerpc-ieee1275.rmk: Likewise.
11117 * conf/sparc64-ieee1275.rmk: Likewise.
11118
528ad8f2 111192008-05-29 Pavel Roskin <proski@gnu.org>
11120
d1dff95d 11121 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
11122 when scanning metadata for volume group name.
11123
528ad8f2 11124 * include/grub/script.h: Don't include grub_script.tab.h. It's
11125 a generated file, which may only be included from the files with
11126 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
11127 use union YYSTYPE, as the later allows forward declaration.
11128 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
11129
47248e08 111302008-05-29 Robert Millan <rmh@aybabtu.com>
11131
11132 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
11133 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
11134 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
11135 (grub_console_checkkey): Add grub_dprintf() call to report unknown
11136 scan codes.
11137
ee632529 111382008-05-29 Robert Millan <rmh@aybabtu.com>
11139
11140 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
11141 control key combinations.
11142
eee96e08 111432008-05-29 Robert Millan <rmh@aybabtu.com>
11144
11145 * util/powerpc/ieee1275/grub-install.in: Move from here ...
11146 * util/ieee1275/grub-install.in: ... to here.
11147 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
11148 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
11149 (grub_install_SOURCES): Likewise.
11150
da9a6a94 111512008-05-29 Robert Millan <rmh@aybabtu.com>
11152
11153 * fs/affs.c: Update copyright year.
11154 * fs/ext2.c: Likewise.
11155 * fs/fshelp.c: Likewise.
11156 * fs/hfsplus.c: Likewise.
11157 * fs/ntfs.c: Likewise.
11158 * fs/xfs.c: Likewise.
11159 * include/grub/fshelp.h: Likewise.
11160 * util/grub-mkdevicemap.c: Likewise.
11161
12e65f3a 111622008-05-28 Robert Millan <rmh@aybabtu.com>
11163
11164 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
11165 might need to be fatfs to support some firmware implementations
11166 (e.g. OFW or EFI).
11167
23023641 111682008-05-28 Robert Millan <rmh@aybabtu.com>
11169
11170 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
11171 devices.
11172 * util/grub-mkdevicemap.c (get_mmc_disk_name)
11173 (make_device_map): Likewise.
11174
887d2619 111752008-05-20 Bean <bean123ch@gmail.com>
11176
11177 * fs/fshelp.c (grub_fshelp_map_block): New function.
11178 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
11179 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
11180
11181 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
11182 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
11183 (grub_fshelp_journal): New structure.
11184 (grub_fshelp_map_block): New function prototype.
11185 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
11186 (grub_fshelp_map_block): Likewise.
11187
11188 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
11189 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
11190 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
11191 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
11192 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
11193 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
11194 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
11195 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
11196 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
11197 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
11198 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
11199 (grub_ext2_sblock): New members for journal support.
11200 (grub_ext3_journal_header): New structure.
11201 (grub_ext3_journal_revoke_header): Likewise.
11202 (grub_ext3_journal_block_tag): Likewise.
11203 (grub_ext3_journal_sblock): Likewise.
11204 (grub_fshelp_node): New members logfile and journal.
11205 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
11206 grub_fshelp_map_block to get real block number.
11207 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
11208 number.
11209 (grub_ext2_read_inode): Likewise.
11210 (grub_ext3_get_journal): New function.
11211 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
11212 (grub_ext2_close): Release memory used by journal.
11213
11214 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
11215 (REISERFS_MAGIC_DESC_BLOCK): New macro.
11216 (grub_reiserfs_transaction_header): Renamed to
11217 grub_reiserfs_description_block, replace field data with real_blocks.
11218 (grub_reiserfs_commit_block): New structure.
11219 (grub_reiserfs_data): New member journal.
11220 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
11221 number.
11222 (grub_reiserfs_read_symlink): Likewise.
11223 (grub_reiserfs_iterate_dir): Likewise.
11224 (grub_reiserfs_open): Likewise.
11225 (grub_reiserfs_read): Likewise.
11226 (grub_reiserfs_get_journal): New function.
11227 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
11228 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
11229 using grub_reiserfs_get_journal.
11230 (grub_reiserfs_close): Release memory used by journal.
11231
11232 * fs/affs.c (grub_affs_read_block): Change block type to
11233 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
11234
11235 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
11236
11237 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
11238
11239 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
11240
11241 * fs/udf.c (grub_udf_read_block): Change block type to
11242 grub_disk_addr_t. Use type cast to avoid warning.
11243
11244 * fs/xfs.c (grub_xfs_read_block): Likewise.
11245
b7c6bed5 112462008-05-16 Christian Franke <franke@computer.org>
11247
11248 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
11249 to ensure that break with ESC will always work.
11250 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
11251 Remove ESC from keyboard queue.
11252
eedf167f 112532008-05-16 Christian Franke <franke@computer.org>
11254
11255 * util/biosdisk.c: [__CYGWIN__] Add includes.
11256 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
11257 (get_os_disk): Move variable declarations to OS specific
11258 parts to avoid warning.
11259 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
11260 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
11261 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
11262 Cygwin.
11263 * util/getroot.c: [__CYGWIN__] Add includes.
11264 (strip_extra_slashes): Fix "/" case.
11265 [__CYGWIN__] (get_win32_path): New function.
11266 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
11267 [__CYGWIN__] (find_root_device): Disable.
11268 [__CYGWIN__] (get_bootsec_serial): New function.
11269 [__CYGWIN__] (find_cygwin_root_device): Likewise.
11270 [__linux__] (grub_guess_root_device): Add early returns to simplify
11271 structure.
11272 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
11273 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
11274 check for Linux only.
11275
a079699e 112762008-05-15 Bean <bean123ch@gmail.com>
11277
11278 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
11279 keyboard hang problem in apple's intel mac.
11280
1cf4059a 112812008-05-09 Robert Millan <rmh@aybabtu.com>
11282
11283 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
11284 devices.
11285 * util/grub-mkdevicemap.c (get_virtio_disk_name)
11286 (make_device_map): Likewise.
11287 Reported by Aurelien Jarno <aurel32@debian.org>
11288
ed759390 112892008-05-07 Ian Campbell <ijc@hellion.org.uk>
11290
11291 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
11292 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
11293 (make_device_map): Output entries for xvd type disks.
11294
b56c4eaa 112952008-05-07 Robert Millan <rmh@aybabtu.com>
11296
11297 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
11298 devices.
11299 * util/grub-mkdevicemap.c (get_cciss_disk_name)
11300 (make_device_map): Likewise.
11301 Reported by Roland Dreier <rdreier@cisco.com>
11302
7f8866ed 113032008-05-07 Robert Millan <rmh@aybabtu.com>
11304
11305 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
11306 grub_strstr() call. Correct a few mistakes in failure path handling.
11307
b0346e0f 113082008-05-06 Robert Millan <rmh@aybabtu.com>
11309
11310 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
11311 Do not print a trailing slash (therefore, the root directory is an
11312 empty string).
11313 (convert_system_path_to_grub_path): Do not remove trailing slash
11314 from make_system_path_relative_to_its_root() output.
11315
11316 * util/i386/pc/grub-install.in: Add trailing slash to output from
11317 make_system_path_relative_to_its_root().
11318
6cf12cbd 113192008-05-06 Robert Millan <rmh@aybabtu.com>
11320
11321 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
11322 ensures that output lines aren't intermangled with those sent to
11323 stderr (via grub_util_info()).
11324 * util/grub-probe.c (grub_refresh): Likewise.
11325 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
11326
0fbb3117 113272008-05-05 Christian Franke <franke@computer.org>
11328
11329 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
11330 Add Cygwin device names.
11331 (get_ide_disk_name) [__CYGWIN__]: Likewise.
11332 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
11333 (check_device): Return error instead of success on empty name.
11334 (make_device_map): Move label inside linux specific code to
11335 prevent compiler warning.
11336
8124cdb7 113372008-04-30 Robert Millan <rmh@aybabtu.com>
11338
11339 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
11340 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
11341 first boot option.
11342 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
11343
094c01d0 113442008-04-29 Robert Millan <rmh@aybabtu.com>
11345
11346 * docs/grub.cfg: New file (example GRUB configuration).
11347
f4b1fc02 113482008-04-26 Robert Millan <rmh@aybabtu.com>
11349
329ce2a5 11350 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
11351 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
11352 and `disk/ieee1275/nand.c'.
f4b1fc02 11353
25f16ec1 113542008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 11355
25f16ec1 11356 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
11357 i386-linuxbios.
11358
11359 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
11360 change the buffer size to 4096 for cdrom device.
11361
11362 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
11363 and nand.mod.
11364 (_linux_mod_SOURCES): New variable.
11365 (_linux_mod_CFLAGS): Likewise.
11366 (_linux_mod_LDFLAGS): Likewise.
11367 (linux_mod_SOURCES): Likewise.
11368 (linux_mod_CFLAGS): Likewise.
11369 (linux_mod_LDFLAGS): Likewise.
11370 (nand_mod_SOURCES): Likewise.
11371 (nand_mod_CFLAGS): Likewise.
11372 (nand_mod_LDFLAGS): Likewise.
11373
11374 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
11375 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
11376 type property. (nand device in olpc don't have this property)
11377
11378 * include/grub/disk.h (grub_disk_dev_id): New macro
11379 GRUB_DISK_DEVICE_NAND_ID.
11380
11381 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
11382 function prototype.
11383 (grub_rescue_cmd_initrd): Likewise.
11384
11385 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
11386 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
11387 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 11388
25f16ec1 11389 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
11390 GRUB_MACHINE_IEEE1275 is defined.
11391
11392 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
11393 Use NESTED_FUNC_ATTR attribute on the hook parameter.
11394
11395 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
11396 on nested function heap_init.
11397 (grub_upper_mem): New variable for i386-ieee1275.
11398 (grub_get_extended_memory): New function for i386-ieee1275.
11399 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
11400
11401 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
11402 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
11403 property.
f19dbdb7 11404
25f16ec1 11405 * loader/i386/ieee1275/linux.c: New file.
11406
11407 * loader/i386/ieee1275/linux_normal.c: New file.
11408
11409 * disk/ieee1275/nand.c: New file.
11410
e89d61e9 114112008-04-18 Thomas Schwinge <tschwinge@gnu.org>
11412
11413 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
11414 value.
11415 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
11416
602566f6 114172008-04-18 Robert Millan <rmh@aybabtu.com>
11418
11419 Restructures early code path on ieee1275 to unify grub_main() as
11420 the first C function that is executed in every platform.
11421
11422 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
11423 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
11424 cmain().
11425 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
11426 * kern/ieee1275/cmain.c (cmain): Rename to ...
11427 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
11428 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
11429 at the beginning.
11430
57490c2b 114312008-04-18 Robert Millan <rmh@aybabtu.com>
11432
11433 * util/update-grub.in: Fix syntax error when setting
11434 `GRUB_PRELOAD_MODULES'.
11435 Reported by Stephane Chazelas <stephane@artesyncp.com>
11436
1977517d 114372008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
11438
11439 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
11440 section into account, newer toolchains generate unique build ids
11441 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 11442 we want build ids to be preserved
1977517d 11443 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
11444 far from other sections don't cause the raw binary images grow
11445 size
11446
bfb1f1a2 114472008-04-15 Robert Millan <rmh@aybabtu.com>
11448
11449 * disk/lvm.c: Update copyright year.
11450 * kern/misc.c: Likewise.
11451
01979850 114522008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
11453
11454 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 11455 there is no memory left for physical volume name.
01979850 11456
0a1150e2 114572008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
11458
11459 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
11460 volume name mapping to support bigger than 9 character names properly.
11461
82ead3fe 114622008-04-13 Robert Millan <rmh@aybabtu.com>
11463
11464 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
11465 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
11466
e54a72f5 114672008-04-13 Christian Franke <franke@computer.org>
11468
11469 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
11470 to create a floppy emulation boot CD when non emulation mode
11471 does not work.
11472 Enable Joliet CD filesystem extension.
11473
9fe86034 114742008-04-13 Robert Millan <rmh@aybabtu.com>
11475
11476 * kern/misc.c (grub_strncat): Fix off-by-one error.
11477 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
11478
11479 * kern/env.c (grub_env_context_close): Clear current context, not
11480 previous one.
11481 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
11482
11483 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
11484
7ceeee39 114852008-04-13 Robert Millan <rmh@aybabtu.com>
11486
11487 Improve robustness when handling LVM.
11488
11489 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 11490 (and leave `*p' unmodified).
7ceeee39 11491 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
11492 through it.
11493 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
11494 iterating through it.
11495 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
11496 through it.
fe6b695a 11497 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 11498 when due) on each grub_lvm_getvalue() or grub_strstr() call.
11499 Don't assume `vg->pvs != NULL' when iterating through it.
11500
58cd3d85 115012008-04-13 Robert Millan <rmh@aybabtu.com>
11502
11503 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
11504 * genmk.rb (partmap): New variable.
11505 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
11506 (#{partmap}): New target rule.
11507 * genpartmaplist.sh: New file.
11508 * Makefile.in (pkglib_DATA): Add partmap.lst.
11509 (partmap.lst): New target rule.
11510 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
11511 modules (including all partition maps), instead of preloading them.
11512
78b51059 115132007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
11514
11515 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
11516 `linux-boot-prober' (if installed) to detect other operating
11517 systems which are installed on the computer and add them to
11518 the boot menu.
11519 * conf/common.rmk: Build and install 30_os-prober.
11520
a91627b4 115212008-04-12 Robert Millan <rmh@aybabtu.com>
11522
11523 * kern/powerpc/ieee1275/init.c: Move from here ...
11524 * kern/ieee1275/init.c: ... to here. Update all users.
11525
11526 * kern/powerpc/ieee1275/cmain.c: Move from here ...
11527 * kern/ieee1275/cmain.c: ... to here. Update all users.
11528
11529 * kern/powerpc/ieee1275/openfw.c: Move from here ...
11530 * kern/ieee1275/openfw.c: ... to here. Update all users.
11531
11532 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
11533 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
11534
322562ea 115352008-04-10 Pavel Roskin <proski@gnu.org>
11536
11537 * configure.ac: Always use "_cv_" in cache variables for
11538 compatibility with Autoconf 2.62.
11539
a02a73c5 115402008-04-07 Robert Millan <rmh@aybabtu.com>
11541
11542 Revert grub/machine/init.h addition by Pavel (since it breaks on
11543 i386-ieee1275 and others):
11544 * util/i386/pc/misc.c: Remove grub/machine/init.h.
11545 * util/powerpc/ieee1275/misc.c: Likewise.
11546
25c024b1 115472008-04-07 Robert Millan <rmh@aybabtu.com>
11548
11549 * util/grub-probe.c (probe): Improve error message.
11550
3cbd2f98 115512008-04-07 Robert Millan <rmh@aybabtu.com>
11552
11553 * util/biosdisk.c (read_device_map): Skip devices that don't exist
11554 (this prevents the presence of a bogus entry from ruining the whole
11555 thing).
11556
87a297bf 115572008-04-06 Pavel Roskin <proski@gnu.org>
11558
36747a62 11559 * util/biosdisk.c: Include grub/util/biosdisk.h.
11560 * util/grub-fstest.c (execute_command): Make static.
11561 * util/grub-mkdevicemap.c (check_device): Likewise.
11562 * util/i386/pc/misc.c: Include grub/machine/init.h.
11563 * util/powerpc/ieee1275/misc.c: Likewise.
11564 * util/lvm.c: Include grub/util/lvm.h.
11565 * util/misc.c: Include grub/kernel.h, grub/misc.h and
11566 grub/cache.h.
11567 * util/raid.c: Include grub/util/raid.h.
11568 (grub_util_getdiskname): Make static.
11569
87a297bf 11570 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
11571 grub_hostfs_fini(), as they are called from grub_init_all() and
11572 grub_fini_all() respectively. This fixes an infinite loop in
11573 grub-fstest due to double registration of hostfs.
11574 Reported by Christian Franke <Christian.Franke@t-online.de>
11575
f6ce7629 115762008-04-05 Pavel Roskin <proski@gnu.org>
11577
11578 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
11579 all 8 functions. Otherwise, probe function 0 only.
11580
070e49e4 115812008-04-04 Pavel Roskin <proski@gnu.org>
11582
8b088a4c 11583 * commands/lspci.c (grub_lspci_iter): Print the bus number
11584 correctly.
11585
4f657021 11586 * commands/lspci.c (grub_pci_classes): Fix typos.
11587 (grub_lspci_iter): Don't print func twice. Print vendor ID
11588 before device ID, as it's normally done.
11589
070e49e4 11590 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11591 Fix signedness warnings.
11592 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
11593 Likewise.
11594 * util/ieee1275/get_disk_name.c: Include config.h so that
11595 _GNU_SOURCE is defined and getline() is declared. Mark an
11596 unused argument as such. Fix a signedness warning.
11597
ba7328dc 115982008-04-02 Pavel Roskin <proski@gnu.org>
11599
26887f22 11600 * genkernsyms.sh.in: Use more robust assignments for CC and
11601 srcdir. Quote srcdir.
11602 * gensymlist.sh.in: Likewise. Assert at the compile time that
11603 the symbol table is not empty.
11604
ba7328dc 11605 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
11606 * fs/cpio.c (grub_cpio_read): Likewise.
11607
0f582c6b 116082008-04-01 Pavel Roskin <proski@gnu.org>
11609
4b6e1995 11610 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
11611 * disk/host.c (grub_host_open): Likewise.
11612 * disk/loopback.c (grub_loopback_open): Likewise.
11613 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
11614 disk->id as in disk/host.c, not a multi-character constant.
11615
828a2768 11616 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
11617 later is obsolete, potentially dangerous and sets a bad example.
11618 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
11619 * util/misc.c (grub_util_get_image_size): Likewise.
11620
2bb4fb47 11621 * disk/loopback.c (options): Improve help for "--partitions".
11622
0f582c6b 11623 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
11624 options to align them with the short options, e.g. "echo -e".
11625
a33224e0 116262008-03-31 Bean <bean123ch@gmail.com>
11627
11628 * video/reader/png.c (grub_png_data): New member is_16bit and
11629 image_data.
11630 (grub_png_decode_image_header): Detect 16 bit png image.
11631 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
11632 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
11633 (grub_video_reader_png): Release memory occupied by image_data.
11634
11635 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
11636 4096 bytes.
11637 (grub_nfs_mount): Skip the test for sector per cluster.
11638
11639 * include/grub/ntfs.h (MAX_SPC): Removed.
11640
86cb4f54 116412008-03-31 Bean <bean123ch@gmail.com>
11642
11643 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
11644 (grub_probe_SOURCES): Add fs/afs.c.
11645 (grub_fstest_SOURCES): Likewise.
11646 (afs_mod_SOURCES): New variable.
11647 (afs_mod_CFLAGS): Likewise.
11648 (afs_mod_LDFLAGS): Likewise.
11649
11650 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
11651 (grub_emu_SOURCES): Likewise.
11652
11653 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11654
11655 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11656
11657 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11658
11659 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11660
11661 * fs/afs.c: New file.
11662
17c74c21 116632008-03-30 Pavel Roskin <proski@gnu.org>
11664
4cb68e89 11665 * disk/host.c: Include grub/misc.h to fix a warning.
11666 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
11667 warnings about implicit declarations.
11668
8790bb04 11669 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
11670 variable.
11671 * include/grub/i386/loader.h: Change declaration of
11672 grub_linux_boot() to match what grub_loader_set() expects.
11673 * util/getroot.c (grub_guess_root_device): Return const char* to
11674 fix a warning.
11675 * util/grub-probe.c (probe): Fix a warning about uninitialized
11676 abstraction_name variable.
11677 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
11678 second argument as unused to fix a warning.
11679
9a3f3296 11680 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
11681 missing grub_error() call.
11682
0ecef90d 11683 * util/update-grub_lib.in: Define datarootdir, since Autoconf
11684 2.60 and newer uses it to define datadir.
11685
0bf6d401 11686 * commands/sleep.c: Fix warning about implicit declaration.
11687 * disk/memdisk.c: Likewise.
11688 * loader/aout.c: Likewise.
11689 * loader/i386/bsd_normal.c: Likewise.
11690 * util/grub-probe.c: Likewise.
11691
7cdacf97 11692 * commands/i386/cpuid.c (has_longmode): Make static.
11693 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
11694 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
11695
17c74c21 11696 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
11697 GDT. This is more robust, as %ds can change.
11698 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
11699 calling real_to_prot().
11700 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
11701
80a3e68b 117022008-03-28 Pavel Roskin <proski@gnu.org>
11703
11704 * kern/i386/pc/startup.S: Assert that uncompressed functions
11705 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
11706 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
11707 code, as they push parts of the code (error handlers) beyond
11708 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
11709 code as correctness and size.
11710
77bcd272 117112008-03-28 Pavel Roskin <proski@gnu.org>
11712
11713 * kern/i386/pc/startup.S
11714 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
11715 data block address to the real mode, keep offset minimal. This
11716 works around a bug in AWARD BIOS on old Athlon systems, which
11717 makes CD detection hang.
11718
c5dfd43b 117192008-03-26 Pavel Roskin <proski@gnu.org>
11720
11721 * normal/color.c (grub_parse_color_name_pair): Make `name' a
11722 const.
11723 * include/grub/normal.h: Add grub_parse_color_name_pair()
11724 declaration.
11725
bf962df2 117262008-03-24 Bean <bean123ch@gmail.com>
11727
11728 * disk/i386/pc/biosdisk.c (cd_start): Removed.
11729 (cd_count): Removed.
11730 (cd_drive): New variable.
11731 (grub_biosdisk_get_drive): Don't check for (cdN) device.
11732 (grub_biosdisk_call_hook): Likewise.
11733 (grub_biosdisk_iterate): Change cdrom detection method.
11734 (grub_biosdisk_open): Replace cd_start with cd_drive.
11735 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
11736 detect cdrom device.
11737
11738 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
11739 Removed.
11740 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
11741 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
11742 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
11743 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
11744 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
11745 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
11746 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
11747 (grub_biosdisk_cdrp): New structure.
11748 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
11749
11750 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
11751
11752 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
11753 device.
11754
11755 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
11756 New function.
11757
68e7fc7a 117582008-03-20 Robert Millan <rmh@aybabtu.com>
11759
11760 Remove 2 TiB limit in ata.mod.
11761 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
11762 (grub_ata_dumpinfo): Print sector count with 0x%llx.
11763 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
11764 grub_uint64_t instead of grub_uint32_t.
11765
38ad2cf5 117662008-03-05 Bean <bean123ch@gmail.com>
11767
11768 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
11769 (grub_multiboot): Set boot device.
11770
11771 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
11772
2b89344e 117732008-03-02 Bean <bean123ch@gmail.com>
11774
11775 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
11776 symlink_buffer.
11777
87a95d1f 117782008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
11779
11780 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
11781 texinfo.tex.
11782
11783 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
11784 modified.
11785
11786 * docs/fdl.texi: New file.
f19dbdb7 11787
87a95d1f 11788 * docs/mdate-sh: New file. Copied from gnulib.
11789 * docs/texinfo.tex: Likewise.
11790
11791 * config.guess: Updated from gnulib.
11792 * install-sh: Likewise.
11793
7dc15d8e 117942008-02-28 Robert Millan <rmh@aybabtu.com>
11795
11796 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
11797 (aout_mod_SOURCES): New variable.
11798 (aout_mod_CFLAGS): Likewise.
11799 (aout_mod_LDFLAGS): Likewise.
11800
11801 * conf/i386-ieee1275.rmk: Likewise.
11802
b00ab696 118032008-02-28 Robert Millan <rmh@aybabtu.com>
11804
11805 * util/update-grub.in: Reorganise terminal validity check. Accept
11806 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
11807 Based on suggestion by Franklin PIAT.
11808
79ca2d78 118092008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
11810
11811 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
11812 function.
11813 * util/getroot.c (grub_util_check_block_device): New function that
11814 returns the given argument if it is a block device and returns NULL else.
11815 * util/grub-probe.c (argument_is_device): New variable.
11816 (probe): Promote device_name from a variable to an argument. Receive
11817 device_name from grub_util_check_block_device() if path is NULL and from
11818 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 11819 (options): Introduce new parameter '-d, --device'.
79ca2d78 11820 (main): Add description of the new parameter to the help screen.
11821 Rename path variable to argument. Set argument_is_device if the '-d'
11822 option is given. Pass argument to probe() depending on
11823 argument_is_device.
11824
0d16e571 118252008-02-24 Bean <bean123ch@gmail.com>
11826
11827 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
11828 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
11829 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
11830 (GRUB_ISO9660_VOLDESC_PART): Likewise.
11831 (GRUB_ISO9660_VOLDESC_END): Likewise.
11832 (grub_iso9660_primary_voldesc): New member escape.
11833 (grub_iso9660_data): New member joliet.
11834 (grub_iso9660_convert_string): New function.
11835 (grub_iso9660_mount): Detect joliet extension.
11836 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
11837 (grub_iso9660_iso9660_label): Likewise.
11838
11839 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
11840 (grub_setup_SOURCES): Add fs/udf.c.
11841 (grub_fstest_SOURCES): Likewise.
11842 (udf_mod_SOURCES): New variable.
11843 (udf_mod_CFLAGS): Likewise.
11844 (udf_mod_LDFLAGS): Likewise.
11845
11846 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
11847 (grub_emu_SOURCES): Likewise.
11848
11849 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11850
11851 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11852
11853 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11854
11855 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11856
11857 * fs/udf.c: New file.
11858
8a594a17 118592008-02-24 Robert Millan <rmh@aybabtu.com>
11860
11861 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
11862 (normal/lexer.c_DEPENDENCIES): New variables.
11863 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11864 (normal/lexer.c_DEPENDENCIES): Likewise.
11865 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
11866 (normal/lexer.c_DEPENDENCIES): Likewise.
11867 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
11868 (normal/lexer.c_DEPENDENCIES): Likewise.
11869 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11870 (normal/lexer.c_DEPENDENCIES): Likewise.
11871 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
11872 (normal/lexer.c_DEPENDENCIES): Likewise.
11873
2dc33c03 118742008-02-23 Robert Millan <rmh@aybabtu.com>
11875
11876 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
11877 since they were intended to be in hex. This didn't break previously
11878 because of a bug in gpt_partition_map_iterate() (see below).
11879
11880 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
11881 when checking the validity of GPT header.
11882 Remove `partno', since it always provides the same information as `i'.
11883
f6f4cfb0 118842008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
11885
11886 * include/grub/efi/time.h: Fix a wrong comment.
11887
79ff665f 118882008-02-19 Pavel Roskin <proski@gnu.org>
11889
11890 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
11891 message.
11892
d38e24c2 118932008-02-19 Bean <bean123ch@gmail.com>
11894
11895 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
11896 (aout_mod_SOURCES): New variable.
11897 (aout_mod_CFLAGS): Likewise.
11898 (aout_mod_LDFLAGS): Likewise.
11899 (_bsd_mod_SOURCES): New variable.
11900 (_bsd_mod_CFLAGS): Likewise.
11901 (_bsd_mod_LDFLAGS): Likewise.
11902 (bsd_mod_SOURCES): New variable.
11903 (bsd_mod_CFLAGS): Likewise.
11904 (bsd_mod_LDFLAGS): Likewise.
11905
11906 * include/grub/aout.h: New file.
11907
11908 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
11909
11910 * include/grub/i386/bsd.h: New file.
11911
11912 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
11913 to make it public.
11914
11915 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
11916 function is called, so that it's possible to change it inside the hook.
11917 (grub_elf64_load): Likewise.
11918 (grub_elf_file): Don't close the file if elf header is not found.
11919 (grub_elf_close): Close the file if grub_elf_file fails (The new
11920 grub_elf_file won't close it).
11921 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
11922 (grub_elf64_size): Likewise.
11923
11924 * kern/i386/loader.S (grub_unix_real_boot): New function.
11925
11926 * loader/aout.c: New file.
11927
11928 * loader/i386/bsd.c: New file.
11929
11930 * loader/i386/bsd_normal.c: New file.
11931
11932 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
11933
11934 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 11935 can test other formats.
d38e24c2 11936
b93bdb0f 119372008-02-19 Robert Millan <rmh@aybabtu.com>
11938
11939 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
11940 (grub_gpt_partition_type_empty): Redefine with macro from
11941 `<grub/gpt_partition.h>'.
11942 (gpt_partition_map_iterate): Adjust partition type comparison.
11943
11944 Export `entry' as partmap-specific `part.data' struct.
11945 (grub_gpt_header, grub_gpt_partentry): Move from here ...
11946
11947 * include/grub/gpt_partition.h (grub_gpt_header)
11948 (grub_gpt_partentry): ... to here (new file).
11949
11950 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
11951
11952 (grub_gpt_partition_type_bios_boot): New const variable, defined
11953 with macro from `<grub/gpt_partition.h>'.
11954
11955 (setup): Replace `first_start' with `embed_region', which keeps
11956 track of the embed region (and is partmap-agnostic).
11957
11958 Replace find_first_partition_start() with find_usable_region(),
11959 which finds a usable region for embedding using partmap-specific
11960 knowledge (supports PC/MSDOS and GPT).
11961
11962 Fix all assumptions that the embed region start at sector 1, using
11963 `embed_region.start' from now on. Similarly, use `embed_region.end'
11964 rather than `first_start' to calculate available size.
11965
11966 In grub_util_info() message, replace "into after the MBR" with an
11967 indication of the specific sector our embed region starts at.
11968
66cb40f6 119692008-02-19 Robert Millan <rmh@aybabtu.com>
11970
11971 * DISTLIST: Replace `commands/ieee1275/halt.c' and
11972 `commands/ieee1275/reboot.c' with `commands/halt.c' and
11973 `commands/reboot.c'.
11974 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11975 (halt_mod_SOURCES): Likewise.
11976 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
11977 (halt_mod_SOURCES): Likewise.
11978
b7202015 119792008-02-17 Christian Franke <franke@computer.org>
11980
11981 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
11982
32b0fc49 119832008-02-17 Robert Millan <rmh@aybabtu.com>
11984
11985 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11986 set `first_start' to 0 for non-PC/MSDOS partition maps.
11987
aca63502 119882008-02-16 Robert Millan <rmh@aybabtu.com>
11989
11990 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
11991 do not assume partition map is PC/MSDOS before performing checks that
11992 are specific to that layout.
11993
0de8be86 119942008-02-13 Robert Millan <rmh@aybabtu.com>
11995
11996 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
11997 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
11998 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
11999
c3db8364 120002008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
12001
12002 * configure.ac: Only a cosmetic change on the handling of
12003 -fno-stack-protector.
12004
f714229e 120052008-02-12 Alexandre Boeglin <alex@boeglin.org>
12006
c3db8364 12007 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
12008 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
12009 reboot.c.
f714229e 12010 (grub_install_SOURCES): Add halt.mod and reboot.mod.
12011 (halt_mod_SOURCES): New variable.
12012 (halt_mod_CFLAGS): Likewise.
12013 (halt_mod_LDFLAGS): Likewise.
12014 (reboot_mod_SOURCES): Likewise.
12015 (reboot_mod_CFLAGS): Likewise.
12016 (reboot_mod_LDFLAGS): Likewise.
12017
c3db8364 12018 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
12019 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
12020 reboot.c.
f714229e 12021 (halt_mod_SOURCES): Likewise.
12022 (reboot_mod_SOURCES): Likewise.
12023
c3db8364 12024 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
12025 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 12026 (reboot_mod_SOURCES): Likewise.
12027
12028 * commands/i386/pc/reboot.c: merge this file ...
12029
12030 * commands/ieee1275/reboot.c: ... and this file ...
12031
12032 * commands/reboot.c: ... to this file.
c3db8364 12033 Add some precompiler directive to include the correct header for
12034 each machine.
f714229e 12035
12036 * commands/ieee1275/halt.c: move this file ...
12037
12038 * commands/halt.c: ... to here.
c3db8364 12039 Add some precompiler directive to include the correct header for
12040 each machine.
f714229e 12041
12042 * include/grub/efi/efi.h (grub_reboot): New function declaration.
12043 (grub_halt): Likewise.
12044
12045 * kern/efi/efi.c (grub_reboot): New function.
12046 (grub_halt): Likewise.
12047
c74493e0 120482008-02-12 Robert Millan <rmh@aybabtu.com>
12049
12050 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
12051 /dev (like it is done for /dev/mapper). This doesn't provide support
12052 for EVMS, but at least it is now easy to identify the problem when it
12053 arises.
12054
d0db4b04 120552008-02-11 Robert Millan <rmh@aybabtu.com>
12056
12057 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
12058 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
12059 comparing it with -1, not 0.
12060
bf748642 120612008-02-10 Robert Millan <rmh@aybabtu.com>
12062
12063 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
12064 `disk/lvm.c'.
12065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12066 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
12067
12068 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
12069 `disk/lvm.c' to the end of the list.
12070 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
12071 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12072
b5db202a 120732008-02-10 Robert Millan <rmh@aybabtu.com>
12074
12075 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
12076 grub_print_error() instead. This will let user know why we're entering
12077 rescue mode.
12078 Based on suggestions from Sam Morris.
12079
83abee31 120802008-02-10 Alexandre Boeglin <alex@boeglin.org>
12081
12082 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
12083 on remaining N args, instead of "--" arg N times.
12084
78d5a08b 120852008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
12086
12087 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
12088 (fill_with_default_glyph): Changed to use unknown_glyph for fill
12089 pattern for unknown glyphs.
12090
68807e5f 120912008-02-09 Robert Millan <rmh@aybabtu.com>
12092
12093 * configure.ac: Probe for `help2man'.
12094 * Makefile.in (builddir): New variable.
12095 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
12096 or otherwise add a few flags/options to it.
12097 (install-local): For every executable utility or script that is
12098 installed, invoke $(HELP2MAN) to install a manpage based on --help
12099 output.
12100
12101 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
12102 that it doesn't prevent --help from working in build tree.
12103
12104 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
12105 with `bug-grub@gnu.org'.
12106 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
12107 * util/update-grub.in (usage): New function.
12108 Implement proper argument check, with support for --help and --version
12109 (as well as existing -y).
12110
121112008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 12112
12113 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
12114 avoid overwriting previous output.
12115 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
12116
c1962162 121172008-02-09 Robert Millan <rmh@aybabtu.com>
12118
12119 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
12120 drawing the menu.
12121
3dac2e3f 121222008-02-09 Robert Millan <rmh@aybabtu.com>
12123
12124 * commands/sleep.c: New file.
12125 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
12126 (sleep_mod_SOURCES): New variable.
12127 (sleep_mod_CFLAGS): Likewise.
12128 (sleep_mod_LDFLAGS): Likewise.
12129
7a634e08 121302008-02-09 Robert Millan <rmh@aybabtu.com>
12131
12132 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
12133 situations in which we can deduce the RAID size and the superblock
12134 doesn't match it.
12135
b92f0c18 121362008-02-09 Robert Millan <rmh@aybabtu.com>
12137
12138 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
12139 and return a grub_diskmemberlist_t composed of LVM physical volumes.
12140 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
12141
12142 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
12143 and return a grub_diskmemberlist_t composed of physical array members.
12144 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
12145
12146 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
12147 prototype.
12148 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
12149 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
12150 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
12151
12152 * util/grub-probe.c (probe): Move partmap probing code from here ...
12153 (probe_partmap): ... to here.
12154 (probe): Use probe_partmap() once for the disk we're probing, and
12155 additionally, when such disk contains a memberlist() struct member,
12156 once for each disk that is contained in the structure returned by
12157 memberlist().
12158
91a4bf68 121592008-02-09 Robert Millan <rmh@aybabtu.com>
12160
12161 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
12162 environment variable to 'all' in order to obtain debug output from
12163 non-util/ code.
12164 * util/i386/pc/grub-setup.c (main): Likewise.
12165
a96f9caa 121662008-02-08 Robert Millan <rmh@aybabtu.com>
12167
12168 * disk/raid.c (grub_raid_scan_device): Check for
12169 `array->device[sb.this_disk.number]' rather than for
12170 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 12171 guaranteed to be accessible.
a96f9caa 12172
b37a9222 121732008-02-08 Robert Millan <rmh@aybabtu.com>
12174
12175 * disk/raid.c: Update copyright.
12176 * fs/cpio.c: Likewise.
12177 * include/grub/raid.h: Likewise.
12178 * loader/i386/pc/multiboot.c: Likewise.
12179 * util/hostfs.c: Likewise.
12180
5626aee1 121812008-02-08 Robert Millan <rmh@aybabtu.com>
12182
12183 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
12184 to a grub_disk_t array.
12185 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
12186 `device[x]'.
12187 (grub_raid_scan_device): Replace `device[x].name' accesses with
12188 `device[x]->name'. Simplify initialization of `array->device[x]'.
12189
554f0187 121902008-02-08 Robert Millan <rmh@aybabtu.com>
12191
12192 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
12193 grub_dprintf() calls.
12194 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
12195 error message.
12196
1ec8425d 121972008-02-07 Christian Franke <franke@computer.org>
12198
12199 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
12200 instead of fseek and ftell to support large files.
12201 (grub_hostfs_read): Likewise.
12202
f2156fda 122032008-02-07 Robert Millan <rmh@aybabtu.com>
12204
12205 Patch from Jeroen Dekkers.
12206 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 12207 failure, since successfully reading all array members might not be
f2156fda 12208 required.
12209
9216e0e7 122102008-02-06 Robert Millan <rmh@aybabtu.com>
12211
12212 * util/grub-probe.c (probe): Simplify partmap probing (with the
12213 assumption that the first word up to the underscore equals to
12214 the module name).
12215
b0dfd29a 122162008-02-06 Christian Franke <franke@computer.org>
12217
12218 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
12219 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
12220 last block of a cpio or tar stream.
12221 Check for "TRAILER!!!" instead of any empty data
12222 block to detect last block of a cpio stream.
12223 (grub_cpio_dir): Fix constness of variable np.
12224 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
12225 cpio or tar trailer is detected. This fixes a crash
12226 on open of a non existing file.
12227
c32865bf 122282008-02-05 Bean <bean123ch@gmail.com>
12229
12230 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
12231 address of entry.
12232 (grub_multiboot_load_elf64): Likewise.
12233 (grub_multiboot): Initialize mbi structure.
12234
12235 * util/grub-fstest.c: Don't include unused header file script.h.
12236
fe6b695a 12237 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 12238 of file.
12239 (grub_fstest_SOURCES): Likewise.
12240
409480b7 122412008-02-05 Robert Millan <rmh@aybabtu.com>
12242
12243 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
12244 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
12245 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
12246 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
12247
12248 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
12249 (translation_table): Replace hardcoded values with macros
12250 provided by `<grub/term.h>'.
12251
12252 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
12253 (keyboard_map): Correct/add a few values, with macros provided
12254 by `<grub/term.h>'.
12255 (keyboard_map_shift): Zero values that don't differ from their
12256 `keyboard_map' equivalents.
12257 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
12258 Discard the second scan code that is always sent by Caps lock.
12259 Only use `keyboard_map_shift' when it provides a non-zero value,
12260 otherwise fallback to `keyboard_map'.
12261
99fadbaa 122622008-02-04 Bean <bean123ch@gmail.com>
12263
12264 * Makefile.in (enable_grub_fstest): New variable.
12265
12266 * conf/common.rmk (grub_fstest_init.lst): New rule.
12267 (grub_fstest_init.h): Likewise.
12268 (grub_fstest_init.c): Likewise.
12269 (util/grub-fstest.c_DEPENDENCIES): New variable.
12270 (grub_fstest_SOURCES): Likewise.
12271
12272 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
12273
12274 * util/grub-fstest.c: New file.
12275
bf567c50 122762008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
12277
12278 Make grub-setup handle a separate root device.
f19dbdb7 12279
bf567c50 12280 * util/i386/pc/grub-setup.c (setup): Always open the root device,
12281 so that the root device can be compared with the destination
12282 device.
12283 When embedding the core image, if the root and destination devices
12284 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
12285 0xFF.
12286 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 12287
9be6b98b 122882008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
12289
12290 Add support for having a grub directory in a different drive. This
12291 is still only the data handling part.
f19dbdb7 12292
9be6b98b 12293 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
12294 (codestart): Save %dh in GRUB_ROOT_DRIVE.
12295 (grub_root_drive): New variable.
12296
12297 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
12298 instead of GRUB_BOOT_DRIVE to construct a device name. Set
12299 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
12300 as it was.
12301
12302 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
12303
12304 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
12305 macro.
12306 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
12307
12308 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
12309 is bogus, because PXE booting does not specify any drive
12310 correctly.
12311
12312 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
12313 am not sure if this is really correct.
12314
12315 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
12316 is always identical to the boot drive when booting from a CD.
12317
12318 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
12319 longer.
12320 (root_drive): New variable.
12321 (real_start): Unconditionally set %dh to ROOT_DRIVE.
12322 (setup_sectors): Push %dx right after popping it, because %dh will
12323 be modified later.
12324 (copy_buffer): Restore %dx.
12325
e0ca0677 123262008-02-03 Robert Millan <rmh@aybabtu.com>
12327
12328 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
12329 use `cdboot.img' for cdrom images.
12330
3b3f6629 123312008-02-03 Robert Millan <rmh@aybabtu.com>
12332
12333 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
12334 only setup gfxterm when `font' command has succeeded.
12335
d42b3672 123362008-02-03 Robert Millan <rmh@aybabtu.com>
12337
12338 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
12339 (grub_rescue_cmd_multiboot_loader)
12340 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
12341
fa370ea6 123422008-02-03 Pavel Roskin <proski@gnu.org>
12343
e0c5dacb 12344 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 12345 %edx and %esi from stack only after grub_gate_a20() is called.
12346 grub_gate_a20() clobbers %edx.
12347
f2a76e1d 123482008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
12349
12350 * configure.ac (AC_INIT): Bumped to 1.96.
12351
12352 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
12353 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
12354 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
12355 video/readers/png.c.
12356
90fd32d1 123572008-02-03 Bean <bean123ch@gmail.com>
9be665dd 12358
12359 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
12360 (cdboot_img_SOURCES): New variable.
12361 (cdboot_img_ASFLAGS): New variable.
12362 (cdboot_img_LDFLAGS): New variable.
12363
12364 * boot/i386/pc/cdboot.S: New file.
12365
12366 * disk/i386/pc/biosdisk.c (cd_start): New variable.
12367 (cd_count): Likewise.
12368 (grub_biosdisk_get_drive): Add support for cd device.
12369 (grub_biosdisk_call_hook): Likewise.
12370 (grub_biosdisk_iterate): Likewise.
12371 (grub_biosdisk_open): Likewise.
12372 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
12373 (grub_biosdisk_rw): Support reading from cd device.
12374 (GRUB_MOD_INIT): Iterate cd devices.
12375
12376 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
12377 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
12378 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
12379
12380 * kern/i386/pc/init.c (make_install_device): Check for cd device.
12381
4020aa53 123822008-02-02 Robert Millan <rmh@aybabtu.com>
12383
12384 * commands/read.c: New file.
12385 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
12386 (read_mod_SOURCES): New variable.
12387 (read_mod_CFLAGS): Likewise.
12388 (read_mod_LDFLAGS): Likewise.
12389
e03a1132 123902008-02-02 Robert Millan <rmh@aybabtu.com>
12391
12392 * normal/main.c (grub_normal_execute): Check for `menu->size' when
12393 determining whether menu has to be displayed.
12394
58c69220 123952008-02-02 Marco Gerards <marco@gnu.org>
12396
12397 * bus/pci.c: New file.
12398
12399 * include/grub/pci.h: Likewise.
12400
12401 * include/grub/i386/pc/pci.h: Likewise.
12402
12403 * commands/lspci.c: Likewise.
12404
12405 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
12406 `lspci.mod'.
12407 (pci_mod_SOURCES): New variable.
12408 (pci_mod_CFLAGS): Likewise.
12409 (pci_mod_LDFLAGS): Likewise.
12410 (lspci_mod_SOURCES): Likewise.
12411 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 12412 (lspci_mod_LDFLAGS): Likewise.
58c69220 12413
c004e1b4 124142008-02-02 Bean <bean123ch@gmail.com>
12415
12416 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
12417 (grub_ufs_get_file_block): Fix indirect block calculation problem.
12418
12419 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
12420 (grub_xfs_btree_node): New structure.
12421 (grub_xfs_btree_root): New structure.
12422 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
12423 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
12424 (GRUB_XFS_EXTENT_BLOCK): Likewise.
12425 (GRUB_XFS_EXTENT_SIZE): Likewise.
12426 (grub_xfs_read_block): Support btree format type.
12427 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
12428 Use directory block as basic unit.
12429
12430 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
12431
12432 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
12433 __attribute__ ((__regparm__ (1))).
12434
f95562bf 124352008-02-01 Robert Millan <rmh@aybabtu.com>
12436
12437 Correct a mistake in previous commit.
12438
12439 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
12440 top.
12441 (normal/command.c_DEPENDENCIES): New variable.
12442
7d31f41f 124432008-02-01 Robert Millan <rmh@aybabtu.com>
12444
12445 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
12446 top.
12447 (normal/command.c_DEPENDENCIES): New variable.
12448 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
12449 * conf/i386-ieee1275.rmk: Likewise.
12450 * conf/i386-linuxbios.rmk: Likewise.
12451 * conf/i386-pc.rmk: Likewise.
12452 * conf/sparc64-ieee1275.rmk: Likewise.
12453 * conf/powerpc-ieee1275.rmk: Likewise.
12454 (grub_emu_SOURCES): Add `fs/fshelp.c'.
12455
12456 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
12457
60b6be74 124582008-02-01 Robert Millan <rmh@aybabtu.com>
12459
12460 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
12461 call at beginning of function.
12462
078522ab 124632008-01-31 Pavel Roskin <proski@gnu.org>
12464
12465 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 12466 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
12467 (grub_mkrescue_SOURCES): Likewise.
078522ab 12468 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
12469
ccaa8a5f 124702008-01-30 Robert Millan <rmh@aybabtu.com>
12471
12472 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
12473 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
12474 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
12475 (grub_probe_SOURCES): ... to here.
12476
12477 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
12478 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
12479 * conf/i386-ieee1275.rmk: Likewise.
12480 * conf/i386-linuxbios.rmk: Likewise.
12481 * conf/powerpc-ieee1275.rmk: Likewise.
12482
ae5a9cd7 124832008-01-30 Tristan Gingold <gingold@free.fr>
12484
12485 * kern/rescue.c: Silently accept empty lines.
12486
70bc2ef2 124872008-01-29 Bean <bean123ch@gmail.com>
12488
12489 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
12490 (real_code_2): Code cleanup and change comment style.
12491 (move_memory): Avoid using 32-bit address mode.
12492
6a4d50ea 124932008-01-29 Bean <bean123ch@gmail.com>
12494
12495 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
12496 (png_mod_SOURCES): New variable.
12497 (png_mod_CFLAGS): Likewise.
12498 (png_mod_LDFLAGS): Likewise.
12499
12500 * video/readers/png.c: New file.
12501
11cc30ac 125022008-01-28 Robert Millan <rmh@aybabtu.com>
12503
12504 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
12505 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
12506 `ifndef GRUB_MOD_GAP' hack.
12507 * util/elf/grub-mkimage.c (add_segments): Likewise.
12508
3abc589f 125092008-01-27 Robert Millan <rmh@aybabtu.com>
12510
12511 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
12512 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 12513 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 12514
e1907778 125152008-01-27 Robert Millan <rmh@aybabtu.com>
12516
12517 Get grub-emu to build again (including parallel builds).
12518
12519 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
12520 Split into ...
12521 (util/grub-emu.c_DEPENDENCIES): ... this, ...
12522 (normal/execute.c_DEPENDENCIES): ... this, ...
12523 (grub-emu_DEPENDENCIES): ... and this.
12524
12525 * conf/i386-efi.rmk: Likewise.
12526 * conf/i386-linuxbios.rmk: Likewise.
12527 * conf/i386-ieee1275.rmk: Likewise.
12528 * conf/powerpc-ieee1275.rmk: Likewise.
12529 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
12530
2216b101 125312008-01-27 Robert Millan <rmh@aybabtu.com>
12532
12533 * NEWS: Add a few items.
12534
f75172d9 125352008-01-27 Robert Millan <rmh@aybabtu.com>
12536
12537 Fix parallel builds with grub-emu. Based on earlier commit for
12538 grub-probe and grub-setup.
12539
12540 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
12541 (util/grub-emu.c_DEPENDENCIES): ... this.
12542 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
12543 (util/grub-emu.c_DEPENDENCIES): ... this.
12544 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
12545 (util/grub-emu.c_DEPENDENCIES): ... this.
12546 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
12547 (util/grub-emu.c_DEPENDENCIES): ... this.
12548 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
12549 (util/grub-emu.c_DEPENDENCIES): ... this.
12550
3f51de77 125512008-01-27 Pavel Roskin <proski@gnu.org>
12552
12553 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
12554 to create a gap between _end and the modules added to the image
12555 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
12556 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
12557 * util/elf/grub-mkimage.c (add_segments): Likewise.
12558
2033f53e 125592008-01-26 Pavel Roskin <proski@gnu.org>
12560
12561 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
12562 just return an error.
12563
22da1f6f 125642008-01-26 Bean <bean123ch@gmail.com>
12565
12566 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
12567 (grub_reiserfs_get_item): Save offset of the next item.
12568 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
12569
2a9525e6 125702008-01-25 Robert Millan <rmh@aybabtu.com>
12571
12572 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
12573 make all filesystem sources appear together (possibly fixing omissions
12574 while at it).
12575 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
12576 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12577 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
12578 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12579
12580 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
12581 add `kern/file.c'.
12582 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
12583 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
12584 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
12585 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
12586
12587 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
12588 (probe): Add a sanity check to make sure of our ability to read
12589 requested files when probing for filesystem type.
12590
12591 * genmk.rb: Update copyright year (2007).
12592
12593 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
12594 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
12595 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
12596 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
12597 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
12598 : Remove function prototypes.
12599
b95f71b5 126002008-01-25 Robert Millan <rmh@aybabtu.com>
12601
12602 Revert my previous commits (based on wrong assumption of how grub_errno
12603 works).
12604
fe6b695a 12605 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 12606 * kern/file.c (grub_file_open): Likewise.
12607
d08bbb49 126082008-01-24 Pavel Roskin <proski@gnu.org>
12609
12610 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
12611 that hang if GRUB tries to setup colors.
12612 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
12613 colors for firmwares that don't support it.
12614 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
12615 Recognize Open Hack'Ware, set flags to work around its
12616 limitations.
12617
605e36ed 126182008-01-24 Robert Millan <rmh@aybabtu.com>
12619
12620 * kern/file.c (grub_file_open): Do not account previous failures of
12621 unrelated functions when grub_errno is checked for.
12622 Reported by Oleg Strikov.
12623
bac332a1 126242008-01-24 Bean <bean123ch@gmail.com>
12625
12626 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
12627 (grub_ufs_sblock): New member volume name.
12628 (grub_ufs_find_file): Fix string copy bug.
12629 (grub_ufs_label): Implement this function properly.
12630
12631 * fs/hfs.c (grub_hfs_cnid_type): New enum.
12632 (grub_hfs_iterate_records): Use the correct file number for extents
12633 and catalog file. Fix problem in next index calculation.
12634 (grub_hfs_find_node): Replace recursive function call with loop.
12635 (grub_hfs_iterate_dir): Replace recursive function call with loop.
12636
15c80c09 126372008-01-23 Robert Millan <rmh@aybabtu.com>
12638
12639 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
12640 `<grub/symbol.h>' and `<grub/multiboot.h>'.
12641 (grub_multiboot2_real_boot): New function prototype.
12642
12643 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
12644 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
12645
12646 * kern/i386/ieee1275/init.c (grub_os_area_addr)
12647 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
12648
305338fd 126492008-01-23 Robert Millan <rmh@aybabtu.com>
12650
12651 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
12652 #ifdef'ed out grub_printf().
12653
3ea52685 126542008-01-23 Robert Millan <rmh@aybabtu.com>
12655
12656 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
12657 grub_dprintf calls, since they make "debug=all" mode unusable.
12658 (grub_console_checkkey): Likewise.
12659
5882ae4b 126602008-01-23 Robert Millan <rmh@aybabtu.com>
12661
12662 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
12663 `term/i386/pc/at_keyboard.c'.
12664 (pkglib_MODULES): Add `serial.mod'.
12665 (serial_mod_SOURCES): New variable.
12666 (serial_mod_CFLAGS): Likewise.
12667 (serial_mod_LDFLAGS): Likewise.
12668
12669 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
12670 `<grub/powerpc/ieee1275/console.h>'.
12671 (grub_keyboard_controller_init): New function prototype.
12672 (grub_console_checkkey): Likewise.
12673 (grub_console_getkey): Likewise.
12674
12675 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
12676 keyboard on i386.
12677
12678 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
12679 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
12680
06ab5303 126812008-01-23 Robert Millan <rmh@aybabtu.com>
12682
12683 * kern/i386/pc/init.c (make_install_device): When memdisk image is
12684 present, "(memdisk)/boot/grub" becomes the default prefix.
12685
12686 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
12687 a memdisk tarball with all the modules. Add --overlay=DIR option that
12688 allows users to overlay additional files into the image.
12689
dbb475a4 126902008-01-23 Robert Millan <rmh@aybabtu.com>
12691
12692 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
12693 and `machine/memory.h'.
12694 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
12695 (_multiboot_mod_SOURCES): New variable.
12696 (_multiboot_mod_CFLAGS): Likewise.
12697 (_multiboot_mod_LDFLAGS): Likewise.
12698 (multiboot_mod_SOURCES): Likewise.
12699 (multiboot_mod_CFLAGS): Likewise.
12700 (multiboot_mod_LDFLAGS): Likewise.
12701
12702 * include/grub/i386/ieee1275/loader.h: New file.
12703
12704 * include/grub/i386/ieee1275/machine.h: Likewise.
12705
12706 * include/grub/i386/ieee1275/memory.h: Likewise.
12707
12708 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
12709 variable declaration.
12710 (grub_os_area_size): Likewise.
12711
12712 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
12713 (grub_lower_mem, grub_upper_mem): New variables.
12714 (grub_stop_floppy): New function (just to make
12715 grub_multiboot2_real_boot() happy).
12716
12717 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
12718 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
12719 (grub_stop): New function.
12720 Include `"../realmode.S"' and `"../loader.S"'.
12721
12722 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
12723 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
12724
12725 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
12726 rely on grub_multiboot2_real_boot() for final boot.
12727
25638629 127282008-01-22 Robert Millan <rmh@aybabtu.com>
12729
12730 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
12731 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
12732 device that doesn't look like an SD card.
12733 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12734 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
12735 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
12736 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
12737 found.
12738
9dad816d 127392008-01-22 Robert Millan <rmh@aybabtu.com>
12740
12741 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
12742 avoid claiming over our own code.
12743
34842f2d 127442008-01-22 Bean <bean123ch@gmail.com>
12745
12746 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
12747 (jpeg_mod_SOURCES): New variable.
12748 (jpeg_mod_CFLAGS): Likewise.
12749 (jpeg_mod_LDFLAGS): Likewise.
12750
12751 * video/readers/jpeg.c : New file.
12752
44023a28 127532008-01-22 Bean <bean123ch@gmail.com>
12754
12755 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
12756 there are no more items.
12757
bc2d8ac6 127582008-01-21 Robert Millan <rmh@aybabtu.com>
12759
12760 * kern/mm.c (grub_mm_init_region): Improve debug message.
12761
261bd4bc 127622008-01-21 Robert Millan <rmh@aybabtu.com>
12763
12764 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
12765 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
12766 address.
12767 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
12768 a C macro.
12769 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
12770 Indicates start of upper memory.
12771 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
12772 (generate_image): Abort when image size is big enough to corrupt
12773 upper memory.
12774
12775 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
12776 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
12777 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
12778 instead of hardcoding 0xA0000.
12779 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
12780 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
12781 instead of hardcoding 0xA0000.
12782
f970b55e 127832008-01-21 Robert Millan <rmh@aybabtu.com>
12784
12785 * disk/memdisk.c (memdisk_size): New variable.
12786 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
12787 `memdisk_size'.
12788 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
12789 image to dynamic memory.
12790 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
12791 `memdisk_size'. Free memdisk block.
12792
1a8b0526 127932008-01-21 Robert Millan <rmh@aybabtu.com>
12794
12795 Fix detection of very small filesystems (like tar).
12796
12797 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
12798 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
12799 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
12800 a problem with this disk).
12801
6e9b4aab 128022008-01-21 Robert Millan <rmh@aybabtu.com>
12803
12804 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
12805 on grub_biosdisk_rw_standard() error.
12806
0d8837b2 128072008-01-21 Robert Millan <rmh@aybabtu.com>
12808
12809 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
12810 recent changes.
12811 * kern/elf.c: Likewise.
12812 * kern/ieee1275/ieee1275.c: Likewise.
12813 * kern/powerpc/ieee1275/openfw.c: Likewise.
12814 * term/ieee1275/ofconsole.c: Likewise.
12815
ffd36e34 128162008-01-21 Robert Millan <rmh@aybabtu.com>
12817
12818 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
12819
3f0093d0 12820 * include/grub/kernel.h (grub_arch_memdisk_addr)
12821 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 12822
3f0093d0 12823 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
12824 (grub_arch_memdisk_size): ... to here.
ffd36e34 12825
6c391b21 128262008-01-21 Robert Millan <rmh@aybabtu.com>
12827
12828 Mostly based on bugfix from Bean.
12829
12830 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
12831 attribute with hook() parameter.
12832 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
12833 declaration.
12834 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
12835 attribute with hook() parameter.
12836 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
12837 declaration.
12838
55a581dc 128392008-01-21 Robert Millan <rmh@aybabtu.com>
12840
12841 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
12842 (pkglib_MODULES): Add `memdisk.mod'.
12843 (memdisk_mod_SOURCES): New variable.
12844 (memdisk_mod_CFLAGS): Likewise.
12845 (memdisk_mod_LDFLAGS): Likewise.
12846
12847 * disk/memdisk.c: New file.
12848
12849 * include/grub/disk.h (grub_disk_dev_id): Add
12850 `GRUB_DISK_DEVICE_MEMDISK_ID'.
12851
12852 * include/grub/i386/pc/kernel.h
12853 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
12854 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
12855 (grub_kernel_image_size): New variable declaration.
12856 (grub_total_module_size): Likewise.
12857 (grub_memdisk_image_size): Likewise.
12858
12859 * include/grub/i386/pc/memory.h
12860 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
12861
12862 * include/grub/kernel.h: Include `<grub/symbol.h>'.
12863 (grub_arch_memdisk_addr): New variable declaration.
12864 (grub_arch_memdisk_size): Likewise.
12865
12866 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
12867 (grub_arch_memdisk_size): Likewise.
12868
12869 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
12870 (codestart): Replace hardcoded `0x100000' with
12871 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
12872
12873 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
12874 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
12875 not NULL, append the contents of the file it refers to, at the end of
12876 the compressed kernel image. Initialize `grub_memdisk_image_size'
12877 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
12878 (options): Add "memdisk"|'m' option.
12879 (main): Parse --memdisk|-m option, and pass user-provided path as
12880 parameter to generate_image().
12881
3d7f54c9 128822008-01-20 Robert Millan <rmh@aybabtu.com>
12883
12884 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
12885 grub_dprintf() calls from here ...
12886 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
12887
0bf74728 128882008-01-20 Robert Millan <rmh@aybabtu.com>
12889
12890 Fix detection of "real mode" when /options/real-mode? doesn't exist.
12891
12892 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
12893 declaration.
12894 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
12895 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
12896 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 12897 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 12898 property).
12899 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
12900 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
12901
33bf70a7 129022008-01-19 Robert Millan <rmh@aybabtu.com>
12903
fe6b695a 12904 Get rid of confusing function (superseded by
33bf70a7 12905 `grub_ieee1275_get_integer_property')
12906 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
12907 prototype.
12908 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
12909 function.
12910 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
12911 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 12912 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 12913
e2da7d26 129142008-01-19 Robert Millan <rmh@aybabtu.com>
12915
12916 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
12917 command after "shut-down", since implementations differ on which
12918 the command for halt is.
12919
59f1fd8d 129202008-01-19 Robert Millan <rmh@aybabtu.com>
12921
12922 * include/grub/i386/linuxbios/console.h: Add header protection.
12923 (grub_keyboard_controller_init): New function prototype.
12924 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
12925 (KEYBOARD_COMMAND_READ): Likewise.
12926 (KEYBOARD_COMMAND_WRITE): Likewise.
12927 (KEYBOARD_SCANCODE_SET1): Likewise.
12928 (grub_keyboard_controller_write): New function.
12929 (grub_keyboard_controller_read): Likewise.
12930 (grub_keyboard_controller_init): Likewise.
12931
12932 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
12933 (grub_console_init): On coreboot/LinuxBIOS, call
12934 grub_keyboard_controller_init().
12935
5f5a7c15 129362008-01-19 Robert Millan <rmh@aybabtu.com>
12937
12938 PowerPC changes provided by Pavel Roskin.
12939
12940 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
12941 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
12942 don't rely on cmain() doing it.
12943 * kern/i386/ieee1275/startup.S (_start): Store %eax in
12944 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
12945
1210e168 129462008-01-16 Robert Millan <rmh@aybabtu.com>
12947
12948 * include/grub/i386/linuxbios/memory.h
12949 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
12950 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
12951 receive `table_header' as argument. Instead, probe for it in the
12952 known memory ranges where it can be present.
12953 (grub_available_iterate): Do not pass a fixed `table_header' address
12954 to grub_linuxbios_table_iterate().
12955
3d04eab8 129562008-01-15 Robert Millan <rmh@aybabtu.com>
12957
12958 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
12959 * conf/i386-ieee1275.rmk: New file.
12960 * include/grub/i386/ieee1275/console.h: Likewise.
12961 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
12962 * include/grub/i386/ieee1275/kernel.h: Likewise.
12963 * include/grub/i386/ieee1275/time.h: Likewise.
12964 * kern/i386/ieee1275/init.c: Likewise.
12965 * kern/i386/ieee1275/startup.S: Likewise.
12966
d1bc1b73 129672008-01-15 Robert Millan <rmh@aybabtu.com>
12968
12969 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
12970 when pointers are 32-bit (but still do set it to one when they are
12971 64-bit).
12972
66a65807 129732008-01-15 Robert Millan <rmh@aybabtu.com>
12974
12975 * include/grub/ieee1275/ieee1275.h
12976 (grub_ieee1275_get_integer_property): New function prototype.
12977
12978 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
12979 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 12980 grub_ieee1275_get_property() to handle endianness.
66a65807 12981
12982 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
12983 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 12984 where appropriate.
66a65807 12985 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
12986 (grub_map): Likewise.
12987 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
12988
a83ccafd 129892008-01-15 Bean <bean123ch@gmail.com>
12990
12991 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
12992 (grub_script_execute_cmdline): Reset grub_errno.
12993
12994 * normal/main.c (read_config_file): Reset grub_errno.
12995
12996 * normal/parse.y (script_init): New.
12997 (script): Move function and menuentry here.
12998 (delimiter): New.
12999 (command): Add delimiter at the end of command.
13000 (commands): Adjust to match the new command.
13001 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 13002 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 13003 (if): Use the new commands.
13004
13005 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
13006
df6ecfc6 130072008-01-15 Robert Millan <rmh@aybabtu.com>
13008
13009 * normal/menu.c (run_menu): Move timeout message from here ...
13010 (print_timeout): ... to here.
13011 (run_menu): Use print_timeout() once during initial draw to print
13012 the whole message, and again in every clock tick to update only
13013 the number of seconds.
13014
87ae25eb 130152008-01-15 Robert Millan <rmh@aybabtu.com>
13016
13017 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
13018 actual size of `available' from grub_ieee1275_get_property(), and
13019 restrict parsing to that bound.
13020
47bf09a4 130212008-01-15 Christian Franke <franke@computer.org>
13022
13023 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
13024 (argp_program_version): Remove variable.
13025 (argp_program_bug_address): Likewise.
13026 (options): Convert from struct argp_option to struct option.
13027 (struct arguments): Remove.
13028 (parse_opt): Remove.
13029 (usage): New function.
13030 (main): Replace struct args members by simple variables.
13031 Replace argp_parse() by getopt_long().
13032 Add switch to evaluate options.
13033 Add missing "(...)" around root_dev in prefix string.
13034
c86f1469 130352008-01-14 Robert Millan <rmh@aybabtu.com>
13036
13037 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
13038 for grub_ieee1275_exit(), in order to improve portability.
13039
e622c559 130402008-01-14 Robert Millan <rmh@aybabtu.com>
13041
13042 * util/grub.d/10_linux.in (prefix): Define.
13043 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
13044
44cb1ec8 130452008-01-13 Pavel Roskin <proski@gnu.org>
13046
13047 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
13048 grub_errno if no errors have been detected.
13049
1eb8c802 130502008-01-12 Robert Millan <rmh@aybabtu.com>
13051
13052 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
13053 (grub_util_get_dev_abstraction): New function prototype.
13054
13055 * util/getroot.c: Include `<grub/util/getroot.h>'
13056 (grub_util_get_grub_dev): Move detection of abstraction type to ...
13057 (grub_util_get_dev_abstraction): ... here (new function).
13058
13059 * util/grub-probe.c: Convert PRINT_* to an enum. Add
13060 `PRINT_ABSTRACTION'.
13061 (probe): Probe for abstraction type when requested.
13062 (main): Understand `--target=abstraction'.
13063
13064 * util/i386/efi/grub-install.in: Add abstraction module to core
13065 image when it is found to be necessary.
13066 * util/i386/pc/grub-install.in: Likewise.
13067 * util/powerpc/ieee1275/grub-install.in: Likewise.
13068
13069 * util/update-grub_lib.in (font_path): Return system path without
13070 converting to GRUB path.
13071 * util/update-grub.in: Convert system path returned by font_path()
13072 to a GRUB path. Use `grub-probe -t abstraction' to determine what
13073 abstraction module is needed for loading fonts (if any). Export
13074 that as `GRUB_PRELOAD_MODULES'.
13075 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
13076 insmod commands).
13077
52bd3de9 130782008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
13079
13080 Remove some unused code from reiserfs.
f19dbdb7 13081
52bd3de9 13082 * fs/reiserfs.c (struct grub_reiserfs_key)
13083 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
13084 (struct grub_reiserfs_node_body): Removed.
13085 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
13086 Likewise.
13087 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
13088 Likewise.
13089 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
13090 Likewise.
13091 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
13092 Likewise.
13093 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
13094 Likewise.
13095 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
13096 Likewise.
13097 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
13098 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
13099 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
13100
2f80039d 131012008-01-10 Robert Millan <rmh@aybabtu.com>
13102
13103 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
13104 Determines if a file is garbage left by packaging systems, etc.
13105 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
13106 for processing /etc/grub.d scripts.
13107 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
13108 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
13109 as a condition for processing Linux images.
13110
87888032 131112008-01-10 Pavel Roskin <proski@gnu.org>
13112
13113 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
13114 to compile reiserfs.c on PowerPC.
13115
7e54fced 131162008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 13117
13118 * kern/device.c (grub_device_iterate): Do not abort device iteration
13119 when one of the devices cannot be opened.
13120 * kern/disk.c (grub_disk_open): Do not account previous failures of
13121 unrelated functions when grub_errno is checked for.
13122
5aa541e6 131232008-01-08 Robert Millan <rmh@aybabtu.com>
13124
13125 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
13126 `! grub_linux_is_bzimage', change order of address comparison to make
13127 it more intuitive, and improve "too big zImage" error message.
13128
7076340d 131292008-01-08 Robert Millan <rmh@aybabtu.com>
13130
13131 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
13132 `$(update-grub_DATA)'.
13133 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
13134 targets.
13135
9ca70333 131362008-01-07 Robert Millan <rmh@aybabtu.com>
13137
13138 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
13139 which instruction is modified by grub-setup during installation
13140 (since it wasn't obvious by only looking at this file).
13141
38ccf575 131422008-01-07 Robert Millan <rmh@aybabtu.com>
13143
13144 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
13145 listing actual TODO items.
13146
f5db4291 131472008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13148
868967cf 13149 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
13150 correctly.
13151 (grub_reiserfs_get_key_offset): Likewise.
13152 (grub_reiserfs_set_key_offset): Likewise.
13153 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 13154 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 13155
13156 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
13157 better to remove the bitfield version completely.
f19dbdb7 13158
868967cf 131592008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13160
f5db4291 13161 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
13162 allocated from the heap, due to the fshelp implementation.
13163 (grub_reiserfs_dir): Free NODE, due to the same reason.
13164
492e6d9d 131652008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13166
13167 Mostly from Vincent Pelletier:
f19dbdb7 13168
492e6d9d 13169 * fs/reiserfs.c: New file.
f19dbdb7 13170
492e6d9d 13171 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
13172 (reiserfs_mod_SOURCES): New variable.
13173 (reiserfs_mod_CFLAGS): Likewise.
13174 (reiserfs_mod_LDFLAGS): Likewise.
13175
13176 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
13177 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
13178 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
13179 normal/color.c.
13180
9ce3e7c1 131812008-01-06 Robert Millan <rmh@aybabtu.com>
13182
13183 * normal/color.c: Remove `<grub/env.h>'.
13184
f3b58148 131852008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
13186
13187 * include/grub/normal.h: Include <grub/env.h>.
13188
7ac3bcfa 131892008-01-05 Robert Millan <rmh@aybabtu.com>
13190
13191 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
13192 usage example with `(hd0,1)'.
fb358190 13193 Reported by Samuel Thibault.
7ac3bcfa 13194
c8ee99d7 131952008-01-05 Robert Millan <rmh@aybabtu.com>
13196
13197 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
13198 (grub_linux_boot_zimage): Rename to ...
13199 (grub_linux_boot): ... this.
13200 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
13201 (grub_linux_boot_zimage): Conditionalize zImage copy.
13202
13203 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
13204 (grub_linux_boot_bzimage): Remove prototype.
13205 (grub_linux_boot_zimage): Rename to ...
13206 (grub_linux_boot): ... this.
13207
13208 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
13209 (grub_linux_boot): Remove function.
13210
0ece25b1 132112008-01-05 Robert Millan <rmh@aybabtu.com>
13212
13213 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
13214 (grub_env_write_color_highlight): Likewise.
13215 (grub_wait_after_message): Likewise.
13216
13217 * normal/color.c: New file.
13218
13219 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
13220 (normal_mod_DEPENDENCIES): Likewise.
13221
13222 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
13223 (normal_mod_DEPENDENCIES): Likewise.
13224
13225 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
13226 (normal_mod_DEPENDENCIES): Likewise.
13227
13228 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
13229 (normal_mod_DEPENDENCIES): Likewise.
13230
13231 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
13232 for waiting after a message is printed.
13233 * normal/main.c (read_config_file): Likewise.
13234 (grub_normal_init): Register grub_env_write_color_normal() and
13235 grub_env_write_color_highlight() hooks. Mark `color_normal' and
13236 `color_highlight' variables as global.
13237
13238 * normal/menu.c (grub_wait_after_message): New function.
13239 (grub_color_menu_normal): New variable. Replaces ...
13240 (GRUB_COLOR_MENU_NORMAL): ... this macro.
13241 (grub_color_menu_highlight): New variable. Replaces ...
13242 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
13243 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
13244 `GRUB_TERM_COLOR_STANDARD'.
13245 (print_message): Use `grub_setcolorstate' to reload colors. Rename
13246 `normal_code' and `highlight_code' to `old_color_normal' and
13247 `old_color_highlight', respectively.
13248 (grub_menu_init_page): Update colors when drawing the menu, based on
13249 `menu_color_normal' and `menu_color_highlight' variables.
13250 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
13251 a message is printed.
13252
182dd4e5 132532008-01-05 Robert Millan <rmh@aybabtu.com>
13254
13255 * kern/env.c (grub_env_context_open): Propagate hooks for global
13256 variables to new context.
13257
13258 * kern/main.c (grub_set_root_dev): Export `root' variable.
13259
ddf8f6ad 132602008-01-05 Robert Millan <rmh@aybabtu.com>
13261
13262 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 13263 discs unconditionally, since udev and others have options to provide
ddf8f6ad 13264 them.
13265
d8b43d9b 132662008-01-05 Robert Millan <rmh@aybabtu.com>
13267
13268 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
13269
2bff2de3 132702008-01-04 Christian Franke <franke@computer.org>
13271
13272 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
13273 of eisa_mmap.
13274
97eab917 132752008-01-03 Pavel Roskin <proski@gnu.org>
13276
13277 * kern/i386/linuxbios/init.c: Put "void" to all function
13278 declarations with no arguments.
13279 * kern/powerpc/ieee1275/init.c: Likewise.
13280 * term/i386/pc/at_keyboard.c: Likewise.
13281 * term/i386/pc/vga_text.c: Likewise.
13282 * util/grub-mkdevicemap.c: Likewise.
13283
b9416d00 132842008-01-02 Robert Millan <rmh@aybabtu.com>
13285
13286 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
13287 message when loaded image is out of bounds.
13288 (grub_multiboot_load_elf64): Likewise.
13289
92695df9 132902008-01-02 Pavel Roskin <proski@gnu.org>
13291
13292 * util/grub.d/10_linux.in: Try version without ".old" when
13293 looking for initrd. It's better to use initrd from the newer
13294 kernel of the same version than no initrd at all.
13295
d98d9cad 132962008-01-01 Robert Millan <rmh@aybabtu.com>
13297
13298 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
13299
dbfdce36 133002008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
13301
f19dbdb7 13302 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 13303 grub_video_get_active_render_target.
13304 (grub_video_adapter): Added unmap_color and get_active_render_target.
13305
f19dbdb7 13306 * video/video.c: Added grub_video_unmap_color and
dbfdce36 13307 grub_video_get_active_render_target.
13308 (grub_video_get_info): Changed method to accept NULL pointer as an
13309 argument to allow detection of active video adapter.
13310
13311 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
13312 grub_video_vbe_unmap_color_int.
13313 Added grub_video_vbe_unmap_color and
13314 grub_video_vbe_get_active_render_target.
13315 (grub_video_vbe_adapter): Added unmap_color and
13316 get_active_render_target.
13317
f19dbdb7 13318 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 13319 with grub_video_vbe_unmap_color_int.
13320
13321 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
13322 (DEFAULT_NORMAL_COLOR): Likewise.
13323 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
13324 (DEFAULT_FG_COLOR): Removed.
13325 (DEFAULT_BG_COLOR): Likewise.
13326 (DEFAULT_CURSOR_COLOR): Changed value.
13327 (grub_virtual_screen): Added standard_color_setting,
13328 normal_color_setting, highlight_color_setting and term_color.
13329 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
13330 (bitmap_width): Added.
13331 (bitmap_height): Likewise.
13332 (bitmap): Likewise.
13333 (set_term_color): Likewise.
13334 (grub_virtual_screen_setup): Changed to use new terminal coloring
13335 settings.
13336 (grub_gfxterm_init): Added init for bitmap.
13337 (grub_gfxterm_fini): Added destroy for bitmap.
13338 (redraw_screen_rect): Updated to use background bitmap and new
13339 terminal coloring.
13340 (scroll_up): Added optimization for case when there is no bitmap.
13341 (grub_gfxterm_cls): Fixed to use correct background color.
13342 (grub_virtual_screen_setcolorstate): Changed to use new terminal
13343 coloring.
13344 (grub_virtual_screen_setcolor): Likewise.
13345 (grub_virtual_screen_getcolor): Added.
13346 (grub_gfxterm_background_image_cmd): Likewise.
13347 (grub_video_term): Added setcolor and getcolor.
13348 (MOD_INIT): Added registration of background_image command.
13349 (MOD_TERM): Added unregistration for background_image command.
13350
c3c20931 133512007-12-30 Pavel Roskin <proski@gnu.org>
13352
13353 * loader/multiboot_loader.c: Fix multiboot command
13354 unregistration. Fix all typos in the word "multiboot".
13355
df266716 133562007-12-29 Pavel Roskin <proski@gnu.org>
94239199 13357
13358 * util/grub.d/10_linux.in: Refactor search for initrd. Add
13359 support for initrd names used in Fedora.
13360
fc6e896c 133612007-12-26 Bean <bean123ch@gmail.com>
13362
13363 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
13364 (cpio_mod_SOURCES): New variable.
13365 (cpio_mod_CFLAGS): Likewise.
13366 (cpio_mod_LDFLAGS): Likewise.
13367
13368 * fs/cpio.c: New file.
13369
13370 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
13371
13372 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
13373
13374 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
13375
13376 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13377
533110ad 133782007-12-25 Robert Millan <rmh@aybabtu.com>
13379
13380 * include/grub/term.h (struct grub_term): Add `getcolor' function.
13381 (grub_getcolor): New function.
13382
13383 * kern/term.c (grub_getcolor): New function.
13384 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
13385 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
13386 (print_entry): Set normal and highlight colors to
13387 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
13388 respectively, before printing and restore them to old
13389 values afterwards.
13390 (grub_menu_init_page): Likewise. Fill an additional colored space
13391 that would otherwise be left blank.
13392
13393 * term/efi/console.c (grub_console_getcolor): New function.
13394 (struct grub_console_term.getcolor): New variable.
13395 * term/i386/pc/console.c (grub_console_getcolor): New function.
13396 (struct grub_console_term.getcolor): New variable.
13397 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
13398 (struct grub_console_term.getcolor): New variable.
13399
13400 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
13401 (struct grub_console_term.setcolor): Remove variable.
13402 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
13403 (struct grub_console_term.setcolor): Remove variable.
13404 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
13405 (struct grub_console_term.setcolor): Remove variable.
13406 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
13407 (struct grub_console_term.setcolor): Remove variable.
13408
4931827f 134092007-12-25 Robert Millan <rmh@aybabtu.com>
13410
13411 * configure.ac: Search for possible unifont.hex locations, and
13412 define UNIFONT_HEX if found.
13413
13414 * Makefile.in (UNIFONT_HEX): Define variable.
13415 (DATA): Rename to ...
13416 (PKGLIB): ... this. Update all users.
13417 (PKGDATA): New variable.
13418 (pkgdata_IMAGES): Rename to ...
13419 (pkglib_IMAGES): ... this. Update all users.
13420 (pkgdata_MODULES): Rename to ...
13421 (pkglib_MODULES): ... this. Update all users.
13422 (pkgdata_PROGRAMS): Rename to ...
13423 (pkglib_PROGRAMS): ... this. Update all users.
13424 (pkgdata_DATA): Rename to ...
13425 (pkglib_DATA): ... this. Update all users.
13426 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
13427 (unicode.pff, ascii.pff): New rules.
13428 (all-local): Add `$(PKGDATA)' dependency.
13429 (install-local): Process `$(PKGDATA)'.
13430
13431 * util/update-grub_lib.in (font_path): Search for *.pff files in
13432 a few more locations, including `${pkgdata}'.
13433
57e57e31 134342007-12-23 Robert Millan <rmh@aybabtu.com>
13435
13436 Patch from Bean <bean123ch@gmail.com>:
13437 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
13438 `size'.
13439
4bc72aa9 134402007-12-21 Bean <bean123ch@gmail.com>
13441
13442 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
13443 (ntfscomp_mod_SOURCES): New variable.
13444 (ntfscomp_mod_CFLAGS): Likewise.
13445 (ntfscomp_mod_LDFLAGS): Likewise.
13446
13447 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
13448 (grub_probe_SOURCES): Likewise.
13449 (grub_emu_SOURCES): Likewise.
13450
13451 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
13452 (grub_emu_SOURCES): Likewise.
13453
13454 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
13455 (grub_emu_SOURCES): Likewise.
13456
13457 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
13458 (grub_emu_SOURCES): Likewise.
13459
13460 * fs/ntfs.c (grub_ntfscomp_func): New variable.
13461 (read_run_list): Renamed to grub_ntfs_read_run_list.
13462 (decomp_nextvcn): Moved to ntfscomp.c.
13463 (decomp_getch): Likewise.
13464 (decomp_get16): Likewise.
13465 (decomp_block): Likewise.
13466 (read_block): Likewise.
13467 (read_data): Partially moved to ntfscomp.c.
13468 (fixup): Change unsigned to grub_uint16_t.
13469 (read_mft): Change unsigned long to grub_uint32_t.
13470 (read_attr): Likewise.
13471 (read_data): Likewise.
13472 (read_run_data): Likewise.
13473 (read_run_list): Likewise.
13474 (read_mft): Likewise.
13475
13476 * fs/ntfscomp.c: New file.
13477
13478 * include/grub/ntfs.h: New file.
13479
af680a87 134802007-12-16 Robert Millan <rmh@aybabtu.com>
13481
13482 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
13483 IDE disk check, since Linux is known to support 20 IDE disks.
13484 Reported by Colin Watson.
13485
84be7599 134862007-12-15 Bean <bean123ch@gmail.com>
13487
13488 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
13489 (lnxboot_img_SOURCES): New variable.
13490 (lnxboot_img_ASFLAGS): Likewise.
13491 (lnxboot_img_LDFLAGS): Likewise.
13492
13493 * boot/i386/pc/lnxboot.S: New file.
13494
6af9db01 134952007-11-24 Pavel Roskin <proski@gnu.org>
13496
13497 * configure.ac: Test if '--build-id=none' is supported by the
13498 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
13499 objcopy to generate incorrect binary files (binutils
13500 2.17.50.0.18-1 as shipped by Fedora 8).
13501 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
13502 linking, so that build ID doesn't break the test.
13503
7361cfe6 135042007-11-24 Pavel Roskin <proski@gnu.org>
13505
13506 * include/grub/i386/time.h: use "void" in the argument list
13507 of grub_cpu_idle().
13508 * include/grub/powerpc/time.h: Likewise.
13509 * include/grub/sparc64/time.h: Likewise.
13510
1593e10c 135112007-11-18 Christian Franke <franke@computer.org>
13512
13513 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
13514 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
13515 This fixes the problem that function keys did not work in grub-emu.
13516
3b8db1a8 135172007-11-18 Christian Franke <franke@computer.org>
13518
13519 * disk/host.c (grub_host_open): Remove attribute unused from
13520 name parameter. Add check for "host". This fixes the problem
13521 that grub-emu does not find partitions.
13522
2e29408d 135232007-11-18 Christian Franke <franke@computer.org>
13524
13525 * util/hostfs.c (is_dir): New function.
13526 (grub_hostfs_dir): Handle missing dirent.d_type case.
13527 (grub_hostfs_read): Add missing fseek().
13528 (grub_hostfs_label): Clear label pointer. This fixes a crash
13529 of grub-emu on "ls (host)".
13530
398cd047 135312007-11-18 Christian Franke <franke@computer.org>
13532
13533 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
13534 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
13535 to 64 bit boundary by default.
13536
c405c391 135372007-11-18 Bean <bean123ch@gmail.com>
13538
13539 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
13540 (hexdump_mod_SOURCES): New variable.
13541 (hexdump_mod_CFLAGS): Likewise.
13542 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 13543
c405c391 13544 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
13545
13546 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
13547
13548 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
13549
13550 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
13551
13552 * include/grub/hexdump.h: New file.
13553
13554 * commands/hexdump.c: New file.
13555
5cced7fd 135562007-11-10 Robert Millan <rmh@aybabtu.com>
13557
13558 * commands/i386/pc/play.c (beep_off): Switch order of arguments
13559 in grub_outb() calls.
13560 (beep_on): Likewise.
13561
8b714eb0 135622007-11-10 Christian Franke <franke@computer.org>
13563
13564 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
13565 (grub_menu_run): Likewise.
13566
ce0f1839 135672007-11-10 Robert Millan <rmh@aybabtu.com>
13568
13569 * include/grub/i386/efi/machine.h: New file.
13570 * include/grub/i386/linuxbios/machine.h: Likewise.
13571 * include/grub/i386/pc/machine.h: Likewise.
13572 * include/grub/powerpc/ieee1275/machine.h: Likewise.
13573 * include/grub/sparc64/ieee1275/machine.h: Likewise.
13574
13575 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
13576 (serial_hw_io_addr): New variable.
13577 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
13578 instead of `(unsigned short *) 0x400'.
13579
270c237d 135802007-11-10 Bean <bean123ch@gmail.com>
13581
13582 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
13583
a87783bf 135842007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
13585
13586 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
13587 (vga_mod_SOURCES): Added.
13588 (vga_mod_CFLAGS): Likewise.
13589 (vga_mod_LDFLAGS): Likewise.
13590
13591 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
13592 grub_outb() calls.
13593 (set_map_mask): Likewise.
13594 (set_read_map): Likewise.
13595 (set_read_address): Likewise.
13596 (vga_font): Removed variable.
13597 (get_vga_glyph): Removed function.
13598 (invalidate_char): Likewise.
13599 (write_char): Changed to use grub_font_get_glyph() for font
13600 information.
13601 (grub_vga_putchar): Likewise.
13602 (grub_vga_getcharwidth): Likewise.
13603
6433b448 136042007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
13605
13606 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
13607 flags.
13608 (pxeboot_img_LDFLAGS): Likewise.
13609 (diskboot_img_LDFLAGS): Likewise.
13610 (kernel_img_LDFLAGS): Likewise.
13611
49178511 136122007-11-06 Robert Millan <rmh@aybabtu.com>
13613
13614 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
13615 in grub_outb() calls.
13616 (serial_hw_init): Likewise.
13617
53b052de 136182007-11-05 Robert Millan <rmh@aybabtu.com>
13619
13620 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
13621 spaces. Skip non-regular files.
13622
5ab33bba 136232007-11-05 Robert Millan <rmh@aybabtu.com>
13624
13625 * kern/disk.c (grub_disk_firmware_fini)
13626 (grub_disk_firmware_is_tainted): New variables.
13627
13628 * include/grub/disk.h (grub_disk_firmware_fini)
13629 (grub_disk_firmware_is_tainted): Likewise.
13630
13631 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
13632 (grub_disk_biosdisk_fini): ... to here.
13633 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
13634 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
13635 is set. Register grub_disk_biosdisk_fini() in
13636 `grub_disk_firmware_fini'.
13637
13638 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
13639 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
13640 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
13641 to finish existing firmware disk interface.
13642
13643 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
13644 (ata_mod_SOURCES): New variable.
13645 (ata_mod_CFLAGS): Likewise.
13646 (ata_mod_LDFLAGS): Likewise.
13647
0149ab7c 136482007-11-05 Robert Millan <rmh@aybabtu.com>
13649
13650 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
13651 (grub_ata_wait): Reimplement using grub_millisleep().
13652
13653 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
13654 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
13655
be7ac41e 136562007-11-03 Marco Gerards <marco@gnu.org>
13657
13658 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
13659 (CRTC_ADDR_PORT): New macro.
13660 (CRTC_DATA_PORT): Likewise.
13661 (CRTC_CURSOR): Likewise.
13662 (CRTC_CURSOR_ADDR_HIGH): Likewise.
13663 (CRTC_CURSOR_ADDR_LOW): Likewise.
13664 (update_cursor): New function.
13665 (grub_console_real_putchar): Call `update_cursor'.
13666 (grub_console_gotoxy): Likewise.
13667 (grub_console_cls): Set the default color when clearing the
13668 screen.
13669 (grub_console_setcursor): Implemented.
13670
bb06ab2e 136712007-11-03 Marco Gerards <marco@gnu.org>
13672
13673 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
13674 become activate.
13675 (grub_ata_pio_write): Likewise.
13676
13677 (grub_atapi_identify): Wait after issuing an ATA command.
13678 (grub_atapi_packet): Likewise.
13679 (grub_ata_identify): Likewise.
13680 (grub_ata_readwrite): Likewise.
13681
cf8f780b 136822007-11-03 Marco Gerards <marco@gnu.org>
13683
13684 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
13685 (grub_ata_pio_write): Likewise.
13686 (grub_ata_readwrite): Use `grub_error', instead of
13687 returning `grub_errno'.
13688
ed649e54 136892007-11-03 Marco Gerards <marco@gnu.org>
13690
13691 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
13692 grub_ata_pio_write once for every single sector, instead of for
13693 multiple sectors.
13694
ca25d8f0 136952007-10-31 Robert Millan <rmh@aybabtu.com>
13696
13697 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
13698
13699 * conf/i386-linuxbios.rmk: New file.
13700
13701 * kern/i386/pc/hardware.c: Likewise.
13702 * term/i386/pc/at_keyboard.c: Likewise.
13703 * term/i386/pc/vga_text.c: Likewise.
13704
13705 * include/grub/i386/linuxbios/boot.h: Likewise.
13706 * include/grub/i386/linuxbios/console.h: Likewise.
13707 * include/grub/i386/linuxbios/init.h: Likewise.
13708 * include/grub/i386/linuxbios/kernel.h: Likewise.
13709 * include/grub/i386/linuxbios/loader.h: Likewise.
13710 * include/grub/i386/linuxbios/memory.h: Likewise.
13711 * include/grub/i386/linuxbios/serial.h: Likewise.
13712 * include/grub/i386/linuxbios/time.h: Likewise.
13713
13714 * kern/i386/linuxbios/init.c: Likewise.
13715 * kern/i386/linuxbios/startup.S: Likewise.
13716 * kern/i386/linuxbios/table.c: Likewise.
13717
e911ecc1 137182007-10-31 Marco Gerards <marco@gnu.org>
13719
13720 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
13721 (ata_mod_SOURCES): New variable.
13722 (ata_mod_CFLAGS): Likewise.
13723 (ata_mod_LDFLAGS): Likewise.
13724
13725 * disk/ata.c: New file.
13726
13727 * include/grub/disk.h (grub_disk_dev_id): Add
13728 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 13729
7f66d0e0 137302007-10-31 Robert Millan <rmh@aybabtu.com>
13731
13732 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
13733 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
13734
13735 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
13736 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
13737
13738 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
13739 `<grub/types.h>'.
13740
13741 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
13742
5cd7dd46 137432007-10-27 Robert Millan <rmh@aybabtu.com>
13744
3236ca65 13745 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 13746
2ebfc90f 137472007-10-22 Robert Millan <rmh@aybabtu.com>
13748
13749 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
13750 `"../realmode.S"'.
13751 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
13752
73fcb0f3 137532007-10-22 Robert Millan <rmh@aybabtu.com>
13754
13755 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
13756 (pkgdata_MODULES): Add `biosdisk.mod'.
13757 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
13758 variables.
13759
13760 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
13761 (grub_biosdisk_init): Replace with ...
13762 (GRUB_MOD_INIT(biosdisk)): ... this.
13763 (grub_biosdisk_fini): Replace with ...
13764 (GRUB_MOD_FINI(biosdisk)): ... this.
13765
13766 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
13767 (grub_machine_init): Remove call to grub_biosdisk_init().
13768 (grub_machine_fini): Remove call to grub_machine_fini().
13769
13770 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
13771
3381d274 137722007-10-22 Robert Millan <rmh@aybabtu.com>
13773
13774 * include/grub/time.h: New file.
13775 * include/grub/i386/time.h: Likewise.
13776 * include/grub/powerpc/time.h: Likewise.
13777 * include/grub/sparc64/time.h: Likewise.
13778
13779 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
13780 instances to ...
13781 (KERNEL_MACHINE_TIME_HEADER): ... this.
13782 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
13783 instances to ...
13784 (KERNEL_MACHINE_TIME_HEADER): ... this.
13785 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
13786 instances to ...
13787 (KERNEL_MACHINE_TIME_HEADER): ... this.
13788
13789 * kern/i386/efi/init.c: Include `<grub/time.h>'.
13790 (grub_millisleep): New function.
13791 * kern/i386/pc/init.c: Include `<grub/time.h>'.
13792 (grub_millisleep): New function.
13793 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
13794 Remove `grub/machine/time.h' include.
13795 (grub_millisleep): New function.
13796 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
13797 Remove `grub/machine/time.h' include.
13798 (grub_millisleep): New function.
13799
13800 * include/grub/misc.h (grub_div_roundup): New function.
13801
13802 * kern/misc.c: Include `<grub/time.h>'.
13803 (grub_millisleep_generic): New function.
13804
13805 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
13806 Add `time.h'.
13807 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
13808 Add `time.h'.
13809 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
13810 `machine/time.h'. Add `time.h'.
13811 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13812
a39a0312 138132007-10-21 Robert Millan <rmh@aybabtu.com>
13814
13815 * include/grub/misc.h (grub_max): New function.
13816
2aad70e2 138172007-10-21 Robert Millan <rmh@aybabtu.com>
13818
13819 * util/misc.c (grub_util_info): Call fflush() before returning.
13820
54b71c4b 138212007-10-20 Robert Millan <rmh@aybabtu.com>
13822
13823 * genmk.rb (Image): Copy `extra_flags' from here ...
13824 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
13825
13826 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
13827 to `argc' and `args' arguments.
13828
a979f513 138292007-10-17 Robert Millan <rmh@aybabtu.com>
13830
13831 * kern/i386/loader.S: New file.
13832
13833 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
13834 * kern/i386/loader.S (grub_linux_prot_size)... to here.
13835 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
13836 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
13837 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
13838 * kern/i386/loader.S (grub_linux_real_addr)... to here.
13839 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
13840 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
13841 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
13842 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
13843 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
13844 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
13845 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
13846 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
13847
13848 * kern/i386/realmode.S: New file.
13849
13850 * kern/i386/pc/startup.S (protstack): Moved from here ...
13851 * kern/i386/realmode.S (protstack)... to here.
13852 * kern/i386/pc/startup.S (gdt): Moved from here ...
13853 * kern/i386/realmode.S (gdt)... to here.
13854 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
13855 * kern/i386/realmode.S (prot_to_real)... to here.
13856
13857 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
13858 `kern/i386/realmode.S'.
13859
825fc8fd 138602007-10-17 Robert Millan <rmh@aybabtu.com>
13861
13862 * include/grub/i386/loader.h: New file.
13863
13864 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
13865 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
13866 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
13867 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
13868 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
13869 * include/grub/i386/loader.h (grub_linux_prot_size)
13870 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
13871 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
13872 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
13873 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
13874
13875 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
13876
e179b2f4 138772007-10-15 Robert Millan <rmh@aybabtu.com>
13878
13879 * normal/misc.c (grub_normal_print_device_info): Do not probe for
13880 filesystem when dev->disk is unset.
13881 Do probe for filesystem even when dev->disk->has_partitions is set.
13882 In case a filesystem is found, always report it.
13883 In case it isn't, if dev->disk->has_partitions is set, report that
13884 a partition table was found instead of reporting that no filesystem
13885 could be identified.
13886
5db82af6 138872007-10-12 Robert Millan <rmh@aybabtu.com>
13888
13889 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
13890 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
13891
68f6ac74 13892 * include/grub/types.h (grub_host_to_target16): New macro.
13893 (grub_host_to_target32): Likewise.
13894 (grub_host_to_target64): Likewise.
13895 (grub_target_to_host16): Likewise.
13896 (grub_target_to_host32): Likewise.
13897 (grub_target_to_host64): Likewise.
5db82af6 13898
13899 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13900 Renamed from to ...
13901 (GRUB_MOD_ALIGN): ...this. Update all users.
13902
68f6ac74 13903 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
13904 grub_host_to_target32.
13905 Replace grub_be_to_cpu32 with grub_target_to_host32.
13906 (load_modules): Likewise.
13907 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
13908 Replace grub_be_to_cpu32 with grub_target_to_host32.
13909 Replace grub_cpu_to_be16 with grub_host_to_target16.
13910 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 13911
3cf497cc 139122007-10-12 Robert Millan <rmh@aybabtu.com>
13913
13914 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
13915 * util/elf/grub-mkimage.c: ... here.
13916
13917 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
13918 `util/powerpc/ieee1275/grub-mkimage.c'.
13919
c8cc3692 139202007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 13921
c8cc3692 13922 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
13923 and make it easier to figure out.
13924 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
13925 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
13926 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
13927 leave us with less than HEAP_MIN_SIZE total heap.
13928 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 13929
5c58b791 139302007-10-03 Robert Millan <rmh@aybabtu.com>
13931
13932 * include/grub/i386/io.h: New file.
13933 * commands/i386/pc/play.c (inb): Removed.
13934 (outb): Removed.
13935 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13936 with grub_outb().
afcd2ef8 13937 * term/i386/pc/serial.c (inb): Removed.
13938 (outb): Removed.
13939 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13940 with grub_outb().
13941 * term/i386/pc/vga.c (inb): Removed.
13942 (outb): Removed.
13943 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
13944 with grub_outb().
5c58b791 13945
1a477ed6 139462007-10-02 Robert Millan <rmh@aybabtu.com>
13947
13948 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
13949 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13950 Reported by Marcin Kurek.
13951
6b5d80fa 139522007-09-07 Robert Millan <rmh@aybabtu.com>
13953
13954 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
13955 SmartFirmware version updates (as released by Sven Luther), and avoid
13956 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
13957 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
13958 known broken.
13959
5618afbf 139602007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13961
13962 From Hitoshi Ozeki:
13963 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
13964 when merging two regions.
13965
6139dcd9 139662007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13967
508e39ee 13968 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
13969 * normal/completion.c (grub_normal_do_completion): Likewise.
13970 Reported by Hitoshi Ozeki.
13971
139722007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 13973
6139dcd9 13974 Do not use devices at boot in chainloading.
f19dbdb7 13975
6139dcd9 13976 * loader/i386/pc/chainloader.c (boot_drive): New variable.
13977 (boot_part_addr): Likewise.
13978 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
13979 with BOOT_DRIVE and BOOT_PART_ADDR.
13980 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
13981 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
13982
38da6516 139832007-08-29 Robert Millan <rmh@aybabtu.com>
13984
13985 Patch from Simon Peter <dn.tlp@gmx.net>:
13986 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
13987 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
13988 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
13989 util/i386/pc/grub-setup.c_DEPENDENCIES.
13990 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
13991 util/grub-probe.c_DEPENDENCIES.
13992 * conf/powerpc-ieee1275.rmk: Likewise.
13993
29d0928c 139942007-08-28 Robert Millan <rmh@aybabtu.com>
13995
13996 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
13997 to tell grub-mkdevicemap how to name devices.
13998 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
13999 feature).
14000
14001 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
14002 util/i386/get_disk_name.c.
14003 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
14004 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
14005 util/ieee1275/get_disk_name.c.
14006
14007 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
14008
14009 * DISTLIST: Add util/i386/get_disk_name.c and
14010 util/ieee1275/get_disk_name.c.
14011
14012 * util/grub-mkdevicemap.c: Replace device naming logic with
14013 grub_util_get_disk_name() calls.
14014
5a0d3cca 140152007-08-20 Robert Millan <rmh@aybabtu.com>
14016
14017 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
14018 (so that it works for both plural and singular quantities).
14019
8b72db2f 140202007-08-05 Robert Millan <rmh@aybabtu.com>
14021
14022 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
14023 so that [xz] isn't taken into account when determining order.
14024
352466bf 140252007-08-02 Marco Gerards <marco@gnu.org>
14026
14027 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
14028 `include/multiboot2.h', `include/grub/elfload.h',
14029 `include/multiboot.h', `include/grub/multiboot.h',
14030 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
14031 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
14032 `kern/elf.c', `loader/multiboot_loader.c',
14033 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
14034 `loader/i386/pc/multiboot2.c',
14035 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
14036 `util/i386/pc/grub-mkrescue.in'. Remove
14037 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
14038 `include/grub/i386/pc/util/biosdisk.h' and
14039 `include/grub/powerpc/ieee1275/multiboot.h'.
14040
8f096014 140412007-08-02 Bean <bean123ch@gmail.com>
14042
14043 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
14044 (ntfs_mod_SOURCES): New variable.
14045 (ntfs_mod_CFLAGS): Likewise.
14046 (ntfs_mod_LDFLAGS): Likewise.
14047
14048 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
14049 (grub_probe_SOURCES): Likewise.
14050 (grub_emu_SOURCES): Likewise.
14051
14052 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
14053 (grub_emu_SOURCES): Likewise.
14054
14055 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
14056 (grub_emu_SOURCES): Likewise.
f19dbdb7 14057
8f096014 14058 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
14059
14060 * fs/ntfs.c: New file.
14061
9959f7db 140622007-08-02 Bean <bean123ch@gmail.com>
14063
14064 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
14065
14066 * file.h (grub_file): Likewise.
14067
14068 * fshelp.h (grub_fshelp_read_file): Likewise.
14069
14070 * util/i386/pc/grub-setup.c (setup): Likewise.
14071 (save_first_sector): Likewise.
14072 (save_blocklists): Likewise.
f19dbdb7 14073
9959f7db 14074 * fs/affs.c (grub_affs_read_file): Likewise.
14075
14076 * fs/ext2.c (grub_ext2_read_file): Likewise.
14077
14078 * fs/fat.c (grub_fat_read_data): Likewise.
14079
14080 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
14081
14082 * fs/hfs.c (grub_hfs_read_file): Likewise.
14083
14084 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
14085
14086 * fs/jfs.c (grub_jfs_read_file): Likewise.
14087
14088 * fs/minix.c (grub_minix_read_file): Likewise.
14089
14090 * fs/sfs.c (grub_sfs_read_file): Likewise.
14091
14092 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 14093
9959f7db 14094 * fs/xfs.c (grub_xfs_read_file): Likewise.
14095
14096 * command/blocklist.c (read_blocklist): Likewise.
14097 (print_blocklist): Likewise.
14098
0a203f83 140992007-08-02 Marco Gerards <marco@gnu.org>
14100
14101 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
14102 `util/hostfs.c'.
14103
14104 * disk/host.c: New file.
14105
14106 * util/hostfs.c: Likewise.
14107
14108 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
14109 return `GRUB_ERR_BAD_FS'.
14110 * fs/sfs.c (grub_sfs_mount): Likewise.
14111 * fs/xfs.c (grub_xfs_mount): Likewise.
14112
14113 * include/grub/disk.h (enum grub_disk_dev_id): Add
14114 `GRUB_DISK_DEVICE_HOST_ID'.
14115
14116 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
14117
e5dfe777 141182007-07-24 Jerone Young <jerone@gmail.com>
14119
f19dbdb7 14120 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 14121 modules for compilation.
14122 * conf/powerpc-ieee1275.rmk: Likewise.
14123
14124 * include/multiboot.h: Move multiboot definitions to one file. Rename
14125 many definitions to not get grub specific.
14126 * include/multiboot2.h: Create header with multiboot 2 definitions.
14127 * include/grub/multiboot.h: Header for grub specific function
14128 prototypes and definitions.
14129 * include/grub/multiboot2.h: Likewise.
14130 * include/grub/multiboot_loader.h: Likewise.
14131 * include/grub/i386/pc/multiboot.h: Removed.
14132 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
14133
14134 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
14135 and 2 to allow for one multiboot and module commands.
14136 * loader/multiboot2.c: Add multiboot2 functionality.
14137 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
14138 and definition names.
14139 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
14140 2 functions.
14141 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
14142 ieee1275 specific multiboot2 code.
14143
14144 * kern/i386/pc/startup.S: Change headers and definition names for
14145 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
14146
daf0f0ba 141472007-07-22 Robert Millan <rmh@aybabtu.com>
14148
14149 * geninitheader.sh: Process file specified in first parameter rather
14150 than hardcoding grub_modules_init.lst.
fe6b695a 14151 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 14152 than hardcoding grub_modules_init.h.
14153
14154 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
14155 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
14156 grub_probe_init.[ch] and grub_setup_init.[ch].
14157
14158 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
14159 grub_modules_init.h with grub_emu_init.h.
14160 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
14161 grub_probe_init.[ch] files.
14162 * conf/i386-efi.rmk: Likewise.
14163 * conf/i386-pc.rmk: Likewise.
14164 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
14165 grub_setup_init.[ch] files.
14166
14167 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
14168 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
14169 to initialize modules rather than a list of hardcoded functions.
14170 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
14171 grub_init_all() to initialize modules rather than a list of hardcoded
14172 functions.
14173
54cdc1cc 141742007-07-22 Robert Millan <rmh@aybabtu.com>
14175
14176 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
14177 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
14178
ad0686cc 141792007-07-22 Robert Millan <rmh@aybabtu.com>
14180
14181 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
14182 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
14183 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
14184 flag when running on SmartFirmware.
14185 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
14186 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
14187 was set.
14188
14189 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
14190 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
14191 rather than decreasing it.
14192
14193 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
14194 there's not enough space to do it, fail in the same way as when it
14195 can't be done because there are no partitions.
14196
14197 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
14198 when nvsetenv failed.
14199
969c02ec 142002007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
14201
14202 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
14203 because this rule is automatically generated.
14204 (grub-mkrescue): Removed for the same reason as above.
14205
5a79f472 142062007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
14207
14208 Migrate to GNU General Public License Version 3.
f19dbdb7 14209
5a79f472 14210 * COPYING: Replaced with the plain text version of GPLv3.
14211
14212 * config.guess: Updated from gnulib.
14213 * config.sub: Likewise.
14214
14215 * geninit.sh: Output a GPLv3 copyright notice.
14216 * geninitheader.sh: Likewise.
14217 * genmodsrc.sh: Likewise.
14218 * gensymlist.sh.in: Likewise.
14219
14220 * boot/i386/pc/boot.S: Upgraded to GPLv3.
14221 * boot/i386/pc/diskboot.S: Likewise.
14222 * boot/i386/pc/pxeboot.S: Likewise.
14223 * commands/blocklist.c: Likewise.
14224 * commands/boot.c: Likewise.
14225 * commands/cat.c: Likewise.
14226 * commands/cmp.c: Likewise.
14227 * commands/configfile.c: Likewise.
14228 * commands/echo.c: Likewise.
14229 * commands/help.c: Likewise.
14230 * commands/ls.c: Likewise.
14231 * commands/search.c: Likewise.
14232 * commands/terminal.c: Likewise.
14233 * commands/test.c: Likewise.
14234 * commands/videotest.c: Likewise.
14235 * commands/i386/cpuid.c: Likewise.
14236 * commands/i386/pc/halt.c: Likewise.
14237 * commands/i386/pc/play.c: Likewise.
14238 * commands/i386/pc/reboot.c: Likewise.
14239 * commands/i386/pc/vbeinfo.c: Likewise.
14240 * commands/i386/pc/vbetest.c: Likewise.
14241 * commands/ieee1275/halt.c: Likewise.
14242 * commands/ieee1275/reboot.c: Likewise.
14243 * commands/ieee1275/suspend.c: Likewise.
14244 * disk/loopback.c: Likewise.
14245 * disk/lvm.c: Likewise.
14246 * disk/raid.c: Likewise.
14247 * disk/efi/efidisk.c: Likewise.
14248 * disk/i386/pc/biosdisk.c: Likewise.
14249 * disk/ieee1275/ofdisk.c: Likewise.
14250 * font/manager.c: Likewise.
14251 * fs/affs.c: Likewise.
14252 * fs/ext2.c: Likewise.
14253 * fs/fat.c: Likewise.
14254 * fs/fshelp.c: Likewise.
14255 * fs/hfs.c: Likewise.
14256 * fs/hfsplus.c: Likewise.
14257 * fs/iso9660.c: Likewise.
14258 * fs/jfs.c: Likewise.
14259 * fs/minix.c: Likewise.
14260 * fs/sfs.c: Likewise.
14261 * fs/ufs.c: Likewise.
14262 * fs/xfs.c: Likewise.
14263 * hello/hello.c: Likewise.
14264 * include/grub/acorn_filecore.h: Likewise.
14265 * include/grub/arg.h: Likewise.
14266 * include/grub/bitmap.h: Likewise.
14267 * include/grub/boot.h: Likewise.
14268 * include/grub/cache.h: Likewise.
14269 * include/grub/device.h: Likewise.
14270 * include/grub/disk.h: Likewise.
14271 * include/grub/dl.h: Likewise.
14272 * include/grub/elfload.h: Likewise.
14273 * include/grub/env.h: Likewise.
14274 * include/grub/err.h: Likewise.
14275 * include/grub/file.h: Likewise.
14276 * include/grub/font.h: Likewise.
14277 * include/grub/fs.h: Likewise.
14278 * include/grub/fshelp.h: Likewise.
14279 * include/grub/gzio.h: Likewise.
14280 * include/grub/hfs.h: Likewise.
14281 * include/grub/kernel.h: Likewise.
14282 * include/grub/loader.h: Likewise.
14283 * include/grub/lvm.h: Likewise.
14284 * include/grub/misc.h: Likewise.
14285 * include/grub/mm.h: Likewise.
14286 * include/grub/net.h: Likewise.
14287 * include/grub/normal.h: Likewise.
14288 * include/grub/parser.h: Likewise.
14289 * include/grub/partition.h: Likewise.
14290 * include/grub/pc_partition.h: Likewise.
14291 * include/grub/raid.h: Likewise.
14292 * include/grub/rescue.h: Likewise.
14293 * include/grub/script.h: Likewise.
14294 * include/grub/setjmp.h: Likewise.
14295 * include/grub/symbol.h: Likewise.
14296 * include/grub/term.h: Likewise.
14297 * include/grub/terminfo.h: Likewise.
14298 * include/grub/tparm.h: Likewise.
14299 * include/grub/types.h: Likewise.
14300 * include/grub/video.h: Likewise.
14301 * include/grub/efi/api.h: Likewise.
14302 * include/grub/efi/chainloader.h: Likewise.
14303 * include/grub/efi/console.h: Likewise.
14304 * include/grub/efi/console_control.h: Likewise.
14305 * include/grub/efi/disk.h: Likewise.
14306 * include/grub/efi/efi.h: Likewise.
14307 * include/grub/efi/pe32.h: Likewise.
14308 * include/grub/efi/time.h: Likewise.
14309 * include/grub/i386/linux.h: Likewise.
14310 * include/grub/i386/setjmp.h: Likewise.
14311 * include/grub/i386/types.h: Likewise.
14312 * include/grub/i386/efi/kernel.h: Likewise.
14313 * include/grub/i386/efi/loader.h: Likewise.
14314 * include/grub/i386/efi/time.h: Likewise.
14315 * include/grub/i386/pc/biosdisk.h: Likewise.
14316 * include/grub/i386/pc/boot.h: Likewise.
14317 * include/grub/i386/pc/chainloader.h: Likewise.
14318 * include/grub/i386/pc/console.h: Likewise.
14319 * include/grub/i386/pc/init.h: Likewise.
14320 * include/grub/i386/pc/kernel.h: Likewise.
14321 * include/grub/i386/pc/loader.h: Likewise.
14322 * include/grub/i386/pc/memory.h: Likewise.
14323 * include/grub/i386/pc/multiboot.h: Likewise.
14324 * include/grub/i386/pc/serial.h: Likewise.
14325 * include/grub/i386/pc/time.h: Likewise.
14326 * include/grub/i386/pc/vbe.h: Likewise.
14327 * include/grub/i386/pc/vbeblit.h: Likewise.
14328 * include/grub/i386/pc/vbefill.h: Likewise.
14329 * include/grub/i386/pc/vbeutil.h: Likewise.
14330 * include/grub/i386/pc/vga.h: Likewise.
14331 * include/grub/ieee1275/ieee1275.h: Likewise.
14332 * include/grub/ieee1275/ofdisk.h: Likewise.
14333 * include/grub/powerpc/libgcc.h: Likewise.
14334 * include/grub/powerpc/setjmp.h: Likewise.
14335 * include/grub/powerpc/types.h: Likewise.
14336 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
14337 * include/grub/powerpc/ieee1275/console.h: Likewise.
14338 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
14339 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
14340 * include/grub/powerpc/ieee1275/loader.h: Likewise.
14341 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
14342 * include/grub/powerpc/ieee1275/time.h: Likewise.
14343 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
14344 * include/grub/sparc64/libgcc.h: Likewise.
14345 * include/grub/sparc64/setjmp.h: Likewise.
14346 * include/grub/sparc64/types.h: Likewise.
14347 * include/grub/sparc64/ieee1275/console.h: Likewise.
14348 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14349 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14350 * include/grub/sparc64/ieee1275/time.h: Likewise.
14351 * include/grub/util/biosdisk.h: Likewise.
14352 * include/grub/util/getroot.h: Likewise.
14353 * include/grub/util/lvm.h: Likewise.
14354 * include/grub/util/misc.h: Likewise.
14355 * include/grub/util/raid.h: Likewise.
14356 * include/grub/util/resolve.h: Likewise.
14357 * io/gzio.c: Likewise.
14358 * kern/device.c: Likewise.
14359 * kern/disk.c: Likewise.
14360 * kern/dl.c: Likewise.
14361 * kern/elf.c: Likewise.
14362 * kern/env.c: Likewise.
14363 * kern/err.c: Likewise.
14364 * kern/file.c: Likewise.
14365 * kern/fs.c: Likewise.
14366 * kern/loader.c: Likewise.
14367 * kern/main.c: Likewise.
14368 * kern/misc.c: Likewise.
14369 * kern/mm.c: Likewise.
14370 * kern/parser.c: Likewise.
14371 * kern/partition.c: Likewise.
14372 * kern/rescue.c: Likewise.
14373 * kern/term.c: Likewise.
14374 * kern/efi/efi.c: Likewise.
14375 * kern/efi/init.c: Likewise.
14376 * kern/efi/mm.c: Likewise.
14377 * kern/i386/dl.c: Likewise.
14378 * kern/i386/efi/init.c: Likewise.
14379 * kern/i386/efi/startup.S: Likewise.
14380 * kern/i386/pc/init.c: Likewise.
14381 * kern/i386/pc/lzo1x.S: Likewise.
14382 * kern/i386/pc/startup.S: Likewise.
14383 * kern/ieee1275/ieee1275.c: Likewise.
14384 * kern/powerpc/cache.S: Likewise.
14385 * kern/powerpc/dl.c: Likewise.
14386 * kern/powerpc/ieee1275/cmain.c: Likewise.
14387 * kern/powerpc/ieee1275/crt0.S: Likewise.
14388 * kern/powerpc/ieee1275/init.c: Likewise.
14389 * kern/powerpc/ieee1275/openfw.c: Likewise.
14390 * kern/sparc64/cache.S: Likewise.
14391 * kern/sparc64/dl.c: Likewise.
14392 * kern/sparc64/ieee1275/init.c: Likewise.
14393 * kern/sparc64/ieee1275/openfw.c: Likewise.
14394 * loader/efi/chainloader.c: Likewise.
14395 * loader/efi/chainloader_normal.c: Likewise.
14396 * loader/i386/efi/linux.c: Likewise.
14397 * loader/i386/efi/linux_normal.c: Likewise.
14398 * loader/i386/pc/chainloader.c: Likewise.
14399 * loader/i386/pc/chainloader_normal.c: Likewise.
14400 * loader/i386/pc/linux.c: Likewise.
14401 * loader/i386/pc/linux_normal.c: Likewise.
14402 * loader/i386/pc/multiboot.c: Likewise.
14403 * loader/i386/pc/multiboot_normal.c: Likewise.
14404 * loader/powerpc/ieee1275/linux.c: Likewise.
14405 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
14406 * normal/arg.c: Likewise.
14407 * normal/cmdline.c: Likewise.
14408 * normal/command.c: Likewise.
14409 * normal/completion.c: Likewise.
14410 * normal/execute.c: Likewise.
14411 * normal/function.c: Likewise.
14412 * normal/lexer.c: Likewise.
14413 * normal/main.c: Likewise.
14414 * normal/menu.c: Likewise.
14415 * normal/menu_entry.c: Likewise.
14416 * normal/misc.c: Likewise.
14417 * normal/parser.y: Likewise.
14418 * normal/script.c: Likewise.
14419 * normal/i386/setjmp.S: Likewise.
14420 * normal/powerpc/setjmp.S: Likewise.
14421 * normal/sparc64/setjmp.S: Likewise.
14422 * partmap/acorn.c: Likewise.
14423 * partmap/amiga.c: Likewise.
14424 * partmap/apple.c: Likewise.
14425 * partmap/gpt.c: Likewise.
14426 * partmap/pc.c: Likewise.
14427 * partmap/sun.c: Likewise.
14428 * term/gfxterm.c: Likewise.
14429 * term/terminfo.c: Likewise.
14430 * term/efi/console.c: Likewise.
14431 * term/i386/pc/console.c: Likewise.
14432 * term/i386/pc/serial.c: Likewise.
14433 * term/i386/pc/vesafb.c: Likewise.
14434 * term/i386/pc/vga.c: Likewise.
14435 * term/ieee1275/ofconsole.c: Likewise.
14436 * util/biosdisk.c: Likewise.
14437 * util/console.c: Likewise.
14438 * util/genmoddep.c: Likewise.
14439 * util/getroot.c: Likewise.
14440 * util/grub-emu.c: Likewise.
14441 * util/grub-mkdevicemap.c: Likewise.
14442 * util/grub-probe.c: Likewise.
14443 * util/lvm.c: Likewise.
14444 * util/misc.c: Likewise.
14445 * util/raid.c: Likewise.
14446 * util/resolve.c: Likewise.
14447 * util/update-grub.in: Likewise.
14448 * util/update-grub_lib.in: Likewise.
14449 * util/grub.d/00_header.in: Likewise.
14450 * util/grub.d/10_hurd.in: Likewise.
14451 * util/grub.d/10_linux.in: Likewise.
14452 * util/i386/efi/grub-install.in: Likewise.
14453 * util/i386/efi/grub-mkimage.c: Likewise.
14454 * util/i386/pc/grub-install.in: Likewise.
14455 * util/i386/pc/grub-mkimage.c: Likewise.
14456 * util/i386/pc/grub-mkrescue.in: Likewise.
14457 * util/i386/pc/grub-setup.c: Likewise.
14458 * util/i386/pc/misc.c: Likewise.
14459 * util/powerpc/ieee1275/grub-install.in: Likewise.
14460 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
14461 * util/powerpc/ieee1275/misc.c: Likewise.
14462 * video/bitmap.c: Likewise.
14463 * video/video.c: Likewise.
14464 * video/i386/pc/vbe.c: Likewise.
14465 * video/i386/pc/vbeblit.c: Likewise.
14466 * video/i386/pc/vbefill.c: Likewise.
14467 * video/i386/pc/vbeutil.c: Likewise.
14468 * video/readers/tga.c: Likewise.
14469
3572d015 144702007-07-02 Robert Millan <rmh@aybabtu.com>
14471
14472 * conf/i386-efi.rmk: Replace obsolete reference to
14473 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
14474 with util/getroot.c.
14475 * conf/powerpc-ieee1275.rmk: Likewise.
14476 * conf/sparc64-ieee1275.rmk: Likewise.
14477
14478 * util/grub-emu.c (main): Fix unchecked pointer handling.
14479
2c2a681b 144802007-07-02 Robert Millan <rmh@aybabtu.com>
14481
14482 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
14483 invocation to fail, in order to support partition-less media.
14484
14485 * util/i386/pc/grub-install.in: Likewise.
14486
14487 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
14488 which fs or partmap modules are needed (akin to its sister scripts).
14489
14490 Also use grub-probe to get rid of unportable /proc/mounts check.
14491
14492 Print the same informational message that the other scripts do, before
fe6b695a 14493 exiting.
2c2a681b 14494
6193defe 144952007-06-23 Robert Millan <rmh@aybabtu.com>
14496
fe6b695a 14497 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 14498 a font file can be found and, if so, echo the GRUB path to it.
14499
14500 * util/update-grub.in: Handle multiple terminals depending on user
14501 input, platform availability and font file presence. Propagate
14502 variables of our findings to /etc/grub.d/ children.
14503
14504 * util/grub.d/00_header.in: Handle multiple terminals, based on
14505 environment setup by update-grub.
14506
eface1dc 145072007-06-23 Robert Millan <rmh@aybabtu.com>
14508
ba50d28f 14509 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 14510
bf697e28 145112007-06-21 Robert Millan <rmh@aybabtu.com>
14512
14513 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
14514 indicate end of data section in kernel image.
14515 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
14516 GRUB_KERNEL_MACHINE_DATA_END.
14517
14518 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
14519 space for it.
14520 * kern/i386/efi/startup.S: Likewise.
14521
14522 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
14523 during image generation. Implement --prefix option to override this
14524 patch.
14525 * util/i386/efi/grub-mkimage.c: Likewise.
14526
14527 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
14528 code to make path relative to its root into a separate function.
14529
14530 * util/i386/pc/grub-install.in: Use newly provided
14531 make_system_path_relative_to_its_root() to convert ${grubdir}, then
14532 pass the result to grub-install --prefix.
14533
baa574b4 145342007-06-13 Robert Millan <rmh@aybabtu.com>
14535
14536 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
14537 DEFAULT_DEVICE_MAP.
14538 * util/grub-emu.c: Use above definitions from misc.h instead of
14539 defining them.
14540 * util/grub-mkdevicemap.c: Likewise.
14541 * util/i386/pc/grub-setup.c: Likewise.
14542 * util/grub-probe.c: Likewise.
14543 (probe): Abort with grub_util_error() when either
14544 grub_guess_root_device or grub_util_get_grub_dev fails.
14545
0215dcbf 145462007-06-12 Robert Millan <rmh@aybabtu.com>
14547
14548 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
14549 "pager" assignment.
14550 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
14551 "pcdata".
14552 * util/grub-probe.c (probe): Likewise for "drive_name".
14553
8af2ab7b 145542007-06-11 Robert Millan <rmh@aybabtu.com>
14555
14556 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
14557 not just the cdrom one.
14558
59d31694 145592007-06-11 Robert Millan <rmh@aybabtu.com>
14560
14561 * util/i386/pc/grub-mkrescue.in: Add "set -e".
14562 Add --pkglibdir=DIR option to override pkglibdir.
14563 Mention --image-type=TYPE in help output.
14564 Fix --grub-mkimage (it was a no-op).
fe6b695a 14565 Abort gracefully when no parameter is given.
59d31694 14566
7ee367e4 145672007-06-11 Robert Millan <rmh@aybabtu.com>
14568
14569 * util/i386/pc/grub-mkrescue.in: New file.
14570 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
14571 * Makefile.in: Handle bin_SCRIPTS.
14572
29b0ed46 145732007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
14574
14575 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
14576 list of video modes.
14577
c0f90770 145782007-06-06 Robert Millan <rmh@aybabtu.com>
14579
14580 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
14581 file doesn't exist, or if it is in a filesystem grub can't read.
14582
14583 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
14584 not abort if GRUB_DRIVE could not be defined. Rearrange generated
14585 header comment to fit in 80 columns when the variables are resolved.
14586
14587 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
14588 could be identified by update-grub. Remove redundant check for
fe6b695a 14589 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 14590 handles that).
14591
fb36dc26 145922007-06-04 Robert Millan <rmh@aybabtu.com>
14593
14594 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
14595
14596 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
14597
14598 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
14599
0c68c93e 146002007-06-04 Robert Millan <rmh@aybabtu.com>
14601
14602 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
14603
14604 * include/grub/partition.h: Declare grub_apple_partition_map_init and
14605 grub_apple_partition_map_fini.
14606
14607 * util/biosdisk.c
14608 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
14609 to access >2 TiB disks).
14610
14611 Print disk->total_sectors with %llu instead of %lu, since this
14612 variable is always 64-bit (prevents wrong disk size from being displayed
14613 on either >2 TiB disk or big-endian CPU).
14614
14615 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
14616 into a generic case that supports all (sane) partition maps.
14617
14618 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
14619 breaks big-endian.
14620
14621 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
14622 and grub_apple_partition_map_fini() after that.
14623
0f23eb74 146242007-06-01 Robert Millan <rmh@aybabtu.com>
14625
14626 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
14627
14628 * util/grub.d/00_header.in: Only enable gfxterm when
14629 convert_system_path_to_grub_path() succeeds.
14630
42c71976 146312007-05-20 Robert Millan <rmh@aybabtu.com>
14632
14633 * util/update-grub_lib.in: New file.
14634 * DISTLIST: Add update-grub_lib.in.
14635 * conf/common.rmk: Generate update-grub_lib and install it in
14636 $(lib_DATA).
14637 * Makefile.in: Add install routine for $(lib_DATA).
14638
14639 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
14640 function provided by update-grub_lib to support arbitrary paths of
14641 unifont.pff.
14642 * util/update-grub.in: Use convert_system_path_to_grub_path() to
14643 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
14644
5beb2291 146452007-05-19 Robert Millan <rmh@aybabtu.com>
14646
14647 * commands/i386/cpuid.c: New module.
14648 * DISTLIST: Add it.
14649 * conf/i386-efi.rmk: Enable cpuid.mod.
14650 * conf/i386-pc.rmk: Likewise.
14651
7262eca1 146522007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
14653
14654 * kern/disk.c (grub_disk_read): Check return value of
14655 grub_realloc().
14656
260ba823 146572007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
14658
14659 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
14660 arrays.
14661 * disk/raid.c (grub_raid_open): Likewise.
14662
1ecb6cf2 146632007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
14664
14665 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
14666 stack instead of on the heap.
14667
14668 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
14669 before doing a read on it.
14670
14671 * configure.ac: Only use -fno-stack-protector for the target
14672 environment.
f19dbdb7 14673
21c8cbb1 146742007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
14675
14676 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
14677 __attribute_ ((unused)) to mode_type argument.
14678
14679 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 14680
21c8cbb1 14681 * kern/misc.c (memcmp): Fix prototype.
14682
14683 * include/grub/partition.h [GRUB_UTIL]
14684 (grub_gpt_partition_map_init): Add prototype.
14685 (grub_gpt_partition_map_fini): Likewise.
14686
14687 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
14688 at the right place.
14689
14690 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
14691 (grub_fat_read_data): Likewise.
14692 (grub_fat_find_dir): Likewise.
14693
14694 * font/manager.c (find_glyph): Make table a const.
14695 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 14696
849d55d3 146972007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
14698
14699 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
14700 code, first search for device in /dev/mapper, then in /dev.
14701 (grub_util_get_grub_dev): New function.
14702 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
14703 prototype.
14704 * util/grub-probe.c (probe): Remove check for RAID, call
14705 grub_util_get_grub_dev() instead of
14706 grub_util_biosdisk_get_grub_dev().
14707 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
14708 grub_util_biosdisk_get_grub_dev().
14709 * util/i386/pc/grub-setup.c (main): Likewise.
14710
8fff7c2f 147112007-05-16 Robert Millan <rmh@aybabtu.com>
14712
14713 * DISTLIST: Update for the latest changes.
14714 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
14715 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
14716 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
14717 grub/util/biosdisk.h.
14718 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
14719 grub/util/biosdisk.h.
14720
48e12b52 147212007-05-16 Robert Millan <rmh@aybabtu.com>
14722
14723 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
14724
46b9d128 147252007-05-16 Robert Millan <rmh@aybabtu.com>
14726
14727 * util/i386/efi/grub-install.in: New.
14728 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
14729 newly added grub-install.
14730 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
14731 include.
14732 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
14733 grub/util/biosdisk.h.
14734 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
14735 grub/util/biosdisk.h.
14736
2d1a40a9 147372007-05-16 Robert Millan <rmh@aybabtu.com>
14738
14739 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
14740 * include/grub/util/biosdisk.h: ... here.
14741 * util/i386/pc/biosdisk.c: Moved to ...
14742 * util/biosdisk.c: ... here.
14743 * util/i386/pc/getroot.c: Moved to ...
14744 * util/getroot.c: ... here.
14745 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
14746 * util/grub-mkdevicemap.c: ... here.
14747 * util/i386/pc/grub-probe.c: Moved to ...
14748 * util/grub-probe.c: ... here.
14749
9e26e3bc 147502007-05-15 Robert Millan <rmh@aybabtu.com>
14751
14752 * util/update-grub.in: Remove duplicated line in grub.cfg header
14753 message.
14754
57f96397 147552007-05-13 Robert Millan <rmh@aybabtu.com>
14756
14757 * util/update-grub.in: Fix a few assumptions about the devices holding
14758 /, /boot and /boot/grub being the same.
14759 * util/grub.d/00_header.in: Likewise.
14760 * util/grub.d/10_hurd.in: Likewise.
14761 * util/grub.d/10_linux.in: Likewise.
14762
14763 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
14764 patterns. Use that to define the `.old' suffix as older than `'.
14765
14766 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
14767
14768 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
14769 the grub.cfg header message.
14770
2e610d62 147712007-05-11 Robert Millan <rmh@aybabtu.com>
14772
14773 * util/update-grub.in: Create device.map if it doesn't already exist,
14774 before attempting to run grub-probe.
14775 Check for grub-probe and grub-mkdevicemap with the same code
14776 grub-install is using.
14777 Remove test mode.
14778
3f6a10ef 147792007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
14780
14781 * Makefile.in: Add the datarootdir autoconf variable.
14782
02e7b75e 147832007-05-09 Robert Millan <rmh@aybabtu.com>
14784
14785 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 14786 fail gracefully if dev->disk->partition == NULL.
02e7b75e 14787
75f396cc 147882007-05-07 Robert Millan <rmh@aybabtu.com>
14789
14790 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
14791 determine partition map module.
14792 * util/i386/pc/grub-install.in: Use this feature to decide which
14793 partition module to load, instead of hardcoding pc and gpt.
14794
da65cb36 147952007-05-07 Robert Millan <rmh@aybabtu.com>
14796
14797 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
14798 source directory differs from build directory.
14799
b57d6a91 148002007-05-05 Robert Millan <rmh@aybabtu.com>
14801
14802 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
14803 initialisation.
14804
509d00f1 148052007-05-05 Robert Millan <rmh@aybabtu.com>
14806
14807 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
14808
c48f23ef 148092007-05-05 Robert Millan <rmh@aybabtu.com>
14810
14811 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
14812 command-line arguments via ${GRUB_CMDLINE_LINUX}.
14813
20b97658 148142007-05-05 Robert Millan <rmh@aybabtu.com>
14815
14816 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
14817 (grub_probe_SOURCES): Likewise.
14818 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
14819 GPT and initialize dos_part and bsd_part accordingly.
14820 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
14821 install_bsd_part.
14822 (main): Activate gpt module for use during partition identification,
14823 and deactivate it afterwards.
14824 * util/i386/pc/grub-install.in: Add gpt module to core.img.
14825 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
14826 partition identification, and deactivate it afterwards.
14827
99123174 148282007-05-05 Robert Millan <rmh@aybabtu.com>
14829
14830 * term/i386/pc/console.c (grub_console_fini): Call
14831 grub_term_set_current() before grub_term_unregister().
14832
ebd97f6e 148332007-05-04 Robert Millan <rmh@aybabtu.com>
14834
14835 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
14836 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
14837 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
14838 and update-grub_DATA.
14839 * conf/common.rmk: Build and install update-grub components.
14840 * conf/common.mk: Regenerate.
14841 * util/update-grub.in: New. Core of update-grub.
14842 * util/grub.d/00_header.in: New. Generates grub.cfg header.
14843 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
14844 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
14845 * util/grub.d/README: New. Document grub.d directory layout.
14846
b06a264d 148472007-05-01 Robert Millan <rmh@aybabtu.com>
14848
14849 * util/grub-emu.c: Move initialization functions
14850 grub_util_biosdisk_init() and grub_init_all() before
14851 grub_util_biosdisk_get_grub_dev(), which relies on them.
14852
41f0050e 148532007-04-19 Robert Millan <rmh@aybabtu.com>
14854
14855 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
14856 it is used later.
14857
04582bb3 148582007-04-18 Jerone Young <jerone@gmail.com>
14859
f19dbdb7 14860 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 14861 stanza.
14862
08db4632 148632007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 14864
08db4632 14865 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
14866 continue on and look for device node with real device name.
14867
801b76be 148682007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 14869
fe6b695a 14870 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 14871 ability.
14872 * Makefile.in: Add autoconf package transformation code.
14873 * util/i386/pc/grub-install.in: Likewise.
14874 * util/powerpc/ieee1275/grub-install.in: Likewise.
14875
6795c4e1 148762007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14877
14878 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
14879 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
14880 (EXT2_REVISION): Likewise.
14881 (EXT2_INODE_SIZE): Likewise.
14882 (struct grub_ext2_block_group): Added a missing member
14883 "used_dirs".
14884 (grub_ext2_read_inode): Divide by the inode size in a superblock
14885 instead of 128 to obtain INODES_PER_BLOCK.
14886 Use the macro EXT2_INODE_SIZE instead of directly using
14887 SBLOCK->INODE_SIZE.
14888
d70af616 148892007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14890
14891 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
14892 superblock instead of the structure size to compute an
14893 offset. This fixes the problem that GRUB could not read a
14894 filesystem when inode size is different from 128-byte.
14895
3b801603 148962007-03-05 Marco Gerards <marco@gnu.org>
14897
14898 * normal/main.c (read_config_file): When "menu" is not set, create
14899 an initial context.
14900
4785bfe4 149012007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14902
14903 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
14904 (HEAP_LIMIT): New macro.
14905 (grub_claim_heap): Claim memory up to `heaplimit'.
14906
a0cbb023 149072007-02-21 Hollis Blanchard <hollis@penguinppc.org>
14908
14909 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
14910 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
14911 (_start): Likewise.
14912 (grub_arch_modules_addr): Return address after `_end'.
14913 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
14914 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
14915 (add_segments): Calculate `_end' from phdr size and location.
14916 (ALIGN_UP): Moved to ...
14917 * include/grub/misc.h: here.
14918 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
14919 New macro.
14920 (GRUB_IEEE1275_MODULE_BASE): Removed.
14921
fd7d8eba 149222007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14923
14924 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
14925 loop boundary.
14926
9b09e6fc 149272007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14928
14929 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
14930 All users updated.
14931 (grub_elf64_load_hook_t): Likewise.
14932 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
14933 debug output.
14934
3ce27299 149352007-02-20 Hollis Blanchard <hollis@penguinppc.org>
14936
14937 * kern/mm.c: Update copyright.
14938 (grub_mm_debug): Correct syntax error.
14939 (grub_mm_dump_free): New function.
14940 (grub_debug_free): Call `grub_free'.
14941 * include/grub/mm.h: Update copyright.
14942 (grub_mm_dump_free): Add declaration.
14943
077d5fee 149442007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14945
14946 * include/grub/ieee1275/ieee1275.h: Update copyright.
14947 * kern/powerpc/ieee1275/init.c: Likewise.
14948 * kern/powerpc/ieee1275/openfw.c: Likewise.
14949
14950 * loader/powerpc/ieee1275/linux.c: Likewise.
14951 * include/grub/elfload.h: Likewise.
14952 * kern/elf.c: Likewise.
14953 (grub_elf32_load): Pass `base' and `size' parameters. Update all
14954 callers.
14955 (grub_elf64_load): Likewise.
14956 (grub_elf32_load_segment): Move to a nested function.
14957 (grub_elf64_load_segment): Likewise.
14958
dc946850 149592007-02-12 Hollis Blanchard <hollis@penguinppc.org>
14960
14961 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
14962 prototype.
14963 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
14964 (grub_heap_len): Likewise.
14965 (HEAP_SIZE): New macro.
14966 (grub_claim_heap): New function.
14967 (grub_machine_init): Don't claim heap directly. Call
14968 `grub_claim_heap'.
14969 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
14970 (grub_available_iterate): New function.
14971
baa2a121 149722007-02-03 Thomas Schwinge <tschwinge@gnu.org>
14973
14974 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
14975 * configure.ac: Use it for testing the HOST and TARGET compilers.
14976
4fe9862e 149772006-12-13 Thomas Schwinge <tschwinge@gnu.org>
14978
14979 * Makefile.in (enable_grub_emu): New variable.
14980 * configure.ac (--enable-grub-emu): New option.
14981 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
14982 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
14983 * conf/i386-pc.rmk: Likewise.
14984 * conf/powerpc-ieee1275.rmk: Likewise.
14985 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
14986
a8aa5762 149872006-12-12 Marco Gerards <marco@gnu.org>
14988
14989 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
14990
14991 * kern/env.c (grub_env_unset): Don't free the member `value' when
14992 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
14993 pointer.
14994
14995 * normal/main.c (current_menu): Removed.
14996 (free_menu): Unset the `menu' environment variable.
14997 (grub_normal_menu_addentry): Make use of the environment variable
14998 `menu', instead of using the global `current_menu'. Allocate
14999 memory for the sourcecode of this entry.
15000 (read_config_file): New argument `nested', changed all callers.
15001 Only in the case of a new context, initialize a new menu. Set the
15002 `menu' environment variable.
15003 (grub_normal_execute): Don't set and unset the environment
15004 variable `menu' here anymore. Only free the menu when leaving the
15005 context.
15006
15007 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
15008 leak.
15009
957b3a3e 150102006-12-11 Marco Gerards <marco@gnu.org>
15011
15012 * normal/menu_entry.c (run): Fix off by one bug so the last line
15013 is executed. Move the loader check to outside the loop.
15014
ef875714 150152006-12-08 Hollis Blanchard <hollis@penguinppc.org>
15016
15017 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
15018
4e739985 150192006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
15020
15021 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
15022 the number of sectors. Reported by Andrey Shuvikov
15023 <mr_hyro@yahoo.com>.
f19dbdb7 15024
790707f2 150252006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
15026
15027 * kern/disk.c (grub_disk_read): When there is a read error, always
15028 try to read only the necessary data.
f19dbdb7 15029
790707f2 15030 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
15031 disk/raid.c.
15032 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
15033 prototype.
15034 [GRUB_UTIL] (grub_raid_fini): Likewise.
15035 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 15036 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 15037 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
15038 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
15039 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
15040 and grub_raid_fini().
f19dbdb7 15041
03e58196 150422006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
15043
15044 * include/grub/types.h (__unused): Rename to UNUSED.
15045 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
15046 (grub_elf64_size): Likewise.
f19dbdb7 15047
ae4f23bf 150482006-11-03 Hollis Blanchard <hollis@penguinppc.org>
15049
15050 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
15051 grub_error_push and grub_error_pop in the error-handling path.
15052 (grub_elf32_load_segment): Only call grub_file_read with non-zero
15053 length.
15054
2166cc83 150552006-11-03 Hollis Blanchard <hollis@penguinppc.org>
15056
15057 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
15058 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15059 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15060 (kernel_elf_SOURCES): Likewise.
15061 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
15062 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
15063 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
15064 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
15065 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
15066 (elf_mod_SOURCES): New variable.
15067 (elf_mod_CFLAGS): Likewise.
15068 (elf_mod_LDFLAGS): Likewise.
15069 * include/grub/types.h (__unused): New macro.
15070 * include/grub/elfload.h: New file.
15071 * kern/elf.c: Likewise.
15072 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
15073 (ELF32_LOADMASK): New macro.
15074 (ELF64_LOADMASK): Likewise.
15075 (vmlinux): Removed.
15076 (grub_linux_load32): New function.
15077 (grub_linux_load64): Likewise.
15078 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
15079 Use grub_elf_t instead of grub_file_t.
15080
a09d5aa5 150812006-11-02 Hollis Blanchard <hollis@penguinppc.org>
15082
15083 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
15084 `catch_result' to struct set_color_args.
15085
d976fc51 150862006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
15087
15088 * normal/menu.c: Include grub/script.h.
15089 * normal/menu_entry.c: Likewise.
15090 * include/grub/normal.h: Do not include grub/script.h.
15091
67507549 150922006-10-27 Hollis Blanchard <hollis@penguinppc.org>
15093
15094 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
15095
69203a99 150962006-10-27 Hollis Blanchard <hollis@penguinppc.org>
15097
15098 * kern/disk.c (grub_disk_open): Print debug messages when opening a
15099 disk.
15100 (grub_disk_close): Print debug messages when closing a disk.
15101 (grub_disk_read): Print debug messages when disk read fails.
15102 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
15103 filesystem type.
15104 * kern/partition.c: Include misc.h.
15105 (grub_partition_iterate): Print debug messages when detecting
15106 partition type.
15107
e2b8278c 151082006-10-27 Hollis Blanchard <hollis@penguinppc.org>
15109
15110 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
15111 is negative.
15112 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
15113
97b2f2ff 151142006-10-26 Hollis Blanchard <hollis@penguinppc.org>
15115
15116 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
15117 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
15118
6555d655 151192006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
15120
15121 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
15122 instead of sizeof(lv). Patch by Michael Guntsche.
15123
4d42b77f 151242006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
15125
15126 * disk/lvm.c: Rename VGS to VG_LIST.
15127 (grub_lvm_iterate): Change VGS->LV to VG-LV.
15128 (grub_lvm_open): Likewise.
15129 Thanks to Michael Guntsche for finding this bug.
15130
5d74d927 151312006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15132
15133 * configure.ac (AC_INIT): Bumped to 1.95.
15134
a1bb27e4 151352006-10-14 Robert Millan <rmh@aybabtu.com>
15136
15137 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
15138 with "/dev/.static/dev/md".
15139
e0994b8b 151402006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
15141
15142 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
15143 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
15144 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
15145 DRIVE_NAME are always freed.
15146
15147 * util/i386/pc/biosdisk.c (make_device_name): Add one into
15148 DOS_PART, as a DOS partition is counted from one instead of zero
15149 now. Reported by Robert Millan.
15150
ddd5cee9 151512006-10-14 Robert Millan <rmh@aybabtu.com>
15152
15153 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
15154 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
15155 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
15156 string returned by grub_guess_root_device.
15157 * util/i386/pc/grub-setup.c: Likewise.
15158 * util/i386/pc/grub-probefs.c: Likewise.
15159
15160 * util/i386/pc/grub-probefs.c: Rename to ...
15161 * util/i386/pc/grub-probe.c: ... this.
15162 * DISTLIST: Remove grub-probefs, add grub-probe.
15163 * conf/i386-efi.rmk: Likewise.
15164 * conf/i386-pc.rmk: Likewise.
15165 * util/i386/pc/grub-install.in: Likewise.
15166
15167 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
15168 choose which information we want to print.
15169
2b002173 151702006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
15171
15172 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
15173 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
15174 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
15175 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
15176 video/readers/tga.c and video/i386/pc/vbeutil.c.
15177
151782006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
15179
15180 Added support for RAID and LVM.
f19dbdb7 15181
2b002173 15182 * disk/lvm.c: New file.
15183 * disk/raid.c: Likewise.
15184 * include/grub/lvm.h: Likewise.
f19dbdb7 15185 * include/grub/raid.h: Likewise.
2b002173 15186 * include/grub/util/lvm.h: Likewise.
15187 * include/grub/util/raid.h: Likewise.
15188 * util/lvm.c: Likewise.
15189 * util/raid.c: Likewise.
15190
15191 * include/grub/disk.h (grub_disk_dev_id): Add
15192 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
15193 (grub_disk_get_size): New prototype.
15194 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
15195 returns a partition.
15196 (grub_disk_get_size): New function.
f19dbdb7 15197
2b002173 15198 * kern/i386/pc/init.c (make_install_device): Copy the prefix
15199 verbatim if grub_install_dos_part is -2.
15200
15201 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
15202 and LVM devices.
15203
15204 * util/i386/pc/grub-setup.c (setup): New argument
15205 MUST_EMBED. Force embedding of GRUB when the argument is
15206 true. Close FILE before returning.
15207 (main): Add support for RAID and LVM.
f19dbdb7 15208
2b002173 15209 * conf/common.rmk: Add RAID and LVM modules.
15210 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
15211 util/lvm.c.
15212 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
15213
15214 * kern/misc.c (grub_strstr): New function.
15215 * include/grub/misc.h (grub_strstr): New prototype.
15216
050548d0 152172006-10-10 Tristan Gingold <tristan.gingold@bull.net>
15218
15219 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
15220
da849d2d 152212006-10-05 Tristan Gingold <tristan.gingold@bull.net>
15222
15223 * kern/misc.c (grub_strtoull): Guess the base only if not
15224 specified.
15225
97b2f2ff 152262006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 15227
15228 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
15229 PowerMac support.
15230
97b2f2ff 152312006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 15232
15233 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
15234
15235 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
15236 Remove `flags' argument. All callers changed.
15237 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
15238 (IEEE1275_IHANDLE_INVALID): New variable.
15239 (IEEE1275_CELL_INVALID): New variable.
15240 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
15241 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
15242 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
15243 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
15244 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
15245 codes from Open Firmware. All callers updated.
15246 (grub_ieee1275_next_property): Directly return Open Firmware return
15247 code.
15248 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
15249 Standardize error checking from `grub_ieee1275_get_property'.
15250 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
15251 `devalias' to `aliases'. Correct comments. Consolidate error paths.
15252
97b2f2ff 152532006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 15254
15255 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
15256 `instance_to_package_args' to `instance_to_path_args'.
15257
15258 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
15259 `grub_ieee1275_chosen'.
15260
15261 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
15262 `grub_ieee1275_interpret'.
15263
97b2f2ff 152642006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 15265
15266 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
15267
97b2f2ff 152682006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 15269
15270 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
15271 (__cmpdi): Likewise.
15272
15273 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
15274 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
15275 `grub_ssize_t'.
15276
02bb8acc 15277 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 15278
15279 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
15280 to type `grub_ssize_t'.
15281 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
15282
7f9a8531 152832006-09-22 Marco Gerards <marco@gnu.org>
15284
15285 * normal/script.c (grub_script_create_cmdmenu): Skip leading
15286 newlines.
15287
b5ef1102 152882006-09-22 Marco Gerards <marco@gnu.org>
15289
15290 * commands/echo.c: New file.
15291
15292 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
15293
15294 * conf/common.rmk (echo_mod_SOURCES): New variable.
15295 (echo_mod_CFLAGS): Likewise.
15296 (echo_mod_LDFLAGS): Likewise.
15297
2cff3677 152982006-09-22 Marco Gerards <marco@gnu.org>
15299
15300 * normal/main.c (get_line): Malloc memory instead of using
15301 preallocated memory. Removed the arguments `cmdline' and
15302 `max_len'. Updated all callers.
15303
6ba4688b 153042006-09-22 Marco Gerards <marco@gnu.org>
15305
15306 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
15307 (normal_mod_DEPENDENCIES): Likewise.
15308
15309 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
15310 (normal_mod_DEPENDENCIES): Likewise.
15311
15312 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
15313
e02ac02c 153142006-09-22 Johan Rydberg <jrydberg@gnu.org>
15315
15316 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
15317 programs.
15318 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
15319 (normal_mod_DEPENDENCIES): Likewise.
15320 * conf/i386-pc.mk: Regenerate.
15321 * conf/i386-efi.mk: Likewise
15322 * conf/common.mk: Likewise.
15323 * conf/powerpc-ieee1275.mk: Likewise.
15324 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 15325
8d252e44 153262006-09-22 Robert Millan <rmh@aybabtu.com>
15327
15328 Sync with i386 version.
15329 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
15330 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
15331
209bf7ac 153322006-09-21 Robert Millan <rmh@aybabtu.com>
15333
15334 Import from GRUB Legacy (lib/device.c):
15335 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
15336 (init_device_map) [__linux__]: Add support for I2O devices.
15337
6b146090 153382006-09-14 Marco Gerards <marco@gnu.org>
15339
15340 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
15341 `-melf_i386'.
15342
e38600a8 153432006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 15344
15345 * util/i386/pc/grub-install.in: Skip menu.lst when removing
15346 /boot/grub/*.lst.
78fa1790 15347
2952da5d 15348 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 15349
2952da5d 15350 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
15351 before adding it to device.map.
15352
01b82a64 153532006-08-15 Johan Rydberg <jrydberg@gnu.org>
15354
fe6b695a 15355 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 15356 compiles a file; using the -MD option.
15357 * conf/common.mk: Regenerate.
15358 * conf/i386-pc.mk: Likewise.
15359 * conf/i386-efi.mk: Likewise.
15360 * conf/powerpc-ieee1275.mk: Likewise.
15361 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 15362
1064790d 153632006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
15364
15365 Move the prototypes of grub_setjmp and grub_longjmp to
15366 cpu/setjmp.h, so that each architecture may specify different
15367 attributes.
f19dbdb7 15368
1064790d 15369 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
15370 (grub_longjmp): Likewise.
15371 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
15372 (grub_longjmp): Likewise.
15373 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
15374 (grub_longjmp): Likewise.
15375
15376 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
15377 [!GRUB_UTIL] (grub_longjmp): Removed.
15378
29dda3ed 153792006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
15380
15381 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
15382 "color!" method does not return any value.
15383
ad2a06ed 153842006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
15385
15386 * include/grub/bitmap.h: New file.
15387
15388 * include/grub/i386/pc/vbeutil.h: Likewise.
15389
15390 * video/bitmap.c: Likewise.
15391
15392 * video/readers/tga.c: Likewise.
15393
15394 * video/i386/pc/vbeutil.c: Likewise.
15395
15396 * commands/videotest.c: Code cleanup and updated to reflect to new
15397 video API.
15398
15399 * term/gfxterm.c: Likewise.
15400
15401 * video/video.c: Likewise.
15402
15403 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
15404 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
15405 (bitmap_mod_SOURCES): New entry.
15406 (bitmap_mod_CFLAGS): Likewise.
15407 (bitmap_mod_LDFLAGS): Likewise.
15408 (tga_mod_SOURCES): Likewise.
15409 (tga_mod_CFLAGS): Likewise.
15410 (tga_mod_LDFLAGS): Likewise.
15411
15412 * include/grub/video.h (grub_video_blit_operators): New enum type.
15413 (grub_video_render_target): Changed as forward declaration and moved
15414 actual definition to be video driver specific.
15415 (grub_video_adapter.blit_bitmap): Added blitting operator.
15416 (grub_video_adapter.blit_render_target): Likewise.
15417 (grub_video_blit_bitmap): Likewise.
15418 (grub_video_blit_render_target): Likewise.
15419
15420 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
15421 driver specific render target definition.
15422 (grub_video_vbe_map_rgba): Added driver internal helper.
15423 (grub_video_vbe_unmap_color): Updated to use
15424 grub_video_i386_vbeblit_info.
15425 (grub_video_vbe_get_video_ptr): Likewise.
15426
15427 * include/grub/i386/pc/vbeblit.h
15428 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
15429 grub_video_i386_vbeblit_info.
15430 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
15431 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
15432 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
15433 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
15434 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
15435 (grub_video_i386_vbeblit_index_index): Likewise.
15436 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
15437 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
15438 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
15439 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
15440 operator.
15441 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
15442 operator.
15443
15444 * video/i386/pc/vbeblit.c: Updated to reflect changes on
15445 include/grub/i386/pc/vbeblit.h.
15446
15447 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
15448 Updated to use grub_video_i386_vbeblit_info.
15449 (grub_video_i386_vbefill_R8G8B8): Likewise.
15450 (grub_video_i386_vbefill_index): Likewise.
15451 (grub_video_i386_vbefill): Added generic filler.
15452
15453 * video/i386/pc/vbefill.c: Updated to reflect changes on
15454 include/grub/i386/pc/vbefill.h.
15455
15456 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
15457 grub_video_i386_vbeblit_info.
15458 (grub_video_vbe_unmap_color): Likewise.
15459 (grub_video_vbe_blit_glyph): Likewise.
15460 (grub_video_vbe_scroll): Likewise.
15461 (grub_video_vbe_draw_pixel): Removed function.
15462 (grub_video_vbe_get_pixel): Likewise.
15463 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
15464 updated code to use it.
15465 (common_blitter): Added common blitter for render target and bitmap.
15466 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
15467 (grub_video_vbe_blit_render_target): Likewise.
15468
bc8c036d 154692006-07-30 Johan Rydberg <jrydberg@gnu.org>
15470
15471 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
15472 is in text mode if there is no console control protocol instance
15473 available.
15474
684a8eff 154752006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
15476
15477 * include/grub/video.h: Code cleanup.
15478
15479 * include/grub/i386/pc/vbe.h: Likewise.
15480
15481 * video/i386/pc/vbe.c: Likewise.
15482
15483 * video/i386/pc/vbeblit.c: Likewise.
15484
15485 * video/i386/pc/vbefill.c: Likewise.
15486
15487 * video/video.c: Likewise. Also added more comments.
15488
5915059b 154892006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
15490
15491 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
15492 (struct grub_biosdisk_dap): Likewise.
15493
15494 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
15495 linkage settings for all functions.
15496
90ce5d56 154972006-07-12 Marco Gerards <marco@gnu.org>
15498
15499 * configure.ac (--enable-mm-debug): Fix typo.
15500
15501 * genkernsyms.sh.in: Use proper quoting for `CC'.
15502
43e7f879 155032006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
15504
15505 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
15506 (normal_mod_ASFLAGS): Remove "-m32".
15507
4889bdec 155082006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
15509
15510 * util/misc.c: Include config.h.
15511 [!HAVE_MEMALIGN]: Do not include malloc.h.
15512 (grub_memalign): Use posix_memalign, if present. Then, use
15513 memalign, if present. Otherwise, emit an error.
15514
15515 * util/grub-emu.c: Do not include malloc.h.
15516
15517 * include/grub/util/misc.h: Include unistd.h. This is required for
15518 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
15519 D. Eades III <hde@foobar-qux.org>.
15520
15521 * configure.ac (AC_GNU_SOURCE): Added.
15522 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
15523 type.
15524
fd39d4da 155252006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
15526
15527 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
15528 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
15529
b786f3b5 155302006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
15531
15532 * include/grub/types.h (grub_host_addr_t): Rename to
15533 grub_target_addr_t.
15534 (grub_host_off_t): Rename to grub_target_off_t.
15535 (grub_host_size_t): Rename to grub_target_size_t.
15536 (grub_host_ssize_t): Rename to grub_target_ssize_t.
15537 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
15538
15539 * include/grub/kernel.h (struct grub_module_header): Change type
15540 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
15541 (grub_module_info): Likewise.
f19dbdb7 15542
051988bb 155432006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
15544
15545 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
15546 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
15547 Velazquez <jesus.velazquez@gmail.com>.
15548
deae281b 155492006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
15550
15551 Count partitions from 1 instead of 0 in the string representation
15552 of partitions. Still use 0-based internally.
f19dbdb7 15553
deae281b 15554 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
15555 (sun_partition_map_iterate): Use grub_partition_t instead of
15556 struct grub_partition *. Cast DESC->START_CYLINDER to
15557 grub_uint64_t after converting the endian.
15558 (sun_partition_map_probe): Subtract 1 for PARTNUM.
15559 (sun_partition_map_get_name): Add 1 to P->INDEX.
15560
15561 * partmap/pc.c (grub_partition_parse): Subtract 1 for
15562 PCDATA->DOS_PART.
15563 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
15564
15565 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
15566 zero instead of one.
15567 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
15568 (gpt_partition_map_get_name): Add 1 into P->INDEX.
15569
15570 * partmap/apple.c (apple_partition_map_iterate): Change the type
15571 of POS to unsigned.
15572 (apple_partition_map_probe): Subtract 1 for PARTNUM.
15573 (apple_partition_map_get_name): Add 1 into P->INDEX.
15574
15575 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
15576 of POS to unsigned.
15577 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
15578 calculate the offset of a partition.
15579 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
15580 (amiga_partition_map_get_name): Add 1 into P->INDEX.
15581
15582 * partmap/acorn.c (acorn_partition_map_find): Change the type of
15583 SECTOR to grub_disk_addr_t.
15584 (acorn_partition_map_iterate): Likewise.
15585 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
15586 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
15587 top.
15588 (acorn_partition_map_get_name): Add 1 into P->INDEX.
15589
15590 * kern/i386/pc/init.c (make_install_device): Add 1 into
15591 GRUB_INSTALL_DOS_PART.
15592
15593 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
15594 conditional.
15595
524a1e6a 155962006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
15597
15598 Clean up the code to support 64-bit addressing in disks and
15599 files. This change is not enough for filesystems yet.
f19dbdb7 15600
524a1e6a 15601 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
15602 type of "start" to grub_uint64_t.
15603 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
15604 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
15605 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
15606 convert addresses.
15607
15608 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
15609 to grub_disk_addr_t.
15610
15611 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
15612 string.
15613
15614 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15615
15616 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
15617 to char *.
15618
15619 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
15620
15621 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
15622
15623 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
15624
15625 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
15626 to grub_off_t, to detect an error from grub_file_seek.
15627 (grub_multiboot_load_elf32): Likewise.
15628
15629 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
15630 maximum unsigned long value when an overflow is detected.
15631 (grub_strtoull): New function.
15632 (grub_divmod64): Likewise.
15633 (grub_lltoa): use grub_divmod64.
15634
15635 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
15636 grub_disk_addr_t.
15637 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
15638 the pointer to next character. Use grub_strtoull instead of
15639 grub_strtoul.
15640 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
15641 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
15642 respectively.
15643
fe6b695a 15644 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 15645 return value is signed.
15646 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
15647 test if OFFSET is less than zero, as OFFSET is unsigned now.
15648
15649 * kern/disk.c (struct grub_disk_cache): Change the type of
15650 "sector" to grub_disk_addr_t.
15651 (grub_disk_cache_get_index): Change the type of SECTOR to
15652 grub_disk_addr_t. Calculate the hash with SECTOR casted to
15653 unsigned after shifting.
15654 (grub_disk_cache_invalidate): Change the type of SECTOR to
15655 grub_disk_addr_t.
15656 (grub_disk_cache_unlock): Likewise.
15657 (grub_disk_cache_store): Likewise.
15658 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
15659 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
15660 grub_disk_addr_t and grub_uint64_t, respectively.
15661 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
15662 body, as the value of OFFSET is tweaked by
15663 grub_disk_check_range. Change the types of START_SECTOR, LEN and
15664 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
15665 respectively.
15666 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
15667 body, as the value of OFFSET is tweaked by
15668 grub_disk_check_range. Change the types of LEN and N to
15669 grub_size_t.
15670
15671 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
15672 and "saved_offset" to grub_off_t.
15673 (test_header): Cast BUF to char *.
15674 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
15675 to char *.
15676 (grub_gzio_read): Change the types of OFFSET and SIZE to
15677 grub_off_t and grub_size_t, respectively.
15678
15679 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
15680 Removed.
15681 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
15682 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
15683 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
15684 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
15685 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
15686
15687 * include/grub/types.h (grub_off_t): Unconditionally set to
15688 grub_uint64_t.
15689 (grub_disk_addr_t): Changed to grub_uint64_t.
15690
15691 * include/grub/partition.h (struct grub_partition): Change the
15692 types of "start", "len" and "offset" to grub_disk_addr_t,
15693 grub_uint64_t and grub_disk_addr_t, respectively.
15694 (grub_partition_get_start): Return grub_disk_addr_t.
15695 (grub_partition_get_len): Return grub_uint64_t.
15696
15697 * include/grub/misc.h (grub_strtoull): New prototype.
15698 (grub_divmod64): Likewise.
15699
15700 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
15701 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
15702 grub_off_t, respectively.
15703 All callers and references changed.
15704
15705 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
15706 grub_size_t in "read".
15707 All callers and references changed.
15708
15709 * include/grub/file.h (struct grub_file): Change the types of
15710 "offset" and "size" to grub_off_t and grub_off_t,
15711 respectively. Change the type of SECTOR to grub_disk_addr_t in
15712 "read_hook".
15713 (grub_file_read): Change the type of LEN to grub_size_t.
15714 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
15715 grub_off_t.
15716 (grub_file_size): Return grub_off_t.
15717 (grub_file_tell): Likewise.
15718 All callers and references changed.
15719
15720 * include/grub/disk.h (struct grub_disk_dev): Change the types of
15721 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
15722 "write".
15723 (struct grub_disk): Change the type of "total_sectors" to
15724 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 15725 "read_hook".
524a1e6a 15726 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
15727 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
15728 (grub_disk_write): Likewise.
15729 All callers and references changed.
15730
15731 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
15732 char * for grub_strncmp to silence gcc.
15733 (grub_iso9660_mount): Likewise.
15734 (grub_iso9660_mount): Likewise.
15735 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
15736 return statement.
15737 (grub_iso9660_iterate_dir): Likewise.
15738 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
15739
15740 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
15741 LEN to grub_disk_addr_t and grub_size_t, respectively.
15742
15743 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
15744
15745 * fs/jfs.c (grub_jfs_read_file): Likewise.
15746
15747 * fs/minix.c (grub_jfs_read_file): Likewise.
15748
15749 * fs/sfs.c (grub_jfs_read_file): Likewise.
15750
15751 * fs/ufs.c (grub_jfs_read_file): Likewise.
15752
15753 * fs/xfs.c (grub_jfs_read_file): Likewise.
15754
15755 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
15756 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
15757 respectively.
15758
15759 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
15760 BLKNR to -1 instead of returning GRUB_ERRNO.
15761 (grub_ext2_read_file): Change the types of SECTOR and
15762 LEN to grub_disk_addr_t and grub_size_t, respectively.
15763
15764 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
15765 LEN to grub_disk_addr_t and grub_size_t, respectively.
15766
15767 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
15768 grub_file_read.
15769
15770 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
15771 string. Do not cast SECTOR explicitly.
15772
15773 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
15774 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
15775 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
15776 grub_disk_addr_t and grub_size_t, respectively. If the sector is
15777 over 2TB and LBA mode is not supported, raise an error.
15778 (get_safe_sectors): New function.
15779 (grub_biosdisk_read): Use get_safe_sectors.
15780 (grub_biosdisk_write): Likewise.
15781
15782 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
15783 (grub_efidisk_write): Likewise.
15784
15785 * disk/loopback.c (delete_loopback): Cosmetic changes.
15786 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
15787 correctly.
15788 (grub_loopback_open): Likewise.
15789 (grub_loopback_read): Likewise. Also, change the type of POS to
15790 grub_off_t, and fix the usage of grub_memset.
15791
15792 * commands/i386/pc/play.c: Include grub/machine/time.h.
15793
15794 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
15795 print FILE->SIZE.
15796
15797 * commands/configfile.c: Include grub/env.h.
15798
15799 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
15800 GRUB_ERRNO directly instead. Change the type of POS to
15801 grub_off_t. Follow the coding standard.
15802
15803 * commands/blocklist.c: Include grub/partition.h.
15804 (grub_cmd_blocklist): Return an error if the underlying device is
15805 not a disk. Take the starting sector of a partition into account,
15806 if a partition is used.
15807
15808 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
15809 a length field.
15810 (lba_mode): Support 64-bit addresses.
15811 (chs_mode): Likewise.
15812 (copy_buffer): Adapted to the new offsets of a length field and a
15813 segment field.
15814 (blocklist_default_start): Allocate 64-bit space.
15815
15816 * boot/i386/pc/boot.S (force_lba): Removed.
15817 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 15818 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 15819 space.
15820 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
15821 is useless.
15822 (lba_mode): Refactored to support a 64-bit address. More size
15823 optimization.
15824 (setup_sectors): Likewise.
15825
53af98ad 158262006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
15827
15828 * DISTLIST: Added include/grub/i386/linux.h. Removed
15829 include/grub/i386/pc/linux.h
15830
15831 * configure.ac (AC_INIT): Bumped to 1.94.
15832
15833 * config.guess: Updated from gnulib.
15834 * config.sub: Likewise.
15835 * install-sh: Likewise.
15836 * mkinstalldirs: Likewise.
15837
b4c1940a 158382006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
15839
15840 * conf/common.rmk (grub_modules_init.lst): Depended on
15841 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
15842 MODSRCFILES.
15843
15844 * genmk.rb (PModule::rule): Reverted the previous change.
15845
cfca1cfd 158462006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
15847
15848 * conf/common.rmk (grub_modules_init.lst): Depends on
15849 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
15850 that the target does not exist before producing.
15851 (grub_modules_init.h): Remove the target before generating.
15852 (grub_emu_init.c): Likewise.
15853
15854 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
15855
aa6d7826 158562006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
15857
15858 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
15859 for the target-specific tests. Make sure that we also have the
15860 up-to-date target variables for those tests.
15861
26c607b9 158622006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
15863
15864 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
15865 (PModule::rule): Likewise.
15866
0162321a 158672006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
15868
15869 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
15870 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
15871 target-specific flags should be prefixed.
15872 (PModule::rule): Likewise.
15873
6c826348 158742006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
15875
15876 * configure.ac (CMP): Check if cmp is available explicitly.
15877
b977bf01 158782006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
15879
15880 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
15881 (target_cpu): New variable.
15882 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 15883
b977bf01 15884 * util/i386/pc/grub-install.in (host_cpu): Removed.
15885 (target_cpu): New variable.
15886 (pkglibdir): Use target_cpu instead of host_cpu.
15887
15888 * util/genmoddep.c: Removed.
f19dbdb7 15889
b977bf01 15890 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
15891 instead of GRUB_HOST_SIZEOF_VOID_P.
15892 * kern/dl.c: Likewise.
15893
15894 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
15895 ...
15896 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15897 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15898 (GRUB_TARGET_SIZEOF_LONG): ... this.
15899 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15900 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15901 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15902 to ...
15903 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15904 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15905 (GRUB_TARGET_SIZEOF_LONG): ... this.
15906 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15907 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15908 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
15909 to ...
15910 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
15911 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
15912 (GRUB_TARGET_SIZEOF_LONG): ... this.
15913 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
15914 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
15915
15916 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
15917 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
15918 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
15919 instead of GRUB_HOST_SIZEOF_LONG.
15920 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
15921 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
15922 GRUB_CPU_WORDS_BIGENDIAN.
15923 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
15924 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
15925 grub_host_ssize_t.
15926
15927 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
15928 (genmoddep_SOURCES): Likewise.
15929 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
15930 (genmoddep_SOURCES): Likewise.
15931 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
15932 (genmoddep_SOURCES): Likewise.
15933 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
15934 Likewise.
15935 (genmoddep_SOURCES): Likewise.
15936
15937 * genmoddep.awk: New file.
15938
15939 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
15940 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
15941 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
15942 (PModule::rule): Likewise.
15943 (Program::rule): Likewise.
15944 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
15945 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
15946 respectively.
15947
15948 * configure.ac: Rewritten intensively to use host and target
15949 instead of build and host, respectively.
15950
15951 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
15952 (host_cpu): Removed.
15953 (target_cpu): New variable.
15954 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
15955 (BUILD_CC): Removed.
15956 (BUILD_CFLAGS): Likewise.
15957 (BUILD_CPPFLAGS): Likewise.
15958 (TARGET_CC): New variable.
15959 (TARGET_CFLAGS): Likewise.
15960 (TARGET_CPPFLAGS): Likewise.
15961 (TARGET_LDFLAGS): Likewise.
15962 (AWK): Likewise.
15963 (include): Use target_cpu instead of host_cpu.
15964 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 15965
b977bf01 15966 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
15967
f09771a1 159682006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
15969
15970 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
15971 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
15972 field 'false' to 'exec_on_false'.
15973 (grub_script_create_cmdif): Renamed argument names to reflect above
15974 changes.
15975
15976 * normal/execute.c (grub_script_execute_cmdif): Likewise.
15977
15978 * normal/script.c (grub_script_create_cmdif): Likewise.
15979
118f4fb3 159802006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
15981
15982 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
15983 top.
15984 (grub_hfsplus_btree_recptr): Likewise.
15985 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
15986 FILEBLOCK both to pass a block number and store next block
15987 number.
15988 (grub_hfsplus_read_block): Rewritten heavily to support an extent
15989 overflow file correctly. Specify errors appropriately, because
15990 fshelp expects that GRUB_ERRNO is set when fails. Reuse
15991 grub_hfsplus_btree_recptr to get the pointer to a found key.
15992 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
15993 is found.
15994
15995 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
15996 linux.mod.
15997 (_linux_mod_SOURCES): New variable.
15998 (_linux_mod_CFLAGS): Likewise.
15999 (_linux_mod_LDFLAGS): Likewise.
16000 (linux_mod_SOURCES): Likewise.
16001 (linux_mod_CFLAGS): Likewise.
16002 (linux_mod_LDFLAGS): Likewise.
16003
16004 * DISTLIST: Added loader/i386/efi/linux.c,
16005 loader/i386/efi/linux_normal.c and
16006 include/grub/i386/efi/loader.h.
16007
16008 * loader/i386/efi/linux.c: New file.
16009 * loader/i386/efi/linux_normal.c: Likewise.
16010 * include/grub/i386/efi/loader.h: Likewise.
16011
89a7d726 160122006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
16013
16014 * commands/blocklist.c: New file.
16015
16016 * DISTLIST: Added commands/blocklist.c.
16017
16018 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 16019 color for the background, and a darker color for the foreground.
89a7d726 16020 (grub_console_checkkey): Return READ_KEY.
16021 (grub_console_cls): Set the background to
16022 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
16023
16024 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
16025
16026 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
16027 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
16028
16029 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
16030 prototype.
16031
16032 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
16033 BG. The spec is wrong again.
16034
16035 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
16036 prototype.
16037 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
16038
16039 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16040 commands/blocklist.c.
16041 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 16042
89a7d726 16043 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
16044 (blocklist_mod_SOURCES): New variable.
16045 (blocklist_mod_CFLAGS): Likewise.
16046 (blocklist_mod_LDFLAGS): Likewise.
16047
75c8f258 160482006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
16049
16050 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
16051 duplication.
16052 (lba_mode): Use %eax more intensively to reduce the code size.
16053
da2eb181 160542006-05-20 Marco Gerards <marco@gnu.org>
16055
16056 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
16057
16058 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
16059 for `menuentry'.
16060 (script): Accept leading newlines.
16061 (newlines): New rule to describe 0 or more newlines.
16062 (commands): Accept `command' with trailing newline. Fixed the
16063 order in which arguments were passed to `grub_script_add_cmd'.
16064 Accept commands separated by newlines.
16065 (function): Changed to accept newlines.
16066 (menuentry) Rewritten.
16067
16068 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
16069 front of the list, instead of to the end.
16070
577b4050 160712006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
16072
16073 * util/i386/pc/grub-install.in (bindir): New variable.
16074 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
16075 Shaver <lbgwjl@gmail.com>.
16076
0d6e1189 160772006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
16078
16079 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
16080 grub/machine/linux.h
16081 * loader/i386/pc/linux.c: Likewise.
16082
16083 * include/grub/i386/pc/linux.h: Moved to ...
16084 * include/grub/i386/linux.h: ... here.
16085
16086 * include/grub/i386/linux.h (struct linux_kernel_params): New
16087 struct.
f19dbdb7 16088
31b86e9f 160892006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
16090
16091 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
16092 checking.
16093 (grub_video_vbe_blit_glyph): Likewise.
16094 (grub_video_vbe_blit_bitmap): Likewise.
16095 (grub_video_vbe_blit_render_target): Likewise.
16096
83b984de 160972006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
16098
16099 * configure.ac (--with-platform): Properly quote the square
16100 brackets.
16101
5f0413bd 161022006-05-08 Marco Gerards <marco@gnu.org>
16103
16104 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
16105 this...
16106 (kernel_elf_HEADERS): ...to this. Updated all users.
16107 (grubof_symlist.c): Renamed from this...
16108 (kernel_elf_symlist.c): ...to this. Updated all users.
16109 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
16110 (grubof_SOURCES): Renamed from this...
16111 (kernel_elf_SOURCES): ...to this.
16112 (grubof_HEADERS): Renamed from this...
16113 (kernel_elf_HEADERS): ...to this.
16114 (grubof_CFLAGS): Renamed from this...
16115 (kernel_elf_CFLAGS): ...to this.
16116 (grubof_ASFLAGS): Renamed from this...
16117 (kernel_elf_ASFLAGS): ...to this.
16118 (grubof_LDFLAGS): Renamed from this...
16119 (kernel_elf_LDFLAGS): ...to this.
16120
16121 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
16122 this...
16123 (kernel_elf_HEADERS): ...to this. Updated all users.
16124 (grubof_symlist.c): Renamed from this...
16125 (kernel_elf_symlist.c): ...to this. Updated all users.
16126 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
16127 (grubof_SOURCES): Renamed from this...
16128 (kernel_elf_SOURCES): ...to this.
16129 (grubof_HEADERS): Renamed from this...
16130 (kernel_elf_HEADERS): ...to this.
16131 (grubof_CFLAGS): Renamed from this...
16132 (kernel_elf_CFLAGS): ...to this.
16133 (grubof_ASFLAGS): Renamed from this...
16134 (kernel_elf_ASFLAGS): ...to this.
16135 (grubof_LDFLAGS): Renamed from this...
16136 (kernel_elf_LDFLAGS): ...to this.
16137
16138 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
16139 `kernel.elf' instead of `grubof'.
16140
05568c2e 161412006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
16142
16143 Add --with-platform to configure. Use pkglibdir instead of
16144 pkgdatadir. This is reported by Roger Leigh.
16145
16146 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
16147 (host_vendor): Likewise.
16148 (host_os): Likewise.
16149 (pkgdatadir): Likewise.
16150 (platform): New variable.
16151 (pkglibdir): Likewise.
16152 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 16153
05568c2e 16154 * util/i386/pc/grub-install.in (datadir): Removed.
16155 (host_vendor): Likewise.
16156 (host_os): Likewise.
16157 (pkgdatadir): Likewise.
16158 (platform): New variable.
16159 (pkglibdir): Likewise.
16160 Use PKGLIBDIR instead of PKGDATADIR.
16161
16162 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
16163 instead of GRUB_DATADIR.
16164 (main): Likewise.
16165 * util/i386/pc/grub-mkimage.c (usage): Likewise.
16166 (main): Likewise.
16167 * util/i386/efi/grub-mkimage.c (usage): Likewise.
16168 (main): Likewise.
16169
16170 * configure.ac (--with-platform): New option.
16171 Use PLATFORM instead of HOST_VENDOR to specify a platform.
16172
16173 * Makefile.in: Include a makefile based on PLATFORM instead of
16174 HOST_VENDOR.
16175 (pkgdatadir): Not appended by the machine type.
16176 (pkglibdir): Appended by the machine type.
16177 (host_vendor): Removed.
16178 (platform): New variable.
16179 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
16180 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
16181 (uninstall): Likewise.
16182
4e93851c 161832006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
16184
16185 Use the environment context in the menu. Remove the commands
16186 "default" and "timeout", and use variables instead.
f19dbdb7 16187
4e93851c 16188 * normal/menu.c: Include grub/env.h.
16189 (print_entry): Cast TITLE to silence gcc.
16190 (get_timeout): New function.
16191 (set_timeout): Likewise.
16192 (get_entry_number): Likewise.
16193 (run_menu): Use a default entry, a fallback entry and a timeout
16194 in the environment variables "default", "fallback" and
16195 "timeout". Also, tweak the default entry if it is not within the
16196 current menu entries.
16197 (grub_menu_run): Use a fallback entry in the environment variable
16198 "fallback".
16199
16200 * normal/main.c (read_config_file): Do not initialize
16201 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
16202 NEWMENU->TIMEOUT.
16203 (grub_normal_execute): Use a data slot to store the menu.
16204
16205 * include/grub/normal.h (struct grub_menu): Removed default_entry,
16206 fallback_entry and timeout.
16207 (struct grub_menu_list): Removed.
16208 (grub_menu_list_t): Likewise.
16209 (struct grub_context): Likewise.
16210 (grub_context_t): Likewise.
16211 (grub_context_get): Likewise.
16212 (grub_context_get_current_menu): Likewise.
16213 (grub_context_push_menu): Likewise.
16214 (grub_context_pop_menu): Likewise.
16215 (grub_default_init): Likewise.
16216 (grub_default_fini): Likewise.
16217 (grub_timeout_init): Likewise.
16218 (grub_timeout_fini): Likewise.
16219
16220 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
16221 and timeout.mod.
16222 (normal_mod_SOURCES): Removed normal/context.c.
16223
16224 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
16225 commands/default.c, commands/timeout.c and normal/context.c.
16226 (normal_mod_SOURCES): Removed normal/context.c.
16227
16228 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
16229 commands/timeout.c and normal/context.c.
16230 (normal_mod_SOURCES): Removed normal/context.c.
16231
16232 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
16233 commands/default.c, commands/timeout.c and normal/context.c.
16234 (normal_mod_SOURCES): Removed normal/context.c.
16235
16236 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
16237 timeout.mod.
16238 (default_mod_SOURCES): Removed.
16239 (default_mod_CFLAGS): Likewise.
16240 (default_mod_LDFLAGS): Likewise.
16241 (timeout_mod_SOURCES): Removed.
16242 (timeout_mod_CFLAGS): Likewise.
16243 (timeout_mod_LDFLAGS): Likewise.
16244
16245 * DISTLIST: Removed commands/default.c, commands/timeout.c and
16246 normal/context.c.
16247
16248 * commands/default.c: Removed.
16249 * commands/timeout.c: Likewise.
16250 * normal/context.c: Likewise.
16251
1eb9cc1d 162522006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
16253
16254 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
16255
385bd9c1 162562006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
16257
16258 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
16259 "next" to "prev" for readability.
16260 (struct grub_env_sorted_var): New struct.
16261 (grub_env_context): Renamed to ...
16262 (initial_context): ... this.
16263 (grub_env_var_context): Renamed to ...
16264 (current_context): ... this.
16265 (grub_env_find): Look only at CURRENT_CONTEXT.
16266 (grub_env_context_open): Rewritten to copy exported variables from
16267 previous context.
16268 (grub_env_context_close): Rewritten according to the new
16269 scheme. Also, add an assertion to prevent the initial context from
16270 removed.
16271 (grub_env_insert): Removed the code for the sorted list.
16272 (grub_env_remove): Likewise.
16273 (grub_env_export): Simply mark the variable with
16274 GRUB_ENV_VAR_GLOBAL.
16275 (grub_env_set): A cosmetic change for naming consistency.
16276 (grub_env_get): Likewise.
16277 (grub_env_unset): Likewise.
16278 (grub_env_iterate): Rewritten to sort variables within this
16279 function.
16280 (grub_register_variable_hook): Fixed for naming consistency. Call
16281 grub_env_find again, only if NAME is not found at the first time.
16282 (mangle_data_slot_name): New function.
16283 (grub_env_set_data_slot): Likewise.
16284 (grub_env_get_data_slot): Likewise.
16285 (grub_env_unset_data_slot): Likewise.
16286
16287 * include/grub/env.h (grub_env_var_type): New enum.
16288 (GRUB_ENV_VAR_LOCAL): New constant.
16289 (GRUB_ENV_VAR_GLOBAL): Likewise.
16290 (GRUB_ENV_VAR_DATA): Likewise.
16291 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
16292 "type".
16293 (grub_env_set): Replace VAR with NAME for consistency.
16294 (grub_register_variable_hook): Likewise.
16295 (grub_env_export): Specify the name of the argument.
16296 (grub_env_set_data_slot): New prototype.
16297 (grub_env_get_data_slot): Likewise.
16298 (grub_env_unset_data_slot): Likewise.
16299
7f362539 163002006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
16301
16302 Extend the loader so that GRUB can accept a loader which comes
16303 back to GRUB when a loaded image exits. Also, this change adds
16304 support for a chainloader on EFI.
f19dbdb7 16305
7f362539 16306 * term/efi/console.c: Include grub/misc.h.
16307 (grub_console_checkkey): Display a scan code on the top for
16308 debugging. This will be removed once the EFI port gets stable.
16309 Correct the scan code mapping.
16310
16311 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
16312 allocate memory from larger regions, in order to reduce the number
16313 of allocated regions. Otherwise, the MacOSX loader panics.
16314 (filter_memory_map): Avoid less than 1MB for compatibility with
16315 other loaders.
16316 (add_memory_regions): Allocate from the tail of a region, if
16317 possible, to avoid allocating a region near to 1MB, for the MacOSX
16318 loader.
16319
16320 * kern/efi/init.c (grub_efi_set_prefix): Specify
16321 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
16322
16323 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
16324 argument IMAGE_HANDLE and specify it to get a loaded image.
16325 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
16326 grub_efi_get_loaded_image.
fe6b695a 16327 (grub_efi_get_filename): Divide the length by the size of
7f362539 16328 grub_efi_char16_t.
16329 (grub_efi_get_device_path): New function.
16330 (grub_efi_print_device_path): Print End Device Path nodes. Divide
16331 the length by the size of grub_efi_char16_t for a file path device
16332 path node.
16333
16334 * kern/loader.c (grub_loader_noreturn): New variable.
16335 (grub_loader_set): Accept a new argument NORETURN. Set
16336 GRUB_LOADER_NORETURN to NORETURN.
16337 All callers changed.
16338 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
16339 grub_machine_fini.
16340
16341 * include/grub/efi/efi.h (grub_efi_get_device_path): New
16342 prototype.
16343 (grub_efi_get_loaded_image): Take an argument to specify an image
16344 handle.
16345
16346 * include/grub/loader.h (grub_loader_set): Added one more argument
16347 NORETURN.
16348
16349 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
16350 instead of grub_efi_open_protocol.
16351 (grub_efidisk_get_device_name): Likewise.
16352 (grub_efidisk_close): Print a newline.
16353 (grub_efidisk_get_device_handle): Fixed to use
16354 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
16355 GRUB_EFI_DEVICE_PATH_TYPE.
16356
16357 * disk/efi/efidisk.c (device_path_guid): Moved to ...
16358 * kern/efi/efi.c (device_path_guid): ... here.
16359
16360 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
16361 chain.mod.
16362 (kernel_mod_HEADERS): Added efi/disk.h.
16363 (_chain_mod_SOURCES): New variable.
16364 (_chain_mod_CFLAGS): Likewise.
16365 (_chain_mod_LDFLAGS): Likewise.
16366 (chain_mod_SOURCES): Likewise.
16367 (chain_mod_CFLAGS): Likewise.
16368 (chain_mod_LDFLAGS): Likewise.
16369
16370 * DISTLIST: Added include/grub/efi/chainloader.h,
16371 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
16372
16373 * include/grub/efi/chainloader.h: New file.
16374 * loader/efi/chainloader.c: Likewise.
16375 * loader/efi/chainloader_normal.c: Likewise.
16376
c0111d6e 163772006-04-30 Marco Gerards <marco@gnu.org>
16378
16379 * commands/configfile.c (grub_cmd_source): New function.
16380 (GRUB_MOD_INIT): Register the commands `source' and `.'.
16381 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
16382
df5341da 163832006-04-30 Marco Gerards <marco@gnu.org>
16384
16385 * normal/execute.c (grub_script_execute_cmd): Change the return
16386 type to `grub_err_t'. Correctly return the error.
16387 (grub_script_execute_cmdline): In case a command line is not a
16388 command or a function, try to interpret it as an assignment.
16389
f85934bd 163902006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
16391
16392 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
16393 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
16394 skip a node whose name is obviously invalid as UTF-16,
16395 i.e. contains a NUL character. Stop the iteration when the last
16396 directory entry is found. Instead of using the return value of
16397 grub_hfsplus_btree_iterate_node, store the value in RET and use
16398 it, because the iterator can be stopped by the last directory
16399 entry.
16400
8f8a2cf8 164012006-04-30 Marco Gerards <marco@gnu.org>
16402
16403 * include/grub/env.h (grub_env_export): New prototype. Reported
16404 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
16405
a27e84ce 164062006-04-30 Marco Gerards <marco@gnu.org>
16407
16408 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
16409 size of the extents in a catalog file record.
16410
eaef0553 164112006-04-29 Marco Gerards <marco@gnu.org>
16412
16413 * commands/configfile.c (grub_cmd_configfile): Execute the
16414 configfile within its own context.
16415
16416 * include/grub/env.h (grub_env_context_open): New prototype.
16417 (grub_env_context_close): Likewise.
16418
16419 * kern/env.c (grub_env): Removed.
16420 (grub_env_sorted): Likewise.
16421 (grub_env_context): New variable.
16422 (grub_env_var_context): Likewise.
16423 (grub_env_find): Search both the active context and the global
16424 context.
16425 (grub_env_context_open): New function.
16426 (grub_env_context_close): Likewise.
16427 (grub_env_insert): Likewise.
16428 (grub_env_remove): Likewise.
16429 (grub_env_export): Likewise.
16430 (grub_env_set): Changed to use helper functions to avoid code
16431 duplication.
16432 (grub_env_iterate): Rewritten so both the current context and the
16433 global context are being used.
16434
16435 * normal/command.c (export_command): New function.
16436 (grub_command_init): Register the `export' function.
16437
7b455f4d 164382006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
16439
16440 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
16441 explicitly to suppress gcc's warnings.
16442 * fs/fat.c (grub_fat_find_dir): Likewise.
16443 (grub_fat_label): Likewise.
16444 * fs/xfs.c (grub_xfs_read_inode): Likewise.
16445 (grub_xfs_mount): Likewise.
16446 (grub_xfs_label): Likewise.
16447 * fs/affs.c (grub_affs_mount): Likewise.
16448 (grub_affs_label): Likewise.
16449 (grub_affs_iterate_dir): Likewise.
16450 * fs/sfs.c (grub_sfs_mount): Likewise.
16451 (grub_sfs_iterate_dir): Likewise.
16452 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
16453 * fs/hfs.c (grub_hfs_mount): Likewise.
16454 (grub_hfs_cmp_catkeys): Likewise.
16455 (grub_hfs_find_dir): Likewise.
16456 (grub_hfs_dir): Likewise.
16457 (grub_hfs_label): Likewise.
16458 * fs/jfs.c (grub_jfs_mount): Likewise.
16459 (grub_jfs_opendir): Likewise.
16460 (grub_jfs_getent): Likewise.
16461 (grub_jfs_lookup_symlink): Likewise.
16462 (grub_jfs_label): Likewise.
16463 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
16464 (grub_hfsplus_iterate_dir): Likewise.
16465 (grub_hfsplus_btree_iterate_node): Made static.
16466
16467 * util/grub-emu.c (prefix): New variable.
16468 (grub_machine_set_prefix): New function.
16469 (main): Do not set the environment variable "prefix" here. Only
16470 set PREFIX, which is used later by grub_machine_set_prefix.
16471
16472 * include/grub/video.h: Do not include grub/symbol.h.
16473 (grub_video_register): Not exported. This symbol is not defined in
16474 the kernel.
16475 (grub_video_unregister): Likewise.
16476 (grub_video_iterate): Likewise.
16477 (grub_video_setup): Likewise.
16478 (grub_video_restore): Likewise.
16479 (grub_video_get_info): Likewise.
16480 (grub_video_get_blit_format): Likewise.
16481 (grub_video_set_palette): Likewise.
16482 (grub_video_get_palette): Likewise.
16483 (grub_video_set_viewport): Likewise.
16484 (grub_video_get_viewport): Likewise.
16485 (grub_video_map_color): Likewise.
16486 (grub_video_map_rgb): Likewise.
16487 (grub_video_map_rgba): Likewise.
16488 (grub_video_fill_rect): Likewise.
16489 (grub_video_blit_glyph): Likewise.
16490 (grub_video_blit_bitmap): Likewise.
16491 (grub_video_blit_render_target): Likewise.
16492 (grub_video_scroll): Likewise.
16493 (grub_video_swap_buffers): Likewise.
16494 (grub_video_create_render_target): Likewise.
16495 (grub_video_delete_render_target): Likewise.
16496 (grub_video_set_active_render_target): Likewise.
16497
16498 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
16499 Undefined.
16500 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
16501
16502 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
16503 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
16504 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
16505 instead of $(srcdir)/genkernsyms.sh.
16506
16507 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
16508 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
16509 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
16510 instead of $(srcdir)/genkernsyms.sh.
16511
16512 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
16513 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
16514 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
16515 instead of $(srcdir)/genkernsyms.sh.
16516
16517 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
16518 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
16519 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
16520 instead of $(srcdir)/genkernsyms.sh.
16521
16522 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
16523 genkernsyms.sh.
16524
16525 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
16526 genkernsyms.sh.
16527 (gensymlist.sh): New target.
16528 (genkernsyms.sh): Likewise.
16529
16530 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
16531 genkernsyms.sh.in and gensymlist.sh.in.
16532
16533 * genkernsyms.sh: Removed.
16534 * gensymlist.sh: Likewise.
f19dbdb7 16535
7b455f4d 16536 * genkernsyms.sh.in: New file.
16537 * gensymlist.sh.in: Likewise.
16538
1885bb27 165392006-04-25 Hollis Blanchard <hollis@penguinppc.org>
16540
16541 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
16542 clobber "prefix", since we may have already set it manually.
16543
71538dff 165442006-04-25 Hollis Blanchard <hollis@penguinppc.org>
16545
16546 * kern/misc.c (abort): New alias for grub_abort.
16547
2965c7cc 165482006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
16549
16550 A new machine-specific function "grub_machine_set_prefix" is
16551 defined. This is called after loading modules, so that a prefix
16552 initialization can use modules. Also, this change adds an
16553 intensive debugging feature for the memory manager via the
16554 configure option "--enable-mm-debug".
f19dbdb7 16555
2965c7cc 16556 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
16557 PART.LEN.
16558
16559 * kern/sparc64/ieee1275/init.c (abort): Removed.
16560 (grub_stop): Likewise.
16561 (grub_exit): New function.
16562 (grub_set_prefix): Renamed to ...
16563 (grub_machine_set_prefix): ... this.
16564 (grub_machine_init): Do not call grub_set_prefix.
16565
16566 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
16567 (grub_machine_set_prefix): ... this.
16568 (grub_machine_init): Do not call grub_set_prefix.
16569
16570 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
16571 (grub_machine_init): Do not set the prefix here.
16572
16573 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
16574
16575 * kern/efi/init.c: Include grub/mm.h.
16576 (grub_efi_set_prefix): New function.
16577
16578 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
16579 (grub_efi_get_filename): New function.
16580 (grub_print_device_path): Renamed to ...
16581 (grub_efi_print_device_path): ... this.
16582
16583 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
16584 [MM_DEBUG] (grub_realloc): Likewise.
16585 [MM_DEBUG] (grub_free): Likewise.
16586 [MM_DEBUG] (grub_memalign): Likewise.
16587 [MM_DEBUG] (grub_mm_debug): New variable.
16588 [MM_DEBUG] (grub_debug_malloc): New function.
16589 [MM_DEBUG] (grub_debug_free): New function.
16590 [MM_DEBUG] (grub_debug_realloc): New function.
16591 [MM_DEBUG] (grub_debug_memalign): New function.
16592
16593 * kern/misc.c (grub_abort): Print a newline to distinguish
16594 the message.
16595
16596 * kern/main.c (grub_main): Call grub_machine_set_prefix and
16597 grub_set_root_dev after loading modules. This is necessary when
16598 setting a prefix depends on modules.
16599
16600 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
16601 (grub_efi_print_device_path): ... this.
16602 (grub_efi_get_filename): New prototype.
16603 (grub_efi_set_prefix): Likewise.
16604
16605 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
16606 and grub/disk.h.
16607 (grub_efidisk_get_device_handle): New prototype.
16608 (grub_efidisk_get_device_name): Likewise.
16609
16610 * include/grub/mm.h: Include config.h.
16611 (MM_DEBUG): Removed.
16612 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
16613 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
16614 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
16615 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
16616 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
16617 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
16618 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
16619 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
16620 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
16621
16622 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
16623
16624 * disk/efi/efidisk.c: Include grub/partition.h.
16625 (iterate_child_devices): New function.
16626 (add_device): First, compare only last device path nodes, so that
16627 devices are sorted by the types.
16628 (grub_efidisk_get_device_handle): New function.
16629 (grub_efidisk_get_device_name): Likewise.
16630
16631 * configure.ac (--enable-mm-debug): New option to enable the
16632 memory manager debugging feature. This makes the binary much
16633 bigger, so is disabled by default.
16634
9cacaa17 166352006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
16636
16637 Use grub_abort instead of grub_stop, and grub_exit must be
16638 define in each architecture now. Also, this change adds support
16639 for EFI disks.
f19dbdb7 16640
9cacaa17 16641 * util/i386/pc/grub-probefs.c: Include grub/term.h.
16642 (grub_getkey): New function.
16643 (grub_term_get_current): Likewise.
16644
16645 * util/i386/pc/grub-setup.c: Include grub/term.h.
16646 (grub_getkey): New function.
16647 (grub_term_get_current): Likewise.
16648
16649 * util/misc.c (grub_stop): Renamed to ...
16650 (grub_exit): ... this.
16651
16652 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
16653 (grub_exit): ... this.
16654 (grub_machine_init): Use grub_abort instead of abort.
16655 (grub_stop): Removed.
16656
16657 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
16658 abort.
16659
16660 * kern/i386/pc/startup.S (grub_exit): New function.
16661 (cold_reboot): New label.
16662
16663 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
16664 (grub_efi_init): Call grub_efidisk_init.
16665 (grub_efi_fini): Call grub_efidisk_fini.
16666
16667 * kern/efi/efi.c: Include grub/mm.h.
16668 (grub_efi_console_control_guid): Renamed to ...
16669 (console_control_guid): ... this.
16670 (grub_efi_loaded_image_guid): Renamed to ...
16671 (loaded_image_guid): ... this.
16672 (grub_efi_locate_handle): New function.
16673 (grub_efi_open_protocol): Likewise.
16674 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
16675 GRUB_EFI_CONSOLE_CONTROL_GUID.
16676 (grub_efi_exit): Removed.
16677 (grub_stop): Likewise.
16678 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
16679 (grub_exit): New function.
16680 (grub_print_device_path): Likewise.
16681
16682 * kern/rescue.c (grub_rescue_cmd_exit): New function.
16683 (grub_enter_rescue_mode): Register "exit".
16684
16685 * kern/misc.c (grub_real_dprintf): A cosmetic change.
16686 (grub_abort): New function.
16687
16688 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
16689
16690 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
16691
16692 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
16693
16694 * include/grub/efi/efi.h (grub_efi_exit): Removed.
16695 (grub_print_device_path): New prototype.
16696 (grub_efi_locate_handle): Likewise.
16697 (grub_efi_open_protocol): Likewise.
16698
16699 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
16700 * disk/efi/efidisk.c: Likewise.
16701
16702 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
16703
16704 * include/grub/efi/console_control.h
16705 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
16706
16707 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
16708 last 8 bytes as an array.
16709 (GRUB_EFI_DISK_IO_GUID): New macro.
16710 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
16711 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
16712 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
16713 grub_uint8_t.
16714 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
16715 (struct grub_efi_device_path): Rename the member "sub_type" to
16716 "subtype".
16717 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
16718 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
16719 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
16720 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
16721 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
16722 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
16723 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
16724 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
16725 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
16726 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
16727 (struct grub_efi_pci_device_path): New structure.
16728 (grub_efi_pci_device_path_t): New type.
16729 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
16730 (struct grub_efi_pccard_device_path): New structure.
16731 (grub_efi_pccard_device_path_t): New type.
16732 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
16733 (struct grub_efi_memory_mapped_device_path): New structure.
16734 (grub_efi_memory_mapped_device_path_t): New type.
16735 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
16736 (struct grub_efi_vendor_device_path): New structure.
16737 (grub_efi_vendor_device_path_t): New type.
16738 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
16739 (struct grub_efi_controller_device_path): New structure.
16740 (grub_efi_controller_device_path_t): New type.
16741 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
16742 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
16743 (struct grub_efi_acpi_device_path): New structure.
16744 (grub_efi_acpi_device_path_t): New type.
16745 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
16746 (struct grub_efi_expanded_acpi_device_path): New structure.
16747 (grub_efi_expanded_acpi_device_path_t): New type.
16748 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
16749 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
16750 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
16751 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
16752 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
16753 (struct grub_efi_atapi_device_path): New structure.
16754 (grub_efi_atapi_device_path_t): New type.
16755 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
16756 (struct grub_efi_fibre_channel_device_path): New structure.
16757 (grub_efi_fibre_channel_device_path_t): New type.
16758 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
16759 (struct grub_efi_1394_device_path): New structure.
16760 (grub_efi_1394_device_path_t): New type.
16761 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
16762 (struct grub_efi_usb_device_path): New structure.
16763 (grub_efi_usb_device_path_t): New type.
16764 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
16765 (struct grub_efi_usb_class_device_path): New structure.
16766 (grub_efi_usb_class_device_path_t): New type.
16767 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
16768 (struct grub_efi_i2o_device_path): New structure.
16769 (grub_efi_i2o_device_path_t): New type.
16770 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
16771 (struct grub_efi_mac_address_device_path): New structure.
16772 (grub_efi_mac_address_device_path_t): New type.
16773 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
16774 (struct grub_efi_ipv4_device_path): New structure.
16775 (grub_efi_ipv4_device_path_t): New type.
16776 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
16777 (struct grub_efi_ipv6_device_path): New structure.
16778 (grub_efi_ipv6_device_path_t): New type.
16779 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
16780 (struct grub_efi_infiniband_device_path): New structure.
16781 (grub_efi_infiniband_device_path_t): New type.
16782 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
16783 (struct grub_efi_uart_device_path): New structure.
16784 (grub_efi_uart_device_path_t): New type.
16785 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
16786 (struct grub_efi_vendor_messaging_device_path): New structure.
16787 (grub_efi_vendor_messaging_device_path_t): New type.
16788 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
16789 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
16790 (struct grub_efi_hard_drive_device_path): New structure.
16791 (grub_efi_hard_drive_device_path_t): New type.
16792 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
16793 (struct grub_efi_cdrom_device_path): New structure.
16794 (grub_efi_cdrom_device_path_t): New type.
16795 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
16796 (struct grub_efi_vendor_media_device_path): New structure.
16797 (grub_efi_vendor_media_device_path_t): New type.
16798 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
16799 (struct grub_efi_file_path_device_path): New structure.
16800 (grub_efi_file_path_device_path_t): New type.
16801 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
16802 (struct grub_efi_protocol_device_path): New structure.
16803 (grub_efi_protocol_device_path_t): New type.
16804 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
16805 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
16806 (struct grub_efi_bios_device_path): New structure.
16807 (grub_efi_bios_device_path_t): New type.
16808 (struct grub_efi_disk_io): New structure.
16809 (grub_efi_disk_io_t): New type.
16810 (struct grub_efi_block_io_media): New structure.
16811 (grub_efi_block_io_media_t): New type.
16812 (struct grub_efi_block_io): New structure.
16813 (grub_efi_block_io_t): New type.
16814
16815 * include/grub/misc.h (grub_stop): Removed.
16816 (grub_exit): New prototype.
16817 (grub_abort): Likewise.
16818
16819 * include/grub/disk.h (enum grub_disk_dev_id): Added
16820 GRUB_DISK_DEVICE_EFIDISK_ID.
16821
16822 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
16823 disk/efi/efidisk.c.
16824 (kernel_syms.lst): Remove the target if an error occurs.
16825
49986a9f 168262006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
16827
16828 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
16829 as it was simply too buggy.
16830
970d3b8a 168312006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
16832
16833 * kern/misc.c (grub_lltoa): New function.
16834 (grub_vsprintf): Added support for the long long suffix,
16835 i.e. "ll".
16836
ff04ec24 168372006-04-20 Hollis Blanchard <hollis@penguinppc.org>
16838
16839 * Makefile.in (LDFLAGS): Add variable.
16840 (LD): Remove variable.
16841 * configure.ac: Add -m32 to LDFLAGS.
16842 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
16843 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
16844 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
16845 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
16846 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
16847 variables.
16848 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
16849 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
16850 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
16851
37e5e1a4 168522006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
16853
16854 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
16855 length for unknown glyph.
16856
c352d8dd 168572006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
16858
2eab1c0d 16859 Add support for pre-loaded modules into the EFI port.
f19dbdb7 16860
2eab1c0d 16861 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
16862 completely. Accept one more argument DIR. The caller has changed.
16863
16864 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
16865
16866 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
16867 (grub_efi_loaded_image_guid): New variable.
16868 (grub_efi_get_loaded_image): New function.
16869 (grub_arch_modules_addr): Likewise.
16870
16871 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
16872 prototype.
16873
16874 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
16875 (struct grub_efi_loaded_image): New structure.
16876 (grub_efi_loaded_image_t): New type.
16877
168782006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 16879
c352d8dd 16880 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
16881 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
16882 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
16883
6d01d6b4 168842006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
16885
16886 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
16887
976a4ea0 168882006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
16889
16890 * DISTLIST: Added include/grub/efi/console.h,
16891 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
16892 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16893
16894 * include/grub/efi/console.h: New file.
16895 * include/grub/efi/time.h: Likewise.
16896 * include/grub/i386/efi/kernel.h: Likewise.
16897 * kern/efi/init.c: Likewise.
16898 * kern/efi/mm.c: Likewise.
16899 * term/efi/console.c: Likewise.
f19dbdb7 16900
976a4ea0 16901 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
16902 (grub_stop): Removed.
16903 (grub_get_rtc): Likewise.
16904 (grub_machine_init): Simply call grub_efi_init.
16905 (grub_machine_fini): Call grub_efi_fini.
16906
16907 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
16908 (grub_efi_output_string): Removed.
16909 (grub_efi_stall): New function.
16910 (grub_stop): Likewise.
16911 (grub_get_rtc): Likewise.
16912
16913 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
16914 (grub_efi_stall): New prototype.
16915 (grub_efi_allocate_pages): Likewise.
16916 (grub_efi_free_pages): Likewise.
16917 (grub_efi_get_memory_map): Likewise.
16918 (grub_efi_mm_init): Likewise.
16919 (grub_efi_mm_fini): Likewise.
16920 (grub_efi_init): Likewise.
16921 (grub_efi_fini): Likewise.
16922
16923 * include/grub/i386/efi/time.h: Do not include
16924 grub/symbol.h. Include grub/efi/time.h.
16925 (GRUB_TICKS_PER_SECOND): Removed.
16926 (grub_get_rtc): Likewise.
16927
16928 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
16929 Added padding. The EFI spec is buggy.
16930 (GRUB_EFI_BLACK): New macro.
16931 (GRUB_EFI_BLUE): Likewise.
16932 (GRUB_EFI_GREEN): Likewise.
16933 (GRUB_EFI_CYAN): Likewise.
16934 (GRUB_EFI_RED): Likewise.
16935 (GRUB_EFI_MAGENTA): Likewise.
16936 (GRUB_EFI_BROWN): Likewise.
16937 (GRUB_EFI_LIGHTGRAY): Likewise.
16938 (GRUB_EFI_BRIGHT): Likewise.
16939 (GRUB_EFI_DARKGRAY): Likewise.
16940 (GRUB_EFI_LIGHTBLUE): Likewise.
16941 (GRUB_EFI_LIGHTGREEN): Likewise.
16942 (GRUB_EFI_LIGHTCYAN): Likewise.
16943 (GRUB_EFI_LIGHTRED): Likewise.
16944 (GRUB_EFI_LIGHTMAGENTA): Likewise.
16945 (GRUB_EFI_YELLOW): Likewise.
16946 (GRUB_EFI_WHITE): Likewise.
16947 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
16948 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
16949 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
16950 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
16951 (GRUB_EFI_BACKGROUND_RED): Likewise.
16952 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
16953 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
16954 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
16955 (GRUB_EFI_TEXT_ATTR): Likewise.
16956
16957 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
16958 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
16959 (kernel_mod_HEADERS): Added efi/time.h.
16960
83709125 169612006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
16962
16963 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
16964 include/grub/efi/api.h, include/grub/efi/console_control.h,
16965 include/grub/efi/efi.h, include/grub/efi/pe32.h,
16966 include/grub/i386/efi/time.h, kern/efi/efi.c,
16967 kern/i386/efi/init.c, kern/i386/efi/startup.S,
16968 and util/i386/efi/grub-mkimage.c.
16969
16970 * Makefile.in (RMKFILES): Added i386-efi.rmk.
16971
16972 * genmk.rb (PModule#rule): Do not export symbols if
16973 #{prefix}_EXPORTS is set to "no".
16974
16975 * conf/i386-efi.mk: New file.
16976 * conf/i386-efi.rmk: Likewise.
16977 * include/grub/efi/api.h: Likewise.
16978 * include/grub/efi/console_control.h: Likewise.
16979 * include/grub/efi/efi.h: Likewise.
16980 * include/grub/efi/pe32.h: Likewise.
16981 * include/grub/i386/efi/time.h: Likewise.
16982 * kern/efi/efi.c: Likewise.
16983 * kern/i386/efi/init.c: Likewise.
16984 * kern/i386/efi/startup.S: Likewise.
16985 * util/i386/efi/grub-mkimage.c: Likewise.
16986
169872006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 16988
16989 * include/grub/script.h: Include <grub/parser.h> and
16990 "grub_script.tab.h".
16991 (struct grub_lexer_param): New struct.
16992 (struct grub_parser_param): Likewise.
16993 (grub_script_create_arglist): Pass the state in an argument.
16994 (grub_script_add_arglist): Likewise.
16995 (grub_script_create_cmdline): Likewise.
16996 (grub_script_create_cmdblock): Likewise.
16997 (grub_script_create_cmdif): Likewise.
16998 (grub_script_create_cmdmenu): Likewise.
16999 (grub_script_add_cmd): Likewise.
17000 (grub_script_arg_add): Likewise.
17001 (grub_script_lexer_ref): Likewise.
17002 (grub_script_lexer_deref): Likewise.
17003 (grub_script_lexer_record_start): Likewise.
17004 (grub_script_lexer_record_stop): Likewise.
17005 (grub_script_mem_record): Likewise.
17006 (grub_script_mem_record_stop): Likewise.
17007 (grub_script_malloc): Likewise.
17008 (grub_script_yylex): Likewise.
17009 (grub_script_yyparse): Likewise.
17010 (grub_script_yyerror): Likewise.
17011 (grub_script_yylex): Likewise.
17012 (grub_script_lexer_init): Return the state.
17013
17014 * normal/lexer.c (grub_script_lexer_state): Removed variable.
17015 (grub_script_lexer_done): Likewise.
17016 (grub_script_lexer_getline): Likewise.
17017 (grub_script_lexer_refs): Likewise.
17018 (script): Likewise.
17019 (newscript): Likewise.
17020 (record): Likewise.
17021 (recording): Likewise.
17022 (recordpos): Likewise.
17023 (recordlen): Likewise.
17024 (grub_script_lexer_init): Return the state instead of setting
17025 global variables.
17026 (grub_script_lexer_ref): Use the newly added argument for state
17027 instead of globals.
17028 (grub_script_lexer_deref): Likewise.
17029 (grub_script_lexer_record_start): Likewise.
17030 (grub_script_lexer_record_stop): Likewise.
17031 (recordchar): Likewise.
17032 (nextchar): Likewise.
17033 (grub_script_yylex2): Likewise.
17034 (grub_script_yylex): Likewise.
17035 (grub_script_yyerror): Likewise.
17036
17037 * normal/parser.y (func_mem): Removed variable.
17038 (menu_entry): Likewise.
17039 (err): Likewise.
17040 (%lex-param): New parser option.
17041 (%parse-param): Likewise.
17042 (script): Always return the AST.
17043 (argument): Pass the state around.
17044 (arguments): Likewise.
17045 (grubcmd): Likewise.
17046 (commands): Likewise.
17047 (function): Likewise.
17048 (menuentry): Likewise.
17049 (if_statement): Likewise.
17050 (if): Likewise.
17051
17052 * normal/script.c (grub_script_memused): Removed variable.
17053 (grub_script_parsed): Likewise.
17054 (grub_script_malloc): Added a state argument. Use that instead of
17055 global variables.
17056 (grub_script_mem_record): Likewise.
17057 (grub_script_mem_record_stop): Likewise.
17058 (grub_script_arg_add): Likewise.
17059 (grub_script_add_arglist): Likewise.
17060 (grub_script_create_cmdline): Likewise.
17061 (grub_script_create_cmdif): Likewise.
17062 (grub_script_create_cmdmenu): Likewise.
17063 (grub_script_add_cmd): Likewise.
17064 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 17065
e2a8c904 170662006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 17067
17068 * normal/command.c (grub_command_init): Remove the title command.
17069
17070 * normal/lexer.c (grub_script_yylex): Renamed from this...
17071 (grub_script_yylex2): ... to this.
17072 (grub_script_yylex): New function. Temporary
17073 introduced to filter some tokens.
17074 (grub_script_yyerror): Print a newline.
17075
17076 * normal/main.c (read_config_file): Output information about the
17077 lines that contain errors. Wait for a key after all lines have
17078 been processed. Don't return an empty menu.
17079
17080 * normal/parser.y (func_mem): Don't initialize.
17081 (menu_entry): Likewise.
17082 (err): New variable.
17083 (script): Don't return anything when an error was encountered.
17084 (ws, returns): Removed rules.
17085 (argument): Disabled concatenated variable support.
17086 (arguments): Remove explicit separators.
17087 (grubcmd): Likewise.
17088 (function): Likewise.
17089 (menuentry): Likewise.
17090 (if): Likewise.
17091 (commands): Likewise. Add error handling.
17092
17093 * normal/script.c (grub_script_create_cmdline): If
17094 `grub_script_parsed' is 0, assume the parser encountered an error.
17095
c9a86192 170962006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
17097
17098 * configure.ac: Add support for EFI. Fix the typo
17099 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
17100
70f3b243 171012006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
17102
17103 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
17104 foreign multibyte characters should be shown correctly.
17105
65f201ad 171062006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
17107
17108 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
17109 calculation.
17110 (read_config_file): Made it to close file before returning.
17111
b4b93674 171122006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
17113
17114 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
17115 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
17116 video/i386/pc/vbefill.c.
17117
17118 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
17119 video/i386/pc/vbefill.c.
17120
17121 * include/grub/video.h (grub_video_blit_format): New enum.
17122 (grub_video_mode_info): Added new member blit_format.
17123 (grub_video_get_blit_format): New function prototype.
17124
17125 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
17126 function prototype.
17127 (grub_video_vbe_map_rgb): Likewise.
17128 (grub_video_vbe_unmap_color): Likewise.
17129
17130 * include/grub/i386/pc/vbeblit.h: New file.
17131
17132 * include/grub/i386/pc/vbefill.h: New file.
17133
17134 * video/video.c (grub_video_get_blit_format): New function.
17135 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
17136 (grub_video_vbe_map_rgb): Likewise.
17137 (grub_video_vbe_unmap_color): Likewise.
17138
17139 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
17140 optimized fills.
17141 (grub_video_vbe_blit_render_target): Changed to use more optimized
17142 blits.
17143 (grub_video_vbe_setup): Added detection for optimized settings.
17144 (grub_video_vbe_create_render_target): Likewise.
17145
17146 * video/i386/pc/vbeblit.c: New file.
17147
17148 * video/i386/pc/vbefill.c: New file.
17149
c2379b9c 171502006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
17151
17152 * font/manager.c (grub_font_get_glyph): Removed font fixup from
17153 here...
17154
17155 * util/unifont2pff.rb: ... and moved it to here. Improved argument
17156 parsing to support both hex and dec ranges. If filename was missing
17157 show usage information.
17158
bd0d7896 171592006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
17160
17161 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
17162 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
17163
17164 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
17165 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
17166 (video_mod_SOURCES): Added.
17167 (video_mod_CFLAGS): Likewise.
17168 (video_mod_LDFLAGS): Likewise.
17169 (gfxterm_mod_SOURCES): Likewise.
17170 (gfxterm_mod_CFLAGS): Likewise.
17171 (gfxterm_mod_LDFLAGS): Likewise.
17172 (videotest_mod_SOURCES): Likewise.
17173 (videotest_mod_CFLAGS): Likewise.
17174 (videotest_mod_LDFLAGS): Likewise.
17175 (vesafb_mod_SOURCES): Removed.
17176 (vesafb_mod_CFLAGS): Likewise.
17177 (vesafb_mod_LDFLAGS): Likewise.
17178 (vga_mod_SOURCES): Likewise.
17179 (vga_mod_CFLAGS): Likewise.
17180 (vga_mod_LDFLAGS): Likewise.
17181
17182 * commands/videotest.c: New file.
17183
17184 * font/manager.c (fill_with_default_glyph): Modified to use
17185 grub_font_glyph.
17186 (grub_font_get_glyph): Likewise.
17187 (fontmanager): Renamed from this...
17188 (font_manager): ... to this.
17189
17190 * include/grub/font.h (grub_font_glyph): Added new structure.
17191 (grub_font_get_glyph): Modified to use grub_font_glyph.
17192
17193 * include/grub/misc.h (grub_abs): Added as inline function.
17194
17195 * include/grub/video.h: New file.
17196
17197 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
17198 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
17199 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
17200 (grub_vbe_get_controller_info): Renamed from this...
17201 (grub_vbe_bios_get_controller_info): ... to this.
17202 (grub_vbe_get_mode_info): Renamed from this...
17203 (grub_vbe_bios_get_mode_info): ... to this.
17204 (grub_vbe_set_mode): Renamed from this...
17205 (grub_vbe_bios_set_mode): ... to this.
17206 (grub_vbe_get_mode): Renamed from this...
17207 (grub_vbe_bios_get_mode): ... to this.
17208 (grub_vbe_set_memory_window): Renamed from this...
17209 (grub_vbe_bios_set_memory_window): ... to this.
17210 (grub_vbe_get_memory_window): Renamed from this...
17211 (grub_vbe_bios_get_memory_window): ... to this.
17212 (grub_vbe_set_scanline_length): Renamed from this...
17213 (grub_vbe_set_scanline_length): ... to this.
17214 (grub_vbe_get_scanline_length): Renamed from this...
17215 (grub_vbe_bios_get_scanline_length): ... to this.
17216 (grub_vbe_set_display_start): Renamed from this...
17217 (grub_vbe_bios_set_display_start): ... to this.
17218 (grub_vbe_get_display_start): Renamed from this...
17219 (grub_vbe_bios_get_display_start): ... to this.
17220 (grub_vbe_set_palette_data): Renamed from this...
17221 (grub_vbe_bios_set_palette_data): ... to this.
17222 (grub_vbe_set_pixel_rgb): Removed.
17223 (grub_vbe_set_pixel_index): Likewise.
17224
17225 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
17226 from this...
17227 (grub_vbe_bios_get_controller_info): ... to this.
17228 (grub_vbe_get_mode_info): Renamed from this...
17229 (grub_vbe_bios_get_mode_info): ... to this.
17230 (grub_vbe_set_mode): Renamed from this...
17231 (grub_vbe_bios_set_mode): ... to this.
17232 (grub_vbe_get_mode): Renamed from this...
17233 (grub_vbe_bios_get_mode): ... to this.
17234 (grub_vbe_set_memory_window): Renamed from this...
17235 (grub_vbe_bios_set_memory_window): ... to this.
17236 (grub_vbe_get_memory_window): Renamed from this...
17237 (grub_vbe_bios_get_memory_window): ... to this.
17238 (grub_vbe_set_scanline_length): Renamed from this...
17239 (grub_vbe_set_scanline_length): ... to this.
17240 (grub_vbe_get_scanline_length): Renamed from this...
17241 (grub_vbe_bios_get_scanline_length): ... to this.
17242 (grub_vbe_set_display_start): Renamed from this...
17243 (grub_vbe_bios_set_display_start): ... to this.
17244 (grub_vbe_get_display_start): Renamed from this...
17245 (grub_vbe_bios_get_display_start): ... to this.
17246 (grub_vbe_set_palette_data): Renamed from this...
17247 (grub_vbe_bios_set_palette_data): ... to this.
17248 (grub_vbe_bios_get_controller_info): Fixed problem with registers
17249 getting corrupted after calling it. Added more pushes and pops.
17250 (grub_vbe_bios_set_mode): Likewise.
17251 (grub_vbe_bios_get_mode): Likewise.
17252 (grub_vbe_bios_get_memory_window): Likewise.
17253 (grub_vbe_bios_set_scanline_length): Likewise.
17254 (grub_vbe_bios_get_scanline_length): Likewise.
17255 (grub_vbe_bios_get_display_start): Likewise.
17256 (grub_vbe_bios_set_palette_data): Likewise.
17257
17258 * normal/cmdline.c (cl_set_pos): Refresh the screen.
17259 (cl_insert): Likewise.
17260 (cl_delete): Likewise.
17261
17262 * term/gfxterm.c: New file.
17263
17264 * term/i386/pc/vesafb.c: Removed file.
17265
17266 * video/video.c: New file.
17267
17268 * video/i386/pc/vbe.c (real2pm): Added new function.
17269 (grub_video_vbe_draw_pixel): Likewise.
17270 (grub_video_vbe_get_video_ptr): Likewise.
17271 (grub_video_vbe_get_pixel): Likewise
17272 (grub_video_vbe_init): Likewise.
17273 (grub_video_vbe_fini): Likewise.
17274 (grub_video_vbe_setup): Likewise.
17275 (grub_video_vbe_get_info): Likewise.
17276 (grub_video_vbe_set_palette): Likewise.
17277 (grub_video_vbe_get_palette): Likewise.
17278 (grub_video_vbe_set_viewport): Likewise.
17279 (grub_video_vbe_get_viewport): Likewise.
17280 (grub_video_vbe_map_color): Likewise.
17281 (grub_video_vbe_map_rgb): Likewise.
17282 (grub_video_vbe_map_rgba): Likewise.
17283 (grub_video_vbe_unmap_color): Likewise.
17284 (grub_video_vbe_fill_rect): Likewise.
17285 (grub_video_vbe_blit_glyph): Likewise.
17286 (grub_video_vbe_blit_bitmap): Likewise.
17287 (grub_video_vbe_blit_render_target): Likewise.
17288 (grub_video_vbe_scroll): Likewise.
17289 (grub_video_vbe_swap_buffers): Likewise.
17290 (grub_video_vbe_create_render_target): Likewise.
17291 (grub_video_vbe_delete_render_target): Likewise.
17292 (grub_video_vbe_set_active_render_target): Likewise.
17293 (grub_vbe_set_pixel_rgb): Remove function.
17294 (grub_vbe_set_pixel_index): Likewise.
17295 (index_color_mode): Remove static variable.
17296 (active_mode): Likewise.
17297 (framebuffer): Likewise.
17298 (bytes_per_scan_line): Likewise.
17299 (grub_video_vbe_adapter): Added new static variable.
17300 (framebuffer): Likewise.
17301 (render_target): Likewise.
17302 (initial_mode): Likewise.
17303 (mode_in_use): Likewise.
17304 (mode_list): Likewise.
17305
5f97350b 173062006-03-10 Marco Gerards <marco@gnu.org>
17307
17308 * configure.ac (AC_INIT): Bumped to 1.93.
17309
17310 * DISTLIST: Added `include/grub/hfs.h'.
17311
a3c5c6f8 173122006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
17313
17314 * boot/i386/pc/boot.S (general_error): Before looping, try INT
17315 18H, which might help the BIOS falling back to next boot media.
17316
6de53d26 173172006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
17318
17319 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
17320 Poe Chen <poe.poechen@gmail.com>.
17321
77c4a393 173222006-01-17 Marco Gerards <marco@gnu.org>
17323
17324 * include/grub/normal.h: Include <grub/script.h>.
17325 (grub_command_list): Removed struct.
17326 (grub_command_list_t): Removed type.
17327 (grub_menu_entry): Remove members `num' and `command_list'. Add
17328 members `commands' and `sourcecode'.
17329 * include/grub/script.h: Add inclusion guards.
17330 (grub_script_cmd_menuentry): New struct.
17331 (grub_script_execute_menuentry): New prototype.
17332 (grub_script_lexer_record_start): Likewise.
17333 (grub_script_lexer_record_stop): Likewise.
17334 * normal/execute.c (grub_script_execute_menuentry): New function.
17335 * normal/lexer.c (record, recording, recordpos, recordlen): New
17336 variables.
17337 (grub_script_lexer_record_start): New function.
17338 (grub_script_lexer_record_stop): Likewise.
17339 (recordchar): Likewise.
17340 (nextchar): Likewise.
17341 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
17342 2048 as the buffer size. Add the tokens `menuentry' and `@'.
17343 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
17344 (current_menu): New variable.
17345 (free_menu): Mainly rewritten.
17346 (grub_normal_menu_addentry): New function.
17347 (read_config_file): Rewritten.
17348 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 17349 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 17350 the menu entry.
17351 (run): Mainly rewritten.
17352 * normal/parser.y (menu_entry): New variable.
17353 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
17354 (menuentry): New rule.
17355 (command): Add `menuentry'.
17356 (if_statement): Allow additional returns before `fi'.
17357 * normal/script.c (grub_script_create_cmdmenu): New function.
17358
144f1f98 173592006-01-03 Marco Gerards <marco@gnu.org>
17360
17361 * INSTALL: GNU Bison is required.
17362 * configure.ac: Rewritten the test to detect Bison.
17363 * Makefile.in (YACC): New variable. Reported by Xun Sun
17364 <xun.sun.cn@gmail.com>.
17365
af4b2d89 173662006-01-03 Marco Gerards <marco@gnu.org>
17367
17368 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
17369 the HFS+ filesystem to filesystem blocks.
17370 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
17371 GCC warning is silenced.
17372
15643b71 173732006-01-03 Marco Gerards <marco@gnu.org>
17374
17375 * partmap/apple.c (apple_partition_map_iterate): Convert the data
17376 read from disk from big endian to host byte order.
17377
00905879 173782006-01-03 Hollis Blanchard <hollis@penguinppc.org>
17379
17380 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
17381 documentation.
17382 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
17383 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
17384 embedded HFS+ filesystem.
17385 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
17386 (grub_hfs_sblock): Move from here...
17387 * include/grub/hfs.h: To here... New file.
17388 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
17389 documentation.
17390 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
17391 New macros.
17392 (grub_hfsplus_volheader): Change type of member `magic' to
17393 `grub_uint16_t'.
17394 (grub_hfsplus_data): Add new member `embedded_offset'.
17395 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
17396 returned block.
17397 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
17398 Calculate the offset.
17399
8899bc3e 174002005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
17401
17402 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
17403 Removed.
17404 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
17405
ae8c0277 174062005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
17407
17408 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
17409 ENV->NAME is NULL after allocating ENV->VALUE.
17410
07084456 174112005-12-25 Marco Gerards <marco@gnu.org>
17412
17413 * kern/env.c (grub_env_set): Rewritten the error handling code.
17414
4750f5f1 174152005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
17416
17417 * geninit.sh: Made more robust, and more portable.
17418
50214199 174192005-12-25 Marco Gerards <marco@gnu.org>
17420
17421 Add support for Apple HFS+ filesystems.
f19dbdb7 17422
50214199 17423 * fs/hfsplus.c: New file.
17424
17425 * DISTLIST: Added `fs/hfsplus.c'.
17426
17427 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
17428 (hfsplus_mod_SOURCES): New variable.
17429 (hfsplus_mod_CFLAGS): Likewise.
17430 (hfsplus_mod_LDFLAGS): Likewise.
17431 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
17432 (grub_setup_SOURCES): Likewise.
17433 (grub_mkdevicemap_SOURCES): Likewise.
17434 (grub_emu_SOURCES): Likewise.
17435 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17436
17437 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
17438
17439 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
17440
befaed6c 174412005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
17442
17443 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
17444 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
17445 include/grub/parser.h, include/grub/script.h, kern/parser.c,
17446 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
17447 normal/lexer.c, normal/parser.y, normal/script.c, and
17448 partmap/gpt.c.
17449 Removed kern/sparc64/cache.c.
17450
17451 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
17452 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
17453 grub_emu_init.c.
17454
17455 * configure.ac (AC_INIT): Bumped to 1.92.
17456
6a124103 174572005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
17458
17459 * kern/err.c (grub_error_push): Added new function to support error
17460 stacks.
17461 (grub_error_pop): Likewise.
17462 (grub_error_stack_items): New local variable to support error stacks.
17463 (grub_error_stack_pos): Likewise.
17464 (grub_error_stack_assert): Likewise.
17465 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
17466 stack depth.
17467 (grub_print_error): Added support to print errors from error stack.
17468
17469 * include/grub/err.h (grub_error_push): Added function prototype.
17470 (grub_error_pop): Likewise.
17471
be973c1b 174722005-12-09 Hollis Blanchard <hollis@penguinppc.org>
17473
17474 * configure.ac: Accept `powerpc64' as host_cpu.
17475 (amd64): Rename to `biarch32'.
17476
17477 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
17478 non-cacheline-aligned addresses.
17479
17480 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
17481 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
17482 if `size' is non-zero.
17483
b04216ab 174842005-12-03 Marco Gerards <mgerards@xs4all.nl>
17485
17486 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
17487 and `cd' to make sure the filename is not prefixed with a
17488 directory name.
17489 (pkgdata_MODULES): Add `gpt.mod'.
17490 (gpt_mod_SOURCES): New variable.
17491 (gpt_mod_CFLAGS): Likewise.
17492 (gpt_mod_LDFLAGS): Likewise.
17493
17494 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
17495
17496 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
17497 New macro.
17498
17499 * partmap/gpt.c: New file.
17500
17501 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
17502 GPT partition map is detected.
17503
41730ed9 175042005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
17505
17506 * commands/i386/pc/play.c: New file.
17507 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
17508 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
17509 macros.
f19dbdb7 17510
95dc3643 175112005-11-27 Marco Gerards <mgerards@xs4all.nl>
17512
17513 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
17514 ((unused))' to silence gcc warning.
17515
1569ec51 175162005-11-26 Hollis Blanchard <hollis@penguinppc.org>
17517
17518 * configure.ac: Correct `AC_PROG_YACC' test.
17519
9abde152 175202005-11-22 Hollis Blanchard <hollis@penguinppc.org>
17521
17522 * util/powerpc/ieee1275/grub-install.in: Run the mount point
17523 check before installing files.
17524
44b83271 175252005-11-22 Mike Small <smallm@panix.com>
17526
17527 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
17528 number regex so multidigit numbers are recognized correctly.
17529
175302005-11-22 Mike Small <smallm@panix.com>
17531
17532 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
17533 debugging message before attempting to claim memory.
17534 (grub_rescue_cmd_initrd): Add a claim debugging message and try
17535 multiple addresses in case of failure.
17536
9c12956b 175372005-11-22 Hollis Blanchard <hollis@penguinppc.org>
17538
17539 * term/tparm.c (get_space): Remove empty `if' statement.
17540
17541 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
17542
17543 * kern/parser.c (check_varstate): Rename `state' to 's'.
17544
aeaf81d9 175452005-11-22 Hollis Blanchard <hollis@penguinppc.org>
17546
17547 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
17548 variable definitions to the beginning of each function. Sort stack
17549 variables by size.
17550 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
17551 `buf' argument to `char *'.
17552
79bbb63f 175532005-11-22 Hollis Blanchard <hollis@penguinppc.org>
17554
17555 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
17556 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 17557 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 17558 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
17559 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
17560 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
17561 configfile.mod, search.mod, gzio.mod and test.mod.
17562 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
17563 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
17564 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
17565 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
17566 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
17567 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
17568 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
17569 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
17570 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
17571 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
17572 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17573 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17574 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
17575 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
17576 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
17577 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
17578 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
17579 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
17580 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
17581 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
17582 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
17583 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
17584 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
17585
17586 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
17587 `grep --include'.
17588 (pkgdata_MODULES): Add test.mod.
17589
233b1628 175902005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17591
17592 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
17593 appending to variables with "+=".
17594 (PModule): Use full pathname to generate *.lst filenames.
17595
17596 * Makefile.in: Fixed list rules moved from genmk.rb.
17597 (.DELETE_ON_ERROR): New special target.
17598 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
17599
17600 * conf/i386-pc.rmk: Include conf/common.mk.
17601 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 17602 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 17603 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
17604 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
17605 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
17606 configfile.mod, search.mod, gzio.mod and test.mod.
17607 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
17608 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
17609 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
17610 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
17611 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
17612 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
17613 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
17614 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
17615 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
17616 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
17617 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17618 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17619 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
17620 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
17621 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
17622 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
17623 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
17624 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
17625 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
17626 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
17627 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
17628 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
17629 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
17630 here...
17631 * conf/common.rmk: ... to here. New file.
17632
17633 * conf/common.mk: New file.
17634
16f820c8 176352005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
17636
17637 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
17638 (grub_script.tab.c): ... here.
17639
17640 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
17641 (grub_script.tab.c): ... here.
17642
17643 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
17644 (grub_script.tab.c): ... here.
17645
17646 * normal/command.c (grub_command_find): Fixed a memory leak of
17647 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
17648
63ba1554 176492005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17650
17651 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
17652 "@" which marks the start of a comment on ARM.
17653 (VARIABLE): Likewise.
17654
7f67dc13 176552005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17656
79bbb63f 17657 Add support for Linux/ADFS partition tables.
7f67dc13 17658
17659 * partmap/acorn.c: New file.
17660
17661 * include/grub/acorn_filecore.h: Likewise.
17662
17663 * DISTLIST: Added `partmap/acorn.c' and
17664 `include/grub/acorn_filecore.h'.
f19dbdb7 17665
7f67dc13 17666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17667 `partmap/acorn.c'.
17668 (pkgdata_MODULES): Add `acorn.mod'.
17669 (acorn_mod_SOURCES): New variable.
17670 (acorn_mod_CFLAGS): Likewise.
17671
17672 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
17673 `partmap/acorn.c'.
17674 (pkgdata_MODULES): Add `acorn.mod'.
17675 (acorn_mod_SOURCES): New variable.
17676 (acorn_mod_CFLAGS): Likewise.
17677
17678 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
17679 (pkgdata_MODULES): Add `acorn.mod'.
17680 (acorn_mod_SOURCES): New variable.
17681 (acorn_mod_CFLAGS): Likewise.
17682 (acorn_mod_LDFLAGS): Likewise.
17683
17684 * include/types.h (grub_disk_addr_t): New typedef.
17685
6d099807 176862005-11-13 Marco Gerards <mgerards@xs4all.nl>
17687
17688 * geninit.sh: New file.
17689
17690 * geninitheader.sh: Likewise.
17691
17692 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
17693 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
17694 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
17695 * commands/configfile.c (grub_configfile_init)
17696 (grub_configfile_fini): Likewise.
17697 * commands/default.c (grub_default_init, grub_default_fini):
17698 Likewise.
17699 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
17700 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
17701 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
17702 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
17703 Likewise.
17704 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
17705 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
17706 Likewise.
17707 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 17708 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 17709 Likewise.
17710 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
17711 Likewise.
fe6b695a 17712 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 17713 Likewise.
17714 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
17715 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
17716 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
17717 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
17718 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
17719 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
17720 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
17721 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
17722 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
17723 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
17724 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
17725 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
17726 * partmap/amiga.c (grub_amiga_partition_map_init)
17727 (grub_amiga_partition_map_fini): Likewise.
17728 * partmap/apple.c (grub_apple_partition_map_init)
17729 (grub_apple_partition_map_fini): Likewise.
17730 * partmap/pc.c (grub_pc_partition_map_init)
17731 (grub_pc_partition_map_fini): Likewise.
17732 * partmap/sun.c (grub_sun_partition_map_init,
17733 grub_sun_partition_map_fini): Likewise.
17734 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
17735 Likewise.
17736
17737 * util/grub-emu.c: Include <grub_modules_init.h>.
17738 (main): Don't initialize and de-initialize any modules directly,
17739 use `grub_init_all' and `grub_fini_all' instead.
17740
17741 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
17742 `grub_vesafb_mod_init'.
17743 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
17744 all users.
17745 * term/i386/pc/vga.c (grub_vga_init): Renamed to
17746 `grub_vga_mod_init'. Updated all users.
17747 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 17748
6d099807 17749 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
17750 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
17751 rules.
17752
17753 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
17754 Generate a function to initialize the module in utilities.
17755 Updated all callers.
17756 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
17757 initialize the module in utilities. Updated all callers.
17758
9046bcf0 177592005-11-09 Hollis Blanchard <hollis@penguinppc.org>
17760
17761 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
17762 escape sequence and a literal ^L to clear the screen.
17763
17764 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
17765 when returning from Open Firmware.
17766
d13ea639 177672005-11-09 Hollis Blanchard <hollis@penguinppc.org>
17768
17769 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
17770 (grub_ofconsole_height): Likewise.
17771 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
17772 manually insert a '\n'.
17773 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
17774 `grub_ofconsole_height'. Return early if these are already set.
17775
a8fcf206 177762005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
17777
17778 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
17779 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
17780 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
17781 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
17782 and `normal/script.c'.
17783 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17784 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17785 (test_mod_SOURCES): New variable.
17786 (test_mod_CFLAGS): Likewise.
17787 (test_mod_LDFLAGS): Likewise.
17788 (pkgdata_MODULES): Add `test.mod'.
17789 (grub_script.tab.c): New rule.
17790 (grub_script.tab.h): Likewise.
17791
b6b32745 177922005-11-07 Marco Gerards <mgerards@xs4all.nl>
17793
17794 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17795 `commands/test.c', `normal/execute.c', `normal/lexer.c',
17796 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17797 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17798 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
17799 (test_mod_SOURCES): New variable.
17800 (test_mod_CFLAGS): Likewise.
17801 (pkgdata_MODULES): Add `test.mod'.
17802 (grub_script.tab.c): New rule.
17803 (grub_script.tab.h): Likewise.
17804
daac212a 178052005-11-06 Marco Gerards <mgerards@xs4all.nl>
17806
17807 Add initial scripting support.
17808
17809 * commands/test.c: New file.
17810 * include/grub/script.h: Likewise.
17811 * normal/execute.c: Likewise.
17812 * normal/function.c: Likewise.
17813 * normal/lexer.c: Likewise.
17814 * normal/parser.y: Likewise.
17815 * normal/script.c: Likewise.
17816
17817 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 17818
daac212a 17819 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
17820 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
17821 `normal/function.c' and `normal/script.c'.
17822 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
17823 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 17824 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
17825 variables.
daac212a 17826 (pkgdata_MODULES): Add `test.mod'.
17827 (grub_script.tab.c): New rule.
17828 (grub_script.tab.h): Likewise.
17829
17830 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
17831
17832 * include/grub/normal.h (grub_test_init): New prototype.
17833 (grub_test_fini): Likewise.
f19dbdb7 17834
daac212a 17835 * normal/command.c: Include <grub/script.h>.
17836 (grub_command_execute): Rewritten.
f19dbdb7 17837
daac212a 17838 * util/grub-emu.c (main): Call `grub_test_init' and
17839 `grub_test_fini'.
17840
77500b2b 178412005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17842
17843 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
17844 to 0.
17845 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
17846 there are no pending characters.
17847
e45deb9e 178482005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17849
17850 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
17851 `grub_strndup' to drop device arguments. Replace unnecessary
17852 `grub_strndup' with `grub_strdup'.
17853
4ce32619 178542005-11-03 Hollis Blanchard <hollis@penguinppc.org>
17855
17856 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
17857 `debug' environment variable has been set.
17858
178592005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 17860
4ce32619 17861 * Makefile.in (install-local): Use $(DATA).
17862 (uninstall): Likewise.
17863 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
17864 (sbin_UTILITIES): ... to here.
17865 (sbin_SCRIPTS): New variable.
17866 (grub_install_SOURCES): New variable.
17867 * util/powerpc/ieee1275/grub-install.in: New file.
17868 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
17869 variable.
17870 (add_segments): Call `grub_util_get_path'.
17871
25fe6f03 178722005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
17873
17874 From Timothy Baldwin:
17875 * commands/ls.c (grub_ls_list_files): Close FILE with
17876 grub_file_close.
17877 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
17878
04ccf3ec 178792005-10-24 Marco Gerards <mgerards@xs4all.nl>
17880
17881 * include/grub/parser.h: New file.
17882
17883 * kern/parser.c: Likewise.
17884
17885 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
17886 (grub_setup_SOURCES): Likewise.
17887 (grub_probefs_SOURCES): Likewise.
17888 (grub_emu_SOURCES): Likewise.
17889 (kernel_img_HEADERS): Add `parser.h'.
17890
17891 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
17892 (grub_emu_SOURCES): Add `kern/parser.c'.
17893 (grubof_SOURCES): Likewise.
17894
17895 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
17896 (grubof_SOURCES): Add `kern/parser.c'.
17897
17898 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
17899
17900 * kern/misc.c (grub_split_cmdline): Removed function.
17901
17902 * kern/rescue.c: Include <grub/parser.h>.
17903 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
17904 of `grub_split_cmdline'.
17905
17906 * normal/command.c: Include <grub/parser.h>.
17907 (grub_command_execute): Use `grub_parser_split_cmdline' instead
17908 of `grub_split_cmdline'.
17909
17910 * normal/completion.c: Include <grub/parser.h>.
17911 (cmdline_state): New variable.
17912 (iterate_dir): End the filename with a quote depending on the
17913 command line state.
17914 (get_state): new function.
17915 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
17916 split the arguments and determine the current argument. When the
17917 argument string is not quoted, escape all spaces.
17918
6d8f4b0e 179192005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17920
17921 * normal/sparc64/setjmp.S: New file.
17922
15cf03ed 179232005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17924
17925 * include/grub/sparc64/libgcc.h: New file.
17926 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
17927 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
17928 normal/sparc64/setjmp.c.
17929
03e8661a 179302005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
17931
17932 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
17933 * kern/sparc64/cache.S: New file.
17934 * kern/sparc64/cache.c: Removed.
17935 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
17936 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
17937 -mtune=ultrasparc.
17938 (COMMON_LDFLAGS): Add -melf64_sparc.
17939 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
17940 (grubof_SOURCES): Use cache.S instead of cache.c.
17941 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
17942 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
17943 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
17944 commented though.
17945 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
17946 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
17947 (linux_mod_CFLAGS): Commented out.
17948 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
17949 out because module isn't built.
17950 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
17951 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
17952 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
17953 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
17954 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
17955 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
17956 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
17957 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
17958 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
17959 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
17960 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
17961 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
17962 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
17963 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
17964
34eeec8a 179652005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
17966
17967 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
17968 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
17969 longer, because HFS should not be used on PC.
17970
708367a3 179712005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17972
17973 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
17974 consistently within the loop.
17975
6fa1251a 179762005-10-15 Marco Gerards <mgerards@xs4all.nl>
17977
17978 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
17979 directory can not be read.
17980
4801580b 179812005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17982
17983 * configure.ac (AC_INIT): Increase the version number to 1.91.
17984
17985 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
17986 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
17987 term/i386/pc/serial.c.
17988
219ad426 179892005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17990
17991 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
17992 file size must be permitted.
17993
17994 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
17995 between %ah and %al.
17996
688e5699 179972005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
17998
17999 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
18000 grub_uint64_t.
18001 Call the hook with a NUL-terminated filename.
18002 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
18003 grub_cpu_to_be32.
18004
18005 * kern/term.c (cursor_state): New variable.
18006 (grub_term_set_current): Reset the cursor state on a new
18007 terminal.
18008 (grub_setcursor): Rewritten to use CURSOR_STATE.
18009 (grub_getcursor): New function.
18010
18011 * include/grub/term.h (grub_getcursor): New prototype.
18012
18013 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
18014 integers on ARM. Reported by Timothy Baldwin
18015 <T.E.Baldwin99@members.leeds.ac.uk>.
18016
bb34586c 180172005-10-11 Marco Gerards <mgerards@xs4all.nl>
18018
18019 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
18020 allocated.
18021 (grub_sfs_dir): Likewise.
18022
9a909877 180232005-10-09 Marco Gerards <mgerards@xs4all.nl>
18024
18025 Add support for the SFS filesystem.
18026
18027 * fs/sfs.c: New file.
18028
18029 * DISTLIST: Added `fs/sfs.c'.
18030
18031 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
18032 (grub_probefs_SOURCES): Likewise.
18033 (grub_emu_SOURCES): Likewise.
18034 (pkgdata_MODULES): Add `sfs.mod'.
18035 (sfs_mod_SOURCES): New variable.
18036 (sfs_mod_CFLAGS): Likewise.
18037 (sfs_mod_LDFLAGS): Likewise.
18038
18039 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
18040 (pkgdata_MODULES): Add `sfs.mod'.
18041 (sfs_mod_SOURCES): New variable.
18042 (sfs_mod_CFLAGS): Likewise.
18043
18044 * util/grub-emu.c (main): Call `grub_sfs_init' and
18045 `grub_sfs_fini'.
18046
18047 * include/grub/fs.h (grub_sfs_init): New prototype.
18048 (grub_sfs_fini): Likewise.
18049
57bdbde3 180502005-10-07 Marco Gerards <mgerards@xs4all.nl>
18051
18052 Add support for the AFFS filesystem.
18053
18054 * fs/affs.c: New file.
18055
18056 * DISTLIST: Added `fs/affs.c'.
18057
18058 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
18059 (grub_probefs_SOURCES): Likewise.
18060 (grub_emu_SOURCES): Likewise.
18061 (pkgdata_MODULES): Add `affs.mod'.
18062 (affs_mod_SOURCES): New variable.
18063 (affs_mod_CFLAGS): Likewise.
18064 (affs_mod_LDFLAGS): Likewise.
18065
18066 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
18067 (pkgdata_MODULES): Add `affs.mod'.
18068 (affs_mod_SOURCES): New variable.
18069 (affs_mod_CFLAGS): Likewise.
18070
18071 * util/grub-emu.c (main): Call `grub_affs_init' and
18072 `grub_affs_fini'.
18073
18074 * include/grub/fs.h (grub_affs_init): New prototype.
18075 (grub_affs_fini): Likewise.
18076
047b67e0 180772005-10-01 Marco Gerards <mgerards@xs4all.nl>
18078
18079 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
18080
59b8208a 180812005-10-01 Marco Gerards <mgerards@xs4all.nl>
18082
18083 * configure.ac: Accept `x86_64' as host_cpu. In that case add
18084 `-m32' to CFLAGS.
18085
18086 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
18087 linking.
f19dbdb7 18088
59b8208a 18089 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
18090 (COMMON_LDFLAGS): New variable.
18091 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
18092 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
18093 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
18094 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
18095 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
18096 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
18097 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
18098 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
18099 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
18100 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
18101 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
18102 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
18103 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
18104 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
18105 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
18106 variables.
18107 (normal_mod_ASFLAGS): Add `-m32'.
18108
18109 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
18110 (grub_host_size_t, grub_host_ssize_t): New types.
18111 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 18112 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 18113 `GRUB_HOST_SIZEOF_VOID_P'.
18114
18115 * include/grub/kernel.h (struct grub_module_header): Type of
18116 member offset changed to `grub_host_off_t'. Type of member size
18117 changed to `grub_host_size_t'.
18118 (struct grub_module_info): Type of member offset changed to
18119 `grub_host_off_t'. Type of member size changed to
18120 `grub_host_size_t'.
18121
b4093103 181222005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
18123
18124 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 18125
b4093103 18126 * kern/i386/pc/startup.S (multiboot_header): New label.
18127 (multiboot_entry): Likewise.
18128 (multiboot_trampoline): Likewise.
18129
18130 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
18131 Increased to 0x4A0.
18132
18133 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
18134 put parentheses after a question mark.
18135 [!GRUB_UTIL] (my_mod): New variable.
18136
18137 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
18138
b2499b29 181392005-09-28 Marco Gerards <mgerards@xs4all.nl>
18140
18141 Adds support for the XFS filesystem. Btrees are not supported
18142 yet.
18143
18144 * fs/xfs.c: New file.
18145
18146 * DISTLIST: Added `fs/xfs.c'.
18147
18148 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
18149 (grub_probefs_SOURCES): Likewise.
18150 (grub_emu_SOURCES): Likewise.
18151 (pkgdata_MODULES): Add `xfs.mod'.
18152 (xfs_mod_SOURCES): New variable.
18153 (xfs_mod_CFLAGS): Likewise.
18154
18155 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
18156 (pkgdata_MODULES): Add `xfs.mod'.
18157 (xfs_mod_SOURCES): New variable.
18158 (xfs_mod_CFLAGS): Likewise.
18159
18160 * util/grub-emu.c (main): Call `grub_xfs_init' and
18161 `grub_xfs_fini'.
18162
18163 * include/grub/fs.h (grub_xfs_init): New prototype.
18164 (grub_xfs_fini): Likewise.
18165
f19dbdb7 18166
83d37a62 181672005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
18168
18169 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
18170 color modes, allow greater than 16 colors to be configured as
18171 a default palette.
18172
47d2d65e 181732005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
18174
18175 * normal/completion.c (complete_arguments): Add the qualifier
18176 const into OPTIONS.
18177
18178 From Omniflux <omniflux+lists@omniflux.com>:
18179 * include/grub/terminfo.h: New file.
18180 * include/grub/tparm.h: Likewise.
18181 * include/grub/i386/pc/serial.h: Likewise.
18182 * term/terminfo.c: Likewise.
18183 * term/tparm.c: Likewise.
18184 * term/i386/pc/serial.c: Likewise.
18185 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
18186 serial.mod.
18187 (terminfo_mod_SOURCES): New variable.
18188 (terminfo_mod_CFLAGS): Likewise.
18189 (serial_mod_SOURCES): Likewise.
18190 (serial_mod_CFLAGS): Likewise.
18191
48b671ff 181922005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
18193
18194 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
18195 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
18196 and kern/powerpc/ieee1275/cmain.c, respectively.
18197
18198 * boot/powerpc/ieee1275/crt0.S: Moved to ...
18199 * kern/powerpc/ieee1275/crt0.S: ... here.
18200
18201 * boot/powerpc/ieee1275/cmain.c: Moved to ...
18202 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 18203
48b671ff 18204 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
18205 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
18206 instead of boot/powerpc/ieee1275/crt0.S and
18207 boot/powerpc/ieee1275/cmain.c, respectively.
18208
18209 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
18210 sectors. It was not used anyway.
18211
09fc77a7 182122005-08-30 Hollis Blanchard <hollis@penguinppc.org>
18213
18214 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
18215 `unused parameter' warning.
18216
003789c7 182172005-08-30 Hollis Blanchard <hollis@penguinppc.org>
18218
18219 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
18220 function.
18221 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
18222 getcharwidth.
18223
67f44c86 182242005-08-28 Marco Gerards <metgerards@student.han.nl>
18225
18226 * include/grub/normal.h (enum grub_completion_type): Added
18227 `GRUB_COMPLETION_TYPE_ARGUMENT'.
18228
18229 * normal/cmdline.c (print_completion): Handle
18230 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
18231 * normal/menu_entry.c (store_completion): Likewise.
18232
18233 * normal/completion.c (complete_arguments): New function.
18234 (grub_normal_do_completion): Call `complete_arguments' when the
18235 current words start with a dash.
18236
0b5abe02 182372005-08-27 Marco Gerards <metgerards@student.han.nl>
18238
18239 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
18240 `gzio.mod' instead of `io.mod').
18241
d9864ee1 182422005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
18243
18244 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
18245 (DISTDIRS): Added io and video.
18246 Rewrite the search routine to make an output consistently.
18247
18248 * DISTLIST: Added conf/sparc64-ieee1275.mk,
18249 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
18250 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
18251 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
18252 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
18253 util/powerpc/ieee1275/misc.c.
f19dbdb7 18254
d9864ee1 18255 * include/grub/gzio.h: New file.
18256 * io/gzio.c: Likewise.
f19dbdb7 18257
d9864ee1 18258 * kern/file.c (grub_file_close): Call grub_device_close only if
18259 FILE->DEVICE is not NULL.
18260
18261 * include/grub/mm.h [!NULL] (NULL): New macro.
18262
18263 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
18264
18265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
18266 (pkgdata_MODULES): Added gzio.mod.
18267 (gzio_mod_SOURCES): New variable.
18268 (gzio_mod_CFLAGS): Likewise.
18269
18270 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
18271 (pkgdata_MODULES): Added gzio.mod.
18272 (gzio_mod_SOURCES): New variable.
18273 (gzio_mod_CFLAGS): Likewise.
18274
18275 * commands/cat.c: Include grub/gzio.h.
18276 (grub_cmd_cat): Use grub_gzfile_open instead of
18277 grub_file_open.
f19dbdb7 18278
d9864ee1 18279 * commands/cmp.c: Include grub/gzio.h.
18280 (grub_cmd_cmp): Use grub_gzfile_open instead of
18281 grub_file_open.
18282
18283 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
18284 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
18285 grub_file_open.
18286 (grub_rescue_cmd_module): Likewise.
18287
fa46f4b5 182882005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
18289
18290 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
18291 kern/sparc64/ieee1275/init.c because it contains _start.
18292 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
18293
e9211b5d 182942005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
18295
18296 * configure.ac: Add support for sparc64 host with ieee1275
18297 firmware.
18298 * configure: Generated from configure.ac.
18299 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
18300 instead of int.
18301 (grub_ofdisk_read): Likewise.
18302 (grub_ofdisk_open): Use %p to print pointer values, and cast the
18303 pointers as (void *) to remove a warning.
18304 (grub_ofdisk_close): Likewise.
18305 (grub_ofdisk_read): Likewise.
18306 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
18307 returns, so make it return void to remove a warning.
18308 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
18309 Corresponding prototype change.
18310 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
18311 values, and cast the pointers as (void *) to remove a warning.
18312 (grub_mm_dump): Likewise.
18313 * conf/sparc64-ieee1275.mk: New file.
18314 * conf/sparc64-ieee1275.rmk: Likewise.
18315 * include/grub/sparc64/setjmp.h: Likewise.
18316 * include/grub/sparc64/types.h: Likewise.
18317 * include/grub/sparc64/ieee1275/console.h: Likewise.
18318 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
18319 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
18320 * include/grub/sparc64/ieee1275/time.h: Likewise.
18321 * kern/sparc64/cache.c: Likewise.
18322 * kern/sparc64/dl.c: Likewise.
18323 * kern/sparc64/ieee1275/init.c: Likewise.
18324 * kern/sparc64/ieee1275/openfw.c: Likewise.
18325
385c6a92 183262005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
18327
18328 * util/console.c (grub_ncurses_putchar): If C is greater than
18329 0x7f, set C to a question mark.
18330 (grub_ncurses_getcharwidth): New function.
18331 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
18332 getcharwidth.
18333
18334 * normal/menu.c (print_entry): Made aware of Unicode. First,
18335 convert TITLE to UCS-4, and predict the cursor position by
18336 grub_getcharwidth.
18337
18338 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
18339 const to SRC.
18340 * kern/misc.c (grub_utf16_to_utf8): Likewise.
18341
16ccb8b1 183422005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
18343
18344 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
18345 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
18346 grub_strcat.
18347
18348 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
18349 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
18350 grub_strcpy and grub_strlen. Take it into account that a space
18351 character is inserted as a delimiter.
18352
6a85ce79 183532005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
18354
18355 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 18356 invalid magic in the error.
6a85ce79 18357
18358 * commands/search.c: New file.
f19dbdb7 18359
6a85ce79 18360 * util/grub-emu.c (main): Call grub_search_init and
18361 grub_search_fini.
18362
18363 * kern/rescue.c (grub_rescue_print_disks): Removed.
18364 (grub_rescue_print_devices): New function.
18365 (grub_rescue_cmd_ls): Use grub_device_iterate with
18366 grub_rescue_print_devices instead of grub_disk_dev_iterate with
18367 grub_rescue_print_disks.
18368
18369 * kern/partition.c (grub_partition_iterate): Return the result of
18370 PARTMAP->ITERATE instead of GRUB_ERRNO.
18371
18372 * kern/device.c: Include grub/partition.h.
18373 (grub_device_iterate): New function.
18374
18375 * include/grub/partition.h (grub_partition_iterate): Return int
18376 instead of grub_err_t.
18377
18378 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
18379 prototype.
18380 [GRUB_UTIL] (grub_search_fini): Likewise.
18381
18382 * include/grub/device.h (grub_device_iterate): New prototype.
18383
18384 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18385 commands/search.c.
18386 (pkgdata_MODULES): Added search.mod.
18387 (search_mod_SOURCES): New variable.
18388 (search_mod_CFLAGS): Likewise.
18389
18390 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
18391 (pkgdata_MODULES): Added search.mod.
18392 (search_mod_SOURCES): New variable.
18393 (search_mod_CFLAGS): Likewise.
18394
18395 * commands/ls.c (grub_ls_list_disks): Renamed to ...
18396 (grub_ls_list_devices): ... this, and use grub_device_iterate.
18397 All callers changed.
18398
18399 * DISTLIST: Added commands/search.c.
18400
ef095434 184012005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
18402
18403 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
18404 conversion.
18405 (grub_getcharwidth): New function.
18406
18407 * kern/misc.c (grub_utf8_to_ucs4): New function.
18408
18409 * include/grub/term.h (struct grub_term): Added a new member
18410 "getcharwidth".
18411 (grub_getcharwidth): New prototype.
18412
18413 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
18414
18415 * term/i386/pc/console.c (map_char): New function. Segregated from
18416 grub_console_putchar.
18417 (grub_console_putchar): Use map_char.
18418 (grub_console_getcharwidth): New function.
18419 (grub_console_term): Specified grub_console_getcharwidth as
18420 getcharwidth.
18421
18422 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
18423 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
18424
18425 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
18426 GRUB_ERRNO.
18427 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
18428 on grub_strtoul completely.
18429 (write_char): Declare local variables in the beginning of the
18430 function.
18431 (grub_vesafb_getcharwidth): New function.
18432 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
18433 getcharwidth.
18434
1f0a95e4 184352005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
18436
18437 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
18438 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
18439 commands/i386/pc/vbetest.c.
18440
18441 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
18442 call grub_vbe_get_controller_info again, because the returned
18443 information is volatile.
18444 (grub_vbe_set_video_mode): Mostly rewritten.
18445 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
18446 grub_vbe_status_t correctly.
18447 (grub_vbe_get_video_mode_info): Likewise.
18448 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
18449 several if statements.
18450
18451 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
18452 * commands/i386/pc/vbeinfo.c: ... this.
18453
18454 * commands/i386/pc/vbe_test.c: Renamed to ...
18455 * commands/i386/pc/vbetest.c: ... this.
18456
18457 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
18458 ...
18459 (grub_cmd_vbeinfo): ... this. Save video modes before
18460 iterating. Skip a video mode, if it is not available, not enough
18461 information is given or it is monochrome. Show the memory
18462 model. Leave the interpretation of MODEVAR to grub_strtoul
18463 completely.
18464 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
18465 (GRUB_MOD_FINI): Likewise.
18466
18467 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
18468 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
18469 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
18470 duplicated grub_env_get. Leave the interpretation of MODEVAR to
18471 grub_strtoul completely.
18472 (real2pm): Removed.
18473 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
18474 (GRUB_MOD_FINI): Likewise.
18475
18476 * normal/misc.c: Include grub/mm.h.
18477
18478 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
18479 vbe_list_modes with vbetest.mod and vbeinfo.mod.
18480 (vbe_list_modes_mod_SOURCES): Removed.
18481 (vbe_list_modes_mod_CFLAGS): Likewise.
18482 (vbe_test_mod_SOURCES): Likewise.
18483 (vbe_test_mod_CFLAGS): Likewise.
18484 (vbeinfo_mod_SOURCES): New variable.
18485 (vbeinfo_mod_CFLAGS): Likewise.
18486 (vbetest_mod_SOURCES): Likewise.
18487 (vbetest_mod_CFLAGS): Likewise.
18488
992ffbbe 184892005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
18490
18491 * normal/misc.c: New file.
18492
18493 * DISTLIST: Added normal/misc.c.
f19dbdb7 18494
992ffbbe 18495 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
18496 DISK to HOOK. Call HOOK with DISK.
18497 * partmap/apple.c (apple_partition_map_iterate): Likewise.
18498 * partmap/pc.c (pc_partition_map_iterate): Likewise.
18499 * partmap/sun.c (sun_partition_map_iterate): Likewise.
18500
18501 * normal/menu_entry.c (struct screen): Added a new member
18502 "completion_shown".
18503 (completion_buffer): New global variable.
18504 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
18505 (store_completion): New function.
18506 (complete): Likewise.
18507 (clear_completions): Likewise.
18508 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
18509 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
18510 a tab, call complete.
18511
18512 * normal/completion.c (disk_dev): Removed.
18513 (print_simple_completion): Likewise.
18514 (print_partition_completion): Likewise.
18515 (print_func): New global variable.
18516 (add_completion): Do not take the arguments WHAT or PRINT any
18517 longer. Added a new argument TYPE. Instead of printing directly,
18518 call PRINT_FUNC if not NULL.
18519 All callers changed.
18520 (complete_device): Use a local variable DEV instead of
18521 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
18522 (grub_normal_do_completion): Take a new argument HOOK. Do not
18523 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
18524 empty string, return NULL instead.
18525 All callers changed.
18526
18527 * normal/cmdline.c (print_completion): New function.
18528
18529 * kern/partition.c (grub_partition_iterate): Add an argument DISK
18530 to HOOK.
18531 All callers changed.
18532
18533 * kern/disk.c (grub_print_partinfo): Removed.
18534
18535 * include/grub/partition.h (struct grub_partition_map): Add a new
18536 argument DISK into HOOK of ITERATE.
18537 (grub_partition_iterate): Add a new argument DISK to HOOK.
18538
18539 * include/grub/normal.h (enum grub_completion_type): New enum.
18540 (grub_completion_type_t): New type.
18541 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
18542 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
18543 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
18544 (GRUB_COMPLETION_TYPE_FILE): Likewise.
18545 (grub_normal_do_completion): Added a new argument HOOK.
18546 (grub_normal_print_device_info): New prototype.
18547
18548 * include/grub/disk.h (grub_print_partinfo): Removed.
18549
18550 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
18551 (normal_mod_SOURCES): Likewise.
18552 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
18553 (normal_mod_SOURCES): Likewise.
18554
18555 * commands/ls.c (grub_ls_list_disks): Use
18556 grub_normal_print_device_info instead of grub_print_partinfo. Free
18557 PNAME.
18558 (grub_ls_list_files): Use grub_normal_print_device_info instead of
18559 duplicating the code.
18560
0bd41162 185612005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
18562
18563 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 18564 follow GCS more precisely.
18565 * commands/i386/pc/vbe_test.c: Likewise.
18566 * include/grub/i386/pc/vbe.h: Likewise.
18567 * term/i386/pc/vesafb.c: Likewise.
18568 * video/i386/pc/vbe.c: Likewise.
0bd41162 18569
6323696a 185702005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
18571
18572 * DISTLIST: Added term/i386/pc/vesafb.c
18573 DISTLIST: Added video/i386/pc/vbe.c
18574 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
18575 DISTLIST: Added commands/i386/pc/vbe_test.c.
18576 * commands/i386/pc/vbe_list_modes.c: New file.
18577 * commands/i386/pc/vbe_test.c: Likewise.
18578 * term/i386/pc/vesafb.c: Likewise.
18579 * video/i386/pc/vbe.c: Likewise.
18580 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
18581 (grub_vbe_probe) Added prototype.
18582 (grub_vbe_set_video_mode) Likewise.
18583 (grub_vbe_get_video_mode) Likewise.
18584 (grub_vbe_get_video_mode_info) Likewise.
18585 (grub_vbe_set_pixel_rgb) Likewise.
18586 (grub_vbe_set_pixel_index) Likewise.
18587 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
18588 (pkgdata_MODULES): Added vesafb.mod.
18589 (pkgdata_MODULES): Added vbe_list_modes.mod.
18590 (pkgdata_MODULES): Added vbe_test.mod.
18591 (vbe_mod_SOURCES): Added.
18592 (vbe_mod_CFLAGS): Likewise.
18593 (vesafb_mod_SOURCES): Likewise.
18594 (vesafb_mod_CFLAGS): Likewise.
18595 (vbe_list_modes_mod_SOURCES): Likewise.
18596 (vbe_list_modes_mod_CFLAGS): Likewise.
18597 (vbe_test_mod_SOURCES): Likewise.
18598 (vbe_test_mod_CFLAGS): Likewise.
18599
0a74e62f 186002005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
18601
0a74e62f 18602 * normal/command.c (grub_command_execute): If INTERACTIVE is
18603 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
18604 CMDLINE. Disable the pager if INTERACTIVE is true.
18605 All callers are changed.
18606
18607 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
18608 before reading a config file.
18609 * normal/main.c (read_config_file): Even if a command is not
18610 found, register it if it is within an entry.
18611
18612 * util/grub-emu.c: Include sys/types.h and unistd.h.
18613 (options): Added --hold.
18614 (struct arguments): Added a new member "hold".
18615 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
18616 missing.
18617 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
18618 cleared by a debugger, if it is not zero.
18619
18620 * include/grub/normal.h (grub_command_execute): Add an argument
18621 INTERACTIVE.
18622
e51f85ae 186232005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
18624
18625 * DISTLIST: Added include/grub/i386/pc/vbe.h.
18626
e9c6f39b 186272005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
18628
18629 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
18630 program with another one, because the old one didn't detect a bug
18631 in gcc-3.4. Always use regparm 2, because the new test is still
18632 not enough for gcc-4.0. Someone must investigate a simple test
18633 case which detects a bug in gcc-4.0.
18634
8de3495c 186352005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
18636
18637 * DISTLIST: Added normal/completion.c.
18638
18639 * normal/completion.c: New file.
f19dbdb7 18640
8de3495c 18641 * term/i386/pc/console.c (grub_console_getwh): New function.
18642 (grub_console_term): Assign grub_console_getwh to getwh.
18643
18644 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
18645 function is defined in normal/completion.c as
18646 grub_normal_do_completion.
18647 (grub_cmdline_get): Use grub_normal_do_completion instead of
18648 grub_tab_complete.
18649
18650 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
18651 returns non-zero, otherwise return 0.
18652 (grub_partition_iterate): First, probe the partition map. Then,
18653 call ITERATE only for this partition map.
18654
18655 * kern/misc.c (grub_strncmp): Rewritten.
18656
18657 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
18658 returns non-zero. Otherwise return 0.
18659
18660 * include/grub/partition.h (grub_partition_map_iterate): Return
18661 int instead of void.
18662
18663 * include/grub/normal.h (grub_normal_do_completion): New prototype.
18664
18665 * include/grub/misc.h (grub_strncmp): Change the type of N to
18666 grub_size_t.
18667
18668 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
18669 of void.
18670
18671 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 18672 unsigned explicitly before comparing it with I.
8de3495c 18673
18674 * kern/main.c (grub_env_write_root): Add the attribute unused into
18675 VAR.
18676
18677 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18678 normal/completion.c.
18679 (normal_mod_SOURCES): Likewise.
18680 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
18681 (normal_mod_SOURCES): Likewise.
18682
18683 * normal/command.c (grub_iterate_commands): If ITERATE returns
18684 non-zero, return one immediately.
18685
e85e144b 186862005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
18687
18688 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
18689 * kern/i386/pc/startup.S: Updated Global Descriptor table's
18690 descriptions.
18691 (grub_vbe_get_controller_info): New function.
18692 (grub_vbe_get_mode_info): Likewise.
18693 (grub_vbe_set_mode): Likewise.
18694 (grub_vbe_get_mode): Likewise.
18695 (grub_vbe_set_memory_window): Likewise.
18696 (grub_vbe_get_memory_window): Likewise.
18697 (grub_vbe_set_scanline_length): Likewise.
18698 (grub_vbe_get_scanline_length): Likewise.
18699 (grub_vbe_set_display_start): Likewise.
18700 (grub_vbe_get_display_start): Likewise.
18701 (grub_vbe_set_palette_data): Likewise.
18702 * include/grub/i386/pc/vbe.h: New file.
18703
c46153d2 187042005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18705
18706 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
18707 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
18708 * DISTLIST: Likewise.
18709 * kern/ieee1275/of.c: Moved to ...
18710 * kern/ieee1275/ieee1275.c: ... here.
18711
0cb90c45 187122005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18713
18714 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
18715 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
18716 Pass 0 as `end' parameter to grub_strtoul().
18717
a19fb360 187182005-08-08 Hollis Blanchard <hollis@penguinppc.org>
18719
18720 * include/grub/powerpc/ieee1275/console.h: Do not include
18721 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
18722 ifdef.
18723 (grub_console_cur_color): Remove i386-specific prototype.
18724 (grub_console_real_putchar): Likewise.
18725 (grub_console_checkkey): Likewise.
18726 (grub_console_getkey): Likewise.
18727 (grub_console_getxy): Likewise.
18728 (grub_console_gotoxy): Likewise.
18729 (grub_console_cls): Likewise.
18730 (grub_console_setcursor): Likewise.
18731 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
18732 Include <grub/machine/console.h>.
18733 * term/ieee1275/ofconsole.c: Likewise.
18734
4ac9bd04 187352005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
18736
18737 * Makefile.in (LIBLZO): New variable.
18738
18739 * configure.ac: Check for LZO version 2.
18740
18741 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
18742 lzo/lzo1x.h instead of lzo1x.h.
18743
18744 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
18745 of -llzo.
18746
18747 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
18748 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
18749
18750 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
18751 copying the data from PARTITION to P.
18752
f4917dfd 187532005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18754
18755 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
18756 negative, unload the module.
18757
18758 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
18759 map is "pc_partition_map" but not "pc".
18760 (usage): Fix the description. The options are --boot-image and
18761 --core-image but not --boot-file or --core-file.
18762 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
18763 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
18764 DEFAULT_DIRECTORY.
18765
18766 * util/i386/pc/grub-install.in: Do not specify --boot-file or
18767 --core-file. Specify INSTALL_DEVICE as an argument.
18768
18769 * util/console.c: Include config.h.
18770 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
18771 [HAVE_NCURSES_H]: Include ncurses.h.
18772 [HAVE_CURSES_H]: Include curses.h.
18773 [!A_NORMAL] (A_NORMAL): Defined as zero.
18774 [!A_STANDOUT] (A_STANDOUT): Likewise.
18775
18776 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
18777 -lncurses.
18778 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
18779
18780 * configure.ac: Check for curses libraries and headers.
18781
18782 * Makefile.in (LIBCURSES): New variable.
18783
18784 * genmk.rb (Script::rule): Set the executable bits.
18785
18786 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
18787 name of the PC partition map is "pc_partition_map" but not "pc".
18788
0e143073 187892005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18790
18791 * util/i386/pc/grub-install.in (grub_probefs): New variable.
18792 (modules): Likewise.
18793 (usage): Added descriptions for --modules and --grub-probefs.
18794 Handle --modules and --grub-probefs. Save the arguments in MODULES
18795 and GRUB_PROBEFS, respectively.
18796 Auto-detect a filesystem module against GRUBDIR. If the result is
18797 empty and modules are not specified explicitly, abort the
18798 installation. Add the result to MODULES.
18799
18800 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
18801 disk/powerpc/ieee1275/ofdisk.c,
18802 include/grub/powerpc/ieee1275/init.h and
18803 term/powerpc/ieee1275/ofconsole.c.
18804 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
18805 term/ieee1275/ofconsole.c.
18806
18807 * include/grub/powerpc/ieee1275/console.h: Resurrected.
18808
18809 * COPYING: Upgraded to the latest version. Only the address of the
18810 FSF office has changed.
f19dbdb7 18811
efd6e6d5 188122005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
18813
18814 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
18815 kern/ieee1275.c with kern/ieee1275/of.c.
18816
18817 * kern/ieee1275.c: Moved to ...
18818 * kern/ieee1275/of.c: ... here.
18819
8ceafda2 188202005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
18821
18822 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 18823 readability.
8ceafda2 18824
18825 * config.guess: Updated to the latest version from gnulib.
18826 * config.sub: Likewise.
18827 * install.sh: Likewise.
18828 * mkinstalldirs: Likewise.
18829
18830 * include/grub/console.h: Removed. This file is arch-specific. Do
18831 not put this in include/grub.
18832
18833 * include/grub/i386/pc/console.h: Resurrected.
18834
18835 * util/console.c: Include grub/machine/console.h instead of
18836 grub/console.h.
18837 * util/grub-emu.c: Likewise.
18838
267f6cd9 188392005-08-04 Marco Gerards <metgerards@student.han.nl>
18840
18841 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
18842 hardcoded value.
f19dbdb7 18843
267f6cd9 18844 From Vincent Pelletier <subdino2004@yahoo.fr>
18845 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
18846 Redefined to use grub_getwh.
18847 (grub_term): New member named getwh.
18848 (grub_getwh): New prototype.
18849 * kern/term.c (grub_getwh): New function.
18850 * term/i386/pc/console.c (grub_console_getwh): New function.
18851 (grub_console_term): New member `getwh'.
18852 * term/i386/pc/vga.c (grub_vga_getwh): New function.
18853 (grub_vga_term): New member `getwh'.
0b5abe02 18854 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 18855 grub_ssize_t.
18856 (grub_ofconsole_getw): New function.
18857 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
18858 (grub_ofconsole_term): New field named getwh and new initial
18859 value.
18860
3be7266d 188612005-08-03 Hollis Blanchard <hollis@penguinppc.org>
18862
18863 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
18864 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
18865 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
18866 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
18867 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
18868 of <grub/machine/ieee1275.h>.
18869 * commands/ieee1275/reboot.c: Likewise.
18870 * boot/powerpc/ieee1275/ieee1275.c: Move ...
18871 * kern/ieee1275.c: ... to here. All users updated. Change all
18872 parameter structs to use new type `grub_ieee1275_cell_t'.
18873 * term/powerpc/ieee1275/ofconsole.c: Move ...
18874 * term/ieee1275/ofconsole.c: ... to here. All users updated.
18875 * disk/powerpc/ieee1275/ofdisk.c: Move ...
18876 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
18877 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
18878 to return int.
18879 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
18880 Remove unused prototypes. All users updated.
18881 * include/grub/powerpc/ieee1275/console.h: Removed.
18882 * include/grub/powerpc/ieee1275/ieee1275.h: Define
18883 `grub_ieee1275_cell_t'.
18884 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
18885 Cast comparisons with -1 to the correct type.
18886 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
18887 type to match `grub_ieee1275_entry_fn'.
18888
8b5f3938 188892005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
18890
18891 * DISTLIST: Added util/i386/pc/grub-probefs.c.
18892
18893 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
18894 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
18895 partmap/sun.c.
18896 (grub_probefs_SOURCES): New variable.
18897
18898 * util/i386/pc/grub-probefs.c: New file.
18899
18900 * util/i386/pc/grub-setup.c (main): Call
18901 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
18902 grub_hfs_init and grub_jfs_init to initialize the system. Call
18903 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
18904 grub_pc_partition_map_fini to finish the system.
18905
ea409713 189062005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
18907
18908 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
18909 function.
18910 (grub_multiboot_load_elf32): Likewise.
18911 (grub_multiboot_is_elf64): Likewise.
18912 (grub_multiboot_load_elf64): Likewise.
18913 (grub_multiboot_load_elf): Likewise.
18914 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
18915 an ELF32 or ELF64 file.
18916 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
18917
18918 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
18919 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
18920 NULL before calling FS->LABEL.
18921 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
18922 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
18923 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
18924 before calling FS->LABEL.
18925
141a288b 189262005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
18927
18928 * util/i386/pc/grub-install.in (datadir): New variable.
18929 (libdir): Removed.
18930 (pkgdatadir): New variable.
18931 (pkglibdir): Removed.
18932
0d5f8a54 189332005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
18934
18935 * DISTLIST: Added util/i386/pc/grub-install.in.
18936
18937 * util/i386/pc/grub-install.in: New file.
18938
18939 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
18940 (grub_install_SOURCES): Likewise.
18941
18942 * genmk.rb: Added support for scripts.
18943 (Script): New class.
18944 (scripts): New variable.
18945
18946 * Makefile.in (install-local): Install sbin_SCRIPTS by
18947 INSTALL_SCRIPT.
18948 (uninstall): Remove sbin_SCRIPTS.
18949
18950 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
18951 device, try to get a GRUB device by
18952 grub_util_biosdisk_get_grub_dev.
18953 Free DEST_DEV.
18954
18955 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
18956 description for --device-map.
18957
5f968e1e 189582005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
18959
18960 Change the semantics of variable hooks. They now return strings
18961 instead of error values.
f19dbdb7 18962
5f968e1e 18963 * util/i386/pc/grub-setup.c: Include grub/env.h.
18964 (setup): Use grub_device_set_root instead of grub_env_set.
18965
18966 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
18967 grub_env_get instead of grub_device_set_root and
18968 grub_device_get_root, respectively.
18969
18970 * kern/main.c (grub_env_write_root): New function.
18971 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
18972 grub_env_set instead of grub_device_set_root.
18973
18974 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
18975 many variables.
18976 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
18977 rather than calling ENV->WRITE_HOOK afterwards.
18978 (grub_env_get): Return the result of ENV->READ_HOOK rather than
18979 passing a pointer of a pointer.
18980 (grub_register_variable_hook): Change the types of "read_hook" and
18981 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
18982 respectively.
18983 Allocate the default empty string on the heap, because this string
18984 may be freed later.
18985
18986 * kern/device.c: Include grub/env.h.
18987 (grub_device_set_root): Removed.
18988 (grub_device_get_root): Likewise.
18989 (grub_device_open): Use grub_env_get instead of
18990 grub_device_get_root.
18991
18992 * include/grub/env.h (grub_env_read_hook_t): New type.
18993 (grub_env_write_hook_t): Likewise.
18994 (grub_env_var): Change the types of "read_hook" and "write_hook"
18995 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
18996 (grub_register_variable_hook): Likewise.
18997
18998 * include/grub/device.h (grub_device_set_root): Removed.
18999 (grub_device_set_root): Likewise.
19000
19001 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
19002 make sure that DIRNAME terminates with '/', so that
19003 grub_fat_find_dir will fail if PATH is not a directory.
19004
19005 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
19006 from DIRNAME.
19007 Use the qualifier auto for print_files and print_files_long.
19008 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
19009 as a regular file.
19010 Put a newline only if there is no error.
19011 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
19012 used.
19013
896f0afd 190142005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
19015
19016 * kern/partition.c (grub_partition_probe): Initialize PART to
19017 NULL. Otherwise, when no partition map is registered, this returns
19018 a garbage.
19019
b28b81b2 190202005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
19021
19022 * partmap/apple.c (apple_partition_map_iterate): Check if POS
19023 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
19024 valid.
19025
5f3607e0 190262005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
19027
19028 * commands/ls.c (grub_ls_list_disks): Print the filesystem
19029 information on each device, if it does not have partitions. Print
19030 "Device" instead of "Disk", because this function is not specific
19031 to disk devices.
19032
19033 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
19034 static to ensure that it is put on the memory rather than a
19035 register.
19036
502c87e8 190372005-07-17 Yoshinori Okuji <okuji@enbug.org>
19038
19039 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
19040 (grub_cat_init): Likewise.
19041 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
19042 (options): Likewise.
19043 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
19044 (grub_configfile_init): Likewise.
19045 * font/manager.c (GRUB_MOD_INIT): Likewise.
19046 * commands/help.c (GRUB_MOD_INIT): Likewise.
19047 (grub_help_init): Likewise.
19048 * normal/command.c (grub_command_init): Likewise.
19049 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
19050 * disk/loopback.c (grub_loop_init): Likewise.
19051 (GRUB_MOD_INIT): Likewise.
19052 * commands/ls.c (grub_ls_init): Likewise.
19053 (GRUB_MOD_INIT): Likewise.
19054 (options): Likewise.
19055 * commands/boot.c (grub_boot_init): Likewise.
19056 (GRUB_MOD_INIT): Likewise.
19057 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
19058 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
19059 (GRUB_MOD_INIT): Likewise.
19060 * commands/cmp.c (grub_cmp_init): Likewise.
19061 (GRUB_MOD_INIT): Likewise.
19062
19063 * normal/arg.c: Use <> instead of "" to include header files.
19064 (SHORT_ARG_HELP): New macro.
19065 (SHORT_ARG_USAGE): Likewise.
19066 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
19067 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
19068 descriptions.
19069 (find_short): Check if C is 'h' or 'u' explicitly.
19070 (grub_arg_show_help): Use space characters instead of tabs. Treat
19071 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
19072 are shown with --help and --usage only if they are not used for
19073 the command itself.
19074 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
19075 'h' and 'u'.
19076
19077 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
19078 const into "longarg". Change the type of "shortarg" to int.
19079
f806d18e 190802005-07-17 Yoshinori Okuji <okuji@enbug.org>
19081
19082 * boot/i386/pc/boot.S (boot_drive_check): New label.
19083
19084 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
19085 macro.
19086
19087 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
19088 which do not pass a boot drive correctly. Copied from GRUB Legacy.
19089
e293232b 190902005-07-17 Yoshinori Okuji <okuji@enbug.org>
19091
19092 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
19093 When turning off Gate A20, skip the check and return immediately,
19094 because this is not fatal usually.
19095
ebedfd00 190962005-07-17 Yoshinori Okuji <okuji@enbug.org>
19097
19098 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
19099 be 0x7C00 instead of 0x8000.
19100
19101 * boot/i386/pc/pxeboot.S: Rewritten.
19102
19103 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
19104 EXT_C.
19105 (gate_a20_check_state): Read a byte from 0x108000. Invert the
19106 result.
19107
654fc59f 191082005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
19109
19110 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
19111 robustness. This routine now supports a BIOS call and System
19112 Control Port A to modify the gate A20.
19113
19114 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
19115 Increased to 0x440.
19116
09f9923f 191172005-07-12 Hollis Blanchard <hollis@penguinppc.org>
19118
19119 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
19120 device path and resulting ihandle.
19121 (grub_ofdisk_close): dprintf the ihandle being closed.
19122 (grub_ofdisk_read): dprintf function parameters.
19123 * kern/mm.c (grub_mm_init_region): Likewise.
19124 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
19125 (grub_linux_boot): dprintf the Linux entry point, initrd address and
19126 size, and boot arguments.
19127 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
19128 before loading into memory.
19129 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
19130 before loading into memory.
19131
7ef504d8 191322005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
19133
19134 * kern/mm.c: Added much documentation.
19135 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
19136 8, set to 5 instead of 8.
19137
e0f050c2 191382005-07-10 Yoshinori Okuji <okuji@enbug.org>
19139
19140 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
19141
19142 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
19143 (grub_mkdevicemap_SOURCES): New variable.
19144
19145 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
19146 lib/device.c of GRUB Legacy.
19147
7224189a 191482005-07-10 Yoshinori Okuji <okuji@enbug.org>
19149
19150 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
19151 instead of PATH is NULL.
19152
68c864eb 191532005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
19154
19155 * commands/cmp.c (BUFFER_SIZE): New macro.
19156 (grub_cmd_cmp): Close the right file at the right time. Compare
19157 only data just read. Don't report files of different size as
19158 identical. Dynamically allocate buffers. Move variable
19159 declarations at the beginning of function.
19160
e6f3e614 191612005-07-09 Yoshinori Okuji <okuji@enbug.org>
19162
19163 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
19164 reverse.
19165
f8f1559a 191662004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
19167
19168 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
19169 when backspace is pressed at beginning of line.
19170
39c9d41d 191712005-07-03 Yoshinori Okuji <okuji@enbug.org>
19172
19173 * DISTLIST: Added genfslist.sh.
19174
19175 * normal/main.c (fs_module_list): New variable.
19176 (autoload_fs_module): New function.
19177 (read_fs_list): Likewise.
19178 (grub_normal_execute): Call read_fs_list.
19179
19180 * kern/fs.c (grub_fs_autoload_hook): New variable.
19181 (grub_fs_probe): Added support for auto-loading.
19182
19183 * include/grub/normal.h (struct grub_fs_module_list): New struct.
19184 (grub_fs_module_list_t): New type.
19185
19186 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
19187 (grub_fs_autoload_hook): New prototype.
19188
19189 * genfslist.sh: New file.
f19dbdb7 19190
39c9d41d 19191 * genmk.rb: Added a rule to generate a filesystem list.
19192
121c1d83 191932005-06-30 Marco Gerards <metgerards@student.han.nl>
19194
19195 * configure.ac: Fix the test for cross-compiling.
19196
19197 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
19198 define GRUB_UTIL anymore.
19199
19200 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
19201 so this function works on other systems than just big endian.
19202 (load_modules): Likewise.
19203 (add_segments): Likewise.
19204
e75d76e1 192052005-06-23 Hollis Blanchard <hollis@penguinppc.org>
19206
19207 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
19208 contains `l' modifier, get a long from va_arg().
19209
50b5a0a7 192102005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
19211
19212 * kern/mm.c (grub_free): If the next free block which is being
19213 merged is the first free block, set the first block to the block
19214 being freed.
19215 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
19216
89371b20 192172005-05-08 Hollis Blanchard <hollis@penguinppc.org>
19218
19219 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
19220 `grub_ieee1275_chosen'.
19221
168d6e58 192222005-05-08 Hollis Blanchard <hollis@penguinppc.org>
19223
19224 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
19225 (grub_ieee1275_chosen): New variable.
19226 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
19227 `chosen'.
19228 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
19229 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
19230 Rename first argument to `phandle' for consistency.
19231 (grub_ieee1275_get_property_length): Likewise.
19232 (grub_ieee1275_next_property): Likewise. Change type of first argument
19233 to grub_ieee1275_phandle_t.
19234 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
19235 Move export next to declaration.
19236 (grub_ieee1275_chosen): New variable.
19237 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
19238 Correct cosmetic typo.
19239 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
19240 `grub_ieee1275_chosen'.
19241 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
19242 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
19243 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
19244 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
19245 `grub_ieee1275_chosen'.
19246
ca5baa3f 192472005-05-10 Hollis Blanchard <hollis@penguinppc.org>
19248
19249 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
19250 /chosen/bootargs.
19251 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
19252 /chosen/bootargs as "variable=value" pairs.
19253
708b345f 192542005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
19255
19256 * include/grub/misc.h (grub_dprintf): New macro.
19257 (grub_real_dprintf): New prototype.
19258 (grub_strword): Likewise.
19259 (grub_iswordseparator): Likewise.
19260 * kern/misc.c (grub_real_dprintf): New function.
19261 (grub_strword): Likewise.
19262 (grub_iswordseparator): Likewise.
19263
f4c5e67c 192642005-04-30 Hollis Blanchard <hollis@penguinppc.org>
19265
19266 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
19267 (roundup): Remove macro.
19268 (grub_ieee1275_flags): Make static.
19269 (grub_ieee1275_realmode): Remove.
19270 (grub_ieee1275_test_flag): New function.
19271 (grub_ieee1275_set_flag): Likewise.
19272 (find_options): Rename to `grub_ieee1275_find_options'; update
19273 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
19274 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
19275 (cmain): New prototype.
19276 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
19277 `grub_ieee1275_flags' directly.
19278 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
19279 machine/biosdisk.h.
19280 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
19281 Don't include grub/machine/init.h.
19282 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
19283 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
19284 Remove prototype.
19285 (grub_ieee1275_realmode): Likewise.
19286 (grub_ieee1275_flag): New enum.
19287 (grub_ieee1275_test_flag): New prototype.
19288 (grub_ieee1275_set_flag): New prototype.
19289 * include/grub/powerpc/ieee1275/init.h: Remove file.
19290 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
19291 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
19292 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
19293 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
19294 comment.
19295 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
19296 `grub_ieee1275_test_flag'.
19297 (grub_ieee1275_encode_devname): Likewise.
19298
ed16607e 192992005-04-21 Hollis Blanchard <hollis@penguinppc.org>
19300
19301 * include/grub/powerpc/ieee1275/ieee1275.h
19302 (grub_ieee1275_encode_devname): New prototype.
19303 (grub_ieee1275_get_filename): Likewise.
19304 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
19305 function.
19306 (grub_set_prefix): Likewise.
19307 (grub_machine_init): Call grub_set_prefix.
19308 * kern/powerpc/ieee1275/openfw.c: Fix typos.
19309 (grub_parse_type): New enum.
19310 (grub_ieee1275_get_devargs): New function.
19311 (grub_ieee1275_get_devname): Likewise.
19312 (grub_ieee1275_parse_args): Likewise.
19313 (grub_ieee1275_get_filename): Likewise.
19314 (grub_ieee1275_encode_devname): Likewise.
19315
be369920 193162005-03-30 Marco Gerards <metgerards@student.han.nl>
19317
19318 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
19319 `grub_loader_unset'.
19320
a5ce3a4a 193212005-03-26 Hollis Blanchard <hollis@penguinppc.org>
19322
19323 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
19324 instead of grub_ieee1275_interpret.
19325 (grub_halt_init): New function.
19326 (grub_halt_fini): Likewise.
19327 (GRUB_MOD_INIT): Correct message grammar.
19328 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
19329 instead of grub_ieee1275_interpret.
19330 (grub_reboot_init): New function.
19331 (grub_reboot_fini): Likewise.
19332 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
19333 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
19334 util/i386/pc/misc.c with commands/ieee1275/halt.c,
19335 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
19336 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
19337 function.
19338 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
19339 Add prototype.
19340 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
19341 prototype.
19342 (grub_halt): Likewise.
19343 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
19344 (cmain): Remove __attribute__((unused)).
19345 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
19346 (grub_heap_len): Likewise.
19347 (grub_machine_fini): New function.
19348 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
19349 (grub_halt): Likewise.
19350 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
19351 function.
19352 * util/powerpc/ieee1275/misc.c: New file.
19353
0058f771 193542005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
19355
19356 * DISTLIST: New file.
19357 * gendistlist.sh: Likewise.
f19dbdb7 19358
0058f771 19359 * Makefile.in (COMMON_DISTFILES): Removed.
19360 (BOOT_DISTFILES): Likewise.
19361 (CONF_DISTFILES): Likewise.
19362 (DISK_DISTFILES): Likewise.
19363 (FS_DISTFILES): Likewise.
19364 (INCLUDE_DISTFILES): Likewise.
19365 (KERN_DISTFILES): Likewise.
19366 (LOADER_DISTFILES): Likewise.
19367 (TERM_DISTFILES): Likewise.
19368 (UTIL_DISTFILES): Likewise.
19369 (DISTFILES): Likewise.
19370 (uninstall): Uninstall files in $(pkgdata_DATA).
19371 (DISTLIST): New target.
19372 (distdir): Use the contents of the file DISTLIST to get a list of
19373 distributed files.
19374
46b3b8a5 193752005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
19376
19377 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
19378 descriptor. This is ported from GRUB Legacy.
19379
19380 * gencmdlist.sh: Added an extra semicolon to make it work with
19381 old sed versions. Reported by Robert Bihlmeyer
19382 <robbe@orcus.priv.at>.
19383
5822ff87 193842005-03-08 Yoshinori Okuji <okuji@enbug.org>
19385
19386 Automatic loading of commands is supported.
f19dbdb7 19387
5822ff87 19388 * normal/main.c (read_command_list): New function.
19389 (grub_normal_execute): Call read_command_list.
19390
19391 * normal/command.c (grub_register_command): Return zero or CMD.
19392 Allocate CMD->NAME from the heap.
19393 Initialize CMD->MODULE_NAME to zero.
19394 Find the same name as well. If the same command is found and it is
19395 a dummy command, overwrite members. If it is not a dummy command,
19396 return zero.
19397 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
19398 (grub_command_find): If a dummy command is found, load a module
19399 and retry to find a command only once.
19400
19401 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
19402 make sure that each command is loaded.
19403
19404 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
19405 macro.
19406 (struct grub_command): Remove const from the member `name'.
19407 Add a new member `module_name'.
19408 (grub_register_command): Return grub_command_t.
19409
19410 * commands/help.c (grub_cmd_help): Call grub_command_find to make
19411 sure that each command is loaded.
19412
19413 * genmk.rb (PModule::rule): Specify a module name without the
19414 suffix ".mod" to gencmdlist.sh.
19415
7b1f4b57 194162005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
19417
19418 * gencmdlist.sh: New file.
f19dbdb7 19419
7b1f4b57 19420 * genmk.rb (PModule::rule): Generate a rule for a command list.
19421 Clean command.lst.
19422 Generate command.lst from $(COMMANDFILES).
19423
19424 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
19425 (DATA): Added $(pkgdata_DATA).
19426 (install-local): Install files in $(pkgdata_DATA).
19427
062aaf39 194282005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
19429
19430 * term/i386/pc/vga.c (debug_command): Removed.
19431 (GRUB_MOD_INIT): Do not register the command "debug".
19432
19433 From Hollis Blanchard:
19434 * commands/configfile.c: New file.
19435 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
19436 commands/configfile.c.
19437 (pkgdata_MODULES): Added configfile.mod.
19438 (configfile_mod_SOURCES): New variable.
19439 (configfile_mod_CFLAGS): Likewise.
19440 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
19441 commands/configfile.c.
19442 (pkgdata_MODULES): Added configfile.mod.
19443 (configfile_mod_SOURCES): New variable.
19444 (configfile_mod_CFLAGS): Likewise.
19445 * util/grub-emu.c (main): Call grub_configfile_init and
19446 grub_configfile_fini.
19447 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
19448 prototype.
19449 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 19450
cee01aa6 194512005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
19452
19453 * normal/arg.c (grub_arg_show_help): Do not show the bug report
19454 address.
19455
19456 * commands/help.c (grub_cmd_help): Do not print newlines after
19457 the last command in print_command_help.
19458
93f3a1d8 194592005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
19460
19461 * commands/default.h: New file.
19462 * commands/timeout.h: Likewise.
19463 * normal/context.c: Likewise.
f19dbdb7 19464
93f3a1d8 19465 * util/misc.c: Do not include sys/times.h.
19466 Include sys/time.h and grub/machine/time.h.
19467 (grub_get_rtc): Rewritten with gettimeofday.
19468
19469 * util/grub-emu.c (main): Call grub_default_init and
19470 grub_timeout_init before grub_normal_init, and call
19471 grub_timeout_fini and grub_default_fini after grub_main.
19472
19473 * util/console.c (grub_ncurses_checkkey): Return the read
19474 character or -1.
19475
19476 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
19477 timeouts.
19478
19479 * normal/main.c (read_config_file): Push MENU. If this fails,
19480 print an error and wait for a user input.
19481 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
19482 If a menu is empty or an error occurs, pop MENU.
19483 (grub_normal_execute): Pop and free MENU after grub_menu_run
19484 returns.
19485
19486 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
19487
19488 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
19489 include time.h.
19490 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
19491 without GRUB_UTIL.
19492 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
19493 time.h.
19494 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
19495 without GRUB_UTIL.
19496
19497 * include/grub/normal.h (struct grub_menu_list): New struct.
19498 (grub_menu_list_t): New type.
19499 (struct grub_context): New struct.
19500 (grub_context_t): New type.
19501 (grub_register_command): Got rid of EXPORT_FUNC.
19502 (grub_unregister_command): Likewise.
19503 (grub_context_get): New prototype.
19504 (grub_context_get_current_menu): Likewise.
19505 (grub_context_push_menu): Likewise.
19506 (grub_context_pop_menu): Likewise.
19507 [GRUB_UTIL] (grub_default_init): Likewise.
19508 [GRUB_UTIL] (grub_default_fini): Likewise.
19509 [GRUB_UTIL] (grub_timeout_init): Likewise.
19510 [GRUB_UTIL] (grub_timeout_fini): Likewise.
19511
19512 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
19513 commands/timeout.c and normal/context.c.
19514 (pkgdata_MODULES): Added default.mod and timeout.mod.
19515 (normal_mod_SOURCES): Added normal/context.c.
19516 (default_mod_SOURCES): New variable.
19517 (default_mod_CFLAGS): Likewise.
19518 (timeout_mod_SOURCES): Likewise.
19519 (timeout_mod_CFLAGS): Likewise.
19520 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
19521 conf/i386-pc.rmk.
19522 (pkgdata_MODULES): Added default.mod and timeout.mod.
19523 (normal_mod_SOURCES): Added normal/context.c.
19524 (default_mod_SOURCES): New variable.
19525 (default_mod_CFLAGS): Likewise.
19526 (timeout_mod_SOURCES): Likewise.
19527 (timeout_mod_CFLAGS): Likewise.
19528
19529 * Makefile.in (all-local): Added $(MKFILES).
19530
4ed2e1dd 195312005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
19532
19533 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
19534 (grub_emu_SOURCES): Likewise.
19535 (pkgdata_MODULES): Add `sun.mod'.
19536 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
19537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
19538 `partmap/sun.c'.
19539 (pkgdata_MODULES): Add `sun.mod'.
19540 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
19541 * include/grub/partition.h (grub_sun_partition_map_init): New
19542 prototype.
19543 (grub_sun_partition_map_fini): Likewise.
19544 * partmap/sun.c: New file.
19545 * util/grub-emu.c (main): Initialize and de-initialize the sun
19546 partitionmap support.
19547
4d4e372e 195482005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
19549
19550 This implements an Emacs-like menu entry editor.
f19dbdb7 19551
4d4e372e 19552 * normal/menu_entry.c: New file.
f19dbdb7 19553
4d4e372e 19554 * util/console.c (grub_ncurses_putchar): Translate some Unicode
19555 characters to ASCII.
19556 (saved_char): New variable.
19557 (grub_ncurses_checkkey): Rewritten completely.
19558 (grub_ncurses_getkey): Likewise.
19559 (grub_ncurses_init): Call raw instead of cbreak.
19560
19561 * normal/menu.c (print_entry): Do not put a space.
19562 (init_page): Renamed to ...
19563 (grub_menu_init_page): ... this. All callers changed.
19564 (edit_menu_entry): Removed.
19565 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
19566
19567 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
19568
19569 * kern/misc.c (grub_vprintf): Call grub_refresh.
19570
19571 * normal/menu.c (DISP_LEFT): Renamed to ...
19572 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
19573 * normal/menu.c (DISP_UP): Renamed to ...
19574 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
19575 * normal/menu.c (DISP_RIGHT): Renamed to ...
19576 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
19577 * normal/menu.c (DISP_DOWN): Renamed to ...
19578 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
19579 * normal/menu.c (DISP_HLINE): Renamed to ...
19580 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
19581 * normal/menu.c (DISP_VLINE): Renamed to ...
19582 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
19583 * normal/menu.c (DISP_UL): Renamed to ...
19584 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
19585 * normal/menu.c (DISP_UR): Renamed to ...
19586 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
19587 * normal/menu.c (DISP_LL): Renamed to ...
19588 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
19589 * normal/menu.c (DISP_LR): Renamed to ...
19590 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
19591 * normal/menu.c (TERM_WIDTH): Renamed to ...
19592 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
19593 * normal/menu.c (TERM_HEIGHT): Renamed to ...
19594 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
19595 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
19596 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
19597 * normal/menu.c (TERM_MARGIN): Renamed to ...
19598 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
19599 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
19600 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
19601 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
19602 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
19603 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
19604 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
19605 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
19606 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
19607 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
19608 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
19609 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
19610 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
19611 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
19612 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
19613 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
19614 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
19615 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
19616 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
19617 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
19618 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
19619 All callers changed.
19620
19621 * include/grub/normal.h: New prototype.
19622
19623 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
19624 normal/menu_entry.c.
19625 (normal_mod_SOURCES): Likewise.
19626 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
19627 (normal_mod_SOURCES): Likewise.
19628
e6b92c8a 196292005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
19630
19631 * include/grub/normal.h (grub_halt_init): New prototype.
19632 (grub_halt_fini): Likewise.
19633 (grub_reboot_init): Likewise.
19634 (grub_reboot_fini): Likewise.
19635
19636 * util/grub-emu.c: Include signal.h.
19637 (main_env): New global variable.
19638 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
19639 catch C-c.
19640 (grub_machine_fini): New function.
19641 (main): Call grub_halt_init and grub_reboot_init before
19642 grub_main, and grub_reboot_fini and grub_halt_fini after it.
19643 Call setjmp with MAIN_ENV to go back afterwards.
19644 Call grub_machine_fini right before return.
19645
19646 * include/grub/util/misc.h: Include setjmp.h.
19647 (main_env): New prototype.
19648
19649 * include/grub/kernel.h (grub_machine_fini): New prototype.
19650 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
19651 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
19652
19653 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
19654 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
19655 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 19656
e6b92c8a 19657 * util/i386/pc/misc.c: New file.
f19dbdb7 19658
e6b92c8a 19659 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
19660 util/i386/pc/misc.c, commands/i386/pc/halt.c and
19661 commands/i386/pc/reboot.c.
19662
c642636f 196632005-02-14 Guillem Jover <guillem@hadrons.org>
19664
19665 * include/grub/dl.h (grub_dl_check_header): New prototype.
19666 (grub_arch_dl_check_header): Change return type to grub_err_t,
19667 remove size parameter and export function. Update all callers.
19668 * kern/dl.c (grub_dl_check_header): New function.
19669 (grub_dl_load_core): Use `grub_dl_check_header' instead of
19670 `grub_arch_dl_check_header'. Check ELF type. Check if sections
19671 are inside the core.
19672 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
19673 independent ELF header checks.
19674 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
19675 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
19676 `grub_dl_check_header' instead of explicit checks. Check for the
19677 ELF type.
19678 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
19679 `grub_dl_check_header' instead of explicit checks. Remove arch
19680 specific ELF header checks.
19681
e6b92c8a 19682 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
19683 argument SIZE.
19684
5eabe94b 196852005-02-13 Hollis Blanchard <hollis@penguinppc.org>
19686
19687 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
19688 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
19689
1b14a681 196902005-02-12 Hollis Blanchard <hollis@penguinppc.org>
19691
19692 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 19693 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 19694 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 19695 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 19696 * partmap/amiga.c (amiga_partition_map_iterate): Return
19697 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
19698 * partmap/apple.c (apple_partition_map_iterate): Likewise.
19699
aca108aa 197002005-02-01 Guillem Jover <guillem@hadrons.org>
19701
19702 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
19703 help info.
19704
c9f9c556 197052005-01-31 Marco Gerards <metgerards@student.han.nl>
19706
19707 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
19708 Removed prototype.
19709 (grub_rescue_cmd_linux): New prototype.
19710 (grub_rescue_cmd_initrd): Likewise.
19711 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
19712 `bi_rec'.
19713 (grub_linux_release_mem): Release the memory for the initrd.
19714 (grub_load_linux): Renamed from this...
19715 (grub_rescue_cmd_linux): ...To this. Changed all callers.
19716 Changed `entry' not to be static. Loop over memory regions to
19717 find another one when the default fails.
19718 (grub_rescue_cmd_initrd): New function.
19719 (grub_linux_init): Remove function.
19720 (grub_linux_fini): Likewise.
19721 (GRUB_MOD_INIT): Register `initrd'.
19722 (GRUB_MOD_FINI): Unregister `initrd'.
19723 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
19724 Function removed.
19725 (grub_linux_normal_fini): Likewise.
19726 (GRUB_MOD_INIT): Register `initrd'.
19727 (GRUB_MOD_FINI): Unregister `initrd'.
19728
990cf3aa 197292005-01-31 Marco Gerards <metgerards@student.han.nl>
19730
19731 * commands/help.c: New file.
19732 * normal/arg.c (show_help): Renamed to...
19733 (grub_arg_show_help): ... this.
19734 * commands/i386/pc/halt.c: New file.
19735 * commands/i386/pc/reboot.c: Likewise.
19736 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
19737 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
19738 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
19739 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
19740 variables.
19741 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
19742 `commands/help.c'.
19743 (pkgdata_MODULES): Add `help.mod'.
19744 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
19745 * grub/i386/pc/init.h (grub_reboot): New prototype.
19746 (grub_halt): Likewise.
19747 * include/grub/normal.h (grub_arg_show_help): New prototype.
19748 (grub_help_init): Likewise.
19749 (grub_help_fini): Likewise.
19750 * util/grub-emu.c (main): Initialize and deinitialize the help
19751 command.
19752
19753 * normal/cmdline.c (grub_cmdline_get): Doc fix.
19754
19755 * normal/command.c (grub_command_init): Fixed the description of
19756 the `set' and `unset' commands.
19757
197582005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 19759
19760 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
19761 function.
19762 * commands/ieee1275/halt.c: New file.
19763 * commands/ieee1275/reboot.c: Likewise.
19764 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
19765 `__attribute__ ((unused))'. Some GCS related fixed.
19766 (grub_suspend_init) [GRUB_UTIL]: Function removed.
19767 (grub_suspend_fini): Likewise.
19768 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
19769 and `halt.mod'.
19770 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
19771 (halt_mod_CFLAGS): New variables.
19772 * include/grub/powerpc/ieee1275/ieee1275.h
19773 (grub_ieee1275_interpret): New prototype.
19774
1ab09cc7 197752005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
19776
19777 * include/grub/misc.h (memmove): New prototype.
19778 (memcpy): Likewise.
19779
8b8cbdb2 197802005-01-22 Hollis Blanchard <hollis@penguinppc.org>
19781
19782 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
19783 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
19784
e3741a27 197852005-01-22 Marco Gerards <metgerards@student.han.nl>
19786
19787 * kern/misc.c (grub_strndup): Function rewritten.
19788
776bd780 197892005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
19790
19791 * normal/menu.c (TERM_WIDTH): Macro redefined.
19792 (TERM_TOP_BORDER_Y): Likewise.
19793 (draw_border): Replaced while-loop by a for-loop. Make the number
19794 of lines consistent with the number of lines displayed in
19795 print_entries. Added a margin below the rectangle.
19796 (print_entry): Make the entry fit in the rectangle.
19797 (print_entries): Display the scroll arrows next to the right
19798 border.
19799
78026bce 198002005-01-21 Marco Gerards <metgerards@student.han.nl>
19801
19802 * fs/minix.c (grub_minix_find_file): Reserve more space for
19803 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
19804 `grub_strncpy' to copy `path' into it.
19805
67bbaf0f 198062005-01-21 Marco Gerards <metgerards@student.han.nl>
19807
19808 Add the loopback device, a device via which files can be accessed
19809 as devices.
f19dbdb7 19810
67bbaf0f 19811 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
19812 (pkgdata_MODULES): Add loopback.mod.
19813 (loopback_mod_SOURCES): New variable.
19814 (loopback_mod_CFLAGS): Likewise.
19815 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
19816 `disk/loopback.c'.
19817 (pkgdata_MODULES): Add loopback.mod.
19818 (loopback_mod_SOURCES): New variable.
19819 (loopback_mod_CFLAGS): Likewise.
19820 * disk/loopback.c: new file.
19821 * include/grub/normal.h (grub_loop_init): New prototype.
19822 (grub_loop_fini): New prototype.
19823 * util/grub-emu.c (main): Initialize and de-initialize loopback
19824 support.
19825 * include/grub/disk.h (grub_disk_dev_id): Add
19826 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
19827
6f1c18bd 198282005-01-20 Hollis Blanchard <hollis@penguinppc.org>
19829
19830 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
19831 function.
19832 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
19833 (suspend_mod_SOURCES): New variable.
19834 (suspend_mod_CFLAGS): Likewise.
19835 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
19836 New prototype.
19837 * commands/ieee1275/suspend.c: New file.
19838
b38551da 198392005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
19840
19841 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 19842 ((unused))' to `__attribute__ ((used))'.
b38551da 19843 (GRUB_MOD_FINI): Likewise.
19844 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
19845 * genmk.rb (PModule): Assign space to common symbols when linking
19846 modules.
19847
777aff39 198482005-01-20 Marco Gerards <metgerards@student.han.nl>
19849
19850 * include/grub/mm.h (grub_mm_init_region): Change the type of the
19851 `unsigned' arguments to `grub_size_t'.
19852 (grub_malloc): Likewise.
19853 (grub_realloc): Likewise.
19854 (grub_memalign): Likewise.
19855 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
19856 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
19857 * util/misc.c (grub_malloc): Likewise.
19858 (grub_realloc): Likewise.
19859 * kern/mm.c (get_header_from_pointer): Change the casts to
19860 `unsigned' into a cast to `grub_size_t'.
19861
19862 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
19863 point to `currnode' when `currnode' is changed.
19864
19865 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
19866 Schottelius <nico-linux@schottelius.org>.
19867
d0ff18e1 198682005-01-09 Hollis Blanchard <hollis@penguinppc.org>
19869
19870 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
19871 (note_path): Remove variable.
19872 (GRUB_IEEE1275_NOTE_NAME): New macro.
19873 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
19874 (grub_ieee1275_note_hdr): New structure.
19875 (grub_ieee1275_note_desc): Likewise.
19876 (grub_ieee1275_note): Likewise.
19877 (load_note): Remove `dir' argument. All callers updated. Remove
19878 `note_img' and `path'. Do not load a file from `note_path'.
19879 Initialize a struct grub_ieee1275_note and write that to `out'.
19880 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
19881
4ca7004c 198822005-01-05 Marco Gerards <metgerards@student.han.nl>
19883
19884 * util/misc.c (grub_util_read_image): Revert last change. It
19885 called `grub_util_read_at', which seeks from the beginning of the
19886 file.
19887
0b412211 198882005-01-04 Hollis Blanchard <hollis@penguinppc.org>
19889
19890 * TODO: Add note about endianness in grub-mkimage.
19891 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
19892 section.
19893 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
19894 (grub_mkimage_SOURCES): New target.
19895 * include/grub/kernel.h (grub_start_addr): Remove variable.
19896 (grub_end_addr): Likewise.
19897 (grub_total_module_size): Likewise.
19898 (grub_kernel_image_size): Likewise.
19899 (GRUB_MODULE_MAGIC): New constant.
19900 (grub_module_info): New structure.
19901 (grub_arch_modules_addr): New prototype.
19902 (grub_get_end_addr): Remove prototype.
19903 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
19904 * include/grub/powerpc/ieee1275/kernel.h: New file.
19905 * include/grub/util/misc.h (grub_util_get_fp_size): New
19906 prototype.
19907 (grub_util_read_at): Likewise.
19908 (grub_util_write_image_at): Likewise.
19909 * kern/main.c (grub_get_end_addr): Remove function.
19910 (grub_load_modules): Call grub_arch_modules_addr instead of using
19911 grub_end_addr. Look for a grub_module_info struct in memory. Use
19912 the grub_module_info fields instead of calling grub_get_end_addr
19913 as loop conditions. Move grub_add_unused_region code here.
19914 (grub_add_unused_region): Remove function.
19915 * kern/i386/pc/init.c: Include grub/cache.h.
19916 (grub_machine_init): Remove call to grub_get_end_addr. Remove
19917 one call to add_mem_region.
19918 (grub_arch_modules_addr): New function.
19919 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
19920 (grub_total_module_size): Likewise.
19921 Include grub/machine/kernel.h.
19922 (grub_arch_modules_addr): New function.
19923 * util/grub-emu.c (grub_end_addr): Remove variable.
19924 (grub_total_module_size): Likewise.
19925 (grub_arch_modules_addr): New function.
19926 * util/misc.c: Include unistd.h.
19927 (grub_util_get_fp_size): New function.
19928 (grub_util_read_at): Likewise.
19929 (grub_util_write_image_at): Likewise.
19930 (grub_util_read_image): Call grub_util_read_at.
19931 (grub_util_write_image): Call grub_util_write_image_at.
19932 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
19933 additional memory in kernel_img for a struct grub_module_info.
19934 Fill in that grub_module_info.
19935 * util/powerpc/ieee1275/grub-mkimage.c: New file.
19936
458786f8 199372005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19938
19939 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
19940 New function.
19941 * include/grub/powerpc/ieee1275/ieee1275.h
19942 (grub_ieee1275_milliseconds): New prototype.
19943 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
19944 Change to 1000.
19945 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
19946 grub_ieee1275_milliseconds.
19947
ac507d1b 199482005-01-03 Hollis Blanchard <hollis@penguinppc.org>
19949
19950 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
19951 variable.
19952 (find_options): New function.
19953 (cmain): Call find_options.
19954 * include/grub/powerpc/ieee1275/ieee1275.h
19955 (grub_ieee1275_realmode): New extern variable.
19956 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
19957 grub_map if grub_ieee1275_realmode is false.
19958
6b8fd1c4 199592004-12-29 Marco Gerards <metgerards@student.han.nl>
19960
19961 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
19962 lines are inserted and make it work like readline. Reported by
19963 Vincent Pelletier <subdino2004@yahoo.fr>.
19964
8514a1e0 199652004-12-28 Marco Gerards <metgerards@student.han.nl>
19966
19967 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
19968
19969 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
19970 `kern/powerpc/cache.S'.
19971
924b6140 199722004-12-27 Marco Gerards <metgerards@student.han.nl>
19973
19974 * genmk.rb: Handle the `Program' class in the main loop. Written
19975 by Johan Rydberg <jrydberg@gnu.org>.
19976 (Program): New class.
19977 (programs): New variable.
19978 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
19979 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
19980 instead of "grub/kernel.h". Include <grub/machine/init.h>.
19981 (help_arch): Function removed.
19982 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
19983 `powerpc/libgcc.h' and `loader.h'.
19984 (pkgdata_PROGRAMS): New variable.
19985 (sbin_UTILITIES): Variable removed.
19986 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
19987 (grubof_SOURCES): Variable re-defined so it only includes the
19988 core functionality.
19989 (grubof_CFLAGS): Remove `-DGRUBOF'.
19990 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
19991 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
19992 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
19993 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
19994 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
19995 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
19996 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
19997 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
19998 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
19999 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
20000 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
20001 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
20002 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
20003 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
20004 (pc_mod_CFLAGS): New variables.
20005 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
20006 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
20007 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
20008 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
20009 Moved from here...
20010 * include/grub/i386/pc/init.h (grub_os_area_addr)
20011 (rub_os_area_size): ... to here.
20012 * include/grub/powerpc/ieee1275/ieee1275.h
20013 (grub_ieee1275_entry_fn): Export symbol.
20014 * include/grub/powerpc/ieee1275/init.h: New file.
20015 * include/grub/powerpc/libgcc.h: Likewise.
20016 * include/grub/cache.h: Likewise.
20017 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
20018 <hollis@penguinppc.org>.
20019 * kern/dl.c: Include <grub/cache.h>.
20020 (grub_dl_flush_cache): New function.
20021 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
20022 for this module.
20023 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
20024 (grub_console_init): Removed prototypes.
20025 (grub_machine_init): Don't initialize the modules anymore.
20026 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
20027 static.
20028 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
20029 Macro undef removed.
20030 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
20031 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
20032 relocation `R_PPC_REL32'. Return an error when the relocation is
20033 unknown.
20034 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
20035 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
20036 * util/misc.c (grub_arch_sync_caches): Likewise.
20037
e4b47e0c 200382004-12-19 Marco Gerards <metgerards@student.han.nl>
20039
20040 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
20041 `symlist.c', add `grubof_symlist.c'.
20042 (symlist.c): Variable removed.
20043 (grubof_HEADERS): Variable added.
20044 (grubof_symlist.c): New target.
20045 (kernel_syms.lst): Use `grubof_HEADERS' instead of
20046 `kernel_img_HEADERS'.
20047 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
20048 * kern/powerpc/dl.c: New file.
20049 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
20050 Function removed.
20051 (grub_arch_dl_relocate_symbols): Likewise.
20052 (grub_register_exported_symbols): Likewise.
20053
4ceb3636 200542004-12-13 Marco Gerards <metgerards@student.han.nl>
20055
20056 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
20057 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
20058 to fail instead. Reported by Vincent Pelletier
20059 <subdino2004@yahoo.fr>.
20060
20061 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
20062 it is not allocated. Reported by Vincent Pelletier
20063 <subdino2004@yahoo.fr>.
20064
20065 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
20066 output so the output looks better.
f19dbdb7 20067
3f1578fe 200682004-12-04 Marco Gerards <metgerards@student.han.nl>
20069
20070 Modulize the partition map support and add support for the amiga
20071 partition map.
f19dbdb7 20072
3f1578fe 20073 * commands/ls.c: Include <grub/partition.h> instead of
20074 <grub/machine/partition.h>.
20075 * kern/disk.c: Likewise.
20076 * kern/rescue.c: Likewise.
20077 * loader/i386/pc/chainloader.c: Likewise.
20078 * normal/cmdline.c: Likewise.
20079 * kern/powerpc/ieee1275/init.c: Likewise.
20080 (grub_machine_init): Call `grub_pc_partition_map_init',
20081 `grub_amiga_partition_map_init' and
20082 `grub_apple_partition_map_init'.
20083 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
20084 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
20085 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
20086 `partition.h' and `pc_partition.h'.
20087 (grub_setup_SOURCES): Remove
20088 `disk/i386/pc/partition.c'. Add `kern/partition.c',
20089 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
20090 (grub_emu_SOURCES): Likewise.
20091 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
20092 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
20093 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
20094 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
20095 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
20096 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
20097 (grubof_SOURCES): Likewise.
20098 * disk/i386/pc/partition.c: File removed.
20099 * disk/powerpc/ieee1275/partition.c: Likewise.
20100 * include/grub/powerpc/ieee1275/partition.h: Likewise.
20101 * include/grub/i386/pc/partition.h: Likewise.
20102 * kern/partition.c: New file.
20103 * partmap/amiga.c: Likewise.
20104 * partmap/apple.c: Likewise.
20105 * partmap/pc.c: Likewise.
20106 * include/grub/partition.h: Likewise..
20107 * include/grub/pc_partition.h: Likewise.
20108 * util/grub-emu.c: Include <grub/partition.h> instead of
20109 <grub/machine/partition.h>.
20110 (main): Call `grub_pc_partition_map_init',
20111 `grub_amiga_partition_map_init' and
20112 `grub_apple_partition_map_init' and deinitialize afterwards.
20113 * util/i386/pc/biosdisk.c: Include `#include
20114 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
20115 `<grub/machine/partition.h>'.
20116 * util/i386/pc/grub-setup.c: Likewise.
20117 * util/i386/pc/biosdisk.c: Likewise.
20118 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
20119 partition information in case of a PC partition.
20120 * util/i386/pc/grub-setup.c: Include `#include
20121 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
20122 `<grub/machine/partition.h>'.
20123 (setup): Only access the PC specific partition information in case
20124 of a PC partition.
20125
0ef4ced9 201262004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 20127
0ef4ced9 20128 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
20129 (grub_longjmp): Likewise.
20130 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
20131 20.
20132 * normal/powerpc/setjmp.S: New file.
20133 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
20134 `normal/powerpc/setjmp.S'.
20135 (grubof_CFLAGS): Add `-DGRUBOF'.
20136 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
20137 [GRUB_UTIL && !GRUBOF].
f19dbdb7 20138
19950e29 201392004-11-16 Marco Gerards <metgerards@student.han.nl>
20140
20141 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
20142 property named `name'. Correctly handle the error returned by
20143 `grub_ieee1275_finddevice' if a device can not be opened.
20144
a2fea427 201452004-11-02 Hollis Blanchard <hollis@penguinppc.org>
20146
20147 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
20148 `actual' for negativity.
20149 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
20150 kern/fshelp.c.
20151
41ea0ea3 201522004-11-01 Marco Gerards <metgerards@student.han.nl>
20153
20154 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
20155 (PAGE_OFFSET): New macro.
20156 (CRTC_ADDR_PORT): Likewise.
20157 (CRTC_DATA_PORT): Likewise.
20158 (START_ADDR_HIGH_REGISTER): Likewise.
20159 (START_ADDR_LOW_REGISTER): Likewise.
20160 (GRAPHICS_ADDR_PORT): Likewise.
20161 (GRAPHICS_DATA_PORT): Likewise.
20162 (READ_MAP_REGISTER): Likewise.
20163 (INPUT_STATUS1_REGISTER): Likewise.
20164 (INPUT_STATUS1_VERTR_BIT): Likewise.
20165 (page): New variable.
20166 (wait_vretrace): New function.
20167 (set_read_map): Likewise.
20168 (set_start_address): Likewise.
20169 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
20170 the right page.
20171 (check_vga_mem): Take the page into account.
20172 (write_char): Likewise.
20173 (write_cursor): Likewise.
20174 (scroll_up): Likewise. Copy the page to the page that is not
20175 shown and switch between both pages.
20176 (grub_vga_putchar): Fix off by one error.
20177 (grub_vga_cls): Wait for the vertical retrace. Take the page into
20178 account.
20179
ad0bd20b 201802004-11-01 Marco Gerards <metgerards@student.han.nl>
20181
20182 Add support for iso9660 (including rockridge).
f19dbdb7 20183
ad0bd20b 20184 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
20185 (iso9660_mod_SOURCES): New variable.
20186 (iso9660_mod_CFLAGS): Likewise.
20187 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
20188 * include/grub/fs.h (grub_iso9660_init): New prototype.
20189 * util/grub-emu.c (main): Call `grub_iso9660_init'.
20190 * fs/iso9660.c: New file.
20191
20192 * include/grub/misc.h (grub_strncat): New prototype.
20193 * kern/misc.c (grub_strncat): New function.
f19dbdb7 20194
ad0bd20b 20195 * fs/hfs.c (grub_hfs_mount): Translate the error
20196 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
20197 * fs/jfs.c (grub_jfs_mount): Likewise.
20198 * fs/ufs.c (grub_ufs_mount): Likewise.
20199
a5477a59 202002004-10-28 Hollis Blanchard <hollis@penguinppc.org>
20201
20202 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
20203 which initialized BAT registers.
20204 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
20205 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
20206 Move from here...
20207 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
20208 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
20209 ... to here.
20210 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
20211 (grub_mapclaim): Likewise.
20212 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
20213 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
20214 hand.
20215
9304c1f8 202162004-10-19 Hollis Blanchard <hollis@penguinppc.org>
20217
20218 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
20219 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
20220 -ffreestanding and -msoft-float.
20221
86f4ae25 202222004-10-15 Hollis Blanchard <hollis@penguinppc.org>
20223
20224 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
20225 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
20226 set in grub_ieee1275_flags.
20227
38912228 202282004-10-14 Hollis Blanchard <hollis@penguinppc.org>
20229
20230 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
20231 prototype.
20232 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
20233 grub_console_init first.
20234 Change the memory range used for grub_ieee1275_claim and
20235 grub_mm_init_region.
20236 Print an error message if the claim fails.
20237 Include <grub/misc.h>.
20238
d1923dc8 202392004-10-13 Hollis Blanchard <hollis@penguinppc.org>
20240
20241 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
20242 Call grub_children_iterate for device nodes of type `scsi',
20243 `ide', or `ata'.
20244 (grub_ofdisk_open): Remove manual device alias resolution.
20245 Fix memory leak when device cannot be opened.
f19dbdb7 20246 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 20247 (grub_children_iterate): New prototype.
20248 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
20249 New function.
20250 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
20251 Return -1 if args.size was -1.
20252
4512e4f3 202532004-10-11 Hollis Blanchard <hollis@penguinppc.org>
20254
20255 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
20256 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
20257 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
20258 Open Firmware's memory for it; claim memory from _start to _end.
20259 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
20260 (_end): New extern.
20261 (_start): Zero BSS from __bss_start to _end.
20262 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
20263 New extern.
20264 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
20265
4d61feb0 202662004-10-11 Hollis Blanchard <hollis@penguinppc.org>
20267
ad0bd20b 20268 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
20269 -1 if args.base was -1.
4d61feb0 20270
026fa2f9 202712004-10-08 Hollis Blanchard <hollis@penguinppc.org>
20272
20273 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
20274 escape sequence instead of a literal ^L. Also call
20275 grub_ofconsole_gotoxy.
20276
9f2220ef 202772004-10-03 Hollis Blanchard <hollis@penguinppc.org>
20278
20279 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
20280 void * arguments to grub_addr_t. All callers updated. Also make
20281 the `result' argument optional.
20282 (grub_ieee1275_release): change void * arguments to grub_addr_t.
20283 All callers updated.
20284
8a572cd7 202852004-09-22 Hollis Blanchard <hollis@penguinppc.org>
20286
20287 * commands/ls.c (grub_ls_list_files): Use the string following the
20288 initial ')', if present, as the filesystem path.
20289 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
20290
20291 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
20292
18aa81f2 202932004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
20294
20295 Make the source code of the menu interface more readable.
f19dbdb7 20296
18aa81f2 20297 * normal/menu.c: Include grub/mm.h.
20298 (TERM_WIDTH): New macro.
20299 (TERM_HEIGHT): Likewise.
20300 (TERM_INFO_HEIGHT): Likewise.
20301 (TERM_MARGIN): Likewise.
20302 (TERM_SCROLL_WIDTH): Likewise.
20303 (TERM_TOP_BORDER_Y): Likewise.
20304 (TERM_LEFT_BORDER_X): Likewise.
20305 (TERM_BORDER_WIDTH): Likewise.
20306 (TERM_MESSAGE_HEIGHT): Likewise.
20307 (TERM_BORDER_HEIGHT): Likewise.
20308 (TERM_NUM_ENTRIES): Likewise.
20309 (TERM_FIRST_ENTRY_Y): Likewise.
20310 (TERM_ENTRY_WIDTH): Likewise.
20311 (TERM_CURSOR_X): Likewise.
20312 (draw_border): Use macros instead of magic numbers.
20313 (print_entry): Likewise.
20314 (print_entries): Likewise.
20315 (run_menu): Likewise. Also, handle the key 'e'.
20316 (run_menu_entry): Ignore empty command lines.
20317 (print_message): Added a new argument EDIT. If EDIT is true,
20318 print a different message.
20319 (init_page): Likewise.
20320 (edit_menu_entry): New function. Not implemented yet.
20321
b47efe30 203222004-09-17 Marco Gerards <metgerards@student.han.nl>
20323
20324 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
20325 can be loaded from normal mode.
f19dbdb7 20326
b47efe30 20327 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
20328 `multiboot.mod'.
20329 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
20330 (multiboot_mod_CFLAGS): New variables.
20331 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 20332 * loader/i386/pc/multiboot_normal.c: Likewise.
20333
b47efe30 20334 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
20335 attribute `unused'.
f19dbdb7 20336
b47efe30 20337 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
20338 `fdiro' to read the mode information from instead of `diro'.
20339
20340 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
20341 looking up a symlink.
20342
20343 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
20344 macro.
20345 * normal/command.c (grub_command_execute): Don't parse the
20346 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
20347 flags of the command.
20348
20349 * normal/menu.c (grub_menu_run): Fix typo.
20350
da75ac71 203512004-09-14 Hollis Blanchard <hollis@penguinppc.org>
20352
20353 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
20354
20355 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
20356 `y + 1' instead of `y - 1'.
20357
20358 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 20359
062b24c2 203602004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
20361
20362 From Hollis Blanchard <hollis@penguinppc.org>:
20363 * kern/misc.c (memmove): New alias for grub_memmove.
20364 (memcmp): New alias for grub_memcmp.
20365 (memset): New alias for grub_memset.
f19dbdb7 20366 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 20367 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 20368 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 20369 (grub_ieee1275_get_property): Likewise.
f19dbdb7 20370
8ddad845 203712004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
20372
20373 Added normal mode command `chainloader' as module chain.mod, which
20374 depends on normal.mod and _chain.mod.
f19dbdb7 20375
8ddad845 20376 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
20377 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
20378 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
20379 Deleted prototype.
20380 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
20381 but arguments parsing moved to ...
20382 (grub_chainloader_cmd): ... here. New function.
20383 * include/grub/i386/pc/chainloader.h: New file.
20384 * loader/i386/pc/chainloader_normal.c: Likewise.
20385
2c1f4ce3 203862004-09-11 Marco Gerards <metgerards@student.han.nl>
20387
20388 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
20389 (grub_mkimage_LDFLAGS): Likewise.
20390 (grub_emu_SOURCES): Likewise.
20391 (kernel_img_HEADERS): Added fshelp.h.
20392 * fs/ext2.c: Include <grub/fshelp.h>.
20393 (FILETYPE_REG): New macro.
20394 (FILETYPE_INO_REG): Likewise.
20395 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
20396 Changed all users.
20397 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
20398 all users.
20399 (grub_fshelp_node): New struct.
20400 (grub_ext2_data): Added member `diropen'. Changed member `inode'
20401 to a pointer.
20402 (grub_ext2_get_file_block): Removed function.
20403 (grub_ext2_read_block): New function.
20404 (grub_ext2_read_file): Replaced parameter `data' by `node'.
20405 This function was written.
20406 (grub_ext2_mount): Read the root inode. Create a diropen struct.
20407 (grub_ext2_find_file): Removed function.
20408 (grub_ext2_read_symlink): New function.
20409 (grub_ext2_iterate_dir): Likewise.
20410 (grub_ext2_open): Rewritten.
20411 (grub_ext2_dir): Rewritten.
20412 * include/grub/fshelp.h: New file.
20413 * fs/fshelp.c: Likewise.
20414
3c52136a 204152004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
20416
20417 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
20418 (print_message): Add a missing newline.
20419 (run_menu): Added timeout support.
20420 (run_menu_entry): New local function.
20421 (grub_menu_run): Added support for booting.
20422
20423 * kern/loader.c (grub_loader_is_loaded): New function.
20424
20425 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
20426 (grub_get_rtc): Exported.
20427
20428 * include/grub/i386/pc/time.h: Include grub/symbol.h.
20429 (grub_get_rtc): Exported.
20430
20431 * include/grub/normal.h (struct grub_command_list): Remove
20432 constant from the member `command'.
20433
20434 * include/grub/loader.h (grub_loader_is_loaded): Declared.
20435
20436 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
20437
20438 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
20439
aa033560 204402004-08-28 Marco Gerards <metgerards@student.han.nl>
20441
20442 Add support for the JFS filesystem.
20443
20444 * fs/jfs.c: New file.
20445 * include/grub/fs.h (grub_jfs_init): New prototype.
20446 (grub_jfs_fini): New prototype.
20447 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
20448 (grub_emu_SOURCES): Likewise.
20449 (pkgdata_MODULES): Add jfs.mod.
20450 (jfs_mod_SOURCES): New variable.
20451 (jfs_mod_CFLAGS): Likewise.
20452 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
20453 (grubof_SOURCES): Likewise.
20454 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
20455
20456 * fs/fat.c (grub_fat_find_dir): Convert the filename little
20457 endian to the host endian.
20458 (grub_fat_utf16_to_utf8): Move function from there...
20459 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 20460 the endianness of the source string anymore.
aa033560 20461 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
20462
94bc45af 204632004-08-24 Marco Gerards <metgerards@student.han.nl>
20464
20465 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
20466 (grub_boot_fini) [GRUB_UTIL]: Likewise.
20467 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
20468 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 20469
94bc45af 20470 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
20471 (grub_hfs_iterate_dir): Make the function static. Add prototypes
20472 for `node_found' and `it_dir'.
20473 (grub_hfs_dir): Add prototype for `dir_hook'.
20474
20475 * fs/minix.c (grub_minix_get_file_block): Add prototype for
20476 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
20477 and `indir32' to silence a gcc warning.
20478
20479 * include/grub/fs.h (grub_hfs_init): New prototype.
20480 (grub_hfs_fini): Likewise.
f19dbdb7 20481
20482
97543f08 204832004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
20484
20485 Each disk device has its own id now. This is useful to make use
20486 of multiple disk devices.
f19dbdb7 20487
97543f08 20488 * include/grub/disk.h (grub_disk_dev_id): New enum.
20489 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
20490 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
20491
20492 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
20493 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
20494
20495 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
20496 GRUB_DISK_DEVICE_OFDISK_ID as an id.
20497
20498 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
20499 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
20500
20501 * include/grub/disk.h (struct grub_disk_dev): Added a new member
20502 "id" which is used by the cache manager.
20503
20504 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
20505 of just "GRUB".
20506
64372eb4 205072004-08-18 Marco Gerards <metgerards@student.han.nl>
20508
20509 * fs/hfs.c: New file.
20510 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
20511 (grub_emu_SOURCES): Likewise.
20512 (pkgdata_MODULES): Add hfs.mod.
20513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
20514 (grubof_SOURCES): Likewise.
20515 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
20516
20517 * include/grub/misc.h (grub_strncasecmp): Add prototype.
20518 * kern/misc.c (grub_strncasecmp): Add function.
20519
cc61b58f 205202004-08-14 Marco Gerards <metgerards@student.han.nl>
20521
20522 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
20523 with parentheses.
20524
20525 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
20526 (grub_ext2_dir): In case the directory entry type is unknown, read
20527 it from the inode.
20528
0ef123f6 205292004-08-02 Peter Bruin <pjbruin@dds.nl>
20530
20531 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
20532 grub_load_linux instead of grub_rescue_cmd_linux as second
20533 argument of grub_rescue_register_command.
20534
20535 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
20536
a447c5df 205372004-07-27 Marco Gerards <metgerards@student.han.nl>
20538
20539 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
20540 function.
20541 * commands/boot.c: Remove the check for `GRUB_UTIL'.
20542 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
20543 `loader/powerpc/ieee1275/linux.c',
20544 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
20545 * include/grub/powerpc/ieee1275/ieee1275.h
20546 (grub_ieee1275_release): New prototype.
20547 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
20548 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
20549 normal, boot, linux and linux_normal.
20550 * loader/powerpc/ieee1275/linux.c: New file.
20551 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
20552
5a9e3546 205532004-07-12 Marco Gerards <metgerards@student.han.nl>
20554
20555 * normal/arg.c (grub_arg_parse): Correct error handling after
20556 reallocating the argumentlist (check if `argl' is not null instead
20557 of checking if `args' is not null).
20558 * kern/mm.c (grub_realloc): Return the same pointer when using the
20559 same region, instead of returning the header address.
20560
e15199cb 205612004-07-11 Marco Gerards <metgerards@student.han.nl>
20562
20563 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
20564 one block instead of two when looking for the initial partition.
20565 (grub_partition_probe): Initialize the local variable `p' with 0.
20566 Use base 10 for the grub_strtoul call.
20567 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
20568 need for one local variable.
20569 (grub_strtoul): Don't add the new value to `num', instead of that
20570 just assign it.
20571
020616c2 205722004-07-11 Marco Gerards <metgerards@student.han.nl>
20573
20574 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
20575 (pxeboot_img_SOURCES): New variable.
20576 (pxeboot_img_ASFLAGS): Likewise.
20577 (pxeboot_img_LDFLAGS): Likewise.
20578 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
20579 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
20580 <lode_leroy@hotmail.com>.
20581
6c51eb64 205822004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
20583
20584 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
20585 there was no input.
20586
cfb12aff 205872004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
20588
20589 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
20590 the history buffer logic.
20591
6eabba74 205922004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
20593
20594 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
20595 (FILETYPE_INO_SYMLINK): New macros.
20596 (grub_ext2_find_file): Check if the node is a directory using the
20597 inode stat information instead of using the filetype in the
20598 dirent. Exclude the first character of an absolute symlink.
20599 (grub_ext2_dir): Mask out the filetype part of the mode member of
20600 the inode.
20601
66e19ef8 206022004-05-24 Marco Gerards <metgerards@student.han.nl>
20603
20604 Add support for UFS version 1 and 2. Add support for the minix
20605 filesystem version 1 and 2, both the variants with 14 and 30 long
20606 filenames.
f19dbdb7 20607
66e19ef8 20608 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
20609 fs/minix.c.
20610 (grub_emu_SOURCES): Likewise.
20611 (pkgdata_MODULES): Add ufs.mod and minix.mod.
20612 (ufs_mod_SOURCES): New variable.
20613 (ufs_mod_CFLAGS): Likewise.
20614 (minix_mod_SOURCES): Likewise.
20615 (minix_mod_CFLAGS): Likewise.
20616 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
20617 fs/minix.c.
20618 (grubof_SOURCES): Likewise.
20619 * fs/ufs.c: New file.
20620 * fs/minix.c: New file.
20621 * include/grub/fs.h (grub_ufs_init): New prototype.
20622 (grub_ufs_fini): Likewise.
20623 (grub_minix_init): Likewise.
20624 (grub_minix_fini): Likewise.
20625 * util/grub-emu.c (main): Initialize and deinitialize UFS and
20626 minix fs.
20627
cc2e748a 206282004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
20629
20630 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
20631 commands/ls.c, commands/terminal.c, commands/boot.c,
20632 commands/cmp.c and commands/cat.c.
20633 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
20634
20635 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
20636 "env.h"
20637
4b13b216 206382004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
20639
20640 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
20641 and grub_, respectively. Because the conversion is trivial and
20642 mechanical, I omit the details here. Please refer to the CVS
20643 if you need more information.
20644
6a142551 206452004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
20646
20647 * include/pupa: Renamed to ...
20648 * include/grub: ... this.
20649 * util/i386/pc/pupa-mkimage.c: Renamed to ...
20650 * util/i386/pc/grub-mkimage.c: ... this.
20651 * util/i386/pc/pupa-setup.c: Renamed to ...
20652 * util/i386/pc/grub-setup.c: ... this.
20653 * util/pupa-emu.c: Renamed to ...
20654 * util/grub-emu.c: ... this.
20655
e56cdf21 206562004-03-29 Marco Gerards <metgerards@student.han.nl>
20657
20658 Add support for the newworld apple macintosh (PPC). This has been
20659 tested on the powerbook 2000 only. It only adds support for
20660 generic ieee1275 functions, console and disk support. This should
20661 be easy to port to other architectures with support for Open
20662 Firmware.
f19dbdb7 20663
e56cdf21 20664 * configure.ac: Accept the powerpc as host_cpu. In the case of
20665 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
20666 specific tests are only executed while building for the i386.
20667 Inverse test for crosscompile.
20668 * genmk.rb (Utility): Allow assembler files.
20669 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
20670 * conf/powerpc-ieee1275.rmk: New file.
20671 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
20672 * disk/powerpc/ieee1275/partition.c: Likewise.
20673 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
20674 * include/pupa/powerpc/ieee1275/console.h: Likewise.
20675 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
20676 * include/pupa/powerpc/ieee1275/time.h: Likewise.
20677 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
20678 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
20679 * include/pupa/powerpc/ieee1275/loader.h
20680 * include/pupa/powerpc/setjmp.h: Likewise.
20681 * include/pupa/powerpc/types.h: Likewise.
20682 * kern/powerpc/ieee1275/init.c: Likewise.
20683 * kern/powerpc/ieee1275/openfw.c: Likewise.
20684 * term/powerpc/ieee1275/ofconsole.c: Likewise.
20685
20686 These files were written by Johan Rydberg
20687 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 20688
e56cdf21 20689 * boot/powerpc/ieee1275/cmain.c: New file.
20690 * boot/powerpc/ieee1275/crt0.S: Likewise.
20691 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
20692 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
20693
8c8cc205 206942004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
20695
20696 * Makefile.in: Update copyright.
20697 * genmodsrc.sh: Likewise.
20698 * gensymlist.sh: Likewise.
20699 * term/i386/pc/vga.c: Indent correctly.
20700
20701 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
20702 bugreporting address.
20703 * util/i386/pc/pupa-setup.c (usage): Likewise,
20704 (main): Call pupa_ext2_init and pupa_ext2_fini.
20705
f19dbdb7 20706 * fs/fat.c (log2): Renamed to ...
8c8cc205 20707 (fat_log2): ... this.
20708 All callers changed.
20709 * kern/misc.c (memcpy): Alias to pupa_memmove.
20710 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
20711 lvalue cast.
20712 * util/console.c (pupa_ncurses_fini): Return 0.
20713
20714 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
20715 Move fail label here.
20716 [__GNU__]: Don't warn when using stat.
20717 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
20718 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
20719 long int. Use strtol instead of strtoul.
f19dbdb7 20720
db1771cf 207212004-03-14 Marco Gerards <metgerards@student.han.nl>
20722
20723 * commands/boot.c: New file.
20724 * commands/cat.c: Likewise.
20725 * commands/cmp.c: Likewise.
20726 * commands/ls.c: Likewise.
20727 * commands/terminal.c: Likewise.
20728 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
20729 (pupa_register_command): Changed interface to match the new
20730 argument parser.
20731 (pupa_command_execute): Changed (almost rewritten) so it uses
20732 pupa_split_command. Added support for setting variables using the
20733 syntax `foo=bar'.
20734 (rescue_command): Changed to work with the new argument parser.
20735 (terminal_command): Moved from here to commands/terminal.c.
20736 (set_command): New function.
20737 (unset_command): New function.
20738 (insmod_command): New function.
20739 (rmmod_command): New function.
20740 (lsmod_command): New function.
20741 (pupa_command_init): Don't initialize the command terminal
20742 anymore. Initialize the commands set, unset, insmod, rmmod and
20743 lsmod.
20744 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
20745 (kernel_img_HEADERS): Add arg.h and env.h.
20746 (pupa_mkimage_LDFLAGS): Add kern/env.c.
20747 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
20748 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
20749 normal/arg.c.
20750 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
20751 terminal.mod.
20752 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
20753 (boot_mod_SOURCES): New variable.
20754 (terminal_mod_SOURCES): Likewise.
20755 (ls_mod_SOURCES): Likewise.
20756 (cmp_mod_SOURCES): Likewise.
20757 (cat_mod_SOURCES): Likewise.
20758
20759 * normal/arg.c: New file.
20760 * kern/env.c: Likewise.
20761 * include/pupa/arg.h: Likewise.
20762 * include/pupa/env.h: Likewise.
20763 * font/manager.c (font_command): Changed to match argument parsing
20764 interface changes.
20765 (PUPA_MOD_INIT): Likewise.
20766 * hello/hello.c (pupa_cmd_hello): Likewise.
20767 (PUPA_MOD_INIT): Likewise.
20768 * include/pupa/disk.h: Include <pupa/device.h>.
20769 (pupa_print_partinfo): New prototype.
20770 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
20771 (pupa_dl_get_prefix): Likewise.
20772 * include/pupa/misc.h: Include <pupa/err.h>.
20773 (pupa_isgraph): New prototype.
20774 (pupa_isdigit): Likewise.
20775 (pupa_split_cmdline): Likewise.
20776 * include/pupa/normal.h: Include <pupa/arg.h>.
20777 (pupa_command): Changed the prototype of the member `func' to
20778 match the argument parsing interface. Added member `options'.
20779 (pupa_register_command): Updated to match function.
20780 (pupa_arg_parse): New prototype.
20781 (pupa_hello_init) [PUPA_UTIL]: New prototype.
20782 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
20783 (pupa_ls_init) [PUPA_UTIL]: Likewise.
20784 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
20785 (pupa_cat_init) [PUPA_UTIL]: Likewise.
20786 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
20787 (pupa_boot_init) [PUPA_UTIL]: Likewise.
20788 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
20789 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
20790 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
20791 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
20792 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
20793 * kern/disk.c: Include <pupa/file.h>.
20794 (pupa_print_partinfo): New function.
20795 * kern/dl.c: Include <pupa/env.h>.
20796 (pupa_dl_dir): Variable removed.
20797 (pupa_dl_load): Use the environment variable `prefix' instead of
20798 the variable pupa_dl_dir.
20799 (pupa_dl_set_prefix): Function removed.
20800 (pupa_dl_get_prefix): Likewise.
20801 * kern/i386/pc/init.c: Include <pupa/env.h>.
20802 (pupa_machine_init): Use the environment variable `prefix' instead of
20803 using pupa_dl_set_prefix to set the prefix.
20804 * kern/main.c: Include <pupa/env.h>.
20805 (pupa_set_root_dev): Use the environment variable `prefix' instead of
20806 using pupa_dl_get_prefix to get the prefix.
20807 * kern/misc.c: Include <pupa/env.h>.
20808 (pupa_isdigit): New function.
20809 (pupa_isgraph): Likewise.
20810 (pupa_ftoa): Likewise.
20811 (pupa_vsprintf): Added support for printing values of the type
20812 `double'. Make it possible to format variable output when using
20813 formatting like `%1.2%f'.
20814 (pupa_split_cmdline): New function.
20815 * kern/rescue.c: Include <pupa/env.h>.
20816 (next_word): Removed function.
20817 (pupa_rescue_cmd_prefix): Likewise.
20818 (pupa_rescue_cmd_set): New function.
20819 (pupa_rescue_cmd_unset): New function.
20820 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
20821 split the command line instead of splitting it here. Added
20822 support for setting variables using the syntax `foo=bar'. Don't
20823 initialize the prefix command anymore. Initialized the set and
20824 unset commands.
20825 * normal/cmdline.c: Include <pupa/env.h>.
20826 (pupa_tab_complete): Added prototypes for print_simple_completion,
20827 print_partition_completion, add_completion, iterate_commands,
20828 iterate_dev, iterate_part and iterate_dir. Moved code to print
20829 partition information from here to kern/disk.c.
fe6b695a 20830 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 20831 * normal/main.c: Include <pupa/env.h>.
20832 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
20833 instead of using pupa_dl_get_prefix to get the prefix.
20834 * term/i386/pc/vga.c: Include <pupa/arg.h>.
20835 (check_vga_mem): Cast pointers to `void *' to silence a gcc
20836 warning.
20837 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
20838 (pupa_vga_setcolor): Declare unused variables with `__attribute__
20839 ((unused))' to silence a gcc warning.
20840 (pupa_vga_setcolor): Likewise.
20841 (debug_command): Changed to match argument parsing
20842 interface changes.
20843 * util/pupa-emu.c: Include <pupa/env.h>.
20844 (options): Added 0's for unused fields to silence a gcc warning.
20845 (argp): Likewise.
20846 (main): Use the environment variable `prefix' instead of using
20847 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
20848 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
20849 and terminal.
20850
20851 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
20852 * util/misc.c: Include <malloc.h>.
20853 (pupa_malloc): Rewritten so errors are correctly reported.
20854 (pupa_realloc): Likewise.
20855 (pupa_memalign): Likewise.
20856 (pupa_mm_init_region): Declare unused variables with
20857 `__attribute__ ((unused))' to silence a gcc warning.
20858 * normal/i386/setjmp.S: Remove tab at the end of the file to
20859 silence a gcc warning.
20860 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
20861 variables with `__attribute__ ((unused))' to silence a gcc
20862 warning.
20863 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
20864 local variable i unsigned to silence a gcc warning.
20865
20866 * kern/term.c: Include <pupa/misc.h>.
20867 (pupa_more_lines): New variable.
20868 (pupa_more): Likewise.
20869 (pupa_putcode): When the pager is active pause at the end of every
20870 screen.
20871 (pupa_set_more): New function.
20872 * include/pupa/term.h (pupa_set_more): New prototype.
20873
20874
3b1139cb 208752004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
20876
20877 Now this project is GRUB 2 rather than PUPA. The location of
20878 the CVS repository was moved to GRUB's.
f19dbdb7 20879
3b1139cb 20880 * configure.ac: Use bug-grub as the reporting address.
20881 Use GRUB instead of PUPA.
20882 Change the version number to 1.90.
20883
8367695c 208842004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
20885
20886 * genkernsyms.sh: Updated copyright information.
20887 * genmk.rb: Likewise.
20888 * genmodsrc.sh: Likewise.
20889 * gensymlist.sh: Likewise.
20890 * boot/i386/pc/boot.S: Likewise.
20891 * boot/i386/pc/diskboot.S: Likewise.
20892 * disk/i386/pc/biosdisk.c: Likewise.
20893 * disk/i386/pc/partition.c: Likewise.
20894 * font/manager.c: Likewise.
20895 * fs/ext2.c: Likewise.
20896 * fs/fat.c: Likewise.
20897 * include/pupa/boot.h: Likewise.
20898 * include/pupa/device.h: Likewise.
20899 * include/pupa/disk.h: Likewise.
20900 * include/pupa/dl.h: Likewise.
20901 * include/pupa/elf.h: Likewise.
20902 * include/pupa/err.h: Likewise.
20903 * include/pupa/file.h: Likewise.
20904 * include/pupa/font.h: Likewise.
20905 * include/pupa/fs.h: Likewise.
20906 * include/pupa/kernel.h: Likewise.
20907 * include/pupa/loader.h: Likewise.
20908 * include/pupa/misc.h: Likewise.
20909 * include/pupa/mm.h: Likewise.
20910 * include/pupa/net.h: Likewise.
20911 * include/pupa/normal.h: Likewise.
20912 * include/pupa/rescue.h: Likewise.
20913 * include/pupa/setjmp.h: Likewise.
20914 * include/pupa/symbol.h: Likewise.
20915 * include/pupa/term.h: Likewise.
20916 * include/pupa/types.h: Likewise.
20917 * include/pupa/i386/setjmp.h: Likewise.
20918 * include/pupa/i386/types.h: Likewise.
20919 * include/pupa/i386/pc/biosdisk.h: Likewise.
20920 * include/pupa/i386/pc/boot.h: Likewise.
20921 * include/pupa/i386/pc/console.h: Likewise.
20922 * include/pupa/i386/pc/init.h: Likewise.
20923 * include/pupa/i386/pc/kernel.h: Likewise.
20924 * include/pupa/i386/pc/linux.h: Likewise.
20925 * include/pupa/i386/pc/loader.h: Likewise.
20926 * include/pupa/i386/pc/memory.h: Likewise.
20927 * include/pupa/i386/pc/multiboot.h: Likewise.
20928 * include/pupa/i386/pc/partition.h: Likewise.
20929 * include/pupa/i386/pc/time.h: Likewise.
20930 * include/pupa/i386/pc/vga.h: Likewise.
20931 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
20932 * include/pupa/util/getroot.h: Likewise.
20933 * include/pupa/util/misc.h: Likewise.
20934 * include/pupa/util/resolve.h: Likewise.
20935 * kern/device.c: Likewise.
20936 * kern/disk.c: Likewise.
20937 * kern/dl.c: Likewise.
20938 * kern/err.c: Likewise.
20939 * kern/file.c: Likewise.
20940 * kern/fs.c: Likewise.
20941 * kern/loader.c: Likewise.
20942 * kern/main.c: Likewise.
20943 * kern/misc.c: Likewise.
20944 * kern/mm.c: Likewise.
20945 * kern/rescue.c: Likewise.
20946 * kern/term.c: Likewise.
20947 * kern/i386/dl.c: Likewise.
20948 * kern/i386/pc/init.c: Likewise.
20949 * kern/i386/pc/lzo1x.S: Likewise.
20950 * kern/i386/pc/startup.S: Likewise.
20951 * loader/i386/pc/chainloader.c: Likewise.
20952 * loader/i386/pc/linux.c: Likewise.
20953 * loader/i386/pc/multiboot.c: Likewise.
20954 * normal/cmdline.c: Likewise.
20955 * normal/command.c: Likewise.
20956 * normal/main.c: Likewise.
20957 * normal/menu.c: Likewise.
20958 * normal/i386/setjmp.S: Likewise.
20959 * term/i386/pc/console.c: Likewise.
20960 * term/i386/pc/vga.c: Likewise.
20961 * util/console.c: Likewise.
20962 * util/genmoddep.c: Likewise.
20963 * util/misc.c: Likewise.
20964 * util/pupa-emu.c: Likewise.
20965 * util/resolve.c: Likewise.
20966 * util/unifont2pff.rb: Likewise.
20967 * util/i386/pc/biosdisk.c: Likewise.
20968 * util/i386/pc/getroot.c: Likewise.
20969 * util/i386/pc/pupa-mkimage.c: Likewise.
20970 * util/i386/pc/pupa-setup.c: Likewise.
20971
e6eced71 209722004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
20973
20974 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
20975 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
20976 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
20977 reading and reset it after reading.
20978 (pupa_ext2_close): Return PUPA_ERR_NONE.
20979
20980 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
20981 Correct value.
20982 (struct linux_kernel_header): Add kernel_version and
20983 initrd_addr_max.
20984 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
20985 pupa_file_read succeeds.
20986 (pupa_rescue_cmd_initrd): Implement.
20987
5aded270 209882003-12-03 Marco Gerards <metgerards@student.han.nl>
20989
20990 * fs/ext2.c (pupa_ext2_label): New function.
20991 (pupa_ext2_fs): Added label.
20992 * fs/fat.c (pupa_fat_label): New function.
20993 (pupa_fat_fs): Added label.
20994 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
20995
20996 * kern/misc.c (pupa_strndup): New function.
20997 * include/pupa/misc.h (pupa_strndup): New prototype.
20998
20999 * include/pupa/normal.h: Include <pupa/err.h>.
21000 (pupa_set_history): New prototype.
21001 (pupa_iterate_commands): New prototype.
21002 * normal/cmdline.c: Include <pupa/machine/partition.h>,
21003 <pupa/disk.h>, <pupa/file.h>.
21004 (hist_size): New variable.
21005 (hist_lines): Likewise.
21006 (hist_end): Likewise.
21007 (hist_used): Likewise.
21008 (pupa_set_history): New function.
21009 (pupa_history_get): Likewise.
21010 (pupa_history_add): Likewise.
21011 (pupa_history_replace): Likewise.
21012 (pupa_tab_complete): Likewise.
21013 (pupa_cmdline_run): Added tab completion and history buffer. Tab
21014 completion shows partitionnames while completing partitions, this
21015 feature was suggested by Jeff Bailey.
21016 * normal/command.c (pupa_iterate_commands): New function.
21017 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
21018 (pupa_normal_init): Initialize history buffer.
21019 (PUPA_MOD_INIT): Likewise.
21020 (pupa_normal_fini): Free the history buffer.
21021 (PUPA_MOD_FINI): Likewise.
21022
21023 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
21024 key.
21025
21026 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
21027 * configure.ac [i386]: Check for regparam bug.
21028 (NESTED_FUNC_ATTR) [! i386]: Defined.
21029
1f7315a3 210302003-11-17 Marco Gerards <metgerards@student.han.nl>
21031
21032 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
21033 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
21034 (pupa_emu_SOURCES): New variable.
21035 (pupa_emu_LDFLAGS): Likewise.
21036 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
21037 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
21038 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
21039 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
21040 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
21041 (pupa_jmp_buf): New typedef.
21042 (pupa_setjmp) [PUPA_UTIL]: New macro.
21043 (pupa_longjmp) [PUPA_UTIL]: Likewise.
21044 * include/pupa/term.h (struct pupa_term): New member `refresh'.
21045 (pupa_refresh): New prototype.
21046 * include/pupa/util/getroot.h: New file.
21047 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
21048 it.
21049 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
21050 (pupa_rescue_cmd_cat): Likewise.
21051 (pupa_rescue_cmd_ls): Likewise.
21052 (pupa_rescue_cmd_testload): Likewise.
21053 (pupa_rescue_cmd_lsmod): Likewise.
21054 * normal/cmdline.c (pupa_cmdline_get): Likewise.
21055 * normal/menu.c (run_menu): Likewise.
21056 * kern/term.c (pupa_cls): Likewise.
21057 (pupa_refresh): New function.
21058 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
21059 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
21060 * util/console.c: New file.
f19dbdb7 21061
1f7315a3 21062 * util/i386/pc/getroot.c: New file.
21063 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
21064 (pupa_putchar): New function.
21065 (pupa_refresh): Likewise.
21066 (xgetcwd): Function moved to ...
21067 (strip_extra_slashes): Likewise.
21068 (get_prefix): Likewise.
f19dbdb7 21069 * util/i386/pc/getroot.c: ... here.
1f7315a3 21070 (find_root_device): Function moved and renamed to...
21071 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
21072 Changed all callers.
21073 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
21074 and renamed to...
21075 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
21076 Changed all callers.
21077 * util/misc.c (pupa_memalign): New function.
21078 (pupa_mm_init_region): Likewise.
21079 (pupa_register_exported_symbols): Likewise.
21080 (pupa_putchar): Function removed.
21081 * util/pupa-emu.c: New file.
21082
9a5c1ade 210832003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
21084
21085 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
21086 (_multiboot_mod_SOURCES): New variable.
21087 (_multiboot_mod_CFLAGS): Likewise.
21088 * loader/i386/pc/multiboot.c: New file.
21089 * include/pupa/i386/pc/multiboot.h: Likewise.
21090 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
21091 (pupa_multiboot_real_boot): New function.
21092 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
21093 (pupa_multiboot_real_boot): New prototype.
21094 (pupa_rescue_cmd_multiboot): Likewise
21095 (pupa_rescue_cmd_module): Likewise.
21096
21097 * kern/loader.c (pupa_loader_set): Continue when
21098 pupa_loader_unload_func() fails.
21099 (pupa_loader_unset): New function.
21100 * include/pupa/loader.h (pupa_loader_unset): New prototype.
21101
21102 * kern/misc.c (pupa_stpcpy): New function.
21103 * include/pupa/misc.h (pupa_stpcpy): New prototype.
21104
8e72a9c0 211052003-11-12 Marco Gerards <metgerards@student.han.nl>
21106
21107 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
21108 for available extensions.
21109
21110 * include/pupa/i386/pc/time.h: New file.
21111 * kern/disk.c: Include <pupa/machine/time.h>.
21112 (PUPA_CACHE_TIMEOUT): New macro.
21113 (pupa_last_time): New variable.
21114 (pupa_disk_open): Flush the cache when there was a timeout.
21115 (pupa_disk_close): Reset the timer.
21116 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
21117 pupa_currticks.
21118 * util/misc.c: Include <sys/times.h>
21119 (pupa_get_rtc): New function.
21120
c4adbd32 211212003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
21122
21123 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
21124 as blocks.
21125 (pupa_ext2_get_file_block): Use blocks member.
21126
21127 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
21128 first block. Return -1 instead of pupa_errno on error.
21129
bfd30f06 211302003-10-27 Marco Gerards <metgerards@student.han.nl>
21131
21132 * README: In the pupa-mkimage example use _chain instead of chain
21133 and ext2 instead of fat.
21134 * TODO: Replace ext2fs with jfs as an example. Add an item for
21135 adding journal playback for ext2fs.
21136 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
21137 (pkgdata_MODULES): Added ext2.mod.
21138 (ext2_mod_SOURCES): New variable.
21139 (ext2_mod_CFLAGS): Likewise.
21140 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
21141 * include/pupa/misc.h (pupa_strncpy): New prototype.
21142 (pupa_strcat): Likewise.
21143 (pupa_strncmp): Likewise.
21144 * kern/misc.c (pupa_strcat): Enable function.
21145 (pupa_strncpy): New function.
21146 (pupa_strncmp): Likewise.
21147 * fs/ext2.c: New file.
f19dbdb7 21148
bfd30f06 21149 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
21150 when the read failed before retrying.
21151 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
21152 (_FILE_OFFSET_BITS): Likewise.
21153 * configure.ac: Added AC_SYS_LARGEFILE.
21154
98d15063 211552003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
21156
21157 * genmk.rb (PModule#rule): Make sure to get only symbol names
21158 from the output of nm.
21159 Reported by Robert Millan <zeratul2@wanadoo.es>.
21160
18d9c7cd 211612003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
21162
21163 I forgot to check in these changes for a long time. This adds
21164 incomplete support for VGA console, and this is still very
21165 buggy. Also, a lot of consideration is required for I18N,
21166 UNICODE, and VGA font issues. Therefore, assume that this is
21167 such that "better than nothing".
f19dbdb7 21168
18d9c7cd 21169 * font/manager.c: New file.
21170 * include/pupa/font.h: Likewise.
21171 * include/pupa/i386/pc/vga.h: Likewise.
21172 * term/i386/pc/vga.c: Likewise.
21173 * util/unifont2pff.rb: Likewise.
21174
21175 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
21176 (pkgdata_MODULES): Added vga.mod and font.mod.
21177 (vga_mod_SOURCES): New variables.
21178 (vga_mod_CFLAGS): Likewise.
21179 (font_mod_SOURCES): Likewise.
21180 (font_mod_CFLAGS): Likewise.
21181
21182 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
21183
21184 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 21185 (struct pupa_term): Added init and fini.
18d9c7cd 21186 Changed the argument of putchar to pupa_uint32_t.
21187
21188 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
21189 (pupa_console_real_putchar): New prototype.
21190 (pupa_console_putchar): Removed.
21191 (pupa_console_checkkey): Exported.
21192 (pupa_console_getkey): Likewise.
21193
21194 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
21195 characters.
21196
21197 * kern/term.c (pupa_term_set_current): Rewritten.
21198 (pupa_putchar): Likewise.
21199 (pupa_putcode): New function.
21200
21201 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
21202 (pupa_console_real_putchar): ... this.
21203 (pupa_vga_set_mode): New function.
21204 (pupa_vga_get_font): Likewise.
21205
21206 * normal/command.c: Include pupa/term.h.
21207 (terminal_command): New function.
21208 (pupa_command_init): Register the command "terminal".
21209
21210 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
21211 (DISP_UP): Likewise.
21212 (DISP_RIGHT): Likewise.
21213 (DISP_DOWN): Likewise.
21214 (DISP_HLINE): Likewise.
21215 (DISP_VLINE): Likewise.
21216 (DISP_UL): Likewise.
21217 (DISP_UR): Likewise.
21218 (DISP_LL): Likewise.
21219 (DISP_LR): Likewise.
21220
21221 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 21222
977329f5 212232003-02-08 NIIBE Yutaka <gniibe@m17n.org>
21224
21225 * util/resolve.c (pupa_util_resolve_dependencies): BUG
21226 FIX. Reverse the path_list.
21227
21228 * include/pupa/normal.h: Export pupa_register_command and
21229 pupa_unregister_command.
21230
21231 * hello/hello.c (pupa_cmd_hello): New module.
21232 * conf/i386-pc.rmk: Added hello.mod.
21233
1f5ab428 212342003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
21235
21236 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 21237
1f5ab428 21238 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
21239 (compress_kernel): New variable.
21240 (generate_image): Heavily modified to support compressing a
21241 large part of the core image.
21242
21243 * util/misc.c (pupa_util_read_image): Fix a file descriptor
21244 leak.
21245 (pupa_util_load_image): New function.
21246
21247 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
21248 (pupa_compressed_size): New variable.
21249 (codestart): Enable Gate A20 here.
21250 Decompress the compressed part of the core image.
21251 Rearrange the code to put functions and variables which are
21252 required for initialization in the non-compressed part.
21253 Include lzo1x.S.
21254
21255 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
21256 here.
21257
21258 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
21259
f19dbdb7 21260 * include/pupa/i386/pc/kernel.h
1f5ab428 21261 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
21262 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
21263 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
21264 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
21265 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
21266
21267 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
21268
21269 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
21270 (Utility#rule): Likewise.
21271
21272 * configure.ac: Check if LZO is available.
21273
ce5bf700 212742003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
21275
21276 * include/pupa/normal.h: New file.
21277 * include/pupa/setjmp.h: Likewise.
21278 * include/pupa/i386/setjmp.h: Likewise.
21279 * normal/cmdline.c: Likewise.
21280 * normal/command.c: Likewise.
21281 * normal/main.c: Likewise.
21282 * normal/menu.c: Likewise.
21283 * normal/i386/setjmp.S: Likewise.
f19dbdb7 21284
ce5bf700 21285 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
21286 (pupa_rescue_cmd_initrd): Likewise.
21287
21288 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
21289 Likewise.
21290
21291 * kern/i386/pc/startup.S (translation_table): New variable.
21292 (translate_keycode): New function.
21293 (pupa_console_getkey): Call translate_keycode.
21294
21295 * kern/rescue.c (attempt_normal_mode): New function.
21296 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
21297 it failed, print a message.
21298
21299 * kern/mm.c (pupa_real_malloc): Print more information when a
21300 free magic is broken.
21301 (pupa_free): If the first free header is not free actually, set
21302 it to P.
21303
21304 * kern/main.c (pupa_load_normal_mode): Just load the module
21305 "normal".
21306 (pupa_main): Don't print the message
21307 "Entering into rescue mode..." here.
21308
21309 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
21310 Declared.
21311 (pupa_rescue_cmd_initrd): Likewise.
21312 (pupa_rescue_cmd_initrd): Likewise.
21313
21314 * include/pupa/symbol.h (FUNCTION): Specify the type.
21315 (VARIABLE): Likewise.
21316
21317 * include/pupa/err.h (pupa_err_t): Added
21318 PUPA_ERR_UNKNOWN_COMMAND.
21319
21320 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
21321 (pupa_dl_get_prefix): Likewise.
21322
21323 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
21324 Added _chain.mod and _linux.mod instead of chain.mod and
21325 linux.mod.
21326 (chain_mod_SOURCES): Renamed to ...
21327 (_chain_mod_SOURCES): ... this.
21328 (chain_mod_CFLAGS): Renamed to ...
21329 (_chain_mod_CFLAGS): ... this.
21330 (linux_mod_SOURCES): Renamed to ...
21331 (_linux_mod_SOURCES): ... this.
21332 (linux_mod_CFLAGS): Renamed to ...
21333 (_linux_mod_CFLAGS): ... this.
21334 (normal_mod_SOURCES): New variable.
21335 (normal_mod_CFLAGS): Likewise.
21336 (normal_mod_ASFLAGS): Likewise.
21337
213382003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
21339
21340 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
21341 possible.
21342
fe6b695a 21343 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 21344 recursively.
21345 (pupa_dl_unref): Unrefer depending modules recursively.
21346 Don't call pupa_dl_unload implicitly, because PUPA can crash if
21347 a module is unloaded before one depending on that module is
21348 unloaded.
21349 (pupa_dl_unload): Unload depending modules explicitly,
21350 if possible.
21351
c04da074 213522003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
21353
21354 * include/pupa/i386/pc/linux.h: New file.
21355 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 21356
c04da074 21357 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
21358 Removed.
21359 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
21360 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
21361 of PUPA_CHAINLOADER_BOOT_SECTOR.
21362
21363 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
21364 (pupa_linux_prot_size): New variable.
21365 (pupa_linux_tmp_addr): Likewise.
21366 (pupa_linux_real_addr): Likewise.
21367 (pupa_linux_boot_zimage): New function.
21368 (pupa_linux_boot_bzimage): Likewise.
21369
21370 * kern/i386/pc/init.c (struct mem_region): New structure.
21371 (MAX_REGIONS): New macro.
21372 (mem_regions): New variable.
21373 (num_regions): Likewise.
21374 (pupa_os_area_addr): Likewise.
21375 (pupa_os_area_size): Likewise.
21376 (pupa_lower_mem): Likewise.
21377 (pupa_upper_mem): Likewise.
21378 (add_mem_region): New function.
21379 (compact_mem_regions): Likewise.
21380 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
21381 the size of the conventional memory and that of so-called upper
21382 memory (before the first memory hole).
21383 Instead of adding each found region to free memory, use
21384 add_mem_region and add them after removing overlaps.
21385 Also, add only 1/4 of the upper memory to free memory. The rest
21386 is used for loading OS images. Maybe this is ad hoc, but this
21387 makes it much easier to relocate OS images when booting.
21388
21389 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
21390 (pupa_enter_rescue_mode): Don't register initrd and module.
21391
21392 * kern/mm.c: Include pupa/dl.h.
21393
21394 * kern/main.c: Include pupa/file.h and pupa/device.h.
21395
21396 * kern/loader.c (pupa_loader_load_module_func): Removed.
21397 (pupa_loader_load_module): Likewise.
21398
21399 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
21400 ``.o''.
21401
21402 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
21403 (pupa_linux_tmp_addr): Likewise.
21404 (pupa_linux_real_addr): Likewise.
21405 (pupa_linux_boot_zimage): Likewise.
21406 (pupa_linux_boot_bzimage): Likewise.
21407
21408 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
21409 (pupa_upper_mem): Likewise.
21410 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
21411 module is too dangerous.
21412
21413 * include/pupa/loader.h (pupa_os_area_addr): Declared.
21414 (pupa_os_area_size): Likewise.
21415 (pupa_loader_set): Remove the first argument. Loader doesn't
21416 manage modules or initrd any longer.
21417 (pupa_loader_load_module): Removed.
21418
21419 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
21420 (linux_mod_SOURCES): New variable.
21421 (linux_mod_CFLAGS): Likewise.
21422
a13f9237 214232003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
21424
21425 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
21426 the length of a blocklist correctly.
21427
21428 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
21429 Use ioctl only if the OS file is a block device.
21430 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
21431 not very useful for normal files.
21432
21433 * kern/main.c (pupa_set_root_dev): New function.
21434 (pupa_load_normal_mode): Likewise.
21435 (pupa_main): Call those above.
21436
21437 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
21438 pupa_uint16_t.
21439
21440 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
21441
a5ffe966 214422003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
21443
21444 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
21445 (setup): Configure the installed partition information and the
21446 dl prefix.
21447
21448 * loader/i386/pc/chainloader.c (my_mod): New variable.
21449 (pupa_chainloader_unload): New function.
21450 (pupa_rescue_cmd_chainloader): Refer itself.
21451 (PUPA_MOD_INIT): Save its own module in MY_MOD.
21452
21453 * kern/i386/pc/startup.S (install_partition): Removed.
21454 (version_string): Likewise.
21455 (config_file): Likewise.
21456 (pupa_install_dos_part): New variable.
21457 (pupa_install_bsd_part): Likewise.
21458 (pupa_prefix): Likewise.
21459 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
21460
21461 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
21462 and pupa/misc.h.
21463 (make_install_device): New function.
21464 (pupa_machine_init): Set the dl prefix.
21465
21466 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
21467 (buf): Renamed to ...
21468 (linebuf): ... this.
21469 (pupa_rescue_cmd_prefix): New function.
21470 (pupa_rescue_cmd_insmod): Likewise.
21471 (pupa_rescue_cmd_rmmod): Likewise.
21472 (pupa_rescue_cmd_lsmod): Likewise.
21473 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
21474 rmmod and lsmod.
21475
21476 * kern/mm.c (pupa_memalign): If failed even after invalidating
21477 disk caches, unload unneeded modules and retry.
21478
21479 * kern/misc.c (pupa_memmove): New function.
21480 (pupa_memcpy): Removed.
21481 (pupa_strcpy): New function.
21482 (pupa_itoa): Made static.
21483
21484 * kern/dl.c (pupa_dl_iterate): New function.
21485 (pupa_dl_ref): Likewise.
21486 (pupa_dl_unref): Likewise.
21487 (pupa_dl_unload): Return if succeeded or not.
21488 (pupa_dl_unload_unneeded): New function.
21489 (pupa_dl_unload_all): Likewise.
21490 (pupa_dl_init): Renamed to ...
21491 (pupa_dl_set_prefix): ... this.
21492 (pupa_dl_get_prefix): New function.
21493
21494 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
21495 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
21496 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
21497 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
21498 (pupa_install_dos_part): Declared.
21499 (pupa_install_bsd_part): Likewise.
21500 (pupa_prefix): Likewise.
21501 (pupa_boot_drive): Likewise.
21502
21503 * include/pupa/types.h: Fix a typo.
21504
21505 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
21506 pupa_memmove.
21507 (pupa_memmove): Declared.
21508 (pupa_strcpy): Likewise.
21509
21510 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
21511 pupa_mod_init takes one argument, its own module.
21512 (pupa_dl_unload_unneeded): Declared.
21513 (pupa_dl_unload_all): Likewise.
21514 (pupa_dl_ref): Likewise.
21515 (pupa_dl_unref): Likewise.
21516 (pupa_dl_iterate): Likewise.
21517 (pupa_dl_init): Renamed to ...
21518 (pupa_dl_set_prefix): ... this.
21519 (pupa_dl_get_prefix): Declared.
21520
21521 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 21522 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 21523 unloaded.
21524 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
21525 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
21526
21527 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
21528 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
21529
012d7999 215302003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
21531
21532 * util/i386/pc/pupa-setup.c (setup): Define the internal
21533 function find_first_partition_start at the top level, because GCC
21534 3.0.x cannot compile internal functions in deeper scopes
21535 correctly.
21536 (find_root_device): Use lstat instead of stat.
21537 Don't follow symbolic links.
21538 Fix the path-constructing code.
21539
21540 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
21541 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
21542 by a BLKGETSIZE ioctl first, because block devices don't fill
21543 the member st_mode of the structure stat on Linux.
21544 [__linux__] (linux_find_partition): Use a temporary buffer
21545 REAL_DEV for the working space. Copy it to DEV before returning.
21546 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
21547 buffer cache consistent.
21548 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
21549 strncmp. The previous value was merely wrong.
21550 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
21551
21552 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
21553 FAT size is 12. The previous value was merely wrong.
21554
21555 * kern/main.c (pupa_main): Don't split the starting message from
21556 newlines.
21557
21558 * kern/term.c (pupa_putchar): Put CR after LF instead of before
21559 LF, because BIOS goes crazy about character attributes in this
21560 case.
21561
1cc73a62 215622003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
21563
21564 * include/i386/pc/util/biosdisk.h: New file.
21565 * util/i386/pc/biosdisk.c: Likewise.
21566 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 21567
1cc73a62 21568 * Makefile.in (INCLUDE_DISTFILES): Added
21569 include/pupa/i386/pc/util/biosdisk.h.
21570 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
21571 directory util/i386/pc.
21572 (install-local): Added a rule for sbin_UTILITIES.
21573 (uninstall): Likewise.
21574
21575 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
21576
21577 * util/misc.c (xrealloc): New function.
21578 (pupa_malloc): Likewise.
21579 (pupa_free): Likewise.
21580 (pupa_realloc): Likewise.
21581 (pupa_stop): Likewise.
21582 (pupa_putchar): Likewise.
21583
21584 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
21585
21586 * include/pupa/util/misc.h (xrealloc): Declared.
21587
21588 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
21589 macro.
21590 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
21591 (PUPA_BOOT_MACHINE_BPB_END): ... this.
21592
21593 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
21594 [PUPA_UTIL] (pupa_fat_fini): Likewise.
21595
21596 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
21597 way should be implemented.
21598 [PUPA_UTIL] (pupa_fat_fini): Likewise.
21599
21600 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
21601 the size of NAME for safety.
21602 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
21603 0x88.
21604
21605 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
21606 (pupa_setup_SOURCES): Likewise.
21607
21608 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
21609
08b70fe8 216102002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
21611
21612 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
21613 bunch of pushl's from pusha, because this destroys the return
21614 value.
21615
62ddcc8f 216162002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
21617
21618 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
21619 This means that any missing prototypes could be fatal. Also, you
21620 must take care when writing assembly code. See the comments at
21621 the beginning of startup.S, for more details.
f19dbdb7 21622
62ddcc8f 21623 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
21624 compilation mechanism.
21625 (pupa_chainloader_real_boot): Likewise.
21626 (pupa_biosdisk_rw_int13_extensions): Likewise.
21627 (pupa_biosdisk_rw_standard): Likewise.
21628 (pupa_biosdisk_check_int13_extensions): Likewise.
21629 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
21630 (pupa_biosdisk_get_diskinfo_standard): Likewise.
21631 (pupa_get_memsize): Likewise.
21632 (pupa_get_mmap_entry): Likewise.
21633 (pupa_console_putchar): Likewise.
21634 (pupa_console_setcursor): Likewise.
21635 (pupa_getrtsecs): Use pushl instead of push.
21636
21637 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
21638 memory instead of the stack for a mmap entry, because some
21639 BIOSes may ignore the maximum size and overflow.
21640
21641 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
21642
21643 * genmk.rb (PModule#rule): Compile automatically generated
21644 sources with module-specific CFLAGS as well as other sources.
21645
9962ed99 216462002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
21647
21648 * configure.ac: Check ld.
21649 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
21650 respectively, before checking endianness and sizes.
21651
21652 * Makefile.in (LD): New variable.
f19dbdb7 21653
abdfc3c5 216542002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
21655
21656 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
21657
6a161fa9 216582002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
21659
21660 * Changelog: New file.
21661