]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-01-17 Felix Zielcke <fzielcke@z-51.de>
[grub2.git] / ChangeLog
CommitLineData
4fa80998 12009-01-17 Felix Zielcke <fzielcke@z-51.de>
2
3 * Makefile.in: Change font compilation to use new grub-mkfont instead
4 of java version.
5
6 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
7 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
8 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
9 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
10 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
11 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
12 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
13 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
14 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
15
7086085b 162009-01-16 Christian Franke <franke@computer.org>
17
18 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
19 (enum grub_ata_timeout_milliseconds): New enum.
20 (grub_ata_wait_status): Add parameter milliseconds.
21 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
22 recovery from timed-out commands.
23 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
24 return grub_errno instead of REG_ERROR.
25 (grub_ata_pio_write): Add parameter milliseconds.
26 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
27 Pass milliseconds to grub_ata_wait_status () and
28 grub_ata_pio_read ().
29 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
30 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
31 grub_ata_wait_status (). Fix IDENTIFY timeout check.
32 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
33 It is not suitable for device detection, because DEV bit is ignored,
34 the command may run too long, and not all devices set the signature
35 properly.
36 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
37 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
38 Fix device selection, DEV bit must be set first to address the registers
39 of the correct device.
40 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
41 grub_ata_pio_read/write ().
42 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
43 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
44
4a412913 452009-01-13 Carles Pina i Estany <carles@pina.cat>
46
47 * util/grub-editenv.c (main): Use fseeko(), not fseek().
48
7795c55e 492009-01-13 Bean <bean123ch@gmail.com>
d913988c 50
51 * util/grub-mkfont.c (write_font): forget to remove some debug code.
52
7795c55e 532009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 54
55 * Makefile.in: (enable_grub_mkfont): New variable.
56 (freetype_cflags): Likewise.
57 (freetype_libs): Likewise.
58
59 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
60 (grub_mkfont_SOURCES): New variable.
61 (grub_mkfont_CFLAGS): Likewise.
62 (grub_mkfont_LDFLAGS): Likewise.
63
64 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
65 library if `--enable-grub-mkfont' is requested.
66 (enable_grub_mkfont): New variable.
67 (freetype_cflags): Likewise.
68 (freetype_libs): Likewise.
69
70 * util/grub-mkfont.c: New file.
71
093af1fe 722009-01-12 Christian Franke <franke@computer.org>
73
74 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
75 mode check. Fix setting of compat_use[].
76
f36cc108 772009-01-10 Robert Millan <rmh@aybabtu.com>
78
79 Update a few copyright years which we forgot to do in 2008 (only for
80 files whose changes made in 2008 were copyright-significant)
81
82 * Makefile.in: Add 2008 to Copyright line.
83 * disk/ieee1275/ofdisk.c: Likewise.
84 * disk/efi/efidisk.c: Likewise.
85 * kern/dl.c: Likewise.
86 * kern/sparc64/ieee1275/init.c: Likewise.
87 * kern/mm.c: Likewise.
88 * kern/efi/mm.c: Likewise.
89 * boot/i386/pc/boot.S: Likewise.
90 * genfslist.sh: Likewise.
91 * fs/iso9660.c: Likewise.
92 * fs/hfs.c: Likewise.
93 * fs/jfs.c: Likewise.
94 * fs/minix.c: Likewise.
95 * fs/ufs.c: Likewise.
96 * gensymlist.sh.in: Likewise.
97 * genkernsyms.sh.in: Likewise.
98 * include/grub/misc.h: Likewise.
99 * include/grub/types.h: Likewise.
100 * include/grub/symbol.h: Likewise.
101 * include/grub/elf.h: Likewise.
102 * include/grub/kernel.h: Likewise.
103 * include/grub/disk.h: Likewise.
104 * include/grub/dl.h: Likewise.
105 * include/grub/i386/linux.h: Likewise.
106 * include/grub/i386/pc/biosdisk.h: Likewise.
107 * include/grub/efi/api.h: Likewise.
108 * include/grub/efi/pe32.h: Likewise.
109 * include/grub/util/misc.h: Likewise.
110 * normal/execute.c: Likewise.
111 * normal/arg.c: Likewise.
112 * normal/completion.c: Likewise.
113 * normal/lexer.c: Likewise.
114 * normal/parser.y: Likewise.
115 * normal/misc.c: Likewise.
116 * commands/i386/pc/vbeinfo.c: Likewise.
117 * commands/hexdump.c: Likewise.
118 * commands/terminal.c: Likewise.
119 * commands/ls.c: Likewise.
120 * commands/help.c: Likewise.
121 * partmap/pc.c: Likewise.
122 * loader/efi/chainloader.c: Likewise.
123 * loader/multiboot_loader.c: Likewise.
124 * loader/i386/pc/multiboot2.c: Likewise.
125 * term/efi/console.c: Likewise.
126 * term/i386/pc/serial.c: Likewise.
127 * util/lvm.c: Likewise.
128 * util/console.c: Likewise.
129 * util/i386/efi/grub-mkimage.c: Likewise.
130 * util/raid.c: Likewise.
131
7f02114b 1322009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
133
134 * commands/videotest.c: Removed include to grub/machine/memory.h.
135
136 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
137 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
138 (video_mod_SOURCES): Removed.
139 (video_mod_CFLAGS): Likewise.
140 (video_mod_LDFLAGS): Likewise.
141 (gfxterm_mod_SOURCES): Likewise.
142 (gfxterm_mod_CFLAGS): Likewise.
143 (gfxterm_mod_LDFLAGS): Likewise.
144 (videotest_mod_SOURCES): Likewise.
145 (videotest_mod_CFLAGS): Likewise.
146 (videotest_mod_LDFLAGS): Likewise.
147 (bitmap_mod_SOURCES): Likewise.
148 (bitmap_mod_CFLAGS): Likewise.
149 (bitmap_mod_LDFLAGS): Likewise.
150 (tga_mod_SOURCES): Likewise.
151 (tga_mod_CFLAGS): Likewise.
152 (tga_mod_LDFLAGS): Likewise.
153 (jpeg_mod_SOURCES): Likewise.
154 (jpeg_mod_CFLAGS): Likewise.
155 (jpeg_mod_LDFLAGS): Likewise.
156 (png_mod_SOURCES): Likewise.
157 (png_mod_CFLAGS): Likewise.
158 (png_mod_LDFLAGS): Likewise.
159
160 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
161 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
162 (video_mod_SOURCES): Added.
163 (video_mod_CFLAGS): Likewise.
164 (video_mod_LDFLAGS): Likewise.
165 (videotest_mod_SOURCES): Likewise.
166 (videotest_mod_CFLAGS): Likewise.
167 (videotest_mod_LDFLAGS): Likewise.
168 (bitmap_mod_SOURCES): Likewise.
169 (bitmap_mod_CFLAGS): Likewise.
170 (bitmap_mod_LDFLAGS): Likewise.
171 (tga_mod_SOURCES): Likewise.
172 (tga_mod_CFLAGS): Likewise.
173 (tga_mod_LDFLAGS): Likewise.
174 (jpeg_mod_SOURCES): Likewise.
175 (jpeg_mod_CFLAGS): Likewise.
176 (jpeg_mod_LDFLAGS): Likewise.
177 (png_mod_SOURCES): Likewise.
178 (png_mod_CFLAGS): Likewise.
179 (png_mod_LDFLAGS): Likewise.
180 (gfxterm_mod_SOURCES): Likewise.
181 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 182 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 183
184 * term/gfxterm.c: Removed include to grub/machine/memory.h,
185 grub/machine/console.h.
186
644fff97 1872009-01-04 Jerone Young <jerone@gmail.com>
188
189 Make on screen instructions clearer
190
191 Based on patch created by Jidanni <jidanni@jidanni.org>
192
193 * normal/menu.c: print clearer instructions on the screen
194
1e901a75 1952009-01-02 Colin D Bennett <colin@gibibit.com>
196
197 New font engine.
34c44600 198
1e901a75 199 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
200 build system and fixed gfxterm.c to work with different sized fonts.
201
202 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 203
1e901a75 204 * configure: Re-generated.
34c44600 205
1e901a75 206 * DISTLIST: Removed font/manager.c.
207 Added font/font.c.
208 Added font/font_cmd.c.
34c44600 209
1e901a75 210 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
211 compilation.
34c44600 212
1e901a75 213 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 214
215 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 216
217 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 218
1e901a75 219 * normal/menu.c: Likewise.
34c44600 220
1e901a75 221 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
222 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 223
1e901a75 224 * include/grub/font.h: Replaced with new file.
34c44600 225
1e901a75 226 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
227 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
228 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
229 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
230 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 231 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 232 fg_red, fg_green, fg_blue, fg_alpha.
233 (grub_video_adapter): Removed blit_glyph.
34c44600 234 (grub_video_blit_glyph): Removed.
235
1e901a75 236 * font/manager.c: Removed file.
34c44600 237
238 * font/font.c: New file.
239
1e901a75 240 * font/font_cmd.c: Likewise.
34c44600 241
1e901a75 242 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 243
1e901a75 244 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
245 (grub_video_vbe_map_rgba): Likewise.
246 (grub_video_vbe_unmap_color_int): Likewise.
247 (grub_video_vbe_blit_glyph): Removed.
248 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 249
1e901a75 250 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
251 (get_pixel): Likewise.
34c44600 252 (set_pixel): Likewise.
253
1e901a75 254 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 255
1e901a75 256 * term/gfxterm.c: Adapted to new font engine.
34c44600 257
1e901a75 258 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 259
1e901a75 260 * term/i386/pc/vga.c: Likewise.
34c44600 261
1e901a75 262 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 263
1e901a75 264 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 265
1e901a75 266 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 267
1e901a75 268 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 269
1e901a75 270 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 271
1e901a75 272 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 273
1e901a75 274 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 275
1e901a75 276 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 277
1e901a75 278 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
279
280 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 281
1e901a75 282 * util/grub-mkconfig_lib.in: Changed font extension.
283
278922e8 2842008-12-28 Felix Zielcke <fzielcke@z-51.de>
285
286 * util/getroot.c (grub_util_get_grub_dev): Add support for
287 /dev/md/dNNpNN style partitionable mdraid devices.
288
3ced05cf 2892008-12-12 Alex Smith <alex@alex-smith.me.uk>
290
291 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
292 at a time limit of the PXE TFTP API correctly.
293 (grub_pxefs_close): Likewise.
294
7fd0ee30 2952008-11-29 Robert Millan <rmh@aybabtu.com>
296
34c44600 297 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 298 grub_ata_device_initialize() calls.
299
34c44600 3002008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 301
302 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
303 iteration failed.
304 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
305
89313780 3062008-11-28 Robert Millan <rmh@aybabtu.com>
307
308 Fix build on powerpc-ieee1275. Based on patch created by
309 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
310 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
311 `kern/ieee1275/mmap.c'.
312 * include/grub/powerpc/ieee1275/memory.h: New file.
313
15257703 314 Provide grub-install on coreboot.
315 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
316 (grub_install_SOURCES): New variable.
317 * util/i386/pc/grub-install.in: Add a few condition checks to make it
318 usable on coreboot.
319
9fc5388a 3202008-11-25 Felix Zielcke <fzielcke@z-51.de>
321
322 * util/grub-fstest.c (grub_term_get_current_input): Change return type
323 to `grub_term_input_t'.
324 (grub_term_get_current_output): Change return type to
325 `grub_term_output_t'.
326
bc3a2f31 3272008-11-22 Robert Millan <rmh@aybabtu.com>
328
34c44600 329 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 330 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
331 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
332 grub_vga_text_cls().
333
80fc88f2 334 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 335 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 336
cbf36fd3 337 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
338 to 0x200000 (avoids trouble with some OFW implementations, and matches
339 with the one in Yaboot).
340 Reported by Manoel Abranches
341
73e8e268 3422008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 343
344 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
345 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
346
73e8e268 347 * util/grub-mkconfig_lib.in (grub_warn): New function.
348 (convert_system_path_to_grub_path): Use grub_warn() when issuing
349 warnings, to obtain consistent formatting.
350 * util/grub.d/00_header.in: Likewise.
351 * util/update-grub_lib.in: Likewise.
352
e94045a1 353 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 354 Move comment text to `#error' stanza.
e94045a1 355
79d29fd7 356 Harmonize ieee1275's grub_available_iterate() with the generic
357 grub_machine_mmap_iterate() interface (fixes a recently-introduced
358 build problem on i386-ieee1275):
359 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
360 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
361 parameter `type'. Update all users of this function.
362 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
363 `kern/ieee1275/mmap.c'.
364 * kern/ieee1275/init.c
365 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
366 with ...
367 (grub_machine_mmap_iterate): ... this.
368 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
369 return type to `grub_err_t'. Update all implementations of this
370 function prototype.
371 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
372 Likewise.
373
60d6b16e 374 Add `lsmmap' command (lists firmware-provided memory map):
375 * commands/lsmmap.c: New file.
376 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
377 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
378 variables.
379 * conf/powerpc-ieee1275.rmk: Likewise.
380 * conf/i386-coreboot.rmk: Likewise.
381 * conf/i386-ieee1275.rmk: Likewise.
382
ebaaf49b 3832008-11-19 Robert Millan <rmh@aybabtu.com>
384
385 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 386 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
387 constraints to initrd allocation (based on code from
388 loader/i386/pc/linux.c). Without them, initrd was allocated too high
389 for Linux to find it.
ebaaf49b 390
dfab719f 3912008-11-14 Robert Millan <rmh@aybabtu.com>
392
393 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
394 order to cope with duplicate slashes.
395
10fc3eb9 3962008-11-14 Robert Millan <rmh@aybabtu.com>
397
398 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
399 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
400 don't want to mess with lower memory, because it is used in the Linux
401 loader.
402
403 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 404 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 405 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
406 is in our heap (probably as a result of it being corrupted during
2f2a3442 407 decompression). Add #error instance with comment to explain why this
408 loader isn't currently usable on PC/BIOS.
10fc3eb9 409
e2e07847 4102008-11-14 Robert Millan <rmh@aybabtu.com>
411
412 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 413 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 414
fe8e8d69 4152008-11-12 Robert Millan <rmh@aybabtu.com>
416
417 Make loader/i386/linux.c buildable on i386-pc (although disabled).
418
419 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
420 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
421 from here ...
422 * include/grub/i386/pc/memory.h: ... to here.
423
976b07d0 4242008-11-12 Robert Millan <rmh@aybabtu.com>
425
426 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
427 split).
428
429 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
430 (grub_console_cur_color, grub_console_real_putchar)
431 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
432 (grub_console_setcolorstate, grub_console_setcolor)
433 (grub_console_getcolor): Move from here ...
434 * include/grub/i386/vga_common.h: ... to here (new file).
435
436 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
437 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
438 `<grub/i386/io.h>'.
439 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
440 `<grub/i386/vga_common.h>'.
441
76679cd3 4422008-11-12 Robert Millan <rmh@aybabtu.com>
443
444 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
445 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
446 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
447 variables.
448 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
449 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
450
451 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
452 grub_console_init() with call to grub_vga_text_init().
453 (grub_machine_fini): Replace call to
454 grub_console_fini() with call to grub_vga_text_fini() and
455 grub_at_keyboard_fini().
456
457 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
458 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
459 (grub_console_setcolorstate, grub_console_setcolor)
460 (grub_console_getcolor): New function prototypes.
461
462 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
463 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
464 (grub_vga_text_setcursor): Static-ize.
465 (grub_vga_text_term): New structure.
466 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
467
468 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
469 (grub_console_cur_color, grub_console_standard_color)
470 (grub_console_normal_color, grub_console_highlight_color)
471 (map_char, grub_console_putchar, grub_console_getcharwidth)
472 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
473 (grub_console_getcolor): Move from here ...
474 * term/i386/vga_common.c: ... to here (same function names).
475
95b841d3 4762008-11-12 Robert Millan <rmh@aybabtu.com>
477
478 Use newly-added Multiboot support in coreboot.
479
480 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
481 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
482
483 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
484 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
485 (codestart): Store the MBI in `startup_multiboot_info' when we're
486 being loaded using Multiboot.
487
488 * kern/i386/coreboot/init.c (grub_machine_init): Move
489 grub_at_keyboard_init() call to beginning of function (useful for
490 debugging). Call grub_machine_mmap_init() before attempting to use
491 grub_machine_mmap_iterate().
492 (grub_lower_mem, grub_upper_mem): Move from here ...
493 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
494 here (new file).
495
496 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
497 function prototype.
498
761ca975 4992008-11-12 Robert Millan <rmh@aybabtu.com>
500
501 Fix a regression introduced by the at_keyboard.mod split. Because
502 some terminals are default on some platforms and non-default on
503 others, the first terminal being registered determines which is
504 going to be default.
505
506 * kern/term.c (grub_term_register_input): If this is the first
507 terminal being registered, set it as the current one.
508 (grub_term_register_output): Likewise.
509
510 * term/efi/console.c (grub_console_init): Do not call
511 grub_term_set_current_output() or grub_term_set_current_input().
512 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
513 * term/i386/pc/console.c (grub_console_init): Likewise.
514 (grub_console_fini): Do not call grub_term_set_current_input()
515 (but leave grub_term_set_current_output() to restore text mode).
516
6c529df7 5172008-11-10 Robert Millan <rmh@aybabtu.com>
518
519 * util/grub.d/00_header.in: Add backward compatibility check for
520 versions of terminal.mod that don't understand `terminal_input' or
521 `terminal_output'.
522
132e4113 5232008-11-09 Robert Millan <rmh@aybabtu.com>
524
525 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
526 `terminal_input' / `terminal_output', not `terminal'.
527
ac293d50 5282008-11-08 Robert Millan <rmh@aybabtu.com>
529
530 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 531 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 532
0025933a 5332008-11-08 Robert Millan <rmh@aybabtu.com>
534
535 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 536 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 537 members. Update all users.
538 * util/console.c (grub_ncurses_term): Split in ...
539 (grub_ncurses_term_input): ... this, and ...
540 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 541 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 542
37c86336 5432008-11-08 Robert Millan <rmh@aybabtu.com>
544
545 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
546 (PKGDATA): Add $(pkgdata_SRCDIR).
547 (pkglib_BUILDDIR): New variable.
548 (pkgdata_SRCDIR): New variable.
549 (build_env.mk): New target.
550 (include_DATA): New variable.
551 (install-local): Install $(include_DATA) files in $(includedir).
552
b6c15a2d 5532008-11-07 Pavel Roskin <proski@gnu.org>
554
d99d46f1 555 * gendistlist.sh: Use C locale for sorting to ensure consistent
556 output on all systems.
557
b6c15a2d 558 * util/grub.d/00_header.in: Remove incorrect space before
559 "serial".
560
c32ee8c9 5612008-11-07 Robert Millan <rmh@aybabtu.com>
562
563 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
564 per specification.
565 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
566 * loader/multiboot_loader.c (find_multi_boot2_header): New function
567 (based on find_multi_boot1_header).
568 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
569 using find_multi_boot2_header(), and abort if neither Multiboot or
570 Multiboot headers were found.
571
651c29b7 5722008-11-07 Robert Millan <rmh@aybabtu.com>
573
574 Modularize at_keyboard.mod:
575
576 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
577 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
578 (at_keyboard_mod_LDFLAGS): New variables.
579
580 Actual terminal split:
581
582 * include/grub/term.h (struct grub_term): Split in ...
583 (struct grub_term_input): ... this, and ...
584 (struct grub_term_output): ... this. Update all users.
585 (grub_term_set_current): Split in ...
586 (grub_term_set_current_input): ... this, and ...
587 (grub_term_set_current_output): ... this.
588 (grub_term_get_current): Split in ...
589 (grub_term_get_current_input): ... this, and ...
590 (grub_term_get_current_output): ... this.
591 (grub_term_register): Split in ...
592 (grub_term_register_input): ... this, and ...
593 (grub_term_register_output): ... this.
594 (grub_term_unregister): Split in ...
595 (grub_term_unregister_input): ... this, and ...
596 (grub_term_unregister_output): ... this.
597 (grub_term_iterate): Split in ...
598 (grub_term_iterate_input): ... this, and ...
599 (grub_term_iterate_output): ... this.
600
601 * kern/term.c (grub_term_list): Split in ...
602 (grub_term_list_input): ... this, and ...
603 (grub_term_list_output): ... this. Update all users.
604 (grub_cur_term): Split in ...
605 (grub_cur_term_input): ... this, and ...
606 (grub_cur_term_output): ... this. Update all users.
607 (grub_term_set_current): Split in ...
608 (grub_term_set_current_input): ... this, and ...
609 (grub_term_set_current_output): ... this.
610 (grub_term_get_current): Split in ...
611 (grub_term_get_current_input): ... this, and ...
612 (grub_term_get_current_output): ... this.
613 (grub_term_register): Split in ...
614 (grub_term_register_input): ... this, and ...
615 (grub_term_register_output): ... this.
616 (grub_term_unregister): Split in ...
617 (grub_term_unregister_input): ... this, and ...
618 (grub_term_unregister_output): ... this.
619 (grub_term_iterate): Split in ...
620 (grub_term_iterate_input): ... this, and ...
621 (grub_term_iterate_output): ... this.
622
623 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
624 a check for input and one for output (and only attempt to get keys
625 from user when input works).
626
627 * util/grub-probe.c (grub_term_get_current): Split in ...
628 (grub_term_get_current_input): ... this, and ...
629 (grub_term_get_current_output): ... this.
630 * util/grub-fstest.c: Likewise.
631 * util/i386/pc/grub-setup.c: Likewise.
632 * util/grub-editenv.c: Likewise.
633
634 Portability adjustments:
635
636 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
637 `term/i386/pc/at_keyboard.c'.
638 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
639 grub_keyboard_controller_init() (now handled by terminal .init).
640 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
641 grub_at_keyboard_init().
642 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
643 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
644 at_keyboard.mod via input terminal interface).
645 * include/grub/i386/coreboot/console.h: Convert into a stub for
646 `<grub/i386/pc/console.h>'.
647
648 Migrate full terminals to new API:
649
650 * term/efi/console.c (grub_console_term): Split into ...
651 (grub_console_term_input): ... this, and ...
652 (grub_console_term_output): ... this. Update all users.
653 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
654 (grub_ofconsole_init): Split into ...
655 (grub_ofconsole_init_input): ... this, and ...
656 (grub_ofconsole_init_output): ... this.
657 (grub_ofconsole_term): Split into ...
658 (grub_ofconsole_term_input): ... this, and ...
659 (grub_ofconsole_term_output): ... this. Update all users.
660 * term/i386/pc/serial.c (grub_serial_term): Split into ...
661 (grub_serial_term_input): ... this, and ...
662 (grub_serial_term_output): ... this. Update all users.
663 * term/i386/pc/console.c (grub_console_term): Split into ...
664 (grub_console_term_input): ... this, and ...
665 (grub_console_term_output): ... this. Update all users.
666 (grub_console_term_input): Only enable it on PC/BIOS platform.
667 (grub_console_init): Remove grub_keyboard_controller_init() call.
668
669 Migrate input terminals to new API:
670
671 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
672 `i386' and `i386/pc' to enable build on x86_64 (this driver is
673 i386-specific anyway).
674 (grub_console_checkkey): Rename to ...
675 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
676 users.
677 (grub_keyboard_controller_orig): New variable.
678 (grub_console_getkey): Rename to ...
679 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
680 users.
681 (grub_keyboard_controller_init): Static-ize. Save original
682 controller value so that it can be restored ...
683 (grub_keyboard_controller_fini): ... here (new function).
684 (grub_at_keyboard_term): New structure.
685 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
686 functions.
687
688 Migrate output terminals to new API:
689
690 * term/i386/pc/vga.c (grub_vga_term): Change type to
691 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
692 members. Update all users.
693 * term/gfxterm.c (grub_video_term): Change type to
694 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
695 members. Update all users.
696 * include/grub/i386/pc/console.h (grub_console_checkkey)
697 (grub_console_getkey): Do not export (no longer needed by gfxterm,
698 etc).
699
700 Migrate `terminal' command and userland tools to new API:
701
702 * commands/terminal.c (grub_cmd_terminal): Split into ...
703 (grub_cmd_terminal_input): ... this, and ...
704 (grub_cmd_terminal_output): ... this.
705 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
706 `terminal_input' and `terminal_output'.
707 * util/grub.d/00_header.in: Adjust `terminal' calls to new
708 `terminal_input' / `terminal_output' API.
709 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
710 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
711 provided ${GRUB_TERMINAL}, convert it).
712
96e5d876 7132008-11-04 Robert Millan <rmh@aybabtu.com>
714
715 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
716 for FreeBSD.
717 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
718
556f3775 7192008-11-03 Bean <bean123ch@gmail.com>
720
721 * kern/elf.c (grub_elf32_load): Revert to previous code.
722 (grub_elf64_load): Likewise.
723
724 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
725
926b9823 7262008-11-01 Robert Millan <rmh@aybabtu.com>
727
728 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
729 (TARGET_CPPFLAGS): Likewise.
730 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
731
1432e958 7322008-11-01 Carles Pina i Estany <carles@pina.cat>
733
734 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
735
dba3f844 7362008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 737
738 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
739 addition of objects until the code is not going to be able to fail.
740
dba3f844 7412008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 742
743 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
744 (add a missing NULL check, and correct them by moving the pointer
745 operations after the actual check).
746
7ab28c21 7472008-10-29 Robert Millan <rmh@aybabtu.com>
748
749 * util/i386/pc/grub-install.in: Handle empty string as output from
750 make_system_path_relative_to_its_root().
751
1b7748eb 7522008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
753
754 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
755 circular metadata worst case scenario. If the metadata is circular
756 then copy the wrap in place.
757 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
758 project lib/format_text/layout.h
759 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
760
c9618ab2 7612008-10-03 Felix Zielcke <fzielcke@z-51.de>
762
7a36edca 763 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 764
bf981c62 7652008-10-03 Felix Zielcke <fzielcke@z-51.de>
766
767 * util/update-grub_lib.in: Mention filename in warning message.
768
6d994591 7692008-09-29 Felix Zielcke <fzielcke@z-51.de>
770
771 * NEWS: Update for rename of update-grub to grub-mkconfig.
772
18ade780 7732008-09-29 Felix Zielcke <fzielcke@z-51.de>
774
775 * util/update-grub_lib.in: Copy to ...
776 * util/grub-mkconfig_lib.in: ... this. Update all users.
777 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
778 * util/update-grub.in: Rename to ...
779 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
780 option. Add `--output' option to allow users to specify the generated
781 configuration file. Default to stdout.
782 (update_grub_dir): Rename to ...
783 (grub_mkconfig_dir): ... this.
784 (grub_cfg): Default to an empty string.
785 * conf/common.rmk (update-grub): Rename to ...
786 (grub-mkconfig): ... this.
787 (update-grub_lib): Copy to ...
788 (grub-mkconfig_lib): ... this.
789 (update-grub_SCRIPTS): Copy to ...
790 (grub-mkconfig_SCRIPTS): ... this. Update all users.
791 (update-grub_DATA): Rename to ...
792 (grub-mkconfig_DATA): ... this.
793
556ce6ac 7942008-09-28 Robert Millan <rmh@aybabtu.com>
795
796 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
797 to `modified'. Add the real `created' field.
798 (grub_iso9660_uuid): Use `modified' rather than `created' for
799 constructing the UUID.
800
8012008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 802
803 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
804 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
805
92274e85 8062008-09-28 Bean <bean123ch@gmail.com>
807
808 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
809 Thanks to Christian Franke for finding this bug.
810
add6f17a 8112008-09-25 Robert Millan <rmh@aybabtu.com>
812
813 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
814 instances of grub_util_get_disk_name() (see previous commit).
815
d2a367b8 8162008-09-25 Robert Millan <rmh@aybabtu.com>
817
818 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
819 `util/i386/get_disk_name.c'.
820 * conf/i386-efi.rmk: Likewise.
821 * conf/x86_64-efi.rmk: Likewise.
822 * conf/i386-coreboot.rmk: Likewise.
823 * conf/i386-ieee1275.rmk: Likewise.
824 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
825 `util/ieee1275/get_disk_name.c'.
826 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
827 * util/ieee1275/get_disk_name.c: Remove file.
828 * util/i386/get_disk_name.c: Remove file.
829 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
830 "hd%d" for device.map entries, rather than using
831 grub_util_get_disk_name().
832
81a06771 8332008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 834
835 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
836 warning.
837 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
838
5a004279 8392008-09-24 Carles Pina i Estany <carles@pina.cat>
840
841 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
842 Changed to 0x5100.
843 (GRUB_TERM_PPAGE): Changed to 0x4900.
844
397093d3 8452008-09-24 Robert Millan <rmh@aybabtu.com>
846
847 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
848 macros (they were i386-pc specific).
849 * include/grub/sparc64/ieee1275/console.h: Likewise.
850 * include/grub/efi/console.h: Likewise.
851
a91b6c7c 8522008-09-22 Bean <bean123ch@gmail.com>
853
854 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
855 resident and in attribute list.
856
857 * include/grub/ntfs.h (BMP_LEN): Removed.
858
c40fd116 8592008-09-22 Bean <bean123ch@gmail.com>
860
81a06771 861 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 862 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
863
864 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
865 error occurs, as grub_disk_open will call grub_disk_close, which will
866 call p->close (scsi).
867
81a06771 8682008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 869
870 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
871 (AC_PREREQ): Bumped to 2.59.
872 (AC_TRY_COMPILE): Replace obsolete macro with ...
873 (AC_COMPILE_IFELSE): ... this.
874 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
875 (AC_LINK_IFELSE): ... this.
876
5dc43410 8772008-09-21 Felix Zielcke <fzielcke@z-51.de>
878
879 * autogen.sh: Add a call to `gendistlist.sh'.
880
9035dce4 8812008-09-19 Christian Franke <franke@computer.org>
882
883 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
884 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
885 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
886 Export __enable_execute_stack() to modules.
887 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
888 New function.
889
7fd75377 8902008-09-09 Felix Zielcke <fzielcke@z-51.de>
891
040030b3 892 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
893 Sort the list.
894
8952008-09-09 Felix Zielcke <fzielcke@z-51.de>
896
897 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 898 #include <grub/util/hostdisk.h>.
899
89d5ffcf 9002008-09-08 Robert Millan <rmh@aybabtu.com>
901
902 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
903 segments when their filesz is zero (grub_file_read() interprets
81a06771 904 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 905 Use `lowest_segment' rather than 0 for calculating the current
906 segment load address.
907
40da438f 9082008-09-08 Robert Millan <rmh@aybabtu.com>
909
910 * util/hostdisk.c (open_device): Replace a grub_util_info() call
911 with grub_dprintf("hostdisk", ...), as it was so verbose that it
912 clobbered useful information.
913
ddbf5556 9142008-09-08 Robert Millan <rmh@aybabtu.com>
915
916 * include/grub/util/biosdisk.h: Move to ...
917 * include/grub/util/hostdisk.h: ... here. Update all users.
918 * util/biosdisk.c: Move to ...
919 * util/hostdisk.c: ... here. Update all users.
920
783d0f48 9212008-09-07 Robert Millan <rmh@aybabtu.com>
922
923 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
924 variables.
925 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
926 and length can be stored directly in the `mbi->mmap_addr' and
927 `mbi->mmap_length' struct fields.
928
548e2ea5 9292008-09-07 Robert Millan <rmh@aybabtu.com>
930
931 * conf/i386.rmk: New file. Provides declaration for building
932 `cpuid.mod'.
933 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
934 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
935 variables.
936 Include `conf/i386.mk'.
937 * conf/i386-efi.rmk: Likewise.
938 * conf/x86_64-efi.rmk: Likewise.
939 * conf/i386-coreboot.rmk: Likewise.
940 * conf/i386-ieee1275.rmk: Likewise.
941
0ea85a37 9422008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
943
944 Based on patch created by Colin D Bennett <colin@gibibit.com>.
945 Adds optimization support for BGR based modes.
946
947 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
948 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
949 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
950 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
951 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
952 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
953 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
954 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
955 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
956 (grub_video_i386_vbeblit_index_index): Likewise.
957 (grub_video_i386_vbeblit_replace_directN): Added.
958 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
959 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
960 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
961 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
962 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
963 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 964 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 965 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
966 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
967 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
968 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
969 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
970 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
971
972 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
973 (grub_video_i386_vbefill_R8G8B8): Likewise.
974 (grub_video_i386_vbefill_index): Likewise.
975 (grub_video_i386_vbefill_direct32): Added.
976 (grub_video_i386_vbefill_direct24): Likewise.
977 (grub_video_i386_vbefill_direct16): Likewise.
978 (grub_video_i386_vbefill_direct8): Likewise.
979
81a06771 980 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 981 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
982 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
983 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
984 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
985 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 986
0ea85a37 987 * video/video.c (grub_video_get_blit_format): Updated to use new
988 blit formats. Added handling for 16 bit color modes.
81a06771 989
990 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 991 fillers.
992 (common_blitter): Updated to use new blitters.
993
994 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
995 Removed.
996 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
997 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
998 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
999 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1000 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1001 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1002 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1003 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1004 (grub_video_i386_vbeblit_index_index): Likewise.
1005 (grub_video_i386_vbeblit_replace_directN): Added.
1006 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1007 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1008 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1009 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1010 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1011 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1012 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1013 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1014 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1015 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1016 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1017 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1018 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 1019
0ea85a37 1020 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1021 (grub_video_i386_vbefill_R8G8B8): Likewise.
1022 (grub_video_i386_vbefill_index): Likewise.
1023 (grub_video_i386_vbefill_direct32): Added.
1024 (grub_video_i386_vbefill_direct24): Likewise.
1025 (grub_video_i386_vbefill_direct16): Likewise.
1026 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 1027
0ea85a37 1028 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1029 types.
81a06771 1030
0ea85a37 1031 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1032 types.
81a06771 1033
0ea85a37 1034 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1035 blitter types.
81a06771 1036
0ea85a37 1037 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1038 types.
1039
e8a83df6 10402008-09-06 Felix Zielcke <fzielcke@z-51.de>
1041
1042 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1043 RAID level 1.
1044
6bcd8ee5 10452008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 1046
6bcd8ee5 1047 * fs/iso9660.c (grub_iso9660_date): New structure.
1048 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1049 (grub_iso9660_uuid): New function.
c375ae58 1050
59261157 10512008-09-05 Bean <bean123ch@gmail.com>
1052
1053 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1054
1055 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1056 insensitive bit for names in Win32 and Win32 & DOS namespace.
1057
1058 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1059
1060 * include/grub/types.h (LONG_MAX): Likewise.
1061
58b6645a 10622008-09-04 Felix Zielcke <fzielcke@z-51.de>
1063
4ee55921 1064 * util/getroot.c: Include <config.h>.
1065 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1066 add support for /dev/md/N devices and handle LVM double dash escaping.
1067
10682008-09-04 Felix Zielcke <fzielcke@z-51.de>
1069
1070 * config.guess: Update to latest version from config git.
1071 * config.sub: Likewise.
58b6645a 1072
9124f65d 10732008-09-03 Robert Millan <rmh@aybabtu.com>
1074
1075 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1076 `disk->total_sectors'.
1077
81a06771 10782008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 1079
1080 * include/grub/normal.h: Fixed incorrect comment for
1081 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1082
81a06771 10832008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 1084
1085 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1086 values with defines.
1087
1088 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1089 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1090 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1091 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1092 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1093 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1094 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1095 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1096 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1097 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1098 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1099 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1100 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1101 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1102 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1103 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1104 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1105 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1106 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1107
93d5cbf8 11082008-08-31 Robert Millan <rmh@aybabtu.com>
1109
1110 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1111 declaration.
1112 (grub_multiboot): Fix a few warnings.
1113
21751d50 11142008-08-31 Robert Millan <rmh@aybabtu.com>
1115
1116 * loader/i386/pc/multiboot.c: Update comment not to say that
1117 boot_device support is unimplemented.
1118
e27a75c5 11192008-08-31 Robert Millan <rmh@aybabtu.com>
1120
1121 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1122 or memory map support are unimplemented.
1123
81a06771 11242008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 1125
1126 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1127
81a06771 11282008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 1129
1130 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1131 total video memory in 'vbeinfo' output; show color format details for
1132 each video mode.
1133
7c5d8d95 11342008-08-30 Pavel Roskin <proski@gnu.org>
1135
1136 * util/genmoddep.c: Remove for real this time.
1137 * DISTLIST: Remove util/genmoddep.c.
1138
4cebd25a 11392008-08-30 Robert Millan <rmh@aybabtu.com>
1140
1141 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1142 as required by Multiboot spec (it was already 4-byte aligned, but
1143 only by chance).
1144
b497a269 11452008-08-29 Pavel Roskin <proski@gnu.org>
1146
e3925185 1147 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1148 * kern/powerpc/ieee1275/startup.S: ... this.
1149 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1150 * DISTLIST: Likewise.
1151
b497a269 1152 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1153 grub/cpu/kernel.h. Add start label for consistency with other
1154 platforms. Add grub_prefix immediately after start. Add jump
1155 to the code after grub_prefix.
1156 * include/grub/powerpc/kernel.h: Provide valid values for
1157 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1158
6e5a42fe 11592008-08-29 Bean <bean123ch@gmail.com>
1160
1161 * configure.ac: Change host_os to cygwin for mingw.
1162 (asprintf): New check for function.
1163
1164 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1165 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1166
1167 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 1168 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 1169 sync, sleep and grub_util_get_disk_size for mingw.
1170
1171 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1172 to get size in mingw.
1173 (open_device): Use flag O_BINARY if it's defined.
1174 (find_root_device): Add dummy code for mingw.
1175
1176 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1177 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1178 (get_scsi_disk_name): Return 0 for mingw.
1179
1180 * util/hostfs.c: #include <grub/util/misc.h>.
1181 (grub_hostfs_open): Use "rb" flag to open file, use
1182 grub_util_get_disk_size to get disk size for mingw.
1183
1184 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1185 (asprintf): New function if HAVE_ASPRINTF is not set.
1186 (sync): New function for mingw.
1187 (sleep): Likewise.
1188 (grub_util_get_disk_size): Likewise.
1189
ab3f2673 11902008-08-28 Pavel Roskin <proski@gnu.org>
1191
1192 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1193 kern/time.c.
1194
1c282483 11952008-08-28 Robert Millan <rmh@aybabtu.com>
1196
1197 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1198
678e849c 11992008-08-28 Robert Millan <rmh@aybabtu.com>
1200
1201 Change find_grub_drive() syntax so it doesn't prevent it from
1202 detecting NULL names as errors.
1203
1204 * util/biosdisk.c (find_grub_drive): Move free slot search code
1205 from here ...
1206 (find_free_slot): ... to here.
1207 (read_device_map): Use find_free_slot() to search for free slots.
1208
965c75ca 12092008-08-27 Marco Gerards <marco@gnu.org>
1210
1211 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1212 (scsi_mod_SOURCES): New variable.
1213 (scsi_mod_CFLAGS): Likewise
1214 (scsi_mod_LDFLAGS): Likewise.
1215
1216 * disk/scsi.c: New file.
1217
1218 * include/grub/scsi.h: Likewise.
1219
1220 * include/grub/scsicmd.h: Likewise.
1221
1222 * disk/ata.c: Include <grub/scsi.h>.
1223 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1224 instead.
1225 (grub_ata_iterate): Skip ATAPI devices.
1226 (grub_ata_open): Only handle ATAPI devices.
1227 (struct grub_atapi_read): Removed.
1228 (grub_atapi_readsector): Likewise.
1229 (grub_ata_read): No longer handle ATAPI devices.
1230 (grub_ata_write): Likewise.
1231 (grub_atapi_iterate): New function.
1232 (grub_atapi_read): Likewise.
1233 (grub_atapi_write): Likewise.
1234 (grub_atapi_open): Likewise.
1235 (grub_atapi_close): Likewise.
1236 (grub_atapi_dev): New variable.
1237 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1238 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1239
1240 * include/grub/disk.h (enum grub_disk_dev_id): Add
1241 `GRUB_DISK_DEVICE_SCSI_ID'.
1242
c07ae501 12432008-08-26 Robert Millan <rmh@aybabtu.com>
1244
1245 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1246 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1247 descriptive.
1248
5ed20adc 12492008-08-23 Bean <bean123ch@gmail.com>
1250
1251 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1252 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1253 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1254 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1255 dm_nv.mod.
1256 (raid5rec_mod_SOURCES): New macro.
1257 (raid5rec_mod_CFLAGS): Likewise.
1258 (raid5rec_mod_LDFLAGS): Likewise.
1259 (raid6rec_mod_SOURCES): Likewise.
1260 (raid6rec_mod_CFLAGS): Likewise.
1261 (raid6rec_mod_LDFLAGS): Likewise.
1262 (mdraid_mod_SOURCES): Likewise.
1263 (mdraid_mod_CFLAGS): Likewise.
1264 (mdraid_mod_LDFLAGS): Likewise.
1265 (dm_nv_mod_SOURCES): Likewise.
1266 (dm_nv_mod_CFLAGS): Likewise.
1267 (dm_nv_mod_LDFLAGS): Likewise.
1268
1269 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1270 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1271 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1272
1273 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1274 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1275
1276 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1277
1278 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1279
1280 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1281
1282 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1283
1284 * disk/raid5_recover.c: New file.
1285
1286 * disk/raid6_recover.c: Likewise.
1287
1288 * disk/mdraid_linux.c: Likewise.
1289
1290 * disk/dmraid_nvidia.c: Likewise.
1291
1292 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1293 ULONG_MAX.
1294
1295 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1296 calculate the size of raid device.
1297 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1298 different layout of raid5.
1299 (grub_raid_scan_device): Remove code specific to mdraid.
1300 (grub_raid_list): New variable.
1301 (free_array): New function.
1302 (grub_raid_register): Likewise.
1303 (grub_raid_unregister): Likewise.
1304 (grub_raid_rescan): Likewise.
1305 (GRUB_MOD_INIT): Don't iterate device here.
1306 (GRUB_MOD_FINI): Use free_array to release resource.
1307
1308 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1309 (grub_raid5_recover_func_t): New function variable type.
1310 (grub_raid6_recover_func_t): Likewise.
1311 (grub_raid5_recover_func): New variable.
1312 (grub_raid6_recover_func): Likewise.
1313 (grub_raid_register): New function.
1314 (grub_raid_unregister): Likewise.
1315 (grub_raid_rescan): Likewise.
1316 (grub_raid_block_xor): Likewise.
1317
1318 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1319 (CMD_CRC): New macro.
1320 (part): Removed.
1321 (read_file): Handle device as well as file.
1322 (cmd_crc): New function.
1323 (fstest): Handle multiple disks.
1324 (options): Remove part, raw and long, add root and diskcount.
1325 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 1326 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 1327 add handling for the new options, support multiple disks.
1328
1329 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1330
29c18915 13312008-08-23 Bean <bean123ch@gmail.com>
1332
1333 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1334
1335 * genfslist.sh: Ignore kernel.mod.
1336
1337 * genpartmaplist.sh: Likewise.
1338
8415f261 13392008-08-23 Robert Millan <rmh@aybabtu.com>
1340
1341 * util/getroot.c (find_root_device): Skip anything that starts with
1342 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1343
d5a7dc5b 13442008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 1345
d5a7dc5b 1346 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1347 * util/grub.d/00_header.in: Allow the administrator to change default
1348 gfxmode via ${GRUB_GFXMODE}.
1349
380cfbb4 13502008-08-21 Felix Zielcke <fzielcke@z-51.de>
1351
1352 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1353
c9baafe7 13542008-08-21 Robert Millan <rmh@aybabtu.com>
1355
1356 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1357 loader.
1358 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1359 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1360
e290bef2 13612008-08-20 Carles Pina i Estany <carles@pina.cat>
1362
1363 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1364 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1365
f9dbfc96 13662008-08-19 Robert Millan <rmh@aybabtu.com>
1367
1368 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1369 (struct grub_virtual_screen): Remove `cursor_color'.
1370 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1371 initialization.
1372 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1373
dd6bd6ab 13742008-08-18 Robert Millan <rmh@aybabtu.com>
1375
1376 Unify (identical) linux_normal.c files.
1377 * loader/i386/efi/linux_normal.c: Move from here ...
1378 * loader/linux_normal.c: ... to here. Update all users.
1379 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1380 * loader/i386/ieee1275/linux_normal.c: Likewise.
1381
7f42f83e 13822008-08-18 Robert Millan <rmh@aybabtu.com>
1383
1384 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1385 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1386 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1387 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1388 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1389 New macros.
1390 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1391 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1392 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1393 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1394 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1395 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1396 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1397 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1398 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1399 portably using grub_getxy().
1400 Replace `-EFI' with `-bzImage' in boot message.
1401
38487ddb 14022008-08-17 Robert Millan <rmh@aybabtu.com>
1403
1404 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1405
deceb3ec 14062008-08-17 Robert Millan <rmh@aybabtu.com>
1407
1408 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1409
1410 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1411 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1412 (grub_machine_mmap_iterate): New function declaration.
1413 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1414 structure.
1415 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1416 macros.
1417
1418 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1419 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1420 Move e820 parsing from here ...
1421 * kern/i386/pc/mmap.c: New file.
1422 (grub_machine_mmap_iterate): ... to here.
1423
1424 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1425 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1426 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1427 (grub_available_iterate): Redeclare to return `void', and redeclare
1428 its hook to use grub_uint64_t as addr and size parameters, and rename
1429 to ...
1430 (grub_machine_mmap_iterate): ... this. Update all users.
1431
1432 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1433 to make it more readable. Rename to ...
1434 (grub_machine_mmap_iterate): ... this.
1435
1436 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1437 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1438 (grub_multiboot): Allocate an extra region after the payload, and fill
1439 it with a Multiboot memory map. Adjust a.out loader to calculate size
1440 with the extra space.
1441 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1442 with the extra space.
1443
f8aa0f43 14442008-08-17 Carles Pina i Estany <carles@pina.cat>
1445
9807deb9 1446 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 1447
605f5bb6 14482008-08-17 Felix Zielcke <fzielcke@z-51.de>
1449
1450 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1451 mdate-sh to the list `find' searches for.
1452 * DISTLIST: Regenerated.
1453
210db6c6 14542008-08-16 Felix Zielcke <fzielcke@z-51.de>
1455
1456 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1457 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 1458 genmoddep.awk, gensymlist.sh.in.
1459 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 1460 * DISTLIST: Regenerated.
48cdbfd4 1461 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 1462
1082b929 14632008-08-16 Robert Millan <rmh@aybabtu.com>
1464
1465 * disk/raid.c (grub_raid_init): Handle/report errors set by
1466 grub_device_iterate().
1467 * disk/lvm.c (grub_lvm_init): Likewise.
1468
42ce5170 14692008-08-15 Bean <bean123ch@gmail.com>
1470
1471 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1472 and datehook.mod.
1473 (datetime_mod_SOURCES): New macro.
1474 (datetime_mod_CFLAGS): Likewise.
1475 (datetime_mod_LDFLAGS): Likewise.
1476 (date_mod_SOURCES): Likewise.
1477 (date_mod_CFLAGS): Likewise.
1478 (date_mod_LDFLAGS): Likewise.
1479 (datehook_mod_SOURCES): Likewise.
1480 (datehook_mod_CFLAGS): Likewise.
1481 (datehook_mod_LDFLAGS): Likewise.
1482
1483 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1484 and datehook.mod.
1485 (datetime_mod_SOURCES): New macro.
1486 (datetime_mod_CFLAGS): Likewise.
1487 (datetime_mod_LDFLAGS): Likewise.
1488 (date_mod_SOURCES): Likewise.
1489 (date_mod_CFLAGS): Likewise.
1490 (date_mod_LDFLAGS): Likewise.
1491 (datehook_mod_SOURCES): Likewise.
1492 (datehook_mod_CFLAGS): Likewise.
1493 (datehook_mod_LDFLAGS): Likewise.
1494
1495 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1496 and datehook.mod.
1497 (datetime_mod_SOURCES): New macro.
1498 (datetime_mod_CFLAGS): Likewise.
1499 (datetime_mod_LDFLAGS): Likewise.
1500 (date_mod_SOURCES): Likewise.
1501 (date_mod_CFLAGS): Likewise.
1502 (date_mod_LDFLAGS): Likewise.
1503 (datehook_mod_SOURCES): Likewise.
1504 (datehook_mod_CFLAGS): Likewise.
1505 (datehook_mod_LDFLAGS): Likewise.
1506
1507 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1508 and datehook.mod.
1509 (datetime_mod_SOURCES): New macro.
1510 (datetime_mod_CFLAGS): Likewise.
1511 (datetime_mod_LDFLAGS): Likewise.
1512 (date_mod_SOURCES): Likewise.
1513 (date_mod_CFLAGS): Likewise.
1514 (date_mod_LDFLAGS): Likewise.
1515 (datehook_mod_SOURCES): Likewise.
1516 (datehook_mod_CFLAGS): Likewise.
1517 (datehook_mod_LDFLAGS): Likewise.
1518
1519 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1520 and datehook.mod.
1521 (datetime_mod_SOURCES): New macro.
1522 (datetime_mod_CFLAGS): Likewise.
1523 (datetime_mod_LDFLAGS): Likewise.
1524 (date_mod_SOURCES): Likewise.
1525 (date_mod_CFLAGS): Likewise.
1526 (date_mod_LDFLAGS): Likewise.
1527 (datehook_mod_SOURCES): Likewise.
1528 (datehook_mod_CFLAGS): Likewise.
1529 (datehook_mod_LDFLAGS): Likewise.
1530
1531 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1532
1533 * commands/date.c: New file.
1534
1535 * hook/datehook.c: Likewise.
1536
1537 * include/grub/lib/datetime.h: Likewise.
1538
1539 * include/grub/i386/cmos.h: Likewise.
1540
1541 * lib/datetime.c: Likewise.
1542
1543 * lib/i386/datetime.c: Likewise.
1544
1545 * lib/efi/datetime.c: Likewise.
1546
0e9242da 15472008-08-14 Robert Millan <rmh@aybabtu.com>
1548
1549 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1550 (grub_mkelfimage_SOURCES): New variable.
1551 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1552
1553 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1554 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1555 * conf/powerpc-ieee1275.rmk: Likewise.
1556 * conf/i386-ieee1275.rmk: Likewise.
1557
1558 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1559 * kern/i386/coreboot/init.c: Likewise.
1560
1561 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1562 with `<grub/cpu/kernel.h>'.
1563 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1564 to ...
1565 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1566 * kern/i386/coreboot/startup.S: Likewise.
1567
1568 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1569 (GRUB_MOD_GAP): Remove.
1570 * include/grub/powerpc/kernel.h: New file.
1571 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1572 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1573 * include/grub/i386/kernel.h: New file.
1574 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1575 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1576 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1577
1578 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1579 `grub-mkelfimage'.
1580 Use --directory when invoking grub_mkimage.
1581
1582 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1583 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1584 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1585 and GRUB_KERNEL_CPU_PREFIX.
1586
b86408f8 15872008-08-14 Felix Zielcke <fzielcke@z-51.de>
1588
d5e619ca 1589 * include/grub/err.h (grub_err_printf): New function prototype.
1590 * util/misc.c (grub_err_printf): New function.
1591 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1592 grub_printf.
1593 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 1594
7161f0e0 15952008-08-13 Robert Millan <rmh@aybabtu.com>
1596
1597 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1598
a1967522 15992008-08-13 Robert Millan <rmh@aybabtu.com>
1600
1601 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1602 boot entry.
1603
371458b5 16042008-08-12 Robert Millan <rmh@aybabtu.com>
1605
1606 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1607 of the relocation code from here ...
1608 (grub_multiboot): ... to here.
1609 (forward_relocator, backward_relocator): Move from here ...
1610 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1611 (grub_multiboot_backward_relocator): ... to here.
1612 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1613 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1614 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1615 (grub_multiboot_forward_relocator_end)
1616 (grub_multiboot_backward_relocator)
1617 (grub_multiboot_backward_relocator_end): New variables.
1618
05f9452b 16192008-08-12 Bean <bean123ch@gmail.com>
1620
1621 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1622
20024ab0 16232008-08-11 Robert Millan <rmh@aybabtu.com>
1624
1625 * kern/i386/linuxbios/startup.S: Move from here ...
1626 * kern/i386/coreboot/startup.S: ... to here.
1627
1628 * kern/i386/linuxbios/init.c: Move from here ...
1629 * kern/i386/coreboot/init.c: ... to here.
1630
1631 * kern/i386/linuxbios/table.c: Move from here ...
1632 * kern/i386/coreboot/mmap.c: ... to here.
1633
1634 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1635
e352e9cd 16362008-08-11 Robert Millan <rmh@aybabtu.com>
1637
1638 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1639 errors. Leave it to the upper layer to handle them.
1640
2d05bc6a 16412008-08-09 Christian Franke <franke@computer.org>
1642
1643 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1644 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1645 Install `grub.d/10_windows' only on Cygwin.
1646 * configure.ac: Add subst of `target_os'.
1647 Check `target_os' also before setting TARGET_OBJ2ELF.
1648 Add `--enable-grub-pe2elf'.
1649
042bd419 16502008-08-08 Robert Millan <rmh@aybabtu.com>
1651
1652 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1653 (grub_last_time): Change type to grub_uint64_t.
1654 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1655 (grub_disk_close): Likewise.
1656
1657 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1658 (run_menu): Migrate code from to using grub_get_time_ms().
1659
1660 * util/misc.c (grub_get_time_ms): New function.
1661
7f280db5 16622008-08-08 Marco Gerards <marco@gnu.org>
1663
1664 * disk/ata.c (grub_ata_regget): Change return type to
1665 `grub_uint8_t'.
1666 (grub_ata_regget2): Likewise.
1667 (grub_ata_wait_status): New function.
1668 (grub_ata_wait_busy): Removed function, updated all users to use
1669 `grub_ata_wait_status'.
1670 (grub_ata_wait_drq): Likewise.
1671 (grub_ata_cmd): New function.
1672 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1673 error handling.
1674 (grub_ata_pio_write): Add error handling.
1675 (grub_atapi_identify): Likewise.
1676 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1677 handling.
1678 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1679 handling. Actually use the detected registers. Reorder the
1680 detection logic such that it is easier to read.
1681 (grub_ata_pciinit): Do not assign the same ID to each controller.
1682 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1683 handling.
1684 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1685
1686 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1687
1fbc5e66 16882008-08-08 Marco Gerards <marco@gnu.org>
1689
1690 * NEWS: Update.
1691
819ce6c0 16922008-08-07 Bean <bean123ch@gmail.com>
1693
1694 * include/grub/x86_64/pci.h: New file.
1695
5c41d44d 16962008-08-07 Christian Franke <franke@computer.org>
1697
1698 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1699 (TIMER2_GATE): Likewise.
1700 (grub_pit_wait): Add enable/disable of the timer2 gate
1701 bit of port 0x61. This fixes a possible infinite loop.
1702
5ebc275d 17032008-08-07 Bean <bean123ch@gmail.com>
1704
1705 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1706 kern/i386/tsc.c and kern/i386/pit.c.
1707
1708 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1709 x86_64 platform.
1710
1711 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1712 <grub/i386/tsc.h>.
1713
1714 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1715
e383b3d0 17162008-08-07 Bean <bean123ch@gmail.com>
1717
1718 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1719
1720 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1721
1722 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1723 multiple inclusion. Add #include <grub/types.h>.
1724
1cbb58ac 17252008-08-06 Christian Franke <franke@computer.org>
1726
1727 * conf/common.rmk: Build and install `10_windows'.
1728 * util/grub.d/10_windows.in: New script.
1729
337f5a1e 17302008-08-06 Pavel Roskin <proski@gnu.org>
1731
1732 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1733
057bc4ac 17342008-08-06 Robert Millan <rmh@aybabtu.com>
1735
1736 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1737 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1738
2b99f123 17392008-08-06 Bean <bean123ch@gmail.com>
1740
1741 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1742 (grub_pxefs_fs_int): Remove dummy definition.
1743 (grub_pxefs_open): Use data->block_size to store the current block
1744 size setting.
1745 (grub_pxefs_read): Use block size stored in data->block_size. As the
1746 value of grub_pxe_blksize can be changed after the file is opened.
1747
9f0234cb 17482008-08-06 Bean <bean123ch@gmail.com>
1749
1750 * fs/i386/pc/pxe.c (curr_file): new variable.
1751 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1752 require the dummy internal file system anymore.
1753 (grub_pxefs_read): Removed.
1754 (grub_pxefs_close): Likewise.
1755 (grub_pxefs_fs_int): Likewise.
1756 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1757 connection when we switch file.
1758 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1759
a55d42e0 17602008-08-06 Robert Millan <rmh@aybabtu.com>
1761
1762 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1763 `halt.mod'.
1764 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1765 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1766
1767 * kern/i386/halt.c: New file.
1768 * kern/i386/reboot.c: Likewise.
1769 * include/grub/i386/reboot.h: Likewise.
1770 * include/grub/i386/halt.h: Likewise.
1771
1772 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1773 Include `<grub/cpu/halt.h>'.
1774 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1775 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1776
1777 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1778 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1779 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1780 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1781 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1782 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1783 from here ...
1784 * include/grub/i386/at_keyboard.h: ... to here.
1785
24371d26 17862008-08-05 Robert Millan <rmh@aybabtu.com>
1787
1788 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1789 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1790 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1791 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1792 `kern/generic/millisleep.c'.
1793
1794 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1795 instead of grub_get_rtc().
1796 (grub_tsc_init): Initialize `tsc_boot_time'.
1797
1798 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1799 (grub_machine_init): Use grub_tsc_init() rather than
1800 installing an RTC-based handler via grub_install_get_time_ms().
1801
1802 * kern/i386/pit.c: New file.
1803 * include/grub/i386/pit.h: Likewise.
1804
9e7007b3 18052008-08-05 Bean <bean123ch@gmail.com>
1806
1807 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1808
1809 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1810 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1811 (pxe_mod_SOURCES): New macro.
1812 (pxe_mod_CFLAGS): Likewise.
1813 (pxe_mod_LDFLAGS): Likewise.
1814 (pxecmd_mod_SOURCES): Likewise.
1815 (pxecmd_mod_CFLAGS): Likewise.
1816 (pxecmd_mod_LDFLAGS): Likewise.
1817
1818 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1819 (grub_pxe_call): Likewise.
1820
1821 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1822
1823 * commands/i386/pc/pxecmd.c: New file.
1824
9f0234cb 1825 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 1826
1827 * include/grub/i386/pc/pxe.h: Likewise.
1828
6977d49f 18292008-08-05 Bean <bean123ch@gmail.com>
1830
1831 * util/console.c (grub_console_cur_color): New variable.
1832 (grub_console_standard_color): Likewise.
1833 (grub_console_normal_color): Likewise.
1834 (grub_console_highlight_color): Likewise.
1835 (color_map): Likewise.
1836 (use_color): Likewise.
1837 (NUM_COLORS): New macro.
1838 (grub_ncurses_setcolorstate): Handle color properly.
1839 (grub_ncurses_setcolor): Don't change color here, just remember the
1840 settings, color will be set in grub_ncurses_setcolorstate.
1841 (grub_ncurses_getcolor): New function.
1842 (grub_ncurses_init): Initialize color pairs.
1843 (grub_ncurses_term): New member grub_ncurses_getcolor.
1844
9c2ff3ee 18452008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 1846
9c2ff3ee 1847 High resolution timer support. Implemented for x86 CPUs using TSC.
1848 Extracted generic grub_millisleep() so it's linked in only as needed.
1849 This requires a Pentium compatible CPU; if the RDTSC instruction is
1850 not supported, then it falls back on the generic grub_get_time_ms()
1851 implementation that uses the machine's RTC.
1852
1853 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1854 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1855 `kern/generic/millisleep.c'.
1856
1857 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1858 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1859
1860 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1861 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1862
1863 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1864
1865 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1866 `kern/generic/millisleep.c'.
1867
1868 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1869
1870 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1871
1872 * kern/generic/rtc_get_time_ms.c: New file.
1873
1874 * kern/generic/millisleep.c: New file.
337f5a1e 1875
9c2ff3ee 1876 * kern/misc.c: Don't include
1877 <kern/time.h> anymore.
1878 (grub_millisleep_generic): Removed.
1879
1880 * commands/sleep.c (grub_interruptible_millisleep): Uses
1881 grub_get_time_ms() instead of grub_get_rtc().
1882
1883 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1884 function.
1885 (grub_cpu_is_cpuid_supported): New inline function.
1886 (grub_cpu_is_tsc_supported): New inline function.
1887 (grub_tsc_init): New function prototype.
1888 (grub_tsc_get_time_ms): New function prototype.
1889
1890 * kern/i386/tsc.c (grub_get_time_ms): New file.
1891
1892 * include/grub/time.h: Include <grub/types.h.
1893 (grub_millisleep_generic): Removed.
1894 (grub_get_time_ms): New prototype.
1895 (grub_install_get_time_ms): New prototype.
1896 (grub_rtc_get_time_ms): New prototype.
1897
1898 * kern/time.c (grub_get_time_ms): New function.
1899 (grub_install_get_time_ms): New function.
1900
1901 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1902 <grub/time.h> anymore.
1903 (grub_millisleep): Removed.
1904 (grub_machine_init): Call grub_tsc_init.
1905
1906 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1907 get_time_ms() implementation.
1908
1909 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1910 (ieee1275_get_time_ms): New function.
1911 (grub_machine_init): Install get_time_ms() implementation.
1912
1913 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1914 (grub_machine_init): Call grub_tsc_init().
1915 (grub_millisleep): Removed.
bf06a93f 1916
9c2ff3ee 1917 * kern/ieee1275/init.c (grub_millisleep): Removed.
1918 (grub_machine_init): Install ieee1275_get_time_ms()
1919 implementation.
1920 (ieee1275_get_time_ms): New function.
1921 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1922 real work.
1923
9ec92aaf 19242008-08-05 Marco Gerards <marco@gnu.org>
1925
1926 * disk/ata.c: Include <grub/pci.h>.
1927 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1928 (grub_ata_initialize): Rewritten.
1929 (grub_ata_device_initialize): New function.
1930
8d23f507 19312008-08-04 Pavel Roskin <proski@gnu.org>
1932
1933 * kern/main.c: Include grub/mm.h.
1934
5e15ee3d 19352008-08-04 Robert Millan <rmh@aybabtu.com>
1936
1937 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1938 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1939 corruption problem).
1940
a9053f8f 19412008-08-04 Robert Millan <rmh@aybabtu.com>
1942
1943 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1944 warnings introduced in my last commit.
1945
dd19c7d7 19462008-08-03 Robert Millan <rmh@aybabtu.com>
1947
1948 Make PCI available on all i386 architectures.
1949
1950 * include/grub/i386/pc/pci.h: Move from here ...
1951 * include/grub/i386/pci.h: ... to here.
1952
1953 * include/grub/i386/pc/pci.h: Remove.
1954 * include/grub/i386/efi/pci.h: Remove.
1955 * include/grub/x86_64/efi/pci.h: Remove.
1956
1957 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1958 `<grub/cpu/pci.h>'.
1959
1960 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1961 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1962 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1963
1964 * conf/i386-ieee1275.rmk: Likewise.
1965
e14a6184 19662008-08-03 Robert Millan <rmh@aybabtu.com>
1967
1968 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1969 (grub_console_setcursor): Make it possible to set cursor off.
1970
52768e37 19712008-08-03 Robert Millan <rmh@aybabtu.com>
1972
1973 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1974 of modules instead of assuming which platform provides what.
1975 * util/update-grub.in: Likewise.
1976
2d52f57f 19772008-08-03 Robert Millan <rmh@aybabtu.com>
1978
1979 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1980 instead of `grub_install_dos_part' to determine whether a drive needs
1981 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 1982 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 1983
2a5cd121 19842008-08-02 Robert Millan <rmh@aybabtu.com>
1985
1986 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1987
93808428 19882008-08-02 Robert Millan <rmh@aybabtu.com>
1989
1990 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1991 of informational grub_dprintf() calls.
1992
3bd0a12a 19932008-08-02 Robert Millan <rmh@aybabtu.com>
1994
1995 * disk/memdisk.c (memdisk_size): Don't initialize.
1996 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1997
1998 * include/grub/i386/pc/kernel.h
1999 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2000 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2001 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2002 (grub_arch_memdisk_size): Remove.
2003
2004 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2005 field (was only used to transfer a constant). Add `type' field to
2006 support multiple module types.
2007 (grub_module_iterate): New function.
2008
2009 * kern/device.c (grub_device_open): Do not hide error messages
2010 when grub_disk_open() fails. Use grub_print_error() instead.
2011
2012 * kern/i386/pc/init.c (grub_arch_modules_addr)
2013 (grub_arch_memdisk_size): Remove functions.
2014 (grub_arch_modules_addr): Return the module address in high memory
2015 (now that it isn't copied anymore).
2016
2017 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2018 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2019 decompression routine (grub_total_module_size already includes that
2020 now). Don't copy modules back to low memory.
2021
2022 * kern/main.c: Include `<grub/mm.h>'.
2023 (grub_load_modules): Split out (and use) ...
2024 (grub_module_iterate): ... this function, which iterates through
2025 module objects and runs a hook.
2026 Comment out grub_mm_init_region() call, as it would cause non-ELF
2027 modules to be overwritten.
2028
2029 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2030 the memdisk image in its own region, make it part of the module list.
2031 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2032 (main): Parse --memdisk|-m option, and pass user-provided path as
2033 parameter to generate_image().
2034 (add_segments): Pass `memdisk_path' down to load_modules().
2035 (load_modules): Embed memdisk image in module section when requested.
2036 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2037 `header.type' instead of `header.offset'.
2038
2039 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2040 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2041 (memdisk_mod_LDFLAGS): New variables.
2042 * conf/i386-coreboot.rmk: Likewise.
2043 * conf/i386-ieee1275.rmk: Likewise.
2044
a927cc73 20452008-08-02 Robert Millan <rmh@aybabtu.com>
2046
2047 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2048 (backward_relocator): New variables. Used to allocate and relocate
2049 the payload, respectively.
2050 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 2051 address, install the appropriate relocator code in each bound of
a927cc73 2052 the payload, and set the entry point such that
2053 grub_multiboot_real_boot() will jump to one of them.
2054
2055 * kern/i386/loader.S (grub_multiboot_payload_size)
2056 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2057 (grub_multiboot_payload_entry_offset): New variables.
2058 (grub_multiboot_real_boot): Set cpu context to what the relocator
2059 expects, and jump to the relocator instead of the payload.
2060
2061 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2062 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2063 (grub_multiboot_payload_entry_offset): Export.
2064
b15d8a0c 20652008-08-01 Bean <bean123ch@gmail.com>
2066
2067 * normal/menu_entry.c (editor_getline): Don't return the original
2068 string as result, as it will be released by lexer once it has done
2069 using it.
2070
cdfb3d22 20712008-08-01 Robert Millan <rmh@aybabtu.com>
2072
2073 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2074 within menuentries, not before them.
2075 util/grub.d/10_hurd.in: Likewise.
2076
9175e93d 20772008-08-01 Bean <bean123ch@gmail.com>
2078
2079 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2080 (bufio_mod_SOURCES): New macro.
2081 (bufio_mod_CFLAGS): Likewise.
2082 (bufio_mod_LDFLAGS): Likewise.
2083
2084 * include/grub/bufio.h: New file.
2085
2086 * io/bufio.c: Likewise.
2087
2088 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2089 (grub_video_reader_png): Use grub_buffile_open to open file.
2090
2091 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2092 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2093
2094 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2095 (grub_video_reader_tga): Use grub_buffile_open to open file.
2096
2097 * font/manager.c: Include <grub/bufio.h>.
2098 (add_font): Use grub_buffile_open to open file.
2099
3d8383e7 21002008-07-31 Robert Millan <rmh@aybabtu.com>
2101
2102 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2103 ELF segments, use a macro for arbitrarily accessing any of them instead
2104 of preparing a pointer that allows access to one at a time.
2105 (grub_multiboot_load_elf64): Likewise.
2106
16e641b6 21072008-07-31 Bean <bean123ch@gmail.com>
2108
2109 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2110 GRUB_KERNEL_MACHINE_DATA_END.
2111
59198b72 21122008-07-30 Robert Millan <rmh@aybabtu.com>
2113
2114 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2115 Increase from 0x50 to 0x60.
2116 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2117 use UUIDs to identify the root drive for them. If that's not
2118 possible, abort.
2119 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2120 check, for cross-disk installs.
2121
ae88bca3 21222008-07-30 Robert Millan <rmh@aybabtu.com>
2123
2124 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2125 is non-empty, use it to set the `prefix' environment variable instead
2126 of the usual approach.
2127 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2128 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2129 environment variable instead of dummy make_install_device().
2130
2131 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2132 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 2133 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 2134
2135 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2136 New variable reference.
2137 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2138 New macro. Defines offset of `grub_prefix' within startup.S (relative
2139 to `start').
2140 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2141 section within startup.S (relative to `start').
2142 * include/grub/i386/coreboot/kernel.h: Likewise.
2143
2144 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2145 Overwrite grub_prefix with its contents, at the beginning of the
2146 first segment.
2147 (main): Understand -p|--prefix.
2148
14f41dd1 21492008-07-30 Robert Millan <rmh@aybabtu.com>
2150
2151 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2152
4ca049a3 21532008-07-30 Robert Millan <rmh@aybabtu.com>
2154
2155 * term/i386/pc/vga_text.c (grub_console_cls): Use
2156 grub_console_gotoxy() to go back to beginning of the screen.
2157 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2158
2921d337 21592008-07-29 Christian Franke <franke@computer.org>
2160
2161 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2162 Add conversion of emulated mount points on Cygwin.
2163
b609876d 21642008-07-29 Christian Franke <franke@computer.org>
2165
2166 * util/update-grub.in: Add a check for admin
2167 group on Cygwin.
2168 Remove old `grub.cfg.new' before creation.
2169 Add `-f' to `mv' to handle the different filesystem
2170 semantics of Windows.
2171
e93e4679 21722008-07-29 Bean <bean123ch@gmail.com>
2173
2174 * normal/main.c (get_line): Fix buffer overflow bug.
2175
41694fd0 21762008-07-28 Robert Millan <rmh@aybabtu.com>
2177
2178 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2179 (struct grub_apple_header): New struct. Describes the layout of
2180 the partmap header.
2181 (apple_partition_map_iterate): Check the header magic as well as the
2182 partition magic (which was already being checked).
2183
cfd0b4e6 21842008-07-28 Pavel Roskin <proski@gnu.org>
2185
2186 * genmk.rb: Add a warning to the beginning of the output that
2187 it's a generated file and should not be edited.
2188
93cce016 21892008-07-28 Robert Millan <rmh@aybabtu.com>
2190
2191 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2192 with the same number are found, just use issue a warning with
2193 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 2194
cd1df915 21952008-07-27 Robert Millan <rmh@aybabtu.com>
2196
2197 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2198 information.
2199
b70a8427 22002008-07-27 Bean <bean123ch@gmail.com>
2201
2202 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2203 (grub_fat_find_dir): Ignore case when comparing filename.
2204
8f5e379f 22052008-07-27 Bean <bean123ch@gmail.com>
2206
2207 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2208 smallino, as it's more descriptive, and i8count can be confused with
2209 the other field count.
2210 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2211 inode type.
2212
a85cd5a0 22132008-07-27 Bean <bean123ch@gmail.com>
2214
2215 * commands/crc.c: New file.
2216
2217 * lib/crc.c: Likewise.
2218
2219 * include/grub/lib/crc.h: Likewise.
2220
2221 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2222
2223 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2224 (hexdump): Move this function to ...
2225
2226 * lib/hexdump.c: ... here.
2227
2228 * include/grub/hexdump.h: Renamed to ...
2229
2230 * include/grub/lib/hexdump.h: ... this.
2231
2232 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2233
2234 * util/grub-editenv.c: Likewise.
2235
2236 * include/envblk.h: Renamed to ...
2237
2238 * include/lib/envblk.h: ... this.
2239
2240 * util/envblk.c: Renamed to ...
2241
2242 * lib/envblk.c: ... this.
2243
2244 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2245 lib/hexdump.c.
2246 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2247 (pkglib_MODULES): Add crc.mod.
2248 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2249 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2250 (crc_mod_SOURCES): New macro.
2251 (crc_mod_CFLAGS): Likewise.
2252 (crc_mod_LDFLAGS): Likewise.
2253
2254 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2255
2256 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2257
2258 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2259
2260 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2261
2262 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2263
c298def0 22642008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 2265
2266 * commands/help.c: Include <grub/term.h>.
2267 (TERM_WIDTH): Removed. Updated all users.
2268
cc349fb3 22692008-07-27 Pavel Roskin <proski@gnu.org>
2270
2271 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2272 spurious warnings about a comment within a comment.
2273
9051607e 22742008-07-25 Robert Millan <rmh@aybabtu.com>
2275
2276 * util/getroot.c (find_root_device): Skip devices that match
2277 /dev/dm-[0-9]. This lets the real device be found for any type of
2278 abstraction (LVM, EVMS, RAID..).
2279 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2280 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2281 device is found first, find_root_device() will now skip it.
2282
01453bfc 22832008-07-24 Pavel Roskin <proski@gnu.org>
2284
2285 * include/grub/types.h: Use __builtin_bswap32() and
2286 __builtin_bswap64() with gcc 4.3 and newer.
2287
6af9849f 22882008-07-24 Christian Franke <franke@computer.org>
2289
3a0fa256 2290 * util/i386/pc/grub-install.in: If `--debug' is specified,
2291 pass `--verbose' to grub-setup.
2292 Abort script if make_system_path_relative_to_its_root() fails.
2293
7810e747 22942008-07-24 Bean <bean123ch@gmail.com>
2295
2296 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2297 variable `target_platform' should be `platform'.
2298
42290e17 22992008-07-24 Bean <bean123ch@gmail.com>
2300
51cc5193 2301 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 2302 (grub_png_init_fixed_block): New function.
2303 (grub_png_decode_image_data): Handle fixed huffman code compression.
2304
2a8a80e4 23052008-07-24 Bean <bean123ch@gmail.com>
2306
2307 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2308 (grub_pe2elf_SOURCES): New macro.
2309 (CLEANFILES): Add grub-pe2elf.
2310
2311 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2312 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2313 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2314 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2315 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
2316 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
2317 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
2318 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2319 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2320 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2321 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2322 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2323 (GRUB_PE32_DT_FUNCTION): Likewise.
2324 (GRUB_PE32_REL_I386_DIR32): Likewise.
2325 (GRUB_PE32_REL_I386_REL32): Likewise.
2326 (grub_pe32_symbol): New structure.
2327 (grub_pe32_reloc): Likewise.
2328
2329 * util/grub-pe2elf.c: New file.
2330
2331 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2332 start symbol in non pc platform.
2333
2334 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2335
2336 The following patches are from Christian Franke.
2337
2338 * include/grub/dl.h: Remove .previous, gas supports this only
2339 for ELF format.
2340
2341 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2342 Remove .type, gas supports this only for ELF format.
2343
2344 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2345 nullbytes in symbol table. This fixes an infinite loop if table is
2346 zero filled.
2347
2348 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2349 TARGET_IMG_LDFLAGS and EXEEXT.
2350
2351 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2352 TARGET_IMG_LDFLAGS_AC.
2353 (grub_CHECK_STACK_ARG_PROBE): New function.
2354
2355 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2356
2357 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2358
2359 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2360 to set TARGET_IMG_LD* accordingly.
2361 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2362 Add call to grub_CHECK_STACK_ARG_PROBE.
2363 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2364
2365 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2366
2367 * genmk.rb: Add EXEEXT to CLEANFILES.
2368
12ccdb75 23692008-07-23 Robert Millan <rmh@aybabtu.com>
2370
2371 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2372 define the codes for arrows and lines used for the menu).
2373 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2374 as well.
2375
2376 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2377 fonts, because the latter are too slow.
2378
18eeaf04 23792008-07-21 Bean <bean123ch@gmail.com>
2380
2381 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2382 a20. Run keyboard test last, as it will cause macbook to halt.
2383
b095e2ad 23842008-07-18 Pavel Roskin <proski@gnu.org>
2385
2386 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2387 load foreign architecture modules correctly anyway. Keep
2388 support for loading host architecture modules, whether we
2389 compile them or not.
2390
737feb35 23912008-07-17 Pavel Roskin <proski@gnu.org>
2392
3f4ce737 2393 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2394 change target_cpu. The compiler default can mismatch target_cpu
2395 in any case.
2396
4ad2d049 2397 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2398 * kern/efi/efi.c: Likewise.
2399
f6130a12 2400 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2401 target compiler is functional.
2402 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2403 are set up.
2404
58393a2d 2405 * configure.ac: Default to efi platform for x86_64-apple. Allow
2406 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2407 adjustments from the rest, only do them if target is not
2408 explicitly given. Merge other adjustments with the final sanity
2409 check. Remove an extraneous check for supported CPU. Be
2410 specific which CPU and which platform is not supported.
2411
737feb35 2412 * configure.ac: Default to pc platform for x86_64.
2413
546f966a 24142008-07-17 Robert Millan <rmh@aybabtu.com>
2415
2416 Partial LinuxBIOS -> Coreboot rename.
2417
2418 * conf/i386-linuxbios.rmk: Renamed to ...
2419 * conf/i386-coreboot.rmk: ... this.
2420 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2421 * configure.ac: Accept "coreboot" as input platform (but maintain
2422 compatibility with "linuxbios").
2423 * include/grub/i386/linuxbios: Renamed to ...
2424 * include/grub/i386/coreboot: ... this.
2425
20011694 24262008-07-17 Bean <bean123ch@gmail.com>
2427
2428 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 2429 (appleldr_mod_SOURCE): New variable.
20011694 2430 (appleldr_mod_CFLAGS): Likewise.
2431 (appleldr_mod_LDFLAGS): Likewise.
2432 (pci_mod_SOURCES): Likewise.
2433 (pci_mod_CFLAGS): Likewise.
2434 (pci_mod_LDFLAGS): Likewise.
2435 (lspci_mod_SOURCES): Likewise.
2436 (lspci_mod_CFLAGS): Likewise.
2437 (lspci_mod_LDFLAGS): Likewise.
2438
2439 * conf/x86_64-efi.rmk: New file.
2440
2441 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2442 macro.
2443 (grub_efidisk_write): Likewise.
2444
2445 * include/efi/api.h (efi_call_0): New macro.
2446 (efi_call_1): Likewise.
2447 (efi_call_2): Likewise.
2448 (efi_call_3): Likewise.
2449 (efi_call_4): Likewise.
2450 (efi_call_5): Likewise.
2451 (efi_call_6): Likewise.
2452
2453 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2454 grub_rescue_cmd_chainloader.
2455
2456 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2457 (grub_pe32_optional_header): Change some fields based on i386 or
2458 x86_64 platform.
2459 (GRUB_PE32_PE32_MAGIC): Likewise.
2460
2461 * include/grub/efi/uga_draw.h: New file.
2462
2463 * include/grub/elf.h (STN_ABS): New constant.
2464 (R_X86_64_NONE): Relocation constant for x86_64.
2465 (R_X86_64_64): Likewise.
2466 (R_X86_64_PC32): Likewise.
2467 (R_X86_64_GOT32): Likewise.
2468 (R_X86_64_PLT32): Likewise.
2469 (R_X86_64_COPY): Likewise.
2470 (R_X86_64_GLOB_DAT): Likewise.
2471 (R_X86_64_JUMP_SLOT): Likewise.
2472 (R_X86_64_RELATIVE): Likewise.
2473 (R_X86_64_GOTPCREL): Likewise.
2474 (R_X86_64_32): Likewise.
2475 (R_X86_64_32S): Likewise.
2476 (R_X86_64_16): Likewise.
2477 (R_X86_64_PC16): Likewise.
2478 (R_X86_64_8): Likewise.
2479 (R_X86_64_PC8): Likewise.
2480
2481 * include/grub/i386/efi/pci.h: New file.
2482
2483 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2484 Change it value based on platform.
2485 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2486 (GRUB_E820_RAM): Likewise.
2487 (GRUB_E820_RESERVED): Likewise.
2488 (GRUB_E820_ACPI): Likewise.
2489 (GRUB_E820_NVS): Likewise.
2490 (GRUB_E820_EXEC_CODE): Likewise.
2491 (GRUB_E820_MAX_ENTRY): Likewise.
2492 (grub_e820_mmap): New structure.
2493 (linux_kernel_header): Change the efi field according to different
2494 kernel version, also field from linux_kernel_header.
2495
2496 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2497
2498 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2499 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2500 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2501 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2502 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2503 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2504 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2505 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2506 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2507 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2508
2509 * include/grub/x86_64/efi/kernel.h: New file.
2510
2511 * include/grub/x86_64/efi/loader.h: Likewise.
2512
2513 * include/grub/x86_64/efi/machine.h: Likewise.
2514
2515 * include/grub/x86_64/efi/pci.h: Likewise.
2516
2517 * include/grub/x86_64/efi/time.h: Likewise.
2518
2519 * include/grub/x86_64/linux.h: Likewise.
2520
2521 * include/grub/x86_64/setjmp.h: Likewise.
2522
2523 * include/grub/x86_64/time.h: Likewise.
2524
2525 * include/grub/x86_64/types.h: Likewise.
2526
2527 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2528 GRUB_TARGET_SIZEOF_VOID_P.
2529
2530 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2531 (grub_efi_locate_handle): Likewise.
2532 (grub_efi_open_protocol): Likewise.
2533 (grub_efi_set_text_mode): Likewise.
2534 (grub_efi_stall): Likewise.
2535 (grub_exit): Likewise.
2536 (grub_reboot): Likewise.
2537 (grub_halt): Likewise.
2538 (grub_efi_exit_boot_services): Likewise.
2539 (grub_get_rtc): Likewise.
2540
2541 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2542 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2543 (grub_efi_allocate_pages): Wrap efi calls.
2544 (grub_efi_free_pages): Wrap efi calls.
2545 (grub_efi_get_memory_map): Wrap efi calls.
2546
2547 * kern/x86_64/dl.c: New file.
2548
2549 * kern/x86_64/efi/callwrap.S: Likewise.
2550
2551 * kern/x86_64/efi/startup.S: Likewise.
2552
2553 * loader/efi/appleloader.c: Likewise.
2554
2555 * loader/efi/chainloader.c (cmdline): New variable.
2556 (grub_chainloader_unload): Wrap efi calls.
2557 (grub_chainloader_boot): Likewise.
2558 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2559 command line.
2560
2561 * loader/efi/chainloader_normal.c (chainloader_command):
2562 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2563 command line.
2564
2565 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2566 method.
2567 (grub_e820_add_region): New function.
2568 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2569 booting.
2570 (grub_find_video_card): New function.
2571 (grub_linux_setup_video): New function.
2572 (grub_rescue_cmd_linux): Probe for video information.
2573
2574 * normal/x86_64/setjmp.S: New file.
2575
2576 * term/efi/console.c (map_char): New function.
2577 (grub_console_putchar): Map unicode char.
2578 (grub_console_checkkey): Wrap efi calls.
2579 (grub_console_getkey): Likewise.
2580 (grub_console_getwh): Likewise.
2581 (grub_console_gotoxy): Likewise.
2582 (grub_console_cls): Likewise.
2583 (grub_console_setcolorstate): Likewise.
2584 (grub_console_setcursor): Likewise.
2585
2586 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2587
59652a20 25882008-07-16 Pavel Roskin <proski@gnu.org>
2589
ef294055 2590 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2591 format strings.
2592
59652a20 2593 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2594 pointer, not an integer. This fixes a warning and prevents
2595 precision loss on 64-bit systems.
2596 (relocate_addresses): Remove unneeded cast.
2597
afc3b5d7 25982008-07-15 Pavel Roskin <proski@gnu.org>
2599
506b2b3e 2600 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2601
62ead89c 2602 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2603
c4cd51d7 2604 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2605 Fix comparison between signed and unsigned.
2606
0d3d8f28 2607 * include/grub/i386/ieee1275/console.h: Declare
2608 grub_console_init() and grub_console_fini().
2609
8804b286 2610 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2611 It's empty and unused.
2612
ee01cf35 2613 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2614 beginning to avoid warnings with some compilers.
2615
afc3b5d7 2616 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2617 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2618
e4e8eaa5 26192008-07-14 Pavel Roskin <proski@gnu.org>
2620
407aceb4 2621 * kern/env.c (grub_register_variable_hook): Don't copy empty
2622 string, it leaks memory. Pass "" to grub_env_set(), it should
2623 handle constant strings.
2624
e4e8eaa5 2625 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2626 * commands/cmp.c (grub_cmd_cmp): Likewise.
2627 * kern/dl.c (grub_dl_flush_cache): Likewise.
2628 (grub_dl_load_core): Likewise.
2629 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2630 (grub_elf64_load_phdrs): Likewise.
2631
d4e2dad3 26322008-07-13 Pavel Roskin <proski@gnu.org>
2633
2634 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2635 between signed and unsigned.
2636 (LzmaEnc_Finish): Fix warning about an unused parameter.
2637
aa24b516 26382008-07-13 Bean <bean123ch@gmail.com>
2639
2640 * Makefile.in (enable_lzo): New rule.
2641
2642 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2643
2644 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2645
2646 * boot/i386/pc/lnxboot.S: #include <config.h>.
2647
2648 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 2649 its value according to the compression algorithm used, lzo or lzma.
aa24b516 2650
2651 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2652 compression algorithm according to configure macro.
2653
2654 * kern/i386/pc/startup.S (codestart): Likewise.
2655
2656 * kern/i386/pc/lzma_decode.S: New file.
2657
2658 * include/grub/lib/LzFind.h: Likewise.
2659
2660 * include/grub/lib/LzHash.h: Likewise.
2661
2662 * include/grub/lib/LzmaDec.h: Likewise.
2663
2664 * include/grub/lib/LzmaEnc.h: Likewise.
2665
2666 * include/grub/lib/LzmaTypes.h: Likewise.
2667
2668 * lib/LzFind.c: Likewise.
2669
2670 * lib/LzmaDec.c: Likewise.
2671
2672 * lib/LzmaEnc.c: Likewise.
2673
4ae821ac 26742008-07-13 Bean <bean123ch@gmail.com>
2675
2676 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2677 (grub_ext4_extent_header): New structure.
2678 (grub_ext4_extent): Likewise.
2679 (grub_ext4_extent_idx): Likewise.
2680 (grub_ext4_find_leaf): New function.
2681 (grub_ext2_read_block): Handle extents.
2682
9a745147 26832008-07-12 Robert Millan <rmh@aybabtu.com>
2684
2685 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2686
d49a4cf6 26872008-07-11 Robert Millan <rmh@aybabtu.com>
2688
2689 * util/grub.d/40_custom.in: New file. Example on how to add custom
2690 entries to /etc/grub.d.
2691 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2692 40_custom (implicitly, by merging all the grub.d rules).
2693
947414b4 26942008-07-11 Pavel Roskin <proski@gnu.org>
2695
0059cf6f 2696 * commands/read.c (grub_getline): Fix invalid memory access.
2697 Don't add newline to the variable value.
2698
947414b4 2699 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2700 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2701 (serial_hw_get_port): Check validity of the port number.
2702 (grub_cmd_serial): Check return value of serial_hw_get_port().
2703
62a02d00 27042008-07-07 Pavel Roskin <proski@gnu.org>
2705
2706 * boot/i386/pc/diskboot.S (notification_string): Replace
2707 "Loading kernel" with just "loading". This is shorter, less
2708 confusing and saves a few bytes for possible future changes.
2709
3e5581b0 27102008-07-05 Pavel Roskin <proski@gnu.org>
2711
ea387a48 2712 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2713 size for ATAPI devices, they are undefined. Output sector
2714 number in decimal form.
2715
3e5581b0 2716 * disk/ata.c: Use named constants for status bits.
2717
fdecb8fd 27182008-07-04 Pavel Roskin <proski@gnu.org>
2719
bcd35b90 2720 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2721 grub_addr_t before casting it to the void pointer to fix a
2722 warning. Non-addressable regions are discarded earlier.
2723 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2724 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2725 (check_signature): Don't shadow table_header.
2726 (grub_linuxbios_table_iterate): Cast numeric constants to
2727 grub_linuxbios_table_header_t.
2728 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2729 grub_stop().
2730
af58ab3d 2731 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2732 prevent warnings.
2733
1759aa57 2734 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2735 pointer, which can cause warnings. Support 64-bit addresses.
2736
fdecb8fd 2737 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2738 of sizeof(long). This fixes PowerPC image generation on x86_64.
2739
8516d2a8 27402008-07-04 Robert Millan <rmh@aybabtu.com>
2741
2742 This fixes a performance issue when pc & gpt partmap iterators
2743 didn't abort iteration even after our hook found what it was
fe987087 2744 looking for (often causing expensive probes of non-existent drives).
8516d2a8 2745
2746 Some callers relied on previous buggy behaviour, since they would
34c44600 2747 raise an error when their own hooks caused early abortion of its
8516d2a8 2748 iteration.
2749
2750 * kern/device.c (grub_device_open): Improve error message.
2751 * disk/lvm.c (grub_lvm_open): Likewise.
2752 * disk/raid.c (grub_raid_open): Likewise.
2753
2754 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2755 when hook requests it, independently of grub_errno.
2756 (pc_partition_map_probe): Do not fail when find_func() caused
2757 early abortion of pc_partition_map_iterate().
2758
2759 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2760 when hook requests it, independently of grub_errno.
2761 (gpt_partition_map_probe): Do not fail when find_func() caused
2762 early abortion of gpt_partition_map_iterate().
2763
2764 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2765 when hook requests it, independently of grub_errno. Do not fail when
2766 part_map_iterate_hook() caused early abortion of p->iterate().
2767
2768 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2769 when grub_partition_iterate() returned with non-zero.
2770
277d0de9 27712008-07-03 Pavel Roskin <proski@gnu.org>
2772
2773 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2774 like we do in grub_ata_pio_read().
2775 (grub_ata_readwrite): Always write individual sectors. Fix the
2776 sector count for the remainder.
2777 (grub_ata_write): Enable writing to ATA devices. Correctly
2778 report error for ATAPI devices.
2779
d4c9b428 27802008-07-02 Pavel Roskin <proski@gnu.org>
2781
e43fc690 2782 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2783 warning.
2784
f707af42 2785 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2786 for every read sector, we already increment it for the whole
2787 batch. This fixes reading more than 256 sectors at once.
2788
11e16b15 2789 * util/grub-editenv.c (cmd_info): Cast argument to long
2790 explicitly. ptrdiff_t reduces to int on i386.
2791
cbabfdd4 2792 * util/grub-editenv.c (main): Be specific which parameter is
2793 missing.
2794
b8fbce0a 2795 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2796 (memdisk): Make memdisk_orig_addr a pointer.
2797
c9c8e606 2798 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2799 for file offsets, use grub_off_t instead. Fix printf format
2800 warnings.
2801
ca62e598 2802 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2803 there. Real unexpected warnings should not drown in the noise
2804 about known problems.
2805
ce8d1766 2806 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2807 grub_disk_addr_t for memory addresses.
2808
00c7a56a 2809 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2810 explicitly to fix a warning.
2811
08d3ef09 2812 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2813
cb71ba20 2814 * Makefile.in (MODULE_LDFLAGS): New variable.
2815 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2816 the linker accepts --build-id=none.
2817 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2818 MODULE_LDFLAGS.
2819 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2820
d4c9b428 2821 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2822 those in Linux XFS code. Provide a way to access 64-bit parent
2823 inode.
2824 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2825 the end of struct grub_xfs_dir_header.
2826
d4156eee 28272008-07-02 Bean <bean123ch@gmail.com>
2828
2829 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2830 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2831 and GRUB_IEEE1275_FLAG_NO_ANSI.
2832
2833 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2834 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2835 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2836
2837 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2838 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2839
2840 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2841 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2842
2843 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2844 esc sequence on non ANSI terminal.
2845 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2846
2847 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2848 beginning of file.
2849
2270f77b 28502008-07-02 Bean <bean123ch@gmail.com>
2851
2852 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2853 (grub_editenv_SOURCES): New variable.
2854 (pkglib_MODULES): Add loadenv.mod.
2855 (loadenv_mod_SOURCES): New variable.
2856 (loadenv_mod_CFLAGS): Likewise.
2857 (loadenv_mod_LDFLAGS): Likewise.
2858
2859 * include/grub/envblk.h: New file.
2860
2861 * util/envblk.c: New file.
2862
2863 * util/grub-editenv.c: New file.
2864
2865 * commands/loadenv.c: New file.
2866
0e9e51ec 28672008-07-01 Pavel Roskin <proski@gnu.org>
2868
d89b7634 2869 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2870 not unsigned char. This fixes warnings and is consistent with
2871 other tags.
2872
bf1835b1 2873 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2874
8222a04b 2875 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2876
6a42d99d 2877 * term/tparm.c (analyze): Always set *popcount.
2878
10b159d1 2879 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2880 cast to fix a warning.
2881
b8789f6c 2882 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2883 cast to suppress a warning.
2884
29d7e38a 2885 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2886 grub_fshelp_read_file() expects.
2887
f341f669 2888 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2889 write uuid as a 32-bit value in CPU byte order, so declare and
2890 use it as such.
2891
0e9e51ec 2892 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2893 long if the format specifier expects it.
2894 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2895 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2896 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2897 long to fix a warning.
2898 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2899 grub_dprintf() arguments to fix warnings.
2900
3aefa857 29012008-06-30 Pavel Roskin <proski@gnu.org>
2902
56c7668b 2903 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2904 install_bsd_part immediately before core.img is embedded or
2905 modified on disk. This fixes core.img verification if core.img
2906 cannot be embedded.
2907
3aefa857 2908 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2909 core_path to calculate the blocklist.
2910 Patch from Javier Martín <lordhabbit@gmail.com>
2911
5444088d 29122008-06-29 Robert Millan <rmh@aybabtu.com>
2913
2914 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2915 block to disk block.
2916 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2917 Patch from Niels Böhm <bitbucket@arcor.de>
2918
674835c8 29192008-06-29 Robert Millan <rmh@aybabtu.com>
2920
2921 * util/update-grub_lib.in (font_path): Search for fonts in
2922 /boot/grub first, which is more likely to be readable (we aren't
2923 deciding where fonts live, just looking for them).
2924
f527dbc8 29252008-06-26 Pavel Roskin <proski@gnu.org>
2926
6c2d8df6 2927 * util/biosdisk.c (read_device_map): Don't leave dead map
2928 entries for devices failing stat() check.
2929
f527dbc8 2930 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2931 core_path_dev for the core.img path on the target device.
2932
aebe3d13 29332008-06-26 Robert Millan <rmh@aybabtu.com>
2934
2935 * disk/fs_uuid.c: New file.
2936 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2937 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2938 (fs_uuid_mod_LDFLAGS): New variables.
2939 * include/grub/disk.h (grub_disk_dev_id): Add
2940 `GRUB_DISK_DEVICE_UUID_ID'.
2941 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2942 implement iterate().
2943
37aaf354 29442008-06-26 Robert Millan <rmh@aybabtu.com>
2945
2946 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2947 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2948 Linux image includes no initrd.
2949
25ff262a 29502008-06-21 Javier Martín <lordhabbit@gmail.com>
2951
2952 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2953 call to resolve the core image location that effectively appended the
2954 name twice.
2955
76a2bd44 29562008-06-21 Robert Millan <rmh@aybabtu.com>
2957
2958 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2959 call from here ...
2960
2961 * util/grub.d/10_hurd.in: ... to here ...
2962 * util/grub.d/10_linux.in: ... and here.
2963
650e1c79 29642008-06-19 Robert Millan <rmh@aybabtu.com>
2965
fe987087 2966 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 2967 after it has been set by grub_machine_set_prefix().
2968
6ce63911 29692008-06-19 Robert Millan <rmh@aybabtu.com>
2970
2971 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2972 search result when not saving to variable, not the other way around.
2973 When saving to variable, abort iteration as soon as a match is found.
2974
73940cec 29752008-06-19 Robert Millan <rmh@aybabtu.com>
2976
2977 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2978 check for partition that provides /boot/grub. Its logic is flawed,
2979 as it prevents prepare_grub_to_access_device() from being called
2980 multiple times.
2981
3c62a39d 29822008-06-19 Robert Millan <rmh@aybabtu.com>
2983
2984 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2985 "insmod" command directly when abstraction modules are needed,
fe987087 2986 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 2987 since it had already been processed).
2988
47395a42 29892008-06-19 Pavel Roskin <proski@gnu.org>
2990
2991 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2992 changed. This is needed in case GRUB_LIBDIR changes.
2993 * conf/i386-ieee1275.rmk: Likewise.
2994 * conf/i386-linuxbios.rmk: Likewise.
2995 * conf/i386-pc.rmk: Likewise.
2996 * conf/powerpc-ieee1275.rmk: Likewise.
2997
a145ac2d 29982008-06-18 Pavel Roskin <proski@gnu.org>
2999
3000 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3001 kernel_elf_symlist.c to symlist.c for consistency with other
3002 architectures. Update all users.
3003 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3004
7847c51e 30052008-06-18 Robert Millan <rmh@aybabtu.com>
3006
3007 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3008 it in prefix.
3009
3010 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3011 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3012 a RAID device, run setup() for all members independently on whether
3013 LVM abstraction is being used.
3014 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3015 If grub-mkimage has set `*install_dos_part == -2', don't override this
3016 value.
3017 Perform *install_dos_part adjustments independently on whether
3018 we're embedding or not.
3019 Clarify error message when image is too big for embedding.
3020 Remove duplicate *install_dos_part stanza.
3021
b23e5644 30222008-06-17 Robert Millan <rmh@aybabtu.com>
3023
3024 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3025 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3026 variables.
3027 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3028 values in grub_ofconsole_normal_color and
3029 grub_ofconsole_highlight_color (they're not directly related to
3030 background and foreground).
3031 (grub_ofconsole_setcolorstate): Extract background and foreground
3032 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3033
0aac2f79 30342008-06-17 Robert Millan <rmh@aybabtu.com>
3035
3036 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3037 /boot/grub for the check in last commit, not /boot (they could be
3038 different partitions).
3039
3cca7ef3 30402008-06-16 Robert Millan <rmh@aybabtu.com>
3041
3042 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3043 asked to setup access for the same partition that provides /boot,
3044 don't bother using UUIDs since our root already has the value we
3045 want.
3046
347396d8 30472008-06-16 Robert Millan <rmh@aybabtu.com>
3048
3049 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3050 I2O devices.
3051 Patch from Sven Mueller <sven@debian.org>.
3052
991477f8 30532008-06-16 Robert Millan <rmh@aybabtu.com>
3054
3055 * util/update-grub.in: Check for $EUID instead of $UID.
3056 Reported by Vincent Zweije.
3057
d31a32a1 30582008-06-16 Bean <bean123ch@gmail.com>
3059
fe987087 3060 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 3061 (grub_ext2_read_block): Likewise.
3062 (grub_ext2_read_inode): Likewise.
3063 (grub_ext2_mount): Likewise.
3064 (grub_ext2_close): Likewise.
3065 (grub_ext3_get_journal): Removed.
3066
fe987087 3067 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 3068 (grub_reiserfs_read_symlink): Likewise.
3069 (grub_reiserfs_mount): Likewise.
3070 (grub_reiserfs_open): Likewise.
3071 (grub_reiserfs_read): Likewise.
3072 (grub_reiserfs_close): Likewise.
3073 (grub_reiserfs_get_journal): Removed.
3074
3075 * fs/fshelp.c (grub_fshelp_read): Removed.
3076 (grub_fshelp_map_block): Likewise.
3077
3078 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3079 (grub_fshelp_journal): Likewise.
3080 (grub_fshelp_read): Likewise.
3081 (grub_fshelp_map_block): Likewise.
3082
3540a760 30832008-06-16 Pavel Roskin <proski@gnu.org>
3084
3085 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3086 floating point anymore.
3087 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3088
95614c84 30892008-06-15 Pavel Roskin <proski@gnu.org>
3090
3091 * commands/ls.c (grub_ls_list_files): Use integer calculations
3092 for human readable format, avoid floating point use.
3093 * kern/misc.c (grub_ftoa): Remove.
3094 (grub_vsprintf): Remove floating point support.
3095
50465dd6 30962008-06-15 Robert Millan <rmh@aybabtu.com>
3097
fe6b695a 3098 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 3099 devices.
3100 Reported by Max Vozeler.
3101
a9207284 31022008-06-15 Robert Millan <rmh@aybabtu.com>
3103
3104 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3105 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3106 skipped later.
3107 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3108 the beginning of the prefix.
3109
3110 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3111 It is assumed that if we have a memdisk, grub-mkimage has set
3112 grub_prefix to include the "(memdisk)" drive in it.
3113
a7cbd45a 31142008-06-15 Robert Millan <rmh@aybabtu.com>
3115
3116 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3117 Initialize keyboard controller after registering the terminal, so that
3118 grub_printf() can be called from grub_keyboard_controller_init().
3119
21cf716a 31202008-06-15 Robert Millan <rmh@aybabtu.com>
3121
3122 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3123 extent-btree which is written as big endian on disk.
3124 Reported by Alain Greppin <al@chilibi.org>.
3125
23a64d8e 31262008-06-14 Robert Millan <rmh@aybabtu.com>
3127
3128 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3129 * util/i386/pc/grub-install.in (modules): Likewise.
3130
d687651c 31312008-06-13 Pavel Roskin <proski@gnu.org>
3132
3133 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3134
dfe9ddd4 31352008-06-13 Bean <bean123ch@gmail.com>
3136
3137 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3138
3139 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3140
3141 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3142 to indicate sparse block.
3143
16ae7781 31442008-06-12 Pavel Roskin <proski@gnu.org>
3145
e6d1a308 3146 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3147 number, grub_fshelp_read() does it for us.
3148
16ae7781 3149 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3150 linear disk read with journal translation.
3151 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3152 * include/grub/fshelp.h: Declare grub_fshelp_read().
3153
40fd3a2b 31542008-06-09 Pavel Roskin <proski@gnu.org>
3155
3156 * fs/minix.c (grub_minix_mount): Handle error reading
3157 superblock.
3158
f5679726 31592008-06-08 Robert Millan <rmh@aybabtu.com>
3160
3161 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3162 don't append the RAID prefix afterwards.
3163 Reported by Clint Adams.
3164
ce525529 31652008-06-08 Robert Millan <rmh@aybabtu.com>
3166
3167 Based on description from Pavel:
3168 * kern/disk.c (grub_disk_check_range): Rename to ...
3169 (grub_disk_adjust_range): ... this. Add a comment explaining the
3170 tasks performed by this function.
3171
ad4936a0 31722008-06-08 Robert Millan <rmh@aybabtu.com>
3173
3174 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3175 `num_serial' (for consistency with other variables).
3176 (struct grub_ntfs_data): Add `uuid' member.
3177 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3178 (grub_ntfs_uuid): New function.
3179 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3180
dc20b0f9 31812008-06-07 Pavel Roskin <proski@gnu.org>
3182
3183 * util/biosdisk.c (open_device): Revert last change to the
3184 function, it broke installation. The sector needs to be
3185 different dependent on which device is opened.
3186
c5e3cfba 31872008-06-06 Robert Millan <rmh@aybabtu.com>
3188
3189 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3190 rest of GRUB, and breakage doesn't happen if its value were modified.
3191
3192 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3193 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3194 a constant (same value).
3195 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3196 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3197
26a1f8c4 31982008-06-06 Robert Millan <rmh@aybabtu.com>
3199
3200 * util/biosdisk.c (open_device): Do not modify sector offset when
3201 accessing a partition. kern/disk.c already handles this for us.
3202
25d6b327 32032008-06-06 Robert Millan <rmh@aybabtu.com>
3204
3205 * util/grub-emu.c (grub_machine_init): Move code in this function from
3206 here ...
3207 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3208 segfault in case grub_printf() is called).
3209
3210 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3211 grub_probe. Update all users not to explicitly add it again.
3212 (grub_device): New variable; contains corresponding device for grubdir.
3213 (fs_module, partmap_module, devabstraction_module): Pass
3214 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3215 every time.
3216
9ece62fb 32172008-06-05 Robert Millan <rmh@aybabtu.com>
3218
3219 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3220 is found, print it (same layout as with labels).
3221
1ad36d37 32222008-06-04 Robert Millan <rmh@aybabtu.com>
3223
3224 * util/biosdisk.c (get_drive): Rename to ...
3225 (find_grub_drive): ... this. Update all users.
3226
3227 (get_os_disk): Rename to ...
3228 (convert_system_partition_to_system_disk): ... this. Update all users.
3229
3230 (find_drive): Rename to ...
3231 (find_system_device): ... this. Update all users.
3232
e6a30859 32332008-06-04 Robert Millan <rmh@aybabtu.com>
3234
3235 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3236 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3237 (make_device_map): Likewise.
3238
00c108a4 32392008-06-01 Robert Millan <rmh@aybabtu.com>
3240
3241 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3242 before dereferencing it.
3243
3244 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3245 union with fat12/fat16-specific ones. Add some new fields, including
3246 `num_serial' for both versions.
3247 (struct grub_fat_data): Add `uuid' member.
3248 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3249 names. Initialize `data->uuid' using `num_serial'.
3250 (grub_fat_uuid): New function.
3251 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3252
3253 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3254 (grub_reiserfs_uuid): New function.
3255 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3256 member.
3257
3258 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3259 (grub_xfs_uuid): New function.
3260 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3261
1385c5bb 32622008-06-01 Robert Millan <rmh@aybabtu.com>
3263
3264 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3265 code that is backward compatible with pre-uuid search command.
3266
c682dfd7 32672008-05-31 Robert Millan <rmh@aybabtu.com>
3268
3269 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3270 floppies after everything else, to ensure floppy drive isn't accessed
3271 unnecessarily (patch from Bean).
3272
b7db5d47 32732008-05-31 Robert Millan <rmh@aybabtu.com>
3274
3275 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3276 not print device names when we were asked to set a variable.
3277
6e037aa9 32782008-05-31 Robert Millan <rmh@aybabtu.com>
3279
3280 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3281 using "cursor-on" and "cursor-off" commands (understood at least by
3282 the Open Firmware flavour on OLPC).
3283
41305bc8 32842008-05-31 Michael Gorven <michael@gorven.za.net>
3285
3286 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3287 on and off sequences.
3288
69ba137e 32892008-05-31 Robert Millan <rmh@aybabtu.com>
3290
3291 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3292 * util/update-grub.in: Likewise.
3293
520ae21b 32942008-05-30 Pavel Roskin <proski@gnu.org>
3295
3296 * util/biosdisk.c (linux_find_partition): Simplify logic and
3297 make the code more universal. Keep special processing for
3298 devfs, but use a simple rule for all other devices. If the
3299 device ends with a number, append 'p' and the partition number.
3300 Otherwise, append only the partition number.
3301
5786569b 33022008-05-30 Robert Millan <rmh@aybabtu.com>
3303
3304 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3305 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3306 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3307 the `root' parameter to Linux.
3308
51500452 33092008-05-30 Robert Millan <rmh@aybabtu.com>
3310
3311 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3312 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3313 --fs_uuid with --fs-uuid.
3314 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3315 all filesystems support them).
3316
811d3878 33172008-05-30 Robert Millan <rmh@aybabtu.com>
3318
3319 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 3320 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 3321
cab63c95 33222008-05-30 Robert Millan <rmh@aybabtu.com>
3323
3324 * util/grub.d/00_header.in: Remove obsolete comment referencing
3325 convert_system_path_to_grub_path().
3326 * util/update-grub.in: Likewise.
3327 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3328 (convert_system_path_to_grub_path): Add a warning message explaining
3329 that this function is deprecated. Rely on is_path_readable_by_grub()
3330 for the readability checks.
3331 (font_path): Use is_path_readable_by_grub() for the readability
3332 check rather than convert_system_path_to_grub_path().
3333
972e2f7a 33342008-05-30 Robert Millan <rmh@aybabtu.com>
3335
3336 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3337 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3338 converting it first.
3339 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3340 grub.cfg for access to font file, and afterwards call it again to set
3341 the root device.
3342
62191274 33432008-05-30 Robert Millan <rmh@aybabtu.com>
3344
3345 * commands/search.c (options): Add --fs_uuid option.
3346 (search_fs_uuid): New function.
3347 (grub_cmd_search): Fix --set argument passing.
3348 Use search_fs_uuid() when requested via --fs_uuid.
3349 (grub_search_init): Update help message.
3350 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3351 and redeclare it as an array of 16-bit words.
3352 (grub_ext2_uuid): New function.
3353 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3354 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3355 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3356 (GRUB_DEVICE_BOOT_UUID): New variables.
3357 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3358 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3359 whenever possible.
3360 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3361 just assume `root' variable has the right value.
3362 * util/grub.d/10_linux.in: Likewise.
3363 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3364 via PRINT_FS_UUID.
3365 (main): Recognise `-t fs_uuid' argument.
3366
01b73ec8 33672008-05-30 Robert Millan <rmh@aybabtu.com>
3368
3369 * util/biosdisk.c (map): Redefine structure to hold information
3370 about GRUB drive name.
fe6b695a 3371 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 3372 drive names.
3373 (call_hook): Remove.
3374 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3375 member. Assume drive has partitions.
3376 (grub_util_biosdisk_open): Access device names via `.device' struct
3377 member.
3378 (open_device): Likewise.
3379 (find_drive): Likewise.
3380 (read_device_map): Adjust map[] usage to match the new struct
3381 definition. Don't check for duplicates (still possible, but not cheap
3382 anymore).
3383 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3384 (make_device_name): Remove assumption of BIOS-like drive names.
3385
22f16596 33862008-05-30 Pavel Roskin <proski@gnu.org>
3387
3388 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3389 compiling execute.c doesn't need grub_script.tab.h anymore.
3390 (normal/command.c_DEPENDENCIES): Likewise.
3391 (normal/function.c_DEPENDENCIES): Likewise.
3392 * conf/i386-ieee1275.rmk: Likewise.
3393 * conf/i386-linuxbios.rmk: Likewise.
3394 * conf/i386-pc.rmk: Likewise.
3395 * conf/powerpc-ieee1275.rmk: Likewise.
3396 * conf/sparc64-ieee1275.rmk: Likewise.
3397
528ad8f2 33982008-05-29 Pavel Roskin <proski@gnu.org>
3399
d1dff95d 3400 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3401 when scanning metadata for volume group name.
3402
528ad8f2 3403 * include/grub/script.h: Don't include grub_script.tab.h. It's
3404 a generated file, which may only be included from the files with
3405 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3406 use union YYSTYPE, as the later allows forward declaration.
3407 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3408
47248e08 34092008-05-29 Robert Millan <rmh@aybabtu.com>
3410
3411 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3412 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3413 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3414 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3415 scan codes.
3416
ee632529 34172008-05-29 Robert Millan <rmh@aybabtu.com>
3418
3419 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3420 control key combinations.
3421
eee96e08 34222008-05-29 Robert Millan <rmh@aybabtu.com>
3423
3424 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3425 * util/ieee1275/grub-install.in: ... to here.
3426 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3427 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3428 (grub_install_SOURCES): Likewise.
3429
da9a6a94 34302008-05-29 Robert Millan <rmh@aybabtu.com>
3431
3432 * fs/affs.c: Update copyright year.
3433 * fs/ext2.c: Likewise.
3434 * fs/fshelp.c: Likewise.
3435 * fs/hfsplus.c: Likewise.
3436 * fs/ntfs.c: Likewise.
3437 * fs/xfs.c: Likewise.
3438 * include/grub/fshelp.h: Likewise.
3439 * util/grub-mkdevicemap.c: Likewise.
3440
12e65f3a 34412008-05-28 Robert Millan <rmh@aybabtu.com>
3442
3443 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3444 might need to be fatfs to support some firmware implementations
3445 (e.g. OFW or EFI).
3446
23023641 34472008-05-28 Robert Millan <rmh@aybabtu.com>
3448
3449 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3450 devices.
3451 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3452 (make_device_map): Likewise.
3453
887d2619 34542008-05-20 Bean <bean123ch@gmail.com>
3455
3456 * fs/fshelp.c (grub_fshelp_map_block): New function.
3457 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3458 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3459
3460 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3461 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3462 (grub_fshelp_journal): New structure.
3463 (grub_fshelp_map_block): New function prototype.
3464 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3465 (grub_fshelp_map_block): Likewise.
3466
3467 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3468 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3469 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3470 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3471 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3472 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3473 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3474 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3475 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3476 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3477 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3478 (grub_ext2_sblock): New members for journal support.
3479 (grub_ext3_journal_header): New structure.
3480 (grub_ext3_journal_revoke_header): Likewise.
3481 (grub_ext3_journal_block_tag): Likewise.
3482 (grub_ext3_journal_sblock): Likewise.
3483 (grub_fshelp_node): New members logfile and journal.
3484 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3485 grub_fshelp_map_block to get real block number.
3486 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3487 number.
3488 (grub_ext2_read_inode): Likewise.
3489 (grub_ext3_get_journal): New function.
3490 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3491 (grub_ext2_close): Release memory used by journal.
3492
3493 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3494 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3495 (grub_reiserfs_transaction_header): Renamed to
3496 grub_reiserfs_description_block, replace field data with real_blocks.
3497 (grub_reiserfs_commit_block): New structure.
3498 (grub_reiserfs_data): New member journal.
3499 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3500 number.
3501 (grub_reiserfs_read_symlink): Likewise.
3502 (grub_reiserfs_iterate_dir): Likewise.
3503 (grub_reiserfs_open): Likewise.
3504 (grub_reiserfs_read): Likewise.
3505 (grub_reiserfs_get_journal): New function.
3506 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3507 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3508 using grub_reiserfs_get_journal.
3509 (grub_reiserfs_close): Release memory used by journal.
3510
3511 * fs/affs.c (grub_affs_read_block): Change block type to
3512 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3513
3514 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3515
3516 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3517
3518 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3519
3520 * fs/udf.c (grub_udf_read_block): Change block type to
3521 grub_disk_addr_t. Use type cast to avoid warning.
3522
3523 * fs/xfs.c (grub_xfs_read_block): Likewise.
3524
b7c6bed5 35252008-05-16 Christian Franke <franke@computer.org>
3526
3527 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3528 to ensure that break with ESC will always work.
3529 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3530 Remove ESC from keyboard queue.
3531
eedf167f 35322008-05-16 Christian Franke <franke@computer.org>
3533
3534 * util/biosdisk.c: [__CYGWIN__] Add includes.
3535 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3536 (get_os_disk): Move variable declarations to OS specific
3537 parts to avoid warning.
3538 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3539 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3540 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3541 Cygwin.
3542 * util/getroot.c: [__CYGWIN__] Add includes.
3543 (strip_extra_slashes): Fix "/" case.
3544 [__CYGWIN__] (get_win32_path): New function.
3545 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3546 [__CYGWIN__] (find_root_device): Disable.
3547 [__CYGWIN__] (get_bootsec_serial): New function.
3548 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3549 [__linux__] (grub_guess_root_device): Add early returns to simplify
3550 structure.
3551 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3552 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3553 check for Linux only.
3554
a079699e 35552008-05-15 Bean <bean123ch@gmail.com>
3556
3557 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3558 keyboard hang problem in apple's intel mac.
3559
1cf4059a 35602008-05-09 Robert Millan <rmh@aybabtu.com>
3561
3562 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3563 devices.
3564 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3565 (make_device_map): Likewise.
3566 Reported by Aurelien Jarno <aurel32@debian.org>
3567
ed759390 35682008-05-07 Ian Campbell <ijc@hellion.org.uk>
3569
3570 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3571 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3572 (make_device_map): Output entries for xvd type disks.
3573
b56c4eaa 35742008-05-07 Robert Millan <rmh@aybabtu.com>
3575
3576 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3577 devices.
3578 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3579 (make_device_map): Likewise.
3580 Reported by Roland Dreier <rdreier@cisco.com>
3581
7f8866ed 35822008-05-07 Robert Millan <rmh@aybabtu.com>
3583
3584 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3585 grub_strstr() call. Correct a few mistakes in failure path handling.
3586
b0346e0f 35872008-05-06 Robert Millan <rmh@aybabtu.com>
3588
3589 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3590 Do not print a trailing slash (therefore, the root directory is an
3591 empty string).
3592 (convert_system_path_to_grub_path): Do not remove trailing slash
3593 from make_system_path_relative_to_its_root() output.
3594
3595 * util/i386/pc/grub-install.in: Add trailing slash to output from
3596 make_system_path_relative_to_its_root().
3597
6cf12cbd 35982008-05-06 Robert Millan <rmh@aybabtu.com>
3599
3600 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3601 ensures that output lines aren't intermangled with those sent to
3602 stderr (via grub_util_info()).
3603 * util/grub-probe.c (grub_refresh): Likewise.
3604 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3605
0fbb3117 36062008-05-05 Christian Franke <franke@computer.org>
3607
3608 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3609 Add Cygwin device names.
3610 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3611 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3612 (check_device): Return error instead of success on empty name.
3613 (make_device_map): Move label inside linux specific code to
3614 prevent compiler warning.
3615
8124cdb7 36162008-04-30 Robert Millan <rmh@aybabtu.com>
3617
3618 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3619 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3620 first boot option.
3621 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3622
094c01d0 36232008-04-29 Robert Millan <rmh@aybabtu.com>
3624
3625 * docs/grub.cfg: New file (example GRUB configuration).
3626
f4b1fc02 36272008-04-26 Robert Millan <rmh@aybabtu.com>
3628
329ce2a5 3629 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3630 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3631 and `disk/ieee1275/nand.c'.
f4b1fc02 3632
25f16ec1 36332008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 3634
25f16ec1 3635 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3636 i386-linuxbios.
3637
3638 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3639 change the buffer size to 4096 for cdrom device.
3640
3641 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3642 and nand.mod.
3643 (_linux_mod_SOURCES): New variable.
3644 (_linux_mod_CFLAGS): Likewise.
3645 (_linux_mod_LDFLAGS): Likewise.
3646 (linux_mod_SOURCES): Likewise.
3647 (linux_mod_CFLAGS): Likewise.
3648 (linux_mod_LDFLAGS): Likewise.
3649 (nand_mod_SOURCES): Likewise.
3650 (nand_mod_CFLAGS): Likewise.
3651 (nand_mod_LDFLAGS): Likewise.
3652
3653 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3654 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3655 type property. (nand device in olpc don't have this property)
3656
3657 * include/grub/disk.h (grub_disk_dev_id): New macro
3658 GRUB_DISK_DEVICE_NAND_ID.
3659
3660 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3661 function prototype.
3662 (grub_rescue_cmd_initrd): Likewise.
3663
3664 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3665 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3666 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 3667
25f16ec1 3668 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3669 GRUB_MACHINE_IEEE1275 is defined.
3670
3671 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3672 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3673
3674 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3675 on nested function heap_init.
3676 (grub_upper_mem): New variable for i386-ieee1275.
3677 (grub_get_extended_memory): New function for i386-ieee1275.
3678 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3679
3680 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3681 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3682 property.
f19dbdb7 3683
25f16ec1 3684 * loader/i386/ieee1275/linux.c: New file.
3685
3686 * loader/i386/ieee1275/linux_normal.c: New file.
3687
3688 * disk/ieee1275/nand.c: New file.
3689
e89d61e9 36902008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3691
3692 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3693 value.
3694 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3695
602566f6 36962008-04-18 Robert Millan <rmh@aybabtu.com>
3697
3698 Restructures early code path on ieee1275 to unify grub_main() as
3699 the first C function that is executed in every platform.
3700
3701 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3702 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3703 cmain().
3704 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3705 * kern/ieee1275/cmain.c (cmain): Rename to ...
3706 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3707 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3708 at the beginning.
3709
57490c2b 37102008-04-18 Robert Millan <rmh@aybabtu.com>
3711
3712 * util/update-grub.in: Fix syntax error when setting
3713 `GRUB_PRELOAD_MODULES'.
3714 Reported by Stephane Chazelas <stephane@artesyncp.com>
3715
1977517d 37162008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3717
3718 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3719 section into account, newer toolchains generate unique build ids
3720 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 3721 we want build ids to be preserved
1977517d 3722 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3723 far from other sections don't cause the raw binary images grow
3724 size
3725
bfb1f1a2 37262008-04-15 Robert Millan <rmh@aybabtu.com>
3727
3728 * disk/lvm.c: Update copyright year.
3729 * kern/misc.c: Likewise.
3730
01979850 37312008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3732
3733 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 3734 there is no memory left for physical volume name.
01979850 3735
0a1150e2 37362008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3737
3738 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3739 volume name mapping to support bigger than 9 character names properly.
3740
82ead3fe 37412008-04-13 Robert Millan <rmh@aybabtu.com>
3742
3743 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3744 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3745
e54a72f5 37462008-04-13 Christian Franke <franke@computer.org>
3747
3748 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3749 to create a floppy emulation boot CD when non emulation mode
3750 does not work.
3751 Enable Joliet CD filesystem extension.
3752
9fe86034 37532008-04-13 Robert Millan <rmh@aybabtu.com>
3754
3755 * kern/misc.c (grub_strncat): Fix off-by-one error.
3756 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3757
3758 * kern/env.c (grub_env_context_close): Clear current context, not
3759 previous one.
3760 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3761
3762 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3763
7ceeee39 37642008-04-13 Robert Millan <rmh@aybabtu.com>
3765
3766 Improve robustness when handling LVM.
3767
3768 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 3769 (and leave `*p' unmodified).
7ceeee39 3770 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3771 through it.
3772 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3773 iterating through it.
3774 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3775 through it.
fe6b695a 3776 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 3777 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3778 Don't assume `vg->pvs != NULL' when iterating through it.
3779
58cd3d85 37802008-04-13 Robert Millan <rmh@aybabtu.com>
3781
3782 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3783 * genmk.rb (partmap): New variable.
3784 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3785 (#{partmap}): New target rule.
3786 * genpartmaplist.sh: New file.
3787 * Makefile.in (pkglib_DATA): Add partmap.lst.
3788 (partmap.lst): New target rule.
3789 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3790 modules (including all partition maps), instead of preloading them.
3791
78b51059 37922007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3793
3794 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3795 `linux-boot-prober' (if installed) to detect other operating
3796 systems which are installed on the computer and add them to
3797 the boot menu.
3798 * conf/common.rmk: Build and install 30_os-prober.
3799
a91627b4 38002008-04-12 Robert Millan <rmh@aybabtu.com>
3801
3802 * kern/powerpc/ieee1275/init.c: Move from here ...
3803 * kern/ieee1275/init.c: ... to here. Update all users.
3804
3805 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3806 * kern/ieee1275/cmain.c: ... to here. Update all users.
3807
3808 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3809 * kern/ieee1275/openfw.c: ... to here. Update all users.
3810
3811 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3812 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3813
322562ea 38142008-04-10 Pavel Roskin <proski@gnu.org>
3815
3816 * configure.ac: Always use "_cv_" in cache variables for
3817 compatibility with Autoconf 2.62.
3818
a02a73c5 38192008-04-07 Robert Millan <rmh@aybabtu.com>
3820
3821 Revert grub/machine/init.h addition by Pavel (since it breaks on
3822 i386-ieee1275 and others):
3823 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3824 * util/powerpc/ieee1275/misc.c: Likewise.
3825
25c024b1 38262008-04-07 Robert Millan <rmh@aybabtu.com>
3827
3828 * util/grub-probe.c (probe): Improve error message.
3829
3cbd2f98 38302008-04-07 Robert Millan <rmh@aybabtu.com>
3831
3832 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3833 (this prevents the presence of a bogus entry from ruining the whole
3834 thing).
3835
87a297bf 38362008-04-06 Pavel Roskin <proski@gnu.org>
3837
36747a62 3838 * util/biosdisk.c: Include grub/util/biosdisk.h.
3839 * util/grub-fstest.c (execute_command): Make static.
3840 * util/grub-mkdevicemap.c (check_device): Likewise.
3841 * util/i386/pc/misc.c: Include grub/machine/init.h.
3842 * util/powerpc/ieee1275/misc.c: Likewise.
3843 * util/lvm.c: Include grub/util/lvm.h.
3844 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3845 grub/cache.h.
3846 * util/raid.c: Include grub/util/raid.h.
3847 (grub_util_getdiskname): Make static.
3848
87a297bf 3849 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3850 grub_hostfs_fini(), as they are called from grub_init_all() and
3851 grub_fini_all() respectively. This fixes an infinite loop in
3852 grub-fstest due to double registration of hostfs.
3853 Reported by Christian Franke <Christian.Franke@t-online.de>
3854
f6ce7629 38552008-04-05 Pavel Roskin <proski@gnu.org>
3856
3857 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3858 all 8 functions. Otherwise, probe function 0 only.
3859
070e49e4 38602008-04-04 Pavel Roskin <proski@gnu.org>
3861
8b088a4c 3862 * commands/lspci.c (grub_lspci_iter): Print the bus number
3863 correctly.
3864
4f657021 3865 * commands/lspci.c (grub_pci_classes): Fix typos.
3866 (grub_lspci_iter): Don't print func twice. Print vendor ID
3867 before device ID, as it's normally done.
3868
070e49e4 3869 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3870 Fix signedness warnings.
3871 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3872 Likewise.
3873 * util/ieee1275/get_disk_name.c: Include config.h so that
3874 _GNU_SOURCE is defined and getline() is declared. Mark an
3875 unused argument as such. Fix a signedness warning.
3876
ba7328dc 38772008-04-02 Pavel Roskin <proski@gnu.org>
3878
26887f22 3879 * genkernsyms.sh.in: Use more robust assignments for CC and
3880 srcdir. Quote srcdir.
3881 * gensymlist.sh.in: Likewise. Assert at the compile time that
3882 the symbol table is not empty.
3883
ba7328dc 3884 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3885 * fs/cpio.c (grub_cpio_read): Likewise.
3886
0f582c6b 38872008-04-01 Pavel Roskin <proski@gnu.org>
3888
4b6e1995 3889 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3890 * disk/host.c (grub_host_open): Likewise.
3891 * disk/loopback.c (grub_loopback_open): Likewise.
3892 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3893 disk->id as in disk/host.c, not a multi-character constant.
3894
828a2768 3895 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3896 later is obsolete, potentially dangerous and sets a bad example.
3897 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3898 * util/misc.c (grub_util_get_image_size): Likewise.
3899
2bb4fb47 3900 * disk/loopback.c (options): Improve help for "--partitions".
3901
0f582c6b 3902 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3903 options to align them with the short options, e.g. "echo -e".
3904
a33224e0 39052008-03-31 Bean <bean123ch@gmail.com>
3906
3907 * video/reader/png.c (grub_png_data): New member is_16bit and
3908 image_data.
3909 (grub_png_decode_image_header): Detect 16 bit png image.
3910 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3911 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3912 (grub_video_reader_png): Release memory occupied by image_data.
3913
3914 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3915 4096 bytes.
3916 (grub_nfs_mount): Skip the test for sector per cluster.
3917
3918 * include/grub/ntfs.h (MAX_SPC): Removed.
3919
86cb4f54 39202008-03-31 Bean <bean123ch@gmail.com>
3921
3922 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3923 (grub_probe_SOURCES): Add fs/afs.c.
3924 (grub_fstest_SOURCES): Likewise.
3925 (afs_mod_SOURCES): New variable.
3926 (afs_mod_CFLAGS): Likewise.
3927 (afs_mod_LDFLAGS): Likewise.
3928
3929 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3930 (grub_emu_SOURCES): Likewise.
3931
3932 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3933
3934 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3935
3936 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3937
3938 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3939
3940 * fs/afs.c: New file.
3941
17c74c21 39422008-03-30 Pavel Roskin <proski@gnu.org>
3943
4cb68e89 3944 * disk/host.c: Include grub/misc.h to fix a warning.
3945 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3946 warnings about implicit declarations.
3947
8790bb04 3948 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3949 variable.
3950 * include/grub/i386/loader.h: Change declaration of
3951 grub_linux_boot() to match what grub_loader_set() expects.
3952 * util/getroot.c (grub_guess_root_device): Return const char* to
3953 fix a warning.
3954 * util/grub-probe.c (probe): Fix a warning about uninitialized
3955 abstraction_name variable.
3956 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3957 second argument as unused to fix a warning.
3958
9a3f3296 3959 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3960 missing grub_error() call.
3961
0ecef90d 3962 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3963 2.60 and newer uses it to define datadir.
3964
0bf6d401 3965 * commands/sleep.c: Fix warning about implicit declaration.
3966 * disk/memdisk.c: Likewise.
3967 * loader/aout.c: Likewise.
3968 * loader/i386/bsd_normal.c: Likewise.
3969 * util/grub-probe.c: Likewise.
3970
7cdacf97 3971 * commands/i386/cpuid.c (has_longmode): Make static.
3972 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3973 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3974
17c74c21 3975 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3976 GDT. This is more robust, as %ds can change.
3977 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3978 calling real_to_prot().
3979 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3980
80a3e68b 39812008-03-28 Pavel Roskin <proski@gnu.org>
3982
3983 * kern/i386/pc/startup.S: Assert that uncompressed functions
3984 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3985 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3986 code, as they push parts of the code (error handlers) beyond
3987 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3988 code as correctness and size.
3989
77bcd272 39902008-03-28 Pavel Roskin <proski@gnu.org>
3991
3992 * kern/i386/pc/startup.S
3993 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3994 data block address to the real mode, keep offset minimal. This
3995 works around a bug in AWARD BIOS on old Athlon systems, which
3996 makes CD detection hang.
3997
c5dfd43b 39982008-03-26 Pavel Roskin <proski@gnu.org>
3999
4000 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4001 const.
4002 * include/grub/normal.h: Add grub_parse_color_name_pair()
4003 declaration.
4004
bf962df2 40052008-03-24 Bean <bean123ch@gmail.com>
4006
4007 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4008 (cd_count): Removed.
4009 (cd_drive): New variable.
4010 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4011 (grub_biosdisk_call_hook): Likewise.
4012 (grub_biosdisk_iterate): Change cdrom detection method.
4013 (grub_biosdisk_open): Replace cd_start with cd_drive.
4014 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4015 detect cdrom device.
4016
4017 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4018 Removed.
4019 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4020 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4021 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4022 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4023 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4024 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4025 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4026 (grub_biosdisk_cdrp): New structure.
4027 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4028
4029 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4030
4031 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4032 device.
4033
4034 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4035 New function.
4036
68e7fc7a 40372008-03-20 Robert Millan <rmh@aybabtu.com>
4038
4039 Remove 2 TiB limit in ata.mod.
4040 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4041 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4042 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4043 grub_uint64_t instead of grub_uint32_t.
4044
38ad2cf5 40452008-03-05 Bean <bean123ch@gmail.com>
4046
4047 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4048 (grub_multiboot): Set boot device.
4049
4050 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4051
2b89344e 40522008-03-02 Bean <bean123ch@gmail.com>
4053
4054 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4055 symlink_buffer.
4056
87a95d1f 40572008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4058
4059 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4060 texinfo.tex.
4061
4062 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4063 modified.
4064
4065 * docs/fdl.texi: New file.
f19dbdb7 4066
87a95d1f 4067 * docs/mdate-sh: New file. Copied from gnulib.
4068 * docs/texinfo.tex: Likewise.
4069
4070 * config.guess: Updated from gnulib.
4071 * install-sh: Likewise.
4072
7dc15d8e 40732008-02-28 Robert Millan <rmh@aybabtu.com>
4074
4075 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4076 (aout_mod_SOURCES): New variable.
4077 (aout_mod_CFLAGS): Likewise.
4078 (aout_mod_LDFLAGS): Likewise.
4079
4080 * conf/i386-ieee1275.rmk: Likewise.
4081
b00ab696 40822008-02-28 Robert Millan <rmh@aybabtu.com>
4083
4084 * util/update-grub.in: Reorganise terminal validity check. Accept
4085 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4086 Based on suggestion by Franklin PIAT.
4087
79ca2d78 40882008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4089
4090 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4091 function.
4092 * util/getroot.c (grub_util_check_block_device): New function that
4093 returns the given argument if it is a block device and returns NULL else.
4094 * util/grub-probe.c (argument_is_device): New variable.
4095 (probe): Promote device_name from a variable to an argument. Receive
4096 device_name from grub_util_check_block_device() if path is NULL and from
4097 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 4098 (options): Introduce new parameter '-d, --device'.
79ca2d78 4099 (main): Add description of the new parameter to the help screen.
4100 Rename path variable to argument. Set argument_is_device if the '-d'
4101 option is given. Pass argument to probe() depending on
4102 argument_is_device.
4103
0d16e571 41042008-02-24 Bean <bean123ch@gmail.com>
4105
4106 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4107 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4108 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4109 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4110 (GRUB_ISO9660_VOLDESC_END): Likewise.
4111 (grub_iso9660_primary_voldesc): New member escape.
4112 (grub_iso9660_data): New member joliet.
4113 (grub_iso9660_convert_string): New function.
4114 (grub_iso9660_mount): Detect joliet extension.
4115 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4116 (grub_iso9660_iso9660_label): Likewise.
4117
4118 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4119 (grub_setup_SOURCES): Add fs/udf.c.
4120 (grub_fstest_SOURCES): Likewise.
4121 (udf_mod_SOURCES): New variable.
4122 (udf_mod_CFLAGS): Likewise.
4123 (udf_mod_LDFLAGS): Likewise.
4124
4125 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4126 (grub_emu_SOURCES): Likewise.
4127
4128 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4129
4130 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4131
4132 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4133
4134 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4135
4136 * fs/udf.c: New file.
4137
8a594a17 41382008-02-24 Robert Millan <rmh@aybabtu.com>
4139
4140 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4141 (normal/lexer.c_DEPENDENCIES): New variables.
4142 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4143 (normal/lexer.c_DEPENDENCIES): Likewise.
4144 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4145 (normal/lexer.c_DEPENDENCIES): Likewise.
4146 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4147 (normal/lexer.c_DEPENDENCIES): Likewise.
4148 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4149 (normal/lexer.c_DEPENDENCIES): Likewise.
4150 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4151 (normal/lexer.c_DEPENDENCIES): Likewise.
4152
2dc33c03 41532008-02-23 Robert Millan <rmh@aybabtu.com>
4154
4155 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4156 since they were intended to be in hex. This didn't break previously
4157 because of a bug in gpt_partition_map_iterate() (see below).
4158
4159 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4160 when checking the validity of GPT header.
4161 Remove `partno', since it always provides the same information as `i'.
4162
f6f4cfb0 41632008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4164
4165 * include/grub/efi/time.h: Fix a wrong comment.
4166
79ff665f 41672008-02-19 Pavel Roskin <proski@gnu.org>
4168
4169 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4170 message.
4171
d38e24c2 41722008-02-19 Bean <bean123ch@gmail.com>
4173
4174 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4175 (aout_mod_SOURCES): New variable.
4176 (aout_mod_CFLAGS): Likewise.
4177 (aout_mod_LDFLAGS): Likewise.
4178 (_bsd_mod_SOURCES): New variable.
4179 (_bsd_mod_CFLAGS): Likewise.
4180 (_bsd_mod_LDFLAGS): Likewise.
4181 (bsd_mod_SOURCES): New variable.
4182 (bsd_mod_CFLAGS): Likewise.
4183 (bsd_mod_LDFLAGS): Likewise.
4184
4185 * include/grub/aout.h: New file.
4186
4187 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4188
4189 * include/grub/i386/bsd.h: New file.
4190
4191 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4192 to make it public.
4193
4194 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4195 function is called, so that it's possible to change it inside the hook.
4196 (grub_elf64_load): Likewise.
4197 (grub_elf_file): Don't close the file if elf header is not found.
4198 (grub_elf_close): Close the file if grub_elf_file fails (The new
4199 grub_elf_file won't close it).
4200 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4201 (grub_elf64_size): Likewise.
4202
4203 * kern/i386/loader.S (grub_unix_real_boot): New function.
4204
4205 * loader/aout.c: New file.
4206
4207 * loader/i386/bsd.c: New file.
4208
4209 * loader/i386/bsd_normal.c: New file.
4210
4211 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4212
4213 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 4214 can test other formats.
d38e24c2 4215
b93bdb0f 42162008-02-19 Robert Millan <rmh@aybabtu.com>
4217
4218 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4219 (grub_gpt_partition_type_empty): Redefine with macro from
4220 `<grub/gpt_partition.h>'.
4221 (gpt_partition_map_iterate): Adjust partition type comparison.
4222
4223 Export `entry' as partmap-specific `part.data' struct.
4224 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4225
4226 * include/grub/gpt_partition.h (grub_gpt_header)
4227 (grub_gpt_partentry): ... to here (new file).
4228
4229 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4230
4231 (grub_gpt_partition_type_bios_boot): New const variable, defined
4232 with macro from `<grub/gpt_partition.h>'.
4233
4234 (setup): Replace `first_start' with `embed_region', which keeps
4235 track of the embed region (and is partmap-agnostic).
4236
4237 Replace find_first_partition_start() with find_usable_region(),
4238 which finds a usable region for embedding using partmap-specific
4239 knowledge (supports PC/MSDOS and GPT).
4240
4241 Fix all assumptions that the embed region start at sector 1, using
4242 `embed_region.start' from now on. Similarly, use `embed_region.end'
4243 rather than `first_start' to calculate available size.
4244
4245 In grub_util_info() message, replace "into after the MBR" with an
4246 indication of the specific sector our embed region starts at.
4247
66cb40f6 42482008-02-19 Robert Millan <rmh@aybabtu.com>
4249
4250 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4251 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4252 `commands/reboot.c'.
4253 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4254 (halt_mod_SOURCES): Likewise.
4255 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4256 (halt_mod_SOURCES): Likewise.
4257
b7202015 42582008-02-17 Christian Franke <franke@computer.org>
4259
4260 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4261
32b0fc49 42622008-02-17 Robert Millan <rmh@aybabtu.com>
4263
4264 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4265 set `first_start' to 0 for non-PC/MSDOS partition maps.
4266
aca63502 42672008-02-16 Robert Millan <rmh@aybabtu.com>
4268
4269 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4270 do not assume partition map is PC/MSDOS before performing checks that
4271 are specific to that layout.
4272
0de8be86 42732008-02-13 Robert Millan <rmh@aybabtu.com>
4274
4275 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4276 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4277 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4278
c3db8364 42792008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4280
4281 * configure.ac: Only a cosmetic change on the handling of
4282 -fno-stack-protector.
4283
f714229e 42842008-02-12 Alexandre Boeglin <alex@boeglin.org>
4285
c3db8364 4286 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4287 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4288 reboot.c.
f714229e 4289 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4290 (halt_mod_SOURCES): New variable.
4291 (halt_mod_CFLAGS): Likewise.
4292 (halt_mod_LDFLAGS): Likewise.
4293 (reboot_mod_SOURCES): Likewise.
4294 (reboot_mod_CFLAGS): Likewise.
4295 (reboot_mod_LDFLAGS): Likewise.
4296
c3db8364 4297 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4298 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4299 reboot.c.
f714229e 4300 (halt_mod_SOURCES): Likewise.
4301 (reboot_mod_SOURCES): Likewise.
4302
c3db8364 4303 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4304 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 4305 (reboot_mod_SOURCES): Likewise.
4306
4307 * commands/i386/pc/reboot.c: merge this file ...
4308
4309 * commands/ieee1275/reboot.c: ... and this file ...
4310
4311 * commands/reboot.c: ... to this file.
c3db8364 4312 Add some precompiler directive to include the correct header for
4313 each machine.
f714229e 4314
4315 * commands/ieee1275/halt.c: move this file ...
4316
4317 * commands/halt.c: ... to here.
c3db8364 4318 Add some precompiler directive to include the correct header for
4319 each machine.
f714229e 4320
4321 * include/grub/efi/efi.h (grub_reboot): New function declaration.
4322 (grub_halt): Likewise.
4323
4324 * kern/efi/efi.c (grub_reboot): New function.
4325 (grub_halt): Likewise.
4326
c74493e0 43272008-02-12 Robert Millan <rmh@aybabtu.com>
4328
4329 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4330 /dev (like it is done for /dev/mapper). This doesn't provide support
4331 for EVMS, but at least it is now easy to identify the problem when it
4332 arises.
4333
d0db4b04 43342008-02-11 Robert Millan <rmh@aybabtu.com>
4335
4336 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4337 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4338 comparing it with -1, not 0.
4339
bf748642 43402008-02-10 Robert Millan <rmh@aybabtu.com>
4341
4342 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4343 `disk/lvm.c'.
4344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4345 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4346
4347 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4348 `disk/lvm.c' to the end of the list.
4349 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4350 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4351
b5db202a 43522008-02-10 Robert Millan <rmh@aybabtu.com>
4353
4354 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4355 grub_print_error() instead. This will let user know why we're entering
4356 rescue mode.
4357 Based on suggestions from Sam Morris.
4358
83abee31 43592008-02-10 Alexandre Boeglin <alex@boeglin.org>
4360
4361 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4362 on remaining N args, instead of "--" arg N times.
4363
78d5a08b 43642008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4365
4366 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4367 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4368 pattern for unknown glyphs.
4369
68807e5f 43702008-02-09 Robert Millan <rmh@aybabtu.com>
4371
4372 * configure.ac: Probe for `help2man'.
4373 * Makefile.in (builddir): New variable.
4374 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4375 or otherwise add a few flags/options to it.
4376 (install-local): For every executable utility or script that is
4377 installed, invoke $(HELP2MAN) to install a manpage based on --help
4378 output.
4379
4380 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4381 that it doesn't prevent --help from working in build tree.
4382
4383 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4384 with `bug-grub@gnu.org'.
4385 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4386 * util/update-grub.in (usage): New function.
4387 Implement proper argument check, with support for --help and --version
4388 (as well as existing -y).
4389
43902008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 4391
4392 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4393 avoid overwriting previous output.
4394 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4395
c1962162 43962008-02-09 Robert Millan <rmh@aybabtu.com>
4397
4398 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4399 drawing the menu.
4400
3dac2e3f 44012008-02-09 Robert Millan <rmh@aybabtu.com>
4402
4403 * commands/sleep.c: New file.
4404 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4405 (sleep_mod_SOURCES): New variable.
4406 (sleep_mod_CFLAGS): Likewise.
4407 (sleep_mod_LDFLAGS): Likewise.
4408
7a634e08 44092008-02-09 Robert Millan <rmh@aybabtu.com>
4410
4411 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4412 situations in which we can deduce the RAID size and the superblock
4413 doesn't match it.
4414
b92f0c18 44152008-02-09 Robert Millan <rmh@aybabtu.com>
4416
4417 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4418 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4419 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4420
4421 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4422 and return a grub_diskmemberlist_t composed of physical array members.
4423 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4424
4425 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4426 prototype.
4427 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4428 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4429 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4430
4431 * util/grub-probe.c (probe): Move partmap probing code from here ...
4432 (probe_partmap): ... to here.
4433 (probe): Use probe_partmap() once for the disk we're probing, and
4434 additionally, when such disk contains a memberlist() struct member,
4435 once for each disk that is contained in the structure returned by
4436 memberlist().
4437
91a4bf68 44382008-02-09 Robert Millan <rmh@aybabtu.com>
4439
4440 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4441 environment variable to 'all' in order to obtain debug output from
4442 non-util/ code.
4443 * util/i386/pc/grub-setup.c (main): Likewise.
4444
a96f9caa 44452008-02-08 Robert Millan <rmh@aybabtu.com>
4446
4447 * disk/raid.c (grub_raid_scan_device): Check for
4448 `array->device[sb.this_disk.number]' rather than for
4449 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 4450 guaranteed to be accessible.
a96f9caa 4451
b37a9222 44522008-02-08 Robert Millan <rmh@aybabtu.com>
4453
4454 * disk/raid.c: Update copyright.
4455 * fs/cpio.c: Likewise.
4456 * include/grub/raid.h: Likewise.
4457 * loader/i386/pc/multiboot.c: Likewise.
4458 * util/hostfs.c: Likewise.
4459
5626aee1 44602008-02-08 Robert Millan <rmh@aybabtu.com>
4461
4462 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4463 to a grub_disk_t array.
4464 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4465 `device[x]'.
4466 (grub_raid_scan_device): Replace `device[x].name' accesses with
4467 `device[x]->name'. Simplify initialization of `array->device[x]'.
4468
554f0187 44692008-02-08 Robert Millan <rmh@aybabtu.com>
4470
4471 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4472 grub_dprintf() calls.
4473 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4474 error message.
4475
1ec8425d 44762008-02-07 Christian Franke <franke@computer.org>
4477
4478 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4479 instead of fseek and ftell to support large files.
4480 (grub_hostfs_read): Likewise.
4481
f2156fda 44822008-02-07 Robert Millan <rmh@aybabtu.com>
4483
4484 Patch from Jeroen Dekkers.
4485 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 4486 failure, since successfully reading all array members might not be
f2156fda 4487 required.
4488
9216e0e7 44892008-02-06 Robert Millan <rmh@aybabtu.com>
4490
4491 * util/grub-probe.c (probe): Simplify partmap probing (with the
4492 assumption that the first word up to the underscore equals to
4493 the module name).
4494
b0dfd29a 44952008-02-06 Christian Franke <franke@computer.org>
4496
4497 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4498 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4499 last block of a cpio or tar stream.
4500 Check for "TRAILER!!!" instead of any empty data
4501 block to detect last block of a cpio stream.
4502 (grub_cpio_dir): Fix constness of variable np.
4503 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4504 cpio or tar trailer is detected. This fixes a crash
4505 on open of a non existing file.
4506
c32865bf 45072008-02-05 Bean <bean123ch@gmail.com>
4508
4509 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4510 address of entry.
4511 (grub_multiboot_load_elf64): Likewise.
4512 (grub_multiboot): Initialize mbi structure.
4513
4514 * util/grub-fstest.c: Don't include unused header file script.h.
4515
fe6b695a 4516 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 4517 of file.
4518 (grub_fstest_SOURCES): Likewise.
4519
409480b7 45202008-02-05 Robert Millan <rmh@aybabtu.com>
4521
4522 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4523 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4524 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4525 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4526
4527 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4528 (translation_table): Replace hardcoded values with macros
4529 provided by `<grub/term.h>'.
4530
4531 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4532 (keyboard_map): Correct/add a few values, with macros provided
4533 by `<grub/term.h>'.
4534 (keyboard_map_shift): Zero values that don't differ from their
4535 `keyboard_map' equivalents.
4536 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4537 Discard the second scan code that is always sent by Caps lock.
4538 Only use `keyboard_map_shift' when it provides a non-zero value,
4539 otherwise fallback to `keyboard_map'.
4540
99fadbaa 45412008-02-04 Bean <bean123ch@gmail.com>
4542
4543 * Makefile.in (enable_grub_fstest): New variable.
4544
4545 * conf/common.rmk (grub_fstest_init.lst): New rule.
4546 (grub_fstest_init.h): Likewise.
4547 (grub_fstest_init.c): Likewise.
4548 (util/grub-fstest.c_DEPENDENCIES): New variable.
4549 (grub_fstest_SOURCES): Likewise.
4550
4551 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4552
4553 * util/grub-fstest.c: New file.
4554
bf567c50 45552008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4556
4557 Make grub-setup handle a separate root device.
f19dbdb7 4558
bf567c50 4559 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4560 so that the root device can be compared with the destination
4561 device.
4562 When embedding the core image, if the root and destination devices
4563 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4564 0xFF.
4565 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 4566
9be6b98b 45672008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4568
4569 Add support for having a grub directory in a different drive. This
4570 is still only the data handling part.
f19dbdb7 4571
9be6b98b 4572 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4573 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4574 (grub_root_drive): New variable.
4575
4576 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4577 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4578 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4579 as it was.
4580
4581 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4582
4583 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4584 macro.
4585 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4586
4587 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4588 is bogus, because PXE booting does not specify any drive
4589 correctly.
4590
4591 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4592 am not sure if this is really correct.
4593
4594 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4595 is always identical to the boot drive when booting from a CD.
4596
4597 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4598 longer.
4599 (root_drive): New variable.
4600 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4601 (setup_sectors): Push %dx right after popping it, because %dh will
4602 be modified later.
4603 (copy_buffer): Restore %dx.
4604
e0ca0677 46052008-02-03 Robert Millan <rmh@aybabtu.com>
4606
4607 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4608 use `cdboot.img' for cdrom images.
4609
3b3f6629 46102008-02-03 Robert Millan <rmh@aybabtu.com>
4611
4612 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4613 only setup gfxterm when `font' command has succeeded.
4614
d42b3672 46152008-02-03 Robert Millan <rmh@aybabtu.com>
4616
4617 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4618 (grub_rescue_cmd_multiboot_loader)
4619 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4620
fa370ea6 46212008-02-03 Pavel Roskin <proski@gnu.org>
4622
e0c5dacb 4623 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 4624 %edx and %esi from stack only after grub_gate_a20() is called.
4625 grub_gate_a20() clobbers %edx.
4626
f2a76e1d 46272008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4628
4629 * configure.ac (AC_INIT): Bumped to 1.96.
4630
4631 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4632 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4633 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4634 video/readers/png.c.
4635
90fd32d1 46362008-02-03 Bean <bean123ch@gmail.com>
9be665dd 4637
4638 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4639 (cdboot_img_SOURCES): New variable.
4640 (cdboot_img_ASFLAGS): New variable.
4641 (cdboot_img_LDFLAGS): New variable.
4642
4643 * boot/i386/pc/cdboot.S: New file.
4644
4645 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4646 (cd_count): Likewise.
4647 (grub_biosdisk_get_drive): Add support for cd device.
4648 (grub_biosdisk_call_hook): Likewise.
4649 (grub_biosdisk_iterate): Likewise.
4650 (grub_biosdisk_open): Likewise.
4651 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4652 (grub_biosdisk_rw): Support reading from cd device.
4653 (GRUB_MOD_INIT): Iterate cd devices.
4654
4655 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4656 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4657 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4658
4659 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4660
4020aa53 46612008-02-02 Robert Millan <rmh@aybabtu.com>
4662
4663 * commands/read.c: New file.
4664 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4665 (read_mod_SOURCES): New variable.
4666 (read_mod_CFLAGS): Likewise.
4667 (read_mod_LDFLAGS): Likewise.
4668
e03a1132 46692008-02-02 Robert Millan <rmh@aybabtu.com>
4670
4671 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4672 determining whether menu has to be displayed.
4673
58c69220 46742008-02-02 Marco Gerards <marco@gnu.org>
4675
4676 * bus/pci.c: New file.
4677
4678 * include/grub/pci.h: Likewise.
4679
4680 * include/grub/i386/pc/pci.h: Likewise.
4681
4682 * commands/lspci.c: Likewise.
4683
4684 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4685 `lspci.mod'.
4686 (pci_mod_SOURCES): New variable.
4687 (pci_mod_CFLAGS): Likewise.
4688 (pci_mod_LDFLAGS): Likewise.
4689 (lspci_mod_SOURCES): Likewise.
4690 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 4691 (lspci_mod_LDFLAGS): Likewise.
58c69220 4692
c004e1b4 46932008-02-02 Bean <bean123ch@gmail.com>
4694
4695 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4696 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4697
4698 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4699 (grub_xfs_btree_node): New structure.
4700 (grub_xfs_btree_root): New structure.
4701 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4702 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4703 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4704 (GRUB_XFS_EXTENT_SIZE): Likewise.
4705 (grub_xfs_read_block): Support btree format type.
4706 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4707 Use directory block as basic unit.
4708
4709 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4710
4711 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4712 __attribute__ ((__regparm__ (1))).
4713
f95562bf 47142008-02-01 Robert Millan <rmh@aybabtu.com>
4715
4716 Correct a mistake in previous commit.
4717
4718 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4719 top.
4720 (normal/command.c_DEPENDENCIES): New variable.
4721
7d31f41f 47222008-02-01 Robert Millan <rmh@aybabtu.com>
4723
4724 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4725 top.
4726 (normal/command.c_DEPENDENCIES): New variable.
4727 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4728 * conf/i386-ieee1275.rmk: Likewise.
4729 * conf/i386-linuxbios.rmk: Likewise.
4730 * conf/i386-pc.rmk: Likewise.
4731 * conf/sparc64-ieee1275.rmk: Likewise.
4732 * conf/powerpc-ieee1275.rmk: Likewise.
4733 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4734
4735 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4736
60b6be74 47372008-02-01 Robert Millan <rmh@aybabtu.com>
4738
4739 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4740 call at beginning of function.
4741
078522ab 47422008-01-31 Pavel Roskin <proski@gnu.org>
4743
4744 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 4745 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4746 (grub_mkrescue_SOURCES): Likewise.
078522ab 4747 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4748
ccaa8a5f 47492008-01-30 Robert Millan <rmh@aybabtu.com>
4750
4751 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4752 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4753 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4754 (grub_probe_SOURCES): ... to here.
4755
4756 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4757 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4758 * conf/i386-ieee1275.rmk: Likewise.
4759 * conf/i386-linuxbios.rmk: Likewise.
4760 * conf/powerpc-ieee1275.rmk: Likewise.
4761
ae5a9cd7 47622008-01-30 Tristan Gingold <gingold@free.fr>
4763
4764 * kern/rescue.c: Silently accept empty lines.
4765
70bc2ef2 47662008-01-29 Bean <bean123ch@gmail.com>
4767
4768 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4769 (real_code_2): Code cleanup and change comment style.
4770 (move_memory): Avoid using 32-bit address mode.
4771
6a4d50ea 47722008-01-29 Bean <bean123ch@gmail.com>
4773
4774 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4775 (png_mod_SOURCES): New variable.
4776 (png_mod_CFLAGS): Likewise.
4777 (png_mod_LDFLAGS): Likewise.
4778
4779 * video/readers/png.c: New file.
4780
11cc30ac 47812008-01-28 Robert Millan <rmh@aybabtu.com>
4782
4783 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4784 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4785 `ifndef GRUB_MOD_GAP' hack.
4786 * util/elf/grub-mkimage.c (add_segments): Likewise.
4787
3abc589f 47882008-01-27 Robert Millan <rmh@aybabtu.com>
4789
4790 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4791 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 4792 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 4793
e1907778 47942008-01-27 Robert Millan <rmh@aybabtu.com>
4795
4796 Get grub-emu to build again (including parallel builds).
4797
4798 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4799 Split into ...
4800 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4801 (normal/execute.c_DEPENDENCIES): ... this, ...
4802 (grub-emu_DEPENDENCIES): ... and this.
4803
4804 * conf/i386-efi.rmk: Likewise.
4805 * conf/i386-linuxbios.rmk: Likewise.
4806 * conf/i386-ieee1275.rmk: Likewise.
4807 * conf/powerpc-ieee1275.rmk: Likewise.
4808 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4809
2216b101 48102008-01-27 Robert Millan <rmh@aybabtu.com>
4811
4812 * NEWS: Add a few items.
4813
f75172d9 48142008-01-27 Robert Millan <rmh@aybabtu.com>
4815
4816 Fix parallel builds with grub-emu. Based on earlier commit for
4817 grub-probe and grub-setup.
4818
4819 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4820 (util/grub-emu.c_DEPENDENCIES): ... this.
4821 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4822 (util/grub-emu.c_DEPENDENCIES): ... this.
4823 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4824 (util/grub-emu.c_DEPENDENCIES): ... this.
4825 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4826 (util/grub-emu.c_DEPENDENCIES): ... this.
4827 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4828 (util/grub-emu.c_DEPENDENCIES): ... this.
4829
3f51de77 48302008-01-27 Pavel Roskin <proski@gnu.org>
4831
4832 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4833 to create a gap between _end and the modules added to the image
4834 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4835 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4836 * util/elf/grub-mkimage.c (add_segments): Likewise.
4837
2033f53e 48382008-01-26 Pavel Roskin <proski@gnu.org>
4839
4840 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4841 just return an error.
4842
22da1f6f 48432008-01-26 Bean <bean123ch@gmail.com>
4844
4845 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4846 (grub_reiserfs_get_item): Save offset of the next item.
4847 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4848
2a9525e6 48492008-01-25 Robert Millan <rmh@aybabtu.com>
4850
4851 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4852 make all filesystem sources appear together (possibly fixing omissions
4853 while at it).
4854 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4855 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4856 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4857 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4858
4859 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4860 add `kern/file.c'.
4861 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4862 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4863 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4864 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4865
4866 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4867 (probe): Add a sanity check to make sure of our ability to read
4868 requested files when probing for filesystem type.
4869
4870 * genmk.rb: Update copyright year (2007).
4871
4872 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4873 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4874 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4875 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4876 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4877 : Remove function prototypes.
4878
b95f71b5 48792008-01-25 Robert Millan <rmh@aybabtu.com>
4880
4881 Revert my previous commits (based on wrong assumption of how grub_errno
4882 works).
4883
fe6b695a 4884 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 4885 * kern/file.c (grub_file_open): Likewise.
4886
d08bbb49 48872008-01-24 Pavel Roskin <proski@gnu.org>
4888
4889 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4890 that hang if GRUB tries to setup colors.
4891 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4892 colors for firmwares that don't support it.
4893 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4894 Recognize Open Hack'Ware, set flags to work around its
4895 limitations.
4896
605e36ed 48972008-01-24 Robert Millan <rmh@aybabtu.com>
4898
4899 * kern/file.c (grub_file_open): Do not account previous failures of
4900 unrelated functions when grub_errno is checked for.
4901 Reported by Oleg Strikov.
4902
bac332a1 49032008-01-24 Bean <bean123ch@gmail.com>
4904
4905 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4906 (grub_ufs_sblock): New member volume name.
4907 (grub_ufs_find_file): Fix string copy bug.
4908 (grub_ufs_label): Implement this function properly.
4909
4910 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4911 (grub_hfs_iterate_records): Use the correct file number for extents
4912 and catalog file. Fix problem in next index calculation.
4913 (grub_hfs_find_node): Replace recursive function call with loop.
4914 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4915
15c80c09 49162008-01-23 Robert Millan <rmh@aybabtu.com>
4917
4918 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4919 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4920 (grub_multiboot2_real_boot): New function prototype.
4921
4922 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4923 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4924
4925 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4926 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4927
305338fd 49282008-01-23 Robert Millan <rmh@aybabtu.com>
4929
4930 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4931 #ifdef'ed out grub_printf().
4932
3ea52685 49332008-01-23 Robert Millan <rmh@aybabtu.com>
4934
4935 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4936 grub_dprintf calls, since they make "debug=all" mode unusable.
4937 (grub_console_checkkey): Likewise.
4938
5882ae4b 49392008-01-23 Robert Millan <rmh@aybabtu.com>
4940
4941 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4942 `term/i386/pc/at_keyboard.c'.
4943 (pkglib_MODULES): Add `serial.mod'.
4944 (serial_mod_SOURCES): New variable.
4945 (serial_mod_CFLAGS): Likewise.
4946 (serial_mod_LDFLAGS): Likewise.
4947
4948 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4949 `<grub/powerpc/ieee1275/console.h>'.
4950 (grub_keyboard_controller_init): New function prototype.
4951 (grub_console_checkkey): Likewise.
4952 (grub_console_getkey): Likewise.
4953
4954 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4955 keyboard on i386.
4956
4957 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4958 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4959
06ab5303 49602008-01-23 Robert Millan <rmh@aybabtu.com>
4961
4962 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4963 present, "(memdisk)/boot/grub" becomes the default prefix.
4964
4965 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4966 a memdisk tarball with all the modules. Add --overlay=DIR option that
4967 allows users to overlay additional files into the image.
4968
dbb475a4 49692008-01-23 Robert Millan <rmh@aybabtu.com>
4970
4971 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4972 and `machine/memory.h'.
4973 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4974 (_multiboot_mod_SOURCES): New variable.
4975 (_multiboot_mod_CFLAGS): Likewise.
4976 (_multiboot_mod_LDFLAGS): Likewise.
4977 (multiboot_mod_SOURCES): Likewise.
4978 (multiboot_mod_CFLAGS): Likewise.
4979 (multiboot_mod_LDFLAGS): Likewise.
4980
4981 * include/grub/i386/ieee1275/loader.h: New file.
4982
4983 * include/grub/i386/ieee1275/machine.h: Likewise.
4984
4985 * include/grub/i386/ieee1275/memory.h: Likewise.
4986
4987 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4988 variable declaration.
4989 (grub_os_area_size): Likewise.
4990
4991 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4992 (grub_lower_mem, grub_upper_mem): New variables.
4993 (grub_stop_floppy): New function (just to make
4994 grub_multiboot2_real_boot() happy).
4995
4996 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4997 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4998 (grub_stop): New function.
4999 Include `"../realmode.S"' and `"../loader.S"'.
5000
5001 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5002 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5003
5004 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5005 rely on grub_multiboot2_real_boot() for final boot.
5006
25638629 50072008-01-22 Robert Millan <rmh@aybabtu.com>
5008
5009 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5010 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5011 device that doesn't look like an SD card.
5012 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5013 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5014 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5015 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5016 found.
5017
9dad816d 50182008-01-22 Robert Millan <rmh@aybabtu.com>
5019
5020 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5021 avoid claiming over our own code.
5022
34842f2d 50232008-01-22 Bean <bean123ch@gmail.com>
5024
5025 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5026 (jpeg_mod_SOURCES): New variable.
5027 (jpeg_mod_CFLAGS): Likewise.
5028 (jpeg_mod_LDFLAGS): Likewise.
5029
5030 * video/readers/jpeg.c : New file.
5031
44023a28 50322008-01-22 Bean <bean123ch@gmail.com>
5033
5034 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5035 there are no more items.
5036
bc2d8ac6 50372008-01-21 Robert Millan <rmh@aybabtu.com>
5038
5039 * kern/mm.c (grub_mm_init_region): Improve debug message.
5040
261bd4bc 50412008-01-21 Robert Millan <rmh@aybabtu.com>
5042
5043 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5044 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5045 address.
5046 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5047 a C macro.
5048 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5049 Indicates start of upper memory.
5050 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5051 (generate_image): Abort when image size is big enough to corrupt
5052 upper memory.
5053
5054 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5055 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5056 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5057 instead of hardcoding 0xA0000.
5058 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5059 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5060 instead of hardcoding 0xA0000.
5061
f970b55e 50622008-01-21 Robert Millan <rmh@aybabtu.com>
5063
5064 * disk/memdisk.c (memdisk_size): New variable.
5065 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5066 `memdisk_size'.
5067 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5068 image to dynamic memory.
5069 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5070 `memdisk_size'. Free memdisk block.
5071
1a8b0526 50722008-01-21 Robert Millan <rmh@aybabtu.com>
5073
5074 Fix detection of very small filesystems (like tar).
5075
5076 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5077 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5078 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5079 a problem with this disk).
5080
6e9b4aab 50812008-01-21 Robert Millan <rmh@aybabtu.com>
5082
5083 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5084 on grub_biosdisk_rw_standard() error.
5085
0d8837b2 50862008-01-21 Robert Millan <rmh@aybabtu.com>
5087
5088 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5089 recent changes.
5090 * kern/elf.c: Likewise.
5091 * kern/ieee1275/ieee1275.c: Likewise.
5092 * kern/powerpc/ieee1275/openfw.c: Likewise.
5093 * term/ieee1275/ofconsole.c: Likewise.
5094
ffd36e34 50952008-01-21 Robert Millan <rmh@aybabtu.com>
5096
5097 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5098
3f0093d0 5099 * include/grub/kernel.h (grub_arch_memdisk_addr)
5100 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 5101
3f0093d0 5102 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5103 (grub_arch_memdisk_size): ... to here.
ffd36e34 5104
6c391b21 51052008-01-21 Robert Millan <rmh@aybabtu.com>
5106
5107 Mostly based on bugfix from Bean.
5108
5109 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5110 attribute with hook() parameter.
5111 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5112 declaration.
5113 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5114 attribute with hook() parameter.
5115 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5116 declaration.
5117
55a581dc 51182008-01-21 Robert Millan <rmh@aybabtu.com>
5119
5120 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5121 (pkglib_MODULES): Add `memdisk.mod'.
5122 (memdisk_mod_SOURCES): New variable.
5123 (memdisk_mod_CFLAGS): Likewise.
5124 (memdisk_mod_LDFLAGS): Likewise.
5125
5126 * disk/memdisk.c: New file.
5127
5128 * include/grub/disk.h (grub_disk_dev_id): Add
5129 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5130
5131 * include/grub/i386/pc/kernel.h
5132 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5133 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5134 (grub_kernel_image_size): New variable declaration.
5135 (grub_total_module_size): Likewise.
5136 (grub_memdisk_image_size): Likewise.
5137
5138 * include/grub/i386/pc/memory.h
5139 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5140
5141 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5142 (grub_arch_memdisk_addr): New variable declaration.
5143 (grub_arch_memdisk_size): Likewise.
5144
5145 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5146 (grub_arch_memdisk_size): Likewise.
5147
5148 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5149 (codestart): Replace hardcoded `0x100000' with
5150 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5151
5152 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5153 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5154 not NULL, append the contents of the file it refers to, at the end of
5155 the compressed kernel image. Initialize `grub_memdisk_image_size'
5156 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5157 (options): Add "memdisk"|'m' option.
5158 (main): Parse --memdisk|-m option, and pass user-provided path as
5159 parameter to generate_image().
5160
3d7f54c9 51612008-01-20 Robert Millan <rmh@aybabtu.com>
5162
5163 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5164 grub_dprintf() calls from here ...
5165 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5166
0bf74728 51672008-01-20 Robert Millan <rmh@aybabtu.com>
5168
5169 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5170
5171 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5172 declaration.
5173 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5174 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5175 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 5176 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 5177 property).
5178 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5179 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5180
33bf70a7 51812008-01-19 Robert Millan <rmh@aybabtu.com>
5182
fe6b695a 5183 Get rid of confusing function (superseded by
33bf70a7 5184 `grub_ieee1275_get_integer_property')
5185 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5186 prototype.
5187 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5188 function.
5189 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5190 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 5191 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 5192
e2da7d26 51932008-01-19 Robert Millan <rmh@aybabtu.com>
5194
5195 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5196 command after "shut-down", since implementations differ on which
5197 the command for halt is.
5198
59f1fd8d 51992008-01-19 Robert Millan <rmh@aybabtu.com>
5200
5201 * include/grub/i386/linuxbios/console.h: Add header protection.
5202 (grub_keyboard_controller_init): New function prototype.
5203 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5204 (KEYBOARD_COMMAND_READ): Likewise.
5205 (KEYBOARD_COMMAND_WRITE): Likewise.
5206 (KEYBOARD_SCANCODE_SET1): Likewise.
5207 (grub_keyboard_controller_write): New function.
5208 (grub_keyboard_controller_read): Likewise.
5209 (grub_keyboard_controller_init): Likewise.
5210
5211 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5212 (grub_console_init): On coreboot/LinuxBIOS, call
5213 grub_keyboard_controller_init().
5214
5f5a7c15 52152008-01-19 Robert Millan <rmh@aybabtu.com>
5216
5217 PowerPC changes provided by Pavel Roskin.
5218
5219 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5220 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5221 don't rely on cmain() doing it.
5222 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5223 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5224
1210e168 52252008-01-16 Robert Millan <rmh@aybabtu.com>
5226
5227 * include/grub/i386/linuxbios/memory.h
5228 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5229 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5230 receive `table_header' as argument. Instead, probe for it in the
5231 known memory ranges where it can be present.
5232 (grub_available_iterate): Do not pass a fixed `table_header' address
5233 to grub_linuxbios_table_iterate().
5234
3d04eab8 52352008-01-15 Robert Millan <rmh@aybabtu.com>
5236
5237 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5238 * conf/i386-ieee1275.rmk: New file.
5239 * include/grub/i386/ieee1275/console.h: Likewise.
5240 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5241 * include/grub/i386/ieee1275/kernel.h: Likewise.
5242 * include/grub/i386/ieee1275/time.h: Likewise.
5243 * kern/i386/ieee1275/init.c: Likewise.
5244 * kern/i386/ieee1275/startup.S: Likewise.
5245
d1bc1b73 52462008-01-15 Robert Millan <rmh@aybabtu.com>
5247
5248 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5249 when pointers are 32-bit (but still do set it to one when they are
5250 64-bit).
5251
66a65807 52522008-01-15 Robert Millan <rmh@aybabtu.com>
5253
5254 * include/grub/ieee1275/ieee1275.h
5255 (grub_ieee1275_get_integer_property): New function prototype.
5256
5257 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5258 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 5259 grub_ieee1275_get_property() to handle endianness.
66a65807 5260
5261 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5262 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 5263 where appropriate.
66a65807 5264 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5265 (grub_map): Likewise.
5266 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5267
a83ccafd 52682008-01-15 Bean <bean123ch@gmail.com>
5269
5270 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5271 (grub_script_execute_cmdline): Reset grub_errno.
5272
5273 * normal/main.c (read_config_file): Reset grub_errno.
5274
5275 * normal/parse.y (script_init): New.
5276 (script): Move function and menuentry here.
5277 (delimiter): New.
5278 (command): Add delimiter at the end of command.
5279 (commands): Adjust to match the new command.
5280 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 5281 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 5282 (if): Use the new commands.
5283
5284 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5285
df6ecfc6 52862008-01-15 Robert Millan <rmh@aybabtu.com>
5287
5288 * normal/menu.c (run_menu): Move timeout message from here ...
5289 (print_timeout): ... to here.
5290 (run_menu): Use print_timeout() once during initial draw to print
5291 the whole message, and again in every clock tick to update only
5292 the number of seconds.
5293
87ae25eb 52942008-01-15 Robert Millan <rmh@aybabtu.com>
5295
5296 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5297 actual size of `available' from grub_ieee1275_get_property(), and
5298 restrict parsing to that bound.
5299
47bf09a4 53002008-01-15 Christian Franke <franke@computer.org>
5301
5302 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5303 (argp_program_version): Remove variable.
5304 (argp_program_bug_address): Likewise.
5305 (options): Convert from struct argp_option to struct option.
5306 (struct arguments): Remove.
5307 (parse_opt): Remove.
5308 (usage): New function.
5309 (main): Replace struct args members by simple variables.
5310 Replace argp_parse() by getopt_long().
5311 Add switch to evaluate options.
5312 Add missing "(...)" around root_dev in prefix string.
5313
c86f1469 53142008-01-14 Robert Millan <rmh@aybabtu.com>
5315
5316 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
5317 for grub_ieee1275_exit(), in order to improve portability.
5318
e622c559 53192008-01-14 Robert Millan <rmh@aybabtu.com>
5320
5321 * util/grub.d/10_linux.in (prefix): Define.
5322 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
5323
44cb1ec8 53242008-01-13 Pavel Roskin <proski@gnu.org>
5325
5326 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5327 grub_errno if no errors have been detected.
5328
1eb8c802 53292008-01-12 Robert Millan <rmh@aybabtu.com>
5330
5331 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5332 (grub_util_get_dev_abstraction): New function prototype.
5333
5334 * util/getroot.c: Include `<grub/util/getroot.h>'
5335 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5336 (grub_util_get_dev_abstraction): ... here (new function).
5337
5338 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5339 `PRINT_ABSTRACTION'.
5340 (probe): Probe for abstraction type when requested.
5341 (main): Understand `--target=abstraction'.
5342
5343 * util/i386/efi/grub-install.in: Add abstraction module to core
5344 image when it is found to be necessary.
5345 * util/i386/pc/grub-install.in: Likewise.
5346 * util/powerpc/ieee1275/grub-install.in: Likewise.
5347
5348 * util/update-grub_lib.in (font_path): Return system path without
5349 converting to GRUB path.
5350 * util/update-grub.in: Convert system path returned by font_path()
5351 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5352 abstraction module is needed for loading fonts (if any). Export
5353 that as `GRUB_PRELOAD_MODULES'.
5354 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5355 insmod commands).
5356
52bd3de9 53572008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5358
5359 Remove some unused code from reiserfs.
f19dbdb7 5360
52bd3de9 5361 * fs/reiserfs.c (struct grub_reiserfs_key)
5362 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5363 (struct grub_reiserfs_node_body): Removed.
5364 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5365 Likewise.
5366 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5367 Likewise.
5368 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5369 Likewise.
5370 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5371 Likewise.
5372 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5373 Likewise.
5374 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5375 Likewise.
5376 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5377 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5378 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5379
2f80039d 53802008-01-10 Robert Millan <rmh@aybabtu.com>
5381
5382 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5383 Determines if a file is garbage left by packaging systems, etc.
5384 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5385 for processing /etc/grub.d scripts.
5386 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5387 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5388 as a condition for processing Linux images.
5389
87888032 53902008-01-10 Pavel Roskin <proski@gnu.org>
5391
5392 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5393 to compile reiserfs.c on PowerPC.
5394
7e54fced 53952008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 5396
5397 * kern/device.c (grub_device_iterate): Do not abort device iteration
5398 when one of the devices cannot be opened.
5399 * kern/disk.c (grub_disk_open): Do not account previous failures of
5400 unrelated functions when grub_errno is checked for.
5401
5aa541e6 54022008-01-08 Robert Millan <rmh@aybabtu.com>
5403
5404 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5405 `! grub_linux_is_bzimage', change order of address comparison to make
5406 it more intuitive, and improve "too big zImage" error message.
5407
7076340d 54082008-01-08 Robert Millan <rmh@aybabtu.com>
5409
5410 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5411 `$(update-grub_DATA)'.
5412 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5413 targets.
5414
9ca70333 54152008-01-07 Robert Millan <rmh@aybabtu.com>
5416
5417 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5418 which instruction is modified by grub-setup during installation
5419 (since it wasn't obvious by only looking at this file).
5420
38ccf575 54212008-01-07 Robert Millan <rmh@aybabtu.com>
5422
5423 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5424 listing actual TODO items.
5425
f5db4291 54262008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5427
868967cf 5428 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5429 correctly.
5430 (grub_reiserfs_get_key_offset): Likewise.
5431 (grub_reiserfs_set_key_offset): Likewise.
5432 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 5433 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 5434
5435 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5436 better to remove the bitfield version completely.
f19dbdb7 5437
868967cf 54382008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 5439
f5db4291 5440 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5441 allocated from the heap, due to the fshelp implementation.
5442 (grub_reiserfs_dir): Free NODE, due to the same reason.
5443
492e6d9d 54442008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5445
5446 Mostly from Vincent Pelletier:
f19dbdb7 5447
492e6d9d 5448 * fs/reiserfs.c: New file.
f19dbdb7 5449
492e6d9d 5450 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5451 (reiserfs_mod_SOURCES): New variable.
5452 (reiserfs_mod_CFLAGS): Likewise.
5453 (reiserfs_mod_LDFLAGS): Likewise.
5454
5455 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5456 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5457 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5458 normal/color.c.
5459
9ce3e7c1 54602008-01-06 Robert Millan <rmh@aybabtu.com>
5461
5462 * normal/color.c: Remove `<grub/env.h>'.
5463
f3b58148 54642008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5465
5466 * include/grub/normal.h: Include <grub/env.h>.
5467
7ac3bcfa 54682008-01-05 Robert Millan <rmh@aybabtu.com>
5469
5470 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5471 usage example with `(hd0,1)'.
fb358190 5472 Reported by Samuel Thibault.
7ac3bcfa 5473
c8ee99d7 54742008-01-05 Robert Millan <rmh@aybabtu.com>
5475
5476 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5477 (grub_linux_boot_zimage): Rename to ...
5478 (grub_linux_boot): ... this.
5479 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5480 (grub_linux_boot_zimage): Conditionalize zImage copy.
5481
5482 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5483 (grub_linux_boot_bzimage): Remove prototype.
5484 (grub_linux_boot_zimage): Rename to ...
5485 (grub_linux_boot): ... this.
5486
5487 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5488 (grub_linux_boot): Remove function.
5489
0ece25b1 54902008-01-05 Robert Millan <rmh@aybabtu.com>
5491
5492 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5493 (grub_env_write_color_highlight): Likewise.
5494 (grub_wait_after_message): Likewise.
5495
5496 * normal/color.c: New file.
5497
5498 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5499 (normal_mod_DEPENDENCIES): Likewise.
5500
5501 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5502 (normal_mod_DEPENDENCIES): Likewise.
5503
5504 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5505 (normal_mod_DEPENDENCIES): Likewise.
5506
5507 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5508 (normal_mod_DEPENDENCIES): Likewise.
5509
5510 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5511 for waiting after a message is printed.
5512 * normal/main.c (read_config_file): Likewise.
5513 (grub_normal_init): Register grub_env_write_color_normal() and
5514 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5515 `color_highlight' variables as global.
5516
5517 * normal/menu.c (grub_wait_after_message): New function.
5518 (grub_color_menu_normal): New variable. Replaces ...
5519 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5520 (grub_color_menu_highlight): New variable. Replaces ...
5521 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5522 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5523 `GRUB_TERM_COLOR_STANDARD'.
5524 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5525 `normal_code' and `highlight_code' to `old_color_normal' and
5526 `old_color_highlight', respectively.
5527 (grub_menu_init_page): Update colors when drawing the menu, based on
5528 `menu_color_normal' and `menu_color_highlight' variables.
5529 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5530 a message is printed.
5531
182dd4e5 55322008-01-05 Robert Millan <rmh@aybabtu.com>
5533
5534 * kern/env.c (grub_env_context_open): Propagate hooks for global
5535 variables to new context.
5536
5537 * kern/main.c (grub_set_root_dev): Export `root' variable.
5538
ddf8f6ad 55392008-01-05 Robert Millan <rmh@aybabtu.com>
5540
5541 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 5542 discs unconditionally, since udev and others have options to provide
ddf8f6ad 5543 them.
5544
d8b43d9b 55452008-01-05 Robert Millan <rmh@aybabtu.com>
5546
5547 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5548
2bff2de3 55492008-01-04 Christian Franke <franke@computer.org>
5550
5551 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5552 of eisa_mmap.
5553
97eab917 55542008-01-03 Pavel Roskin <proski@gnu.org>
5555
5556 * kern/i386/linuxbios/init.c: Put "void" to all function
5557 declarations with no arguments.
5558 * kern/powerpc/ieee1275/init.c: Likewise.
5559 * term/i386/pc/at_keyboard.c: Likewise.
5560 * term/i386/pc/vga_text.c: Likewise.
5561 * util/grub-mkdevicemap.c: Likewise.
5562
b9416d00 55632008-01-02 Robert Millan <rmh@aybabtu.com>
5564
5565 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5566 message when loaded image is out of bounds.
5567 (grub_multiboot_load_elf64): Likewise.
5568
92695df9 55692008-01-02 Pavel Roskin <proski@gnu.org>
5570
5571 * util/grub.d/10_linux.in: Try version without ".old" when
5572 looking for initrd. It's better to use initrd from the newer
5573 kernel of the same version than no initrd at all.
5574
d98d9cad 55752008-01-01 Robert Millan <rmh@aybabtu.com>
5576
5577 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5578
dbfdce36 55792008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5580
f19dbdb7 5581 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 5582 grub_video_get_active_render_target.
5583 (grub_video_adapter): Added unmap_color and get_active_render_target.
5584
f19dbdb7 5585 * video/video.c: Added grub_video_unmap_color and
dbfdce36 5586 grub_video_get_active_render_target.
5587 (grub_video_get_info): Changed method to accept NULL pointer as an
5588 argument to allow detection of active video adapter.
5589
5590 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5591 grub_video_vbe_unmap_color_int.
5592 Added grub_video_vbe_unmap_color and
5593 grub_video_vbe_get_active_render_target.
5594 (grub_video_vbe_adapter): Added unmap_color and
5595 get_active_render_target.
5596
f19dbdb7 5597 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 5598 with grub_video_vbe_unmap_color_int.
5599
5600 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5601 (DEFAULT_NORMAL_COLOR): Likewise.
5602 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5603 (DEFAULT_FG_COLOR): Removed.
5604 (DEFAULT_BG_COLOR): Likewise.
5605 (DEFAULT_CURSOR_COLOR): Changed value.
5606 (grub_virtual_screen): Added standard_color_setting,
5607 normal_color_setting, highlight_color_setting and term_color.
5608 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5609 (bitmap_width): Added.
5610 (bitmap_height): Likewise.
5611 (bitmap): Likewise.
5612 (set_term_color): Likewise.
5613 (grub_virtual_screen_setup): Changed to use new terminal coloring
5614 settings.
5615 (grub_gfxterm_init): Added init for bitmap.
5616 (grub_gfxterm_fini): Added destroy for bitmap.
5617 (redraw_screen_rect): Updated to use background bitmap and new
5618 terminal coloring.
5619 (scroll_up): Added optimization for case when there is no bitmap.
5620 (grub_gfxterm_cls): Fixed to use correct background color.
5621 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5622 coloring.
5623 (grub_virtual_screen_setcolor): Likewise.
5624 (grub_virtual_screen_getcolor): Added.
5625 (grub_gfxterm_background_image_cmd): Likewise.
5626 (grub_video_term): Added setcolor and getcolor.
5627 (MOD_INIT): Added registration of background_image command.
5628 (MOD_TERM): Added unregistration for background_image command.
5629
c3c20931 56302007-12-30 Pavel Roskin <proski@gnu.org>
5631
5632 * loader/multiboot_loader.c: Fix multiboot command
5633 unregistration. Fix all typos in the word "multiboot".
5634
df266716 56352007-12-29 Pavel Roskin <proski@gnu.org>
94239199 5636
5637 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5638 support for initrd names used in Fedora.
5639
fc6e896c 56402007-12-26 Bean <bean123ch@gmail.com>
5641
5642 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5643 (cpio_mod_SOURCES): New variable.
5644 (cpio_mod_CFLAGS): Likewise.
5645 (cpio_mod_LDFLAGS): Likewise.
5646
5647 * fs/cpio.c: New file.
5648
5649 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5650
5651 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5652
5653 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5654
5655 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5656
533110ad 56572007-12-25 Robert Millan <rmh@aybabtu.com>
5658
5659 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5660 (grub_getcolor): New function.
5661
5662 * kern/term.c (grub_getcolor): New function.
5663 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5664 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5665 (print_entry): Set normal and highlight colors to
5666 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5667 respectively, before printing and restore them to old
5668 values afterwards.
5669 (grub_menu_init_page): Likewise. Fill an additional colored space
5670 that would otherwise be left blank.
5671
5672 * term/efi/console.c (grub_console_getcolor): New function.
5673 (struct grub_console_term.getcolor): New variable.
5674 * term/i386/pc/console.c (grub_console_getcolor): New function.
5675 (struct grub_console_term.getcolor): New variable.
5676 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5677 (struct grub_console_term.getcolor): New variable.
5678
5679 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5680 (struct grub_console_term.setcolor): Remove variable.
5681 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5682 (struct grub_console_term.setcolor): Remove variable.
5683 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5684 (struct grub_console_term.setcolor): Remove variable.
5685 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5686 (struct grub_console_term.setcolor): Remove variable.
5687
4931827f 56882007-12-25 Robert Millan <rmh@aybabtu.com>
5689
5690 * configure.ac: Search for possible unifont.hex locations, and
5691 define UNIFONT_HEX if found.
5692
5693 * Makefile.in (UNIFONT_HEX): Define variable.
5694 (DATA): Rename to ...
5695 (PKGLIB): ... this. Update all users.
5696 (PKGDATA): New variable.
5697 (pkgdata_IMAGES): Rename to ...
5698 (pkglib_IMAGES): ... this. Update all users.
5699 (pkgdata_MODULES): Rename to ...
5700 (pkglib_MODULES): ... this. Update all users.
5701 (pkgdata_PROGRAMS): Rename to ...
5702 (pkglib_PROGRAMS): ... this. Update all users.
5703 (pkgdata_DATA): Rename to ...
5704 (pkglib_DATA): ... this. Update all users.
5705 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5706 (unicode.pff, ascii.pff): New rules.
5707 (all-local): Add `$(PKGDATA)' dependency.
5708 (install-local): Process `$(PKGDATA)'.
5709
5710 * util/update-grub_lib.in (font_path): Search for *.pff files in
5711 a few more locations, including `${pkgdata}'.
5712
57e57e31 57132007-12-23 Robert Millan <rmh@aybabtu.com>
5714
5715 Patch from Bean <bean123ch@gmail.com>:
5716 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5717 `size'.
5718
4bc72aa9 57192007-12-21 Bean <bean123ch@gmail.com>
5720
5721 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5722 (ntfscomp_mod_SOURCES): New variable.
5723 (ntfscomp_mod_CFLAGS): Likewise.
5724 (ntfscomp_mod_LDFLAGS): Likewise.
5725
5726 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5727 (grub_probe_SOURCES): Likewise.
5728 (grub_emu_SOURCES): Likewise.
5729
5730 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5731 (grub_emu_SOURCES): Likewise.
5732
5733 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5734 (grub_emu_SOURCES): Likewise.
5735
5736 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5737 (grub_emu_SOURCES): Likewise.
5738
5739 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5740 (read_run_list): Renamed to grub_ntfs_read_run_list.
5741 (decomp_nextvcn): Moved to ntfscomp.c.
5742 (decomp_getch): Likewise.
5743 (decomp_get16): Likewise.
5744 (decomp_block): Likewise.
5745 (read_block): Likewise.
5746 (read_data): Partially moved to ntfscomp.c.
5747 (fixup): Change unsigned to grub_uint16_t.
5748 (read_mft): Change unsigned long to grub_uint32_t.
5749 (read_attr): Likewise.
5750 (read_data): Likewise.
5751 (read_run_data): Likewise.
5752 (read_run_list): Likewise.
5753 (read_mft): Likewise.
5754
5755 * fs/ntfscomp.c: New file.
5756
5757 * include/grub/ntfs.h: New file.
5758
af680a87 57592007-12-16 Robert Millan <rmh@aybabtu.com>
5760
5761 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5762 IDE disk check, since Linux is known to support 20 IDE disks.
5763 Reported by Colin Watson.
5764
84be7599 57652007-12-15 Bean <bean123ch@gmail.com>
5766
5767 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5768 (lnxboot_img_SOURCES): New variable.
5769 (lnxboot_img_ASFLAGS): Likewise.
5770 (lnxboot_img_LDFLAGS): Likewise.
5771
5772 * boot/i386/pc/lnxboot.S: New file.
5773
6af9db01 57742007-11-24 Pavel Roskin <proski@gnu.org>
5775
5776 * configure.ac: Test if '--build-id=none' is supported by the
5777 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5778 objcopy to generate incorrect binary files (binutils
5779 2.17.50.0.18-1 as shipped by Fedora 8).
5780 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5781 linking, so that build ID doesn't break the test.
5782
7361cfe6 57832007-11-24 Pavel Roskin <proski@gnu.org>
5784
5785 * include/grub/i386/time.h: use "void" in the argument list
5786 of grub_cpu_idle().
5787 * include/grub/powerpc/time.h: Likewise.
5788 * include/grub/sparc64/time.h: Likewise.
5789
1593e10c 57902007-11-18 Christian Franke <franke@computer.org>
5791
5792 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5793 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5794 This fixes the problem that function keys did not work in grub-emu.
5795
3b8db1a8 57962007-11-18 Christian Franke <franke@computer.org>
5797
5798 * disk/host.c (grub_host_open): Remove attribute unused from
5799 name parameter. Add check for "host". This fixes the problem
5800 that grub-emu does not find partitions.
5801
2e29408d 58022007-11-18 Christian Franke <franke@computer.org>
5803
5804 * util/hostfs.c (is_dir): New function.
5805 (grub_hostfs_dir): Handle missing dirent.d_type case.
5806 (grub_hostfs_read): Add missing fseek().
5807 (grub_hostfs_label): Clear label pointer. This fixes a crash
5808 of grub-emu on "ls (host)".
5809
398cd047 58102007-11-18 Christian Franke <franke@computer.org>
5811
5812 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5813 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5814 to 64 bit boundary by default.
5815
c405c391 58162007-11-18 Bean <bean123ch@gmail.com>
5817
5818 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5819 (hexdump_mod_SOURCES): New variable.
5820 (hexdump_mod_CFLAGS): Likewise.
5821 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 5822
c405c391 5823 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5824
5825 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5826
5827 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5828
5829 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5830
5831 * include/grub/hexdump.h: New file.
5832
5833 * commands/hexdump.c: New file.
5834
5cced7fd 58352007-11-10 Robert Millan <rmh@aybabtu.com>
5836
5837 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5838 in grub_outb() calls.
5839 (beep_on): Likewise.
5840
8b714eb0 58412007-11-10 Christian Franke <franke@computer.org>
5842
5843 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5844 (grub_menu_run): Likewise.
5845
ce0f1839 58462007-11-10 Robert Millan <rmh@aybabtu.com>
5847
5848 * include/grub/i386/efi/machine.h: New file.
5849 * include/grub/i386/linuxbios/machine.h: Likewise.
5850 * include/grub/i386/pc/machine.h: Likewise.
5851 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5852 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5853
5854 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5855 (serial_hw_io_addr): New variable.
5856 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5857 instead of `(unsigned short *) 0x400'.
5858
270c237d 58592007-11-10 Bean <bean123ch@gmail.com>
5860
5861 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5862
a87783bf 58632007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5864
5865 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5866 (vga_mod_SOURCES): Added.
5867 (vga_mod_CFLAGS): Likewise.
5868 (vga_mod_LDFLAGS): Likewise.
5869
5870 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5871 grub_outb() calls.
5872 (set_map_mask): Likewise.
5873 (set_read_map): Likewise.
5874 (set_read_address): Likewise.
5875 (vga_font): Removed variable.
5876 (get_vga_glyph): Removed function.
5877 (invalidate_char): Likewise.
5878 (write_char): Changed to use grub_font_get_glyph() for font
5879 information.
5880 (grub_vga_putchar): Likewise.
5881 (grub_vga_getcharwidth): Likewise.
5882
6433b448 58832007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5884
5885 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5886 flags.
5887 (pxeboot_img_LDFLAGS): Likewise.
5888 (diskboot_img_LDFLAGS): Likewise.
5889 (kernel_img_LDFLAGS): Likewise.
5890
49178511 58912007-11-06 Robert Millan <rmh@aybabtu.com>
5892
5893 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5894 in grub_outb() calls.
5895 (serial_hw_init): Likewise.
5896
53b052de 58972007-11-05 Robert Millan <rmh@aybabtu.com>
5898
5899 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5900 spaces. Skip non-regular files.
5901
5ab33bba 59022007-11-05 Robert Millan <rmh@aybabtu.com>
5903
5904 * kern/disk.c (grub_disk_firmware_fini)
5905 (grub_disk_firmware_is_tainted): New variables.
5906
5907 * include/grub/disk.h (grub_disk_firmware_fini)
5908 (grub_disk_firmware_is_tainted): Likewise.
5909
5910 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5911 (grub_disk_biosdisk_fini): ... to here.
5912 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5913 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5914 is set. Register grub_disk_biosdisk_fini() in
5915 `grub_disk_firmware_fini'.
5916
5917 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5918 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5919 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5920 to finish existing firmware disk interface.
5921
5922 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5923 (ata_mod_SOURCES): New variable.
5924 (ata_mod_CFLAGS): Likewise.
5925 (ata_mod_LDFLAGS): Likewise.
5926
0149ab7c 59272007-11-05 Robert Millan <rmh@aybabtu.com>
5928
5929 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5930 (grub_ata_wait): Reimplement using grub_millisleep().
5931
5932 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5933 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5934
be7ac41e 59352007-11-03 Marco Gerards <marco@gnu.org>
5936
5937 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5938 (CRTC_ADDR_PORT): New macro.
5939 (CRTC_DATA_PORT): Likewise.
5940 (CRTC_CURSOR): Likewise.
5941 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5942 (CRTC_CURSOR_ADDR_LOW): Likewise.
5943 (update_cursor): New function.
5944 (grub_console_real_putchar): Call `update_cursor'.
5945 (grub_console_gotoxy): Likewise.
5946 (grub_console_cls): Set the default color when clearing the
5947 screen.
5948 (grub_console_setcursor): Implemented.
5949
bb06ab2e 59502007-11-03 Marco Gerards <marco@gnu.org>
5951
5952 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5953 become activate.
5954 (grub_ata_pio_write): Likewise.
5955
5956 (grub_atapi_identify): Wait after issuing an ATA command.
5957 (grub_atapi_packet): Likewise.
5958 (grub_ata_identify): Likewise.
5959 (grub_ata_readwrite): Likewise.
5960
cf8f780b 59612007-11-03 Marco Gerards <marco@gnu.org>
5962
5963 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5964 (grub_ata_pio_write): Likewise.
5965 (grub_ata_readwrite): Use `grub_error', instead of
5966 returning `grub_errno'.
5967
ed649e54 59682007-11-03 Marco Gerards <marco@gnu.org>
5969
5970 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5971 grub_ata_pio_write once for every single sector, instead of for
5972 multiple sectors.
5973
ca25d8f0 59742007-10-31 Robert Millan <rmh@aybabtu.com>
5975
5976 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5977
5978 * conf/i386-linuxbios.rmk: New file.
5979
5980 * kern/i386/pc/hardware.c: Likewise.
5981 * term/i386/pc/at_keyboard.c: Likewise.
5982 * term/i386/pc/vga_text.c: Likewise.
5983
5984 * include/grub/i386/linuxbios/boot.h: Likewise.
5985 * include/grub/i386/linuxbios/console.h: Likewise.
5986 * include/grub/i386/linuxbios/init.h: Likewise.
5987 * include/grub/i386/linuxbios/kernel.h: Likewise.
5988 * include/grub/i386/linuxbios/loader.h: Likewise.
5989 * include/grub/i386/linuxbios/memory.h: Likewise.
5990 * include/grub/i386/linuxbios/serial.h: Likewise.
5991 * include/grub/i386/linuxbios/time.h: Likewise.
5992
5993 * kern/i386/linuxbios/init.c: Likewise.
5994 * kern/i386/linuxbios/startup.S: Likewise.
5995 * kern/i386/linuxbios/table.c: Likewise.
5996
e911ecc1 59972007-10-31 Marco Gerards <marco@gnu.org>
5998
5999 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6000 (ata_mod_SOURCES): New variable.
6001 (ata_mod_CFLAGS): Likewise.
6002 (ata_mod_LDFLAGS): Likewise.
6003
6004 * disk/ata.c: New file.
6005
6006 * include/grub/disk.h (grub_disk_dev_id): Add
6007 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 6008
7f66d0e0 60092007-10-31 Robert Millan <rmh@aybabtu.com>
6010
6011 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6012 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6013
6014 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6015 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6016
6017 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6018 `<grub/types.h>'.
6019
6020 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6021
5cd7dd46 60222007-10-27 Robert Millan <rmh@aybabtu.com>
6023
3236ca65 6024 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 6025
2ebfc90f 60262007-10-22 Robert Millan <rmh@aybabtu.com>
6027
6028 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6029 `"../realmode.S"'.
6030 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6031
73fcb0f3 60322007-10-22 Robert Millan <rmh@aybabtu.com>
6033
6034 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6035 (pkgdata_MODULES): Add `biosdisk.mod'.
6036 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6037 variables.
6038
6039 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6040 (grub_biosdisk_init): Replace with ...
6041 (GRUB_MOD_INIT(biosdisk)): ... this.
6042 (grub_biosdisk_fini): Replace with ...
6043 (GRUB_MOD_FINI(biosdisk)): ... this.
6044
6045 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6046 (grub_machine_init): Remove call to grub_biosdisk_init().
6047 (grub_machine_fini): Remove call to grub_machine_fini().
6048
6049 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6050
3381d274 60512007-10-22 Robert Millan <rmh@aybabtu.com>
6052
6053 * include/grub/time.h: New file.
6054 * include/grub/i386/time.h: Likewise.
6055 * include/grub/powerpc/time.h: Likewise.
6056 * include/grub/sparc64/time.h: Likewise.
6057
6058 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6059 instances to ...
6060 (KERNEL_MACHINE_TIME_HEADER): ... this.
6061 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6062 instances to ...
6063 (KERNEL_MACHINE_TIME_HEADER): ... this.
6064 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6065 instances to ...
6066 (KERNEL_MACHINE_TIME_HEADER): ... this.
6067
6068 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6069 (grub_millisleep): New function.
6070 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6071 (grub_millisleep): New function.
6072 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6073 Remove `grub/machine/time.h' include.
6074 (grub_millisleep): New function.
6075 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6076 Remove `grub/machine/time.h' include.
6077 (grub_millisleep): New function.
6078
6079 * include/grub/misc.h (grub_div_roundup): New function.
6080
6081 * kern/misc.c: Include `<grub/time.h>'.
6082 (grub_millisleep_generic): New function.
6083
6084 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6085 Add `time.h'.
6086 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6087 Add `time.h'.
6088 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6089 `machine/time.h'. Add `time.h'.
6090 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6091
a39a0312 60922007-10-21 Robert Millan <rmh@aybabtu.com>
6093
6094 * include/grub/misc.h (grub_max): New function.
6095
2aad70e2 60962007-10-21 Robert Millan <rmh@aybabtu.com>
6097
6098 * util/misc.c (grub_util_info): Call fflush() before returning.
6099
54b71c4b 61002007-10-20 Robert Millan <rmh@aybabtu.com>
6101
6102 * genmk.rb (Image): Copy `extra_flags' from here ...
6103 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6104
6105 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6106 to `argc' and `args' arguments.
6107
a979f513 61082007-10-17 Robert Millan <rmh@aybabtu.com>
6109
6110 * kern/i386/loader.S: New file.
6111
6112 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6113 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6114 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6115 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6116 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6117 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6118 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6119 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6120 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6121 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6122 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6123 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6124 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6125 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6126
6127 * kern/i386/realmode.S: New file.
6128
6129 * kern/i386/pc/startup.S (protstack): Moved from here ...
6130 * kern/i386/realmode.S (protstack)... to here.
6131 * kern/i386/pc/startup.S (gdt): Moved from here ...
6132 * kern/i386/realmode.S (gdt)... to here.
6133 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6134 * kern/i386/realmode.S (prot_to_real)... to here.
6135
6136 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6137 `kern/i386/realmode.S'.
6138
825fc8fd 61392007-10-17 Robert Millan <rmh@aybabtu.com>
6140
6141 * include/grub/i386/loader.h: New file.
6142
6143 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6144 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6145 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6146 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6147 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6148 * include/grub/i386/loader.h (grub_linux_prot_size)
6149 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6150 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6151 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6152 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6153
6154 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6155
e179b2f4 61562007-10-15 Robert Millan <rmh@aybabtu.com>
6157
6158 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6159 filesystem when dev->disk is unset.
6160 Do probe for filesystem even when dev->disk->has_partitions is set.
6161 In case a filesystem is found, always report it.
6162 In case it isn't, if dev->disk->has_partitions is set, report that
6163 a partition table was found instead of reporting that no filesystem
6164 could be identified.
6165
5db82af6 61662007-10-12 Robert Millan <rmh@aybabtu.com>
6167
6168 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6169 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6170
68f6ac74 6171 * include/grub/types.h (grub_host_to_target16): New macro.
6172 (grub_host_to_target32): Likewise.
6173 (grub_host_to_target64): Likewise.
6174 (grub_target_to_host16): Likewise.
6175 (grub_target_to_host32): Likewise.
6176 (grub_target_to_host64): Likewise.
5db82af6 6177
6178 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6179 Renamed from to ...
6180 (GRUB_MOD_ALIGN): ...this. Update all users.
6181
68f6ac74 6182 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6183 grub_host_to_target32.
6184 Replace grub_be_to_cpu32 with grub_target_to_host32.
6185 (load_modules): Likewise.
6186 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6187 Replace grub_be_to_cpu32 with grub_target_to_host32.
6188 Replace grub_cpu_to_be16 with grub_host_to_target16.
6189 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 6190
3cf497cc 61912007-10-12 Robert Millan <rmh@aybabtu.com>
6192
6193 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6194 * util/elf/grub-mkimage.c: ... here.
6195
6196 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6197 `util/powerpc/ieee1275/grub-mkimage.c'.
6198
c8cc3692 61992007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 6200
c8cc3692 6201 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6202 and make it easier to figure out.
6203 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6204 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6205 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6206 leave us with less than HEAP_MIN_SIZE total heap.
6207 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 6208
5c58b791 62092007-10-03 Robert Millan <rmh@aybabtu.com>
6210
6211 * include/grub/i386/io.h: New file.
6212 * commands/i386/pc/play.c (inb): Removed.
6213 (outb): Removed.
6214 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6215 with grub_outb().
afcd2ef8 6216 * term/i386/pc/serial.c (inb): Removed.
6217 (outb): Removed.
6218 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6219 with grub_outb().
6220 * term/i386/pc/vga.c (inb): Removed.
6221 (outb): Removed.
6222 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6223 with grub_outb().
5c58b791 6224
1a477ed6 62252007-10-02 Robert Millan <rmh@aybabtu.com>
6226
6227 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6228 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6229 Reported by Marcin Kurek.
6230
6b5d80fa 62312007-09-07 Robert Millan <rmh@aybabtu.com>
6232
6233 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6234 SmartFirmware version updates (as released by Sven Luther), and avoid
6235 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6236 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6237 known broken.
6238
5618afbf 62392007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6240
6241 From Hitoshi Ozeki:
6242 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6243 when merging two regions.
6244
6139dcd9 62452007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6246
508e39ee 6247 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6248 * normal/completion.c (grub_normal_do_completion): Likewise.
6249 Reported by Hitoshi Ozeki.
6250
62512007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 6252
6139dcd9 6253 Do not use devices at boot in chainloading.
f19dbdb7 6254
6139dcd9 6255 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6256 (boot_part_addr): Likewise.
6257 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6258 with BOOT_DRIVE and BOOT_PART_ADDR.
6259 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6260 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6261
38da6516 62622007-08-29 Robert Millan <rmh@aybabtu.com>
6263
6264 Patch from Simon Peter <dn.tlp@gmx.net>:
6265 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6266 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6267 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6268 util/i386/pc/grub-setup.c_DEPENDENCIES.
6269 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6270 util/grub-probe.c_DEPENDENCIES.
6271 * conf/powerpc-ieee1275.rmk: Likewise.
6272
29d0928c 62732007-08-28 Robert Millan <rmh@aybabtu.com>
6274
6275 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6276 to tell grub-mkdevicemap how to name devices.
6277 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6278 feature).
6279
6280 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6281 util/i386/get_disk_name.c.
6282 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6283 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6284 util/ieee1275/get_disk_name.c.
6285
6286 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6287
6288 * DISTLIST: Add util/i386/get_disk_name.c and
6289 util/ieee1275/get_disk_name.c.
6290
6291 * util/grub-mkdevicemap.c: Replace device naming logic with
6292 grub_util_get_disk_name() calls.
6293
5a0d3cca 62942007-08-20 Robert Millan <rmh@aybabtu.com>
6295
6296 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6297 (so that it works for both plural and singular quantities).
6298
8b72db2f 62992007-08-05 Robert Millan <rmh@aybabtu.com>
6300
6301 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6302 so that [xz] isn't taken into account when determining order.
6303
352466bf 63042007-08-02 Marco Gerards <marco@gnu.org>
6305
6306 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6307 `include/multiboot2.h', `include/grub/elfload.h',
6308 `include/multiboot.h', `include/grub/multiboot.h',
6309 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6310 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6311 `kern/elf.c', `loader/multiboot_loader.c',
6312 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6313 `loader/i386/pc/multiboot2.c',
6314 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6315 `util/i386/pc/grub-mkrescue.in'. Remove
6316 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
6317 `include/grub/i386/pc/util/biosdisk.h' and
6318 `include/grub/powerpc/ieee1275/multiboot.h'.
6319
8f096014 63202007-08-02 Bean <bean123ch@gmail.com>
6321
6322 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6323 (ntfs_mod_SOURCES): New variable.
6324 (ntfs_mod_CFLAGS): Likewise.
6325 (ntfs_mod_LDFLAGS): Likewise.
6326
6327 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6328 (grub_probe_SOURCES): Likewise.
6329 (grub_emu_SOURCES): Likewise.
6330
6331 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6332 (grub_emu_SOURCES): Likewise.
6333
6334 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6335 (grub_emu_SOURCES): Likewise.
f19dbdb7 6336
8f096014 6337 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6338
6339 * fs/ntfs.c: New file.
6340
9959f7db 63412007-08-02 Bean <bean123ch@gmail.com>
6342
6343 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6344
6345 * file.h (grub_file): Likewise.
6346
6347 * fshelp.h (grub_fshelp_read_file): Likewise.
6348
6349 * util/i386/pc/grub-setup.c (setup): Likewise.
6350 (save_first_sector): Likewise.
6351 (save_blocklists): Likewise.
f19dbdb7 6352
9959f7db 6353 * fs/affs.c (grub_affs_read_file): Likewise.
6354
6355 * fs/ext2.c (grub_ext2_read_file): Likewise.
6356
6357 * fs/fat.c (grub_fat_read_data): Likewise.
6358
6359 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6360
6361 * fs/hfs.c (grub_hfs_read_file): Likewise.
6362
6363 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6364
6365 * fs/jfs.c (grub_jfs_read_file): Likewise.
6366
6367 * fs/minix.c (grub_minix_read_file): Likewise.
6368
6369 * fs/sfs.c (grub_sfs_read_file): Likewise.
6370
6371 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 6372
9959f7db 6373 * fs/xfs.c (grub_xfs_read_file): Likewise.
6374
6375 * command/blocklist.c (read_blocklist): Likewise.
6376 (print_blocklist): Likewise.
6377
0a203f83 63782007-08-02 Marco Gerards <marco@gnu.org>
6379
6380 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6381 `util/hostfs.c'.
6382
6383 * disk/host.c: New file.
6384
6385 * util/hostfs.c: Likewise.
6386
6387 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6388 return `GRUB_ERR_BAD_FS'.
6389 * fs/sfs.c (grub_sfs_mount): Likewise.
6390 * fs/xfs.c (grub_xfs_mount): Likewise.
6391
6392 * include/grub/disk.h (enum grub_disk_dev_id): Add
6393 `GRUB_DISK_DEVICE_HOST_ID'.
6394
6395 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6396
e5dfe777 63972007-07-24 Jerone Young <jerone@gmail.com>
6398
f19dbdb7 6399 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 6400 modules for compilation.
6401 * conf/powerpc-ieee1275.rmk: Likewise.
6402
6403 * include/multiboot.h: Move multiboot definitions to one file. Rename
6404 many definitions to not get grub specific.
6405 * include/multiboot2.h: Create header with multiboot 2 definitions.
6406 * include/grub/multiboot.h: Header for grub specific function
6407 prototypes and definitions.
6408 * include/grub/multiboot2.h: Likewise.
6409 * include/grub/multiboot_loader.h: Likewise.
6410 * include/grub/i386/pc/multiboot.h: Removed.
6411 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6412
6413 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6414 and 2 to allow for one multiboot and module commands.
6415 * loader/multiboot2.c: Add multiboot2 functionality.
6416 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6417 and definition names.
6418 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6419 2 functions.
6420 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6421 ieee1275 specific multiboot2 code.
6422
6423 * kern/i386/pc/startup.S: Change headers and definition names for
6424 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6425
daf0f0ba 64262007-07-22 Robert Millan <rmh@aybabtu.com>
6427
6428 * geninitheader.sh: Process file specified in first parameter rather
6429 than hardcoding grub_modules_init.lst.
fe6b695a 6430 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 6431 than hardcoding grub_modules_init.h.
6432
6433 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6434 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6435 grub_probe_init.[ch] and grub_setup_init.[ch].
6436
6437 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6438 grub_modules_init.h with grub_emu_init.h.
6439 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6440 grub_probe_init.[ch] files.
6441 * conf/i386-efi.rmk: Likewise.
6442 * conf/i386-pc.rmk: Likewise.
6443 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6444 grub_setup_init.[ch] files.
6445
6446 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6447 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6448 to initialize modules rather than a list of hardcoded functions.
6449 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6450 grub_init_all() to initialize modules rather than a list of hardcoded
6451 functions.
6452
54cdc1cc 64532007-07-22 Robert Millan <rmh@aybabtu.com>
6454
6455 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6456 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6457
ad0686cc 64582007-07-22 Robert Millan <rmh@aybabtu.com>
6459
6460 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6461 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6462 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6463 flag when running on SmartFirmware.
6464 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6465 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6466 was set.
6467
6468 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6469 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6470 rather than decreasing it.
6471
6472 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6473 there's not enough space to do it, fail in the same way as when it
6474 can't be done because there are no partitions.
6475
6476 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6477 when nvsetenv failed.
6478
969c02ec 64792007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6480
6481 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6482 because this rule is automatically generated.
6483 (grub-mkrescue): Removed for the same reason as above.
6484
5a79f472 64852007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6486
6487 Migrate to GNU General Public License Version 3.
f19dbdb7 6488
5a79f472 6489 * COPYING: Replaced with the plain text version of GPLv3.
6490
6491 * config.guess: Updated from gnulib.
6492 * config.sub: Likewise.
6493
6494 * geninit.sh: Output a GPLv3 copyright notice.
6495 * geninitheader.sh: Likewise.
6496 * genmodsrc.sh: Likewise.
6497 * gensymlist.sh.in: Likewise.
6498
6499 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6500 * boot/i386/pc/diskboot.S: Likewise.
6501 * boot/i386/pc/pxeboot.S: Likewise.
6502 * commands/blocklist.c: Likewise.
6503 * commands/boot.c: Likewise.
6504 * commands/cat.c: Likewise.
6505 * commands/cmp.c: Likewise.
6506 * commands/configfile.c: Likewise.
6507 * commands/echo.c: Likewise.
6508 * commands/help.c: Likewise.
6509 * commands/ls.c: Likewise.
6510 * commands/search.c: Likewise.
6511 * commands/terminal.c: Likewise.
6512 * commands/test.c: Likewise.
6513 * commands/videotest.c: Likewise.
6514 * commands/i386/cpuid.c: Likewise.
6515 * commands/i386/pc/halt.c: Likewise.
6516 * commands/i386/pc/play.c: Likewise.
6517 * commands/i386/pc/reboot.c: Likewise.
6518 * commands/i386/pc/vbeinfo.c: Likewise.
6519 * commands/i386/pc/vbetest.c: Likewise.
6520 * commands/ieee1275/halt.c: Likewise.
6521 * commands/ieee1275/reboot.c: Likewise.
6522 * commands/ieee1275/suspend.c: Likewise.
6523 * disk/loopback.c: Likewise.
6524 * disk/lvm.c: Likewise.
6525 * disk/raid.c: Likewise.
6526 * disk/efi/efidisk.c: Likewise.
6527 * disk/i386/pc/biosdisk.c: Likewise.
6528 * disk/ieee1275/ofdisk.c: Likewise.
6529 * font/manager.c: Likewise.
6530 * fs/affs.c: Likewise.
6531 * fs/ext2.c: Likewise.
6532 * fs/fat.c: Likewise.
6533 * fs/fshelp.c: Likewise.
6534 * fs/hfs.c: Likewise.
6535 * fs/hfsplus.c: Likewise.
6536 * fs/iso9660.c: Likewise.
6537 * fs/jfs.c: Likewise.
6538 * fs/minix.c: Likewise.
6539 * fs/sfs.c: Likewise.
6540 * fs/ufs.c: Likewise.
6541 * fs/xfs.c: Likewise.
6542 * hello/hello.c: Likewise.
6543 * include/grub/acorn_filecore.h: Likewise.
6544 * include/grub/arg.h: Likewise.
6545 * include/grub/bitmap.h: Likewise.
6546 * include/grub/boot.h: Likewise.
6547 * include/grub/cache.h: Likewise.
6548 * include/grub/device.h: Likewise.
6549 * include/grub/disk.h: Likewise.
6550 * include/grub/dl.h: Likewise.
6551 * include/grub/elfload.h: Likewise.
6552 * include/grub/env.h: Likewise.
6553 * include/grub/err.h: Likewise.
6554 * include/grub/file.h: Likewise.
6555 * include/grub/font.h: Likewise.
6556 * include/grub/fs.h: Likewise.
6557 * include/grub/fshelp.h: Likewise.
6558 * include/grub/gzio.h: Likewise.
6559 * include/grub/hfs.h: Likewise.
6560 * include/grub/kernel.h: Likewise.
6561 * include/grub/loader.h: Likewise.
6562 * include/grub/lvm.h: Likewise.
6563 * include/grub/misc.h: Likewise.
6564 * include/grub/mm.h: Likewise.
6565 * include/grub/net.h: Likewise.
6566 * include/grub/normal.h: Likewise.
6567 * include/grub/parser.h: Likewise.
6568 * include/grub/partition.h: Likewise.
6569 * include/grub/pc_partition.h: Likewise.
6570 * include/grub/raid.h: Likewise.
6571 * include/grub/rescue.h: Likewise.
6572 * include/grub/script.h: Likewise.
6573 * include/grub/setjmp.h: Likewise.
6574 * include/grub/symbol.h: Likewise.
6575 * include/grub/term.h: Likewise.
6576 * include/grub/terminfo.h: Likewise.
6577 * include/grub/tparm.h: Likewise.
6578 * include/grub/types.h: Likewise.
6579 * include/grub/video.h: Likewise.
6580 * include/grub/efi/api.h: Likewise.
6581 * include/grub/efi/chainloader.h: Likewise.
6582 * include/grub/efi/console.h: Likewise.
6583 * include/grub/efi/console_control.h: Likewise.
6584 * include/grub/efi/disk.h: Likewise.
6585 * include/grub/efi/efi.h: Likewise.
6586 * include/grub/efi/pe32.h: Likewise.
6587 * include/grub/efi/time.h: Likewise.
6588 * include/grub/i386/linux.h: Likewise.
6589 * include/grub/i386/setjmp.h: Likewise.
6590 * include/grub/i386/types.h: Likewise.
6591 * include/grub/i386/efi/kernel.h: Likewise.
6592 * include/grub/i386/efi/loader.h: Likewise.
6593 * include/grub/i386/efi/time.h: Likewise.
6594 * include/grub/i386/pc/biosdisk.h: Likewise.
6595 * include/grub/i386/pc/boot.h: Likewise.
6596 * include/grub/i386/pc/chainloader.h: Likewise.
6597 * include/grub/i386/pc/console.h: Likewise.
6598 * include/grub/i386/pc/init.h: Likewise.
6599 * include/grub/i386/pc/kernel.h: Likewise.
6600 * include/grub/i386/pc/loader.h: Likewise.
6601 * include/grub/i386/pc/memory.h: Likewise.
6602 * include/grub/i386/pc/multiboot.h: Likewise.
6603 * include/grub/i386/pc/serial.h: Likewise.
6604 * include/grub/i386/pc/time.h: Likewise.
6605 * include/grub/i386/pc/vbe.h: Likewise.
6606 * include/grub/i386/pc/vbeblit.h: Likewise.
6607 * include/grub/i386/pc/vbefill.h: Likewise.
6608 * include/grub/i386/pc/vbeutil.h: Likewise.
6609 * include/grub/i386/pc/vga.h: Likewise.
6610 * include/grub/ieee1275/ieee1275.h: Likewise.
6611 * include/grub/ieee1275/ofdisk.h: Likewise.
6612 * include/grub/powerpc/libgcc.h: Likewise.
6613 * include/grub/powerpc/setjmp.h: Likewise.
6614 * include/grub/powerpc/types.h: Likewise.
6615 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6616 * include/grub/powerpc/ieee1275/console.h: Likewise.
6617 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6618 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6619 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6620 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6621 * include/grub/powerpc/ieee1275/time.h: Likewise.
6622 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6623 * include/grub/sparc64/libgcc.h: Likewise.
6624 * include/grub/sparc64/setjmp.h: Likewise.
6625 * include/grub/sparc64/types.h: Likewise.
6626 * include/grub/sparc64/ieee1275/console.h: Likewise.
6627 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6628 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6629 * include/grub/sparc64/ieee1275/time.h: Likewise.
6630 * include/grub/util/biosdisk.h: Likewise.
6631 * include/grub/util/getroot.h: Likewise.
6632 * include/grub/util/lvm.h: Likewise.
6633 * include/grub/util/misc.h: Likewise.
6634 * include/grub/util/raid.h: Likewise.
6635 * include/grub/util/resolve.h: Likewise.
6636 * io/gzio.c: Likewise.
6637 * kern/device.c: Likewise.
6638 * kern/disk.c: Likewise.
6639 * kern/dl.c: Likewise.
6640 * kern/elf.c: Likewise.
6641 * kern/env.c: Likewise.
6642 * kern/err.c: Likewise.
6643 * kern/file.c: Likewise.
6644 * kern/fs.c: Likewise.
6645 * kern/loader.c: Likewise.
6646 * kern/main.c: Likewise.
6647 * kern/misc.c: Likewise.
6648 * kern/mm.c: Likewise.
6649 * kern/parser.c: Likewise.
6650 * kern/partition.c: Likewise.
6651 * kern/rescue.c: Likewise.
6652 * kern/term.c: Likewise.
6653 * kern/efi/efi.c: Likewise.
6654 * kern/efi/init.c: Likewise.
6655 * kern/efi/mm.c: Likewise.
6656 * kern/i386/dl.c: Likewise.
6657 * kern/i386/efi/init.c: Likewise.
6658 * kern/i386/efi/startup.S: Likewise.
6659 * kern/i386/pc/init.c: Likewise.
6660 * kern/i386/pc/lzo1x.S: Likewise.
6661 * kern/i386/pc/startup.S: Likewise.
6662 * kern/ieee1275/ieee1275.c: Likewise.
6663 * kern/powerpc/cache.S: Likewise.
6664 * kern/powerpc/dl.c: Likewise.
6665 * kern/powerpc/ieee1275/cmain.c: Likewise.
6666 * kern/powerpc/ieee1275/crt0.S: Likewise.
6667 * kern/powerpc/ieee1275/init.c: Likewise.
6668 * kern/powerpc/ieee1275/openfw.c: Likewise.
6669 * kern/sparc64/cache.S: Likewise.
6670 * kern/sparc64/dl.c: Likewise.
6671 * kern/sparc64/ieee1275/init.c: Likewise.
6672 * kern/sparc64/ieee1275/openfw.c: Likewise.
6673 * loader/efi/chainloader.c: Likewise.
6674 * loader/efi/chainloader_normal.c: Likewise.
6675 * loader/i386/efi/linux.c: Likewise.
6676 * loader/i386/efi/linux_normal.c: Likewise.
6677 * loader/i386/pc/chainloader.c: Likewise.
6678 * loader/i386/pc/chainloader_normal.c: Likewise.
6679 * loader/i386/pc/linux.c: Likewise.
6680 * loader/i386/pc/linux_normal.c: Likewise.
6681 * loader/i386/pc/multiboot.c: Likewise.
6682 * loader/i386/pc/multiboot_normal.c: Likewise.
6683 * loader/powerpc/ieee1275/linux.c: Likewise.
6684 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6685 * normal/arg.c: Likewise.
6686 * normal/cmdline.c: Likewise.
6687 * normal/command.c: Likewise.
6688 * normal/completion.c: Likewise.
6689 * normal/execute.c: Likewise.
6690 * normal/function.c: Likewise.
6691 * normal/lexer.c: Likewise.
6692 * normal/main.c: Likewise.
6693 * normal/menu.c: Likewise.
6694 * normal/menu_entry.c: Likewise.
6695 * normal/misc.c: Likewise.
6696 * normal/parser.y: Likewise.
6697 * normal/script.c: Likewise.
6698 * normal/i386/setjmp.S: Likewise.
6699 * normal/powerpc/setjmp.S: Likewise.
6700 * normal/sparc64/setjmp.S: Likewise.
6701 * partmap/acorn.c: Likewise.
6702 * partmap/amiga.c: Likewise.
6703 * partmap/apple.c: Likewise.
6704 * partmap/gpt.c: Likewise.
6705 * partmap/pc.c: Likewise.
6706 * partmap/sun.c: Likewise.
6707 * term/gfxterm.c: Likewise.
6708 * term/terminfo.c: Likewise.
6709 * term/efi/console.c: Likewise.
6710 * term/i386/pc/console.c: Likewise.
6711 * term/i386/pc/serial.c: Likewise.
6712 * term/i386/pc/vesafb.c: Likewise.
6713 * term/i386/pc/vga.c: Likewise.
6714 * term/ieee1275/ofconsole.c: Likewise.
6715 * util/biosdisk.c: Likewise.
6716 * util/console.c: Likewise.
6717 * util/genmoddep.c: Likewise.
6718 * util/getroot.c: Likewise.
6719 * util/grub-emu.c: Likewise.
6720 * util/grub-mkdevicemap.c: Likewise.
6721 * util/grub-probe.c: Likewise.
6722 * util/lvm.c: Likewise.
6723 * util/misc.c: Likewise.
6724 * util/raid.c: Likewise.
6725 * util/resolve.c: Likewise.
6726 * util/update-grub.in: Likewise.
6727 * util/update-grub_lib.in: Likewise.
6728 * util/grub.d/00_header.in: Likewise.
6729 * util/grub.d/10_hurd.in: Likewise.
6730 * util/grub.d/10_linux.in: Likewise.
6731 * util/i386/efi/grub-install.in: Likewise.
6732 * util/i386/efi/grub-mkimage.c: Likewise.
6733 * util/i386/pc/grub-install.in: Likewise.
6734 * util/i386/pc/grub-mkimage.c: Likewise.
6735 * util/i386/pc/grub-mkrescue.in: Likewise.
6736 * util/i386/pc/grub-setup.c: Likewise.
6737 * util/i386/pc/misc.c: Likewise.
6738 * util/powerpc/ieee1275/grub-install.in: Likewise.
6739 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6740 * util/powerpc/ieee1275/misc.c: Likewise.
6741 * video/bitmap.c: Likewise.
6742 * video/video.c: Likewise.
6743 * video/i386/pc/vbe.c: Likewise.
6744 * video/i386/pc/vbeblit.c: Likewise.
6745 * video/i386/pc/vbefill.c: Likewise.
6746 * video/i386/pc/vbeutil.c: Likewise.
6747 * video/readers/tga.c: Likewise.
6748
3572d015 67492007-07-02 Robert Millan <rmh@aybabtu.com>
6750
6751 * conf/i386-efi.rmk: Replace obsolete reference to
6752 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6753 with util/getroot.c.
6754 * conf/powerpc-ieee1275.rmk: Likewise.
6755 * conf/sparc64-ieee1275.rmk: Likewise.
6756
6757 * util/grub-emu.c (main): Fix unchecked pointer handling.
6758
2c2a681b 67592007-07-02 Robert Millan <rmh@aybabtu.com>
6760
6761 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6762 invocation to fail, in order to support partition-less media.
6763
6764 * util/i386/pc/grub-install.in: Likewise.
6765
6766 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6767 which fs or partmap modules are needed (akin to its sister scripts).
6768
6769 Also use grub-probe to get rid of unportable /proc/mounts check.
6770
6771 Print the same informational message that the other scripts do, before
fe6b695a 6772 exiting.
2c2a681b 6773
6193defe 67742007-06-23 Robert Millan <rmh@aybabtu.com>
6775
fe6b695a 6776 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 6777 a font file can be found and, if so, echo the GRUB path to it.
6778
6779 * util/update-grub.in: Handle multiple terminals depending on user
6780 input, platform availability and font file presence. Propagate
6781 variables of our findings to /etc/grub.d/ children.
6782
6783 * util/grub.d/00_header.in: Handle multiple terminals, based on
6784 environment setup by update-grub.
6785
eface1dc 67862007-06-23 Robert Millan <rmh@aybabtu.com>
6787
ba50d28f 6788 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 6789
bf697e28 67902007-06-21 Robert Millan <rmh@aybabtu.com>
6791
6792 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6793 indicate end of data section in kernel image.
6794 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6795 GRUB_KERNEL_MACHINE_DATA_END.
6796
6797 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6798 space for it.
6799 * kern/i386/efi/startup.S: Likewise.
6800
6801 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6802 during image generation. Implement --prefix option to override this
6803 patch.
6804 * util/i386/efi/grub-mkimage.c: Likewise.
6805
6806 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6807 code to make path relative to its root into a separate function.
6808
6809 * util/i386/pc/grub-install.in: Use newly provided
6810 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6811 pass the result to grub-install --prefix.
6812
baa574b4 68132007-06-13 Robert Millan <rmh@aybabtu.com>
6814
6815 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6816 DEFAULT_DEVICE_MAP.
6817 * util/grub-emu.c: Use above definitions from misc.h instead of
6818 defining them.
6819 * util/grub-mkdevicemap.c: Likewise.
6820 * util/i386/pc/grub-setup.c: Likewise.
6821 * util/grub-probe.c: Likewise.
6822 (probe): Abort with grub_util_error() when either
6823 grub_guess_root_device or grub_util_get_grub_dev fails.
6824
0215dcbf 68252007-06-12 Robert Millan <rmh@aybabtu.com>
6826
6827 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6828 "pager" assignment.
6829 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6830 "pcdata".
6831 * util/grub-probe.c (probe): Likewise for "drive_name".
6832
8af2ab7b 68332007-06-11 Robert Millan <rmh@aybabtu.com>
6834
6835 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6836 not just the cdrom one.
6837
59d31694 68382007-06-11 Robert Millan <rmh@aybabtu.com>
6839
6840 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6841 Add --pkglibdir=DIR option to override pkglibdir.
6842 Mention --image-type=TYPE in help output.
6843 Fix --grub-mkimage (it was a no-op).
fe6b695a 6844 Abort gracefully when no parameter is given.
59d31694 6845
7ee367e4 68462007-06-11 Robert Millan <rmh@aybabtu.com>
6847
6848 * util/i386/pc/grub-mkrescue.in: New file.
6849 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6850 * Makefile.in: Handle bin_SCRIPTS.
6851
29b0ed46 68522007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6853
6854 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6855 list of video modes.
6856
c0f90770 68572007-06-06 Robert Millan <rmh@aybabtu.com>
6858
6859 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6860 file doesn't exist, or if it is in a filesystem grub can't read.
6861
6862 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6863 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6864 header comment to fit in 80 columns when the variables are resolved.
6865
6866 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6867 could be identified by update-grub. Remove redundant check for
fe6b695a 6868 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 6869 handles that).
6870
fb36dc26 68712007-06-04 Robert Millan <rmh@aybabtu.com>
6872
6873 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6874
6875 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6876
6877 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6878
0c68c93e 68792007-06-04 Robert Millan <rmh@aybabtu.com>
6880
6881 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6882
6883 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6884 grub_apple_partition_map_fini.
6885
6886 * util/biosdisk.c
6887 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6888 to access >2 TiB disks).
6889
6890 Print disk->total_sectors with %llu instead of %lu, since this
6891 variable is always 64-bit (prevents wrong disk size from being displayed
6892 on either >2 TiB disk or big-endian CPU).
6893
6894 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6895 into a generic case that supports all (sane) partition maps.
6896
6897 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6898 breaks big-endian.
6899
6900 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6901 and grub_apple_partition_map_fini() after that.
6902
0f23eb74 69032007-06-01 Robert Millan <rmh@aybabtu.com>
6904
6905 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6906
6907 * util/grub.d/00_header.in: Only enable gfxterm when
6908 convert_system_path_to_grub_path() succeeds.
6909
42c71976 69102007-05-20 Robert Millan <rmh@aybabtu.com>
6911
6912 * util/update-grub_lib.in: New file.
6913 * DISTLIST: Add update-grub_lib.in.
6914 * conf/common.rmk: Generate update-grub_lib and install it in
6915 $(lib_DATA).
6916 * Makefile.in: Add install routine for $(lib_DATA).
6917
6918 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6919 function provided by update-grub_lib to support arbitrary paths of
6920 unifont.pff.
6921 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6922 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6923
5beb2291 69242007-05-19 Robert Millan <rmh@aybabtu.com>
6925
6926 * commands/i386/cpuid.c: New module.
6927 * DISTLIST: Add it.
6928 * conf/i386-efi.rmk: Enable cpuid.mod.
6929 * conf/i386-pc.rmk: Likewise.
6930
7262eca1 69312007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6932
6933 * kern/disk.c (grub_disk_read): Check return value of
6934 grub_realloc().
6935
260ba823 69362007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6937
6938 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6939 arrays.
6940 * disk/raid.c (grub_raid_open): Likewise.
6941
1ecb6cf2 69422007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6943
6944 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6945 stack instead of on the heap.
6946
6947 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6948 before doing a read on it.
6949
6950 * configure.ac: Only use -fno-stack-protector for the target
6951 environment.
f19dbdb7 6952
21c8cbb1 69532007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6954
6955 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6956 __attribute_ ((unused)) to mode_type argument.
6957
6958 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 6959
21c8cbb1 6960 * kern/misc.c (memcmp): Fix prototype.
6961
6962 * include/grub/partition.h [GRUB_UTIL]
6963 (grub_gpt_partition_map_init): Add prototype.
6964 (grub_gpt_partition_map_fini): Likewise.
6965
6966 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6967 at the right place.
6968
6969 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6970 (grub_fat_read_data): Likewise.
6971 (grub_fat_find_dir): Likewise.
6972
6973 * font/manager.c (find_glyph): Make table a const.
6974 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 6975
849d55d3 69762007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6977
6978 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6979 code, first search for device in /dev/mapper, then in /dev.
6980 (grub_util_get_grub_dev): New function.
6981 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6982 prototype.
6983 * util/grub-probe.c (probe): Remove check for RAID, call
6984 grub_util_get_grub_dev() instead of
6985 grub_util_biosdisk_get_grub_dev().
6986 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6987 grub_util_biosdisk_get_grub_dev().
6988 * util/i386/pc/grub-setup.c (main): Likewise.
6989
8fff7c2f 69902007-05-16 Robert Millan <rmh@aybabtu.com>
6991
6992 * DISTLIST: Update for the latest changes.
6993 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6994 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6995 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6996 grub/util/biosdisk.h.
6997 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6998 grub/util/biosdisk.h.
6999
48e12b52 70002007-05-16 Robert Millan <rmh@aybabtu.com>
7001
7002 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7003
46b9d128 70042007-05-16 Robert Millan <rmh@aybabtu.com>
7005
7006 * util/i386/efi/grub-install.in: New.
7007 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7008 newly added grub-install.
7009 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7010 include.
7011 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7012 grub/util/biosdisk.h.
7013 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7014 grub/util/biosdisk.h.
7015
2d1a40a9 70162007-05-16 Robert Millan <rmh@aybabtu.com>
7017
7018 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7019 * include/grub/util/biosdisk.h: ... here.
7020 * util/i386/pc/biosdisk.c: Moved to ...
7021 * util/biosdisk.c: ... here.
7022 * util/i386/pc/getroot.c: Moved to ...
7023 * util/getroot.c: ... here.
7024 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7025 * util/grub-mkdevicemap.c: ... here.
7026 * util/i386/pc/grub-probe.c: Moved to ...
7027 * util/grub-probe.c: ... here.
7028
9e26e3bc 70292007-05-15 Robert Millan <rmh@aybabtu.com>
7030
7031 * util/update-grub.in: Remove duplicated line in grub.cfg header
7032 message.
7033
57f96397 70342007-05-13 Robert Millan <rmh@aybabtu.com>
7035
7036 * util/update-grub.in: Fix a few assumptions about the devices holding
7037 /, /boot and /boot/grub being the same.
7038 * util/grub.d/00_header.in: Likewise.
7039 * util/grub.d/10_hurd.in: Likewise.
7040 * util/grub.d/10_linux.in: Likewise.
7041
7042 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7043 patterns. Use that to define the `.old' suffix as older than `'.
7044
7045 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7046
7047 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7048 the grub.cfg header message.
7049
2e610d62 70502007-05-11 Robert Millan <rmh@aybabtu.com>
7051
7052 * util/update-grub.in: Create device.map if it doesn't already exist,
7053 before attempting to run grub-probe.
7054 Check for grub-probe and grub-mkdevicemap with the same code
7055 grub-install is using.
7056 Remove test mode.
7057
3f6a10ef 70582007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7059
7060 * Makefile.in: Add the datarootdir autoconf variable.
7061
02e7b75e 70622007-05-09 Robert Millan <rmh@aybabtu.com>
7063
7064 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 7065 fail gracefully if dev->disk->partition == NULL.
02e7b75e 7066
75f396cc 70672007-05-07 Robert Millan <rmh@aybabtu.com>
7068
7069 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7070 determine partition map module.
7071 * util/i386/pc/grub-install.in: Use this feature to decide which
7072 partition module to load, instead of hardcoding pc and gpt.
7073
da65cb36 70742007-05-07 Robert Millan <rmh@aybabtu.com>
7075
7076 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7077 source directory differs from build directory.
7078
b57d6a91 70792007-05-05 Robert Millan <rmh@aybabtu.com>
7080
7081 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7082 initialisation.
7083
509d00f1 70842007-05-05 Robert Millan <rmh@aybabtu.com>
7085
7086 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7087
c48f23ef 70882007-05-05 Robert Millan <rmh@aybabtu.com>
7089
7090 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7091 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7092
20b97658 70932007-05-05 Robert Millan <rmh@aybabtu.com>
7094
7095 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7096 (grub_probe_SOURCES): Likewise.
7097 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7098 GPT and initialize dos_part and bsd_part accordingly.
7099 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7100 install_bsd_part.
7101 (main): Activate gpt module for use during partition identification,
7102 and deactivate it afterwards.
7103 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7104 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7105 partition identification, and deactivate it afterwards.
7106
99123174 71072007-05-05 Robert Millan <rmh@aybabtu.com>
7108
7109 * term/i386/pc/console.c (grub_console_fini): Call
7110 grub_term_set_current() before grub_term_unregister().
7111
ebd97f6e 71122007-05-04 Robert Millan <rmh@aybabtu.com>
7113
7114 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7115 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7116 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7117 and update-grub_DATA.
7118 * conf/common.rmk: Build and install update-grub components.
7119 * conf/common.mk: Regenerate.
7120 * util/update-grub.in: New. Core of update-grub.
7121 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7122 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7123 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7124 * util/grub.d/README: New. Document grub.d directory layout.
7125
b06a264d 71262007-05-01 Robert Millan <rmh@aybabtu.com>
7127
7128 * util/grub-emu.c: Move initialization functions
7129 grub_util_biosdisk_init() and grub_init_all() before
7130 grub_util_biosdisk_get_grub_dev(), which relies on them.
7131
41f0050e 71322007-04-19 Robert Millan <rmh@aybabtu.com>
7133
7134 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7135 it is used later.
7136
04582bb3 71372007-04-18 Jerone Young <jerone@gmail.com>
7138
f19dbdb7 7139 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 7140 stanza.
7141
08db4632 71422007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 7143
08db4632 7144 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7145 continue on and look for device node with real device name.
7146
801b76be 71472007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 7148
fe6b695a 7149 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 7150 ability.
7151 * Makefile.in: Add autoconf package transformation code.
7152 * util/i386/pc/grub-install.in: Likewise.
7153 * util/powerpc/ieee1275/grub-install.in: Likewise.
7154
6795c4e1 71552007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7156
7157 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7158 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7159 (EXT2_REVISION): Likewise.
7160 (EXT2_INODE_SIZE): Likewise.
7161 (struct grub_ext2_block_group): Added a missing member
7162 "used_dirs".
7163 (grub_ext2_read_inode): Divide by the inode size in a superblock
7164 instead of 128 to obtain INODES_PER_BLOCK.
7165 Use the macro EXT2_INODE_SIZE instead of directly using
7166 SBLOCK->INODE_SIZE.
7167
d70af616 71682007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7169
7170 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7171 superblock instead of the structure size to compute an
7172 offset. This fixes the problem that GRUB could not read a
7173 filesystem when inode size is different from 128-byte.
7174
3b801603 71752007-03-05 Marco Gerards <marco@gnu.org>
7176
7177 * normal/main.c (read_config_file): When "menu" is not set, create
7178 an initial context.
7179
4785bfe4 71802007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7181
7182 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7183 (HEAP_LIMIT): New macro.
7184 (grub_claim_heap): Claim memory up to `heaplimit'.
7185
a0cbb023 71862007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7187
7188 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7189 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7190 (_start): Likewise.
7191 (grub_arch_modules_addr): Return address after `_end'.
7192 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7193 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7194 (add_segments): Calculate `_end' from phdr size and location.
7195 (ALIGN_UP): Moved to ...
7196 * include/grub/misc.h: here.
7197 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7198 New macro.
7199 (GRUB_IEEE1275_MODULE_BASE): Removed.
7200
fd7d8eba 72012007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7202
7203 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7204 loop boundary.
7205
9b09e6fc 72062007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7207
7208 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7209 All users updated.
7210 (grub_elf64_load_hook_t): Likewise.
7211 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7212 debug output.
7213
3ce27299 72142007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7215
7216 * kern/mm.c: Update copyright.
7217 (grub_mm_debug): Correct syntax error.
7218 (grub_mm_dump_free): New function.
7219 (grub_debug_free): Call `grub_free'.
7220 * include/grub/mm.h: Update copyright.
7221 (grub_mm_dump_free): Add declaration.
7222
077d5fee 72232007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7224
7225 * include/grub/ieee1275/ieee1275.h: Update copyright.
7226 * kern/powerpc/ieee1275/init.c: Likewise.
7227 * kern/powerpc/ieee1275/openfw.c: Likewise.
7228
7229 * loader/powerpc/ieee1275/linux.c: Likewise.
7230 * include/grub/elfload.h: Likewise.
7231 * kern/elf.c: Likewise.
7232 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7233 callers.
7234 (grub_elf64_load): Likewise.
7235 (grub_elf32_load_segment): Move to a nested function.
7236 (grub_elf64_load_segment): Likewise.
7237
dc946850 72382007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7239
7240 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7241 prototype.
7242 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7243 (grub_heap_len): Likewise.
7244 (HEAP_SIZE): New macro.
7245 (grub_claim_heap): New function.
7246 (grub_machine_init): Don't claim heap directly. Call
7247 `grub_claim_heap'.
7248 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7249 (grub_available_iterate): New function.
7250
baa2a121 72512007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7252
7253 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7254 * configure.ac: Use it for testing the HOST and TARGET compilers.
7255
4fe9862e 72562006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7257
7258 * Makefile.in (enable_grub_emu): New variable.
7259 * configure.ac (--enable-grub-emu): New option.
7260 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7261 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7262 * conf/i386-pc.rmk: Likewise.
7263 * conf/powerpc-ieee1275.rmk: Likewise.
7264 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7265
a8aa5762 72662006-12-12 Marco Gerards <marco@gnu.org>
7267
7268 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7269
7270 * kern/env.c (grub_env_unset): Don't free the member `value' when
7271 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7272 pointer.
7273
7274 * normal/main.c (current_menu): Removed.
7275 (free_menu): Unset the `menu' environment variable.
7276 (grub_normal_menu_addentry): Make use of the environment variable
7277 `menu', instead of using the global `current_menu'. Allocate
7278 memory for the sourcecode of this entry.
7279 (read_config_file): New argument `nested', changed all callers.
7280 Only in the case of a new context, initialize a new menu. Set the
7281 `menu' environment variable.
7282 (grub_normal_execute): Don't set and unset the environment
7283 variable `menu' here anymore. Only free the menu when leaving the
7284 context.
7285
7286 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7287 leak.
7288
957b3a3e 72892006-12-11 Marco Gerards <marco@gnu.org>
7290
7291 * normal/menu_entry.c (run): Fix off by one bug so the last line
7292 is executed. Move the loader check to outside the loop.
7293
ef875714 72942006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7295
7296 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7297
4e739985 72982006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7299
7300 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7301 the number of sectors. Reported by Andrey Shuvikov
7302 <mr_hyro@yahoo.com>.
f19dbdb7 7303
790707f2 73042006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7305
7306 * kern/disk.c (grub_disk_read): When there is a read error, always
7307 try to read only the necessary data.
f19dbdb7 7308
790707f2 7309 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7310 disk/raid.c.
7311 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7312 prototype.
7313 [GRUB_UTIL] (grub_raid_fini): Likewise.
7314 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 7315 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 7316 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
7317 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
7318 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7319 and grub_raid_fini().
f19dbdb7 7320
03e58196 73212006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7322
7323 * include/grub/types.h (__unused): Rename to UNUSED.
7324 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7325 (grub_elf64_size): Likewise.
f19dbdb7 7326
ae4f23bf 73272006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7328
7329 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7330 grub_error_push and grub_error_pop in the error-handling path.
7331 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7332 length.
7333
2166cc83 73342006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7335
7336 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7337 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7338 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7339 (kernel_elf_SOURCES): Likewise.
7340 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7341 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7342 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7343 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7344 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7345 (elf_mod_SOURCES): New variable.
7346 (elf_mod_CFLAGS): Likewise.
7347 (elf_mod_LDFLAGS): Likewise.
7348 * include/grub/types.h (__unused): New macro.
7349 * include/grub/elfload.h: New file.
7350 * kern/elf.c: Likewise.
7351 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7352 (ELF32_LOADMASK): New macro.
7353 (ELF64_LOADMASK): Likewise.
7354 (vmlinux): Removed.
7355 (grub_linux_load32): New function.
7356 (grub_linux_load64): Likewise.
7357 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7358 Use grub_elf_t instead of grub_file_t.
7359
a09d5aa5 73602006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7361
7362 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7363 `catch_result' to struct set_color_args.
7364
d976fc51 73652006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7366
7367 * normal/menu.c: Include grub/script.h.
7368 * normal/menu_entry.c: Likewise.
7369 * include/grub/normal.h: Do not include grub/script.h.
7370
67507549 73712006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7372
7373 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7374
69203a99 73752006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7376
7377 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7378 disk.
7379 (grub_disk_close): Print debug messages when closing a disk.
7380 (grub_disk_read): Print debug messages when disk read fails.
7381 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7382 filesystem type.
7383 * kern/partition.c: Include misc.h.
7384 (grub_partition_iterate): Print debug messages when detecting
7385 partition type.
7386
e2b8278c 73872006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7388
7389 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7390 is negative.
7391 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7392
97b2f2ff 73932006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7394
7395 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7396 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7397
6555d655 73982006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7399
7400 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7401 instead of sizeof(lv). Patch by Michael Guntsche.
7402
4d42b77f 74032006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7404
7405 * disk/lvm.c: Rename VGS to VG_LIST.
7406 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7407 (grub_lvm_open): Likewise.
7408 Thanks to Michael Guntsche for finding this bug.
7409
5d74d927 74102006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7411
7412 * configure.ac (AC_INIT): Bumped to 1.95.
7413
a1bb27e4 74142006-10-14 Robert Millan <rmh@aybabtu.com>
7415
7416 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7417 with "/dev/.static/dev/md".
7418
e0994b8b 74192006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7420
7421 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7422 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7423 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7424 DRIVE_NAME are always freed.
7425
7426 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7427 DOS_PART, as a DOS partition is counted from one instead of zero
7428 now. Reported by Robert Millan.
7429
ddd5cee9 74302006-10-14 Robert Millan <rmh@aybabtu.com>
7431
7432 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7433 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7434 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7435 string returned by grub_guess_root_device.
7436 * util/i386/pc/grub-setup.c: Likewise.
7437 * util/i386/pc/grub-probefs.c: Likewise.
7438
7439 * util/i386/pc/grub-probefs.c: Rename to ...
7440 * util/i386/pc/grub-probe.c: ... this.
7441 * DISTLIST: Remove grub-probefs, add grub-probe.
7442 * conf/i386-efi.rmk: Likewise.
7443 * conf/i386-pc.rmk: Likewise.
7444 * util/i386/pc/grub-install.in: Likewise.
7445
7446 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7447 choose which information we want to print.
7448
2b002173 74492006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7450
7451 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7452 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7453 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7454 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7455 video/readers/tga.c and video/i386/pc/vbeutil.c.
7456
74572006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7458
7459 Added support for RAID and LVM.
f19dbdb7 7460
2b002173 7461 * disk/lvm.c: New file.
7462 * disk/raid.c: Likewise.
7463 * include/grub/lvm.h: Likewise.
f19dbdb7 7464 * include/grub/raid.h: Likewise.
2b002173 7465 * include/grub/util/lvm.h: Likewise.
7466 * include/grub/util/raid.h: Likewise.
7467 * util/lvm.c: Likewise.
7468 * util/raid.c: Likewise.
7469
7470 * include/grub/disk.h (grub_disk_dev_id): Add
7471 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7472 (grub_disk_get_size): New prototype.
7473 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7474 returns a partition.
7475 (grub_disk_get_size): New function.
f19dbdb7 7476
2b002173 7477 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7478 verbatim if grub_install_dos_part is -2.
7479
7480 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7481 and LVM devices.
7482
7483 * util/i386/pc/grub-setup.c (setup): New argument
7484 MUST_EMBED. Force embedding of GRUB when the argument is
7485 true. Close FILE before returning.
7486 (main): Add support for RAID and LVM.
f19dbdb7 7487
2b002173 7488 * conf/common.rmk: Add RAID and LVM modules.
7489 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7490 util/lvm.c.
7491 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7492
7493 * kern/misc.c (grub_strstr): New function.
7494 * include/grub/misc.h (grub_strstr): New prototype.
7495
050548d0 74962006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7497
7498 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7499
da849d2d 75002006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7501
7502 * kern/misc.c (grub_strtoull): Guess the base only if not
7503 specified.
7504
97b2f2ff 75052006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 7506
7507 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7508 PowerMac support.
7509
97b2f2ff 75102006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 7511
7512 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7513
7514 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7515 Remove `flags' argument. All callers changed.
7516 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7517 (IEEE1275_IHANDLE_INVALID): New variable.
7518 (IEEE1275_CELL_INVALID): New variable.
7519 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7520 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7521 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7522 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7523 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7524 codes from Open Firmware. All callers updated.
7525 (grub_ieee1275_next_property): Directly return Open Firmware return
7526 code.
7527 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7528 Standardize error checking from `grub_ieee1275_get_property'.
7529 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7530 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7531
97b2f2ff 75322006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 7533
7534 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7535 `instance_to_package_args' to `instance_to_path_args'.
7536
7537 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7538 `grub_ieee1275_chosen'.
7539
7540 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7541 `grub_ieee1275_interpret'.
7542
97b2f2ff 75432006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 7544
7545 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7546
97b2f2ff 75472006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 7548
7549 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7550 (__cmpdi): Likewise.
7551
7552 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7553 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7554 `grub_ssize_t'.
7555
02bb8acc 7556 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 7557
7558 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7559 to type `grub_ssize_t'.
7560 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7561
7f9a8531 75622006-09-22 Marco Gerards <marco@gnu.org>
7563
7564 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7565 newlines.
7566
b5ef1102 75672006-09-22 Marco Gerards <marco@gnu.org>
7568
7569 * commands/echo.c: New file.
7570
7571 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7572
7573 * conf/common.rmk (echo_mod_SOURCES): New variable.
7574 (echo_mod_CFLAGS): Likewise.
7575 (echo_mod_LDFLAGS): Likewise.
7576
2cff3677 75772006-09-22 Marco Gerards <marco@gnu.org>
7578
7579 * normal/main.c (get_line): Malloc memory instead of using
7580 preallocated memory. Removed the arguments `cmdline' and
7581 `max_len'. Updated all callers.
7582
6ba4688b 75832006-09-22 Marco Gerards <marco@gnu.org>
7584
7585 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7586 (normal_mod_DEPENDENCIES): Likewise.
7587
7588 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7589 (normal_mod_DEPENDENCIES): Likewise.
7590
7591 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7592
e02ac02c 75932006-09-22 Johan Rydberg <jrydberg@gnu.org>
7594
7595 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7596 programs.
7597 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7598 (normal_mod_DEPENDENCIES): Likewise.
7599 * conf/i386-pc.mk: Regenerate.
7600 * conf/i386-efi.mk: Likewise
7601 * conf/common.mk: Likewise.
7602 * conf/powerpc-ieee1275.mk: Likewise.
7603 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 7604
8d252e44 76052006-09-22 Robert Millan <rmh@aybabtu.com>
7606
7607 Sync with i386 version.
7608 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7609 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7610
209bf7ac 76112006-09-21 Robert Millan <rmh@aybabtu.com>
7612
7613 Import from GRUB Legacy (lib/device.c):
7614 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7615 (init_device_map) [__linux__]: Add support for I2O devices.
7616
6b146090 76172006-09-14 Marco Gerards <marco@gnu.org>
7618
7619 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7620 `-melf_i386'.
7621
e38600a8 76222006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 7623
7624 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7625 /boot/grub/*.lst.
78fa1790 7626
2952da5d 7627 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 7628
2952da5d 7629 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7630 before adding it to device.map.
7631
01b82a64 76322006-08-15 Johan Rydberg <jrydberg@gnu.org>
7633
fe6b695a 7634 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 7635 compiles a file; using the -MD option.
7636 * conf/common.mk: Regenerate.
7637 * conf/i386-pc.mk: Likewise.
7638 * conf/i386-efi.mk: Likewise.
7639 * conf/powerpc-ieee1275.mk: Likewise.
7640 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 7641
1064790d 76422006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7643
7644 Move the prototypes of grub_setjmp and grub_longjmp to
7645 cpu/setjmp.h, so that each architecture may specify different
7646 attributes.
f19dbdb7 7647
1064790d 7648 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7649 (grub_longjmp): Likewise.
7650 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7651 (grub_longjmp): Likewise.
7652 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7653 (grub_longjmp): Likewise.
7654
7655 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7656 [!GRUB_UTIL] (grub_longjmp): Removed.
7657
29dda3ed 76582006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7659
7660 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7661 "color!" method does not return any value.
7662
ad2a06ed 76632006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7664
7665 * include/grub/bitmap.h: New file.
7666
7667 * include/grub/i386/pc/vbeutil.h: Likewise.
7668
7669 * video/bitmap.c: Likewise.
7670
7671 * video/readers/tga.c: Likewise.
7672
7673 * video/i386/pc/vbeutil.c: Likewise.
7674
7675 * commands/videotest.c: Code cleanup and updated to reflect to new
7676 video API.
7677
7678 * term/gfxterm.c: Likewise.
7679
7680 * video/video.c: Likewise.
7681
7682 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7683 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7684 (bitmap_mod_SOURCES): New entry.
7685 (bitmap_mod_CFLAGS): Likewise.
7686 (bitmap_mod_LDFLAGS): Likewise.
7687 (tga_mod_SOURCES): Likewise.
7688 (tga_mod_CFLAGS): Likewise.
7689 (tga_mod_LDFLAGS): Likewise.
7690
7691 * include/grub/video.h (grub_video_blit_operators): New enum type.
7692 (grub_video_render_target): Changed as forward declaration and moved
7693 actual definition to be video driver specific.
7694 (grub_video_adapter.blit_bitmap): Added blitting operator.
7695 (grub_video_adapter.blit_render_target): Likewise.
7696 (grub_video_blit_bitmap): Likewise.
7697 (grub_video_blit_render_target): Likewise.
7698
7699 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7700 driver specific render target definition.
7701 (grub_video_vbe_map_rgba): Added driver internal helper.
7702 (grub_video_vbe_unmap_color): Updated to use
7703 grub_video_i386_vbeblit_info.
7704 (grub_video_vbe_get_video_ptr): Likewise.
7705
7706 * include/grub/i386/pc/vbeblit.h
7707 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7708 grub_video_i386_vbeblit_info.
7709 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7710 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7711 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7712 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7713 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7714 (grub_video_i386_vbeblit_index_index): Likewise.
7715 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7716 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7717 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7718 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7719 operator.
7720 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7721 operator.
7722
7723 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7724 include/grub/i386/pc/vbeblit.h.
7725
7726 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7727 Updated to use grub_video_i386_vbeblit_info.
7728 (grub_video_i386_vbefill_R8G8B8): Likewise.
7729 (grub_video_i386_vbefill_index): Likewise.
7730 (grub_video_i386_vbefill): Added generic filler.
7731
7732 * video/i386/pc/vbefill.c: Updated to reflect changes on
7733 include/grub/i386/pc/vbefill.h.
7734
7735 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7736 grub_video_i386_vbeblit_info.
7737 (grub_video_vbe_unmap_color): Likewise.
7738 (grub_video_vbe_blit_glyph): Likewise.
7739 (grub_video_vbe_scroll): Likewise.
7740 (grub_video_vbe_draw_pixel): Removed function.
7741 (grub_video_vbe_get_pixel): Likewise.
7742 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7743 updated code to use it.
7744 (common_blitter): Added common blitter for render target and bitmap.
7745 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7746 (grub_video_vbe_blit_render_target): Likewise.
7747
bc8c036d 77482006-07-30 Johan Rydberg <jrydberg@gnu.org>
7749
7750 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7751 is in text mode if there is no console control protocol instance
7752 available.
7753
684a8eff 77542006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7755
7756 * include/grub/video.h: Code cleanup.
7757
7758 * include/grub/i386/pc/vbe.h: Likewise.
7759
7760 * video/i386/pc/vbe.c: Likewise.
7761
7762 * video/i386/pc/vbeblit.c: Likewise.
7763
7764 * video/i386/pc/vbefill.c: Likewise.
7765
7766 * video/video.c: Likewise. Also added more comments.
7767
5915059b 77682006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7769
7770 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7771 (struct grub_biosdisk_dap): Likewise.
7772
7773 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7774 linkage settings for all functions.
7775
90ce5d56 77762006-07-12 Marco Gerards <marco@gnu.org>
7777
7778 * configure.ac (--enable-mm-debug): Fix typo.
7779
7780 * genkernsyms.sh.in: Use proper quoting for `CC'.
7781
43e7f879 77822006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7783
7784 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7785 (normal_mod_ASFLAGS): Remove "-m32".
7786
4889bdec 77872006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7788
7789 * util/misc.c: Include config.h.
7790 [!HAVE_MEMALIGN]: Do not include malloc.h.
7791 (grub_memalign): Use posix_memalign, if present. Then, use
7792 memalign, if present. Otherwise, emit an error.
7793
7794 * util/grub-emu.c: Do not include malloc.h.
7795
7796 * include/grub/util/misc.h: Include unistd.h. This is required for
7797 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7798 D. Eades III <hde@foobar-qux.org>.
7799
7800 * configure.ac (AC_GNU_SOURCE): Added.
7801 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7802 type.
7803
fd39d4da 78042006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7805
7806 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7807 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7808
b786f3b5 78092006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7810
7811 * include/grub/types.h (grub_host_addr_t): Rename to
7812 grub_target_addr_t.
7813 (grub_host_off_t): Rename to grub_target_off_t.
7814 (grub_host_size_t): Rename to grub_target_size_t.
7815 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7816 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7817
7818 * include/grub/kernel.h (struct grub_module_header): Change type
7819 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7820 (grub_module_info): Likewise.
f19dbdb7 7821
051988bb 78222006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7823
7824 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7825 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7826 Velazquez <jesus.velazquez@gmail.com>.
7827
deae281b 78282006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7829
7830 Count partitions from 1 instead of 0 in the string representation
7831 of partitions. Still use 0-based internally.
f19dbdb7 7832
deae281b 7833 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7834 (sun_partition_map_iterate): Use grub_partition_t instead of
7835 struct grub_partition *. Cast DESC->START_CYLINDER to
7836 grub_uint64_t after converting the endian.
7837 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7838 (sun_partition_map_get_name): Add 1 to P->INDEX.
7839
7840 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7841 PCDATA->DOS_PART.
7842 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7843
7844 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7845 zero instead of one.
7846 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7847 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7848
7849 * partmap/apple.c (apple_partition_map_iterate): Change the type
7850 of POS to unsigned.
7851 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7852 (apple_partition_map_get_name): Add 1 into P->INDEX.
7853
7854 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7855 of POS to unsigned.
7856 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7857 calculate the offset of a partition.
7858 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7859 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7860
7861 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7862 SECTOR to grub_disk_addr_t.
7863 (acorn_partition_map_iterate): Likewise.
7864 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7865 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7866 top.
7867 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7868
7869 * kern/i386/pc/init.c (make_install_device): Add 1 into
7870 GRUB_INSTALL_DOS_PART.
7871
7872 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7873 conditional.
7874
524a1e6a 78752006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7876
7877 Clean up the code to support 64-bit addressing in disks and
7878 files. This change is not enough for filesystems yet.
f19dbdb7 7879
524a1e6a 7880 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7881 type of "start" to grub_uint64_t.
7882 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7883 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7884 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7885 convert addresses.
7886
7887 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7888 to grub_disk_addr_t.
7889
7890 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7891 string.
7892
7893 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7894
7895 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7896 to char *.
7897
7898 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7899
7900 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7901
7902 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7903
7904 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7905 to grub_off_t, to detect an error from grub_file_seek.
7906 (grub_multiboot_load_elf32): Likewise.
7907
7908 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7909 maximum unsigned long value when an overflow is detected.
7910 (grub_strtoull): New function.
7911 (grub_divmod64): Likewise.
7912 (grub_lltoa): use grub_divmod64.
7913
7914 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7915 grub_disk_addr_t.
7916 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7917 the pointer to next character. Use grub_strtoull instead of
7918 grub_strtoul.
7919 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7920 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7921 respectively.
7922
fe6b695a 7923 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 7924 return value is signed.
7925 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7926 test if OFFSET is less than zero, as OFFSET is unsigned now.
7927
7928 * kern/disk.c (struct grub_disk_cache): Change the type of
7929 "sector" to grub_disk_addr_t.
7930 (grub_disk_cache_get_index): Change the type of SECTOR to
7931 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7932 unsigned after shifting.
7933 (grub_disk_cache_invalidate): Change the type of SECTOR to
7934 grub_disk_addr_t.
7935 (grub_disk_cache_unlock): Likewise.
7936 (grub_disk_cache_store): Likewise.
7937 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7938 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7939 grub_disk_addr_t and grub_uint64_t, respectively.
7940 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7941 body, as the value of OFFSET is tweaked by
7942 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7943 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7944 respectively.
7945 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7946 body, as the value of OFFSET is tweaked by
7947 grub_disk_check_range. Change the types of LEN and N to
7948 grub_size_t.
7949
7950 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7951 and "saved_offset" to grub_off_t.
7952 (test_header): Cast BUF to char *.
7953 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7954 to char *.
7955 (grub_gzio_read): Change the types of OFFSET and SIZE to
7956 grub_off_t and grub_size_t, respectively.
7957
7958 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7959 Removed.
7960 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7961 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7962 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7963 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7964 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7965
7966 * include/grub/types.h (grub_off_t): Unconditionally set to
7967 grub_uint64_t.
7968 (grub_disk_addr_t): Changed to grub_uint64_t.
7969
7970 * include/grub/partition.h (struct grub_partition): Change the
7971 types of "start", "len" and "offset" to grub_disk_addr_t,
7972 grub_uint64_t and grub_disk_addr_t, respectively.
7973 (grub_partition_get_start): Return grub_disk_addr_t.
7974 (grub_partition_get_len): Return grub_uint64_t.
7975
7976 * include/grub/misc.h (grub_strtoull): New prototype.
7977 (grub_divmod64): Likewise.
7978
7979 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7980 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7981 grub_off_t, respectively.
7982 All callers and references changed.
7983
7984 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7985 grub_size_t in "read".
7986 All callers and references changed.
7987
7988 * include/grub/file.h (struct grub_file): Change the types of
7989 "offset" and "size" to grub_off_t and grub_off_t,
7990 respectively. Change the type of SECTOR to grub_disk_addr_t in
7991 "read_hook".
7992 (grub_file_read): Change the type of LEN to grub_size_t.
7993 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7994 grub_off_t.
7995 (grub_file_size): Return grub_off_t.
7996 (grub_file_tell): Likewise.
7997 All callers and references changed.
7998
7999 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8000 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8001 "write".
8002 (struct grub_disk): Change the type of "total_sectors" to
8003 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 8004 "read_hook".
524a1e6a 8005 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8006 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8007 (grub_disk_write): Likewise.
8008 All callers and references changed.
8009
8010 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8011 char * for grub_strncmp to silence gcc.
8012 (grub_iso9660_mount): Likewise.
8013 (grub_iso9660_mount): Likewise.
8014 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8015 return statement.
8016 (grub_iso9660_iterate_dir): Likewise.
8017 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8018
8019 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8020 LEN to grub_disk_addr_t and grub_size_t, respectively.
8021
8022 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8023
8024 * fs/jfs.c (grub_jfs_read_file): Likewise.
8025
8026 * fs/minix.c (grub_jfs_read_file): Likewise.
8027
8028 * fs/sfs.c (grub_jfs_read_file): Likewise.
8029
8030 * fs/ufs.c (grub_jfs_read_file): Likewise.
8031
8032 * fs/xfs.c (grub_jfs_read_file): Likewise.
8033
8034 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8035 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8036 respectively.
8037
8038 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8039 BLKNR to -1 instead of returning GRUB_ERRNO.
8040 (grub_ext2_read_file): Change the types of SECTOR and
8041 LEN to grub_disk_addr_t and grub_size_t, respectively.
8042
8043 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8044 LEN to grub_disk_addr_t and grub_size_t, respectively.
8045
8046 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8047 grub_file_read.
8048
8049 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8050 string. Do not cast SECTOR explicitly.
8051
8052 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8053 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8054 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8055 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8056 over 2TB and LBA mode is not supported, raise an error.
8057 (get_safe_sectors): New function.
8058 (grub_biosdisk_read): Use get_safe_sectors.
8059 (grub_biosdisk_write): Likewise.
8060
8061 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8062 (grub_efidisk_write): Likewise.
8063
8064 * disk/loopback.c (delete_loopback): Cosmetic changes.
8065 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8066 correctly.
8067 (grub_loopback_open): Likewise.
8068 (grub_loopback_read): Likewise. Also, change the type of POS to
8069 grub_off_t, and fix the usage of grub_memset.
8070
8071 * commands/i386/pc/play.c: Include grub/machine/time.h.
8072
8073 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8074 print FILE->SIZE.
8075
8076 * commands/configfile.c: Include grub/env.h.
8077
8078 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8079 GRUB_ERRNO directly instead. Change the type of POS to
8080 grub_off_t. Follow the coding standard.
8081
8082 * commands/blocklist.c: Include grub/partition.h.
8083 (grub_cmd_blocklist): Return an error if the underlying device is
8084 not a disk. Take the starting sector of a partition into account,
8085 if a partition is used.
8086
8087 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8088 a length field.
8089 (lba_mode): Support 64-bit addresses.
8090 (chs_mode): Likewise.
8091 (copy_buffer): Adapted to the new offsets of a length field and a
8092 segment field.
8093 (blocklist_default_start): Allocate 64-bit space.
8094
8095 * boot/i386/pc/boot.S (force_lba): Removed.
8096 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 8097 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 8098 space.
8099 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8100 is useless.
8101 (lba_mode): Refactored to support a 64-bit address. More size
8102 optimization.
8103 (setup_sectors): Likewise.
8104
53af98ad 81052006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8106
8107 * DISTLIST: Added include/grub/i386/linux.h. Removed
8108 include/grub/i386/pc/linux.h
8109
8110 * configure.ac (AC_INIT): Bumped to 1.94.
8111
8112 * config.guess: Updated from gnulib.
8113 * config.sub: Likewise.
8114 * install-sh: Likewise.
8115 * mkinstalldirs: Likewise.
8116
b4c1940a 81172006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8118
8119 * conf/common.rmk (grub_modules_init.lst): Depended on
8120 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8121 MODSRCFILES.
8122
8123 * genmk.rb (PModule::rule): Reverted the previous change.
8124
cfca1cfd 81252006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8126
8127 * conf/common.rmk (grub_modules_init.lst): Depends on
8128 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8129 that the target does not exist before producing.
8130 (grub_modules_init.h): Remove the target before generating.
8131 (grub_emu_init.c): Likewise.
8132
8133 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8134
aa6d7826 81352006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8136
8137 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8138 for the target-specific tests. Make sure that we also have the
8139 up-to-date target variables for those tests.
8140
26c607b9 81412006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8142
8143 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8144 (PModule::rule): Likewise.
8145
0162321a 81462006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8147
8148 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8149 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8150 target-specific flags should be prefixed.
8151 (PModule::rule): Likewise.
8152
6c826348 81532006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8154
8155 * configure.ac (CMP): Check if cmp is available explicitly.
8156
b977bf01 81572006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8158
8159 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8160 (target_cpu): New variable.
8161 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 8162
b977bf01 8163 * util/i386/pc/grub-install.in (host_cpu): Removed.
8164 (target_cpu): New variable.
8165 (pkglibdir): Use target_cpu instead of host_cpu.
8166
8167 * util/genmoddep.c: Removed.
f19dbdb7 8168
b977bf01 8169 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8170 instead of GRUB_HOST_SIZEOF_VOID_P.
8171 * kern/dl.c: Likewise.
8172
8173 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8174 ...
8175 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8176 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8177 (GRUB_TARGET_SIZEOF_LONG): ... this.
8178 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8179 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8180 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8181 to ...
8182 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8183 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8184 (GRUB_TARGET_SIZEOF_LONG): ... this.
8185 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8186 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8187 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8188 to ...
8189 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8190 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8191 (GRUB_TARGET_SIZEOF_LONG): ... this.
8192 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8193 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8194
8195 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8196 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8197 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8198 instead of GRUB_HOST_SIZEOF_LONG.
8199 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8200 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8201 GRUB_CPU_WORDS_BIGENDIAN.
8202 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8203 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8204 grub_host_ssize_t.
8205
8206 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8207 (genmoddep_SOURCES): Likewise.
8208 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8209 (genmoddep_SOURCES): Likewise.
8210 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8211 (genmoddep_SOURCES): Likewise.
8212 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8213 Likewise.
8214 (genmoddep_SOURCES): Likewise.
8215
8216 * genmoddep.awk: New file.
8217
8218 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8219 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8220 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8221 (PModule::rule): Likewise.
8222 (Program::rule): Likewise.
8223 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8224 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8225 respectively.
8226
8227 * configure.ac: Rewritten intensively to use host and target
8228 instead of build and host, respectively.
8229
8230 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8231 (host_cpu): Removed.
8232 (target_cpu): New variable.
8233 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8234 (BUILD_CC): Removed.
8235 (BUILD_CFLAGS): Likewise.
8236 (BUILD_CPPFLAGS): Likewise.
8237 (TARGET_CC): New variable.
8238 (TARGET_CFLAGS): Likewise.
8239 (TARGET_CPPFLAGS): Likewise.
8240 (TARGET_LDFLAGS): Likewise.
8241 (AWK): Likewise.
8242 (include): Use target_cpu instead of host_cpu.
8243 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 8244
b977bf01 8245 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8246
f09771a1 82472006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8248
8249 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8250 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8251 field 'false' to 'exec_on_false'.
8252 (grub_script_create_cmdif): Renamed argument names to reflect above
8253 changes.
8254
8255 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8256
8257 * normal/script.c (grub_script_create_cmdif): Likewise.
8258
118f4fb3 82592006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8260
8261 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8262 top.
8263 (grub_hfsplus_btree_recptr): Likewise.
8264 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8265 FILEBLOCK both to pass a block number and store next block
8266 number.
8267 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8268 overflow file correctly. Specify errors appropriately, because
8269 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8270 grub_hfsplus_btree_recptr to get the pointer to a found key.
8271 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8272 is found.
8273
8274 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8275 linux.mod.
8276 (_linux_mod_SOURCES): New variable.
8277 (_linux_mod_CFLAGS): Likewise.
8278 (_linux_mod_LDFLAGS): Likewise.
8279 (linux_mod_SOURCES): Likewise.
8280 (linux_mod_CFLAGS): Likewise.
8281 (linux_mod_LDFLAGS): Likewise.
8282
8283 * DISTLIST: Added loader/i386/efi/linux.c,
8284 loader/i386/efi/linux_normal.c and
8285 include/grub/i386/efi/loader.h.
8286
8287 * loader/i386/efi/linux.c: New file.
8288 * loader/i386/efi/linux_normal.c: Likewise.
8289 * include/grub/i386/efi/loader.h: Likewise.
8290
89a7d726 82912006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8292
8293 * commands/blocklist.c: New file.
8294
8295 * DISTLIST: Added commands/blocklist.c.
8296
8297 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 8298 color for the background, and a darker color for the foreground.
89a7d726 8299 (grub_console_checkkey): Return READ_KEY.
8300 (grub_console_cls): Set the background to
8301 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8302
8303 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8304
8305 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8306 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8307
8308 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8309 prototype.
8310
8311 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8312 BG. The spec is wrong again.
8313
8314 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8315 prototype.
8316 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
8317
8318 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8319 commands/blocklist.c.
8320 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 8321
89a7d726 8322 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8323 (blocklist_mod_SOURCES): New variable.
8324 (blocklist_mod_CFLAGS): Likewise.
8325 (blocklist_mod_LDFLAGS): Likewise.
8326
75c8f258 83272006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8328
8329 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8330 duplication.
8331 (lba_mode): Use %eax more intensively to reduce the code size.
8332
da2eb181 83332006-05-20 Marco Gerards <marco@gnu.org>
8334
8335 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8336
8337 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8338 for `menuentry'.
8339 (script): Accept leading newlines.
8340 (newlines): New rule to describe 0 or more newlines.
8341 (commands): Accept `command' with trailing newline. Fixed the
8342 order in which arguments were passed to `grub_script_add_cmd'.
8343 Accept commands separated by newlines.
8344 (function): Changed to accept newlines.
8345 (menuentry) Rewritten.
8346
8347 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8348 front of the list, instead of to the end.
8349
577b4050 83502006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8351
8352 * util/i386/pc/grub-install.in (bindir): New variable.
8353 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8354 Shaver <lbgwjl@gmail.com>.
8355
0d6e1189 83562006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8357
8358 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8359 grub/machine/linux.h
8360 * loader/i386/pc/linux.c: Likewise.
8361
8362 * include/grub/i386/pc/linux.h: Moved to ...
8363 * include/grub/i386/linux.h: ... here.
8364
8365 * include/grub/i386/linux.h (struct linux_kernel_params): New
8366 struct.
f19dbdb7 8367
31b86e9f 83682006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8369
8370 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8371 checking.
8372 (grub_video_vbe_blit_glyph): Likewise.
8373 (grub_video_vbe_blit_bitmap): Likewise.
8374 (grub_video_vbe_blit_render_target): Likewise.
8375
83b984de 83762006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8377
8378 * configure.ac (--with-platform): Properly quote the square
8379 brackets.
8380
5f0413bd 83812006-05-08 Marco Gerards <marco@gnu.org>
8382
8383 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8384 this...
8385 (kernel_elf_HEADERS): ...to this. Updated all users.
8386 (grubof_symlist.c): Renamed from this...
8387 (kernel_elf_symlist.c): ...to this. Updated all users.
8388 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8389 (grubof_SOURCES): Renamed from this...
8390 (kernel_elf_SOURCES): ...to this.
8391 (grubof_HEADERS): Renamed from this...
8392 (kernel_elf_HEADERS): ...to this.
8393 (grubof_CFLAGS): Renamed from this...
8394 (kernel_elf_CFLAGS): ...to this.
8395 (grubof_ASFLAGS): Renamed from this...
8396 (kernel_elf_ASFLAGS): ...to this.
8397 (grubof_LDFLAGS): Renamed from this...
8398 (kernel_elf_LDFLAGS): ...to this.
8399
8400 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8401 this...
8402 (kernel_elf_HEADERS): ...to this. Updated all users.
8403 (grubof_symlist.c): Renamed from this...
8404 (kernel_elf_symlist.c): ...to this. Updated all users.
8405 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8406 (grubof_SOURCES): Renamed from this...
8407 (kernel_elf_SOURCES): ...to this.
8408 (grubof_HEADERS): Renamed from this...
8409 (kernel_elf_HEADERS): ...to this.
8410 (grubof_CFLAGS): Renamed from this...
8411 (kernel_elf_CFLAGS): ...to this.
8412 (grubof_ASFLAGS): Renamed from this...
8413 (kernel_elf_ASFLAGS): ...to this.
8414 (grubof_LDFLAGS): Renamed from this...
8415 (kernel_elf_LDFLAGS): ...to this.
8416
8417 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8418 `kernel.elf' instead of `grubof'.
8419
05568c2e 84202006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8421
8422 Add --with-platform to configure. Use pkglibdir instead of
8423 pkgdatadir. This is reported by Roger Leigh.
8424
8425 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8426 (host_vendor): Likewise.
8427 (host_os): Likewise.
8428 (pkgdatadir): Likewise.
8429 (platform): New variable.
8430 (pkglibdir): Likewise.
8431 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 8432
05568c2e 8433 * util/i386/pc/grub-install.in (datadir): Removed.
8434 (host_vendor): Likewise.
8435 (host_os): Likewise.
8436 (pkgdatadir): Likewise.
8437 (platform): New variable.
8438 (pkglibdir): Likewise.
8439 Use PKGLIBDIR instead of PKGDATADIR.
8440
8441 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8442 instead of GRUB_DATADIR.
8443 (main): Likewise.
8444 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8445 (main): Likewise.
8446 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8447 (main): Likewise.
8448
8449 * configure.ac (--with-platform): New option.
8450 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8451
8452 * Makefile.in: Include a makefile based on PLATFORM instead of
8453 HOST_VENDOR.
8454 (pkgdatadir): Not appended by the machine type.
8455 (pkglibdir): Appended by the machine type.
8456 (host_vendor): Removed.
8457 (platform): New variable.
8458 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8459 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8460 (uninstall): Likewise.
8461
4e93851c 84622006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8463
8464 Use the environment context in the menu. Remove the commands
8465 "default" and "timeout", and use variables instead.
f19dbdb7 8466
4e93851c 8467 * normal/menu.c: Include grub/env.h.
8468 (print_entry): Cast TITLE to silence gcc.
8469 (get_timeout): New function.
8470 (set_timeout): Likewise.
8471 (get_entry_number): Likewise.
8472 (run_menu): Use a default entry, a fallback entry and a timeout
8473 in the environment variables "default", "fallback" and
8474 "timeout". Also, tweak the default entry if it is not within the
8475 current menu entries.
8476 (grub_menu_run): Use a fallback entry in the environment variable
8477 "fallback".
8478
8479 * normal/main.c (read_config_file): Do not initialize
8480 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8481 NEWMENU->TIMEOUT.
8482 (grub_normal_execute): Use a data slot to store the menu.
8483
8484 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8485 fallback_entry and timeout.
8486 (struct grub_menu_list): Removed.
8487 (grub_menu_list_t): Likewise.
8488 (struct grub_context): Likewise.
8489 (grub_context_t): Likewise.
8490 (grub_context_get): Likewise.
8491 (grub_context_get_current_menu): Likewise.
8492 (grub_context_push_menu): Likewise.
8493 (grub_context_pop_menu): Likewise.
8494 (grub_default_init): Likewise.
8495 (grub_default_fini): Likewise.
8496 (grub_timeout_init): Likewise.
8497 (grub_timeout_fini): Likewise.
8498
8499 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8500 and timeout.mod.
8501 (normal_mod_SOURCES): Removed normal/context.c.
8502
8503 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8504 commands/default.c, commands/timeout.c and normal/context.c.
8505 (normal_mod_SOURCES): Removed normal/context.c.
8506
8507 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8508 commands/timeout.c and normal/context.c.
8509 (normal_mod_SOURCES): Removed normal/context.c.
8510
8511 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8512 commands/default.c, commands/timeout.c and normal/context.c.
8513 (normal_mod_SOURCES): Removed normal/context.c.
8514
8515 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8516 timeout.mod.
8517 (default_mod_SOURCES): Removed.
8518 (default_mod_CFLAGS): Likewise.
8519 (default_mod_LDFLAGS): Likewise.
8520 (timeout_mod_SOURCES): Removed.
8521 (timeout_mod_CFLAGS): Likewise.
8522 (timeout_mod_LDFLAGS): Likewise.
8523
8524 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8525 normal/context.c.
8526
8527 * commands/default.c: Removed.
8528 * commands/timeout.c: Likewise.
8529 * normal/context.c: Likewise.
8530
1eb9cc1d 85312006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8532
8533 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8534
385bd9c1 85352006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8536
8537 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8538 "next" to "prev" for readability.
8539 (struct grub_env_sorted_var): New struct.
8540 (grub_env_context): Renamed to ...
8541 (initial_context): ... this.
8542 (grub_env_var_context): Renamed to ...
8543 (current_context): ... this.
8544 (grub_env_find): Look only at CURRENT_CONTEXT.
8545 (grub_env_context_open): Rewritten to copy exported variables from
8546 previous context.
8547 (grub_env_context_close): Rewritten according to the new
8548 scheme. Also, add an assertion to prevent the initial context from
8549 removed.
8550 (grub_env_insert): Removed the code for the sorted list.
8551 (grub_env_remove): Likewise.
8552 (grub_env_export): Simply mark the variable with
8553 GRUB_ENV_VAR_GLOBAL.
8554 (grub_env_set): A cosmetic change for naming consistency.
8555 (grub_env_get): Likewise.
8556 (grub_env_unset): Likewise.
8557 (grub_env_iterate): Rewritten to sort variables within this
8558 function.
8559 (grub_register_variable_hook): Fixed for naming consistency. Call
8560 grub_env_find again, only if NAME is not found at the first time.
8561 (mangle_data_slot_name): New function.
8562 (grub_env_set_data_slot): Likewise.
8563 (grub_env_get_data_slot): Likewise.
8564 (grub_env_unset_data_slot): Likewise.
8565
8566 * include/grub/env.h (grub_env_var_type): New enum.
8567 (GRUB_ENV_VAR_LOCAL): New constant.
8568 (GRUB_ENV_VAR_GLOBAL): Likewise.
8569 (GRUB_ENV_VAR_DATA): Likewise.
8570 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8571 "type".
8572 (grub_env_set): Replace VAR with NAME for consistency.
8573 (grub_register_variable_hook): Likewise.
8574 (grub_env_export): Specify the name of the argument.
8575 (grub_env_set_data_slot): New prototype.
8576 (grub_env_get_data_slot): Likewise.
8577 (grub_env_unset_data_slot): Likewise.
8578
7f362539 85792006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8580
8581 Extend the loader so that GRUB can accept a loader which comes
8582 back to GRUB when a loaded image exits. Also, this change adds
8583 support for a chainloader on EFI.
f19dbdb7 8584
7f362539 8585 * term/efi/console.c: Include grub/misc.h.
8586 (grub_console_checkkey): Display a scan code on the top for
8587 debugging. This will be removed once the EFI port gets stable.
8588 Correct the scan code mapping.
8589
8590 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8591 allocate memory from larger regions, in order to reduce the number
8592 of allocated regions. Otherwise, the MacOSX loader panics.
8593 (filter_memory_map): Avoid less than 1MB for compatibility with
8594 other loaders.
8595 (add_memory_regions): Allocate from the tail of a region, if
8596 possible, to avoid allocating a region near to 1MB, for the MacOSX
8597 loader.
8598
8599 * kern/efi/init.c (grub_efi_set_prefix): Specify
8600 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8601
8602 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8603 argument IMAGE_HANDLE and specify it to get a loaded image.
8604 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8605 grub_efi_get_loaded_image.
fe6b695a 8606 (grub_efi_get_filename): Divide the length by the size of
7f362539 8607 grub_efi_char16_t.
8608 (grub_efi_get_device_path): New function.
8609 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8610 the length by the size of grub_efi_char16_t for a file path device
8611 path node.
8612
8613 * kern/loader.c (grub_loader_noreturn): New variable.
8614 (grub_loader_set): Accept a new argument NORETURN. Set
8615 GRUB_LOADER_NORETURN to NORETURN.
8616 All callers changed.
8617 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8618 grub_machine_fini.
8619
8620 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8621 prototype.
8622 (grub_efi_get_loaded_image): Take an argument to specify an image
8623 handle.
8624
8625 * include/grub/loader.h (grub_loader_set): Added one more argument
8626 NORETURN.
8627
8628 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8629 instead of grub_efi_open_protocol.
8630 (grub_efidisk_get_device_name): Likewise.
8631 (grub_efidisk_close): Print a newline.
8632 (grub_efidisk_get_device_handle): Fixed to use
8633 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8634 GRUB_EFI_DEVICE_PATH_TYPE.
8635
8636 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8637 * kern/efi/efi.c (device_path_guid): ... here.
8638
8639 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8640 chain.mod.
8641 (kernel_mod_HEADERS): Added efi/disk.h.
8642 (_chain_mod_SOURCES): New variable.
8643 (_chain_mod_CFLAGS): Likewise.
8644 (_chain_mod_LDFLAGS): Likewise.
8645 (chain_mod_SOURCES): Likewise.
8646 (chain_mod_CFLAGS): Likewise.
8647 (chain_mod_LDFLAGS): Likewise.
8648
8649 * DISTLIST: Added include/grub/efi/chainloader.h,
8650 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8651
8652 * include/grub/efi/chainloader.h: New file.
8653 * loader/efi/chainloader.c: Likewise.
8654 * loader/efi/chainloader_normal.c: Likewise.
8655
c0111d6e 86562006-04-30 Marco Gerards <marco@gnu.org>
8657
8658 * commands/configfile.c (grub_cmd_source): New function.
8659 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8660 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8661
df5341da 86622006-04-30 Marco Gerards <marco@gnu.org>
8663
8664 * normal/execute.c (grub_script_execute_cmd): Change the return
8665 type to `grub_err_t'. Correctly return the error.
8666 (grub_script_execute_cmdline): In case a command line is not a
8667 command or a function, try to interpret it as an assignment.
8668
f85934bd 86692006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8670
8671 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8672 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8673 skip a node whose name is obviously invalid as UTF-16,
8674 i.e. contains a NUL character. Stop the iteration when the last
8675 directory entry is found. Instead of using the return value of
8676 grub_hfsplus_btree_iterate_node, store the value in RET and use
8677 it, because the iterator can be stopped by the last directory
8678 entry.
8679
8f8a2cf8 86802006-04-30 Marco Gerards <marco@gnu.org>
8681
8682 * include/grub/env.h (grub_env_export): New prototype. Reported
8683 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8684
a27e84ce 86852006-04-30 Marco Gerards <marco@gnu.org>
8686
8687 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8688 size of the extents in a catalog file record.
8689
eaef0553 86902006-04-29 Marco Gerards <marco@gnu.org>
8691
8692 * commands/configfile.c (grub_cmd_configfile): Execute the
8693 configfile within its own context.
8694
8695 * include/grub/env.h (grub_env_context_open): New prototype.
8696 (grub_env_context_close): Likewise.
8697
8698 * kern/env.c (grub_env): Removed.
8699 (grub_env_sorted): Likewise.
8700 (grub_env_context): New variable.
8701 (grub_env_var_context): Likewise.
8702 (grub_env_find): Search both the active context and the global
8703 context.
8704 (grub_env_context_open): New function.
8705 (grub_env_context_close): Likewise.
8706 (grub_env_insert): Likewise.
8707 (grub_env_remove): Likewise.
8708 (grub_env_export): Likewise.
8709 (grub_env_set): Changed to use helper functions to avoid code
8710 duplication.
8711 (grub_env_iterate): Rewritten so both the current context and the
8712 global context are being used.
8713
8714 * normal/command.c (export_command): New function.
8715 (grub_command_init): Register the `export' function.
8716
7b455f4d 87172006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8718
8719 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8720 explicitly to suppress gcc's warnings.
8721 * fs/fat.c (grub_fat_find_dir): Likewise.
8722 (grub_fat_label): Likewise.
8723 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8724 (grub_xfs_mount): Likewise.
8725 (grub_xfs_label): Likewise.
8726 * fs/affs.c (grub_affs_mount): Likewise.
8727 (grub_affs_label): Likewise.
8728 (grub_affs_iterate_dir): Likewise.
8729 * fs/sfs.c (grub_sfs_mount): Likewise.
8730 (grub_sfs_iterate_dir): Likewise.
8731 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8732 * fs/hfs.c (grub_hfs_mount): Likewise.
8733 (grub_hfs_cmp_catkeys): Likewise.
8734 (grub_hfs_find_dir): Likewise.
8735 (grub_hfs_dir): Likewise.
8736 (grub_hfs_label): Likewise.
8737 * fs/jfs.c (grub_jfs_mount): Likewise.
8738 (grub_jfs_opendir): Likewise.
8739 (grub_jfs_getent): Likewise.
8740 (grub_jfs_lookup_symlink): Likewise.
8741 (grub_jfs_label): Likewise.
8742 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8743 (grub_hfsplus_iterate_dir): Likewise.
8744 (grub_hfsplus_btree_iterate_node): Made static.
8745
8746 * util/grub-emu.c (prefix): New variable.
8747 (grub_machine_set_prefix): New function.
8748 (main): Do not set the environment variable "prefix" here. Only
8749 set PREFIX, which is used later by grub_machine_set_prefix.
8750
8751 * include/grub/video.h: Do not include grub/symbol.h.
8752 (grub_video_register): Not exported. This symbol is not defined in
8753 the kernel.
8754 (grub_video_unregister): Likewise.
8755 (grub_video_iterate): Likewise.
8756 (grub_video_setup): Likewise.
8757 (grub_video_restore): Likewise.
8758 (grub_video_get_info): Likewise.
8759 (grub_video_get_blit_format): Likewise.
8760 (grub_video_set_palette): Likewise.
8761 (grub_video_get_palette): Likewise.
8762 (grub_video_set_viewport): Likewise.
8763 (grub_video_get_viewport): Likewise.
8764 (grub_video_map_color): Likewise.
8765 (grub_video_map_rgb): Likewise.
8766 (grub_video_map_rgba): Likewise.
8767 (grub_video_fill_rect): Likewise.
8768 (grub_video_blit_glyph): Likewise.
8769 (grub_video_blit_bitmap): Likewise.
8770 (grub_video_blit_render_target): Likewise.
8771 (grub_video_scroll): Likewise.
8772 (grub_video_swap_buffers): Likewise.
8773 (grub_video_create_render_target): Likewise.
8774 (grub_video_delete_render_target): Likewise.
8775 (grub_video_set_active_render_target): Likewise.
8776
8777 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8778 Undefined.
8779 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8780
8781 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8782 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8783 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8784 instead of $(srcdir)/genkernsyms.sh.
8785
8786 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8787 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8788 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8789 instead of $(srcdir)/genkernsyms.sh.
8790
8791 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8792 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8793 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8794 instead of $(srcdir)/genkernsyms.sh.
8795
8796 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8797 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8798 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8799 instead of $(srcdir)/genkernsyms.sh.
8800
8801 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8802 genkernsyms.sh.
8803
8804 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8805 genkernsyms.sh.
8806 (gensymlist.sh): New target.
8807 (genkernsyms.sh): Likewise.
8808
8809 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8810 genkernsyms.sh.in and gensymlist.sh.in.
8811
8812 * genkernsyms.sh: Removed.
8813 * gensymlist.sh: Likewise.
f19dbdb7 8814
7b455f4d 8815 * genkernsyms.sh.in: New file.
8816 * gensymlist.sh.in: Likewise.
8817
1885bb27 88182006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8819
8820 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8821 clobber "prefix", since we may have already set it manually.
8822
71538dff 88232006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8824
8825 * kern/misc.c (abort): New alias for grub_abort.
8826
2965c7cc 88272006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8828
8829 A new machine-specific function "grub_machine_set_prefix" is
8830 defined. This is called after loading modules, so that a prefix
8831 initialization can use modules. Also, this change adds an
8832 intensive debugging feature for the memory manager via the
8833 configure option "--enable-mm-debug".
f19dbdb7 8834
2965c7cc 8835 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8836 PART.LEN.
8837
8838 * kern/sparc64/ieee1275/init.c (abort): Removed.
8839 (grub_stop): Likewise.
8840 (grub_exit): New function.
8841 (grub_set_prefix): Renamed to ...
8842 (grub_machine_set_prefix): ... this.
8843 (grub_machine_init): Do not call grub_set_prefix.
8844
8845 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8846 (grub_machine_set_prefix): ... this.
8847 (grub_machine_init): Do not call grub_set_prefix.
8848
8849 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8850 (grub_machine_init): Do not set the prefix here.
8851
8852 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8853
8854 * kern/efi/init.c: Include grub/mm.h.
8855 (grub_efi_set_prefix): New function.
8856
8857 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8858 (grub_efi_get_filename): New function.
8859 (grub_print_device_path): Renamed to ...
8860 (grub_efi_print_device_path): ... this.
8861
8862 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8863 [MM_DEBUG] (grub_realloc): Likewise.
8864 [MM_DEBUG] (grub_free): Likewise.
8865 [MM_DEBUG] (grub_memalign): Likewise.
8866 [MM_DEBUG] (grub_mm_debug): New variable.
8867 [MM_DEBUG] (grub_debug_malloc): New function.
8868 [MM_DEBUG] (grub_debug_free): New function.
8869 [MM_DEBUG] (grub_debug_realloc): New function.
8870 [MM_DEBUG] (grub_debug_memalign): New function.
8871
8872 * kern/misc.c (grub_abort): Print a newline to distinguish
8873 the message.
8874
8875 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8876 grub_set_root_dev after loading modules. This is necessary when
8877 setting a prefix depends on modules.
8878
8879 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8880 (grub_efi_print_device_path): ... this.
8881 (grub_efi_get_filename): New prototype.
8882 (grub_efi_set_prefix): Likewise.
8883
8884 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8885 and grub/disk.h.
8886 (grub_efidisk_get_device_handle): New prototype.
8887 (grub_efidisk_get_device_name): Likewise.
8888
8889 * include/grub/mm.h: Include config.h.
8890 (MM_DEBUG): Removed.
8891 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8892 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8893 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8894 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8895 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8896 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8897 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8898 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8899 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8900
8901 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8902
8903 * disk/efi/efidisk.c: Include grub/partition.h.
8904 (iterate_child_devices): New function.
8905 (add_device): First, compare only last device path nodes, so that
8906 devices are sorted by the types.
8907 (grub_efidisk_get_device_handle): New function.
8908 (grub_efidisk_get_device_name): Likewise.
8909
8910 * configure.ac (--enable-mm-debug): New option to enable the
8911 memory manager debugging feature. This makes the binary much
8912 bigger, so is disabled by default.
8913
9cacaa17 89142006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8915
8916 Use grub_abort instead of grub_stop, and grub_exit must be
8917 define in each architecture now. Also, this change adds support
8918 for EFI disks.
f19dbdb7 8919
9cacaa17 8920 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8921 (grub_getkey): New function.
8922 (grub_term_get_current): Likewise.
8923
8924 * util/i386/pc/grub-setup.c: Include grub/term.h.
8925 (grub_getkey): New function.
8926 (grub_term_get_current): Likewise.
8927
8928 * util/misc.c (grub_stop): Renamed to ...
8929 (grub_exit): ... this.
8930
8931 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8932 (grub_exit): ... this.
8933 (grub_machine_init): Use grub_abort instead of abort.
8934 (grub_stop): Removed.
8935
8936 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8937 abort.
8938
8939 * kern/i386/pc/startup.S (grub_exit): New function.
8940 (cold_reboot): New label.
8941
8942 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8943 (grub_efi_init): Call grub_efidisk_init.
8944 (grub_efi_fini): Call grub_efidisk_fini.
8945
8946 * kern/efi/efi.c: Include grub/mm.h.
8947 (grub_efi_console_control_guid): Renamed to ...
8948 (console_control_guid): ... this.
8949 (grub_efi_loaded_image_guid): Renamed to ...
8950 (loaded_image_guid): ... this.
8951 (grub_efi_locate_handle): New function.
8952 (grub_efi_open_protocol): Likewise.
8953 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8954 GRUB_EFI_CONSOLE_CONTROL_GUID.
8955 (grub_efi_exit): Removed.
8956 (grub_stop): Likewise.
8957 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8958 (grub_exit): New function.
8959 (grub_print_device_path): Likewise.
8960
8961 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8962 (grub_enter_rescue_mode): Register "exit".
8963
8964 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8965 (grub_abort): New function.
8966
8967 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8968
8969 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8970
8971 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8972
8973 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8974 (grub_print_device_path): New prototype.
8975 (grub_efi_locate_handle): Likewise.
8976 (grub_efi_open_protocol): Likewise.
8977
8978 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8979 * disk/efi/efidisk.c: Likewise.
8980
8981 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8982
8983 * include/grub/efi/console_control.h
8984 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8985
8986 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8987 last 8 bytes as an array.
8988 (GRUB_EFI_DISK_IO_GUID): New macro.
8989 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8990 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8991 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8992 grub_uint8_t.
8993 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8994 (struct grub_efi_device_path): Rename the member "sub_type" to
8995 "subtype".
8996 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8997 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8998 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8999 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9000 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9001 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9002 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9003 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9004 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9005 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9006 (struct grub_efi_pci_device_path): New structure.
9007 (grub_efi_pci_device_path_t): New type.
9008 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9009 (struct grub_efi_pccard_device_path): New structure.
9010 (grub_efi_pccard_device_path_t): New type.
9011 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9012 (struct grub_efi_memory_mapped_device_path): New structure.
9013 (grub_efi_memory_mapped_device_path_t): New type.
9014 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9015 (struct grub_efi_vendor_device_path): New structure.
9016 (grub_efi_vendor_device_path_t): New type.
9017 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9018 (struct grub_efi_controller_device_path): New structure.
9019 (grub_efi_controller_device_path_t): New type.
9020 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9021 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9022 (struct grub_efi_acpi_device_path): New structure.
9023 (grub_efi_acpi_device_path_t): New type.
9024 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9025 (struct grub_efi_expanded_acpi_device_path): New structure.
9026 (grub_efi_expanded_acpi_device_path_t): New type.
9027 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9028 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9029 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9030 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9031 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9032 (struct grub_efi_atapi_device_path): New structure.
9033 (grub_efi_atapi_device_path_t): New type.
9034 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9035 (struct grub_efi_fibre_channel_device_path): New structure.
9036 (grub_efi_fibre_channel_device_path_t): New type.
9037 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9038 (struct grub_efi_1394_device_path): New structure.
9039 (grub_efi_1394_device_path_t): New type.
9040 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9041 (struct grub_efi_usb_device_path): New structure.
9042 (grub_efi_usb_device_path_t): New type.
9043 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9044 (struct grub_efi_usb_class_device_path): New structure.
9045 (grub_efi_usb_class_device_path_t): New type.
9046 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9047 (struct grub_efi_i2o_device_path): New structure.
9048 (grub_efi_i2o_device_path_t): New type.
9049 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9050 (struct grub_efi_mac_address_device_path): New structure.
9051 (grub_efi_mac_address_device_path_t): New type.
9052 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9053 (struct grub_efi_ipv4_device_path): New structure.
9054 (grub_efi_ipv4_device_path_t): New type.
9055 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9056 (struct grub_efi_ipv6_device_path): New structure.
9057 (grub_efi_ipv6_device_path_t): New type.
9058 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9059 (struct grub_efi_infiniband_device_path): New structure.
9060 (grub_efi_infiniband_device_path_t): New type.
9061 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9062 (struct grub_efi_uart_device_path): New structure.
9063 (grub_efi_uart_device_path_t): New type.
9064 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9065 (struct grub_efi_vendor_messaging_device_path): New structure.
9066 (grub_efi_vendor_messaging_device_path_t): New type.
9067 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9068 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9069 (struct grub_efi_hard_drive_device_path): New structure.
9070 (grub_efi_hard_drive_device_path_t): New type.
9071 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9072 (struct grub_efi_cdrom_device_path): New structure.
9073 (grub_efi_cdrom_device_path_t): New type.
9074 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9075 (struct grub_efi_vendor_media_device_path): New structure.
9076 (grub_efi_vendor_media_device_path_t): New type.
9077 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9078 (struct grub_efi_file_path_device_path): New structure.
9079 (grub_efi_file_path_device_path_t): New type.
9080 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9081 (struct grub_efi_protocol_device_path): New structure.
9082 (grub_efi_protocol_device_path_t): New type.
9083 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9084 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9085 (struct grub_efi_bios_device_path): New structure.
9086 (grub_efi_bios_device_path_t): New type.
9087 (struct grub_efi_disk_io): New structure.
9088 (grub_efi_disk_io_t): New type.
9089 (struct grub_efi_block_io_media): New structure.
9090 (grub_efi_block_io_media_t): New type.
9091 (struct grub_efi_block_io): New structure.
9092 (grub_efi_block_io_t): New type.
9093
9094 * include/grub/misc.h (grub_stop): Removed.
9095 (grub_exit): New prototype.
9096 (grub_abort): Likewise.
9097
9098 * include/grub/disk.h (enum grub_disk_dev_id): Added
9099 GRUB_DISK_DEVICE_EFIDISK_ID.
9100
9101 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9102 disk/efi/efidisk.c.
9103 (kernel_syms.lst): Remove the target if an error occurs.
9104
49986a9f 91052006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9106
9107 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9108 as it was simply too buggy.
9109
970d3b8a 91102006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9111
9112 * kern/misc.c (grub_lltoa): New function.
9113 (grub_vsprintf): Added support for the long long suffix,
9114 i.e. "ll".
9115
ff04ec24 91162006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9117
9118 * Makefile.in (LDFLAGS): Add variable.
9119 (LD): Remove variable.
9120 * configure.ac: Add -m32 to LDFLAGS.
9121 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9122 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9123 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9124 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9125 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9126 variables.
9127 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9128 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9129 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9130
37e5e1a4 91312006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9132
9133 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9134 length for unknown glyph.
9135
c352d8dd 91362006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9137
2eab1c0d 9138 Add support for pre-loaded modules into the EFI port.
f19dbdb7 9139
2eab1c0d 9140 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9141 completely. Accept one more argument DIR. The caller has changed.
9142
9143 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9144
9145 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9146 (grub_efi_loaded_image_guid): New variable.
9147 (grub_efi_get_loaded_image): New function.
9148 (grub_arch_modules_addr): Likewise.
9149
9150 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9151 prototype.
9152
9153 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9154 (struct grub_efi_loaded_image): New structure.
9155 (grub_efi_loaded_image_t): New type.
9156
91572006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9158
c352d8dd 9159 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9160 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9161 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9162
6d01d6b4 91632006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9164
9165 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9166
976a4ea0 91672006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9168
9169 * DISTLIST: Added include/grub/efi/console.h,
9170 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9171 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9172
9173 * include/grub/efi/console.h: New file.
9174 * include/grub/efi/time.h: Likewise.
9175 * include/grub/i386/efi/kernel.h: Likewise.
9176 * kern/efi/init.c: Likewise.
9177 * kern/efi/mm.c: Likewise.
9178 * term/efi/console.c: Likewise.
f19dbdb7 9179
976a4ea0 9180 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9181 (grub_stop): Removed.
9182 (grub_get_rtc): Likewise.
9183 (grub_machine_init): Simply call grub_efi_init.
9184 (grub_machine_fini): Call grub_efi_fini.
9185
9186 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9187 (grub_efi_output_string): Removed.
9188 (grub_efi_stall): New function.
9189 (grub_stop): Likewise.
9190 (grub_get_rtc): Likewise.
9191
9192 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9193 (grub_efi_stall): New prototype.
9194 (grub_efi_allocate_pages): Likewise.
9195 (grub_efi_free_pages): Likewise.
9196 (grub_efi_get_memory_map): Likewise.
9197 (grub_efi_mm_init): Likewise.
9198 (grub_efi_mm_fini): Likewise.
9199 (grub_efi_init): Likewise.
9200 (grub_efi_fini): Likewise.
9201
9202 * include/grub/i386/efi/time.h: Do not include
9203 grub/symbol.h. Include grub/efi/time.h.
9204 (GRUB_TICKS_PER_SECOND): Removed.
9205 (grub_get_rtc): Likewise.
9206
9207 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9208 Added padding. The EFI spec is buggy.
9209 (GRUB_EFI_BLACK): New macro.
9210 (GRUB_EFI_BLUE): Likewise.
9211 (GRUB_EFI_GREEN): Likewise.
9212 (GRUB_EFI_CYAN): Likewise.
9213 (GRUB_EFI_RED): Likewise.
9214 (GRUB_EFI_MAGENTA): Likewise.
9215 (GRUB_EFI_BROWN): Likewise.
9216 (GRUB_EFI_LIGHTGRAY): Likewise.
9217 (GRUB_EFI_BRIGHT): Likewise.
9218 (GRUB_EFI_DARKGRAY): Likewise.
9219 (GRUB_EFI_LIGHTBLUE): Likewise.
9220 (GRUB_EFI_LIGHTGREEN): Likewise.
9221 (GRUB_EFI_LIGHTCYAN): Likewise.
9222 (GRUB_EFI_LIGHTRED): Likewise.
9223 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9224 (GRUB_EFI_YELLOW): Likewise.
9225 (GRUB_EFI_WHITE): Likewise.
9226 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9227 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9228 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9229 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9230 (GRUB_EFI_BACKGROUND_RED): Likewise.
9231 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9232 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9233 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9234 (GRUB_EFI_TEXT_ATTR): Likewise.
9235
9236 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9237 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9238 (kernel_mod_HEADERS): Added efi/time.h.
9239
83709125 92402006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9241
9242 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9243 include/grub/efi/api.h, include/grub/efi/console_control.h,
9244 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9245 include/grub/i386/efi/time.h, kern/efi/efi.c,
9246 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9247 and util/i386/efi/grub-mkimage.c.
9248
9249 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9250
9251 * genmk.rb (PModule#rule): Do not export symbols if
9252 #{prefix}_EXPORTS is set to "no".
9253
9254 * conf/i386-efi.mk: New file.
9255 * conf/i386-efi.rmk: Likewise.
9256 * include/grub/efi/api.h: Likewise.
9257 * include/grub/efi/console_control.h: Likewise.
9258 * include/grub/efi/efi.h: Likewise.
9259 * include/grub/efi/pe32.h: Likewise.
9260 * include/grub/i386/efi/time.h: Likewise.
9261 * kern/efi/efi.c: Likewise.
9262 * kern/i386/efi/init.c: Likewise.
9263 * kern/i386/efi/startup.S: Likewise.
9264 * util/i386/efi/grub-mkimage.c: Likewise.
9265
92662006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 9267
9268 * include/grub/script.h: Include <grub/parser.h> and
9269 "grub_script.tab.h".
9270 (struct grub_lexer_param): New struct.
9271 (struct grub_parser_param): Likewise.
9272 (grub_script_create_arglist): Pass the state in an argument.
9273 (grub_script_add_arglist): Likewise.
9274 (grub_script_create_cmdline): Likewise.
9275 (grub_script_create_cmdblock): Likewise.
9276 (grub_script_create_cmdif): Likewise.
9277 (grub_script_create_cmdmenu): Likewise.
9278 (grub_script_add_cmd): Likewise.
9279 (grub_script_arg_add): Likewise.
9280 (grub_script_lexer_ref): Likewise.
9281 (grub_script_lexer_deref): Likewise.
9282 (grub_script_lexer_record_start): Likewise.
9283 (grub_script_lexer_record_stop): Likewise.
9284 (grub_script_mem_record): Likewise.
9285 (grub_script_mem_record_stop): Likewise.
9286 (grub_script_malloc): Likewise.
9287 (grub_script_yylex): Likewise.
9288 (grub_script_yyparse): Likewise.
9289 (grub_script_yyerror): Likewise.
9290 (grub_script_yylex): Likewise.
9291 (grub_script_lexer_init): Return the state.
9292
9293 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9294 (grub_script_lexer_done): Likewise.
9295 (grub_script_lexer_getline): Likewise.
9296 (grub_script_lexer_refs): Likewise.
9297 (script): Likewise.
9298 (newscript): Likewise.
9299 (record): Likewise.
9300 (recording): Likewise.
9301 (recordpos): Likewise.
9302 (recordlen): Likewise.
9303 (grub_script_lexer_init): Return the state instead of setting
9304 global variables.
9305 (grub_script_lexer_ref): Use the newly added argument for state
9306 instead of globals.
9307 (grub_script_lexer_deref): Likewise.
9308 (grub_script_lexer_record_start): Likewise.
9309 (grub_script_lexer_record_stop): Likewise.
9310 (recordchar): Likewise.
9311 (nextchar): Likewise.
9312 (grub_script_yylex2): Likewise.
9313 (grub_script_yylex): Likewise.
9314 (grub_script_yyerror): Likewise.
9315
9316 * normal/parser.y (func_mem): Removed variable.
9317 (menu_entry): Likewise.
9318 (err): Likewise.
9319 (%lex-param): New parser option.
9320 (%parse-param): Likewise.
9321 (script): Always return the AST.
9322 (argument): Pass the state around.
9323 (arguments): Likewise.
9324 (grubcmd): Likewise.
9325 (commands): Likewise.
9326 (function): Likewise.
9327 (menuentry): Likewise.
9328 (if_statement): Likewise.
9329 (if): Likewise.
9330
9331 * normal/script.c (grub_script_memused): Removed variable.
9332 (grub_script_parsed): Likewise.
9333 (grub_script_malloc): Added a state argument. Use that instead of
9334 global variables.
9335 (grub_script_mem_record): Likewise.
9336 (grub_script_mem_record_stop): Likewise.
9337 (grub_script_arg_add): Likewise.
9338 (grub_script_add_arglist): Likewise.
9339 (grub_script_create_cmdline): Likewise.
9340 (grub_script_create_cmdif): Likewise.
9341 (grub_script_create_cmdmenu): Likewise.
9342 (grub_script_add_cmd): Likewise.
9343 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 9344
e2a8c904 93452006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 9346
9347 * normal/command.c (grub_command_init): Remove the title command.
9348
9349 * normal/lexer.c (grub_script_yylex): Renamed from this...
9350 (grub_script_yylex2): ... to this.
9351 (grub_script_yylex): New function. Temporary
9352 introduced to filter some tokens.
9353 (grub_script_yyerror): Print a newline.
9354
9355 * normal/main.c (read_config_file): Output information about the
9356 lines that contain errors. Wait for a key after all lines have
9357 been processed. Don't return an empty menu.
9358
9359 * normal/parser.y (func_mem): Don't initialize.
9360 (menu_entry): Likewise.
9361 (err): New variable.
9362 (script): Don't return anything when an error was encountered.
9363 (ws, returns): Removed rules.
9364 (argument): Disabled concatenated variable support.
9365 (arguments): Remove explicit separators.
9366 (grubcmd): Likewise.
9367 (function): Likewise.
9368 (menuentry): Likewise.
9369 (if): Likewise.
9370 (commands): Likewise. Add error handling.
9371
9372 * normal/script.c (grub_script_create_cmdline): If
9373 `grub_script_parsed' is 0, assume the parser encountered an error.
9374
c9a86192 93752006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9376
9377 * configure.ac: Add support for EFI. Fix the typo
9378 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9379
70f3b243 93802006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9381
9382 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9383 foreign multibyte characters should be shown correctly.
9384
65f201ad 93852006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9386
9387 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9388 calculation.
9389 (read_config_file): Made it to close file before returning.
9390
b4b93674 93912006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9392
9393 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9394 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9395 video/i386/pc/vbefill.c.
9396
9397 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9398 video/i386/pc/vbefill.c.
9399
9400 * include/grub/video.h (grub_video_blit_format): New enum.
9401 (grub_video_mode_info): Added new member blit_format.
9402 (grub_video_get_blit_format): New function prototype.
9403
9404 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9405 function prototype.
9406 (grub_video_vbe_map_rgb): Likewise.
9407 (grub_video_vbe_unmap_color): Likewise.
9408
9409 * include/grub/i386/pc/vbeblit.h: New file.
9410
9411 * include/grub/i386/pc/vbefill.h: New file.
9412
9413 * video/video.c (grub_video_get_blit_format): New function.
9414 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9415 (grub_video_vbe_map_rgb): Likewise.
9416 (grub_video_vbe_unmap_color): Likewise.
9417
9418 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9419 optimized fills.
9420 (grub_video_vbe_blit_render_target): Changed to use more optimized
9421 blits.
9422 (grub_video_vbe_setup): Added detection for optimized settings.
9423 (grub_video_vbe_create_render_target): Likewise.
9424
9425 * video/i386/pc/vbeblit.c: New file.
9426
9427 * video/i386/pc/vbefill.c: New file.
9428
c2379b9c 94292006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9430
9431 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9432 here...
9433
9434 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9435 parsing to support both hex and dec ranges. If filename was missing
9436 show usage information.
9437
bd0d7896 94382006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9439
9440 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9441 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9442
9443 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9444 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9445 (video_mod_SOURCES): Added.
9446 (video_mod_CFLAGS): Likewise.
9447 (video_mod_LDFLAGS): Likewise.
9448 (gfxterm_mod_SOURCES): Likewise.
9449 (gfxterm_mod_CFLAGS): Likewise.
9450 (gfxterm_mod_LDFLAGS): Likewise.
9451 (videotest_mod_SOURCES): Likewise.
9452 (videotest_mod_CFLAGS): Likewise.
9453 (videotest_mod_LDFLAGS): Likewise.
9454 (vesafb_mod_SOURCES): Removed.
9455 (vesafb_mod_CFLAGS): Likewise.
9456 (vesafb_mod_LDFLAGS): Likewise.
9457 (vga_mod_SOURCES): Likewise.
9458 (vga_mod_CFLAGS): Likewise.
9459 (vga_mod_LDFLAGS): Likewise.
9460
9461 * commands/videotest.c: New file.
9462
9463 * font/manager.c (fill_with_default_glyph): Modified to use
9464 grub_font_glyph.
9465 (grub_font_get_glyph): Likewise.
9466 (fontmanager): Renamed from this...
9467 (font_manager): ... to this.
9468
9469 * include/grub/font.h (grub_font_glyph): Added new structure.
9470 (grub_font_get_glyph): Modified to use grub_font_glyph.
9471
9472 * include/grub/misc.h (grub_abs): Added as inline function.
9473
9474 * include/grub/video.h: New file.
9475
9476 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9477 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9478 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9479 (grub_vbe_get_controller_info): Renamed from this...
9480 (grub_vbe_bios_get_controller_info): ... to this.
9481 (grub_vbe_get_mode_info): Renamed from this...
9482 (grub_vbe_bios_get_mode_info): ... to this.
9483 (grub_vbe_set_mode): Renamed from this...
9484 (grub_vbe_bios_set_mode): ... to this.
9485 (grub_vbe_get_mode): Renamed from this...
9486 (grub_vbe_bios_get_mode): ... to this.
9487 (grub_vbe_set_memory_window): Renamed from this...
9488 (grub_vbe_bios_set_memory_window): ... to this.
9489 (grub_vbe_get_memory_window): Renamed from this...
9490 (grub_vbe_bios_get_memory_window): ... to this.
9491 (grub_vbe_set_scanline_length): Renamed from this...
9492 (grub_vbe_set_scanline_length): ... to this.
9493 (grub_vbe_get_scanline_length): Renamed from this...
9494 (grub_vbe_bios_get_scanline_length): ... to this.
9495 (grub_vbe_set_display_start): Renamed from this...
9496 (grub_vbe_bios_set_display_start): ... to this.
9497 (grub_vbe_get_display_start): Renamed from this...
9498 (grub_vbe_bios_get_display_start): ... to this.
9499 (grub_vbe_set_palette_data): Renamed from this...
9500 (grub_vbe_bios_set_palette_data): ... to this.
9501 (grub_vbe_set_pixel_rgb): Removed.
9502 (grub_vbe_set_pixel_index): Likewise.
9503
9504 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9505 from this...
9506 (grub_vbe_bios_get_controller_info): ... to this.
9507 (grub_vbe_get_mode_info): Renamed from this...
9508 (grub_vbe_bios_get_mode_info): ... to this.
9509 (grub_vbe_set_mode): Renamed from this...
9510 (grub_vbe_bios_set_mode): ... to this.
9511 (grub_vbe_get_mode): Renamed from this...
9512 (grub_vbe_bios_get_mode): ... to this.
9513 (grub_vbe_set_memory_window): Renamed from this...
9514 (grub_vbe_bios_set_memory_window): ... to this.
9515 (grub_vbe_get_memory_window): Renamed from this...
9516 (grub_vbe_bios_get_memory_window): ... to this.
9517 (grub_vbe_set_scanline_length): Renamed from this...
9518 (grub_vbe_set_scanline_length): ... to this.
9519 (grub_vbe_get_scanline_length): Renamed from this...
9520 (grub_vbe_bios_get_scanline_length): ... to this.
9521 (grub_vbe_set_display_start): Renamed from this...
9522 (grub_vbe_bios_set_display_start): ... to this.
9523 (grub_vbe_get_display_start): Renamed from this...
9524 (grub_vbe_bios_get_display_start): ... to this.
9525 (grub_vbe_set_palette_data): Renamed from this...
9526 (grub_vbe_bios_set_palette_data): ... to this.
9527 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9528 getting corrupted after calling it. Added more pushes and pops.
9529 (grub_vbe_bios_set_mode): Likewise.
9530 (grub_vbe_bios_get_mode): Likewise.
9531 (grub_vbe_bios_get_memory_window): Likewise.
9532 (grub_vbe_bios_set_scanline_length): Likewise.
9533 (grub_vbe_bios_get_scanline_length): Likewise.
9534 (grub_vbe_bios_get_display_start): Likewise.
9535 (grub_vbe_bios_set_palette_data): Likewise.
9536
9537 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9538 (cl_insert): Likewise.
9539 (cl_delete): Likewise.
9540
9541 * term/gfxterm.c: New file.
9542
9543 * term/i386/pc/vesafb.c: Removed file.
9544
9545 * video/video.c: New file.
9546
9547 * video/i386/pc/vbe.c (real2pm): Added new function.
9548 (grub_video_vbe_draw_pixel): Likewise.
9549 (grub_video_vbe_get_video_ptr): Likewise.
9550 (grub_video_vbe_get_pixel): Likewise
9551 (grub_video_vbe_init): Likewise.
9552 (grub_video_vbe_fini): Likewise.
9553 (grub_video_vbe_setup): Likewise.
9554 (grub_video_vbe_get_info): Likewise.
9555 (grub_video_vbe_set_palette): Likewise.
9556 (grub_video_vbe_get_palette): Likewise.
9557 (grub_video_vbe_set_viewport): Likewise.
9558 (grub_video_vbe_get_viewport): Likewise.
9559 (grub_video_vbe_map_color): Likewise.
9560 (grub_video_vbe_map_rgb): Likewise.
9561 (grub_video_vbe_map_rgba): Likewise.
9562 (grub_video_vbe_unmap_color): Likewise.
9563 (grub_video_vbe_fill_rect): Likewise.
9564 (grub_video_vbe_blit_glyph): Likewise.
9565 (grub_video_vbe_blit_bitmap): Likewise.
9566 (grub_video_vbe_blit_render_target): Likewise.
9567 (grub_video_vbe_scroll): Likewise.
9568 (grub_video_vbe_swap_buffers): Likewise.
9569 (grub_video_vbe_create_render_target): Likewise.
9570 (grub_video_vbe_delete_render_target): Likewise.
9571 (grub_video_vbe_set_active_render_target): Likewise.
9572 (grub_vbe_set_pixel_rgb): Remove function.
9573 (grub_vbe_set_pixel_index): Likewise.
9574 (index_color_mode): Remove static variable.
9575 (active_mode): Likewise.
9576 (framebuffer): Likewise.
9577 (bytes_per_scan_line): Likewise.
9578 (grub_video_vbe_adapter): Added new static variable.
9579 (framebuffer): Likewise.
9580 (render_target): Likewise.
9581 (initial_mode): Likewise.
9582 (mode_in_use): Likewise.
9583 (mode_list): Likewise.
9584
5f97350b 95852006-03-10 Marco Gerards <marco@gnu.org>
9586
9587 * configure.ac (AC_INIT): Bumped to 1.93.
9588
9589 * DISTLIST: Added `include/grub/hfs.h'.
9590
a3c5c6f8 95912006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9592
9593 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9594 18H, which might help the BIOS falling back to next boot media.
9595
6de53d26 95962006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9597
9598 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9599 Poe Chen <poe.poechen@gmail.com>.
9600
77c4a393 96012006-01-17 Marco Gerards <marco@gnu.org>
9602
9603 * include/grub/normal.h: Include <grub/script.h>.
9604 (grub_command_list): Removed struct.
9605 (grub_command_list_t): Removed type.
9606 (grub_menu_entry): Remove members `num' and `command_list'. Add
9607 members `commands' and `sourcecode'.
9608 * include/grub/script.h: Add inclusion guards.
9609 (grub_script_cmd_menuentry): New struct.
9610 (grub_script_execute_menuentry): New prototype.
9611 (grub_script_lexer_record_start): Likewise.
9612 (grub_script_lexer_record_stop): Likewise.
9613 * normal/execute.c (grub_script_execute_menuentry): New function.
9614 * normal/lexer.c (record, recording, recordpos, recordlen): New
9615 variables.
9616 (grub_script_lexer_record_start): New function.
9617 (grub_script_lexer_record_stop): Likewise.
9618 (recordchar): Likewise.
9619 (nextchar): Likewise.
9620 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9621 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9622 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9623 (current_menu): New variable.
9624 (free_menu): Mainly rewritten.
9625 (grub_normal_menu_addentry): New function.
9626 (read_config_file): Rewritten.
9627 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 9628 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 9629 the menu entry.
9630 (run): Mainly rewritten.
9631 * normal/parser.y (menu_entry): New variable.
9632 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9633 (menuentry): New rule.
9634 (command): Add `menuentry'.
9635 (if_statement): Allow additional returns before `fi'.
9636 * normal/script.c (grub_script_create_cmdmenu): New function.
9637
144f1f98 96382006-01-03 Marco Gerards <marco@gnu.org>
9639
9640 * INSTALL: GNU Bison is required.
9641 * configure.ac: Rewritten the test to detect Bison.
9642 * Makefile.in (YACC): New variable. Reported by Xun Sun
9643 <xun.sun.cn@gmail.com>.
9644
af4b2d89 96452006-01-03 Marco Gerards <marco@gnu.org>
9646
9647 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9648 the HFS+ filesystem to filesystem blocks.
9649 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9650 GCC warning is silenced.
9651
15643b71 96522006-01-03 Marco Gerards <marco@gnu.org>
9653
9654 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9655 read from disk from big endian to host byte order.
9656
00905879 96572006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9658
9659 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9660 documentation.
9661 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9662 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9663 embedded HFS+ filesystem.
9664 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9665 (grub_hfs_sblock): Move from here...
9666 * include/grub/hfs.h: To here... New file.
9667 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9668 documentation.
9669 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9670 New macros.
9671 (grub_hfsplus_volheader): Change type of member `magic' to
9672 `grub_uint16_t'.
9673 (grub_hfsplus_data): Add new member `embedded_offset'.
9674 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9675 returned block.
9676 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9677 Calculate the offset.
9678
8899bc3e 96792005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9680
9681 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9682 Removed.
9683 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9684
ae8c0277 96852005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9686
9687 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9688 ENV->NAME is NULL after allocating ENV->VALUE.
9689
07084456 96902005-12-25 Marco Gerards <marco@gnu.org>
9691
9692 * kern/env.c (grub_env_set): Rewritten the error handling code.
9693
4750f5f1 96942005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9695
9696 * geninit.sh: Made more robust, and more portable.
9697
50214199 96982005-12-25 Marco Gerards <marco@gnu.org>
9699
9700 Add support for Apple HFS+ filesystems.
f19dbdb7 9701
50214199 9702 * fs/hfsplus.c: New file.
9703
9704 * DISTLIST: Added `fs/hfsplus.c'.
9705
9706 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9707 (hfsplus_mod_SOURCES): New variable.
9708 (hfsplus_mod_CFLAGS): Likewise.
9709 (hfsplus_mod_LDFLAGS): Likewise.
9710 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9711 (grub_setup_SOURCES): Likewise.
9712 (grub_mkdevicemap_SOURCES): Likewise.
9713 (grub_emu_SOURCES): Likewise.
9714 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9715
9716 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9717
9718 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9719
befaed6c 97202005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9721
9722 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9723 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9724 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9725 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9726 normal/lexer.c, normal/parser.y, normal/script.c, and
9727 partmap/gpt.c.
9728 Removed kern/sparc64/cache.c.
9729
9730 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9731 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9732 grub_emu_init.c.
9733
9734 * configure.ac (AC_INIT): Bumped to 1.92.
9735
6a124103 97362005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9737
9738 * kern/err.c (grub_error_push): Added new function to support error
9739 stacks.
9740 (grub_error_pop): Likewise.
9741 (grub_error_stack_items): New local variable to support error stacks.
9742 (grub_error_stack_pos): Likewise.
9743 (grub_error_stack_assert): Likewise.
9744 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9745 stack depth.
9746 (grub_print_error): Added support to print errors from error stack.
9747
9748 * include/grub/err.h (grub_error_push): Added function prototype.
9749 (grub_error_pop): Likewise.
9750
be973c1b 97512005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9752
9753 * configure.ac: Accept `powerpc64' as host_cpu.
9754 (amd64): Rename to `biarch32'.
9755
9756 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9757 non-cacheline-aligned addresses.
9758
9759 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9760 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9761 if `size' is non-zero.
9762
b04216ab 97632005-12-03 Marco Gerards <mgerards@xs4all.nl>
9764
9765 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9766 and `cd' to make sure the filename is not prefixed with a
9767 directory name.
9768 (pkgdata_MODULES): Add `gpt.mod'.
9769 (gpt_mod_SOURCES): New variable.
9770 (gpt_mod_CFLAGS): Likewise.
9771 (gpt_mod_LDFLAGS): Likewise.
9772
9773 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9774
9775 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9776 New macro.
9777
9778 * partmap/gpt.c: New file.
9779
9780 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9781 GPT partition map is detected.
9782
41730ed9 97832005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9784
9785 * commands/i386/pc/play.c: New file.
9786 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9787 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9788 macros.
f19dbdb7 9789
95dc3643 97902005-11-27 Marco Gerards <mgerards@xs4all.nl>
9791
9792 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9793 ((unused))' to silence gcc warning.
9794
1569ec51 97952005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9796
9797 * configure.ac: Correct `AC_PROG_YACC' test.
9798
9abde152 97992005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9800
9801 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9802 check before installing files.
9803
44b83271 98042005-11-22 Mike Small <smallm@panix.com>
9805
9806 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9807 number regex so multidigit numbers are recognized correctly.
9808
98092005-11-22 Mike Small <smallm@panix.com>
9810
9811 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9812 debugging message before attempting to claim memory.
9813 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9814 multiple addresses in case of failure.
9815
9c12956b 98162005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9817
9818 * term/tparm.c (get_space): Remove empty `if' statement.
9819
9820 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9821
9822 * kern/parser.c (check_varstate): Rename `state' to 's'.
9823
aeaf81d9 98242005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9825
9826 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9827 variable definitions to the beginning of each function. Sort stack
9828 variables by size.
9829 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9830 `buf' argument to `char *'.
9831
79bbb63f 98322005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9833
9834 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9835 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 9836 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 9837 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9838 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9839 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9840 configfile.mod, search.mod, gzio.mod and test.mod.
9841 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9842 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9843 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9844 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9845 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9846 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9847 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9848 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9849 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9850 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9851 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9852 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9853 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9854 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9855 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9856 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9857 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9858 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9859 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9860 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9861 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9862 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9863 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9864
9865 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9866 `grep --include'.
9867 (pkgdata_MODULES): Add test.mod.
9868
233b1628 98692005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9870
9871 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9872 appending to variables with "+=".
9873 (PModule): Use full pathname to generate *.lst filenames.
9874
9875 * Makefile.in: Fixed list rules moved from genmk.rb.
9876 (.DELETE_ON_ERROR): New special target.
9877 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9878
9879 * conf/i386-pc.rmk: Include conf/common.mk.
9880 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 9881 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 9882 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9883 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9884 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9885 configfile.mod, search.mod, gzio.mod and test.mod.
9886 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9887 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9888 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9889 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9890 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9891 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9892 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9893 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9894 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9895 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9896 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9897 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9898 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9899 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9900 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9901 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9902 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9903 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9904 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9905 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9906 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9907 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9908 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9909 here...
9910 * conf/common.rmk: ... to here. New file.
9911
9912 * conf/common.mk: New file.
9913
16f820c8 99142005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9915
9916 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9917 (grub_script.tab.c): ... here.
9918
9919 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9920 (grub_script.tab.c): ... here.
9921
9922 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9923 (grub_script.tab.c): ... here.
9924
9925 * normal/command.c (grub_command_find): Fixed a memory leak of
9926 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9927
63ba1554 99282005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9929
9930 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9931 "@" which marks the start of a comment on ARM.
9932 (VARIABLE): Likewise.
9933
7f67dc13 99342005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9935
79bbb63f 9936 Add support for Linux/ADFS partition tables.
7f67dc13 9937
9938 * partmap/acorn.c: New file.
9939
9940 * include/grub/acorn_filecore.h: Likewise.
9941
9942 * DISTLIST: Added `partmap/acorn.c' and
9943 `include/grub/acorn_filecore.h'.
f19dbdb7 9944
7f67dc13 9945 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9946 `partmap/acorn.c'.
9947 (pkgdata_MODULES): Add `acorn.mod'.
9948 (acorn_mod_SOURCES): New variable.
9949 (acorn_mod_CFLAGS): Likewise.
9950
9951 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9952 `partmap/acorn.c'.
9953 (pkgdata_MODULES): Add `acorn.mod'.
9954 (acorn_mod_SOURCES): New variable.
9955 (acorn_mod_CFLAGS): Likewise.
9956
9957 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9958 (pkgdata_MODULES): Add `acorn.mod'.
9959 (acorn_mod_SOURCES): New variable.
9960 (acorn_mod_CFLAGS): Likewise.
9961 (acorn_mod_LDFLAGS): Likewise.
9962
9963 * include/types.h (grub_disk_addr_t): New typedef.
9964
6d099807 99652005-11-13 Marco Gerards <mgerards@xs4all.nl>
9966
9967 * geninit.sh: New file.
9968
9969 * geninitheader.sh: Likewise.
9970
9971 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9972 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9973 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9974 * commands/configfile.c (grub_configfile_init)
9975 (grub_configfile_fini): Likewise.
9976 * commands/default.c (grub_default_init, grub_default_fini):
9977 Likewise.
9978 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9979 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9980 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9981 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9982 Likewise.
9983 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9984 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9985 Likewise.
9986 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 9987 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 9988 Likewise.
9989 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9990 Likewise.
fe6b695a 9991 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 9992 Likewise.
9993 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9994 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9995 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9996 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9997 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9998 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9999 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10000 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10001 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10002 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10003 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10004 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10005 * partmap/amiga.c (grub_amiga_partition_map_init)
10006 (grub_amiga_partition_map_fini): Likewise.
10007 * partmap/apple.c (grub_apple_partition_map_init)
10008 (grub_apple_partition_map_fini): Likewise.
10009 * partmap/pc.c (grub_pc_partition_map_init)
10010 (grub_pc_partition_map_fini): Likewise.
10011 * partmap/sun.c (grub_sun_partition_map_init,
10012 grub_sun_partition_map_fini): Likewise.
10013 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10014 Likewise.
10015
10016 * util/grub-emu.c: Include <grub_modules_init.h>.
10017 (main): Don't initialize and de-initialize any modules directly,
10018 use `grub_init_all' and `grub_fini_all' instead.
10019
10020 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10021 `grub_vesafb_mod_init'.
10022 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10023 all users.
10024 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10025 `grub_vga_mod_init'. Updated all users.
10026 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 10027
6d099807 10028 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10029 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10030 rules.
10031
10032 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10033 Generate a function to initialize the module in utilities.
10034 Updated all callers.
10035 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10036 initialize the module in utilities. Updated all callers.
10037
9046bcf0 100382005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10039
10040 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10041 escape sequence and a literal ^L to clear the screen.
10042
10043 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10044 when returning from Open Firmware.
10045
d13ea639 100462005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10047
10048 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10049 (grub_ofconsole_height): Likewise.
10050 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10051 manually insert a '\n'.
10052 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10053 `grub_ofconsole_height'. Return early if these are already set.
10054
a8fcf206 100552005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10056
10057 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10058 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10059 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10060 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10061 and `normal/script.c'.
10062 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10063 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10064 (test_mod_SOURCES): New variable.
10065 (test_mod_CFLAGS): Likewise.
10066 (test_mod_LDFLAGS): Likewise.
10067 (pkgdata_MODULES): Add `test.mod'.
10068 (grub_script.tab.c): New rule.
10069 (grub_script.tab.h): Likewise.
10070
b6b32745 100712005-11-07 Marco Gerards <mgerards@xs4all.nl>
10072
10073 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10074 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10075 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10076 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10077 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10078 (test_mod_SOURCES): New variable.
10079 (test_mod_CFLAGS): Likewise.
10080 (pkgdata_MODULES): Add `test.mod'.
10081 (grub_script.tab.c): New rule.
10082 (grub_script.tab.h): Likewise.
10083
daac212a 100842005-11-06 Marco Gerards <mgerards@xs4all.nl>
10085
10086 Add initial scripting support.
10087
10088 * commands/test.c: New file.
10089 * include/grub/script.h: Likewise.
10090 * normal/execute.c: Likewise.
10091 * normal/function.c: Likewise.
10092 * normal/lexer.c: Likewise.
10093 * normal/parser.y: Likewise.
10094 * normal/script.c: Likewise.
10095
10096 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 10097
daac212a 10098 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10099 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10100 `normal/function.c' and `normal/script.c'.
10101 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10102 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 10103 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10104 variables.
daac212a 10105 (pkgdata_MODULES): Add `test.mod'.
10106 (grub_script.tab.c): New rule.
10107 (grub_script.tab.h): Likewise.
10108
10109 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10110
10111 * include/grub/normal.h (grub_test_init): New prototype.
10112 (grub_test_fini): Likewise.
f19dbdb7 10113
daac212a 10114 * normal/command.c: Include <grub/script.h>.
10115 (grub_command_execute): Rewritten.
f19dbdb7 10116
daac212a 10117 * util/grub-emu.c (main): Call `grub_test_init' and
10118 `grub_test_fini'.
10119
77500b2b 101202005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10121
10122 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10123 to 0.
10124 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10125 there are no pending characters.
10126
e45deb9e 101272005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10128
10129 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10130 `grub_strndup' to drop device arguments. Replace unnecessary
10131 `grub_strndup' with `grub_strdup'.
10132
4ce32619 101332005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10134
10135 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10136 `debug' environment variable has been set.
10137
101382005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 10139
4ce32619 10140 * Makefile.in (install-local): Use $(DATA).
10141 (uninstall): Likewise.
10142 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10143 (sbin_UTILITIES): ... to here.
10144 (sbin_SCRIPTS): New variable.
10145 (grub_install_SOURCES): New variable.
10146 * util/powerpc/ieee1275/grub-install.in: New file.
10147 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10148 variable.
10149 (add_segments): Call `grub_util_get_path'.
10150
25fe6f03 101512005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10152
10153 From Timothy Baldwin:
10154 * commands/ls.c (grub_ls_list_files): Close FILE with
10155 grub_file_close.
10156 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10157
04ccf3ec 101582005-10-24 Marco Gerards <mgerards@xs4all.nl>
10159
10160 * include/grub/parser.h: New file.
10161
10162 * kern/parser.c: Likewise.
10163
10164 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10165 (grub_setup_SOURCES): Likewise.
10166 (grub_probefs_SOURCES): Likewise.
10167 (grub_emu_SOURCES): Likewise.
10168 (kernel_img_HEADERS): Add `parser.h'.
10169
10170 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10171 (grub_emu_SOURCES): Add `kern/parser.c'.
10172 (grubof_SOURCES): Likewise.
10173
10174 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10175 (grubof_SOURCES): Add `kern/parser.c'.
10176
10177 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10178
10179 * kern/misc.c (grub_split_cmdline): Removed function.
10180
10181 * kern/rescue.c: Include <grub/parser.h>.
10182 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10183 of `grub_split_cmdline'.
10184
10185 * normal/command.c: Include <grub/parser.h>.
10186 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10187 of `grub_split_cmdline'.
10188
10189 * normal/completion.c: Include <grub/parser.h>.
10190 (cmdline_state): New variable.
10191 (iterate_dir): End the filename with a quote depending on the
10192 command line state.
10193 (get_state): new function.
10194 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10195 split the arguments and determine the current argument. When the
10196 argument string is not quoted, escape all spaces.
10197
6d8f4b0e 101982005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10199
10200 * normal/sparc64/setjmp.S: New file.
10201
15cf03ed 102022005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10203
10204 * include/grub/sparc64/libgcc.h: New file.
10205 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10206 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10207 normal/sparc64/setjmp.c.
10208
03e8661a 102092005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10210
10211 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10212 * kern/sparc64/cache.S: New file.
10213 * kern/sparc64/cache.c: Removed.
10214 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10215 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10216 -mtune=ultrasparc.
10217 (COMMON_LDFLAGS): Add -melf64_sparc.
10218 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10219 (grubof_SOURCES): Use cache.S instead of cache.c.
10220 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10221 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10222 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10223 commented though.
10224 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10225 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10226 (linux_mod_CFLAGS): Commented out.
10227 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10228 out because module isn't built.
10229 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10230 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10231 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10232 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10233 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10234 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10235 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10236 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10237 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10238 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10239 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10240 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10241 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10242 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10243
34eeec8a 102442005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10245
10246 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10247 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10248 longer, because HFS should not be used on PC.
10249
708367a3 102502005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10251
10252 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10253 consistently within the loop.
10254
6fa1251a 102552005-10-15 Marco Gerards <mgerards@xs4all.nl>
10256
10257 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10258 directory can not be read.
10259
4801580b 102602005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10261
10262 * configure.ac (AC_INIT): Increase the version number to 1.91.
10263
10264 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10265 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10266 term/i386/pc/serial.c.
10267
219ad426 102682005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10269
10270 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10271 file size must be permitted.
10272
10273 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10274 between %ah and %al.
10275
688e5699 102762005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10277
10278 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10279 grub_uint64_t.
10280 Call the hook with a NUL-terminated filename.
10281 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10282 grub_cpu_to_be32.
10283
10284 * kern/term.c (cursor_state): New variable.
10285 (grub_term_set_current): Reset the cursor state on a new
10286 terminal.
10287 (grub_setcursor): Rewritten to use CURSOR_STATE.
10288 (grub_getcursor): New function.
10289
10290 * include/grub/term.h (grub_getcursor): New prototype.
10291
10292 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10293 integers on ARM. Reported by Timothy Baldwin
10294 <T.E.Baldwin99@members.leeds.ac.uk>.
10295
bb34586c 102962005-10-11 Marco Gerards <mgerards@xs4all.nl>
10297
10298 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10299 allocated.
10300 (grub_sfs_dir): Likewise.
10301
9a909877 103022005-10-09 Marco Gerards <mgerards@xs4all.nl>
10303
10304 Add support for the SFS filesystem.
10305
10306 * fs/sfs.c: New file.
10307
10308 * DISTLIST: Added `fs/sfs.c'.
10309
10310 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10311 (grub_probefs_SOURCES): Likewise.
10312 (grub_emu_SOURCES): Likewise.
10313 (pkgdata_MODULES): Add `sfs.mod'.
10314 (sfs_mod_SOURCES): New variable.
10315 (sfs_mod_CFLAGS): Likewise.
10316 (sfs_mod_LDFLAGS): Likewise.
10317
10318 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10319 (pkgdata_MODULES): Add `sfs.mod'.
10320 (sfs_mod_SOURCES): New variable.
10321 (sfs_mod_CFLAGS): Likewise.
10322
10323 * util/grub-emu.c (main): Call `grub_sfs_init' and
10324 `grub_sfs_fini'.
10325
10326 * include/grub/fs.h (grub_sfs_init): New prototype.
10327 (grub_sfs_fini): Likewise.
10328
57bdbde3 103292005-10-07 Marco Gerards <mgerards@xs4all.nl>
10330
10331 Add support for the AFFS filesystem.
10332
10333 * fs/affs.c: New file.
10334
10335 * DISTLIST: Added `fs/affs.c'.
10336
10337 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10338 (grub_probefs_SOURCES): Likewise.
10339 (grub_emu_SOURCES): Likewise.
10340 (pkgdata_MODULES): Add `affs.mod'.
10341 (affs_mod_SOURCES): New variable.
10342 (affs_mod_CFLAGS): Likewise.
10343 (affs_mod_LDFLAGS): Likewise.
10344
10345 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10346 (pkgdata_MODULES): Add `affs.mod'.
10347 (affs_mod_SOURCES): New variable.
10348 (affs_mod_CFLAGS): Likewise.
10349
10350 * util/grub-emu.c (main): Call `grub_affs_init' and
10351 `grub_affs_fini'.
10352
10353 * include/grub/fs.h (grub_affs_init): New prototype.
10354 (grub_affs_fini): Likewise.
10355
047b67e0 103562005-10-01 Marco Gerards <mgerards@xs4all.nl>
10357
10358 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10359
59b8208a 103602005-10-01 Marco Gerards <mgerards@xs4all.nl>
10361
10362 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10363 `-m32' to CFLAGS.
10364
10365 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10366 linking.
f19dbdb7 10367
59b8208a 10368 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10369 (COMMON_LDFLAGS): New variable.
10370 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10371 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10372 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10373 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10374 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10375 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10376 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10377 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10378 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10379 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10380 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10381 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10382 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10383 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10384 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10385 variables.
10386 (normal_mod_ASFLAGS): Add `-m32'.
10387
10388 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10389 (grub_host_size_t, grub_host_ssize_t): New types.
10390 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 10391 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 10392 `GRUB_HOST_SIZEOF_VOID_P'.
10393
10394 * include/grub/kernel.h (struct grub_module_header): Type of
10395 member offset changed to `grub_host_off_t'. Type of member size
10396 changed to `grub_host_size_t'.
10397 (struct grub_module_info): Type of member offset changed to
10398 `grub_host_off_t'. Type of member size changed to
10399 `grub_host_size_t'.
10400
b4093103 104012005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10402
10403 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 10404
b4093103 10405 * kern/i386/pc/startup.S (multiboot_header): New label.
10406 (multiboot_entry): Likewise.
10407 (multiboot_trampoline): Likewise.
10408
10409 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10410 Increased to 0x4A0.
10411
10412 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10413 put parentheses after a question mark.
10414 [!GRUB_UTIL] (my_mod): New variable.
10415
10416 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10417
b2499b29 104182005-09-28 Marco Gerards <mgerards@xs4all.nl>
10419
10420 Adds support for the XFS filesystem. Btrees are not supported
10421 yet.
10422
10423 * fs/xfs.c: New file.
10424
10425 * DISTLIST: Added `fs/xfs.c'.
10426
10427 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10428 (grub_probefs_SOURCES): Likewise.
10429 (grub_emu_SOURCES): Likewise.
10430 (pkgdata_MODULES): Add `xfs.mod'.
10431 (xfs_mod_SOURCES): New variable.
10432 (xfs_mod_CFLAGS): Likewise.
10433
10434 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10435 (pkgdata_MODULES): Add `xfs.mod'.
10436 (xfs_mod_SOURCES): New variable.
10437 (xfs_mod_CFLAGS): Likewise.
10438
10439 * util/grub-emu.c (main): Call `grub_xfs_init' and
10440 `grub_xfs_fini'.
10441
10442 * include/grub/fs.h (grub_xfs_init): New prototype.
10443 (grub_xfs_fini): Likewise.
10444
f19dbdb7 10445
83d37a62 104462005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10447
10448 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10449 color modes, allow greater than 16 colors to be configured as
10450 a default palette.
10451
47d2d65e 104522005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10453
10454 * normal/completion.c (complete_arguments): Add the qualifier
10455 const into OPTIONS.
10456
10457 From Omniflux <omniflux+lists@omniflux.com>:
10458 * include/grub/terminfo.h: New file.
10459 * include/grub/tparm.h: Likewise.
10460 * include/grub/i386/pc/serial.h: Likewise.
10461 * term/terminfo.c: Likewise.
10462 * term/tparm.c: Likewise.
10463 * term/i386/pc/serial.c: Likewise.
10464 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10465 serial.mod.
10466 (terminfo_mod_SOURCES): New variable.
10467 (terminfo_mod_CFLAGS): Likewise.
10468 (serial_mod_SOURCES): Likewise.
10469 (serial_mod_CFLAGS): Likewise.
10470
48b671ff 104712005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10472
10473 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10474 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10475 and kern/powerpc/ieee1275/cmain.c, respectively.
10476
10477 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10478 * kern/powerpc/ieee1275/crt0.S: ... here.
10479
10480 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10481 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 10482
48b671ff 10483 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10484 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10485 instead of boot/powerpc/ieee1275/crt0.S and
10486 boot/powerpc/ieee1275/cmain.c, respectively.
10487
10488 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10489 sectors. It was not used anyway.
10490
09fc77a7 104912005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10492
10493 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10494 `unused parameter' warning.
10495
003789c7 104962005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10497
10498 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10499 function.
10500 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10501 getcharwidth.
10502
67f44c86 105032005-08-28 Marco Gerards <metgerards@student.han.nl>
10504
10505 * include/grub/normal.h (enum grub_completion_type): Added
10506 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10507
10508 * normal/cmdline.c (print_completion): Handle
10509 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10510 * normal/menu_entry.c (store_completion): Likewise.
10511
10512 * normal/completion.c (complete_arguments): New function.
10513 (grub_normal_do_completion): Call `complete_arguments' when the
10514 current words start with a dash.
10515
0b5abe02 105162005-08-27 Marco Gerards <metgerards@student.han.nl>
10517
10518 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10519 `gzio.mod' instead of `io.mod').
10520
d9864ee1 105212005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10522
10523 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10524 (DISTDIRS): Added io and video.
10525 Rewrite the search routine to make an output consistently.
10526
10527 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10528 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10529 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10530 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10531 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10532 util/powerpc/ieee1275/misc.c.
f19dbdb7 10533
d9864ee1 10534 * include/grub/gzio.h: New file.
10535 * io/gzio.c: Likewise.
f19dbdb7 10536
d9864ee1 10537 * kern/file.c (grub_file_close): Call grub_device_close only if
10538 FILE->DEVICE is not NULL.
10539
10540 * include/grub/mm.h [!NULL] (NULL): New macro.
10541
10542 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10543
10544 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10545 (pkgdata_MODULES): Added gzio.mod.
10546 (gzio_mod_SOURCES): New variable.
10547 (gzio_mod_CFLAGS): Likewise.
10548
10549 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10550 (pkgdata_MODULES): Added gzio.mod.
10551 (gzio_mod_SOURCES): New variable.
10552 (gzio_mod_CFLAGS): Likewise.
10553
10554 * commands/cat.c: Include grub/gzio.h.
10555 (grub_cmd_cat): Use grub_gzfile_open instead of
10556 grub_file_open.
f19dbdb7 10557
d9864ee1 10558 * commands/cmp.c: Include grub/gzio.h.
10559 (grub_cmd_cmp): Use grub_gzfile_open instead of
10560 grub_file_open.
10561
10562 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10563 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10564 grub_file_open.
10565 (grub_rescue_cmd_module): Likewise.
10566
fa46f4b5 105672005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10568
10569 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10570 kern/sparc64/ieee1275/init.c because it contains _start.
10571 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10572
e9211b5d 105732005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10574
10575 * configure.ac: Add support for sparc64 host with ieee1275
10576 firmware.
10577 * configure: Generated from configure.ac.
10578 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10579 instead of int.
10580 (grub_ofdisk_read): Likewise.
10581 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10582 pointers as (void *) to remove a warning.
10583 (grub_ofdisk_close): Likewise.
10584 (grub_ofdisk_read): Likewise.
10585 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10586 returns, so make it return void to remove a warning.
10587 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10588 Corresponding prototype change.
10589 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10590 values, and cast the pointers as (void *) to remove a warning.
10591 (grub_mm_dump): Likewise.
10592 * conf/sparc64-ieee1275.mk: New file.
10593 * conf/sparc64-ieee1275.rmk: Likewise.
10594 * include/grub/sparc64/setjmp.h: Likewise.
10595 * include/grub/sparc64/types.h: Likewise.
10596 * include/grub/sparc64/ieee1275/console.h: Likewise.
10597 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10598 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10599 * include/grub/sparc64/ieee1275/time.h: Likewise.
10600 * kern/sparc64/cache.c: Likewise.
10601 * kern/sparc64/dl.c: Likewise.
10602 * kern/sparc64/ieee1275/init.c: Likewise.
10603 * kern/sparc64/ieee1275/openfw.c: Likewise.
10604
385c6a92 106052005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10606
10607 * util/console.c (grub_ncurses_putchar): If C is greater than
10608 0x7f, set C to a question mark.
10609 (grub_ncurses_getcharwidth): New function.
10610 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10611 getcharwidth.
10612
10613 * normal/menu.c (print_entry): Made aware of Unicode. First,
10614 convert TITLE to UCS-4, and predict the cursor position by
10615 grub_getcharwidth.
10616
10617 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10618 const to SRC.
10619 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10620
16ccb8b1 106212005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10622
10623 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10624 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10625 grub_strcat.
10626
10627 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10628 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10629 grub_strcpy and grub_strlen. Take it into account that a space
10630 character is inserted as a delimiter.
10631
6a85ce79 106322005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10633
10634 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 10635 invalid magic in the error.
6a85ce79 10636
10637 * commands/search.c: New file.
f19dbdb7 10638
6a85ce79 10639 * util/grub-emu.c (main): Call grub_search_init and
10640 grub_search_fini.
10641
10642 * kern/rescue.c (grub_rescue_print_disks): Removed.
10643 (grub_rescue_print_devices): New function.
10644 (grub_rescue_cmd_ls): Use grub_device_iterate with
10645 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10646 grub_rescue_print_disks.
10647
10648 * kern/partition.c (grub_partition_iterate): Return the result of
10649 PARTMAP->ITERATE instead of GRUB_ERRNO.
10650
10651 * kern/device.c: Include grub/partition.h.
10652 (grub_device_iterate): New function.
10653
10654 * include/grub/partition.h (grub_partition_iterate): Return int
10655 instead of grub_err_t.
10656
10657 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10658 prototype.
10659 [GRUB_UTIL] (grub_search_fini): Likewise.
10660
10661 * include/grub/device.h (grub_device_iterate): New prototype.
10662
10663 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10664 commands/search.c.
10665 (pkgdata_MODULES): Added search.mod.
10666 (search_mod_SOURCES): New variable.
10667 (search_mod_CFLAGS): Likewise.
10668
10669 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10670 (pkgdata_MODULES): Added search.mod.
10671 (search_mod_SOURCES): New variable.
10672 (search_mod_CFLAGS): Likewise.
10673
10674 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10675 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10676 All callers changed.
10677
10678 * DISTLIST: Added commands/search.c.
10679
ef095434 106802005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10681
10682 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10683 conversion.
10684 (grub_getcharwidth): New function.
10685
10686 * kern/misc.c (grub_utf8_to_ucs4): New function.
10687
10688 * include/grub/term.h (struct grub_term): Added a new member
10689 "getcharwidth".
10690 (grub_getcharwidth): New prototype.
10691
10692 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10693
10694 * term/i386/pc/console.c (map_char): New function. Segregated from
10695 grub_console_putchar.
10696 (grub_console_putchar): Use map_char.
10697 (grub_console_getcharwidth): New function.
10698 (grub_console_term): Specified grub_console_getcharwidth as
10699 getcharwidth.
10700
10701 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10702 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10703
10704 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10705 GRUB_ERRNO.
10706 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10707 on grub_strtoul completely.
10708 (write_char): Declare local variables in the beginning of the
10709 function.
10710 (grub_vesafb_getcharwidth): New function.
10711 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10712 getcharwidth.
10713
1f0a95e4 107142005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10715
10716 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10717 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10718 commands/i386/pc/vbetest.c.
10719
10720 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10721 call grub_vbe_get_controller_info again, because the returned
10722 information is volatile.
10723 (grub_vbe_set_video_mode): Mostly rewritten.
10724 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10725 grub_vbe_status_t correctly.
10726 (grub_vbe_get_video_mode_info): Likewise.
10727 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10728 several if statements.
10729
10730 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10731 * commands/i386/pc/vbeinfo.c: ... this.
10732
10733 * commands/i386/pc/vbe_test.c: Renamed to ...
10734 * commands/i386/pc/vbetest.c: ... this.
10735
10736 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10737 ...
10738 (grub_cmd_vbeinfo): ... this. Save video modes before
10739 iterating. Skip a video mode, if it is not available, not enough
10740 information is given or it is monochrome. Show the memory
10741 model. Leave the interpretation of MODEVAR to grub_strtoul
10742 completely.
10743 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10744 (GRUB_MOD_FINI): Likewise.
10745
10746 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10747 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10748 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10749 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10750 grub_strtoul completely.
10751 (real2pm): Removed.
10752 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10753 (GRUB_MOD_FINI): Likewise.
10754
10755 * normal/misc.c: Include grub/mm.h.
10756
10757 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10758 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10759 (vbe_list_modes_mod_SOURCES): Removed.
10760 (vbe_list_modes_mod_CFLAGS): Likewise.
10761 (vbe_test_mod_SOURCES): Likewise.
10762 (vbe_test_mod_CFLAGS): Likewise.
10763 (vbeinfo_mod_SOURCES): New variable.
10764 (vbeinfo_mod_CFLAGS): Likewise.
10765 (vbetest_mod_SOURCES): Likewise.
10766 (vbetest_mod_CFLAGS): Likewise.
10767
992ffbbe 107682005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10769
10770 * normal/misc.c: New file.
10771
10772 * DISTLIST: Added normal/misc.c.
f19dbdb7 10773
992ffbbe 10774 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10775 DISK to HOOK. Call HOOK with DISK.
10776 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10777 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10778 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10779
10780 * normal/menu_entry.c (struct screen): Added a new member
10781 "completion_shown".
10782 (completion_buffer): New global variable.
10783 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10784 (store_completion): New function.
10785 (complete): Likewise.
10786 (clear_completions): Likewise.
10787 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10788 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10789 a tab, call complete.
10790
10791 * normal/completion.c (disk_dev): Removed.
10792 (print_simple_completion): Likewise.
10793 (print_partition_completion): Likewise.
10794 (print_func): New global variable.
10795 (add_completion): Do not take the arguments WHAT or PRINT any
10796 longer. Added a new argument TYPE. Instead of printing directly,
10797 call PRINT_FUNC if not NULL.
10798 All callers changed.
10799 (complete_device): Use a local variable DEV instead of
10800 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10801 (grub_normal_do_completion): Take a new argument HOOK. Do not
10802 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10803 empty string, return NULL instead.
10804 All callers changed.
10805
10806 * normal/cmdline.c (print_completion): New function.
10807
10808 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10809 to HOOK.
10810 All callers changed.
10811
10812 * kern/disk.c (grub_print_partinfo): Removed.
10813
10814 * include/grub/partition.h (struct grub_partition_map): Add a new
10815 argument DISK into HOOK of ITERATE.
10816 (grub_partition_iterate): Add a new argument DISK to HOOK.
10817
10818 * include/grub/normal.h (enum grub_completion_type): New enum.
10819 (grub_completion_type_t): New type.
10820 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10821 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10822 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10823 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10824 (grub_normal_do_completion): Added a new argument HOOK.
10825 (grub_normal_print_device_info): New prototype.
10826
10827 * include/grub/disk.h (grub_print_partinfo): Removed.
10828
10829 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10830 (normal_mod_SOURCES): Likewise.
10831 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10832 (normal_mod_SOURCES): Likewise.
10833
10834 * commands/ls.c (grub_ls_list_disks): Use
10835 grub_normal_print_device_info instead of grub_print_partinfo. Free
10836 PNAME.
10837 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10838 duplicating the code.
10839
0bd41162 108402005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10841
10842 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 10843 follow GCS more precisely.
10844 * commands/i386/pc/vbe_test.c: Likewise.
10845 * include/grub/i386/pc/vbe.h: Likewise.
10846 * term/i386/pc/vesafb.c: Likewise.
10847 * video/i386/pc/vbe.c: Likewise.
0bd41162 10848
6323696a 108492005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10850
10851 * DISTLIST: Added term/i386/pc/vesafb.c
10852 DISTLIST: Added video/i386/pc/vbe.c
10853 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10854 DISTLIST: Added commands/i386/pc/vbe_test.c.
10855 * commands/i386/pc/vbe_list_modes.c: New file.
10856 * commands/i386/pc/vbe_test.c: Likewise.
10857 * term/i386/pc/vesafb.c: Likewise.
10858 * video/i386/pc/vbe.c: Likewise.
10859 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10860 (grub_vbe_probe) Added prototype.
10861 (grub_vbe_set_video_mode) Likewise.
10862 (grub_vbe_get_video_mode) Likewise.
10863 (grub_vbe_get_video_mode_info) Likewise.
10864 (grub_vbe_set_pixel_rgb) Likewise.
10865 (grub_vbe_set_pixel_index) Likewise.
10866 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10867 (pkgdata_MODULES): Added vesafb.mod.
10868 (pkgdata_MODULES): Added vbe_list_modes.mod.
10869 (pkgdata_MODULES): Added vbe_test.mod.
10870 (vbe_mod_SOURCES): Added.
10871 (vbe_mod_CFLAGS): Likewise.
10872 (vesafb_mod_SOURCES): Likewise.
10873 (vesafb_mod_CFLAGS): Likewise.
10874 (vbe_list_modes_mod_SOURCES): Likewise.
10875 (vbe_list_modes_mod_CFLAGS): Likewise.
10876 (vbe_test_mod_SOURCES): Likewise.
10877 (vbe_test_mod_CFLAGS): Likewise.
10878
0a74e62f 108792005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10880
0a74e62f 10881 * normal/command.c (grub_command_execute): If INTERACTIVE is
10882 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10883 CMDLINE. Disable the pager if INTERACTIVE is true.
10884 All callers are changed.
10885
10886 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10887 before reading a config file.
10888 * normal/main.c (read_config_file): Even if a command is not
10889 found, register it if it is within an entry.
10890
10891 * util/grub-emu.c: Include sys/types.h and unistd.h.
10892 (options): Added --hold.
10893 (struct arguments): Added a new member "hold".
10894 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10895 missing.
10896 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10897 cleared by a debugger, if it is not zero.
10898
10899 * include/grub/normal.h (grub_command_execute): Add an argument
10900 INTERACTIVE.
10901
e51f85ae 109022005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10903
10904 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10905
e9c6f39b 109062005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10907
10908 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10909 program with another one, because the old one didn't detect a bug
10910 in gcc-3.4. Always use regparm 2, because the new test is still
10911 not enough for gcc-4.0. Someone must investigate a simple test
10912 case which detects a bug in gcc-4.0.
10913
8de3495c 109142005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10915
10916 * DISTLIST: Added normal/completion.c.
10917
10918 * normal/completion.c: New file.
f19dbdb7 10919
8de3495c 10920 * term/i386/pc/console.c (grub_console_getwh): New function.
10921 (grub_console_term): Assign grub_console_getwh to getwh.
10922
10923 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10924 function is defined in normal/completion.c as
10925 grub_normal_do_completion.
10926 (grub_cmdline_get): Use grub_normal_do_completion instead of
10927 grub_tab_complete.
10928
10929 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10930 returns non-zero, otherwise return 0.
10931 (grub_partition_iterate): First, probe the partition map. Then,
10932 call ITERATE only for this partition map.
10933
10934 * kern/misc.c (grub_strncmp): Rewritten.
10935
10936 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10937 returns non-zero. Otherwise return 0.
10938
10939 * include/grub/partition.h (grub_partition_map_iterate): Return
10940 int instead of void.
10941
10942 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10943
10944 * include/grub/misc.h (grub_strncmp): Change the type of N to
10945 grub_size_t.
10946
10947 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10948 of void.
10949
10950 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 10951 unsigned explicitly before comparing it with I.
8de3495c 10952
10953 * kern/main.c (grub_env_write_root): Add the attribute unused into
10954 VAR.
10955
10956 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10957 normal/completion.c.
10958 (normal_mod_SOURCES): Likewise.
10959 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10960 (normal_mod_SOURCES): Likewise.
10961
10962 * normal/command.c (grub_iterate_commands): If ITERATE returns
10963 non-zero, return one immediately.
10964
e85e144b 109652005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10966
10967 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10968 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10969 descriptions.
10970 (grub_vbe_get_controller_info): New function.
10971 (grub_vbe_get_mode_info): Likewise.
10972 (grub_vbe_set_mode): Likewise.
10973 (grub_vbe_get_mode): Likewise.
10974 (grub_vbe_set_memory_window): Likewise.
10975 (grub_vbe_get_memory_window): Likewise.
10976 (grub_vbe_set_scanline_length): Likewise.
10977 (grub_vbe_get_scanline_length): Likewise.
10978 (grub_vbe_set_display_start): Likewise.
10979 (grub_vbe_get_display_start): Likewise.
10980 (grub_vbe_set_palette_data): Likewise.
10981 * include/grub/i386/pc/vbe.h: New file.
10982
c46153d2 109832005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10984
10985 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10986 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10987 * DISTLIST: Likewise.
10988 * kern/ieee1275/of.c: Moved to ...
10989 * kern/ieee1275/ieee1275.c: ... here.
10990
0cb90c45 109912005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10992
10993 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10994 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10995 Pass 0 as `end' parameter to grub_strtoul().
10996
a19fb360 109972005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10998
10999 * include/grub/powerpc/ieee1275/console.h: Do not include
11000 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11001 ifdef.
11002 (grub_console_cur_color): Remove i386-specific prototype.
11003 (grub_console_real_putchar): Likewise.
11004 (grub_console_checkkey): Likewise.
11005 (grub_console_getkey): Likewise.
11006 (grub_console_getxy): Likewise.
11007 (grub_console_gotoxy): Likewise.
11008 (grub_console_cls): Likewise.
11009 (grub_console_setcursor): Likewise.
11010 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11011 Include <grub/machine/console.h>.
11012 * term/ieee1275/ofconsole.c: Likewise.
11013
4ac9bd04 110142005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11015
11016 * Makefile.in (LIBLZO): New variable.
11017
11018 * configure.ac: Check for LZO version 2.
11019
11020 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11021 lzo/lzo1x.h instead of lzo1x.h.
11022
11023 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11024 of -llzo.
11025
11026 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11027 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11028
11029 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11030 copying the data from PARTITION to P.
11031
f4917dfd 110322005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11033
11034 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11035 negative, unload the module.
11036
11037 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11038 map is "pc_partition_map" but not "pc".
11039 (usage): Fix the description. The options are --boot-image and
11040 --core-image but not --boot-file or --core-file.
11041 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11042 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11043 DEFAULT_DIRECTORY.
11044
11045 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11046 --core-file. Specify INSTALL_DEVICE as an argument.
11047
11048 * util/console.c: Include config.h.
11049 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11050 [HAVE_NCURSES_H]: Include ncurses.h.
11051 [HAVE_CURSES_H]: Include curses.h.
11052 [!A_NORMAL] (A_NORMAL): Defined as zero.
11053 [!A_STANDOUT] (A_STANDOUT): Likewise.
11054
11055 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11056 -lncurses.
11057 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11058
11059 * configure.ac: Check for curses libraries and headers.
11060
11061 * Makefile.in (LIBCURSES): New variable.
11062
11063 * genmk.rb (Script::rule): Set the executable bits.
11064
11065 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11066 name of the PC partition map is "pc_partition_map" but not "pc".
11067
0e143073 110682005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11069
11070 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11071 (modules): Likewise.
11072 (usage): Added descriptions for --modules and --grub-probefs.
11073 Handle --modules and --grub-probefs. Save the arguments in MODULES
11074 and GRUB_PROBEFS, respectively.
11075 Auto-detect a filesystem module against GRUBDIR. If the result is
11076 empty and modules are not specified explicitly, abort the
11077 installation. Add the result to MODULES.
11078
11079 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11080 disk/powerpc/ieee1275/ofdisk.c,
11081 include/grub/powerpc/ieee1275/init.h and
11082 term/powerpc/ieee1275/ofconsole.c.
11083 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11084 term/ieee1275/ofconsole.c.
11085
11086 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11087
11088 * COPYING: Upgraded to the latest version. Only the address of the
11089 FSF office has changed.
f19dbdb7 11090
efd6e6d5 110912005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11092
11093 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11094 kern/ieee1275.c with kern/ieee1275/of.c.
11095
11096 * kern/ieee1275.c: Moved to ...
11097 * kern/ieee1275/of.c: ... here.
11098
8ceafda2 110992005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11100
11101 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 11102 readability.
8ceafda2 11103
11104 * config.guess: Updated to the latest version from gnulib.
11105 * config.sub: Likewise.
11106 * install.sh: Likewise.
11107 * mkinstalldirs: Likewise.
11108
11109 * include/grub/console.h: Removed. This file is arch-specific. Do
11110 not put this in include/grub.
11111
11112 * include/grub/i386/pc/console.h: Resurrected.
11113
11114 * util/console.c: Include grub/machine/console.h instead of
11115 grub/console.h.
11116 * util/grub-emu.c: Likewise.
11117
267f6cd9 111182005-08-04 Marco Gerards <metgerards@student.han.nl>
11119
11120 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11121 hardcoded value.
f19dbdb7 11122
267f6cd9 11123 From Vincent Pelletier <subdino2004@yahoo.fr>
11124 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11125 Redefined to use grub_getwh.
11126 (grub_term): New member named getwh.
11127 (grub_getwh): New prototype.
11128 * kern/term.c (grub_getwh): New function.
11129 * term/i386/pc/console.c (grub_console_getwh): New function.
11130 (grub_console_term): New member `getwh'.
11131 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11132 (grub_vga_term): New member `getwh'.
0b5abe02 11133 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 11134 grub_ssize_t.
11135 (grub_ofconsole_getw): New function.
11136 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11137 (grub_ofconsole_term): New field named getwh and new initial
11138 value.
11139
3be7266d 111402005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11141
11142 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11143 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11144 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11145 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11146 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11147 of <grub/machine/ieee1275.h>.
11148 * commands/ieee1275/reboot.c: Likewise.
11149 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11150 * kern/ieee1275.c: ... to here. All users updated. Change all
11151 parameter structs to use new type `grub_ieee1275_cell_t'.
11152 * term/powerpc/ieee1275/ofconsole.c: Move ...
11153 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11154 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11155 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11156 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11157 to return int.
11158 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11159 Remove unused prototypes. All users updated.
11160 * include/grub/powerpc/ieee1275/console.h: Removed.
11161 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11162 `grub_ieee1275_cell_t'.
11163 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11164 Cast comparisons with -1 to the correct type.
11165 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11166 type to match `grub_ieee1275_entry_fn'.
11167
8b5f3938 111682005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11169
11170 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11171
11172 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11173 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11174 partmap/sun.c.
11175 (grub_probefs_SOURCES): New variable.
11176
11177 * util/i386/pc/grub-probefs.c: New file.
11178
11179 * util/i386/pc/grub-setup.c (main): Call
11180 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11181 grub_hfs_init and grub_jfs_init to initialize the system. Call
11182 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11183 grub_pc_partition_map_fini to finish the system.
11184
ea409713 111852005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11186
11187 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11188 function.
11189 (grub_multiboot_load_elf32): Likewise.
11190 (grub_multiboot_is_elf64): Likewise.
11191 (grub_multiboot_load_elf64): Likewise.
11192 (grub_multiboot_load_elf): Likewise.
11193 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11194 an ELF32 or ELF64 file.
11195 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11196
11197 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11198 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11199 NULL before calling FS->LABEL.
11200 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11201 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11202 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11203 before calling FS->LABEL.
11204
141a288b 112052005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11206
11207 * util/i386/pc/grub-install.in (datadir): New variable.
11208 (libdir): Removed.
11209 (pkgdatadir): New variable.
11210 (pkglibdir): Removed.
11211
0d5f8a54 112122005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11213
11214 * DISTLIST: Added util/i386/pc/grub-install.in.
11215
11216 * util/i386/pc/grub-install.in: New file.
11217
11218 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11219 (grub_install_SOURCES): Likewise.
11220
11221 * genmk.rb: Added support for scripts.
11222 (Script): New class.
11223 (scripts): New variable.
11224
11225 * Makefile.in (install-local): Install sbin_SCRIPTS by
11226 INSTALL_SCRIPT.
11227 (uninstall): Remove sbin_SCRIPTS.
11228
11229 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11230 device, try to get a GRUB device by
11231 grub_util_biosdisk_get_grub_dev.
11232 Free DEST_DEV.
11233
11234 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11235 description for --device-map.
11236
5f968e1e 112372005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11238
11239 Change the semantics of variable hooks. They now return strings
11240 instead of error values.
f19dbdb7 11241
5f968e1e 11242 * util/i386/pc/grub-setup.c: Include grub/env.h.
11243 (setup): Use grub_device_set_root instead of grub_env_set.
11244
11245 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11246 grub_env_get instead of grub_device_set_root and
11247 grub_device_get_root, respectively.
11248
11249 * kern/main.c (grub_env_write_root): New function.
11250 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11251 grub_env_set instead of grub_device_set_root.
11252
11253 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11254 many variables.
11255 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11256 rather than calling ENV->WRITE_HOOK afterwards.
11257 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11258 passing a pointer of a pointer.
11259 (grub_register_variable_hook): Change the types of "read_hook" and
11260 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11261 respectively.
11262 Allocate the default empty string on the heap, because this string
11263 may be freed later.
11264
11265 * kern/device.c: Include grub/env.h.
11266 (grub_device_set_root): Removed.
11267 (grub_device_get_root): Likewise.
11268 (grub_device_open): Use grub_env_get instead of
11269 grub_device_get_root.
11270
11271 * include/grub/env.h (grub_env_read_hook_t): New type.
11272 (grub_env_write_hook_t): Likewise.
11273 (grub_env_var): Change the types of "read_hook" and "write_hook"
11274 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11275 (grub_register_variable_hook): Likewise.
11276
11277 * include/grub/device.h (grub_device_set_root): Removed.
11278 (grub_device_set_root): Likewise.
11279
11280 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11281 make sure that DIRNAME terminates with '/', so that
11282 grub_fat_find_dir will fail if PATH is not a directory.
11283
11284 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11285 from DIRNAME.
11286 Use the qualifier auto for print_files and print_files_long.
11287 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11288 as a regular file.
11289 Put a newline only if there is no error.
11290 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11291 used.
11292
896f0afd 112932005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11294
11295 * kern/partition.c (grub_partition_probe): Initialize PART to
11296 NULL. Otherwise, when no partition map is registered, this returns
11297 a garbage.
11298
b28b81b2 112992005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11300
11301 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11302 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11303 valid.
11304
5f3607e0 113052005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11306
11307 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11308 information on each device, if it does not have partitions. Print
11309 "Device" instead of "Disk", because this function is not specific
11310 to disk devices.
11311
11312 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11313 static to ensure that it is put on the memory rather than a
11314 register.
11315
502c87e8 113162005-07-17 Yoshinori Okuji <okuji@enbug.org>
11317
11318 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11319 (grub_cat_init): Likewise.
11320 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11321 (options): Likewise.
11322 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11323 (grub_configfile_init): Likewise.
11324 * font/manager.c (GRUB_MOD_INIT): Likewise.
11325 * commands/help.c (GRUB_MOD_INIT): Likewise.
11326 (grub_help_init): Likewise.
11327 * normal/command.c (grub_command_init): Likewise.
11328 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11329 * disk/loopback.c (grub_loop_init): Likewise.
11330 (GRUB_MOD_INIT): Likewise.
11331 * commands/ls.c (grub_ls_init): Likewise.
11332 (GRUB_MOD_INIT): Likewise.
11333 (options): Likewise.
11334 * commands/boot.c (grub_boot_init): Likewise.
11335 (GRUB_MOD_INIT): Likewise.
11336 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11337 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11338 (GRUB_MOD_INIT): Likewise.
11339 * commands/cmp.c (grub_cmp_init): Likewise.
11340 (GRUB_MOD_INIT): Likewise.
11341
11342 * normal/arg.c: Use <> instead of "" to include header files.
11343 (SHORT_ARG_HELP): New macro.
11344 (SHORT_ARG_USAGE): Likewise.
11345 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11346 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11347 descriptions.
11348 (find_short): Check if C is 'h' or 'u' explicitly.
11349 (grub_arg_show_help): Use space characters instead of tabs. Treat
11350 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11351 are shown with --help and --usage only if they are not used for
11352 the command itself.
11353 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11354 'h' and 'u'.
11355
11356 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11357 const into "longarg". Change the type of "shortarg" to int.
11358
f806d18e 113592005-07-17 Yoshinori Okuji <okuji@enbug.org>
11360
11361 * boot/i386/pc/boot.S (boot_drive_check): New label.
11362
11363 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11364 macro.
11365
11366 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11367 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11368
e293232b 113692005-07-17 Yoshinori Okuji <okuji@enbug.org>
11370
11371 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11372 When turning off Gate A20, skip the check and return immediately,
11373 because this is not fatal usually.
11374
ebedfd00 113752005-07-17 Yoshinori Okuji <okuji@enbug.org>
11376
11377 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11378 be 0x7C00 instead of 0x8000.
11379
11380 * boot/i386/pc/pxeboot.S: Rewritten.
11381
11382 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11383 EXT_C.
11384 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11385 result.
11386
654fc59f 113872005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11388
11389 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11390 robustness. This routine now supports a BIOS call and System
11391 Control Port A to modify the gate A20.
11392
11393 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11394 Increased to 0x440.
11395
09f9923f 113962005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11397
11398 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11399 device path and resulting ihandle.
11400 (grub_ofdisk_close): dprintf the ihandle being closed.
11401 (grub_ofdisk_read): dprintf function parameters.
11402 * kern/mm.c (grub_mm_init_region): Likewise.
11403 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11404 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11405 size, and boot arguments.
11406 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11407 before loading into memory.
11408 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11409 before loading into memory.
11410
7ef504d8 114112005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11412
11413 * kern/mm.c: Added much documentation.
11414 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11415 8, set to 5 instead of 8.
11416
e0f050c2 114172005-07-10 Yoshinori Okuji <okuji@enbug.org>
11418
11419 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11420
11421 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11422 (grub_mkdevicemap_SOURCES): New variable.
11423
11424 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11425 lib/device.c of GRUB Legacy.
11426
7224189a 114272005-07-10 Yoshinori Okuji <okuji@enbug.org>
11428
11429 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11430 instead of PATH is NULL.
11431
68c864eb 114322005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11433
11434 * commands/cmp.c (BUFFER_SIZE): New macro.
11435 (grub_cmd_cmp): Close the right file at the right time. Compare
11436 only data just read. Don't report files of different size as
11437 identical. Dynamically allocate buffers. Move variable
11438 declarations at the beginning of function.
11439
e6f3e614 114402005-07-09 Yoshinori Okuji <okuji@enbug.org>
11441
11442 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11443 reverse.
11444
f8f1559a 114452004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11446
11447 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11448 when backspace is pressed at beginning of line.
11449
39c9d41d 114502005-07-03 Yoshinori Okuji <okuji@enbug.org>
11451
11452 * DISTLIST: Added genfslist.sh.
11453
11454 * normal/main.c (fs_module_list): New variable.
11455 (autoload_fs_module): New function.
11456 (read_fs_list): Likewise.
11457 (grub_normal_execute): Call read_fs_list.
11458
11459 * kern/fs.c (grub_fs_autoload_hook): New variable.
11460 (grub_fs_probe): Added support for auto-loading.
11461
11462 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11463 (grub_fs_module_list_t): New type.
11464
11465 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11466 (grub_fs_autoload_hook): New prototype.
11467
11468 * genfslist.sh: New file.
f19dbdb7 11469
39c9d41d 11470 * genmk.rb: Added a rule to generate a filesystem list.
11471
121c1d83 114722005-06-30 Marco Gerards <metgerards@student.han.nl>
11473
11474 * configure.ac: Fix the test for cross-compiling.
11475
11476 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11477 define GRUB_UTIL anymore.
11478
11479 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11480 so this function works on other systems than just big endian.
11481 (load_modules): Likewise.
11482 (add_segments): Likewise.
11483
e75d76e1 114842005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11485
11486 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11487 contains `l' modifier, get a long from va_arg().
11488
50b5a0a7 114892005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11490
11491 * kern/mm.c (grub_free): If the next free block which is being
11492 merged is the first free block, set the first block to the block
11493 being freed.
11494 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11495
89371b20 114962005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11497
11498 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11499 `grub_ieee1275_chosen'.
11500
168d6e58 115012005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11502
11503 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11504 (grub_ieee1275_chosen): New variable.
11505 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11506 `chosen'.
11507 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11508 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11509 Rename first argument to `phandle' for consistency.
11510 (grub_ieee1275_get_property_length): Likewise.
11511 (grub_ieee1275_next_property): Likewise. Change type of first argument
11512 to grub_ieee1275_phandle_t.
11513 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11514 Move export next to declaration.
11515 (grub_ieee1275_chosen): New variable.
11516 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11517 Correct cosmetic typo.
11518 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11519 `grub_ieee1275_chosen'.
11520 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11521 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11522 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11523 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11524 `grub_ieee1275_chosen'.
11525
ca5baa3f 115262005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11527
11528 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11529 /chosen/bootargs.
11530 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11531 /chosen/bootargs as "variable=value" pairs.
11532
708b345f 115332005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11534
11535 * include/grub/misc.h (grub_dprintf): New macro.
11536 (grub_real_dprintf): New prototype.
11537 (grub_strword): Likewise.
11538 (grub_iswordseparator): Likewise.
11539 * kern/misc.c (grub_real_dprintf): New function.
11540 (grub_strword): Likewise.
11541 (grub_iswordseparator): Likewise.
11542
f4c5e67c 115432005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11544
11545 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11546 (roundup): Remove macro.
11547 (grub_ieee1275_flags): Make static.
11548 (grub_ieee1275_realmode): Remove.
11549 (grub_ieee1275_test_flag): New function.
11550 (grub_ieee1275_set_flag): Likewise.
11551 (find_options): Rename to `grub_ieee1275_find_options'; update
11552 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11553 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11554 (cmain): New prototype.
11555 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11556 `grub_ieee1275_flags' directly.
11557 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11558 machine/biosdisk.h.
11559 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11560 Don't include grub/machine/init.h.
11561 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11562 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11563 Remove prototype.
11564 (grub_ieee1275_realmode): Likewise.
11565 (grub_ieee1275_flag): New enum.
11566 (grub_ieee1275_test_flag): New prototype.
11567 (grub_ieee1275_set_flag): New prototype.
11568 * include/grub/powerpc/ieee1275/init.h: Remove file.
11569 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11570 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11571 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11572 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11573 comment.
11574 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11575 `grub_ieee1275_test_flag'.
11576 (grub_ieee1275_encode_devname): Likewise.
11577
ed16607e 115782005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11579
11580 * include/grub/powerpc/ieee1275/ieee1275.h
11581 (grub_ieee1275_encode_devname): New prototype.
11582 (grub_ieee1275_get_filename): Likewise.
11583 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11584 function.
11585 (grub_set_prefix): Likewise.
11586 (grub_machine_init): Call grub_set_prefix.
11587 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11588 (grub_parse_type): New enum.
11589 (grub_ieee1275_get_devargs): New function.
11590 (grub_ieee1275_get_devname): Likewise.
11591 (grub_ieee1275_parse_args): Likewise.
11592 (grub_ieee1275_get_filename): Likewise.
11593 (grub_ieee1275_encode_devname): Likewise.
11594
be369920 115952005-03-30 Marco Gerards <metgerards@student.han.nl>
11596
11597 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11598 `grub_loader_unset'.
11599
a5ce3a4a 116002005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11601
11602 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11603 instead of grub_ieee1275_interpret.
11604 (grub_halt_init): New function.
11605 (grub_halt_fini): Likewise.
11606 (GRUB_MOD_INIT): Correct message grammar.
11607 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11608 instead of grub_ieee1275_interpret.
11609 (grub_reboot_init): New function.
11610 (grub_reboot_fini): Likewise.
11611 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11612 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11613 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11614 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11615 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11616 function.
11617 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11618 Add prototype.
11619 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11620 prototype.
11621 (grub_halt): Likewise.
11622 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11623 (cmain): Remove __attribute__((unused)).
11624 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11625 (grub_heap_len): Likewise.
11626 (grub_machine_fini): New function.
11627 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11628 (grub_halt): Likewise.
11629 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11630 function.
11631 * util/powerpc/ieee1275/misc.c: New file.
11632
0058f771 116332005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11634
11635 * DISTLIST: New file.
11636 * gendistlist.sh: Likewise.
f19dbdb7 11637
0058f771 11638 * Makefile.in (COMMON_DISTFILES): Removed.
11639 (BOOT_DISTFILES): Likewise.
11640 (CONF_DISTFILES): Likewise.
11641 (DISK_DISTFILES): Likewise.
11642 (FS_DISTFILES): Likewise.
11643 (INCLUDE_DISTFILES): Likewise.
11644 (KERN_DISTFILES): Likewise.
11645 (LOADER_DISTFILES): Likewise.
11646 (TERM_DISTFILES): Likewise.
11647 (UTIL_DISTFILES): Likewise.
11648 (DISTFILES): Likewise.
11649 (uninstall): Uninstall files in $(pkgdata_DATA).
11650 (DISTLIST): New target.
11651 (distdir): Use the contents of the file DISTLIST to get a list of
11652 distributed files.
11653
46b3b8a5 116542005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11655
11656 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11657 descriptor. This is ported from GRUB Legacy.
11658
11659 * gencmdlist.sh: Added an extra semicolon to make it work with
11660 old sed versions. Reported by Robert Bihlmeyer
11661 <robbe@orcus.priv.at>.
11662
5822ff87 116632005-03-08 Yoshinori Okuji <okuji@enbug.org>
11664
11665 Automatic loading of commands is supported.
f19dbdb7 11666
5822ff87 11667 * normal/main.c (read_command_list): New function.
11668 (grub_normal_execute): Call read_command_list.
11669
11670 * normal/command.c (grub_register_command): Return zero or CMD.
11671 Allocate CMD->NAME from the heap.
11672 Initialize CMD->MODULE_NAME to zero.
11673 Find the same name as well. If the same command is found and it is
11674 a dummy command, overwrite members. If it is not a dummy command,
11675 return zero.
11676 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11677 (grub_command_find): If a dummy command is found, load a module
11678 and retry to find a command only once.
11679
11680 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11681 make sure that each command is loaded.
11682
11683 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11684 macro.
11685 (struct grub_command): Remove const from the member `name'.
11686 Add a new member `module_name'.
11687 (grub_register_command): Return grub_command_t.
11688
11689 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11690 sure that each command is loaded.
11691
11692 * genmk.rb (PModule::rule): Specify a module name without the
11693 suffix ".mod" to gencmdlist.sh.
11694
7b1f4b57 116952005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11696
11697 * gencmdlist.sh: New file.
f19dbdb7 11698
7b1f4b57 11699 * genmk.rb (PModule::rule): Generate a rule for a command list.
11700 Clean command.lst.
11701 Generate command.lst from $(COMMANDFILES).
11702
11703 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11704 (DATA): Added $(pkgdata_DATA).
11705 (install-local): Install files in $(pkgdata_DATA).
11706
062aaf39 117072005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11708
11709 * term/i386/pc/vga.c (debug_command): Removed.
11710 (GRUB_MOD_INIT): Do not register the command "debug".
11711
11712 From Hollis Blanchard:
11713 * commands/configfile.c: New file.
11714 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11715 commands/configfile.c.
11716 (pkgdata_MODULES): Added configfile.mod.
11717 (configfile_mod_SOURCES): New variable.
11718 (configfile_mod_CFLAGS): Likewise.
11719 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11720 commands/configfile.c.
11721 (pkgdata_MODULES): Added configfile.mod.
11722 (configfile_mod_SOURCES): New variable.
11723 (configfile_mod_CFLAGS): Likewise.
11724 * util/grub-emu.c (main): Call grub_configfile_init and
11725 grub_configfile_fini.
11726 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11727 prototype.
11728 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 11729
cee01aa6 117302005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11731
11732 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11733 address.
11734
11735 * commands/help.c (grub_cmd_help): Do not print newlines after
11736 the last command in print_command_help.
11737
93f3a1d8 117382005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11739
11740 * commands/default.h: New file.
11741 * commands/timeout.h: Likewise.
11742 * normal/context.c: Likewise.
f19dbdb7 11743
93f3a1d8 11744 * util/misc.c: Do not include sys/times.h.
11745 Include sys/time.h and grub/machine/time.h.
11746 (grub_get_rtc): Rewritten with gettimeofday.
11747
11748 * util/grub-emu.c (main): Call grub_default_init and
11749 grub_timeout_init before grub_normal_init, and call
11750 grub_timeout_fini and grub_default_fini after grub_main.
11751
11752 * util/console.c (grub_ncurses_checkkey): Return the read
11753 character or -1.
11754
11755 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11756 timeouts.
11757
11758 * normal/main.c (read_config_file): Push MENU. If this fails,
11759 print an error and wait for a user input.
11760 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11761 If a menu is empty or an error occurs, pop MENU.
11762 (grub_normal_execute): Pop and free MENU after grub_menu_run
11763 returns.
11764
11765 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11766
11767 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11768 include time.h.
11769 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11770 without GRUB_UTIL.
11771 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11772 time.h.
11773 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11774 without GRUB_UTIL.
11775
11776 * include/grub/normal.h (struct grub_menu_list): New struct.
11777 (grub_menu_list_t): New type.
11778 (struct grub_context): New struct.
11779 (grub_context_t): New type.
11780 (grub_register_command): Got rid of EXPORT_FUNC.
11781 (grub_unregister_command): Likewise.
11782 (grub_context_get): New prototype.
11783 (grub_context_get_current_menu): Likewise.
11784 (grub_context_push_menu): Likewise.
11785 (grub_context_pop_menu): Likewise.
11786 [GRUB_UTIL] (grub_default_init): Likewise.
11787 [GRUB_UTIL] (grub_default_fini): Likewise.
11788 [GRUB_UTIL] (grub_timeout_init): Likewise.
11789 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11790
11791 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11792 commands/timeout.c and normal/context.c.
11793 (pkgdata_MODULES): Added default.mod and timeout.mod.
11794 (normal_mod_SOURCES): Added normal/context.c.
11795 (default_mod_SOURCES): New variable.
11796 (default_mod_CFLAGS): Likewise.
11797 (timeout_mod_SOURCES): Likewise.
11798 (timeout_mod_CFLAGS): Likewise.
11799 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11800 conf/i386-pc.rmk.
11801 (pkgdata_MODULES): Added default.mod and timeout.mod.
11802 (normal_mod_SOURCES): Added normal/context.c.
11803 (default_mod_SOURCES): New variable.
11804 (default_mod_CFLAGS): Likewise.
11805 (timeout_mod_SOURCES): Likewise.
11806 (timeout_mod_CFLAGS): Likewise.
11807
11808 * Makefile.in (all-local): Added $(MKFILES).
11809
4ed2e1dd 118102005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11811
11812 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11813 (grub_emu_SOURCES): Likewise.
11814 (pkgdata_MODULES): Add `sun.mod'.
11815 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11816 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11817 `partmap/sun.c'.
11818 (pkgdata_MODULES): Add `sun.mod'.
11819 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11820 * include/grub/partition.h (grub_sun_partition_map_init): New
11821 prototype.
11822 (grub_sun_partition_map_fini): Likewise.
11823 * partmap/sun.c: New file.
11824 * util/grub-emu.c (main): Initialize and de-initialize the sun
11825 partitionmap support.
11826
4d4e372e 118272005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11828
11829 This implements an Emacs-like menu entry editor.
f19dbdb7 11830
4d4e372e 11831 * normal/menu_entry.c: New file.
f19dbdb7 11832
4d4e372e 11833 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11834 characters to ASCII.
11835 (saved_char): New variable.
11836 (grub_ncurses_checkkey): Rewritten completely.
11837 (grub_ncurses_getkey): Likewise.
11838 (grub_ncurses_init): Call raw instead of cbreak.
11839
11840 * normal/menu.c (print_entry): Do not put a space.
11841 (init_page): Renamed to ...
11842 (grub_menu_init_page): ... this. All callers changed.
11843 (edit_menu_entry): Removed.
11844 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11845
11846 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11847
11848 * kern/misc.c (grub_vprintf): Call grub_refresh.
11849
11850 * normal/menu.c (DISP_LEFT): Renamed to ...
11851 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11852 * normal/menu.c (DISP_UP): Renamed to ...
11853 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11854 * normal/menu.c (DISP_RIGHT): Renamed to ...
11855 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11856 * normal/menu.c (DISP_DOWN): Renamed to ...
11857 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11858 * normal/menu.c (DISP_HLINE): Renamed to ...
11859 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11860 * normal/menu.c (DISP_VLINE): Renamed to ...
11861 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11862 * normal/menu.c (DISP_UL): Renamed to ...
11863 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11864 * normal/menu.c (DISP_UR): Renamed to ...
11865 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11866 * normal/menu.c (DISP_LL): Renamed to ...
11867 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11868 * normal/menu.c (DISP_LR): Renamed to ...
11869 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11870 * normal/menu.c (TERM_WIDTH): Renamed to ...
11871 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11872 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11873 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11874 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11875 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11876 * normal/menu.c (TERM_MARGIN): Renamed to ...
11877 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11878 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11879 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11880 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11881 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11882 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11883 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11884 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11885 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11886 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11887 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11888 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11889 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11890 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11891 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11892 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11893 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11894 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11895 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11896 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11897 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11898 All callers changed.
11899
11900 * include/grub/normal.h: New prototype.
11901
11902 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11903 normal/menu_entry.c.
11904 (normal_mod_SOURCES): Likewise.
11905 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11906 (normal_mod_SOURCES): Likewise.
11907
e6b92c8a 119082005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11909
11910 * include/grub/normal.h (grub_halt_init): New prototype.
11911 (grub_halt_fini): Likewise.
11912 (grub_reboot_init): Likewise.
11913 (grub_reboot_fini): Likewise.
11914
11915 * util/grub-emu.c: Include signal.h.
11916 (main_env): New global variable.
11917 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11918 catch C-c.
11919 (grub_machine_fini): New function.
11920 (main): Call grub_halt_init and grub_reboot_init before
11921 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11922 Call setjmp with MAIN_ENV to go back afterwards.
11923 Call grub_machine_fini right before return.
11924
11925 * include/grub/util/misc.h: Include setjmp.h.
11926 (main_env): New prototype.
11927
11928 * include/grub/kernel.h (grub_machine_fini): New prototype.
11929 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11930 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11931
11932 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11933 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11934 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 11935
e6b92c8a 11936 * util/i386/pc/misc.c: New file.
f19dbdb7 11937
e6b92c8a 11938 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11939 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11940 commands/i386/pc/reboot.c.
11941
c642636f 119422005-02-14 Guillem Jover <guillem@hadrons.org>
11943
11944 * include/grub/dl.h (grub_dl_check_header): New prototype.
11945 (grub_arch_dl_check_header): Change return type to grub_err_t,
11946 remove size parameter and export function. Update all callers.
11947 * kern/dl.c (grub_dl_check_header): New function.
11948 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11949 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11950 are inside the core.
11951 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11952 independent ELF header checks.
11953 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11954 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11955 `grub_dl_check_header' instead of explicit checks. Check for the
11956 ELF type.
11957 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11958 `grub_dl_check_header' instead of explicit checks. Remove arch
11959 specific ELF header checks.
11960
e6b92c8a 11961 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11962 argument SIZE.
11963
5eabe94b 119642005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11965
11966 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11967 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11968
1b14a681 119692005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11970
11971 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 11972 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 11973 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 11974 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 11975 * partmap/amiga.c (amiga_partition_map_iterate): Return
11976 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11977 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11978
aca108aa 119792005-02-01 Guillem Jover <guillem@hadrons.org>
11980
11981 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11982 help info.
11983
c9f9c556 119842005-01-31 Marco Gerards <metgerards@student.han.nl>
11985
11986 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11987 Removed prototype.
11988 (grub_rescue_cmd_linux): New prototype.
11989 (grub_rescue_cmd_initrd): Likewise.
11990 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11991 `bi_rec'.
11992 (grub_linux_release_mem): Release the memory for the initrd.
11993 (grub_load_linux): Renamed from this...
11994 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11995 Changed `entry' not to be static. Loop over memory regions to
11996 find another one when the default fails.
11997 (grub_rescue_cmd_initrd): New function.
11998 (grub_linux_init): Remove function.
11999 (grub_linux_fini): Likewise.
12000 (GRUB_MOD_INIT): Register `initrd'.
12001 (GRUB_MOD_FINI): Unregister `initrd'.
12002 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12003 Function removed.
12004 (grub_linux_normal_fini): Likewise.
12005 (GRUB_MOD_INIT): Register `initrd'.
12006 (GRUB_MOD_FINI): Unregister `initrd'.
12007
990cf3aa 120082005-01-31 Marco Gerards <metgerards@student.han.nl>
12009
12010 * commands/help.c: New file.
12011 * normal/arg.c (show_help): Renamed to...
12012 (grub_arg_show_help): ... this.
12013 * commands/i386/pc/halt.c: New file.
12014 * commands/i386/pc/reboot.c: Likewise.
12015 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12016 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12017 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12018 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12019 variables.
12020 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12021 `commands/help.c'.
12022 (pkgdata_MODULES): Add `help.mod'.
12023 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12024 * grub/i386/pc/init.h (grub_reboot): New prototype.
12025 (grub_halt): Likewise.
12026 * include/grub/normal.h (grub_arg_show_help): New prototype.
12027 (grub_help_init): Likewise.
12028 (grub_help_fini): Likewise.
12029 * util/grub-emu.c (main): Initialize and deinitialize the help
12030 command.
12031
12032 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12033
12034 * normal/command.c (grub_command_init): Fixed the description of
12035 the `set' and `unset' commands.
12036
120372005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 12038
12039 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12040 function.
12041 * commands/ieee1275/halt.c: New file.
12042 * commands/ieee1275/reboot.c: Likewise.
12043 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12044 `__attribute__ ((unused))'. Some GCS related fixed.
12045 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12046 (grub_suspend_fini): Likewise.
12047 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12048 and `halt.mod'.
12049 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12050 (halt_mod_CFLAGS): New variables.
12051 * include/grub/powerpc/ieee1275/ieee1275.h
12052 (grub_ieee1275_interpret): New prototype.
12053
1ab09cc7 120542005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12055
12056 * include/grub/misc.h (memmove): New prototype.
12057 (memcpy): Likewise.
12058
8b8cbdb2 120592005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12060
12061 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12062 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12063
e3741a27 120642005-01-22 Marco Gerards <metgerards@student.han.nl>
12065
12066 * kern/misc.c (grub_strndup): Function rewritten.
12067
776bd780 120682005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12069
12070 * normal/menu.c (TERM_WIDTH): Macro redefined.
12071 (TERM_TOP_BORDER_Y): Likewise.
12072 (draw_border): Replaced while-loop by a for-loop. Make the number
12073 of lines consistent with the number of lines displayed in
12074 print_entries. Added a margin below the rectangle.
12075 (print_entry): Make the entry fit in the rectangle.
12076 (print_entries): Display the scroll arrows next to the right
12077 border.
12078
78026bce 120792005-01-21 Marco Gerards <metgerards@student.han.nl>
12080
12081 * fs/minix.c (grub_minix_find_file): Reserve more space for
12082 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12083 `grub_strncpy' to copy `path' into it.
12084
67bbaf0f 120852005-01-21 Marco Gerards <metgerards@student.han.nl>
12086
12087 Add the loopback device, a device via which files can be accessed
12088 as devices.
f19dbdb7 12089
67bbaf0f 12090 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12091 (pkgdata_MODULES): Add loopback.mod.
12092 (loopback_mod_SOURCES): New variable.
12093 (loopback_mod_CFLAGS): Likewise.
12094 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12095 `disk/loopback.c'.
12096 (pkgdata_MODULES): Add loopback.mod.
12097 (loopback_mod_SOURCES): New variable.
12098 (loopback_mod_CFLAGS): Likewise.
12099 * disk/loopback.c: new file.
12100 * include/grub/normal.h (grub_loop_init): New prototype.
12101 (grub_loop_fini): New prototype.
12102 * util/grub-emu.c (main): Initialize and de-initialize loopback
12103 support.
12104 * include/grub/disk.h (grub_disk_dev_id): Add
12105 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12106
6f1c18bd 121072005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12108
12109 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12110 function.
12111 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12112 (suspend_mod_SOURCES): New variable.
12113 (suspend_mod_CFLAGS): Likewise.
12114 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12115 New prototype.
12116 * commands/ieee1275/suspend.c: New file.
12117
b38551da 121182005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12119
12120 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 12121 ((unused))' to `__attribute__ ((used))'.
b38551da 12122 (GRUB_MOD_FINI): Likewise.
12123 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12124 * genmk.rb (PModule): Assign space to common symbols when linking
12125 modules.
12126
777aff39 121272005-01-20 Marco Gerards <metgerards@student.han.nl>
12128
12129 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12130 `unsigned' arguments to `grub_size_t'.
12131 (grub_malloc): Likewise.
12132 (grub_realloc): Likewise.
12133 (grub_memalign): Likewise.
12134 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12135 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12136 * util/misc.c (grub_malloc): Likewise.
12137 (grub_realloc): Likewise.
12138 * kern/mm.c (get_header_from_pointer): Change the casts to
12139 `unsigned' into a cast to `grub_size_t'.
12140
12141 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12142 point to `currnode' when `currnode' is changed.
12143
12144 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12145 Schottelius <nico-linux@schottelius.org>.
12146
d0ff18e1 121472005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12148
12149 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12150 (note_path): Remove variable.
12151 (GRUB_IEEE1275_NOTE_NAME): New macro.
12152 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12153 (grub_ieee1275_note_hdr): New structure.
12154 (grub_ieee1275_note_desc): Likewise.
12155 (grub_ieee1275_note): Likewise.
12156 (load_note): Remove `dir' argument. All callers updated. Remove
12157 `note_img' and `path'. Do not load a file from `note_path'.
12158 Initialize a struct grub_ieee1275_note and write that to `out'.
12159 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12160
4ca7004c 121612005-01-05 Marco Gerards <metgerards@student.han.nl>
12162
12163 * util/misc.c (grub_util_read_image): Revert last change. It
12164 called `grub_util_read_at', which seeks from the beginning of the
12165 file.
12166
0b412211 121672005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12168
12169 * TODO: Add note about endianness in grub-mkimage.
12170 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12171 section.
12172 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12173 (grub_mkimage_SOURCES): New target.
12174 * include/grub/kernel.h (grub_start_addr): Remove variable.
12175 (grub_end_addr): Likewise.
12176 (grub_total_module_size): Likewise.
12177 (grub_kernel_image_size): Likewise.
12178 (GRUB_MODULE_MAGIC): New constant.
12179 (grub_module_info): New structure.
12180 (grub_arch_modules_addr): New prototype.
12181 (grub_get_end_addr): Remove prototype.
12182 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12183 * include/grub/powerpc/ieee1275/kernel.h: New file.
12184 * include/grub/util/misc.h (grub_util_get_fp_size): New
12185 prototype.
12186 (grub_util_read_at): Likewise.
12187 (grub_util_write_image_at): Likewise.
12188 * kern/main.c (grub_get_end_addr): Remove function.
12189 (grub_load_modules): Call grub_arch_modules_addr instead of using
12190 grub_end_addr. Look for a grub_module_info struct in memory. Use
12191 the grub_module_info fields instead of calling grub_get_end_addr
12192 as loop conditions. Move grub_add_unused_region code here.
12193 (grub_add_unused_region): Remove function.
12194 * kern/i386/pc/init.c: Include grub/cache.h.
12195 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12196 one call to add_mem_region.
12197 (grub_arch_modules_addr): New function.
12198 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12199 (grub_total_module_size): Likewise.
12200 Include grub/machine/kernel.h.
12201 (grub_arch_modules_addr): New function.
12202 * util/grub-emu.c (grub_end_addr): Remove variable.
12203 (grub_total_module_size): Likewise.
12204 (grub_arch_modules_addr): New function.
12205 * util/misc.c: Include unistd.h.
12206 (grub_util_get_fp_size): New function.
12207 (grub_util_read_at): Likewise.
12208 (grub_util_write_image_at): Likewise.
12209 (grub_util_read_image): Call grub_util_read_at.
12210 (grub_util_write_image): Call grub_util_write_image_at.
12211 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12212 additional memory in kernel_img for a struct grub_module_info.
12213 Fill in that grub_module_info.
12214 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12215
458786f8 122162005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12217
12218 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12219 New function.
12220 * include/grub/powerpc/ieee1275/ieee1275.h
12221 (grub_ieee1275_milliseconds): New prototype.
12222 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12223 Change to 1000.
12224 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12225 grub_ieee1275_milliseconds.
12226
ac507d1b 122272005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12228
12229 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12230 variable.
12231 (find_options): New function.
12232 (cmain): Call find_options.
12233 * include/grub/powerpc/ieee1275/ieee1275.h
12234 (grub_ieee1275_realmode): New extern variable.
12235 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12236 grub_map if grub_ieee1275_realmode is false.
12237
6b8fd1c4 122382004-12-29 Marco Gerards <metgerards@student.han.nl>
12239
12240 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12241 lines are inserted and make it work like readline. Reported by
12242 Vincent Pelletier <subdino2004@yahoo.fr>.
12243
8514a1e0 122442004-12-28 Marco Gerards <metgerards@student.han.nl>
12245
12246 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12247
12248 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12249 `kern/powerpc/cache.S'.
12250
924b6140 122512004-12-27 Marco Gerards <metgerards@student.han.nl>
12252
12253 * genmk.rb: Handle the `Program' class in the main loop. Written
12254 by Johan Rydberg <jrydberg@gnu.org>.
12255 (Program): New class.
12256 (programs): New variable.
12257 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12258 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12259 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12260 (help_arch): Function removed.
12261 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12262 `powerpc/libgcc.h' and `loader.h'.
12263 (pkgdata_PROGRAMS): New variable.
12264 (sbin_UTILITIES): Variable removed.
12265 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12266 (grubof_SOURCES): Variable re-defined so it only includes the
12267 core functionality.
12268 (grubof_CFLAGS): Remove `-DGRUBOF'.
12269 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12270 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12271 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12272 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12273 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12274 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12275 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12276 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12277 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12278 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12279 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12280 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12281 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12282 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12283 (pc_mod_CFLAGS): New variables.
12284 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12285 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12286 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12287 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12288 Moved from here...
12289 * include/grub/i386/pc/init.h (grub_os_area_addr)
12290 (rub_os_area_size): ... to here.
12291 * include/grub/powerpc/ieee1275/ieee1275.h
12292 (grub_ieee1275_entry_fn): Export symbol.
12293 * include/grub/powerpc/ieee1275/init.h: New file.
12294 * include/grub/powerpc/libgcc.h: Likewise.
12295 * include/grub/cache.h: Likewise.
12296 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12297 <hollis@penguinppc.org>.
12298 * kern/dl.c: Include <grub/cache.h>.
12299 (grub_dl_flush_cache): New function.
12300 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12301 for this module.
12302 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12303 (grub_console_init): Removed prototypes.
12304 (grub_machine_init): Don't initialize the modules anymore.
12305 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12306 static.
12307 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12308 Macro undef removed.
12309 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12310 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12311 relocation `R_PPC_REL32'. Return an error when the relocation is
12312 unknown.
12313 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12314 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12315 * util/misc.c (grub_arch_sync_caches): Likewise.
12316
e4b47e0c 123172004-12-19 Marco Gerards <metgerards@student.han.nl>
12318
12319 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12320 `symlist.c', add `grubof_symlist.c'.
12321 (symlist.c): Variable removed.
12322 (grubof_HEADERS): Variable added.
12323 (grubof_symlist.c): New target.
12324 (kernel_syms.lst): Use `grubof_HEADERS' instead of
12325 `kernel_img_HEADERS'.
12326 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12327 * kern/powerpc/dl.c: New file.
12328 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12329 Function removed.
12330 (grub_arch_dl_relocate_symbols): Likewise.
12331 (grub_register_exported_symbols): Likewise.
12332
4ceb3636 123332004-12-13 Marco Gerards <metgerards@student.han.nl>
12334
12335 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12336 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12337 to fail instead. Reported by Vincent Pelletier
12338 <subdino2004@yahoo.fr>.
12339
12340 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12341 it is not allocated. Reported by Vincent Pelletier
12342 <subdino2004@yahoo.fr>.
12343
12344 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12345 output so the output looks better.
f19dbdb7 12346
3f1578fe 123472004-12-04 Marco Gerards <metgerards@student.han.nl>
12348
12349 Modulize the partition map support and add support for the amiga
12350 partition map.
f19dbdb7 12351
3f1578fe 12352 * commands/ls.c: Include <grub/partition.h> instead of
12353 <grub/machine/partition.h>.
12354 * kern/disk.c: Likewise.
12355 * kern/rescue.c: Likewise.
12356 * loader/i386/pc/chainloader.c: Likewise.
12357 * normal/cmdline.c: Likewise.
12358 * kern/powerpc/ieee1275/init.c: Likewise.
12359 (grub_machine_init): Call `grub_pc_partition_map_init',
12360 `grub_amiga_partition_map_init' and
12361 `grub_apple_partition_map_init'.
12362 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12363 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12364 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12365 `partition.h' and `pc_partition.h'.
12366 (grub_setup_SOURCES): Remove
12367 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12368 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12369 (grub_emu_SOURCES): Likewise.
12370 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12371 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12372 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12373 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12374 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12375 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12376 (grubof_SOURCES): Likewise.
12377 * disk/i386/pc/partition.c: File removed.
12378 * disk/powerpc/ieee1275/partition.c: Likewise.
12379 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12380 * include/grub/i386/pc/partition.h: Likewise.
12381 * kern/partition.c: New file.
12382 * partmap/amiga.c: Likewise.
12383 * partmap/apple.c: Likewise.
12384 * partmap/pc.c: Likewise.
12385 * include/grub/partition.h: Likewise..
12386 * include/grub/pc_partition.h: Likewise.
12387 * util/grub-emu.c: Include <grub/partition.h> instead of
12388 <grub/machine/partition.h>.
12389 (main): Call `grub_pc_partition_map_init',
12390 `grub_amiga_partition_map_init' and
12391 `grub_apple_partition_map_init' and deinitialize afterwards.
12392 * util/i386/pc/biosdisk.c: Include `#include
12393 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12394 `<grub/machine/partition.h>'.
12395 * util/i386/pc/grub-setup.c: Likewise.
12396 * util/i386/pc/biosdisk.c: Likewise.
12397 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12398 partition information in case of a PC partition.
12399 * util/i386/pc/grub-setup.c: Include `#include
12400 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12401 `<grub/machine/partition.h>'.
12402 (setup): Only access the PC specific partition information in case
12403 of a PC partition.
12404
0ef4ced9 124052004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 12406
0ef4ced9 12407 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12408 (grub_longjmp): Likewise.
12409 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12410 20.
12411 * normal/powerpc/setjmp.S: New file.
12412 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12413 `normal/powerpc/setjmp.S'.
12414 (grubof_CFLAGS): Add `-DGRUBOF'.
12415 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12416 [GRUB_UTIL && !GRUBOF].
f19dbdb7 12417
19950e29 124182004-11-16 Marco Gerards <metgerards@student.han.nl>
12419
12420 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12421 property named `name'. Correctly handle the error returned by
12422 `grub_ieee1275_finddevice' if a device can not be opened.
12423
a2fea427 124242004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12425
12426 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12427 `actual' for negativity.
12428 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12429 kern/fshelp.c.
12430
41ea0ea3 124312004-11-01 Marco Gerards <metgerards@student.han.nl>
12432
12433 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12434 (PAGE_OFFSET): New macro.
12435 (CRTC_ADDR_PORT): Likewise.
12436 (CRTC_DATA_PORT): Likewise.
12437 (START_ADDR_HIGH_REGISTER): Likewise.
12438 (START_ADDR_LOW_REGISTER): Likewise.
12439 (GRAPHICS_ADDR_PORT): Likewise.
12440 (GRAPHICS_DATA_PORT): Likewise.
12441 (READ_MAP_REGISTER): Likewise.
12442 (INPUT_STATUS1_REGISTER): Likewise.
12443 (INPUT_STATUS1_VERTR_BIT): Likewise.
12444 (page): New variable.
12445 (wait_vretrace): New function.
12446 (set_read_map): Likewise.
12447 (set_start_address): Likewise.
12448 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12449 the right page.
12450 (check_vga_mem): Take the page into account.
12451 (write_char): Likewise.
12452 (write_cursor): Likewise.
12453 (scroll_up): Likewise. Copy the page to the page that is not
12454 shown and switch between both pages.
12455 (grub_vga_putchar): Fix off by one error.
12456 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12457 account.
12458
ad0bd20b 124592004-11-01 Marco Gerards <metgerards@student.han.nl>
12460
12461 Add support for iso9660 (including rockridge).
f19dbdb7 12462
ad0bd20b 12463 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12464 (iso9660_mod_SOURCES): New variable.
12465 (iso9660_mod_CFLAGS): Likewise.
12466 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12467 * include/grub/fs.h (grub_iso9660_init): New prototype.
12468 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12469 * fs/iso9660.c: New file.
12470
12471 * include/grub/misc.h (grub_strncat): New prototype.
12472 * kern/misc.c (grub_strncat): New function.
f19dbdb7 12473
ad0bd20b 12474 * fs/hfs.c (grub_hfs_mount): Translate the error
12475 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12476 * fs/jfs.c (grub_jfs_mount): Likewise.
12477 * fs/ufs.c (grub_ufs_mount): Likewise.
12478
a5477a59 124792004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12480
12481 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12482 which initialized BAT registers.
12483 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12484 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12485 Move from here...
12486 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12487 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12488 ... to here.
12489 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12490 (grub_mapclaim): Likewise.
12491 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12492 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12493 hand.
12494
9304c1f8 124952004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12496
12497 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12498 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12499 -ffreestanding and -msoft-float.
12500
86f4ae25 125012004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12502
12503 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12504 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12505 set in grub_ieee1275_flags.
12506
38912228 125072004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12508
12509 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12510 prototype.
12511 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12512 grub_console_init first.
12513 Change the memory range used for grub_ieee1275_claim and
12514 grub_mm_init_region.
12515 Print an error message if the claim fails.
12516 Include <grub/misc.h>.
12517
d1923dc8 125182004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12519
12520 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12521 Call grub_children_iterate for device nodes of type `scsi',
12522 `ide', or `ata'.
12523 (grub_ofdisk_open): Remove manual device alias resolution.
12524 Fix memory leak when device cannot be opened.
f19dbdb7 12525 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 12526 (grub_children_iterate): New prototype.
12527 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12528 New function.
12529 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12530 Return -1 if args.size was -1.
12531
4512e4f3 125322004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12533
12534 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12535 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12536 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12537 Open Firmware's memory for it; claim memory from _start to _end.
12538 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12539 (_end): New extern.
12540 (_start): Zero BSS from __bss_start to _end.
12541 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12542 New extern.
12543 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12544
4d61feb0 125452004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12546
ad0bd20b 12547 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12548 -1 if args.base was -1.
4d61feb0 12549
026fa2f9 125502004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12551
12552 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12553 escape sequence instead of a literal ^L. Also call
12554 grub_ofconsole_gotoxy.
12555
9f2220ef 125562004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12557
12558 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12559 void * arguments to grub_addr_t. All callers updated. Also make
12560 the `result' argument optional.
12561 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12562 All callers updated.
12563
8a572cd7 125642004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12565
12566 * commands/ls.c (grub_ls_list_files): Use the string following the
12567 initial ')', if present, as the filesystem path.
12568 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12569
12570 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12571
18aa81f2 125722004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12573
12574 Make the source code of the menu interface more readable.
f19dbdb7 12575
18aa81f2 12576 * normal/menu.c: Include grub/mm.h.
12577 (TERM_WIDTH): New macro.
12578 (TERM_HEIGHT): Likewise.
12579 (TERM_INFO_HEIGHT): Likewise.
12580 (TERM_MARGIN): Likewise.
12581 (TERM_SCROLL_WIDTH): Likewise.
12582 (TERM_TOP_BORDER_Y): Likewise.
12583 (TERM_LEFT_BORDER_X): Likewise.
12584 (TERM_BORDER_WIDTH): Likewise.
12585 (TERM_MESSAGE_HEIGHT): Likewise.
12586 (TERM_BORDER_HEIGHT): Likewise.
12587 (TERM_NUM_ENTRIES): Likewise.
12588 (TERM_FIRST_ENTRY_Y): Likewise.
12589 (TERM_ENTRY_WIDTH): Likewise.
12590 (TERM_CURSOR_X): Likewise.
12591 (draw_border): Use macros instead of magic numbers.
12592 (print_entry): Likewise.
12593 (print_entries): Likewise.
12594 (run_menu): Likewise. Also, handle the key 'e'.
12595 (run_menu_entry): Ignore empty command lines.
12596 (print_message): Added a new argument EDIT. If EDIT is true,
12597 print a different message.
12598 (init_page): Likewise.
12599 (edit_menu_entry): New function. Not implemented yet.
12600
b47efe30 126012004-09-17 Marco Gerards <metgerards@student.han.nl>
12602
12603 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12604 can be loaded from normal mode.
f19dbdb7 12605
b47efe30 12606 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12607 `multiboot.mod'.
12608 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12609 (multiboot_mod_CFLAGS): New variables.
12610 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 12611 * loader/i386/pc/multiboot_normal.c: Likewise.
12612
b47efe30 12613 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12614 attribute `unused'.
f19dbdb7 12615
b47efe30 12616 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12617 `fdiro' to read the mode information from instead of `diro'.
12618
12619 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12620 looking up a symlink.
12621
12622 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12623 macro.
12624 * normal/command.c (grub_command_execute): Don't parse the
12625 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12626 flags of the command.
12627
12628 * normal/menu.c (grub_menu_run): Fix typo.
12629
da75ac71 126302004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12631
12632 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12633
12634 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12635 `y + 1' instead of `y - 1'.
12636
12637 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 12638
062b24c2 126392004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12640
12641 From Hollis Blanchard <hollis@penguinppc.org>:
12642 * kern/misc.c (memmove): New alias for grub_memmove.
12643 (memcmp): New alias for grub_memcmp.
12644 (memset): New alias for grub_memset.
f19dbdb7 12645 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 12646 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 12647 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 12648 (grub_ieee1275_get_property): Likewise.
f19dbdb7 12649
8ddad845 126502004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12651
12652 Added normal mode command `chainloader' as module chain.mod, which
12653 depends on normal.mod and _chain.mod.
f19dbdb7 12654
8ddad845 12655 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12656 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12657 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12658 Deleted prototype.
12659 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12660 but arguments parsing moved to ...
12661 (grub_chainloader_cmd): ... here. New function.
12662 * include/grub/i386/pc/chainloader.h: New file.
12663 * loader/i386/pc/chainloader_normal.c: Likewise.
12664
2c1f4ce3 126652004-09-11 Marco Gerards <metgerards@student.han.nl>
12666
12667 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12668 (grub_mkimage_LDFLAGS): Likewise.
12669 (grub_emu_SOURCES): Likewise.
12670 (kernel_img_HEADERS): Added fshelp.h.
12671 * fs/ext2.c: Include <grub/fshelp.h>.
12672 (FILETYPE_REG): New macro.
12673 (FILETYPE_INO_REG): Likewise.
12674 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12675 Changed all users.
12676 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12677 all users.
12678 (grub_fshelp_node): New struct.
12679 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12680 to a pointer.
12681 (grub_ext2_get_file_block): Removed function.
12682 (grub_ext2_read_block): New function.
12683 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12684 This function was written.
12685 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12686 (grub_ext2_find_file): Removed function.
12687 (grub_ext2_read_symlink): New function.
12688 (grub_ext2_iterate_dir): Likewise.
12689 (grub_ext2_open): Rewritten.
12690 (grub_ext2_dir): Rewritten.
12691 * include/grub/fshelp.h: New file.
12692 * fs/fshelp.c: Likewise.
12693
3c52136a 126942004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12695
12696 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12697 (print_message): Add a missing newline.
12698 (run_menu): Added timeout support.
12699 (run_menu_entry): New local function.
12700 (grub_menu_run): Added support for booting.
12701
12702 * kern/loader.c (grub_loader_is_loaded): New function.
12703
12704 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12705 (grub_get_rtc): Exported.
12706
12707 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12708 (grub_get_rtc): Exported.
12709
12710 * include/grub/normal.h (struct grub_command_list): Remove
12711 constant from the member `command'.
12712
12713 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12714
12715 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12716
12717 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12718
aa033560 127192004-08-28 Marco Gerards <metgerards@student.han.nl>
12720
12721 Add support for the JFS filesystem.
12722
12723 * fs/jfs.c: New file.
12724 * include/grub/fs.h (grub_jfs_init): New prototype.
12725 (grub_jfs_fini): New prototype.
12726 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12727 (grub_emu_SOURCES): Likewise.
12728 (pkgdata_MODULES): Add jfs.mod.
12729 (jfs_mod_SOURCES): New variable.
12730 (jfs_mod_CFLAGS): Likewise.
12731 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12732 (grubof_SOURCES): Likewise.
12733 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12734
12735 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12736 endian to the host endian.
12737 (grub_fat_utf16_to_utf8): Move function from there...
12738 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 12739 the endianness of the source string anymore.
aa033560 12740 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12741
94bc45af 127422004-08-24 Marco Gerards <metgerards@student.han.nl>
12743
12744 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12745 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12746 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12747 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 12748
94bc45af 12749 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12750 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12751 for `node_found' and `it_dir'.
12752 (grub_hfs_dir): Add prototype for `dir_hook'.
12753
12754 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12755 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12756 and `indir32' to silence a gcc warning.
12757
12758 * include/grub/fs.h (grub_hfs_init): New prototype.
12759 (grub_hfs_fini): Likewise.
f19dbdb7 12760
12761
97543f08 127622004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12763
12764 Each disk device has its own id now. This is useful to make use
12765 of multiple disk devices.
f19dbdb7 12766
97543f08 12767 * include/grub/disk.h (grub_disk_dev_id): New enum.
12768 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12769 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12770
12771 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12772 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12773
12774 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12775 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12776
12777 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12778 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12779
12780 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12781 "id" which is used by the cache manager.
12782
12783 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12784 of just "GRUB".
12785
64372eb4 127862004-08-18 Marco Gerards <metgerards@student.han.nl>
12787
12788 * fs/hfs.c: New file.
12789 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12790 (grub_emu_SOURCES): Likewise.
12791 (pkgdata_MODULES): Add hfs.mod.
12792 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12793 (grubof_SOURCES): Likewise.
12794 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12795
12796 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12797 * kern/misc.c (grub_strncasecmp): Add function.
12798
cc61b58f 127992004-08-14 Marco Gerards <metgerards@student.han.nl>
12800
12801 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12802 with parentheses.
12803
12804 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12805 (grub_ext2_dir): In case the directory entry type is unknown, read
12806 it from the inode.
12807
0ef123f6 128082004-08-02 Peter Bruin <pjbruin@dds.nl>
12809
12810 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12811 grub_load_linux instead of grub_rescue_cmd_linux as second
12812 argument of grub_rescue_register_command.
12813
12814 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12815
a447c5df 128162004-07-27 Marco Gerards <metgerards@student.han.nl>
12817
12818 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12819 function.
12820 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12821 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12822 `loader/powerpc/ieee1275/linux.c',
12823 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12824 * include/grub/powerpc/ieee1275/ieee1275.h
12825 (grub_ieee1275_release): New prototype.
12826 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12827 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12828 normal, boot, linux and linux_normal.
12829 * loader/powerpc/ieee1275/linux.c: New file.
12830 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12831
5a9e3546 128322004-07-12 Marco Gerards <metgerards@student.han.nl>
12833
12834 * normal/arg.c (grub_arg_parse): Correct error handling after
12835 reallocating the argumentlist (check if `argl' is not null instead
12836 of checking if `args' is not null).
12837 * kern/mm.c (grub_realloc): Return the same pointer when using the
12838 same region, instead of returning the header address.
12839
e15199cb 128402004-07-11 Marco Gerards <metgerards@student.han.nl>
12841
12842 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12843 one block instead of two when looking for the initial partition.
12844 (grub_partition_probe): Initialize the local variable `p' with 0.
12845 Use base 10 for the grub_strtoul call.
12846 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12847 need for one local variable.
12848 (grub_strtoul): Don't add the new value to `num', instead of that
12849 just assign it.
12850
020616c2 128512004-07-11 Marco Gerards <metgerards@student.han.nl>
12852
12853 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12854 (pxeboot_img_SOURCES): New variable.
12855 (pxeboot_img_ASFLAGS): Likewise.
12856 (pxeboot_img_LDFLAGS): Likewise.
12857 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12858 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12859 <lode_leroy@hotmail.com>.
12860
6c51eb64 128612004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12862
12863 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12864 there was no input.
12865
cfb12aff 128662004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12867
12868 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12869 the history buffer logic.
12870
6eabba74 128712004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12872
12873 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12874 (FILETYPE_INO_SYMLINK): New macros.
12875 (grub_ext2_find_file): Check if the node is a directory using the
12876 inode stat information instead of using the filetype in the
12877 dirent. Exclude the first character of an absolute symlink.
12878 (grub_ext2_dir): Mask out the filetype part of the mode member of
12879 the inode.
12880
66e19ef8 128812004-05-24 Marco Gerards <metgerards@student.han.nl>
12882
12883 Add support for UFS version 1 and 2. Add support for the minix
12884 filesystem version 1 and 2, both the variants with 14 and 30 long
12885 filenames.
f19dbdb7 12886
66e19ef8 12887 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12888 fs/minix.c.
12889 (grub_emu_SOURCES): Likewise.
12890 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12891 (ufs_mod_SOURCES): New variable.
12892 (ufs_mod_CFLAGS): Likewise.
12893 (minix_mod_SOURCES): Likewise.
12894 (minix_mod_CFLAGS): Likewise.
12895 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12896 fs/minix.c.
12897 (grubof_SOURCES): Likewise.
12898 * fs/ufs.c: New file.
12899 * fs/minix.c: New file.
12900 * include/grub/fs.h (grub_ufs_init): New prototype.
12901 (grub_ufs_fini): Likewise.
12902 (grub_minix_init): Likewise.
12903 (grub_minix_fini): Likewise.
12904 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12905 minix fs.
12906
cc2e748a 129072004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12908
12909 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12910 commands/ls.c, commands/terminal.c, commands/boot.c,
12911 commands/cmp.c and commands/cat.c.
12912 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12913
12914 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12915 "env.h"
12916
4b13b216 129172004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12918
12919 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12920 and grub_, respectively. Because the conversion is trivial and
12921 mechanical, I omit the details here. Please refer to the CVS
12922 if you need more information.
12923
6a142551 129242004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12925
12926 * include/pupa: Renamed to ...
12927 * include/grub: ... this.
12928 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12929 * util/i386/pc/grub-mkimage.c: ... this.
12930 * util/i386/pc/pupa-setup.c: Renamed to ...
12931 * util/i386/pc/grub-setup.c: ... this.
12932 * util/pupa-emu.c: Renamed to ...
12933 * util/grub-emu.c: ... this.
12934
e56cdf21 129352004-03-29 Marco Gerards <metgerards@student.han.nl>
12936
12937 Add support for the newworld apple macintosh (PPC). This has been
12938 tested on the powerbook 2000 only. It only adds support for
12939 generic ieee1275 functions, console and disk support. This should
12940 be easy to port to other architectures with support for Open
12941 Firmware.
f19dbdb7 12942
e56cdf21 12943 * configure.ac: Accept the powerpc as host_cpu. In the case of
12944 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12945 specific tests are only executed while building for the i386.
12946 Inverse test for crosscompile.
12947 * genmk.rb (Utility): Allow assembler files.
12948 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12949 * conf/powerpc-ieee1275.rmk: New file.
12950 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12951 * disk/powerpc/ieee1275/partition.c: Likewise.
12952 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12953 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12954 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12955 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12956 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12957 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12958 * include/pupa/powerpc/ieee1275/loader.h
12959 * include/pupa/powerpc/setjmp.h: Likewise.
12960 * include/pupa/powerpc/types.h: Likewise.
12961 * kern/powerpc/ieee1275/init.c: Likewise.
12962 * kern/powerpc/ieee1275/openfw.c: Likewise.
12963 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12964
12965 These files were written by Johan Rydberg
12966 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 12967
e56cdf21 12968 * boot/powerpc/ieee1275/cmain.c: New file.
12969 * boot/powerpc/ieee1275/crt0.S: Likewise.
12970 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12971 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12972
8c8cc205 129732004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12974
12975 * Makefile.in: Update copyright.
12976 * genmodsrc.sh: Likewise.
12977 * gensymlist.sh: Likewise.
12978 * term/i386/pc/vga.c: Indent correctly.
12979
12980 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12981 bugreporting address.
12982 * util/i386/pc/pupa-setup.c (usage): Likewise,
12983 (main): Call pupa_ext2_init and pupa_ext2_fini.
12984
f19dbdb7 12985 * fs/fat.c (log2): Renamed to ...
8c8cc205 12986 (fat_log2): ... this.
12987 All callers changed.
12988 * kern/misc.c (memcpy): Alias to pupa_memmove.
12989 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12990 lvalue cast.
12991 * util/console.c (pupa_ncurses_fini): Return 0.
12992
12993 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12994 Move fail label here.
12995 [__GNU__]: Don't warn when using stat.
12996 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12997 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12998 long int. Use strtol instead of strtoul.
f19dbdb7 12999
db1771cf 130002004-03-14 Marco Gerards <metgerards@student.han.nl>
13001
13002 * commands/boot.c: New file.
13003 * commands/cat.c: Likewise.
13004 * commands/cmp.c: Likewise.
13005 * commands/ls.c: Likewise.
13006 * commands/terminal.c: Likewise.
13007 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13008 (pupa_register_command): Changed interface to match the new
13009 argument parser.
13010 (pupa_command_execute): Changed (almost rewritten) so it uses
13011 pupa_split_command. Added support for setting variables using the
13012 syntax `foo=bar'.
13013 (rescue_command): Changed to work with the new argument parser.
13014 (terminal_command): Moved from here to commands/terminal.c.
13015 (set_command): New function.
13016 (unset_command): New function.
13017 (insmod_command): New function.
13018 (rmmod_command): New function.
13019 (lsmod_command): New function.
13020 (pupa_command_init): Don't initialize the command terminal
13021 anymore. Initialize the commands set, unset, insmod, rmmod and
13022 lsmod.
13023 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13024 (kernel_img_HEADERS): Add arg.h and env.h.
13025 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13026 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13027 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13028 normal/arg.c.
13029 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13030 terminal.mod.
13031 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13032 (boot_mod_SOURCES): New variable.
13033 (terminal_mod_SOURCES): Likewise.
13034 (ls_mod_SOURCES): Likewise.
13035 (cmp_mod_SOURCES): Likewise.
13036 (cat_mod_SOURCES): Likewise.
13037
13038 * normal/arg.c: New file.
13039 * kern/env.c: Likewise.
13040 * include/pupa/arg.h: Likewise.
13041 * include/pupa/env.h: Likewise.
13042 * font/manager.c (font_command): Changed to match argument parsing
13043 interface changes.
13044 (PUPA_MOD_INIT): Likewise.
13045 * hello/hello.c (pupa_cmd_hello): Likewise.
13046 (PUPA_MOD_INIT): Likewise.
13047 * include/pupa/disk.h: Include <pupa/device.h>.
13048 (pupa_print_partinfo): New prototype.
13049 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13050 (pupa_dl_get_prefix): Likewise.
13051 * include/pupa/misc.h: Include <pupa/err.h>.
13052 (pupa_isgraph): New prototype.
13053 (pupa_isdigit): Likewise.
13054 (pupa_split_cmdline): Likewise.
13055 * include/pupa/normal.h: Include <pupa/arg.h>.
13056 (pupa_command): Changed the prototype of the member `func' to
13057 match the argument parsing interface. Added member `options'.
13058 (pupa_register_command): Updated to match function.
13059 (pupa_arg_parse): New prototype.
13060 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13061 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13062 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13063 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13064 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13065 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13066 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13067 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13068 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13069 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13070 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13071 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13072 * kern/disk.c: Include <pupa/file.h>.
13073 (pupa_print_partinfo): New function.
13074 * kern/dl.c: Include <pupa/env.h>.
13075 (pupa_dl_dir): Variable removed.
13076 (pupa_dl_load): Use the environment variable `prefix' instead of
13077 the variable pupa_dl_dir.
13078 (pupa_dl_set_prefix): Function removed.
13079 (pupa_dl_get_prefix): Likewise.
13080 * kern/i386/pc/init.c: Include <pupa/env.h>.
13081 (pupa_machine_init): Use the environment variable `prefix' instead of
13082 using pupa_dl_set_prefix to set the prefix.
13083 * kern/main.c: Include <pupa/env.h>.
13084 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13085 using pupa_dl_get_prefix to get the prefix.
13086 * kern/misc.c: Include <pupa/env.h>.
13087 (pupa_isdigit): New function.
13088 (pupa_isgraph): Likewise.
13089 (pupa_ftoa): Likewise.
13090 (pupa_vsprintf): Added support for printing values of the type
13091 `double'. Make it possible to format variable output when using
13092 formatting like `%1.2%f'.
13093 (pupa_split_cmdline): New function.
13094 * kern/rescue.c: Include <pupa/env.h>.
13095 (next_word): Removed function.
13096 (pupa_rescue_cmd_prefix): Likewise.
13097 (pupa_rescue_cmd_set): New function.
13098 (pupa_rescue_cmd_unset): New function.
13099 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13100 split the command line instead of splitting it here. Added
13101 support for setting variables using the syntax `foo=bar'. Don't
13102 initialize the prefix command anymore. Initialized the set and
13103 unset commands.
13104 * normal/cmdline.c: Include <pupa/env.h>.
13105 (pupa_tab_complete): Added prototypes for print_simple_completion,
13106 print_partition_completion, add_completion, iterate_commands,
13107 iterate_dev, iterate_part and iterate_dir. Moved code to print
13108 partition information from here to kern/disk.c.
fe6b695a 13109 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 13110 * normal/main.c: Include <pupa/env.h>.
13111 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13112 instead of using pupa_dl_get_prefix to get the prefix.
13113 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13114 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13115 warning.
13116 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13117 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13118 ((unused))' to silence a gcc warning.
13119 (pupa_vga_setcolor): Likewise.
13120 (debug_command): Changed to match argument parsing
13121 interface changes.
13122 * util/pupa-emu.c: Include <pupa/env.h>.
13123 (options): Added 0's for unused fields to silence a gcc warning.
13124 (argp): Likewise.
13125 (main): Use the environment variable `prefix' instead of using
13126 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13127 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13128 and terminal.
13129
13130 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13131 * util/misc.c: Include <malloc.h>.
13132 (pupa_malloc): Rewritten so errors are correctly reported.
13133 (pupa_realloc): Likewise.
13134 (pupa_memalign): Likewise.
13135 (pupa_mm_init_region): Declare unused variables with
13136 `__attribute__ ((unused))' to silence a gcc warning.
13137 * normal/i386/setjmp.S: Remove tab at the end of the file to
13138 silence a gcc warning.
13139 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13140 variables with `__attribute__ ((unused))' to silence a gcc
13141 warning.
13142 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13143 local variable i unsigned to silence a gcc warning.
13144
13145 * kern/term.c: Include <pupa/misc.h>.
13146 (pupa_more_lines): New variable.
13147 (pupa_more): Likewise.
13148 (pupa_putcode): When the pager is active pause at the end of every
13149 screen.
13150 (pupa_set_more): New function.
13151 * include/pupa/term.h (pupa_set_more): New prototype.
13152
13153
3b1139cb 131542004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13155
13156 Now this project is GRUB 2 rather than PUPA. The location of
13157 the CVS repository was moved to GRUB's.
f19dbdb7 13158
3b1139cb 13159 * configure.ac: Use bug-grub as the reporting address.
13160 Use GRUB instead of PUPA.
13161 Change the version number to 1.90.
13162
8367695c 131632004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13164
13165 * genkernsyms.sh: Updated copyright information.
13166 * genmk.rb: Likewise.
13167 * genmodsrc.sh: Likewise.
13168 * gensymlist.sh: Likewise.
13169 * boot/i386/pc/boot.S: Likewise.
13170 * boot/i386/pc/diskboot.S: Likewise.
13171 * disk/i386/pc/biosdisk.c: Likewise.
13172 * disk/i386/pc/partition.c: Likewise.
13173 * font/manager.c: Likewise.
13174 * fs/ext2.c: Likewise.
13175 * fs/fat.c: Likewise.
13176 * include/pupa/boot.h: Likewise.
13177 * include/pupa/device.h: Likewise.
13178 * include/pupa/disk.h: Likewise.
13179 * include/pupa/dl.h: Likewise.
13180 * include/pupa/elf.h: Likewise.
13181 * include/pupa/err.h: Likewise.
13182 * include/pupa/file.h: Likewise.
13183 * include/pupa/font.h: Likewise.
13184 * include/pupa/fs.h: Likewise.
13185 * include/pupa/kernel.h: Likewise.
13186 * include/pupa/loader.h: Likewise.
13187 * include/pupa/misc.h: Likewise.
13188 * include/pupa/mm.h: Likewise.
13189 * include/pupa/net.h: Likewise.
13190 * include/pupa/normal.h: Likewise.
13191 * include/pupa/rescue.h: Likewise.
13192 * include/pupa/setjmp.h: Likewise.
13193 * include/pupa/symbol.h: Likewise.
13194 * include/pupa/term.h: Likewise.
13195 * include/pupa/types.h: Likewise.
13196 * include/pupa/i386/setjmp.h: Likewise.
13197 * include/pupa/i386/types.h: Likewise.
13198 * include/pupa/i386/pc/biosdisk.h: Likewise.
13199 * include/pupa/i386/pc/boot.h: Likewise.
13200 * include/pupa/i386/pc/console.h: Likewise.
13201 * include/pupa/i386/pc/init.h: Likewise.
13202 * include/pupa/i386/pc/kernel.h: Likewise.
13203 * include/pupa/i386/pc/linux.h: Likewise.
13204 * include/pupa/i386/pc/loader.h: Likewise.
13205 * include/pupa/i386/pc/memory.h: Likewise.
13206 * include/pupa/i386/pc/multiboot.h: Likewise.
13207 * include/pupa/i386/pc/partition.h: Likewise.
13208 * include/pupa/i386/pc/time.h: Likewise.
13209 * include/pupa/i386/pc/vga.h: Likewise.
13210 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13211 * include/pupa/util/getroot.h: Likewise.
13212 * include/pupa/util/misc.h: Likewise.
13213 * include/pupa/util/resolve.h: Likewise.
13214 * kern/device.c: Likewise.
13215 * kern/disk.c: Likewise.
13216 * kern/dl.c: Likewise.
13217 * kern/err.c: Likewise.
13218 * kern/file.c: Likewise.
13219 * kern/fs.c: Likewise.
13220 * kern/loader.c: Likewise.
13221 * kern/main.c: Likewise.
13222 * kern/misc.c: Likewise.
13223 * kern/mm.c: Likewise.
13224 * kern/rescue.c: Likewise.
13225 * kern/term.c: Likewise.
13226 * kern/i386/dl.c: Likewise.
13227 * kern/i386/pc/init.c: Likewise.
13228 * kern/i386/pc/lzo1x.S: Likewise.
13229 * kern/i386/pc/startup.S: Likewise.
13230 * loader/i386/pc/chainloader.c: Likewise.
13231 * loader/i386/pc/linux.c: Likewise.
13232 * loader/i386/pc/multiboot.c: Likewise.
13233 * normal/cmdline.c: Likewise.
13234 * normal/command.c: Likewise.
13235 * normal/main.c: Likewise.
13236 * normal/menu.c: Likewise.
13237 * normal/i386/setjmp.S: Likewise.
13238 * term/i386/pc/console.c: Likewise.
13239 * term/i386/pc/vga.c: Likewise.
13240 * util/console.c: Likewise.
13241 * util/genmoddep.c: Likewise.
13242 * util/misc.c: Likewise.
13243 * util/pupa-emu.c: Likewise.
13244 * util/resolve.c: Likewise.
13245 * util/unifont2pff.rb: Likewise.
13246 * util/i386/pc/biosdisk.c: Likewise.
13247 * util/i386/pc/getroot.c: Likewise.
13248 * util/i386/pc/pupa-mkimage.c: Likewise.
13249 * util/i386/pc/pupa-setup.c: Likewise.
13250
e6eced71 132512004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13252
13253 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13254 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13255 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13256 reading and reset it after reading.
13257 (pupa_ext2_close): Return PUPA_ERR_NONE.
13258
13259 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13260 Correct value.
13261 (struct linux_kernel_header): Add kernel_version and
13262 initrd_addr_max.
13263 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13264 pupa_file_read succeeds.
13265 (pupa_rescue_cmd_initrd): Implement.
13266
5aded270 132672003-12-03 Marco Gerards <metgerards@student.han.nl>
13268
13269 * fs/ext2.c (pupa_ext2_label): New function.
13270 (pupa_ext2_fs): Added label.
13271 * fs/fat.c (pupa_fat_label): New function.
13272 (pupa_fat_fs): Added label.
13273 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13274
13275 * kern/misc.c (pupa_strndup): New function.
13276 * include/pupa/misc.h (pupa_strndup): New prototype.
13277
13278 * include/pupa/normal.h: Include <pupa/err.h>.
13279 (pupa_set_history): New prototype.
13280 (pupa_iterate_commands): New prototype.
13281 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13282 <pupa/disk.h>, <pupa/file.h>.
13283 (hist_size): New variable.
13284 (hist_lines): Likewise.
13285 (hist_end): Likewise.
13286 (hist_used): Likewise.
13287 (pupa_set_history): New function.
13288 (pupa_history_get): Likewise.
13289 (pupa_history_add): Likewise.
13290 (pupa_history_replace): Likewise.
13291 (pupa_tab_complete): Likewise.
13292 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13293 completion shows partitionnames while completing partitions, this
13294 feature was suggested by Jeff Bailey.
13295 * normal/command.c (pupa_iterate_commands): New function.
13296 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13297 (pupa_normal_init): Initialize history buffer.
13298 (PUPA_MOD_INIT): Likewise.
13299 (pupa_normal_fini): Free the history buffer.
13300 (PUPA_MOD_FINI): Likewise.
13301
13302 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13303 key.
13304
13305 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13306 * configure.ac [i386]: Check for regparam bug.
13307 (NESTED_FUNC_ATTR) [! i386]: Defined.
13308
1f7315a3 133092003-11-17 Marco Gerards <metgerards@student.han.nl>
13310
13311 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13312 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13313 (pupa_emu_SOURCES): New variable.
13314 (pupa_emu_LDFLAGS): Likewise.
13315 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
13316 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
13317 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
13318 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13319 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13320 (pupa_jmp_buf): New typedef.
13321 (pupa_setjmp) [PUPA_UTIL]: New macro.
13322 (pupa_longjmp) [PUPA_UTIL]: Likewise.
13323 * include/pupa/term.h (struct pupa_term): New member `refresh'.
13324 (pupa_refresh): New prototype.
13325 * include/pupa/util/getroot.h: New file.
13326 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13327 it.
13328 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13329 (pupa_rescue_cmd_cat): Likewise.
13330 (pupa_rescue_cmd_ls): Likewise.
13331 (pupa_rescue_cmd_testload): Likewise.
13332 (pupa_rescue_cmd_lsmod): Likewise.
13333 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13334 * normal/menu.c (run_menu): Likewise.
13335 * kern/term.c (pupa_cls): Likewise.
13336 (pupa_refresh): New function.
13337 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13338 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13339 * util/console.c: New file.
f19dbdb7 13340
1f7315a3 13341 * util/i386/pc/getroot.c: New file.
13342 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13343 (pupa_putchar): New function.
13344 (pupa_refresh): Likewise.
13345 (xgetcwd): Function moved to ...
13346 (strip_extra_slashes): Likewise.
13347 (get_prefix): Likewise.
f19dbdb7 13348 * util/i386/pc/getroot.c: ... here.
1f7315a3 13349 (find_root_device): Function moved and renamed to...
13350 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13351 Changed all callers.
13352 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13353 and renamed to...
13354 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13355 Changed all callers.
13356 * util/misc.c (pupa_memalign): New function.
13357 (pupa_mm_init_region): Likewise.
13358 (pupa_register_exported_symbols): Likewise.
13359 (pupa_putchar): Function removed.
13360 * util/pupa-emu.c: New file.
13361
9a5c1ade 133622003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13363
13364 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13365 (_multiboot_mod_SOURCES): New variable.
13366 (_multiboot_mod_CFLAGS): Likewise.
13367 * loader/i386/pc/multiboot.c: New file.
13368 * include/pupa/i386/pc/multiboot.h: Likewise.
13369 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13370 (pupa_multiboot_real_boot): New function.
13371 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13372 (pupa_multiboot_real_boot): New prototype.
13373 (pupa_rescue_cmd_multiboot): Likewise
13374 (pupa_rescue_cmd_module): Likewise.
13375
13376 * kern/loader.c (pupa_loader_set): Continue when
13377 pupa_loader_unload_func() fails.
13378 (pupa_loader_unset): New function.
13379 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13380
13381 * kern/misc.c (pupa_stpcpy): New function.
13382 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13383
8e72a9c0 133842003-11-12 Marco Gerards <metgerards@student.han.nl>
13385
13386 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13387 for available extensions.
13388
13389 * include/pupa/i386/pc/time.h: New file.
13390 * kern/disk.c: Include <pupa/machine/time.h>.
13391 (PUPA_CACHE_TIMEOUT): New macro.
13392 (pupa_last_time): New variable.
13393 (pupa_disk_open): Flush the cache when there was a timeout.
13394 (pupa_disk_close): Reset the timer.
13395 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13396 pupa_currticks.
13397 * util/misc.c: Include <sys/times.h>
13398 (pupa_get_rtc): New function.
13399
c4adbd32 134002003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13401
13402 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13403 as blocks.
13404 (pupa_ext2_get_file_block): Use blocks member.
13405
13406 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13407 first block. Return -1 instead of pupa_errno on error.
13408
bfd30f06 134092003-10-27 Marco Gerards <metgerards@student.han.nl>
13410
13411 * README: In the pupa-mkimage example use _chain instead of chain
13412 and ext2 instead of fat.
13413 * TODO: Replace ext2fs with jfs as an example. Add an item for
13414 adding journal playback for ext2fs.
13415 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13416 (pkgdata_MODULES): Added ext2.mod.
13417 (ext2_mod_SOURCES): New variable.
13418 (ext2_mod_CFLAGS): Likewise.
13419 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13420 * include/pupa/misc.h (pupa_strncpy): New prototype.
13421 (pupa_strcat): Likewise.
13422 (pupa_strncmp): Likewise.
13423 * kern/misc.c (pupa_strcat): Enable function.
13424 (pupa_strncpy): New function.
13425 (pupa_strncmp): Likewise.
13426 * fs/ext2.c: New file.
f19dbdb7 13427
bfd30f06 13428 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13429 when the read failed before retrying.
13430 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13431 (_FILE_OFFSET_BITS): Likewise.
13432 * configure.ac: Added AC_SYS_LARGEFILE.
13433
98d15063 134342003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13435
13436 * genmk.rb (PModule#rule): Make sure to get only symbol names
13437 from the output of nm.
13438 Reported by Robert Millan <zeratul2@wanadoo.es>.
13439
18d9c7cd 134402003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13441
13442 I forgot to check in these changes for a long time. This adds
13443 incomplete support for VGA console, and this is still very
13444 buggy. Also, a lot of consideration is required for I18N,
13445 UNICODE, and VGA font issues. Therefore, assume that this is
13446 such that "better than nothing".
f19dbdb7 13447
18d9c7cd 13448 * font/manager.c: New file.
13449 * include/pupa/font.h: Likewise.
13450 * include/pupa/i386/pc/vga.h: Likewise.
13451 * term/i386/pc/vga.c: Likewise.
13452 * util/unifont2pff.rb: Likewise.
13453
13454 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13455 (pkgdata_MODULES): Added vga.mod and font.mod.
13456 (vga_mod_SOURCES): New variables.
13457 (vga_mod_CFLAGS): Likewise.
13458 (font_mod_SOURCES): Likewise.
13459 (font_mod_CFLAGS): Likewise.
13460
13461 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13462
13463 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 13464 (struct pupa_term): Added init and fini.
18d9c7cd 13465 Changed the argument of putchar to pupa_uint32_t.
13466
13467 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13468 (pupa_console_real_putchar): New prototype.
13469 (pupa_console_putchar): Removed.
13470 (pupa_console_checkkey): Exported.
13471 (pupa_console_getkey): Likewise.
13472
13473 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13474 characters.
13475
13476 * kern/term.c (pupa_term_set_current): Rewritten.
13477 (pupa_putchar): Likewise.
13478 (pupa_putcode): New function.
13479
13480 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13481 (pupa_console_real_putchar): ... this.
13482 (pupa_vga_set_mode): New function.
13483 (pupa_vga_get_font): Likewise.
13484
13485 * normal/command.c: Include pupa/term.h.
13486 (terminal_command): New function.
13487 (pupa_command_init): Register the command "terminal".
13488
13489 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13490 (DISP_UP): Likewise.
13491 (DISP_RIGHT): Likewise.
13492 (DISP_DOWN): Likewise.
13493 (DISP_HLINE): Likewise.
13494 (DISP_VLINE): Likewise.
13495 (DISP_UL): Likewise.
13496 (DISP_UR): Likewise.
13497 (DISP_LL): Likewise.
13498 (DISP_LR): Likewise.
13499
13500 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 13501
977329f5 135022003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13503
13504 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13505 FIX. Reverse the path_list.
13506
13507 * include/pupa/normal.h: Export pupa_register_command and
13508 pupa_unregister_command.
13509
13510 * hello/hello.c (pupa_cmd_hello): New module.
13511 * conf/i386-pc.rmk: Added hello.mod.
13512
1f5ab428 135132003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13514
13515 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 13516
1f5ab428 13517 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13518 (compress_kernel): New variable.
13519 (generate_image): Heavily modified to support compressing a
13520 large part of the core image.
13521
13522 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13523 leak.
13524 (pupa_util_load_image): New function.
13525
13526 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13527 (pupa_compressed_size): New variable.
13528 (codestart): Enable Gate A20 here.
13529 Decompress the compressed part of the core image.
13530 Rearrange the code to put functions and variables which are
13531 required for initialization in the non-compressed part.
13532 Include lzo1x.S.
13533
13534 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13535 here.
13536
13537 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13538
f19dbdb7 13539 * include/pupa/i386/pc/kernel.h
1f5ab428 13540 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13541 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13542 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13543 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13544 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13545
13546 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13547
13548 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13549 (Utility#rule): Likewise.
13550
13551 * configure.ac: Check if LZO is available.
13552
ce5bf700 135532003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13554
13555 * include/pupa/normal.h: New file.
13556 * include/pupa/setjmp.h: Likewise.
13557 * include/pupa/i386/setjmp.h: Likewise.
13558 * normal/cmdline.c: Likewise.
13559 * normal/command.c: Likewise.
13560 * normal/main.c: Likewise.
13561 * normal/menu.c: Likewise.
13562 * normal/i386/setjmp.S: Likewise.
f19dbdb7 13563
ce5bf700 13564 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13565 (pupa_rescue_cmd_initrd): Likewise.
13566
13567 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13568 Likewise.
13569
13570 * kern/i386/pc/startup.S (translation_table): New variable.
13571 (translate_keycode): New function.
13572 (pupa_console_getkey): Call translate_keycode.
13573
13574 * kern/rescue.c (attempt_normal_mode): New function.
13575 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13576 it failed, print a message.
13577
13578 * kern/mm.c (pupa_real_malloc): Print more information when a
13579 free magic is broken.
13580 (pupa_free): If the first free header is not free actually, set
13581 it to P.
13582
13583 * kern/main.c (pupa_load_normal_mode): Just load the module
13584 "normal".
13585 (pupa_main): Don't print the message
13586 "Entering into rescue mode..." here.
13587
13588 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13589 Declared.
13590 (pupa_rescue_cmd_initrd): Likewise.
13591 (pupa_rescue_cmd_initrd): Likewise.
13592
13593 * include/pupa/symbol.h (FUNCTION): Specify the type.
13594 (VARIABLE): Likewise.
13595
13596 * include/pupa/err.h (pupa_err_t): Added
13597 PUPA_ERR_UNKNOWN_COMMAND.
13598
13599 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13600 (pupa_dl_get_prefix): Likewise.
13601
13602 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13603 Added _chain.mod and _linux.mod instead of chain.mod and
13604 linux.mod.
13605 (chain_mod_SOURCES): Renamed to ...
13606 (_chain_mod_SOURCES): ... this.
13607 (chain_mod_CFLAGS): Renamed to ...
13608 (_chain_mod_CFLAGS): ... this.
13609 (linux_mod_SOURCES): Renamed to ...
13610 (_linux_mod_SOURCES): ... this.
13611 (linux_mod_CFLAGS): Renamed to ...
13612 (_linux_mod_CFLAGS): ... this.
13613 (normal_mod_SOURCES): New variable.
13614 (normal_mod_CFLAGS): Likewise.
13615 (normal_mod_ASFLAGS): Likewise.
13616
136172003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13618
13619 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13620 possible.
13621
fe6b695a 13622 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 13623 recursively.
13624 (pupa_dl_unref): Unrefer depending modules recursively.
13625 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13626 a module is unloaded before one depending on that module is
13627 unloaded.
13628 (pupa_dl_unload): Unload depending modules explicitly,
13629 if possible.
13630
c04da074 136312003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13632
13633 * include/pupa/i386/pc/linux.h: New file.
13634 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 13635
c04da074 13636 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13637 Removed.
13638 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13639 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13640 of PUPA_CHAINLOADER_BOOT_SECTOR.
13641
13642 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13643 (pupa_linux_prot_size): New variable.
13644 (pupa_linux_tmp_addr): Likewise.
13645 (pupa_linux_real_addr): Likewise.
13646 (pupa_linux_boot_zimage): New function.
13647 (pupa_linux_boot_bzimage): Likewise.
13648
13649 * kern/i386/pc/init.c (struct mem_region): New structure.
13650 (MAX_REGIONS): New macro.
13651 (mem_regions): New variable.
13652 (num_regions): Likewise.
13653 (pupa_os_area_addr): Likewise.
13654 (pupa_os_area_size): Likewise.
13655 (pupa_lower_mem): Likewise.
13656 (pupa_upper_mem): Likewise.
13657 (add_mem_region): New function.
13658 (compact_mem_regions): Likewise.
13659 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13660 the size of the conventional memory and that of so-called upper
13661 memory (before the first memory hole).
13662 Instead of adding each found region to free memory, use
13663 add_mem_region and add them after removing overlaps.
13664 Also, add only 1/4 of the upper memory to free memory. The rest
13665 is used for loading OS images. Maybe this is ad hoc, but this
13666 makes it much easier to relocate OS images when booting.
13667
13668 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13669 (pupa_enter_rescue_mode): Don't register initrd and module.
13670
13671 * kern/mm.c: Include pupa/dl.h.
13672
13673 * kern/main.c: Include pupa/file.h and pupa/device.h.
13674
13675 * kern/loader.c (pupa_loader_load_module_func): Removed.
13676 (pupa_loader_load_module): Likewise.
13677
13678 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13679 ``.o''.
13680
13681 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13682 (pupa_linux_tmp_addr): Likewise.
13683 (pupa_linux_real_addr): Likewise.
13684 (pupa_linux_boot_zimage): Likewise.
13685 (pupa_linux_boot_bzimage): Likewise.
13686
13687 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13688 (pupa_upper_mem): Likewise.
13689 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13690 module is too dangerous.
13691
13692 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13693 (pupa_os_area_size): Likewise.
13694 (pupa_loader_set): Remove the first argument. Loader doesn't
13695 manage modules or initrd any longer.
13696 (pupa_loader_load_module): Removed.
13697
13698 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13699 (linux_mod_SOURCES): New variable.
13700 (linux_mod_CFLAGS): Likewise.
13701
a13f9237 137022003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13703
13704 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13705 the length of a blocklist correctly.
13706
13707 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13708 Use ioctl only if the OS file is a block device.
13709 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13710 not very useful for normal files.
13711
13712 * kern/main.c (pupa_set_root_dev): New function.
13713 (pupa_load_normal_mode): Likewise.
13714 (pupa_main): Call those above.
13715
13716 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13717 pupa_uint16_t.
13718
13719 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13720
a5ffe966 137212003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13722
13723 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13724 (setup): Configure the installed partition information and the
13725 dl prefix.
13726
13727 * loader/i386/pc/chainloader.c (my_mod): New variable.
13728 (pupa_chainloader_unload): New function.
13729 (pupa_rescue_cmd_chainloader): Refer itself.
13730 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13731
13732 * kern/i386/pc/startup.S (install_partition): Removed.
13733 (version_string): Likewise.
13734 (config_file): Likewise.
13735 (pupa_install_dos_part): New variable.
13736 (pupa_install_bsd_part): Likewise.
13737 (pupa_prefix): Likewise.
13738 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13739
13740 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13741 and pupa/misc.h.
13742 (make_install_device): New function.
13743 (pupa_machine_init): Set the dl prefix.
13744
13745 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13746 (buf): Renamed to ...
13747 (linebuf): ... this.
13748 (pupa_rescue_cmd_prefix): New function.
13749 (pupa_rescue_cmd_insmod): Likewise.
13750 (pupa_rescue_cmd_rmmod): Likewise.
13751 (pupa_rescue_cmd_lsmod): Likewise.
13752 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13753 rmmod and lsmod.
13754
13755 * kern/mm.c (pupa_memalign): If failed even after invalidating
13756 disk caches, unload unneeded modules and retry.
13757
13758 * kern/misc.c (pupa_memmove): New function.
13759 (pupa_memcpy): Removed.
13760 (pupa_strcpy): New function.
13761 (pupa_itoa): Made static.
13762
13763 * kern/dl.c (pupa_dl_iterate): New function.
13764 (pupa_dl_ref): Likewise.
13765 (pupa_dl_unref): Likewise.
13766 (pupa_dl_unload): Return if succeeded or not.
13767 (pupa_dl_unload_unneeded): New function.
13768 (pupa_dl_unload_all): Likewise.
13769 (pupa_dl_init): Renamed to ...
13770 (pupa_dl_set_prefix): ... this.
13771 (pupa_dl_get_prefix): New function.
13772
13773 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13774 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13775 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13776 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13777 (pupa_install_dos_part): Declared.
13778 (pupa_install_bsd_part): Likewise.
13779 (pupa_prefix): Likewise.
13780 (pupa_boot_drive): Likewise.
13781
13782 * include/pupa/types.h: Fix a typo.
13783
13784 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13785 pupa_memmove.
13786 (pupa_memmove): Declared.
13787 (pupa_strcpy): Likewise.
13788
13789 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13790 pupa_mod_init takes one argument, its own module.
13791 (pupa_dl_unload_unneeded): Declared.
13792 (pupa_dl_unload_all): Likewise.
13793 (pupa_dl_ref): Likewise.
13794 (pupa_dl_unref): Likewise.
13795 (pupa_dl_iterate): Likewise.
13796 (pupa_dl_init): Renamed to ...
13797 (pupa_dl_set_prefix): ... this.
13798 (pupa_dl_get_prefix): Declared.
13799
13800 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 13801 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 13802 unloaded.
13803 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13804 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13805
13806 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13807 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13808
012d7999 138092003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13810
13811 * util/i386/pc/pupa-setup.c (setup): Define the internal
13812 function find_first_partition_start at the top level, because GCC
13813 3.0.x cannot compile internal functions in deeper scopes
13814 correctly.
13815 (find_root_device): Use lstat instead of stat.
13816 Don't follow symbolic links.
13817 Fix the path-constructing code.
13818
13819 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13820 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13821 by a BLKGETSIZE ioctl first, because block devices don't fill
13822 the member st_mode of the structure stat on Linux.
13823 [__linux__] (linux_find_partition): Use a temporary buffer
13824 REAL_DEV for the working space. Copy it to DEV before returning.
13825 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13826 buffer cache consistent.
13827 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13828 strncmp. The previous value was merely wrong.
13829 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13830
13831 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13832 FAT size is 12. The previous value was merely wrong.
13833
13834 * kern/main.c (pupa_main): Don't split the starting message from
13835 newlines.
13836
13837 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13838 LF, because BIOS goes crazy about character attributes in this
13839 case.
13840
1cc73a62 138412003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13842
13843 * include/i386/pc/util/biosdisk.h: New file.
13844 * util/i386/pc/biosdisk.c: Likewise.
13845 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 13846
1cc73a62 13847 * Makefile.in (INCLUDE_DISTFILES): Added
13848 include/pupa/i386/pc/util/biosdisk.h.
13849 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13850 directory util/i386/pc.
13851 (install-local): Added a rule for sbin_UTILITIES.
13852 (uninstall): Likewise.
13853
13854 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13855
13856 * util/misc.c (xrealloc): New function.
13857 (pupa_malloc): Likewise.
13858 (pupa_free): Likewise.
13859 (pupa_realloc): Likewise.
13860 (pupa_stop): Likewise.
13861 (pupa_putchar): Likewise.
13862
13863 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13864
13865 * include/pupa/util/misc.h (xrealloc): Declared.
13866
13867 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13868 macro.
13869 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13870 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13871
13872 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13873 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13874
13875 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13876 way should be implemented.
13877 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13878
13879 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13880 the size of NAME for safety.
13881 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13882 0x88.
13883
13884 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13885 (pupa_setup_SOURCES): Likewise.
13886
13887 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13888
08b70fe8 138892002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13890
13891 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13892 bunch of pushl's from pusha, because this destroys the return
13893 value.
13894
62ddcc8f 138952002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13896
13897 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13898 This means that any missing prototypes could be fatal. Also, you
13899 must take care when writing assembly code. See the comments at
13900 the beginning of startup.S, for more details.
f19dbdb7 13901
62ddcc8f 13902 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13903 compilation mechanism.
13904 (pupa_chainloader_real_boot): Likewise.
13905 (pupa_biosdisk_rw_int13_extensions): Likewise.
13906 (pupa_biosdisk_rw_standard): Likewise.
13907 (pupa_biosdisk_check_int13_extensions): Likewise.
13908 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13909 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13910 (pupa_get_memsize): Likewise.
13911 (pupa_get_mmap_entry): Likewise.
13912 (pupa_console_putchar): Likewise.
13913 (pupa_console_setcursor): Likewise.
13914 (pupa_getrtsecs): Use pushl instead of push.
13915
13916 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13917 memory instead of the stack for a mmap entry, because some
13918 BIOSes may ignore the maximum size and overflow.
13919
13920 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13921
13922 * genmk.rb (PModule#rule): Compile automatically generated
13923 sources with module-specific CFLAGS as well as other sources.
13924
9962ed99 139252002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13926
13927 * configure.ac: Check ld.
13928 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13929 respectively, before checking endianness and sizes.
13930
13931 * Makefile.in (LD): New variable.
f19dbdb7 13932
abdfc3c5 139332002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13934
13935 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13936
6a161fa9 139372002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13938
13939 * Changelog: New file.
13940