]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-01-19 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
3e643f8c 12009-01-19 Robert Millan <rmh@aybabtu.com>
2
3 * config.guess: Update to latest version from config git.
4 * config.sub: Likewise.
5
4fa80998 62009-01-17 Felix Zielcke <fzielcke@z-51.de>
7
8 * Makefile.in: Change font compilation to use new grub-mkfont instead
9 of java version.
10
11 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
12 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
13 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
14 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
15 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
16 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
17 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
18 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
19 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
20
7086085b 212009-01-16 Christian Franke <franke@computer.org>
22
23 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
24 (enum grub_ata_timeout_milliseconds): New enum.
25 (grub_ata_wait_status): Add parameter milliseconds.
26 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
27 recovery from timed-out commands.
28 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
29 return grub_errno instead of REG_ERROR.
30 (grub_ata_pio_write): Add parameter milliseconds.
31 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
32 Pass milliseconds to grub_ata_wait_status () and
33 grub_ata_pio_read ().
34 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
35 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
36 grub_ata_wait_status (). Fix IDENTIFY timeout check.
37 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
38 It is not suitable for device detection, because DEV bit is ignored,
39 the command may run too long, and not all devices set the signature
40 properly.
41 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
42 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
43 Fix device selection, DEV bit must be set first to address the registers
44 of the correct device.
45 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
46 grub_ata_pio_read/write ().
47 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
48 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
49
4a412913 502009-01-13 Carles Pina i Estany <carles@pina.cat>
51
52 * util/grub-editenv.c (main): Use fseeko(), not fseek().
53
7795c55e 542009-01-13 Bean <bean123ch@gmail.com>
d913988c 55
56 * util/grub-mkfont.c (write_font): forget to remove some debug code.
57
7795c55e 582009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 59
60 * Makefile.in: (enable_grub_mkfont): New variable.
61 (freetype_cflags): Likewise.
62 (freetype_libs): Likewise.
63
64 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
65 (grub_mkfont_SOURCES): New variable.
66 (grub_mkfont_CFLAGS): Likewise.
67 (grub_mkfont_LDFLAGS): Likewise.
68
69 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
70 library if `--enable-grub-mkfont' is requested.
71 (enable_grub_mkfont): New variable.
72 (freetype_cflags): Likewise.
73 (freetype_libs): Likewise.
74
75 * util/grub-mkfont.c: New file.
76
093af1fe 772009-01-12 Christian Franke <franke@computer.org>
78
79 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
80 mode check. Fix setting of compat_use[].
81
f36cc108 822009-01-10 Robert Millan <rmh@aybabtu.com>
83
84 Update a few copyright years which we forgot to do in 2008 (only for
85 files whose changes made in 2008 were copyright-significant)
86
87 * Makefile.in: Add 2008 to Copyright line.
88 * disk/ieee1275/ofdisk.c: Likewise.
89 * disk/efi/efidisk.c: Likewise.
90 * kern/dl.c: Likewise.
91 * kern/sparc64/ieee1275/init.c: Likewise.
92 * kern/mm.c: Likewise.
93 * kern/efi/mm.c: Likewise.
94 * boot/i386/pc/boot.S: Likewise.
95 * genfslist.sh: Likewise.
96 * fs/iso9660.c: Likewise.
97 * fs/hfs.c: Likewise.
98 * fs/jfs.c: Likewise.
99 * fs/minix.c: Likewise.
100 * fs/ufs.c: Likewise.
101 * gensymlist.sh.in: Likewise.
102 * genkernsyms.sh.in: Likewise.
103 * include/grub/misc.h: Likewise.
104 * include/grub/types.h: Likewise.
105 * include/grub/symbol.h: Likewise.
106 * include/grub/elf.h: Likewise.
107 * include/grub/kernel.h: Likewise.
108 * include/grub/disk.h: Likewise.
109 * include/grub/dl.h: Likewise.
110 * include/grub/i386/linux.h: Likewise.
111 * include/grub/i386/pc/biosdisk.h: Likewise.
112 * include/grub/efi/api.h: Likewise.
113 * include/grub/efi/pe32.h: Likewise.
114 * include/grub/util/misc.h: Likewise.
115 * normal/execute.c: Likewise.
116 * normal/arg.c: Likewise.
117 * normal/completion.c: Likewise.
118 * normal/lexer.c: Likewise.
119 * normal/parser.y: Likewise.
120 * normal/misc.c: Likewise.
121 * commands/i386/pc/vbeinfo.c: Likewise.
122 * commands/hexdump.c: Likewise.
123 * commands/terminal.c: Likewise.
124 * commands/ls.c: Likewise.
125 * commands/help.c: Likewise.
126 * partmap/pc.c: Likewise.
127 * loader/efi/chainloader.c: Likewise.
128 * loader/multiboot_loader.c: Likewise.
129 * loader/i386/pc/multiboot2.c: Likewise.
130 * term/efi/console.c: Likewise.
131 * term/i386/pc/serial.c: Likewise.
132 * util/lvm.c: Likewise.
133 * util/console.c: Likewise.
134 * util/i386/efi/grub-mkimage.c: Likewise.
135 * util/raid.c: Likewise.
136
7f02114b 1372009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
138
139 * commands/videotest.c: Removed include to grub/machine/memory.h.
140
141 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
142 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
143 (video_mod_SOURCES): Removed.
144 (video_mod_CFLAGS): Likewise.
145 (video_mod_LDFLAGS): Likewise.
146 (gfxterm_mod_SOURCES): Likewise.
147 (gfxterm_mod_CFLAGS): Likewise.
148 (gfxterm_mod_LDFLAGS): Likewise.
149 (videotest_mod_SOURCES): Likewise.
150 (videotest_mod_CFLAGS): Likewise.
151 (videotest_mod_LDFLAGS): Likewise.
152 (bitmap_mod_SOURCES): Likewise.
153 (bitmap_mod_CFLAGS): Likewise.
154 (bitmap_mod_LDFLAGS): Likewise.
155 (tga_mod_SOURCES): Likewise.
156 (tga_mod_CFLAGS): Likewise.
157 (tga_mod_LDFLAGS): Likewise.
158 (jpeg_mod_SOURCES): Likewise.
159 (jpeg_mod_CFLAGS): Likewise.
160 (jpeg_mod_LDFLAGS): Likewise.
161 (png_mod_SOURCES): Likewise.
162 (png_mod_CFLAGS): Likewise.
163 (png_mod_LDFLAGS): Likewise.
164
165 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
166 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
167 (video_mod_SOURCES): Added.
168 (video_mod_CFLAGS): Likewise.
169 (video_mod_LDFLAGS): Likewise.
170 (videotest_mod_SOURCES): Likewise.
171 (videotest_mod_CFLAGS): Likewise.
172 (videotest_mod_LDFLAGS): Likewise.
173 (bitmap_mod_SOURCES): Likewise.
174 (bitmap_mod_CFLAGS): Likewise.
175 (bitmap_mod_LDFLAGS): Likewise.
176 (tga_mod_SOURCES): Likewise.
177 (tga_mod_CFLAGS): Likewise.
178 (tga_mod_LDFLAGS): Likewise.
179 (jpeg_mod_SOURCES): Likewise.
180 (jpeg_mod_CFLAGS): Likewise.
181 (jpeg_mod_LDFLAGS): Likewise.
182 (png_mod_SOURCES): Likewise.
183 (png_mod_CFLAGS): Likewise.
184 (png_mod_LDFLAGS): Likewise.
185 (gfxterm_mod_SOURCES): Likewise.
186 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 187 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 188
189 * term/gfxterm.c: Removed include to grub/machine/memory.h,
190 grub/machine/console.h.
191
644fff97 1922009-01-04 Jerone Young <jerone@gmail.com>
193
194 Make on screen instructions clearer
195
196 Based on patch created by Jidanni <jidanni@jidanni.org>
197
198 * normal/menu.c: print clearer instructions on the screen
199
1e901a75 2002009-01-02 Colin D Bennett <colin@gibibit.com>
201
202 New font engine.
34c44600 203
1e901a75 204 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
205 build system and fixed gfxterm.c to work with different sized fonts.
206
207 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 208
1e901a75 209 * configure: Re-generated.
34c44600 210
1e901a75 211 * DISTLIST: Removed font/manager.c.
212 Added font/font.c.
213 Added font/font_cmd.c.
34c44600 214
1e901a75 215 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
216 compilation.
34c44600 217
1e901a75 218 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 219
220 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 221
222 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 223
1e901a75 224 * normal/menu.c: Likewise.
34c44600 225
1e901a75 226 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
227 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 228
1e901a75 229 * include/grub/font.h: Replaced with new file.
34c44600 230
1e901a75 231 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
232 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
233 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
234 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
235 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 236 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 237 fg_red, fg_green, fg_blue, fg_alpha.
238 (grub_video_adapter): Removed blit_glyph.
34c44600 239 (grub_video_blit_glyph): Removed.
240
1e901a75 241 * font/manager.c: Removed file.
34c44600 242
243 * font/font.c: New file.
244
1e901a75 245 * font/font_cmd.c: Likewise.
34c44600 246
1e901a75 247 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 248
1e901a75 249 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
250 (grub_video_vbe_map_rgba): Likewise.
251 (grub_video_vbe_unmap_color_int): Likewise.
252 (grub_video_vbe_blit_glyph): Removed.
253 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 254
1e901a75 255 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
256 (get_pixel): Likewise.
34c44600 257 (set_pixel): Likewise.
258
1e901a75 259 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 260
1e901a75 261 * term/gfxterm.c: Adapted to new font engine.
34c44600 262
1e901a75 263 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 264
1e901a75 265 * term/i386/pc/vga.c: Likewise.
34c44600 266
1e901a75 267 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 268
1e901a75 269 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 270
1e901a75 271 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 272
1e901a75 273 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 274
1e901a75 275 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 276
1e901a75 277 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 278
1e901a75 279 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 280
1e901a75 281 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 282
1e901a75 283 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
284
285 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 286
1e901a75 287 * util/grub-mkconfig_lib.in: Changed font extension.
288
278922e8 2892008-12-28 Felix Zielcke <fzielcke@z-51.de>
290
291 * util/getroot.c (grub_util_get_grub_dev): Add support for
292 /dev/md/dNNpNN style partitionable mdraid devices.
293
3ced05cf 2942008-12-12 Alex Smith <alex@alex-smith.me.uk>
295
296 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
297 at a time limit of the PXE TFTP API correctly.
298 (grub_pxefs_close): Likewise.
299
7fd0ee30 3002008-11-29 Robert Millan <rmh@aybabtu.com>
301
34c44600 302 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 303 grub_ata_device_initialize() calls.
304
34c44600 3052008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 306
307 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
308 iteration failed.
309 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
310
89313780 3112008-11-28 Robert Millan <rmh@aybabtu.com>
312
313 Fix build on powerpc-ieee1275. Based on patch created by
314 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
315 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
316 `kern/ieee1275/mmap.c'.
317 * include/grub/powerpc/ieee1275/memory.h: New file.
318
15257703 319 Provide grub-install on coreboot.
320 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
321 (grub_install_SOURCES): New variable.
322 * util/i386/pc/grub-install.in: Add a few condition checks to make it
323 usable on coreboot.
324
9fc5388a 3252008-11-25 Felix Zielcke <fzielcke@z-51.de>
326
327 * util/grub-fstest.c (grub_term_get_current_input): Change return type
328 to `grub_term_input_t'.
329 (grub_term_get_current_output): Change return type to
330 `grub_term_output_t'.
331
bc3a2f31 3322008-11-22 Robert Millan <rmh@aybabtu.com>
333
34c44600 334 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 335 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
336 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
337 grub_vga_text_cls().
338
80fc88f2 339 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 340 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 341
cbf36fd3 342 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
343 to 0x200000 (avoids trouble with some OFW implementations, and matches
344 with the one in Yaboot).
345 Reported by Manoel Abranches
346
73e8e268 3472008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 348
349 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
350 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
351
73e8e268 352 * util/grub-mkconfig_lib.in (grub_warn): New function.
353 (convert_system_path_to_grub_path): Use grub_warn() when issuing
354 warnings, to obtain consistent formatting.
355 * util/grub.d/00_header.in: Likewise.
356 * util/update-grub_lib.in: Likewise.
357
e94045a1 358 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 359 Move comment text to `#error' stanza.
e94045a1 360
79d29fd7 361 Harmonize ieee1275's grub_available_iterate() with the generic
362 grub_machine_mmap_iterate() interface (fixes a recently-introduced
363 build problem on i386-ieee1275):
364 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
365 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
366 parameter `type'. Update all users of this function.
367 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
368 `kern/ieee1275/mmap.c'.
369 * kern/ieee1275/init.c
370 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
371 with ...
372 (grub_machine_mmap_iterate): ... this.
373 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
374 return type to `grub_err_t'. Update all implementations of this
375 function prototype.
376 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
377 Likewise.
378
60d6b16e 379 Add `lsmmap' command (lists firmware-provided memory map):
380 * commands/lsmmap.c: New file.
381 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
382 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
383 variables.
384 * conf/powerpc-ieee1275.rmk: Likewise.
385 * conf/i386-coreboot.rmk: Likewise.
386 * conf/i386-ieee1275.rmk: Likewise.
387
ebaaf49b 3882008-11-19 Robert Millan <rmh@aybabtu.com>
389
390 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 391 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
392 constraints to initrd allocation (based on code from
393 loader/i386/pc/linux.c). Without them, initrd was allocated too high
394 for Linux to find it.
ebaaf49b 395
dfab719f 3962008-11-14 Robert Millan <rmh@aybabtu.com>
397
398 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
399 order to cope with duplicate slashes.
400
10fc3eb9 4012008-11-14 Robert Millan <rmh@aybabtu.com>
402
403 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
404 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
405 don't want to mess with lower memory, because it is used in the Linux
406 loader.
407
408 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 409 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 410 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
411 is in our heap (probably as a result of it being corrupted during
2f2a3442 412 decompression). Add #error instance with comment to explain why this
413 loader isn't currently usable on PC/BIOS.
10fc3eb9 414
e2e07847 4152008-11-14 Robert Millan <rmh@aybabtu.com>
416
417 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 418 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 419
fe8e8d69 4202008-11-12 Robert Millan <rmh@aybabtu.com>
421
422 Make loader/i386/linux.c buildable on i386-pc (although disabled).
423
424 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
425 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
426 from here ...
427 * include/grub/i386/pc/memory.h: ... to here.
428
976b07d0 4292008-11-12 Robert Millan <rmh@aybabtu.com>
430
431 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
432 split).
433
434 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
435 (grub_console_cur_color, grub_console_real_putchar)
436 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
437 (grub_console_setcolorstate, grub_console_setcolor)
438 (grub_console_getcolor): Move from here ...
439 * include/grub/i386/vga_common.h: ... to here (new file).
440
441 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
442 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
443 `<grub/i386/io.h>'.
444 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
445 `<grub/i386/vga_common.h>'.
446
76679cd3 4472008-11-12 Robert Millan <rmh@aybabtu.com>
448
449 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
450 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
451 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
452 variables.
453 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
454 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
455
456 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
457 grub_console_init() with call to grub_vga_text_init().
458 (grub_machine_fini): Replace call to
459 grub_console_fini() with call to grub_vga_text_fini() and
460 grub_at_keyboard_fini().
461
462 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
463 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
464 (grub_console_setcolorstate, grub_console_setcolor)
465 (grub_console_getcolor): New function prototypes.
466
467 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
468 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
469 (grub_vga_text_setcursor): Static-ize.
470 (grub_vga_text_term): New structure.
471 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
472
473 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
474 (grub_console_cur_color, grub_console_standard_color)
475 (grub_console_normal_color, grub_console_highlight_color)
476 (map_char, grub_console_putchar, grub_console_getcharwidth)
477 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
478 (grub_console_getcolor): Move from here ...
479 * term/i386/vga_common.c: ... to here (same function names).
480
95b841d3 4812008-11-12 Robert Millan <rmh@aybabtu.com>
482
483 Use newly-added Multiboot support in coreboot.
484
485 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
486 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
487
488 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
489 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
490 (codestart): Store the MBI in `startup_multiboot_info' when we're
491 being loaded using Multiboot.
492
493 * kern/i386/coreboot/init.c (grub_machine_init): Move
494 grub_at_keyboard_init() call to beginning of function (useful for
495 debugging). Call grub_machine_mmap_init() before attempting to use
496 grub_machine_mmap_iterate().
497 (grub_lower_mem, grub_upper_mem): Move from here ...
498 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
499 here (new file).
500
501 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
502 function prototype.
503
761ca975 5042008-11-12 Robert Millan <rmh@aybabtu.com>
505
506 Fix a regression introduced by the at_keyboard.mod split. Because
507 some terminals are default on some platforms and non-default on
508 others, the first terminal being registered determines which is
509 going to be default.
510
511 * kern/term.c (grub_term_register_input): If this is the first
512 terminal being registered, set it as the current one.
513 (grub_term_register_output): Likewise.
514
515 * term/efi/console.c (grub_console_init): Do not call
516 grub_term_set_current_output() or grub_term_set_current_input().
517 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
518 * term/i386/pc/console.c (grub_console_init): Likewise.
519 (grub_console_fini): Do not call grub_term_set_current_input()
520 (but leave grub_term_set_current_output() to restore text mode).
521
6c529df7 5222008-11-10 Robert Millan <rmh@aybabtu.com>
523
524 * util/grub.d/00_header.in: Add backward compatibility check for
525 versions of terminal.mod that don't understand `terminal_input' or
526 `terminal_output'.
527
132e4113 5282008-11-09 Robert Millan <rmh@aybabtu.com>
529
530 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
531 `terminal_input' / `terminal_output', not `terminal'.
532
ac293d50 5332008-11-08 Robert Millan <rmh@aybabtu.com>
534
535 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 536 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 537
0025933a 5382008-11-08 Robert Millan <rmh@aybabtu.com>
539
540 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 541 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 542 members. Update all users.
543 * util/console.c (grub_ncurses_term): Split in ...
544 (grub_ncurses_term_input): ... this, and ...
545 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 546 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 547
37c86336 5482008-11-08 Robert Millan <rmh@aybabtu.com>
549
550 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
551 (PKGDATA): Add $(pkgdata_SRCDIR).
552 (pkglib_BUILDDIR): New variable.
553 (pkgdata_SRCDIR): New variable.
554 (build_env.mk): New target.
555 (include_DATA): New variable.
556 (install-local): Install $(include_DATA) files in $(includedir).
557
b6c15a2d 5582008-11-07 Pavel Roskin <proski@gnu.org>
559
d99d46f1 560 * gendistlist.sh: Use C locale for sorting to ensure consistent
561 output on all systems.
562
b6c15a2d 563 * util/grub.d/00_header.in: Remove incorrect space before
564 "serial".
565
c32ee8c9 5662008-11-07 Robert Millan <rmh@aybabtu.com>
567
568 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
569 per specification.
570 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
571 * loader/multiboot_loader.c (find_multi_boot2_header): New function
572 (based on find_multi_boot1_header).
573 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
574 using find_multi_boot2_header(), and abort if neither Multiboot or
575 Multiboot headers were found.
576
651c29b7 5772008-11-07 Robert Millan <rmh@aybabtu.com>
578
579 Modularize at_keyboard.mod:
580
581 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
582 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
583 (at_keyboard_mod_LDFLAGS): New variables.
584
585 Actual terminal split:
586
587 * include/grub/term.h (struct grub_term): Split in ...
588 (struct grub_term_input): ... this, and ...
589 (struct grub_term_output): ... this. Update all users.
590 (grub_term_set_current): Split in ...
591 (grub_term_set_current_input): ... this, and ...
592 (grub_term_set_current_output): ... this.
593 (grub_term_get_current): Split in ...
594 (grub_term_get_current_input): ... this, and ...
595 (grub_term_get_current_output): ... this.
596 (grub_term_register): Split in ...
597 (grub_term_register_input): ... this, and ...
598 (grub_term_register_output): ... this.
599 (grub_term_unregister): Split in ...
600 (grub_term_unregister_input): ... this, and ...
601 (grub_term_unregister_output): ... this.
602 (grub_term_iterate): Split in ...
603 (grub_term_iterate_input): ... this, and ...
604 (grub_term_iterate_output): ... this.
605
606 * kern/term.c (grub_term_list): Split in ...
607 (grub_term_list_input): ... this, and ...
608 (grub_term_list_output): ... this. Update all users.
609 (grub_cur_term): Split in ...
610 (grub_cur_term_input): ... this, and ...
611 (grub_cur_term_output): ... this. Update all users.
612 (grub_term_set_current): Split in ...
613 (grub_term_set_current_input): ... this, and ...
614 (grub_term_set_current_output): ... this.
615 (grub_term_get_current): Split in ...
616 (grub_term_get_current_input): ... this, and ...
617 (grub_term_get_current_output): ... this.
618 (grub_term_register): Split in ...
619 (grub_term_register_input): ... this, and ...
620 (grub_term_register_output): ... this.
621 (grub_term_unregister): Split in ...
622 (grub_term_unregister_input): ... this, and ...
623 (grub_term_unregister_output): ... this.
624 (grub_term_iterate): Split in ...
625 (grub_term_iterate_input): ... this, and ...
626 (grub_term_iterate_output): ... this.
627
628 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
629 a check for input and one for output (and only attempt to get keys
630 from user when input works).
631
632 * util/grub-probe.c (grub_term_get_current): Split in ...
633 (grub_term_get_current_input): ... this, and ...
634 (grub_term_get_current_output): ... this.
635 * util/grub-fstest.c: Likewise.
636 * util/i386/pc/grub-setup.c: Likewise.
637 * util/grub-editenv.c: Likewise.
638
639 Portability adjustments:
640
641 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
642 `term/i386/pc/at_keyboard.c'.
643 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
644 grub_keyboard_controller_init() (now handled by terminal .init).
645 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
646 grub_at_keyboard_init().
647 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
648 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
649 at_keyboard.mod via input terminal interface).
650 * include/grub/i386/coreboot/console.h: Convert into a stub for
651 `<grub/i386/pc/console.h>'.
652
653 Migrate full terminals to new API:
654
655 * term/efi/console.c (grub_console_term): Split into ...
656 (grub_console_term_input): ... this, and ...
657 (grub_console_term_output): ... this. Update all users.
658 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
659 (grub_ofconsole_init): Split into ...
660 (grub_ofconsole_init_input): ... this, and ...
661 (grub_ofconsole_init_output): ... this.
662 (grub_ofconsole_term): Split into ...
663 (grub_ofconsole_term_input): ... this, and ...
664 (grub_ofconsole_term_output): ... this. Update all users.
665 * term/i386/pc/serial.c (grub_serial_term): Split into ...
666 (grub_serial_term_input): ... this, and ...
667 (grub_serial_term_output): ... this. Update all users.
668 * term/i386/pc/console.c (grub_console_term): Split into ...
669 (grub_console_term_input): ... this, and ...
670 (grub_console_term_output): ... this. Update all users.
671 (grub_console_term_input): Only enable it on PC/BIOS platform.
672 (grub_console_init): Remove grub_keyboard_controller_init() call.
673
674 Migrate input terminals to new API:
675
676 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
677 `i386' and `i386/pc' to enable build on x86_64 (this driver is
678 i386-specific anyway).
679 (grub_console_checkkey): Rename to ...
680 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
681 users.
682 (grub_keyboard_controller_orig): New variable.
683 (grub_console_getkey): Rename to ...
684 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
685 users.
686 (grub_keyboard_controller_init): Static-ize. Save original
687 controller value so that it can be restored ...
688 (grub_keyboard_controller_fini): ... here (new function).
689 (grub_at_keyboard_term): New structure.
690 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
691 functions.
692
693 Migrate output terminals to new API:
694
695 * term/i386/pc/vga.c (grub_vga_term): Change type to
696 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
697 members. Update all users.
698 * term/gfxterm.c (grub_video_term): Change type to
699 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
700 members. Update all users.
701 * include/grub/i386/pc/console.h (grub_console_checkkey)
702 (grub_console_getkey): Do not export (no longer needed by gfxterm,
703 etc).
704
705 Migrate `terminal' command and userland tools to new API:
706
707 * commands/terminal.c (grub_cmd_terminal): Split into ...
708 (grub_cmd_terminal_input): ... this, and ...
709 (grub_cmd_terminal_output): ... this.
710 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
711 `terminal_input' and `terminal_output'.
712 * util/grub.d/00_header.in: Adjust `terminal' calls to new
713 `terminal_input' / `terminal_output' API.
714 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
715 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
716 provided ${GRUB_TERMINAL}, convert it).
717
96e5d876 7182008-11-04 Robert Millan <rmh@aybabtu.com>
719
720 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
721 for FreeBSD.
722 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
723
556f3775 7242008-11-03 Bean <bean123ch@gmail.com>
725
726 * kern/elf.c (grub_elf32_load): Revert to previous code.
727 (grub_elf64_load): Likewise.
728
729 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
730
926b9823 7312008-11-01 Robert Millan <rmh@aybabtu.com>
732
733 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
734 (TARGET_CPPFLAGS): Likewise.
735 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
736
1432e958 7372008-11-01 Carles Pina i Estany <carles@pina.cat>
738
739 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
740
dba3f844 7412008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 742
743 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
744 addition of objects until the code is not going to be able to fail.
745
dba3f844 7462008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 747
748 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
749 (add a missing NULL check, and correct them by moving the pointer
750 operations after the actual check).
751
7ab28c21 7522008-10-29 Robert Millan <rmh@aybabtu.com>
753
754 * util/i386/pc/grub-install.in: Handle empty string as output from
755 make_system_path_relative_to_its_root().
756
1b7748eb 7572008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
758
759 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
760 circular metadata worst case scenario. If the metadata is circular
761 then copy the wrap in place.
762 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
763 project lib/format_text/layout.h
764 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
765
c9618ab2 7662008-10-03 Felix Zielcke <fzielcke@z-51.de>
767
7a36edca 768 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 769
bf981c62 7702008-10-03 Felix Zielcke <fzielcke@z-51.de>
771
772 * util/update-grub_lib.in: Mention filename in warning message.
773
6d994591 7742008-09-29 Felix Zielcke <fzielcke@z-51.de>
775
776 * NEWS: Update for rename of update-grub to grub-mkconfig.
777
18ade780 7782008-09-29 Felix Zielcke <fzielcke@z-51.de>
779
780 * util/update-grub_lib.in: Copy to ...
781 * util/grub-mkconfig_lib.in: ... this. Update all users.
782 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
783 * util/update-grub.in: Rename to ...
784 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
785 option. Add `--output' option to allow users to specify the generated
786 configuration file. Default to stdout.
787 (update_grub_dir): Rename to ...
788 (grub_mkconfig_dir): ... this.
789 (grub_cfg): Default to an empty string.
790 * conf/common.rmk (update-grub): Rename to ...
791 (grub-mkconfig): ... this.
792 (update-grub_lib): Copy to ...
793 (grub-mkconfig_lib): ... this.
794 (update-grub_SCRIPTS): Copy to ...
795 (grub-mkconfig_SCRIPTS): ... this. Update all users.
796 (update-grub_DATA): Rename to ...
797 (grub-mkconfig_DATA): ... this.
798
556ce6ac 7992008-09-28 Robert Millan <rmh@aybabtu.com>
800
801 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
802 to `modified'. Add the real `created' field.
803 (grub_iso9660_uuid): Use `modified' rather than `created' for
804 constructing the UUID.
805
8062008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 807
808 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
809 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
810
92274e85 8112008-09-28 Bean <bean123ch@gmail.com>
812
813 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
814 Thanks to Christian Franke for finding this bug.
815
add6f17a 8162008-09-25 Robert Millan <rmh@aybabtu.com>
817
818 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
819 instances of grub_util_get_disk_name() (see previous commit).
820
d2a367b8 8212008-09-25 Robert Millan <rmh@aybabtu.com>
822
823 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
824 `util/i386/get_disk_name.c'.
825 * conf/i386-efi.rmk: Likewise.
826 * conf/x86_64-efi.rmk: Likewise.
827 * conf/i386-coreboot.rmk: Likewise.
828 * conf/i386-ieee1275.rmk: Likewise.
829 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
830 `util/ieee1275/get_disk_name.c'.
831 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
832 * util/ieee1275/get_disk_name.c: Remove file.
833 * util/i386/get_disk_name.c: Remove file.
834 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
835 "hd%d" for device.map entries, rather than using
836 grub_util_get_disk_name().
837
81a06771 8382008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 839
840 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
841 warning.
842 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
843
5a004279 8442008-09-24 Carles Pina i Estany <carles@pina.cat>
845
846 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
847 Changed to 0x5100.
848 (GRUB_TERM_PPAGE): Changed to 0x4900.
849
397093d3 8502008-09-24 Robert Millan <rmh@aybabtu.com>
851
852 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
853 macros (they were i386-pc specific).
854 * include/grub/sparc64/ieee1275/console.h: Likewise.
855 * include/grub/efi/console.h: Likewise.
856
a91b6c7c 8572008-09-22 Bean <bean123ch@gmail.com>
858
859 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
860 resident and in attribute list.
861
862 * include/grub/ntfs.h (BMP_LEN): Removed.
863
c40fd116 8642008-09-22 Bean <bean123ch@gmail.com>
865
81a06771 866 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 867 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
868
869 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
870 error occurs, as grub_disk_open will call grub_disk_close, which will
871 call p->close (scsi).
872
81a06771 8732008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 874
875 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
876 (AC_PREREQ): Bumped to 2.59.
877 (AC_TRY_COMPILE): Replace obsolete macro with ...
878 (AC_COMPILE_IFELSE): ... this.
879 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
880 (AC_LINK_IFELSE): ... this.
881
5dc43410 8822008-09-21 Felix Zielcke <fzielcke@z-51.de>
883
884 * autogen.sh: Add a call to `gendistlist.sh'.
885
9035dce4 8862008-09-19 Christian Franke <franke@computer.org>
887
888 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
889 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
890 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
891 Export __enable_execute_stack() to modules.
892 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
893 New function.
894
7fd75377 8952008-09-09 Felix Zielcke <fzielcke@z-51.de>
896
040030b3 897 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
898 Sort the list.
899
9002008-09-09 Felix Zielcke <fzielcke@z-51.de>
901
902 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 903 #include <grub/util/hostdisk.h>.
904
89d5ffcf 9052008-09-08 Robert Millan <rmh@aybabtu.com>
906
907 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
908 segments when their filesz is zero (grub_file_read() interprets
81a06771 909 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 910 Use `lowest_segment' rather than 0 for calculating the current
911 segment load address.
912
40da438f 9132008-09-08 Robert Millan <rmh@aybabtu.com>
914
915 * util/hostdisk.c (open_device): Replace a grub_util_info() call
916 with grub_dprintf("hostdisk", ...), as it was so verbose that it
917 clobbered useful information.
918
ddbf5556 9192008-09-08 Robert Millan <rmh@aybabtu.com>
920
921 * include/grub/util/biosdisk.h: Move to ...
922 * include/grub/util/hostdisk.h: ... here. Update all users.
923 * util/biosdisk.c: Move to ...
924 * util/hostdisk.c: ... here. Update all users.
925
783d0f48 9262008-09-07 Robert Millan <rmh@aybabtu.com>
927
928 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
929 variables.
930 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
931 and length can be stored directly in the `mbi->mmap_addr' and
932 `mbi->mmap_length' struct fields.
933
548e2ea5 9342008-09-07 Robert Millan <rmh@aybabtu.com>
935
936 * conf/i386.rmk: New file. Provides declaration for building
937 `cpuid.mod'.
938 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
939 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
940 variables.
941 Include `conf/i386.mk'.
942 * conf/i386-efi.rmk: Likewise.
943 * conf/x86_64-efi.rmk: Likewise.
944 * conf/i386-coreboot.rmk: Likewise.
945 * conf/i386-ieee1275.rmk: Likewise.
946
0ea85a37 9472008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
948
949 Based on patch created by Colin D Bennett <colin@gibibit.com>.
950 Adds optimization support for BGR based modes.
951
952 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
953 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
954 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
955 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
956 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
957 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
958 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
959 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
960 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
961 (grub_video_i386_vbeblit_index_index): Likewise.
962 (grub_video_i386_vbeblit_replace_directN): Added.
963 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
964 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
965 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
966 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
967 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
968 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 969 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 970 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
971 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
972 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
973 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
974 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
975 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
976
977 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
978 (grub_video_i386_vbefill_R8G8B8): Likewise.
979 (grub_video_i386_vbefill_index): Likewise.
980 (grub_video_i386_vbefill_direct32): Added.
981 (grub_video_i386_vbefill_direct24): Likewise.
982 (grub_video_i386_vbefill_direct16): Likewise.
983 (grub_video_i386_vbefill_direct8): Likewise.
984
81a06771 985 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 986 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
987 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
988 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
989 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
990 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 991
0ea85a37 992 * video/video.c (grub_video_get_blit_format): Updated to use new
993 blit formats. Added handling for 16 bit color modes.
81a06771 994
995 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 996 fillers.
997 (common_blitter): Updated to use new blitters.
998
999 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1000 Removed.
1001 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1002 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1003 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1004 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1005 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1006 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1007 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1008 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1009 (grub_video_i386_vbeblit_index_index): Likewise.
1010 (grub_video_i386_vbeblit_replace_directN): Added.
1011 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1012 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1013 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1014 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1015 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1016 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1017 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1018 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1019 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1020 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1021 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1022 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1023 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 1024
0ea85a37 1025 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1026 (grub_video_i386_vbefill_R8G8B8): Likewise.
1027 (grub_video_i386_vbefill_index): Likewise.
1028 (grub_video_i386_vbefill_direct32): Added.
1029 (grub_video_i386_vbefill_direct24): Likewise.
1030 (grub_video_i386_vbefill_direct16): Likewise.
1031 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 1032
0ea85a37 1033 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1034 types.
81a06771 1035
0ea85a37 1036 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1037 types.
81a06771 1038
0ea85a37 1039 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1040 blitter types.
81a06771 1041
0ea85a37 1042 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1043 types.
1044
e8a83df6 10452008-09-06 Felix Zielcke <fzielcke@z-51.de>
1046
1047 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1048 RAID level 1.
1049
6bcd8ee5 10502008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 1051
6bcd8ee5 1052 * fs/iso9660.c (grub_iso9660_date): New structure.
1053 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1054 (grub_iso9660_uuid): New function.
c375ae58 1055
59261157 10562008-09-05 Bean <bean123ch@gmail.com>
1057
1058 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1059
1060 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1061 insensitive bit for names in Win32 and Win32 & DOS namespace.
1062
1063 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1064
1065 * include/grub/types.h (LONG_MAX): Likewise.
1066
58b6645a 10672008-09-04 Felix Zielcke <fzielcke@z-51.de>
1068
4ee55921 1069 * util/getroot.c: Include <config.h>.
1070 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1071 add support for /dev/md/N devices and handle LVM double dash escaping.
1072
10732008-09-04 Felix Zielcke <fzielcke@z-51.de>
1074
1075 * config.guess: Update to latest version from config git.
1076 * config.sub: Likewise.
58b6645a 1077
9124f65d 10782008-09-03 Robert Millan <rmh@aybabtu.com>
1079
1080 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1081 `disk->total_sectors'.
1082
81a06771 10832008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 1084
1085 * include/grub/normal.h: Fixed incorrect comment for
1086 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1087
81a06771 10882008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 1089
1090 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1091 values with defines.
1092
1093 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1094 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1095 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1096 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1097 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1098 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1099 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1100 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1101 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1102 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1103 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1104 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1105 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1106 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1107 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1108 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1109 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1110 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1111 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1112
93d5cbf8 11132008-08-31 Robert Millan <rmh@aybabtu.com>
1114
1115 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1116 declaration.
1117 (grub_multiboot): Fix a few warnings.
1118
21751d50 11192008-08-31 Robert Millan <rmh@aybabtu.com>
1120
1121 * loader/i386/pc/multiboot.c: Update comment not to say that
1122 boot_device support is unimplemented.
1123
e27a75c5 11242008-08-31 Robert Millan <rmh@aybabtu.com>
1125
1126 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1127 or memory map support are unimplemented.
1128
81a06771 11292008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 1130
1131 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1132
81a06771 11332008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 1134
1135 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1136 total video memory in 'vbeinfo' output; show color format details for
1137 each video mode.
1138
7c5d8d95 11392008-08-30 Pavel Roskin <proski@gnu.org>
1140
1141 * util/genmoddep.c: Remove for real this time.
1142 * DISTLIST: Remove util/genmoddep.c.
1143
4cebd25a 11442008-08-30 Robert Millan <rmh@aybabtu.com>
1145
1146 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1147 as required by Multiboot spec (it was already 4-byte aligned, but
1148 only by chance).
1149
b497a269 11502008-08-29 Pavel Roskin <proski@gnu.org>
1151
e3925185 1152 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1153 * kern/powerpc/ieee1275/startup.S: ... this.
1154 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1155 * DISTLIST: Likewise.
1156
b497a269 1157 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1158 grub/cpu/kernel.h. Add start label for consistency with other
1159 platforms. Add grub_prefix immediately after start. Add jump
1160 to the code after grub_prefix.
1161 * include/grub/powerpc/kernel.h: Provide valid values for
1162 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1163
6e5a42fe 11642008-08-29 Bean <bean123ch@gmail.com>
1165
1166 * configure.ac: Change host_os to cygwin for mingw.
1167 (asprintf): New check for function.
1168
1169 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1170 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1171
1172 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 1173 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 1174 sync, sleep and grub_util_get_disk_size for mingw.
1175
1176 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1177 to get size in mingw.
1178 (open_device): Use flag O_BINARY if it's defined.
1179 (find_root_device): Add dummy code for mingw.
1180
1181 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1182 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1183 (get_scsi_disk_name): Return 0 for mingw.
1184
1185 * util/hostfs.c: #include <grub/util/misc.h>.
1186 (grub_hostfs_open): Use "rb" flag to open file, use
1187 grub_util_get_disk_size to get disk size for mingw.
1188
1189 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1190 (asprintf): New function if HAVE_ASPRINTF is not set.
1191 (sync): New function for mingw.
1192 (sleep): Likewise.
1193 (grub_util_get_disk_size): Likewise.
1194
ab3f2673 11952008-08-28 Pavel Roskin <proski@gnu.org>
1196
1197 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1198 kern/time.c.
1199
1c282483 12002008-08-28 Robert Millan <rmh@aybabtu.com>
1201
1202 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1203
678e849c 12042008-08-28 Robert Millan <rmh@aybabtu.com>
1205
1206 Change find_grub_drive() syntax so it doesn't prevent it from
1207 detecting NULL names as errors.
1208
1209 * util/biosdisk.c (find_grub_drive): Move free slot search code
1210 from here ...
1211 (find_free_slot): ... to here.
1212 (read_device_map): Use find_free_slot() to search for free slots.
1213
965c75ca 12142008-08-27 Marco Gerards <marco@gnu.org>
1215
1216 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1217 (scsi_mod_SOURCES): New variable.
1218 (scsi_mod_CFLAGS): Likewise
1219 (scsi_mod_LDFLAGS): Likewise.
1220
1221 * disk/scsi.c: New file.
1222
1223 * include/grub/scsi.h: Likewise.
1224
1225 * include/grub/scsicmd.h: Likewise.
1226
1227 * disk/ata.c: Include <grub/scsi.h>.
1228 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1229 instead.
1230 (grub_ata_iterate): Skip ATAPI devices.
1231 (grub_ata_open): Only handle ATAPI devices.
1232 (struct grub_atapi_read): Removed.
1233 (grub_atapi_readsector): Likewise.
1234 (grub_ata_read): No longer handle ATAPI devices.
1235 (grub_ata_write): Likewise.
1236 (grub_atapi_iterate): New function.
1237 (grub_atapi_read): Likewise.
1238 (grub_atapi_write): Likewise.
1239 (grub_atapi_open): Likewise.
1240 (grub_atapi_close): Likewise.
1241 (grub_atapi_dev): New variable.
1242 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1243 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1244
1245 * include/grub/disk.h (enum grub_disk_dev_id): Add
1246 `GRUB_DISK_DEVICE_SCSI_ID'.
1247
c07ae501 12482008-08-26 Robert Millan <rmh@aybabtu.com>
1249
1250 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1251 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1252 descriptive.
1253
5ed20adc 12542008-08-23 Bean <bean123ch@gmail.com>
1255
1256 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1257 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1258 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1259 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1260 dm_nv.mod.
1261 (raid5rec_mod_SOURCES): New macro.
1262 (raid5rec_mod_CFLAGS): Likewise.
1263 (raid5rec_mod_LDFLAGS): Likewise.
1264 (raid6rec_mod_SOURCES): Likewise.
1265 (raid6rec_mod_CFLAGS): Likewise.
1266 (raid6rec_mod_LDFLAGS): Likewise.
1267 (mdraid_mod_SOURCES): Likewise.
1268 (mdraid_mod_CFLAGS): Likewise.
1269 (mdraid_mod_LDFLAGS): Likewise.
1270 (dm_nv_mod_SOURCES): Likewise.
1271 (dm_nv_mod_CFLAGS): Likewise.
1272 (dm_nv_mod_LDFLAGS): Likewise.
1273
1274 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1275 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1276 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1277
1278 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1279 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1280
1281 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1282
1283 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1284
1285 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1286
1287 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1288
1289 * disk/raid5_recover.c: New file.
1290
1291 * disk/raid6_recover.c: Likewise.
1292
1293 * disk/mdraid_linux.c: Likewise.
1294
1295 * disk/dmraid_nvidia.c: Likewise.
1296
1297 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1298 ULONG_MAX.
1299
1300 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1301 calculate the size of raid device.
1302 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1303 different layout of raid5.
1304 (grub_raid_scan_device): Remove code specific to mdraid.
1305 (grub_raid_list): New variable.
1306 (free_array): New function.
1307 (grub_raid_register): Likewise.
1308 (grub_raid_unregister): Likewise.
1309 (grub_raid_rescan): Likewise.
1310 (GRUB_MOD_INIT): Don't iterate device here.
1311 (GRUB_MOD_FINI): Use free_array to release resource.
1312
1313 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1314 (grub_raid5_recover_func_t): New function variable type.
1315 (grub_raid6_recover_func_t): Likewise.
1316 (grub_raid5_recover_func): New variable.
1317 (grub_raid6_recover_func): Likewise.
1318 (grub_raid_register): New function.
1319 (grub_raid_unregister): Likewise.
1320 (grub_raid_rescan): Likewise.
1321 (grub_raid_block_xor): Likewise.
1322
1323 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1324 (CMD_CRC): New macro.
1325 (part): Removed.
1326 (read_file): Handle device as well as file.
1327 (cmd_crc): New function.
1328 (fstest): Handle multiple disks.
1329 (options): Remove part, raw and long, add root and diskcount.
1330 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 1331 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 1332 add handling for the new options, support multiple disks.
1333
1334 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1335
29c18915 13362008-08-23 Bean <bean123ch@gmail.com>
1337
1338 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1339
1340 * genfslist.sh: Ignore kernel.mod.
1341
1342 * genpartmaplist.sh: Likewise.
1343
8415f261 13442008-08-23 Robert Millan <rmh@aybabtu.com>
1345
1346 * util/getroot.c (find_root_device): Skip anything that starts with
1347 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1348
d5a7dc5b 13492008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 1350
d5a7dc5b 1351 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1352 * util/grub.d/00_header.in: Allow the administrator to change default
1353 gfxmode via ${GRUB_GFXMODE}.
1354
380cfbb4 13552008-08-21 Felix Zielcke <fzielcke@z-51.de>
1356
1357 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1358
c9baafe7 13592008-08-21 Robert Millan <rmh@aybabtu.com>
1360
1361 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1362 loader.
1363 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1364 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1365
e290bef2 13662008-08-20 Carles Pina i Estany <carles@pina.cat>
1367
1368 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1369 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1370
f9dbfc96 13712008-08-19 Robert Millan <rmh@aybabtu.com>
1372
1373 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1374 (struct grub_virtual_screen): Remove `cursor_color'.
1375 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1376 initialization.
1377 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1378
dd6bd6ab 13792008-08-18 Robert Millan <rmh@aybabtu.com>
1380
1381 Unify (identical) linux_normal.c files.
1382 * loader/i386/efi/linux_normal.c: Move from here ...
1383 * loader/linux_normal.c: ... to here. Update all users.
1384 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1385 * loader/i386/ieee1275/linux_normal.c: Likewise.
1386
7f42f83e 13872008-08-18 Robert Millan <rmh@aybabtu.com>
1388
1389 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1390 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1391 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1392 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1393 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1394 New macros.
1395 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1396 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1397 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1398 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1399 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1400 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1401 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1402 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1403 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1404 portably using grub_getxy().
1405 Replace `-EFI' with `-bzImage' in boot message.
1406
38487ddb 14072008-08-17 Robert Millan <rmh@aybabtu.com>
1408
1409 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1410
deceb3ec 14112008-08-17 Robert Millan <rmh@aybabtu.com>
1412
1413 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1414
1415 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1416 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1417 (grub_machine_mmap_iterate): New function declaration.
1418 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1419 structure.
1420 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1421 macros.
1422
1423 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1424 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1425 Move e820 parsing from here ...
1426 * kern/i386/pc/mmap.c: New file.
1427 (grub_machine_mmap_iterate): ... to here.
1428
1429 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1430 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1431 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1432 (grub_available_iterate): Redeclare to return `void', and redeclare
1433 its hook to use grub_uint64_t as addr and size parameters, and rename
1434 to ...
1435 (grub_machine_mmap_iterate): ... this. Update all users.
1436
1437 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1438 to make it more readable. Rename to ...
1439 (grub_machine_mmap_iterate): ... this.
1440
1441 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1442 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1443 (grub_multiboot): Allocate an extra region after the payload, and fill
1444 it with a Multiboot memory map. Adjust a.out loader to calculate size
1445 with the extra space.
1446 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1447 with the extra space.
1448
f8aa0f43 14492008-08-17 Carles Pina i Estany <carles@pina.cat>
1450
9807deb9 1451 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 1452
605f5bb6 14532008-08-17 Felix Zielcke <fzielcke@z-51.de>
1454
1455 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1456 mdate-sh to the list `find' searches for.
1457 * DISTLIST: Regenerated.
1458
210db6c6 14592008-08-16 Felix Zielcke <fzielcke@z-51.de>
1460
1461 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1462 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 1463 genmoddep.awk, gensymlist.sh.in.
1464 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 1465 * DISTLIST: Regenerated.
48cdbfd4 1466 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 1467
1082b929 14682008-08-16 Robert Millan <rmh@aybabtu.com>
1469
1470 * disk/raid.c (grub_raid_init): Handle/report errors set by
1471 grub_device_iterate().
1472 * disk/lvm.c (grub_lvm_init): Likewise.
1473
42ce5170 14742008-08-15 Bean <bean123ch@gmail.com>
1475
1476 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1477 and datehook.mod.
1478 (datetime_mod_SOURCES): New macro.
1479 (datetime_mod_CFLAGS): Likewise.
1480 (datetime_mod_LDFLAGS): Likewise.
1481 (date_mod_SOURCES): Likewise.
1482 (date_mod_CFLAGS): Likewise.
1483 (date_mod_LDFLAGS): Likewise.
1484 (datehook_mod_SOURCES): Likewise.
1485 (datehook_mod_CFLAGS): Likewise.
1486 (datehook_mod_LDFLAGS): Likewise.
1487
1488 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1489 and datehook.mod.
1490 (datetime_mod_SOURCES): New macro.
1491 (datetime_mod_CFLAGS): Likewise.
1492 (datetime_mod_LDFLAGS): Likewise.
1493 (date_mod_SOURCES): Likewise.
1494 (date_mod_CFLAGS): Likewise.
1495 (date_mod_LDFLAGS): Likewise.
1496 (datehook_mod_SOURCES): Likewise.
1497 (datehook_mod_CFLAGS): Likewise.
1498 (datehook_mod_LDFLAGS): Likewise.
1499
1500 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1501 and datehook.mod.
1502 (datetime_mod_SOURCES): New macro.
1503 (datetime_mod_CFLAGS): Likewise.
1504 (datetime_mod_LDFLAGS): Likewise.
1505 (date_mod_SOURCES): Likewise.
1506 (date_mod_CFLAGS): Likewise.
1507 (date_mod_LDFLAGS): Likewise.
1508 (datehook_mod_SOURCES): Likewise.
1509 (datehook_mod_CFLAGS): Likewise.
1510 (datehook_mod_LDFLAGS): Likewise.
1511
1512 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1513 and datehook.mod.
1514 (datetime_mod_SOURCES): New macro.
1515 (datetime_mod_CFLAGS): Likewise.
1516 (datetime_mod_LDFLAGS): Likewise.
1517 (date_mod_SOURCES): Likewise.
1518 (date_mod_CFLAGS): Likewise.
1519 (date_mod_LDFLAGS): Likewise.
1520 (datehook_mod_SOURCES): Likewise.
1521 (datehook_mod_CFLAGS): Likewise.
1522 (datehook_mod_LDFLAGS): Likewise.
1523
1524 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1525 and datehook.mod.
1526 (datetime_mod_SOURCES): New macro.
1527 (datetime_mod_CFLAGS): Likewise.
1528 (datetime_mod_LDFLAGS): Likewise.
1529 (date_mod_SOURCES): Likewise.
1530 (date_mod_CFLAGS): Likewise.
1531 (date_mod_LDFLAGS): Likewise.
1532 (datehook_mod_SOURCES): Likewise.
1533 (datehook_mod_CFLAGS): Likewise.
1534 (datehook_mod_LDFLAGS): Likewise.
1535
1536 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1537
1538 * commands/date.c: New file.
1539
1540 * hook/datehook.c: Likewise.
1541
1542 * include/grub/lib/datetime.h: Likewise.
1543
1544 * include/grub/i386/cmos.h: Likewise.
1545
1546 * lib/datetime.c: Likewise.
1547
1548 * lib/i386/datetime.c: Likewise.
1549
1550 * lib/efi/datetime.c: Likewise.
1551
0e9242da 15522008-08-14 Robert Millan <rmh@aybabtu.com>
1553
1554 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1555 (grub_mkelfimage_SOURCES): New variable.
1556 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1557
1558 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1559 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1560 * conf/powerpc-ieee1275.rmk: Likewise.
1561 * conf/i386-ieee1275.rmk: Likewise.
1562
1563 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1564 * kern/i386/coreboot/init.c: Likewise.
1565
1566 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1567 with `<grub/cpu/kernel.h>'.
1568 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1569 to ...
1570 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1571 * kern/i386/coreboot/startup.S: Likewise.
1572
1573 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1574 (GRUB_MOD_GAP): Remove.
1575 * include/grub/powerpc/kernel.h: New file.
1576 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1577 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1578 * include/grub/i386/kernel.h: New file.
1579 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1580 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1581 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1582
1583 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1584 `grub-mkelfimage'.
1585 Use --directory when invoking grub_mkimage.
1586
1587 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1588 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1589 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1590 and GRUB_KERNEL_CPU_PREFIX.
1591
b86408f8 15922008-08-14 Felix Zielcke <fzielcke@z-51.de>
1593
d5e619ca 1594 * include/grub/err.h (grub_err_printf): New function prototype.
1595 * util/misc.c (grub_err_printf): New function.
1596 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1597 grub_printf.
1598 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 1599
7161f0e0 16002008-08-13 Robert Millan <rmh@aybabtu.com>
1601
1602 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1603
a1967522 16042008-08-13 Robert Millan <rmh@aybabtu.com>
1605
1606 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1607 boot entry.
1608
371458b5 16092008-08-12 Robert Millan <rmh@aybabtu.com>
1610
1611 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1612 of the relocation code from here ...
1613 (grub_multiboot): ... to here.
1614 (forward_relocator, backward_relocator): Move from here ...
1615 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1616 (grub_multiboot_backward_relocator): ... to here.
1617 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1618 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1619 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1620 (grub_multiboot_forward_relocator_end)
1621 (grub_multiboot_backward_relocator)
1622 (grub_multiboot_backward_relocator_end): New variables.
1623
05f9452b 16242008-08-12 Bean <bean123ch@gmail.com>
1625
1626 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1627
20024ab0 16282008-08-11 Robert Millan <rmh@aybabtu.com>
1629
1630 * kern/i386/linuxbios/startup.S: Move from here ...
1631 * kern/i386/coreboot/startup.S: ... to here.
1632
1633 * kern/i386/linuxbios/init.c: Move from here ...
1634 * kern/i386/coreboot/init.c: ... to here.
1635
1636 * kern/i386/linuxbios/table.c: Move from here ...
1637 * kern/i386/coreboot/mmap.c: ... to here.
1638
1639 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1640
e352e9cd 16412008-08-11 Robert Millan <rmh@aybabtu.com>
1642
1643 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1644 errors. Leave it to the upper layer to handle them.
1645
2d05bc6a 16462008-08-09 Christian Franke <franke@computer.org>
1647
1648 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1649 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1650 Install `grub.d/10_windows' only on Cygwin.
1651 * configure.ac: Add subst of `target_os'.
1652 Check `target_os' also before setting TARGET_OBJ2ELF.
1653 Add `--enable-grub-pe2elf'.
1654
042bd419 16552008-08-08 Robert Millan <rmh@aybabtu.com>
1656
1657 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1658 (grub_last_time): Change type to grub_uint64_t.
1659 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1660 (grub_disk_close): Likewise.
1661
1662 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1663 (run_menu): Migrate code from to using grub_get_time_ms().
1664
1665 * util/misc.c (grub_get_time_ms): New function.
1666
7f280db5 16672008-08-08 Marco Gerards <marco@gnu.org>
1668
1669 * disk/ata.c (grub_ata_regget): Change return type to
1670 `grub_uint8_t'.
1671 (grub_ata_regget2): Likewise.
1672 (grub_ata_wait_status): New function.
1673 (grub_ata_wait_busy): Removed function, updated all users to use
1674 `grub_ata_wait_status'.
1675 (grub_ata_wait_drq): Likewise.
1676 (grub_ata_cmd): New function.
1677 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1678 error handling.
1679 (grub_ata_pio_write): Add error handling.
1680 (grub_atapi_identify): Likewise.
1681 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1682 handling.
1683 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1684 handling. Actually use the detected registers. Reorder the
1685 detection logic such that it is easier to read.
1686 (grub_ata_pciinit): Do not assign the same ID to each controller.
1687 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1688 handling.
1689 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1690
1691 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1692
1fbc5e66 16932008-08-08 Marco Gerards <marco@gnu.org>
1694
1695 * NEWS: Update.
1696
819ce6c0 16972008-08-07 Bean <bean123ch@gmail.com>
1698
1699 * include/grub/x86_64/pci.h: New file.
1700
5c41d44d 17012008-08-07 Christian Franke <franke@computer.org>
1702
1703 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1704 (TIMER2_GATE): Likewise.
1705 (grub_pit_wait): Add enable/disable of the timer2 gate
1706 bit of port 0x61. This fixes a possible infinite loop.
1707
5ebc275d 17082008-08-07 Bean <bean123ch@gmail.com>
1709
1710 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1711 kern/i386/tsc.c and kern/i386/pit.c.
1712
1713 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1714 x86_64 platform.
1715
1716 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1717 <grub/i386/tsc.h>.
1718
1719 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1720
e383b3d0 17212008-08-07 Bean <bean123ch@gmail.com>
1722
1723 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1724
1725 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1726
1727 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1728 multiple inclusion. Add #include <grub/types.h>.
1729
1cbb58ac 17302008-08-06 Christian Franke <franke@computer.org>
1731
1732 * conf/common.rmk: Build and install `10_windows'.
1733 * util/grub.d/10_windows.in: New script.
1734
337f5a1e 17352008-08-06 Pavel Roskin <proski@gnu.org>
1736
1737 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1738
057bc4ac 17392008-08-06 Robert Millan <rmh@aybabtu.com>
1740
1741 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1742 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1743
2b99f123 17442008-08-06 Bean <bean123ch@gmail.com>
1745
1746 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1747 (grub_pxefs_fs_int): Remove dummy definition.
1748 (grub_pxefs_open): Use data->block_size to store the current block
1749 size setting.
1750 (grub_pxefs_read): Use block size stored in data->block_size. As the
1751 value of grub_pxe_blksize can be changed after the file is opened.
1752
9f0234cb 17532008-08-06 Bean <bean123ch@gmail.com>
1754
1755 * fs/i386/pc/pxe.c (curr_file): new variable.
1756 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1757 require the dummy internal file system anymore.
1758 (grub_pxefs_read): Removed.
1759 (grub_pxefs_close): Likewise.
1760 (grub_pxefs_fs_int): Likewise.
1761 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1762 connection when we switch file.
1763 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1764
a55d42e0 17652008-08-06 Robert Millan <rmh@aybabtu.com>
1766
1767 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1768 `halt.mod'.
1769 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1770 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1771
1772 * kern/i386/halt.c: New file.
1773 * kern/i386/reboot.c: Likewise.
1774 * include/grub/i386/reboot.h: Likewise.
1775 * include/grub/i386/halt.h: Likewise.
1776
1777 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1778 Include `<grub/cpu/halt.h>'.
1779 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1780 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1781
1782 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1783 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1784 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1785 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1786 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1787 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1788 from here ...
1789 * include/grub/i386/at_keyboard.h: ... to here.
1790
24371d26 17912008-08-05 Robert Millan <rmh@aybabtu.com>
1792
1793 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1794 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1795 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1796 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1797 `kern/generic/millisleep.c'.
1798
1799 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1800 instead of grub_get_rtc().
1801 (grub_tsc_init): Initialize `tsc_boot_time'.
1802
1803 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1804 (grub_machine_init): Use grub_tsc_init() rather than
1805 installing an RTC-based handler via grub_install_get_time_ms().
1806
1807 * kern/i386/pit.c: New file.
1808 * include/grub/i386/pit.h: Likewise.
1809
9e7007b3 18102008-08-05 Bean <bean123ch@gmail.com>
1811
1812 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1813
1814 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1815 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1816 (pxe_mod_SOURCES): New macro.
1817 (pxe_mod_CFLAGS): Likewise.
1818 (pxe_mod_LDFLAGS): Likewise.
1819 (pxecmd_mod_SOURCES): Likewise.
1820 (pxecmd_mod_CFLAGS): Likewise.
1821 (pxecmd_mod_LDFLAGS): Likewise.
1822
1823 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1824 (grub_pxe_call): Likewise.
1825
1826 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1827
1828 * commands/i386/pc/pxecmd.c: New file.
1829
9f0234cb 1830 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 1831
1832 * include/grub/i386/pc/pxe.h: Likewise.
1833
6977d49f 18342008-08-05 Bean <bean123ch@gmail.com>
1835
1836 * util/console.c (grub_console_cur_color): New variable.
1837 (grub_console_standard_color): Likewise.
1838 (grub_console_normal_color): Likewise.
1839 (grub_console_highlight_color): Likewise.
1840 (color_map): Likewise.
1841 (use_color): Likewise.
1842 (NUM_COLORS): New macro.
1843 (grub_ncurses_setcolorstate): Handle color properly.
1844 (grub_ncurses_setcolor): Don't change color here, just remember the
1845 settings, color will be set in grub_ncurses_setcolorstate.
1846 (grub_ncurses_getcolor): New function.
1847 (grub_ncurses_init): Initialize color pairs.
1848 (grub_ncurses_term): New member grub_ncurses_getcolor.
1849
9c2ff3ee 18502008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 1851
9c2ff3ee 1852 High resolution timer support. Implemented for x86 CPUs using TSC.
1853 Extracted generic grub_millisleep() so it's linked in only as needed.
1854 This requires a Pentium compatible CPU; if the RDTSC instruction is
1855 not supported, then it falls back on the generic grub_get_time_ms()
1856 implementation that uses the machine's RTC.
1857
1858 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1859 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1860 `kern/generic/millisleep.c'.
1861
1862 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1863 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1864
1865 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1866 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1867
1868 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1869
1870 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1871 `kern/generic/millisleep.c'.
1872
1873 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1874
1875 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1876
1877 * kern/generic/rtc_get_time_ms.c: New file.
1878
1879 * kern/generic/millisleep.c: New file.
337f5a1e 1880
9c2ff3ee 1881 * kern/misc.c: Don't include
1882 <kern/time.h> anymore.
1883 (grub_millisleep_generic): Removed.
1884
1885 * commands/sleep.c (grub_interruptible_millisleep): Uses
1886 grub_get_time_ms() instead of grub_get_rtc().
1887
1888 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1889 function.
1890 (grub_cpu_is_cpuid_supported): New inline function.
1891 (grub_cpu_is_tsc_supported): New inline function.
1892 (grub_tsc_init): New function prototype.
1893 (grub_tsc_get_time_ms): New function prototype.
1894
1895 * kern/i386/tsc.c (grub_get_time_ms): New file.
1896
1897 * include/grub/time.h: Include <grub/types.h.
1898 (grub_millisleep_generic): Removed.
1899 (grub_get_time_ms): New prototype.
1900 (grub_install_get_time_ms): New prototype.
1901 (grub_rtc_get_time_ms): New prototype.
1902
1903 * kern/time.c (grub_get_time_ms): New function.
1904 (grub_install_get_time_ms): New function.
1905
1906 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1907 <grub/time.h> anymore.
1908 (grub_millisleep): Removed.
1909 (grub_machine_init): Call grub_tsc_init.
1910
1911 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1912 get_time_ms() implementation.
1913
1914 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1915 (ieee1275_get_time_ms): New function.
1916 (grub_machine_init): Install get_time_ms() implementation.
1917
1918 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1919 (grub_machine_init): Call grub_tsc_init().
1920 (grub_millisleep): Removed.
bf06a93f 1921
9c2ff3ee 1922 * kern/ieee1275/init.c (grub_millisleep): Removed.
1923 (grub_machine_init): Install ieee1275_get_time_ms()
1924 implementation.
1925 (ieee1275_get_time_ms): New function.
1926 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1927 real work.
1928
9ec92aaf 19292008-08-05 Marco Gerards <marco@gnu.org>
1930
1931 * disk/ata.c: Include <grub/pci.h>.
1932 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1933 (grub_ata_initialize): Rewritten.
1934 (grub_ata_device_initialize): New function.
1935
8d23f507 19362008-08-04 Pavel Roskin <proski@gnu.org>
1937
1938 * kern/main.c: Include grub/mm.h.
1939
5e15ee3d 19402008-08-04 Robert Millan <rmh@aybabtu.com>
1941
1942 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1943 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1944 corruption problem).
1945
a9053f8f 19462008-08-04 Robert Millan <rmh@aybabtu.com>
1947
1948 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1949 warnings introduced in my last commit.
1950
dd19c7d7 19512008-08-03 Robert Millan <rmh@aybabtu.com>
1952
1953 Make PCI available on all i386 architectures.
1954
1955 * include/grub/i386/pc/pci.h: Move from here ...
1956 * include/grub/i386/pci.h: ... to here.
1957
1958 * include/grub/i386/pc/pci.h: Remove.
1959 * include/grub/i386/efi/pci.h: Remove.
1960 * include/grub/x86_64/efi/pci.h: Remove.
1961
1962 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1963 `<grub/cpu/pci.h>'.
1964
1965 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1966 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1967 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1968
1969 * conf/i386-ieee1275.rmk: Likewise.
1970
e14a6184 19712008-08-03 Robert Millan <rmh@aybabtu.com>
1972
1973 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1974 (grub_console_setcursor): Make it possible to set cursor off.
1975
52768e37 19762008-08-03 Robert Millan <rmh@aybabtu.com>
1977
1978 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1979 of modules instead of assuming which platform provides what.
1980 * util/update-grub.in: Likewise.
1981
2d52f57f 19822008-08-03 Robert Millan <rmh@aybabtu.com>
1983
1984 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1985 instead of `grub_install_dos_part' to determine whether a drive needs
1986 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 1987 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 1988
2a5cd121 19892008-08-02 Robert Millan <rmh@aybabtu.com>
1990
1991 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1992
93808428 19932008-08-02 Robert Millan <rmh@aybabtu.com>
1994
1995 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1996 of informational grub_dprintf() calls.
1997
3bd0a12a 19982008-08-02 Robert Millan <rmh@aybabtu.com>
1999
2000 * disk/memdisk.c (memdisk_size): Don't initialize.
2001 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2002
2003 * include/grub/i386/pc/kernel.h
2004 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2005 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2006 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2007 (grub_arch_memdisk_size): Remove.
2008
2009 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2010 field (was only used to transfer a constant). Add `type' field to
2011 support multiple module types.
2012 (grub_module_iterate): New function.
2013
2014 * kern/device.c (grub_device_open): Do not hide error messages
2015 when grub_disk_open() fails. Use grub_print_error() instead.
2016
2017 * kern/i386/pc/init.c (grub_arch_modules_addr)
2018 (grub_arch_memdisk_size): Remove functions.
2019 (grub_arch_modules_addr): Return the module address in high memory
2020 (now that it isn't copied anymore).
2021
2022 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2023 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2024 decompression routine (grub_total_module_size already includes that
2025 now). Don't copy modules back to low memory.
2026
2027 * kern/main.c: Include `<grub/mm.h>'.
2028 (grub_load_modules): Split out (and use) ...
2029 (grub_module_iterate): ... this function, which iterates through
2030 module objects and runs a hook.
2031 Comment out grub_mm_init_region() call, as it would cause non-ELF
2032 modules to be overwritten.
2033
2034 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2035 the memdisk image in its own region, make it part of the module list.
2036 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2037 (main): Parse --memdisk|-m option, and pass user-provided path as
2038 parameter to generate_image().
2039 (add_segments): Pass `memdisk_path' down to load_modules().
2040 (load_modules): Embed memdisk image in module section when requested.
2041 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2042 `header.type' instead of `header.offset'.
2043
2044 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2045 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2046 (memdisk_mod_LDFLAGS): New variables.
2047 * conf/i386-coreboot.rmk: Likewise.
2048 * conf/i386-ieee1275.rmk: Likewise.
2049
a927cc73 20502008-08-02 Robert Millan <rmh@aybabtu.com>
2051
2052 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2053 (backward_relocator): New variables. Used to allocate and relocate
2054 the payload, respectively.
2055 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 2056 address, install the appropriate relocator code in each bound of
a927cc73 2057 the payload, and set the entry point such that
2058 grub_multiboot_real_boot() will jump to one of them.
2059
2060 * kern/i386/loader.S (grub_multiboot_payload_size)
2061 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2062 (grub_multiboot_payload_entry_offset): New variables.
2063 (grub_multiboot_real_boot): Set cpu context to what the relocator
2064 expects, and jump to the relocator instead of the payload.
2065
2066 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2067 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2068 (grub_multiboot_payload_entry_offset): Export.
2069
b15d8a0c 20702008-08-01 Bean <bean123ch@gmail.com>
2071
2072 * normal/menu_entry.c (editor_getline): Don't return the original
2073 string as result, as it will be released by lexer once it has done
2074 using it.
2075
cdfb3d22 20762008-08-01 Robert Millan <rmh@aybabtu.com>
2077
2078 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2079 within menuentries, not before them.
2080 util/grub.d/10_hurd.in: Likewise.
2081
9175e93d 20822008-08-01 Bean <bean123ch@gmail.com>
2083
2084 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2085 (bufio_mod_SOURCES): New macro.
2086 (bufio_mod_CFLAGS): Likewise.
2087 (bufio_mod_LDFLAGS): Likewise.
2088
2089 * include/grub/bufio.h: New file.
2090
2091 * io/bufio.c: Likewise.
2092
2093 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2094 (grub_video_reader_png): Use grub_buffile_open to open file.
2095
2096 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2097 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2098
2099 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2100 (grub_video_reader_tga): Use grub_buffile_open to open file.
2101
2102 * font/manager.c: Include <grub/bufio.h>.
2103 (add_font): Use grub_buffile_open to open file.
2104
3d8383e7 21052008-07-31 Robert Millan <rmh@aybabtu.com>
2106
2107 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2108 ELF segments, use a macro for arbitrarily accessing any of them instead
2109 of preparing a pointer that allows access to one at a time.
2110 (grub_multiboot_load_elf64): Likewise.
2111
16e641b6 21122008-07-31 Bean <bean123ch@gmail.com>
2113
2114 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2115 GRUB_KERNEL_MACHINE_DATA_END.
2116
59198b72 21172008-07-30 Robert Millan <rmh@aybabtu.com>
2118
2119 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2120 Increase from 0x50 to 0x60.
2121 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2122 use UUIDs to identify the root drive for them. If that's not
2123 possible, abort.
2124 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2125 check, for cross-disk installs.
2126
ae88bca3 21272008-07-30 Robert Millan <rmh@aybabtu.com>
2128
2129 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2130 is non-empty, use it to set the `prefix' environment variable instead
2131 of the usual approach.
2132 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2133 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2134 environment variable instead of dummy make_install_device().
2135
2136 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2137 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 2138 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 2139
2140 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2141 New variable reference.
2142 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2143 New macro. Defines offset of `grub_prefix' within startup.S (relative
2144 to `start').
2145 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2146 section within startup.S (relative to `start').
2147 * include/grub/i386/coreboot/kernel.h: Likewise.
2148
2149 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2150 Overwrite grub_prefix with its contents, at the beginning of the
2151 first segment.
2152 (main): Understand -p|--prefix.
2153
14f41dd1 21542008-07-30 Robert Millan <rmh@aybabtu.com>
2155
2156 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2157
4ca049a3 21582008-07-30 Robert Millan <rmh@aybabtu.com>
2159
2160 * term/i386/pc/vga_text.c (grub_console_cls): Use
2161 grub_console_gotoxy() to go back to beginning of the screen.
2162 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2163
2921d337 21642008-07-29 Christian Franke <franke@computer.org>
2165
2166 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2167 Add conversion of emulated mount points on Cygwin.
2168
b609876d 21692008-07-29 Christian Franke <franke@computer.org>
2170
2171 * util/update-grub.in: Add a check for admin
2172 group on Cygwin.
2173 Remove old `grub.cfg.new' before creation.
2174 Add `-f' to `mv' to handle the different filesystem
2175 semantics of Windows.
2176
e93e4679 21772008-07-29 Bean <bean123ch@gmail.com>
2178
2179 * normal/main.c (get_line): Fix buffer overflow bug.
2180
41694fd0 21812008-07-28 Robert Millan <rmh@aybabtu.com>
2182
2183 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2184 (struct grub_apple_header): New struct. Describes the layout of
2185 the partmap header.
2186 (apple_partition_map_iterate): Check the header magic as well as the
2187 partition magic (which was already being checked).
2188
cfd0b4e6 21892008-07-28 Pavel Roskin <proski@gnu.org>
2190
2191 * genmk.rb: Add a warning to the beginning of the output that
2192 it's a generated file and should not be edited.
2193
93cce016 21942008-07-28 Robert Millan <rmh@aybabtu.com>
2195
2196 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2197 with the same number are found, just use issue a warning with
2198 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 2199
cd1df915 22002008-07-27 Robert Millan <rmh@aybabtu.com>
2201
2202 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2203 information.
2204
b70a8427 22052008-07-27 Bean <bean123ch@gmail.com>
2206
2207 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2208 (grub_fat_find_dir): Ignore case when comparing filename.
2209
8f5e379f 22102008-07-27 Bean <bean123ch@gmail.com>
2211
2212 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2213 smallino, as it's more descriptive, and i8count can be confused with
2214 the other field count.
2215 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2216 inode type.
2217
a85cd5a0 22182008-07-27 Bean <bean123ch@gmail.com>
2219
2220 * commands/crc.c: New file.
2221
2222 * lib/crc.c: Likewise.
2223
2224 * include/grub/lib/crc.h: Likewise.
2225
2226 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2227
2228 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2229 (hexdump): Move this function to ...
2230
2231 * lib/hexdump.c: ... here.
2232
2233 * include/grub/hexdump.h: Renamed to ...
2234
2235 * include/grub/lib/hexdump.h: ... this.
2236
2237 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2238
2239 * util/grub-editenv.c: Likewise.
2240
2241 * include/envblk.h: Renamed to ...
2242
2243 * include/lib/envblk.h: ... this.
2244
2245 * util/envblk.c: Renamed to ...
2246
2247 * lib/envblk.c: ... this.
2248
2249 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2250 lib/hexdump.c.
2251 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2252 (pkglib_MODULES): Add crc.mod.
2253 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2254 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2255 (crc_mod_SOURCES): New macro.
2256 (crc_mod_CFLAGS): Likewise.
2257 (crc_mod_LDFLAGS): Likewise.
2258
2259 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2260
2261 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2262
2263 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2264
2265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2266
2267 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2268
c298def0 22692008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 2270
2271 * commands/help.c: Include <grub/term.h>.
2272 (TERM_WIDTH): Removed. Updated all users.
2273
cc349fb3 22742008-07-27 Pavel Roskin <proski@gnu.org>
2275
2276 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2277 spurious warnings about a comment within a comment.
2278
9051607e 22792008-07-25 Robert Millan <rmh@aybabtu.com>
2280
2281 * util/getroot.c (find_root_device): Skip devices that match
2282 /dev/dm-[0-9]. This lets the real device be found for any type of
2283 abstraction (LVM, EVMS, RAID..).
2284 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2285 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2286 device is found first, find_root_device() will now skip it.
2287
01453bfc 22882008-07-24 Pavel Roskin <proski@gnu.org>
2289
2290 * include/grub/types.h: Use __builtin_bswap32() and
2291 __builtin_bswap64() with gcc 4.3 and newer.
2292
6af9849f 22932008-07-24 Christian Franke <franke@computer.org>
2294
3a0fa256 2295 * util/i386/pc/grub-install.in: If `--debug' is specified,
2296 pass `--verbose' to grub-setup.
2297 Abort script if make_system_path_relative_to_its_root() fails.
2298
7810e747 22992008-07-24 Bean <bean123ch@gmail.com>
2300
2301 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2302 variable `target_platform' should be `platform'.
2303
42290e17 23042008-07-24 Bean <bean123ch@gmail.com>
2305
51cc5193 2306 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 2307 (grub_png_init_fixed_block): New function.
2308 (grub_png_decode_image_data): Handle fixed huffman code compression.
2309
2a8a80e4 23102008-07-24 Bean <bean123ch@gmail.com>
2311
2312 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2313 (grub_pe2elf_SOURCES): New macro.
2314 (CLEANFILES): Add grub-pe2elf.
2315
2316 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2317 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2318 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2319 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2320 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
2321 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
2322 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
2323 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2324 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2325 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2326 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2327 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2328 (GRUB_PE32_DT_FUNCTION): Likewise.
2329 (GRUB_PE32_REL_I386_DIR32): Likewise.
2330 (GRUB_PE32_REL_I386_REL32): Likewise.
2331 (grub_pe32_symbol): New structure.
2332 (grub_pe32_reloc): Likewise.
2333
2334 * util/grub-pe2elf.c: New file.
2335
2336 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2337 start symbol in non pc platform.
2338
2339 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2340
2341 The following patches are from Christian Franke.
2342
2343 * include/grub/dl.h: Remove .previous, gas supports this only
2344 for ELF format.
2345
2346 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2347 Remove .type, gas supports this only for ELF format.
2348
2349 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2350 nullbytes in symbol table. This fixes an infinite loop if table is
2351 zero filled.
2352
2353 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2354 TARGET_IMG_LDFLAGS and EXEEXT.
2355
2356 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2357 TARGET_IMG_LDFLAGS_AC.
2358 (grub_CHECK_STACK_ARG_PROBE): New function.
2359
2360 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2361
2362 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2363
2364 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2365 to set TARGET_IMG_LD* accordingly.
2366 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2367 Add call to grub_CHECK_STACK_ARG_PROBE.
2368 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2369
2370 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2371
2372 * genmk.rb: Add EXEEXT to CLEANFILES.
2373
12ccdb75 23742008-07-23 Robert Millan <rmh@aybabtu.com>
2375
2376 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2377 define the codes for arrows and lines used for the menu).
2378 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2379 as well.
2380
2381 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2382 fonts, because the latter are too slow.
2383
18eeaf04 23842008-07-21 Bean <bean123ch@gmail.com>
2385
2386 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2387 a20. Run keyboard test last, as it will cause macbook to halt.
2388
b095e2ad 23892008-07-18 Pavel Roskin <proski@gnu.org>
2390
2391 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2392 load foreign architecture modules correctly anyway. Keep
2393 support for loading host architecture modules, whether we
2394 compile them or not.
2395
737feb35 23962008-07-17 Pavel Roskin <proski@gnu.org>
2397
3f4ce737 2398 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2399 change target_cpu. The compiler default can mismatch target_cpu
2400 in any case.
2401
4ad2d049 2402 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2403 * kern/efi/efi.c: Likewise.
2404
f6130a12 2405 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2406 target compiler is functional.
2407 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2408 are set up.
2409
58393a2d 2410 * configure.ac: Default to efi platform for x86_64-apple. Allow
2411 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2412 adjustments from the rest, only do them if target is not
2413 explicitly given. Merge other adjustments with the final sanity
2414 check. Remove an extraneous check for supported CPU. Be
2415 specific which CPU and which platform is not supported.
2416
737feb35 2417 * configure.ac: Default to pc platform for x86_64.
2418
546f966a 24192008-07-17 Robert Millan <rmh@aybabtu.com>
2420
2421 Partial LinuxBIOS -> Coreboot rename.
2422
2423 * conf/i386-linuxbios.rmk: Renamed to ...
2424 * conf/i386-coreboot.rmk: ... this.
2425 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2426 * configure.ac: Accept "coreboot" as input platform (but maintain
2427 compatibility with "linuxbios").
2428 * include/grub/i386/linuxbios: Renamed to ...
2429 * include/grub/i386/coreboot: ... this.
2430
20011694 24312008-07-17 Bean <bean123ch@gmail.com>
2432
2433 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 2434 (appleldr_mod_SOURCE): New variable.
20011694 2435 (appleldr_mod_CFLAGS): Likewise.
2436 (appleldr_mod_LDFLAGS): Likewise.
2437 (pci_mod_SOURCES): Likewise.
2438 (pci_mod_CFLAGS): Likewise.
2439 (pci_mod_LDFLAGS): Likewise.
2440 (lspci_mod_SOURCES): Likewise.
2441 (lspci_mod_CFLAGS): Likewise.
2442 (lspci_mod_LDFLAGS): Likewise.
2443
2444 * conf/x86_64-efi.rmk: New file.
2445
2446 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2447 macro.
2448 (grub_efidisk_write): Likewise.
2449
2450 * include/efi/api.h (efi_call_0): New macro.
2451 (efi_call_1): Likewise.
2452 (efi_call_2): Likewise.
2453 (efi_call_3): Likewise.
2454 (efi_call_4): Likewise.
2455 (efi_call_5): Likewise.
2456 (efi_call_6): Likewise.
2457
2458 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2459 grub_rescue_cmd_chainloader.
2460
2461 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2462 (grub_pe32_optional_header): Change some fields based on i386 or
2463 x86_64 platform.
2464 (GRUB_PE32_PE32_MAGIC): Likewise.
2465
2466 * include/grub/efi/uga_draw.h: New file.
2467
2468 * include/grub/elf.h (STN_ABS): New constant.
2469 (R_X86_64_NONE): Relocation constant for x86_64.
2470 (R_X86_64_64): Likewise.
2471 (R_X86_64_PC32): Likewise.
2472 (R_X86_64_GOT32): Likewise.
2473 (R_X86_64_PLT32): Likewise.
2474 (R_X86_64_COPY): Likewise.
2475 (R_X86_64_GLOB_DAT): Likewise.
2476 (R_X86_64_JUMP_SLOT): Likewise.
2477 (R_X86_64_RELATIVE): Likewise.
2478 (R_X86_64_GOTPCREL): Likewise.
2479 (R_X86_64_32): Likewise.
2480 (R_X86_64_32S): Likewise.
2481 (R_X86_64_16): Likewise.
2482 (R_X86_64_PC16): Likewise.
2483 (R_X86_64_8): Likewise.
2484 (R_X86_64_PC8): Likewise.
2485
2486 * include/grub/i386/efi/pci.h: New file.
2487
2488 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2489 Change it value based on platform.
2490 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2491 (GRUB_E820_RAM): Likewise.
2492 (GRUB_E820_RESERVED): Likewise.
2493 (GRUB_E820_ACPI): Likewise.
2494 (GRUB_E820_NVS): Likewise.
2495 (GRUB_E820_EXEC_CODE): Likewise.
2496 (GRUB_E820_MAX_ENTRY): Likewise.
2497 (grub_e820_mmap): New structure.
2498 (linux_kernel_header): Change the efi field according to different
2499 kernel version, also field from linux_kernel_header.
2500
2501 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2502
2503 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2504 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2505 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2506 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2507 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2508 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2509 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2510 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2511 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2512 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2513
2514 * include/grub/x86_64/efi/kernel.h: New file.
2515
2516 * include/grub/x86_64/efi/loader.h: Likewise.
2517
2518 * include/grub/x86_64/efi/machine.h: Likewise.
2519
2520 * include/grub/x86_64/efi/pci.h: Likewise.
2521
2522 * include/grub/x86_64/efi/time.h: Likewise.
2523
2524 * include/grub/x86_64/linux.h: Likewise.
2525
2526 * include/grub/x86_64/setjmp.h: Likewise.
2527
2528 * include/grub/x86_64/time.h: Likewise.
2529
2530 * include/grub/x86_64/types.h: Likewise.
2531
2532 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2533 GRUB_TARGET_SIZEOF_VOID_P.
2534
2535 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2536 (grub_efi_locate_handle): Likewise.
2537 (grub_efi_open_protocol): Likewise.
2538 (grub_efi_set_text_mode): Likewise.
2539 (grub_efi_stall): Likewise.
2540 (grub_exit): Likewise.
2541 (grub_reboot): Likewise.
2542 (grub_halt): Likewise.
2543 (grub_efi_exit_boot_services): Likewise.
2544 (grub_get_rtc): Likewise.
2545
2546 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2547 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2548 (grub_efi_allocate_pages): Wrap efi calls.
2549 (grub_efi_free_pages): Wrap efi calls.
2550 (grub_efi_get_memory_map): Wrap efi calls.
2551
2552 * kern/x86_64/dl.c: New file.
2553
2554 * kern/x86_64/efi/callwrap.S: Likewise.
2555
2556 * kern/x86_64/efi/startup.S: Likewise.
2557
2558 * loader/efi/appleloader.c: Likewise.
2559
2560 * loader/efi/chainloader.c (cmdline): New variable.
2561 (grub_chainloader_unload): Wrap efi calls.
2562 (grub_chainloader_boot): Likewise.
2563 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2564 command line.
2565
2566 * loader/efi/chainloader_normal.c (chainloader_command):
2567 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2568 command line.
2569
2570 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2571 method.
2572 (grub_e820_add_region): New function.
2573 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2574 booting.
2575 (grub_find_video_card): New function.
2576 (grub_linux_setup_video): New function.
2577 (grub_rescue_cmd_linux): Probe for video information.
2578
2579 * normal/x86_64/setjmp.S: New file.
2580
2581 * term/efi/console.c (map_char): New function.
2582 (grub_console_putchar): Map unicode char.
2583 (grub_console_checkkey): Wrap efi calls.
2584 (grub_console_getkey): Likewise.
2585 (grub_console_getwh): Likewise.
2586 (grub_console_gotoxy): Likewise.
2587 (grub_console_cls): Likewise.
2588 (grub_console_setcolorstate): Likewise.
2589 (grub_console_setcursor): Likewise.
2590
2591 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2592
59652a20 25932008-07-16 Pavel Roskin <proski@gnu.org>
2594
ef294055 2595 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2596 format strings.
2597
59652a20 2598 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2599 pointer, not an integer. This fixes a warning and prevents
2600 precision loss on 64-bit systems.
2601 (relocate_addresses): Remove unneeded cast.
2602
afc3b5d7 26032008-07-15 Pavel Roskin <proski@gnu.org>
2604
506b2b3e 2605 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2606
62ead89c 2607 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2608
c4cd51d7 2609 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2610 Fix comparison between signed and unsigned.
2611
0d3d8f28 2612 * include/grub/i386/ieee1275/console.h: Declare
2613 grub_console_init() and grub_console_fini().
2614
8804b286 2615 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2616 It's empty and unused.
2617
ee01cf35 2618 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2619 beginning to avoid warnings with some compilers.
2620
afc3b5d7 2621 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2622 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2623
e4e8eaa5 26242008-07-14 Pavel Roskin <proski@gnu.org>
2625
407aceb4 2626 * kern/env.c (grub_register_variable_hook): Don't copy empty
2627 string, it leaks memory. Pass "" to grub_env_set(), it should
2628 handle constant strings.
2629
e4e8eaa5 2630 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2631 * commands/cmp.c (grub_cmd_cmp): Likewise.
2632 * kern/dl.c (grub_dl_flush_cache): Likewise.
2633 (grub_dl_load_core): Likewise.
2634 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2635 (grub_elf64_load_phdrs): Likewise.
2636
d4e2dad3 26372008-07-13 Pavel Roskin <proski@gnu.org>
2638
2639 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2640 between signed and unsigned.
2641 (LzmaEnc_Finish): Fix warning about an unused parameter.
2642
aa24b516 26432008-07-13 Bean <bean123ch@gmail.com>
2644
2645 * Makefile.in (enable_lzo): New rule.
2646
2647 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2648
2649 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2650
2651 * boot/i386/pc/lnxboot.S: #include <config.h>.
2652
2653 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 2654 its value according to the compression algorithm used, lzo or lzma.
aa24b516 2655
2656 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2657 compression algorithm according to configure macro.
2658
2659 * kern/i386/pc/startup.S (codestart): Likewise.
2660
2661 * kern/i386/pc/lzma_decode.S: New file.
2662
2663 * include/grub/lib/LzFind.h: Likewise.
2664
2665 * include/grub/lib/LzHash.h: Likewise.
2666
2667 * include/grub/lib/LzmaDec.h: Likewise.
2668
2669 * include/grub/lib/LzmaEnc.h: Likewise.
2670
2671 * include/grub/lib/LzmaTypes.h: Likewise.
2672
2673 * lib/LzFind.c: Likewise.
2674
2675 * lib/LzmaDec.c: Likewise.
2676
2677 * lib/LzmaEnc.c: Likewise.
2678
4ae821ac 26792008-07-13 Bean <bean123ch@gmail.com>
2680
2681 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2682 (grub_ext4_extent_header): New structure.
2683 (grub_ext4_extent): Likewise.
2684 (grub_ext4_extent_idx): Likewise.
2685 (grub_ext4_find_leaf): New function.
2686 (grub_ext2_read_block): Handle extents.
2687
9a745147 26882008-07-12 Robert Millan <rmh@aybabtu.com>
2689
2690 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2691
d49a4cf6 26922008-07-11 Robert Millan <rmh@aybabtu.com>
2693
2694 * util/grub.d/40_custom.in: New file. Example on how to add custom
2695 entries to /etc/grub.d.
2696 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2697 40_custom (implicitly, by merging all the grub.d rules).
2698
947414b4 26992008-07-11 Pavel Roskin <proski@gnu.org>
2700
0059cf6f 2701 * commands/read.c (grub_getline): Fix invalid memory access.
2702 Don't add newline to the variable value.
2703
947414b4 2704 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2705 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2706 (serial_hw_get_port): Check validity of the port number.
2707 (grub_cmd_serial): Check return value of serial_hw_get_port().
2708
62a02d00 27092008-07-07 Pavel Roskin <proski@gnu.org>
2710
2711 * boot/i386/pc/diskboot.S (notification_string): Replace
2712 "Loading kernel" with just "loading". This is shorter, less
2713 confusing and saves a few bytes for possible future changes.
2714
3e5581b0 27152008-07-05 Pavel Roskin <proski@gnu.org>
2716
ea387a48 2717 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2718 size for ATAPI devices, they are undefined. Output sector
2719 number in decimal form.
2720
3e5581b0 2721 * disk/ata.c: Use named constants for status bits.
2722
fdecb8fd 27232008-07-04 Pavel Roskin <proski@gnu.org>
2724
bcd35b90 2725 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2726 grub_addr_t before casting it to the void pointer to fix a
2727 warning. Non-addressable regions are discarded earlier.
2728 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2729 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2730 (check_signature): Don't shadow table_header.
2731 (grub_linuxbios_table_iterate): Cast numeric constants to
2732 grub_linuxbios_table_header_t.
2733 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2734 grub_stop().
2735
af58ab3d 2736 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2737 prevent warnings.
2738
1759aa57 2739 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2740 pointer, which can cause warnings. Support 64-bit addresses.
2741
fdecb8fd 2742 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2743 of sizeof(long). This fixes PowerPC image generation on x86_64.
2744
8516d2a8 27452008-07-04 Robert Millan <rmh@aybabtu.com>
2746
2747 This fixes a performance issue when pc & gpt partmap iterators
2748 didn't abort iteration even after our hook found what it was
fe987087 2749 looking for (often causing expensive probes of non-existent drives).
8516d2a8 2750
2751 Some callers relied on previous buggy behaviour, since they would
34c44600 2752 raise an error when their own hooks caused early abortion of its
8516d2a8 2753 iteration.
2754
2755 * kern/device.c (grub_device_open): Improve error message.
2756 * disk/lvm.c (grub_lvm_open): Likewise.
2757 * disk/raid.c (grub_raid_open): Likewise.
2758
2759 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2760 when hook requests it, independently of grub_errno.
2761 (pc_partition_map_probe): Do not fail when find_func() caused
2762 early abortion of pc_partition_map_iterate().
2763
2764 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2765 when hook requests it, independently of grub_errno.
2766 (gpt_partition_map_probe): Do not fail when find_func() caused
2767 early abortion of gpt_partition_map_iterate().
2768
2769 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2770 when hook requests it, independently of grub_errno. Do not fail when
2771 part_map_iterate_hook() caused early abortion of p->iterate().
2772
2773 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2774 when grub_partition_iterate() returned with non-zero.
2775
277d0de9 27762008-07-03 Pavel Roskin <proski@gnu.org>
2777
2778 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2779 like we do in grub_ata_pio_read().
2780 (grub_ata_readwrite): Always write individual sectors. Fix the
2781 sector count for the remainder.
2782 (grub_ata_write): Enable writing to ATA devices. Correctly
2783 report error for ATAPI devices.
2784
d4c9b428 27852008-07-02 Pavel Roskin <proski@gnu.org>
2786
e43fc690 2787 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2788 warning.
2789
f707af42 2790 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2791 for every read sector, we already increment it for the whole
2792 batch. This fixes reading more than 256 sectors at once.
2793
11e16b15 2794 * util/grub-editenv.c (cmd_info): Cast argument to long
2795 explicitly. ptrdiff_t reduces to int on i386.
2796
cbabfdd4 2797 * util/grub-editenv.c (main): Be specific which parameter is
2798 missing.
2799
b8fbce0a 2800 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2801 (memdisk): Make memdisk_orig_addr a pointer.
2802
c9c8e606 2803 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2804 for file offsets, use grub_off_t instead. Fix printf format
2805 warnings.
2806
ca62e598 2807 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2808 there. Real unexpected warnings should not drown in the noise
2809 about known problems.
2810
ce8d1766 2811 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2812 grub_disk_addr_t for memory addresses.
2813
00c7a56a 2814 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2815 explicitly to fix a warning.
2816
08d3ef09 2817 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2818
cb71ba20 2819 * Makefile.in (MODULE_LDFLAGS): New variable.
2820 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2821 the linker accepts --build-id=none.
2822 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2823 MODULE_LDFLAGS.
2824 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2825
d4c9b428 2826 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2827 those in Linux XFS code. Provide a way to access 64-bit parent
2828 inode.
2829 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2830 the end of struct grub_xfs_dir_header.
2831
d4156eee 28322008-07-02 Bean <bean123ch@gmail.com>
2833
2834 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2835 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2836 and GRUB_IEEE1275_FLAG_NO_ANSI.
2837
2838 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2839 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2840 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2841
2842 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2843 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2844
2845 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2846 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2847
2848 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2849 esc sequence on non ANSI terminal.
2850 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2851
2852 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2853 beginning of file.
2854
2270f77b 28552008-07-02 Bean <bean123ch@gmail.com>
2856
2857 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2858 (grub_editenv_SOURCES): New variable.
2859 (pkglib_MODULES): Add loadenv.mod.
2860 (loadenv_mod_SOURCES): New variable.
2861 (loadenv_mod_CFLAGS): Likewise.
2862 (loadenv_mod_LDFLAGS): Likewise.
2863
2864 * include/grub/envblk.h: New file.
2865
2866 * util/envblk.c: New file.
2867
2868 * util/grub-editenv.c: New file.
2869
2870 * commands/loadenv.c: New file.
2871
0e9e51ec 28722008-07-01 Pavel Roskin <proski@gnu.org>
2873
d89b7634 2874 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2875 not unsigned char. This fixes warnings and is consistent with
2876 other tags.
2877
bf1835b1 2878 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2879
8222a04b 2880 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2881
6a42d99d 2882 * term/tparm.c (analyze): Always set *popcount.
2883
10b159d1 2884 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2885 cast to fix a warning.
2886
b8789f6c 2887 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2888 cast to suppress a warning.
2889
29d7e38a 2890 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2891 grub_fshelp_read_file() expects.
2892
f341f669 2893 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2894 write uuid as a 32-bit value in CPU byte order, so declare and
2895 use it as such.
2896
0e9e51ec 2897 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2898 long if the format specifier expects it.
2899 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2900 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2901 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2902 long to fix a warning.
2903 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2904 grub_dprintf() arguments to fix warnings.
2905
3aefa857 29062008-06-30 Pavel Roskin <proski@gnu.org>
2907
56c7668b 2908 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2909 install_bsd_part immediately before core.img is embedded or
2910 modified on disk. This fixes core.img verification if core.img
2911 cannot be embedded.
2912
3aefa857 2913 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2914 core_path to calculate the blocklist.
2915 Patch from Javier Martín <lordhabbit@gmail.com>
2916
5444088d 29172008-06-29 Robert Millan <rmh@aybabtu.com>
2918
2919 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2920 block to disk block.
2921 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2922 Patch from Niels Böhm <bitbucket@arcor.de>
2923
674835c8 29242008-06-29 Robert Millan <rmh@aybabtu.com>
2925
2926 * util/update-grub_lib.in (font_path): Search for fonts in
2927 /boot/grub first, which is more likely to be readable (we aren't
2928 deciding where fonts live, just looking for them).
2929
f527dbc8 29302008-06-26 Pavel Roskin <proski@gnu.org>
2931
6c2d8df6 2932 * util/biosdisk.c (read_device_map): Don't leave dead map
2933 entries for devices failing stat() check.
2934
f527dbc8 2935 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2936 core_path_dev for the core.img path on the target device.
2937
aebe3d13 29382008-06-26 Robert Millan <rmh@aybabtu.com>
2939
2940 * disk/fs_uuid.c: New file.
2941 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2942 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2943 (fs_uuid_mod_LDFLAGS): New variables.
2944 * include/grub/disk.h (grub_disk_dev_id): Add
2945 `GRUB_DISK_DEVICE_UUID_ID'.
2946 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2947 implement iterate().
2948
37aaf354 29492008-06-26 Robert Millan <rmh@aybabtu.com>
2950
2951 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2952 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2953 Linux image includes no initrd.
2954
25ff262a 29552008-06-21 Javier Martín <lordhabbit@gmail.com>
2956
2957 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2958 call to resolve the core image location that effectively appended the
2959 name twice.
2960
76a2bd44 29612008-06-21 Robert Millan <rmh@aybabtu.com>
2962
2963 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2964 call from here ...
2965
2966 * util/grub.d/10_hurd.in: ... to here ...
2967 * util/grub.d/10_linux.in: ... and here.
2968
650e1c79 29692008-06-19 Robert Millan <rmh@aybabtu.com>
2970
fe987087 2971 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 2972 after it has been set by grub_machine_set_prefix().
2973
6ce63911 29742008-06-19 Robert Millan <rmh@aybabtu.com>
2975
2976 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2977 search result when not saving to variable, not the other way around.
2978 When saving to variable, abort iteration as soon as a match is found.
2979
73940cec 29802008-06-19 Robert Millan <rmh@aybabtu.com>
2981
2982 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2983 check for partition that provides /boot/grub. Its logic is flawed,
2984 as it prevents prepare_grub_to_access_device() from being called
2985 multiple times.
2986
3c62a39d 29872008-06-19 Robert Millan <rmh@aybabtu.com>
2988
2989 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2990 "insmod" command directly when abstraction modules are needed,
fe987087 2991 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 2992 since it had already been processed).
2993
47395a42 29942008-06-19 Pavel Roskin <proski@gnu.org>
2995
2996 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2997 changed. This is needed in case GRUB_LIBDIR changes.
2998 * conf/i386-ieee1275.rmk: Likewise.
2999 * conf/i386-linuxbios.rmk: Likewise.
3000 * conf/i386-pc.rmk: Likewise.
3001 * conf/powerpc-ieee1275.rmk: Likewise.
3002
a145ac2d 30032008-06-18 Pavel Roskin <proski@gnu.org>
3004
3005 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3006 kernel_elf_symlist.c to symlist.c for consistency with other
3007 architectures. Update all users.
3008 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3009
7847c51e 30102008-06-18 Robert Millan <rmh@aybabtu.com>
3011
3012 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3013 it in prefix.
3014
3015 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3016 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3017 a RAID device, run setup() for all members independently on whether
3018 LVM abstraction is being used.
3019 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3020 If grub-mkimage has set `*install_dos_part == -2', don't override this
3021 value.
3022 Perform *install_dos_part adjustments independently on whether
3023 we're embedding or not.
3024 Clarify error message when image is too big for embedding.
3025 Remove duplicate *install_dos_part stanza.
3026
b23e5644 30272008-06-17 Robert Millan <rmh@aybabtu.com>
3028
3029 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3030 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3031 variables.
3032 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3033 values in grub_ofconsole_normal_color and
3034 grub_ofconsole_highlight_color (they're not directly related to
3035 background and foreground).
3036 (grub_ofconsole_setcolorstate): Extract background and foreground
3037 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3038
0aac2f79 30392008-06-17 Robert Millan <rmh@aybabtu.com>
3040
3041 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3042 /boot/grub for the check in last commit, not /boot (they could be
3043 different partitions).
3044
3cca7ef3 30452008-06-16 Robert Millan <rmh@aybabtu.com>
3046
3047 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3048 asked to setup access for the same partition that provides /boot,
3049 don't bother using UUIDs since our root already has the value we
3050 want.
3051
347396d8 30522008-06-16 Robert Millan <rmh@aybabtu.com>
3053
3054 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3055 I2O devices.
3056 Patch from Sven Mueller <sven@debian.org>.
3057
991477f8 30582008-06-16 Robert Millan <rmh@aybabtu.com>
3059
3060 * util/update-grub.in: Check for $EUID instead of $UID.
3061 Reported by Vincent Zweije.
3062
d31a32a1 30632008-06-16 Bean <bean123ch@gmail.com>
3064
fe987087 3065 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 3066 (grub_ext2_read_block): Likewise.
3067 (grub_ext2_read_inode): Likewise.
3068 (grub_ext2_mount): Likewise.
3069 (grub_ext2_close): Likewise.
3070 (grub_ext3_get_journal): Removed.
3071
fe987087 3072 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 3073 (grub_reiserfs_read_symlink): Likewise.
3074 (grub_reiserfs_mount): Likewise.
3075 (grub_reiserfs_open): Likewise.
3076 (grub_reiserfs_read): Likewise.
3077 (grub_reiserfs_close): Likewise.
3078 (grub_reiserfs_get_journal): Removed.
3079
3080 * fs/fshelp.c (grub_fshelp_read): Removed.
3081 (grub_fshelp_map_block): Likewise.
3082
3083 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3084 (grub_fshelp_journal): Likewise.
3085 (grub_fshelp_read): Likewise.
3086 (grub_fshelp_map_block): Likewise.
3087
3540a760 30882008-06-16 Pavel Roskin <proski@gnu.org>
3089
3090 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3091 floating point anymore.
3092 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3093
95614c84 30942008-06-15 Pavel Roskin <proski@gnu.org>
3095
3096 * commands/ls.c (grub_ls_list_files): Use integer calculations
3097 for human readable format, avoid floating point use.
3098 * kern/misc.c (grub_ftoa): Remove.
3099 (grub_vsprintf): Remove floating point support.
3100
50465dd6 31012008-06-15 Robert Millan <rmh@aybabtu.com>
3102
fe6b695a 3103 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 3104 devices.
3105 Reported by Max Vozeler.
3106
a9207284 31072008-06-15 Robert Millan <rmh@aybabtu.com>
3108
3109 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3110 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3111 skipped later.
3112 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3113 the beginning of the prefix.
3114
3115 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3116 It is assumed that if we have a memdisk, grub-mkimage has set
3117 grub_prefix to include the "(memdisk)" drive in it.
3118
a7cbd45a 31192008-06-15 Robert Millan <rmh@aybabtu.com>
3120
3121 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3122 Initialize keyboard controller after registering the terminal, so that
3123 grub_printf() can be called from grub_keyboard_controller_init().
3124
21cf716a 31252008-06-15 Robert Millan <rmh@aybabtu.com>
3126
3127 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3128 extent-btree which is written as big endian on disk.
3129 Reported by Alain Greppin <al@chilibi.org>.
3130
23a64d8e 31312008-06-14 Robert Millan <rmh@aybabtu.com>
3132
3133 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3134 * util/i386/pc/grub-install.in (modules): Likewise.
3135
d687651c 31362008-06-13 Pavel Roskin <proski@gnu.org>
3137
3138 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3139
dfe9ddd4 31402008-06-13 Bean <bean123ch@gmail.com>
3141
3142 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3143
3144 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3145
3146 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3147 to indicate sparse block.
3148
16ae7781 31492008-06-12 Pavel Roskin <proski@gnu.org>
3150
e6d1a308 3151 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3152 number, grub_fshelp_read() does it for us.
3153
16ae7781 3154 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3155 linear disk read with journal translation.
3156 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3157 * include/grub/fshelp.h: Declare grub_fshelp_read().
3158
40fd3a2b 31592008-06-09 Pavel Roskin <proski@gnu.org>
3160
3161 * fs/minix.c (grub_minix_mount): Handle error reading
3162 superblock.
3163
f5679726 31642008-06-08 Robert Millan <rmh@aybabtu.com>
3165
3166 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3167 don't append the RAID prefix afterwards.
3168 Reported by Clint Adams.
3169
ce525529 31702008-06-08 Robert Millan <rmh@aybabtu.com>
3171
3172 Based on description from Pavel:
3173 * kern/disk.c (grub_disk_check_range): Rename to ...
3174 (grub_disk_adjust_range): ... this. Add a comment explaining the
3175 tasks performed by this function.
3176
ad4936a0 31772008-06-08 Robert Millan <rmh@aybabtu.com>
3178
3179 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3180 `num_serial' (for consistency with other variables).
3181 (struct grub_ntfs_data): Add `uuid' member.
3182 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3183 (grub_ntfs_uuid): New function.
3184 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3185
dc20b0f9 31862008-06-07 Pavel Roskin <proski@gnu.org>
3187
3188 * util/biosdisk.c (open_device): Revert last change to the
3189 function, it broke installation. The sector needs to be
3190 different dependent on which device is opened.
3191
c5e3cfba 31922008-06-06 Robert Millan <rmh@aybabtu.com>
3193
3194 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3195 rest of GRUB, and breakage doesn't happen if its value were modified.
3196
3197 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3198 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3199 a constant (same value).
3200 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3201 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3202
26a1f8c4 32032008-06-06 Robert Millan <rmh@aybabtu.com>
3204
3205 * util/biosdisk.c (open_device): Do not modify sector offset when
3206 accessing a partition. kern/disk.c already handles this for us.
3207
25d6b327 32082008-06-06 Robert Millan <rmh@aybabtu.com>
3209
3210 * util/grub-emu.c (grub_machine_init): Move code in this function from
3211 here ...
3212 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3213 segfault in case grub_printf() is called).
3214
3215 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3216 grub_probe. Update all users not to explicitly add it again.
3217 (grub_device): New variable; contains corresponding device for grubdir.
3218 (fs_module, partmap_module, devabstraction_module): Pass
3219 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3220 every time.
3221
9ece62fb 32222008-06-05 Robert Millan <rmh@aybabtu.com>
3223
3224 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3225 is found, print it (same layout as with labels).
3226
1ad36d37 32272008-06-04 Robert Millan <rmh@aybabtu.com>
3228
3229 * util/biosdisk.c (get_drive): Rename to ...
3230 (find_grub_drive): ... this. Update all users.
3231
3232 (get_os_disk): Rename to ...
3233 (convert_system_partition_to_system_disk): ... this. Update all users.
3234
3235 (find_drive): Rename to ...
3236 (find_system_device): ... this. Update all users.
3237
e6a30859 32382008-06-04 Robert Millan <rmh@aybabtu.com>
3239
3240 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3241 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3242 (make_device_map): Likewise.
3243
00c108a4 32442008-06-01 Robert Millan <rmh@aybabtu.com>
3245
3246 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3247 before dereferencing it.
3248
3249 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3250 union with fat12/fat16-specific ones. Add some new fields, including
3251 `num_serial' for both versions.
3252 (struct grub_fat_data): Add `uuid' member.
3253 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3254 names. Initialize `data->uuid' using `num_serial'.
3255 (grub_fat_uuid): New function.
3256 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3257
3258 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3259 (grub_reiserfs_uuid): New function.
3260 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3261 member.
3262
3263 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3264 (grub_xfs_uuid): New function.
3265 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3266
1385c5bb 32672008-06-01 Robert Millan <rmh@aybabtu.com>
3268
3269 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3270 code that is backward compatible with pre-uuid search command.
3271
c682dfd7 32722008-05-31 Robert Millan <rmh@aybabtu.com>
3273
3274 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3275 floppies after everything else, to ensure floppy drive isn't accessed
3276 unnecessarily (patch from Bean).
3277
b7db5d47 32782008-05-31 Robert Millan <rmh@aybabtu.com>
3279
3280 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3281 not print device names when we were asked to set a variable.
3282
6e037aa9 32832008-05-31 Robert Millan <rmh@aybabtu.com>
3284
3285 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3286 using "cursor-on" and "cursor-off" commands (understood at least by
3287 the Open Firmware flavour on OLPC).
3288
41305bc8 32892008-05-31 Michael Gorven <michael@gorven.za.net>
3290
3291 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3292 on and off sequences.
3293
69ba137e 32942008-05-31 Robert Millan <rmh@aybabtu.com>
3295
3296 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3297 * util/update-grub.in: Likewise.
3298
520ae21b 32992008-05-30 Pavel Roskin <proski@gnu.org>
3300
3301 * util/biosdisk.c (linux_find_partition): Simplify logic and
3302 make the code more universal. Keep special processing for
3303 devfs, but use a simple rule for all other devices. If the
3304 device ends with a number, append 'p' and the partition number.
3305 Otherwise, append only the partition number.
3306
5786569b 33072008-05-30 Robert Millan <rmh@aybabtu.com>
3308
3309 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3310 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3311 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3312 the `root' parameter to Linux.
3313
51500452 33142008-05-30 Robert Millan <rmh@aybabtu.com>
3315
3316 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3317 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3318 --fs_uuid with --fs-uuid.
3319 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3320 all filesystems support them).
3321
811d3878 33222008-05-30 Robert Millan <rmh@aybabtu.com>
3323
3324 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 3325 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 3326
cab63c95 33272008-05-30 Robert Millan <rmh@aybabtu.com>
3328
3329 * util/grub.d/00_header.in: Remove obsolete comment referencing
3330 convert_system_path_to_grub_path().
3331 * util/update-grub.in: Likewise.
3332 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3333 (convert_system_path_to_grub_path): Add a warning message explaining
3334 that this function is deprecated. Rely on is_path_readable_by_grub()
3335 for the readability checks.
3336 (font_path): Use is_path_readable_by_grub() for the readability
3337 check rather than convert_system_path_to_grub_path().
3338
972e2f7a 33392008-05-30 Robert Millan <rmh@aybabtu.com>
3340
3341 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3342 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3343 converting it first.
3344 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3345 grub.cfg for access to font file, and afterwards call it again to set
3346 the root device.
3347
62191274 33482008-05-30 Robert Millan <rmh@aybabtu.com>
3349
3350 * commands/search.c (options): Add --fs_uuid option.
3351 (search_fs_uuid): New function.
3352 (grub_cmd_search): Fix --set argument passing.
3353 Use search_fs_uuid() when requested via --fs_uuid.
3354 (grub_search_init): Update help message.
3355 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3356 and redeclare it as an array of 16-bit words.
3357 (grub_ext2_uuid): New function.
3358 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3359 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3360 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3361 (GRUB_DEVICE_BOOT_UUID): New variables.
3362 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3363 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3364 whenever possible.
3365 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3366 just assume `root' variable has the right value.
3367 * util/grub.d/10_linux.in: Likewise.
3368 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3369 via PRINT_FS_UUID.
3370 (main): Recognise `-t fs_uuid' argument.
3371
01b73ec8 33722008-05-30 Robert Millan <rmh@aybabtu.com>
3373
3374 * util/biosdisk.c (map): Redefine structure to hold information
3375 about GRUB drive name.
fe6b695a 3376 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 3377 drive names.
3378 (call_hook): Remove.
3379 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3380 member. Assume drive has partitions.
3381 (grub_util_biosdisk_open): Access device names via `.device' struct
3382 member.
3383 (open_device): Likewise.
3384 (find_drive): Likewise.
3385 (read_device_map): Adjust map[] usage to match the new struct
3386 definition. Don't check for duplicates (still possible, but not cheap
3387 anymore).
3388 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3389 (make_device_name): Remove assumption of BIOS-like drive names.
3390
22f16596 33912008-05-30 Pavel Roskin <proski@gnu.org>
3392
3393 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3394 compiling execute.c doesn't need grub_script.tab.h anymore.
3395 (normal/command.c_DEPENDENCIES): Likewise.
3396 (normal/function.c_DEPENDENCIES): Likewise.
3397 * conf/i386-ieee1275.rmk: Likewise.
3398 * conf/i386-linuxbios.rmk: Likewise.
3399 * conf/i386-pc.rmk: Likewise.
3400 * conf/powerpc-ieee1275.rmk: Likewise.
3401 * conf/sparc64-ieee1275.rmk: Likewise.
3402
528ad8f2 34032008-05-29 Pavel Roskin <proski@gnu.org>
3404
d1dff95d 3405 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3406 when scanning metadata for volume group name.
3407
528ad8f2 3408 * include/grub/script.h: Don't include grub_script.tab.h. It's
3409 a generated file, which may only be included from the files with
3410 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3411 use union YYSTYPE, as the later allows forward declaration.
3412 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3413
47248e08 34142008-05-29 Robert Millan <rmh@aybabtu.com>
3415
3416 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3417 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3418 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3419 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3420 scan codes.
3421
ee632529 34222008-05-29 Robert Millan <rmh@aybabtu.com>
3423
3424 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3425 control key combinations.
3426
eee96e08 34272008-05-29 Robert Millan <rmh@aybabtu.com>
3428
3429 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3430 * util/ieee1275/grub-install.in: ... to here.
3431 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3432 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3433 (grub_install_SOURCES): Likewise.
3434
da9a6a94 34352008-05-29 Robert Millan <rmh@aybabtu.com>
3436
3437 * fs/affs.c: Update copyright year.
3438 * fs/ext2.c: Likewise.
3439 * fs/fshelp.c: Likewise.
3440 * fs/hfsplus.c: Likewise.
3441 * fs/ntfs.c: Likewise.
3442 * fs/xfs.c: Likewise.
3443 * include/grub/fshelp.h: Likewise.
3444 * util/grub-mkdevicemap.c: Likewise.
3445
12e65f3a 34462008-05-28 Robert Millan <rmh@aybabtu.com>
3447
3448 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3449 might need to be fatfs to support some firmware implementations
3450 (e.g. OFW or EFI).
3451
23023641 34522008-05-28 Robert Millan <rmh@aybabtu.com>
3453
3454 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3455 devices.
3456 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3457 (make_device_map): Likewise.
3458
887d2619 34592008-05-20 Bean <bean123ch@gmail.com>
3460
3461 * fs/fshelp.c (grub_fshelp_map_block): New function.
3462 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3463 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3464
3465 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3466 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3467 (grub_fshelp_journal): New structure.
3468 (grub_fshelp_map_block): New function prototype.
3469 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3470 (grub_fshelp_map_block): Likewise.
3471
3472 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3473 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3474 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3475 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3476 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3477 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3478 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3479 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3480 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3481 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3482 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3483 (grub_ext2_sblock): New members for journal support.
3484 (grub_ext3_journal_header): New structure.
3485 (grub_ext3_journal_revoke_header): Likewise.
3486 (grub_ext3_journal_block_tag): Likewise.
3487 (grub_ext3_journal_sblock): Likewise.
3488 (grub_fshelp_node): New members logfile and journal.
3489 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3490 grub_fshelp_map_block to get real block number.
3491 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3492 number.
3493 (grub_ext2_read_inode): Likewise.
3494 (grub_ext3_get_journal): New function.
3495 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3496 (grub_ext2_close): Release memory used by journal.
3497
3498 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3499 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3500 (grub_reiserfs_transaction_header): Renamed to
3501 grub_reiserfs_description_block, replace field data with real_blocks.
3502 (grub_reiserfs_commit_block): New structure.
3503 (grub_reiserfs_data): New member journal.
3504 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3505 number.
3506 (grub_reiserfs_read_symlink): Likewise.
3507 (grub_reiserfs_iterate_dir): Likewise.
3508 (grub_reiserfs_open): Likewise.
3509 (grub_reiserfs_read): Likewise.
3510 (grub_reiserfs_get_journal): New function.
3511 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3512 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3513 using grub_reiserfs_get_journal.
3514 (grub_reiserfs_close): Release memory used by journal.
3515
3516 * fs/affs.c (grub_affs_read_block): Change block type to
3517 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3518
3519 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3520
3521 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3522
3523 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3524
3525 * fs/udf.c (grub_udf_read_block): Change block type to
3526 grub_disk_addr_t. Use type cast to avoid warning.
3527
3528 * fs/xfs.c (grub_xfs_read_block): Likewise.
3529
b7c6bed5 35302008-05-16 Christian Franke <franke@computer.org>
3531
3532 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3533 to ensure that break with ESC will always work.
3534 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3535 Remove ESC from keyboard queue.
3536
eedf167f 35372008-05-16 Christian Franke <franke@computer.org>
3538
3539 * util/biosdisk.c: [__CYGWIN__] Add includes.
3540 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3541 (get_os_disk): Move variable declarations to OS specific
3542 parts to avoid warning.
3543 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3544 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3545 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3546 Cygwin.
3547 * util/getroot.c: [__CYGWIN__] Add includes.
3548 (strip_extra_slashes): Fix "/" case.
3549 [__CYGWIN__] (get_win32_path): New function.
3550 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3551 [__CYGWIN__] (find_root_device): Disable.
3552 [__CYGWIN__] (get_bootsec_serial): New function.
3553 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3554 [__linux__] (grub_guess_root_device): Add early returns to simplify
3555 structure.
3556 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3557 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3558 check for Linux only.
3559
a079699e 35602008-05-15 Bean <bean123ch@gmail.com>
3561
3562 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3563 keyboard hang problem in apple's intel mac.
3564
1cf4059a 35652008-05-09 Robert Millan <rmh@aybabtu.com>
3566
3567 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3568 devices.
3569 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3570 (make_device_map): Likewise.
3571 Reported by Aurelien Jarno <aurel32@debian.org>
3572
ed759390 35732008-05-07 Ian Campbell <ijc@hellion.org.uk>
3574
3575 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3576 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3577 (make_device_map): Output entries for xvd type disks.
3578
b56c4eaa 35792008-05-07 Robert Millan <rmh@aybabtu.com>
3580
3581 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3582 devices.
3583 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3584 (make_device_map): Likewise.
3585 Reported by Roland Dreier <rdreier@cisco.com>
3586
7f8866ed 35872008-05-07 Robert Millan <rmh@aybabtu.com>
3588
3589 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3590 grub_strstr() call. Correct a few mistakes in failure path handling.
3591
b0346e0f 35922008-05-06 Robert Millan <rmh@aybabtu.com>
3593
3594 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3595 Do not print a trailing slash (therefore, the root directory is an
3596 empty string).
3597 (convert_system_path_to_grub_path): Do not remove trailing slash
3598 from make_system_path_relative_to_its_root() output.
3599
3600 * util/i386/pc/grub-install.in: Add trailing slash to output from
3601 make_system_path_relative_to_its_root().
3602
6cf12cbd 36032008-05-06 Robert Millan <rmh@aybabtu.com>
3604
3605 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3606 ensures that output lines aren't intermangled with those sent to
3607 stderr (via grub_util_info()).
3608 * util/grub-probe.c (grub_refresh): Likewise.
3609 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3610
0fbb3117 36112008-05-05 Christian Franke <franke@computer.org>
3612
3613 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3614 Add Cygwin device names.
3615 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3616 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3617 (check_device): Return error instead of success on empty name.
3618 (make_device_map): Move label inside linux specific code to
3619 prevent compiler warning.
3620
8124cdb7 36212008-04-30 Robert Millan <rmh@aybabtu.com>
3622
3623 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3624 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3625 first boot option.
3626 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3627
094c01d0 36282008-04-29 Robert Millan <rmh@aybabtu.com>
3629
3630 * docs/grub.cfg: New file (example GRUB configuration).
3631
f4b1fc02 36322008-04-26 Robert Millan <rmh@aybabtu.com>
3633
329ce2a5 3634 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3635 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3636 and `disk/ieee1275/nand.c'.
f4b1fc02 3637
25f16ec1 36382008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 3639
25f16ec1 3640 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3641 i386-linuxbios.
3642
3643 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3644 change the buffer size to 4096 for cdrom device.
3645
3646 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3647 and nand.mod.
3648 (_linux_mod_SOURCES): New variable.
3649 (_linux_mod_CFLAGS): Likewise.
3650 (_linux_mod_LDFLAGS): Likewise.
3651 (linux_mod_SOURCES): Likewise.
3652 (linux_mod_CFLAGS): Likewise.
3653 (linux_mod_LDFLAGS): Likewise.
3654 (nand_mod_SOURCES): Likewise.
3655 (nand_mod_CFLAGS): Likewise.
3656 (nand_mod_LDFLAGS): Likewise.
3657
3658 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3659 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3660 type property. (nand device in olpc don't have this property)
3661
3662 * include/grub/disk.h (grub_disk_dev_id): New macro
3663 GRUB_DISK_DEVICE_NAND_ID.
3664
3665 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3666 function prototype.
3667 (grub_rescue_cmd_initrd): Likewise.
3668
3669 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3670 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3671 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 3672
25f16ec1 3673 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3674 GRUB_MACHINE_IEEE1275 is defined.
3675
3676 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3677 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3678
3679 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3680 on nested function heap_init.
3681 (grub_upper_mem): New variable for i386-ieee1275.
3682 (grub_get_extended_memory): New function for i386-ieee1275.
3683 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3684
3685 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3686 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3687 property.
f19dbdb7 3688
25f16ec1 3689 * loader/i386/ieee1275/linux.c: New file.
3690
3691 * loader/i386/ieee1275/linux_normal.c: New file.
3692
3693 * disk/ieee1275/nand.c: New file.
3694
e89d61e9 36952008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3696
3697 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3698 value.
3699 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3700
602566f6 37012008-04-18 Robert Millan <rmh@aybabtu.com>
3702
3703 Restructures early code path on ieee1275 to unify grub_main() as
3704 the first C function that is executed in every platform.
3705
3706 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3707 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3708 cmain().
3709 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3710 * kern/ieee1275/cmain.c (cmain): Rename to ...
3711 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3712 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3713 at the beginning.
3714
57490c2b 37152008-04-18 Robert Millan <rmh@aybabtu.com>
3716
3717 * util/update-grub.in: Fix syntax error when setting
3718 `GRUB_PRELOAD_MODULES'.
3719 Reported by Stephane Chazelas <stephane@artesyncp.com>
3720
1977517d 37212008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3722
3723 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3724 section into account, newer toolchains generate unique build ids
3725 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 3726 we want build ids to be preserved
1977517d 3727 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3728 far from other sections don't cause the raw binary images grow
3729 size
3730
bfb1f1a2 37312008-04-15 Robert Millan <rmh@aybabtu.com>
3732
3733 * disk/lvm.c: Update copyright year.
3734 * kern/misc.c: Likewise.
3735
01979850 37362008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3737
3738 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 3739 there is no memory left for physical volume name.
01979850 3740
0a1150e2 37412008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3742
3743 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3744 volume name mapping to support bigger than 9 character names properly.
3745
82ead3fe 37462008-04-13 Robert Millan <rmh@aybabtu.com>
3747
3748 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3749 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3750
e54a72f5 37512008-04-13 Christian Franke <franke@computer.org>
3752
3753 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3754 to create a floppy emulation boot CD when non emulation mode
3755 does not work.
3756 Enable Joliet CD filesystem extension.
3757
9fe86034 37582008-04-13 Robert Millan <rmh@aybabtu.com>
3759
3760 * kern/misc.c (grub_strncat): Fix off-by-one error.
3761 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3762
3763 * kern/env.c (grub_env_context_close): Clear current context, not
3764 previous one.
3765 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3766
3767 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3768
7ceeee39 37692008-04-13 Robert Millan <rmh@aybabtu.com>
3770
3771 Improve robustness when handling LVM.
3772
3773 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 3774 (and leave `*p' unmodified).
7ceeee39 3775 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3776 through it.
3777 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3778 iterating through it.
3779 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3780 through it.
fe6b695a 3781 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 3782 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3783 Don't assume `vg->pvs != NULL' when iterating through it.
3784
58cd3d85 37852008-04-13 Robert Millan <rmh@aybabtu.com>
3786
3787 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3788 * genmk.rb (partmap): New variable.
3789 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3790 (#{partmap}): New target rule.
3791 * genpartmaplist.sh: New file.
3792 * Makefile.in (pkglib_DATA): Add partmap.lst.
3793 (partmap.lst): New target rule.
3794 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3795 modules (including all partition maps), instead of preloading them.
3796
78b51059 37972007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3798
3799 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3800 `linux-boot-prober' (if installed) to detect other operating
3801 systems which are installed on the computer and add them to
3802 the boot menu.
3803 * conf/common.rmk: Build and install 30_os-prober.
3804
a91627b4 38052008-04-12 Robert Millan <rmh@aybabtu.com>
3806
3807 * kern/powerpc/ieee1275/init.c: Move from here ...
3808 * kern/ieee1275/init.c: ... to here. Update all users.
3809
3810 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3811 * kern/ieee1275/cmain.c: ... to here. Update all users.
3812
3813 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3814 * kern/ieee1275/openfw.c: ... to here. Update all users.
3815
3816 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3817 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3818
322562ea 38192008-04-10 Pavel Roskin <proski@gnu.org>
3820
3821 * configure.ac: Always use "_cv_" in cache variables for
3822 compatibility with Autoconf 2.62.
3823
a02a73c5 38242008-04-07 Robert Millan <rmh@aybabtu.com>
3825
3826 Revert grub/machine/init.h addition by Pavel (since it breaks on
3827 i386-ieee1275 and others):
3828 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3829 * util/powerpc/ieee1275/misc.c: Likewise.
3830
25c024b1 38312008-04-07 Robert Millan <rmh@aybabtu.com>
3832
3833 * util/grub-probe.c (probe): Improve error message.
3834
3cbd2f98 38352008-04-07 Robert Millan <rmh@aybabtu.com>
3836
3837 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3838 (this prevents the presence of a bogus entry from ruining the whole
3839 thing).
3840
87a297bf 38412008-04-06 Pavel Roskin <proski@gnu.org>
3842
36747a62 3843 * util/biosdisk.c: Include grub/util/biosdisk.h.
3844 * util/grub-fstest.c (execute_command): Make static.
3845 * util/grub-mkdevicemap.c (check_device): Likewise.
3846 * util/i386/pc/misc.c: Include grub/machine/init.h.
3847 * util/powerpc/ieee1275/misc.c: Likewise.
3848 * util/lvm.c: Include grub/util/lvm.h.
3849 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3850 grub/cache.h.
3851 * util/raid.c: Include grub/util/raid.h.
3852 (grub_util_getdiskname): Make static.
3853
87a297bf 3854 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3855 grub_hostfs_fini(), as they are called from grub_init_all() and
3856 grub_fini_all() respectively. This fixes an infinite loop in
3857 grub-fstest due to double registration of hostfs.
3858 Reported by Christian Franke <Christian.Franke@t-online.de>
3859
f6ce7629 38602008-04-05 Pavel Roskin <proski@gnu.org>
3861
3862 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3863 all 8 functions. Otherwise, probe function 0 only.
3864
070e49e4 38652008-04-04 Pavel Roskin <proski@gnu.org>
3866
8b088a4c 3867 * commands/lspci.c (grub_lspci_iter): Print the bus number
3868 correctly.
3869
4f657021 3870 * commands/lspci.c (grub_pci_classes): Fix typos.
3871 (grub_lspci_iter): Don't print func twice. Print vendor ID
3872 before device ID, as it's normally done.
3873
070e49e4 3874 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3875 Fix signedness warnings.
3876 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3877 Likewise.
3878 * util/ieee1275/get_disk_name.c: Include config.h so that
3879 _GNU_SOURCE is defined and getline() is declared. Mark an
3880 unused argument as such. Fix a signedness warning.
3881
ba7328dc 38822008-04-02 Pavel Roskin <proski@gnu.org>
3883
26887f22 3884 * genkernsyms.sh.in: Use more robust assignments for CC and
3885 srcdir. Quote srcdir.
3886 * gensymlist.sh.in: Likewise. Assert at the compile time that
3887 the symbol table is not empty.
3888
ba7328dc 3889 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3890 * fs/cpio.c (grub_cpio_read): Likewise.
3891
0f582c6b 38922008-04-01 Pavel Roskin <proski@gnu.org>
3893
4b6e1995 3894 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3895 * disk/host.c (grub_host_open): Likewise.
3896 * disk/loopback.c (grub_loopback_open): Likewise.
3897 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3898 disk->id as in disk/host.c, not a multi-character constant.
3899
828a2768 3900 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3901 later is obsolete, potentially dangerous and sets a bad example.
3902 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3903 * util/misc.c (grub_util_get_image_size): Likewise.
3904
2bb4fb47 3905 * disk/loopback.c (options): Improve help for "--partitions".
3906
0f582c6b 3907 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3908 options to align them with the short options, e.g. "echo -e".
3909
a33224e0 39102008-03-31 Bean <bean123ch@gmail.com>
3911
3912 * video/reader/png.c (grub_png_data): New member is_16bit and
3913 image_data.
3914 (grub_png_decode_image_header): Detect 16 bit png image.
3915 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3916 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3917 (grub_video_reader_png): Release memory occupied by image_data.
3918
3919 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3920 4096 bytes.
3921 (grub_nfs_mount): Skip the test for sector per cluster.
3922
3923 * include/grub/ntfs.h (MAX_SPC): Removed.
3924
86cb4f54 39252008-03-31 Bean <bean123ch@gmail.com>
3926
3927 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3928 (grub_probe_SOURCES): Add fs/afs.c.
3929 (grub_fstest_SOURCES): Likewise.
3930 (afs_mod_SOURCES): New variable.
3931 (afs_mod_CFLAGS): Likewise.
3932 (afs_mod_LDFLAGS): Likewise.
3933
3934 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3935 (grub_emu_SOURCES): Likewise.
3936
3937 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3938
3939 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3940
3941 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3942
3943 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3944
3945 * fs/afs.c: New file.
3946
17c74c21 39472008-03-30 Pavel Roskin <proski@gnu.org>
3948
4cb68e89 3949 * disk/host.c: Include grub/misc.h to fix a warning.
3950 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3951 warnings about implicit declarations.
3952
8790bb04 3953 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3954 variable.
3955 * include/grub/i386/loader.h: Change declaration of
3956 grub_linux_boot() to match what grub_loader_set() expects.
3957 * util/getroot.c (grub_guess_root_device): Return const char* to
3958 fix a warning.
3959 * util/grub-probe.c (probe): Fix a warning about uninitialized
3960 abstraction_name variable.
3961 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3962 second argument as unused to fix a warning.
3963
9a3f3296 3964 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3965 missing grub_error() call.
3966
0ecef90d 3967 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3968 2.60 and newer uses it to define datadir.
3969
0bf6d401 3970 * commands/sleep.c: Fix warning about implicit declaration.
3971 * disk/memdisk.c: Likewise.
3972 * loader/aout.c: Likewise.
3973 * loader/i386/bsd_normal.c: Likewise.
3974 * util/grub-probe.c: Likewise.
3975
7cdacf97 3976 * commands/i386/cpuid.c (has_longmode): Make static.
3977 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3978 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3979
17c74c21 3980 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3981 GDT. This is more robust, as %ds can change.
3982 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3983 calling real_to_prot().
3984 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3985
80a3e68b 39862008-03-28 Pavel Roskin <proski@gnu.org>
3987
3988 * kern/i386/pc/startup.S: Assert that uncompressed functions
3989 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3990 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3991 code, as they push parts of the code (error handlers) beyond
3992 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3993 code as correctness and size.
3994
77bcd272 39952008-03-28 Pavel Roskin <proski@gnu.org>
3996
3997 * kern/i386/pc/startup.S
3998 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3999 data block address to the real mode, keep offset minimal. This
4000 works around a bug in AWARD BIOS on old Athlon systems, which
4001 makes CD detection hang.
4002
c5dfd43b 40032008-03-26 Pavel Roskin <proski@gnu.org>
4004
4005 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4006 const.
4007 * include/grub/normal.h: Add grub_parse_color_name_pair()
4008 declaration.
4009
bf962df2 40102008-03-24 Bean <bean123ch@gmail.com>
4011
4012 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4013 (cd_count): Removed.
4014 (cd_drive): New variable.
4015 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4016 (grub_biosdisk_call_hook): Likewise.
4017 (grub_biosdisk_iterate): Change cdrom detection method.
4018 (grub_biosdisk_open): Replace cd_start with cd_drive.
4019 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4020 detect cdrom device.
4021
4022 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4023 Removed.
4024 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4025 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4026 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4027 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4028 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4029 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4030 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4031 (grub_biosdisk_cdrp): New structure.
4032 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4033
4034 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4035
4036 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4037 device.
4038
4039 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4040 New function.
4041
68e7fc7a 40422008-03-20 Robert Millan <rmh@aybabtu.com>
4043
4044 Remove 2 TiB limit in ata.mod.
4045 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4046 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4047 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4048 grub_uint64_t instead of grub_uint32_t.
4049
38ad2cf5 40502008-03-05 Bean <bean123ch@gmail.com>
4051
4052 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4053 (grub_multiboot): Set boot device.
4054
4055 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4056
2b89344e 40572008-03-02 Bean <bean123ch@gmail.com>
4058
4059 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4060 symlink_buffer.
4061
87a95d1f 40622008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4063
4064 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4065 texinfo.tex.
4066
4067 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4068 modified.
4069
4070 * docs/fdl.texi: New file.
f19dbdb7 4071
87a95d1f 4072 * docs/mdate-sh: New file. Copied from gnulib.
4073 * docs/texinfo.tex: Likewise.
4074
4075 * config.guess: Updated from gnulib.
4076 * install-sh: Likewise.
4077
7dc15d8e 40782008-02-28 Robert Millan <rmh@aybabtu.com>
4079
4080 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4081 (aout_mod_SOURCES): New variable.
4082 (aout_mod_CFLAGS): Likewise.
4083 (aout_mod_LDFLAGS): Likewise.
4084
4085 * conf/i386-ieee1275.rmk: Likewise.
4086
b00ab696 40872008-02-28 Robert Millan <rmh@aybabtu.com>
4088
4089 * util/update-grub.in: Reorganise terminal validity check. Accept
4090 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4091 Based on suggestion by Franklin PIAT.
4092
79ca2d78 40932008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4094
4095 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4096 function.
4097 * util/getroot.c (grub_util_check_block_device): New function that
4098 returns the given argument if it is a block device and returns NULL else.
4099 * util/grub-probe.c (argument_is_device): New variable.
4100 (probe): Promote device_name from a variable to an argument. Receive
4101 device_name from grub_util_check_block_device() if path is NULL and from
4102 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 4103 (options): Introduce new parameter '-d, --device'.
79ca2d78 4104 (main): Add description of the new parameter to the help screen.
4105 Rename path variable to argument. Set argument_is_device if the '-d'
4106 option is given. Pass argument to probe() depending on
4107 argument_is_device.
4108
0d16e571 41092008-02-24 Bean <bean123ch@gmail.com>
4110
4111 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4112 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4113 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4114 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4115 (GRUB_ISO9660_VOLDESC_END): Likewise.
4116 (grub_iso9660_primary_voldesc): New member escape.
4117 (grub_iso9660_data): New member joliet.
4118 (grub_iso9660_convert_string): New function.
4119 (grub_iso9660_mount): Detect joliet extension.
4120 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4121 (grub_iso9660_iso9660_label): Likewise.
4122
4123 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4124 (grub_setup_SOURCES): Add fs/udf.c.
4125 (grub_fstest_SOURCES): Likewise.
4126 (udf_mod_SOURCES): New variable.
4127 (udf_mod_CFLAGS): Likewise.
4128 (udf_mod_LDFLAGS): Likewise.
4129
4130 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4131 (grub_emu_SOURCES): Likewise.
4132
4133 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4134
4135 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4136
4137 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4138
4139 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4140
4141 * fs/udf.c: New file.
4142
8a594a17 41432008-02-24 Robert Millan <rmh@aybabtu.com>
4144
4145 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4146 (normal/lexer.c_DEPENDENCIES): New variables.
4147 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4148 (normal/lexer.c_DEPENDENCIES): Likewise.
4149 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4150 (normal/lexer.c_DEPENDENCIES): Likewise.
4151 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4152 (normal/lexer.c_DEPENDENCIES): Likewise.
4153 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4154 (normal/lexer.c_DEPENDENCIES): Likewise.
4155 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4156 (normal/lexer.c_DEPENDENCIES): Likewise.
4157
2dc33c03 41582008-02-23 Robert Millan <rmh@aybabtu.com>
4159
4160 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4161 since they were intended to be in hex. This didn't break previously
4162 because of a bug in gpt_partition_map_iterate() (see below).
4163
4164 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4165 when checking the validity of GPT header.
4166 Remove `partno', since it always provides the same information as `i'.
4167
f6f4cfb0 41682008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4169
4170 * include/grub/efi/time.h: Fix a wrong comment.
4171
79ff665f 41722008-02-19 Pavel Roskin <proski@gnu.org>
4173
4174 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4175 message.
4176
d38e24c2 41772008-02-19 Bean <bean123ch@gmail.com>
4178
4179 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4180 (aout_mod_SOURCES): New variable.
4181 (aout_mod_CFLAGS): Likewise.
4182 (aout_mod_LDFLAGS): Likewise.
4183 (_bsd_mod_SOURCES): New variable.
4184 (_bsd_mod_CFLAGS): Likewise.
4185 (_bsd_mod_LDFLAGS): Likewise.
4186 (bsd_mod_SOURCES): New variable.
4187 (bsd_mod_CFLAGS): Likewise.
4188 (bsd_mod_LDFLAGS): Likewise.
4189
4190 * include/grub/aout.h: New file.
4191
4192 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4193
4194 * include/grub/i386/bsd.h: New file.
4195
4196 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4197 to make it public.
4198
4199 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4200 function is called, so that it's possible to change it inside the hook.
4201 (grub_elf64_load): Likewise.
4202 (grub_elf_file): Don't close the file if elf header is not found.
4203 (grub_elf_close): Close the file if grub_elf_file fails (The new
4204 grub_elf_file won't close it).
4205 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4206 (grub_elf64_size): Likewise.
4207
4208 * kern/i386/loader.S (grub_unix_real_boot): New function.
4209
4210 * loader/aout.c: New file.
4211
4212 * loader/i386/bsd.c: New file.
4213
4214 * loader/i386/bsd_normal.c: New file.
4215
4216 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4217
4218 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 4219 can test other formats.
d38e24c2 4220
b93bdb0f 42212008-02-19 Robert Millan <rmh@aybabtu.com>
4222
4223 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4224 (grub_gpt_partition_type_empty): Redefine with macro from
4225 `<grub/gpt_partition.h>'.
4226 (gpt_partition_map_iterate): Adjust partition type comparison.
4227
4228 Export `entry' as partmap-specific `part.data' struct.
4229 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4230
4231 * include/grub/gpt_partition.h (grub_gpt_header)
4232 (grub_gpt_partentry): ... to here (new file).
4233
4234 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4235
4236 (grub_gpt_partition_type_bios_boot): New const variable, defined
4237 with macro from `<grub/gpt_partition.h>'.
4238
4239 (setup): Replace `first_start' with `embed_region', which keeps
4240 track of the embed region (and is partmap-agnostic).
4241
4242 Replace find_first_partition_start() with find_usable_region(),
4243 which finds a usable region for embedding using partmap-specific
4244 knowledge (supports PC/MSDOS and GPT).
4245
4246 Fix all assumptions that the embed region start at sector 1, using
4247 `embed_region.start' from now on. Similarly, use `embed_region.end'
4248 rather than `first_start' to calculate available size.
4249
4250 In grub_util_info() message, replace "into after the MBR" with an
4251 indication of the specific sector our embed region starts at.
4252
66cb40f6 42532008-02-19 Robert Millan <rmh@aybabtu.com>
4254
4255 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4256 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4257 `commands/reboot.c'.
4258 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4259 (halt_mod_SOURCES): Likewise.
4260 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4261 (halt_mod_SOURCES): Likewise.
4262
b7202015 42632008-02-17 Christian Franke <franke@computer.org>
4264
4265 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4266
32b0fc49 42672008-02-17 Robert Millan <rmh@aybabtu.com>
4268
4269 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4270 set `first_start' to 0 for non-PC/MSDOS partition maps.
4271
aca63502 42722008-02-16 Robert Millan <rmh@aybabtu.com>
4273
4274 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4275 do not assume partition map is PC/MSDOS before performing checks that
4276 are specific to that layout.
4277
0de8be86 42782008-02-13 Robert Millan <rmh@aybabtu.com>
4279
4280 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4281 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4282 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4283
c3db8364 42842008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4285
4286 * configure.ac: Only a cosmetic change on the handling of
4287 -fno-stack-protector.
4288
f714229e 42892008-02-12 Alexandre Boeglin <alex@boeglin.org>
4290
c3db8364 4291 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4292 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4293 reboot.c.
f714229e 4294 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4295 (halt_mod_SOURCES): New variable.
4296 (halt_mod_CFLAGS): Likewise.
4297 (halt_mod_LDFLAGS): Likewise.
4298 (reboot_mod_SOURCES): Likewise.
4299 (reboot_mod_CFLAGS): Likewise.
4300 (reboot_mod_LDFLAGS): Likewise.
4301
c3db8364 4302 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4303 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4304 reboot.c.
f714229e 4305 (halt_mod_SOURCES): Likewise.
4306 (reboot_mod_SOURCES): Likewise.
4307
c3db8364 4308 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4309 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 4310 (reboot_mod_SOURCES): Likewise.
4311
4312 * commands/i386/pc/reboot.c: merge this file ...
4313
4314 * commands/ieee1275/reboot.c: ... and this file ...
4315
4316 * commands/reboot.c: ... to this file.
c3db8364 4317 Add some precompiler directive to include the correct header for
4318 each machine.
f714229e 4319
4320 * commands/ieee1275/halt.c: move this file ...
4321
4322 * commands/halt.c: ... to here.
c3db8364 4323 Add some precompiler directive to include the correct header for
4324 each machine.
f714229e 4325
4326 * include/grub/efi/efi.h (grub_reboot): New function declaration.
4327 (grub_halt): Likewise.
4328
4329 * kern/efi/efi.c (grub_reboot): New function.
4330 (grub_halt): Likewise.
4331
c74493e0 43322008-02-12 Robert Millan <rmh@aybabtu.com>
4333
4334 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4335 /dev (like it is done for /dev/mapper). This doesn't provide support
4336 for EVMS, but at least it is now easy to identify the problem when it
4337 arises.
4338
d0db4b04 43392008-02-11 Robert Millan <rmh@aybabtu.com>
4340
4341 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4342 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4343 comparing it with -1, not 0.
4344
bf748642 43452008-02-10 Robert Millan <rmh@aybabtu.com>
4346
4347 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4348 `disk/lvm.c'.
4349 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4350 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4351
4352 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4353 `disk/lvm.c' to the end of the list.
4354 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4355 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4356
b5db202a 43572008-02-10 Robert Millan <rmh@aybabtu.com>
4358
4359 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4360 grub_print_error() instead. This will let user know why we're entering
4361 rescue mode.
4362 Based on suggestions from Sam Morris.
4363
83abee31 43642008-02-10 Alexandre Boeglin <alex@boeglin.org>
4365
4366 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4367 on remaining N args, instead of "--" arg N times.
4368
78d5a08b 43692008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4370
4371 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4372 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4373 pattern for unknown glyphs.
4374
68807e5f 43752008-02-09 Robert Millan <rmh@aybabtu.com>
4376
4377 * configure.ac: Probe for `help2man'.
4378 * Makefile.in (builddir): New variable.
4379 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4380 or otherwise add a few flags/options to it.
4381 (install-local): For every executable utility or script that is
4382 installed, invoke $(HELP2MAN) to install a manpage based on --help
4383 output.
4384
4385 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4386 that it doesn't prevent --help from working in build tree.
4387
4388 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4389 with `bug-grub@gnu.org'.
4390 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4391 * util/update-grub.in (usage): New function.
4392 Implement proper argument check, with support for --help and --version
4393 (as well as existing -y).
4394
43952008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 4396
4397 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4398 avoid overwriting previous output.
4399 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4400
c1962162 44012008-02-09 Robert Millan <rmh@aybabtu.com>
4402
4403 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4404 drawing the menu.
4405
3dac2e3f 44062008-02-09 Robert Millan <rmh@aybabtu.com>
4407
4408 * commands/sleep.c: New file.
4409 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4410 (sleep_mod_SOURCES): New variable.
4411 (sleep_mod_CFLAGS): Likewise.
4412 (sleep_mod_LDFLAGS): Likewise.
4413
7a634e08 44142008-02-09 Robert Millan <rmh@aybabtu.com>
4415
4416 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4417 situations in which we can deduce the RAID size and the superblock
4418 doesn't match it.
4419
b92f0c18 44202008-02-09 Robert Millan <rmh@aybabtu.com>
4421
4422 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4423 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4424 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4425
4426 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4427 and return a grub_diskmemberlist_t composed of physical array members.
4428 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4429
4430 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4431 prototype.
4432 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4433 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4434 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4435
4436 * util/grub-probe.c (probe): Move partmap probing code from here ...
4437 (probe_partmap): ... to here.
4438 (probe): Use probe_partmap() once for the disk we're probing, and
4439 additionally, when such disk contains a memberlist() struct member,
4440 once for each disk that is contained in the structure returned by
4441 memberlist().
4442
91a4bf68 44432008-02-09 Robert Millan <rmh@aybabtu.com>
4444
4445 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4446 environment variable to 'all' in order to obtain debug output from
4447 non-util/ code.
4448 * util/i386/pc/grub-setup.c (main): Likewise.
4449
a96f9caa 44502008-02-08 Robert Millan <rmh@aybabtu.com>
4451
4452 * disk/raid.c (grub_raid_scan_device): Check for
4453 `array->device[sb.this_disk.number]' rather than for
4454 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 4455 guaranteed to be accessible.
a96f9caa 4456
b37a9222 44572008-02-08 Robert Millan <rmh@aybabtu.com>
4458
4459 * disk/raid.c: Update copyright.
4460 * fs/cpio.c: Likewise.
4461 * include/grub/raid.h: Likewise.
4462 * loader/i386/pc/multiboot.c: Likewise.
4463 * util/hostfs.c: Likewise.
4464
5626aee1 44652008-02-08 Robert Millan <rmh@aybabtu.com>
4466
4467 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4468 to a grub_disk_t array.
4469 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4470 `device[x]'.
4471 (grub_raid_scan_device): Replace `device[x].name' accesses with
4472 `device[x]->name'. Simplify initialization of `array->device[x]'.
4473
554f0187 44742008-02-08 Robert Millan <rmh@aybabtu.com>
4475
4476 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4477 grub_dprintf() calls.
4478 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4479 error message.
4480
1ec8425d 44812008-02-07 Christian Franke <franke@computer.org>
4482
4483 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4484 instead of fseek and ftell to support large files.
4485 (grub_hostfs_read): Likewise.
4486
f2156fda 44872008-02-07 Robert Millan <rmh@aybabtu.com>
4488
4489 Patch from Jeroen Dekkers.
4490 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 4491 failure, since successfully reading all array members might not be
f2156fda 4492 required.
4493
9216e0e7 44942008-02-06 Robert Millan <rmh@aybabtu.com>
4495
4496 * util/grub-probe.c (probe): Simplify partmap probing (with the
4497 assumption that the first word up to the underscore equals to
4498 the module name).
4499
b0dfd29a 45002008-02-06 Christian Franke <franke@computer.org>
4501
4502 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4503 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4504 last block of a cpio or tar stream.
4505 Check for "TRAILER!!!" instead of any empty data
4506 block to detect last block of a cpio stream.
4507 (grub_cpio_dir): Fix constness of variable np.
4508 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4509 cpio or tar trailer is detected. This fixes a crash
4510 on open of a non existing file.
4511
c32865bf 45122008-02-05 Bean <bean123ch@gmail.com>
4513
4514 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4515 address of entry.
4516 (grub_multiboot_load_elf64): Likewise.
4517 (grub_multiboot): Initialize mbi structure.
4518
4519 * util/grub-fstest.c: Don't include unused header file script.h.
4520
fe6b695a 4521 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 4522 of file.
4523 (grub_fstest_SOURCES): Likewise.
4524
409480b7 45252008-02-05 Robert Millan <rmh@aybabtu.com>
4526
4527 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4528 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4529 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4530 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4531
4532 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4533 (translation_table): Replace hardcoded values with macros
4534 provided by `<grub/term.h>'.
4535
4536 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4537 (keyboard_map): Correct/add a few values, with macros provided
4538 by `<grub/term.h>'.
4539 (keyboard_map_shift): Zero values that don't differ from their
4540 `keyboard_map' equivalents.
4541 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4542 Discard the second scan code that is always sent by Caps lock.
4543 Only use `keyboard_map_shift' when it provides a non-zero value,
4544 otherwise fallback to `keyboard_map'.
4545
99fadbaa 45462008-02-04 Bean <bean123ch@gmail.com>
4547
4548 * Makefile.in (enable_grub_fstest): New variable.
4549
4550 * conf/common.rmk (grub_fstest_init.lst): New rule.
4551 (grub_fstest_init.h): Likewise.
4552 (grub_fstest_init.c): Likewise.
4553 (util/grub-fstest.c_DEPENDENCIES): New variable.
4554 (grub_fstest_SOURCES): Likewise.
4555
4556 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4557
4558 * util/grub-fstest.c: New file.
4559
bf567c50 45602008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4561
4562 Make grub-setup handle a separate root device.
f19dbdb7 4563
bf567c50 4564 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4565 so that the root device can be compared with the destination
4566 device.
4567 When embedding the core image, if the root and destination devices
4568 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4569 0xFF.
4570 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 4571
9be6b98b 45722008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4573
4574 Add support for having a grub directory in a different drive. This
4575 is still only the data handling part.
f19dbdb7 4576
9be6b98b 4577 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4578 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4579 (grub_root_drive): New variable.
4580
4581 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4582 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4583 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4584 as it was.
4585
4586 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4587
4588 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4589 macro.
4590 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4591
4592 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4593 is bogus, because PXE booting does not specify any drive
4594 correctly.
4595
4596 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4597 am not sure if this is really correct.
4598
4599 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4600 is always identical to the boot drive when booting from a CD.
4601
4602 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4603 longer.
4604 (root_drive): New variable.
4605 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4606 (setup_sectors): Push %dx right after popping it, because %dh will
4607 be modified later.
4608 (copy_buffer): Restore %dx.
4609
e0ca0677 46102008-02-03 Robert Millan <rmh@aybabtu.com>
4611
4612 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4613 use `cdboot.img' for cdrom images.
4614
3b3f6629 46152008-02-03 Robert Millan <rmh@aybabtu.com>
4616
4617 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4618 only setup gfxterm when `font' command has succeeded.
4619
d42b3672 46202008-02-03 Robert Millan <rmh@aybabtu.com>
4621
4622 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4623 (grub_rescue_cmd_multiboot_loader)
4624 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4625
fa370ea6 46262008-02-03 Pavel Roskin <proski@gnu.org>
4627
e0c5dacb 4628 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 4629 %edx and %esi from stack only after grub_gate_a20() is called.
4630 grub_gate_a20() clobbers %edx.
4631
f2a76e1d 46322008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4633
4634 * configure.ac (AC_INIT): Bumped to 1.96.
4635
4636 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4637 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4638 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4639 video/readers/png.c.
4640
90fd32d1 46412008-02-03 Bean <bean123ch@gmail.com>
9be665dd 4642
4643 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4644 (cdboot_img_SOURCES): New variable.
4645 (cdboot_img_ASFLAGS): New variable.
4646 (cdboot_img_LDFLAGS): New variable.
4647
4648 * boot/i386/pc/cdboot.S: New file.
4649
4650 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4651 (cd_count): Likewise.
4652 (grub_biosdisk_get_drive): Add support for cd device.
4653 (grub_biosdisk_call_hook): Likewise.
4654 (grub_biosdisk_iterate): Likewise.
4655 (grub_biosdisk_open): Likewise.
4656 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4657 (grub_biosdisk_rw): Support reading from cd device.
4658 (GRUB_MOD_INIT): Iterate cd devices.
4659
4660 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4661 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4662 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4663
4664 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4665
4020aa53 46662008-02-02 Robert Millan <rmh@aybabtu.com>
4667
4668 * commands/read.c: New file.
4669 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4670 (read_mod_SOURCES): New variable.
4671 (read_mod_CFLAGS): Likewise.
4672 (read_mod_LDFLAGS): Likewise.
4673
e03a1132 46742008-02-02 Robert Millan <rmh@aybabtu.com>
4675
4676 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4677 determining whether menu has to be displayed.
4678
58c69220 46792008-02-02 Marco Gerards <marco@gnu.org>
4680
4681 * bus/pci.c: New file.
4682
4683 * include/grub/pci.h: Likewise.
4684
4685 * include/grub/i386/pc/pci.h: Likewise.
4686
4687 * commands/lspci.c: Likewise.
4688
4689 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4690 `lspci.mod'.
4691 (pci_mod_SOURCES): New variable.
4692 (pci_mod_CFLAGS): Likewise.
4693 (pci_mod_LDFLAGS): Likewise.
4694 (lspci_mod_SOURCES): Likewise.
4695 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 4696 (lspci_mod_LDFLAGS): Likewise.
58c69220 4697
c004e1b4 46982008-02-02 Bean <bean123ch@gmail.com>
4699
4700 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4701 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4702
4703 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4704 (grub_xfs_btree_node): New structure.
4705 (grub_xfs_btree_root): New structure.
4706 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4707 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4708 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4709 (GRUB_XFS_EXTENT_SIZE): Likewise.
4710 (grub_xfs_read_block): Support btree format type.
4711 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4712 Use directory block as basic unit.
4713
4714 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4715
4716 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4717 __attribute__ ((__regparm__ (1))).
4718
f95562bf 47192008-02-01 Robert Millan <rmh@aybabtu.com>
4720
4721 Correct a mistake in previous commit.
4722
4723 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4724 top.
4725 (normal/command.c_DEPENDENCIES): New variable.
4726
7d31f41f 47272008-02-01 Robert Millan <rmh@aybabtu.com>
4728
4729 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4730 top.
4731 (normal/command.c_DEPENDENCIES): New variable.
4732 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4733 * conf/i386-ieee1275.rmk: Likewise.
4734 * conf/i386-linuxbios.rmk: Likewise.
4735 * conf/i386-pc.rmk: Likewise.
4736 * conf/sparc64-ieee1275.rmk: Likewise.
4737 * conf/powerpc-ieee1275.rmk: Likewise.
4738 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4739
4740 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4741
60b6be74 47422008-02-01 Robert Millan <rmh@aybabtu.com>
4743
4744 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4745 call at beginning of function.
4746
078522ab 47472008-01-31 Pavel Roskin <proski@gnu.org>
4748
4749 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 4750 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4751 (grub_mkrescue_SOURCES): Likewise.
078522ab 4752 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4753
ccaa8a5f 47542008-01-30 Robert Millan <rmh@aybabtu.com>
4755
4756 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4757 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4758 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4759 (grub_probe_SOURCES): ... to here.
4760
4761 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4762 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4763 * conf/i386-ieee1275.rmk: Likewise.
4764 * conf/i386-linuxbios.rmk: Likewise.
4765 * conf/powerpc-ieee1275.rmk: Likewise.
4766
ae5a9cd7 47672008-01-30 Tristan Gingold <gingold@free.fr>
4768
4769 * kern/rescue.c: Silently accept empty lines.
4770
70bc2ef2 47712008-01-29 Bean <bean123ch@gmail.com>
4772
4773 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4774 (real_code_2): Code cleanup and change comment style.
4775 (move_memory): Avoid using 32-bit address mode.
4776
6a4d50ea 47772008-01-29 Bean <bean123ch@gmail.com>
4778
4779 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4780 (png_mod_SOURCES): New variable.
4781 (png_mod_CFLAGS): Likewise.
4782 (png_mod_LDFLAGS): Likewise.
4783
4784 * video/readers/png.c: New file.
4785
11cc30ac 47862008-01-28 Robert Millan <rmh@aybabtu.com>
4787
4788 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4789 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4790 `ifndef GRUB_MOD_GAP' hack.
4791 * util/elf/grub-mkimage.c (add_segments): Likewise.
4792
3abc589f 47932008-01-27 Robert Millan <rmh@aybabtu.com>
4794
4795 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4796 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 4797 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 4798
e1907778 47992008-01-27 Robert Millan <rmh@aybabtu.com>
4800
4801 Get grub-emu to build again (including parallel builds).
4802
4803 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4804 Split into ...
4805 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4806 (normal/execute.c_DEPENDENCIES): ... this, ...
4807 (grub-emu_DEPENDENCIES): ... and this.
4808
4809 * conf/i386-efi.rmk: Likewise.
4810 * conf/i386-linuxbios.rmk: Likewise.
4811 * conf/i386-ieee1275.rmk: Likewise.
4812 * conf/powerpc-ieee1275.rmk: Likewise.
4813 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4814
2216b101 48152008-01-27 Robert Millan <rmh@aybabtu.com>
4816
4817 * NEWS: Add a few items.
4818
f75172d9 48192008-01-27 Robert Millan <rmh@aybabtu.com>
4820
4821 Fix parallel builds with grub-emu. Based on earlier commit for
4822 grub-probe and grub-setup.
4823
4824 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4825 (util/grub-emu.c_DEPENDENCIES): ... this.
4826 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4827 (util/grub-emu.c_DEPENDENCIES): ... this.
4828 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4829 (util/grub-emu.c_DEPENDENCIES): ... this.
4830 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4831 (util/grub-emu.c_DEPENDENCIES): ... this.
4832 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4833 (util/grub-emu.c_DEPENDENCIES): ... this.
4834
3f51de77 48352008-01-27 Pavel Roskin <proski@gnu.org>
4836
4837 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4838 to create a gap between _end and the modules added to the image
4839 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4840 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4841 * util/elf/grub-mkimage.c (add_segments): Likewise.
4842
2033f53e 48432008-01-26 Pavel Roskin <proski@gnu.org>
4844
4845 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4846 just return an error.
4847
22da1f6f 48482008-01-26 Bean <bean123ch@gmail.com>
4849
4850 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4851 (grub_reiserfs_get_item): Save offset of the next item.
4852 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4853
2a9525e6 48542008-01-25 Robert Millan <rmh@aybabtu.com>
4855
4856 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4857 make all filesystem sources appear together (possibly fixing omissions
4858 while at it).
4859 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4860 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4861 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4862 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4863
4864 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4865 add `kern/file.c'.
4866 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4867 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4868 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4869 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4870
4871 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4872 (probe): Add a sanity check to make sure of our ability to read
4873 requested files when probing for filesystem type.
4874
4875 * genmk.rb: Update copyright year (2007).
4876
4877 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4878 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4879 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4880 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4881 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4882 : Remove function prototypes.
4883
b95f71b5 48842008-01-25 Robert Millan <rmh@aybabtu.com>
4885
4886 Revert my previous commits (based on wrong assumption of how grub_errno
4887 works).
4888
fe6b695a 4889 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 4890 * kern/file.c (grub_file_open): Likewise.
4891
d08bbb49 48922008-01-24 Pavel Roskin <proski@gnu.org>
4893
4894 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4895 that hang if GRUB tries to setup colors.
4896 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4897 colors for firmwares that don't support it.
4898 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4899 Recognize Open Hack'Ware, set flags to work around its
4900 limitations.
4901
605e36ed 49022008-01-24 Robert Millan <rmh@aybabtu.com>
4903
4904 * kern/file.c (grub_file_open): Do not account previous failures of
4905 unrelated functions when grub_errno is checked for.
4906 Reported by Oleg Strikov.
4907
bac332a1 49082008-01-24 Bean <bean123ch@gmail.com>
4909
4910 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4911 (grub_ufs_sblock): New member volume name.
4912 (grub_ufs_find_file): Fix string copy bug.
4913 (grub_ufs_label): Implement this function properly.
4914
4915 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4916 (grub_hfs_iterate_records): Use the correct file number for extents
4917 and catalog file. Fix problem in next index calculation.
4918 (grub_hfs_find_node): Replace recursive function call with loop.
4919 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4920
15c80c09 49212008-01-23 Robert Millan <rmh@aybabtu.com>
4922
4923 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4924 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4925 (grub_multiboot2_real_boot): New function prototype.
4926
4927 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4928 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4929
4930 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4931 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4932
305338fd 49332008-01-23 Robert Millan <rmh@aybabtu.com>
4934
4935 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4936 #ifdef'ed out grub_printf().
4937
3ea52685 49382008-01-23 Robert Millan <rmh@aybabtu.com>
4939
4940 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4941 grub_dprintf calls, since they make "debug=all" mode unusable.
4942 (grub_console_checkkey): Likewise.
4943
5882ae4b 49442008-01-23 Robert Millan <rmh@aybabtu.com>
4945
4946 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4947 `term/i386/pc/at_keyboard.c'.
4948 (pkglib_MODULES): Add `serial.mod'.
4949 (serial_mod_SOURCES): New variable.
4950 (serial_mod_CFLAGS): Likewise.
4951 (serial_mod_LDFLAGS): Likewise.
4952
4953 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4954 `<grub/powerpc/ieee1275/console.h>'.
4955 (grub_keyboard_controller_init): New function prototype.
4956 (grub_console_checkkey): Likewise.
4957 (grub_console_getkey): Likewise.
4958
4959 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4960 keyboard on i386.
4961
4962 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4963 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4964
06ab5303 49652008-01-23 Robert Millan <rmh@aybabtu.com>
4966
4967 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4968 present, "(memdisk)/boot/grub" becomes the default prefix.
4969
4970 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4971 a memdisk tarball with all the modules. Add --overlay=DIR option that
4972 allows users to overlay additional files into the image.
4973
dbb475a4 49742008-01-23 Robert Millan <rmh@aybabtu.com>
4975
4976 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4977 and `machine/memory.h'.
4978 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4979 (_multiboot_mod_SOURCES): New variable.
4980 (_multiboot_mod_CFLAGS): Likewise.
4981 (_multiboot_mod_LDFLAGS): Likewise.
4982 (multiboot_mod_SOURCES): Likewise.
4983 (multiboot_mod_CFLAGS): Likewise.
4984 (multiboot_mod_LDFLAGS): Likewise.
4985
4986 * include/grub/i386/ieee1275/loader.h: New file.
4987
4988 * include/grub/i386/ieee1275/machine.h: Likewise.
4989
4990 * include/grub/i386/ieee1275/memory.h: Likewise.
4991
4992 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4993 variable declaration.
4994 (grub_os_area_size): Likewise.
4995
4996 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4997 (grub_lower_mem, grub_upper_mem): New variables.
4998 (grub_stop_floppy): New function (just to make
4999 grub_multiboot2_real_boot() happy).
5000
5001 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5002 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5003 (grub_stop): New function.
5004 Include `"../realmode.S"' and `"../loader.S"'.
5005
5006 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5007 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5008
5009 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5010 rely on grub_multiboot2_real_boot() for final boot.
5011
25638629 50122008-01-22 Robert Millan <rmh@aybabtu.com>
5013
5014 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5015 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5016 device that doesn't look like an SD card.
5017 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5018 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5019 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5020 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5021 found.
5022
9dad816d 50232008-01-22 Robert Millan <rmh@aybabtu.com>
5024
5025 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5026 avoid claiming over our own code.
5027
34842f2d 50282008-01-22 Bean <bean123ch@gmail.com>
5029
5030 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5031 (jpeg_mod_SOURCES): New variable.
5032 (jpeg_mod_CFLAGS): Likewise.
5033 (jpeg_mod_LDFLAGS): Likewise.
5034
5035 * video/readers/jpeg.c : New file.
5036
44023a28 50372008-01-22 Bean <bean123ch@gmail.com>
5038
5039 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5040 there are no more items.
5041
bc2d8ac6 50422008-01-21 Robert Millan <rmh@aybabtu.com>
5043
5044 * kern/mm.c (grub_mm_init_region): Improve debug message.
5045
261bd4bc 50462008-01-21 Robert Millan <rmh@aybabtu.com>
5047
5048 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5049 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5050 address.
5051 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5052 a C macro.
5053 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5054 Indicates start of upper memory.
5055 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5056 (generate_image): Abort when image size is big enough to corrupt
5057 upper memory.
5058
5059 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5060 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5061 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5062 instead of hardcoding 0xA0000.
5063 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5064 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5065 instead of hardcoding 0xA0000.
5066
f970b55e 50672008-01-21 Robert Millan <rmh@aybabtu.com>
5068
5069 * disk/memdisk.c (memdisk_size): New variable.
5070 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5071 `memdisk_size'.
5072 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5073 image to dynamic memory.
5074 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5075 `memdisk_size'. Free memdisk block.
5076
1a8b0526 50772008-01-21 Robert Millan <rmh@aybabtu.com>
5078
5079 Fix detection of very small filesystems (like tar).
5080
5081 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5082 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5083 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5084 a problem with this disk).
5085
6e9b4aab 50862008-01-21 Robert Millan <rmh@aybabtu.com>
5087
5088 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5089 on grub_biosdisk_rw_standard() error.
5090
0d8837b2 50912008-01-21 Robert Millan <rmh@aybabtu.com>
5092
5093 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5094 recent changes.
5095 * kern/elf.c: Likewise.
5096 * kern/ieee1275/ieee1275.c: Likewise.
5097 * kern/powerpc/ieee1275/openfw.c: Likewise.
5098 * term/ieee1275/ofconsole.c: Likewise.
5099
ffd36e34 51002008-01-21 Robert Millan <rmh@aybabtu.com>
5101
5102 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5103
3f0093d0 5104 * include/grub/kernel.h (grub_arch_memdisk_addr)
5105 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 5106
3f0093d0 5107 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5108 (grub_arch_memdisk_size): ... to here.
ffd36e34 5109
6c391b21 51102008-01-21 Robert Millan <rmh@aybabtu.com>
5111
5112 Mostly based on bugfix from Bean.
5113
5114 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5115 attribute with hook() parameter.
5116 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5117 declaration.
5118 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5119 attribute with hook() parameter.
5120 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5121 declaration.
5122
55a581dc 51232008-01-21 Robert Millan <rmh@aybabtu.com>
5124
5125 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5126 (pkglib_MODULES): Add `memdisk.mod'.
5127 (memdisk_mod_SOURCES): New variable.
5128 (memdisk_mod_CFLAGS): Likewise.
5129 (memdisk_mod_LDFLAGS): Likewise.
5130
5131 * disk/memdisk.c: New file.
5132
5133 * include/grub/disk.h (grub_disk_dev_id): Add
5134 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5135
5136 * include/grub/i386/pc/kernel.h
5137 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5138 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5139 (grub_kernel_image_size): New variable declaration.
5140 (grub_total_module_size): Likewise.
5141 (grub_memdisk_image_size): Likewise.
5142
5143 * include/grub/i386/pc/memory.h
5144 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5145
5146 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5147 (grub_arch_memdisk_addr): New variable declaration.
5148 (grub_arch_memdisk_size): Likewise.
5149
5150 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5151 (grub_arch_memdisk_size): Likewise.
5152
5153 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5154 (codestart): Replace hardcoded `0x100000' with
5155 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5156
5157 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5158 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5159 not NULL, append the contents of the file it refers to, at the end of
5160 the compressed kernel image. Initialize `grub_memdisk_image_size'
5161 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5162 (options): Add "memdisk"|'m' option.
5163 (main): Parse --memdisk|-m option, and pass user-provided path as
5164 parameter to generate_image().
5165
3d7f54c9 51662008-01-20 Robert Millan <rmh@aybabtu.com>
5167
5168 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5169 grub_dprintf() calls from here ...
5170 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5171
0bf74728 51722008-01-20 Robert Millan <rmh@aybabtu.com>
5173
5174 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5175
5176 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5177 declaration.
5178 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5179 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5180 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 5181 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 5182 property).
5183 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5184 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5185
33bf70a7 51862008-01-19 Robert Millan <rmh@aybabtu.com>
5187
fe6b695a 5188 Get rid of confusing function (superseded by
33bf70a7 5189 `grub_ieee1275_get_integer_property')
5190 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5191 prototype.
5192 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5193 function.
5194 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5195 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 5196 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 5197
e2da7d26 51982008-01-19 Robert Millan <rmh@aybabtu.com>
5199
5200 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5201 command after "shut-down", since implementations differ on which
5202 the command for halt is.
5203
59f1fd8d 52042008-01-19 Robert Millan <rmh@aybabtu.com>
5205
5206 * include/grub/i386/linuxbios/console.h: Add header protection.
5207 (grub_keyboard_controller_init): New function prototype.
5208 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5209 (KEYBOARD_COMMAND_READ): Likewise.
5210 (KEYBOARD_COMMAND_WRITE): Likewise.
5211 (KEYBOARD_SCANCODE_SET1): Likewise.
5212 (grub_keyboard_controller_write): New function.
5213 (grub_keyboard_controller_read): Likewise.
5214 (grub_keyboard_controller_init): Likewise.
5215
5216 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5217 (grub_console_init): On coreboot/LinuxBIOS, call
5218 grub_keyboard_controller_init().
5219
5f5a7c15 52202008-01-19 Robert Millan <rmh@aybabtu.com>
5221
5222 PowerPC changes provided by Pavel Roskin.
5223
5224 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5225 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5226 don't rely on cmain() doing it.
5227 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5228 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5229
1210e168 52302008-01-16 Robert Millan <rmh@aybabtu.com>
5231
5232 * include/grub/i386/linuxbios/memory.h
5233 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5234 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5235 receive `table_header' as argument. Instead, probe for it in the
5236 known memory ranges where it can be present.
5237 (grub_available_iterate): Do not pass a fixed `table_header' address
5238 to grub_linuxbios_table_iterate().
5239
3d04eab8 52402008-01-15 Robert Millan <rmh@aybabtu.com>
5241
5242 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5243 * conf/i386-ieee1275.rmk: New file.
5244 * include/grub/i386/ieee1275/console.h: Likewise.
5245 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5246 * include/grub/i386/ieee1275/kernel.h: Likewise.
5247 * include/grub/i386/ieee1275/time.h: Likewise.
5248 * kern/i386/ieee1275/init.c: Likewise.
5249 * kern/i386/ieee1275/startup.S: Likewise.
5250
d1bc1b73 52512008-01-15 Robert Millan <rmh@aybabtu.com>
5252
5253 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5254 when pointers are 32-bit (but still do set it to one when they are
5255 64-bit).
5256
66a65807 52572008-01-15 Robert Millan <rmh@aybabtu.com>
5258
5259 * include/grub/ieee1275/ieee1275.h
5260 (grub_ieee1275_get_integer_property): New function prototype.
5261
5262 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5263 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 5264 grub_ieee1275_get_property() to handle endianness.
66a65807 5265
5266 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5267 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 5268 where appropriate.
66a65807 5269 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5270 (grub_map): Likewise.
5271 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5272
a83ccafd 52732008-01-15 Bean <bean123ch@gmail.com>
5274
5275 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5276 (grub_script_execute_cmdline): Reset grub_errno.
5277
5278 * normal/main.c (read_config_file): Reset grub_errno.
5279
5280 * normal/parse.y (script_init): New.
5281 (script): Move function and menuentry here.
5282 (delimiter): New.
5283 (command): Add delimiter at the end of command.
5284 (commands): Adjust to match the new command.
5285 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 5286 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 5287 (if): Use the new commands.
5288
5289 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5290
df6ecfc6 52912008-01-15 Robert Millan <rmh@aybabtu.com>
5292
5293 * normal/menu.c (run_menu): Move timeout message from here ...
5294 (print_timeout): ... to here.
5295 (run_menu): Use print_timeout() once during initial draw to print
5296 the whole message, and again in every clock tick to update only
5297 the number of seconds.
5298
87ae25eb 52992008-01-15 Robert Millan <rmh@aybabtu.com>
5300
5301 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5302 actual size of `available' from grub_ieee1275_get_property(), and
5303 restrict parsing to that bound.
5304
47bf09a4 53052008-01-15 Christian Franke <franke@computer.org>
5306
5307 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5308 (argp_program_version): Remove variable.
5309 (argp_program_bug_address): Likewise.
5310 (options): Convert from struct argp_option to struct option.
5311 (struct arguments): Remove.
5312 (parse_opt): Remove.
5313 (usage): New function.
5314 (main): Replace struct args members by simple variables.
5315 Replace argp_parse() by getopt_long().
5316 Add switch to evaluate options.
5317 Add missing "(...)" around root_dev in prefix string.
5318
c86f1469 53192008-01-14 Robert Millan <rmh@aybabtu.com>
5320
5321 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
5322 for grub_ieee1275_exit(), in order to improve portability.
5323
e622c559 53242008-01-14 Robert Millan <rmh@aybabtu.com>
5325
5326 * util/grub.d/10_linux.in (prefix): Define.
5327 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
5328
44cb1ec8 53292008-01-13 Pavel Roskin <proski@gnu.org>
5330
5331 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5332 grub_errno if no errors have been detected.
5333
1eb8c802 53342008-01-12 Robert Millan <rmh@aybabtu.com>
5335
5336 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5337 (grub_util_get_dev_abstraction): New function prototype.
5338
5339 * util/getroot.c: Include `<grub/util/getroot.h>'
5340 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5341 (grub_util_get_dev_abstraction): ... here (new function).
5342
5343 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5344 `PRINT_ABSTRACTION'.
5345 (probe): Probe for abstraction type when requested.
5346 (main): Understand `--target=abstraction'.
5347
5348 * util/i386/efi/grub-install.in: Add abstraction module to core
5349 image when it is found to be necessary.
5350 * util/i386/pc/grub-install.in: Likewise.
5351 * util/powerpc/ieee1275/grub-install.in: Likewise.
5352
5353 * util/update-grub_lib.in (font_path): Return system path without
5354 converting to GRUB path.
5355 * util/update-grub.in: Convert system path returned by font_path()
5356 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5357 abstraction module is needed for loading fonts (if any). Export
5358 that as `GRUB_PRELOAD_MODULES'.
5359 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5360 insmod commands).
5361
52bd3de9 53622008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5363
5364 Remove some unused code from reiserfs.
f19dbdb7 5365
52bd3de9 5366 * fs/reiserfs.c (struct grub_reiserfs_key)
5367 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5368 (struct grub_reiserfs_node_body): Removed.
5369 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5370 Likewise.
5371 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5372 Likewise.
5373 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5374 Likewise.
5375 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5376 Likewise.
5377 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5378 Likewise.
5379 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5380 Likewise.
5381 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5382 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5383 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5384
2f80039d 53852008-01-10 Robert Millan <rmh@aybabtu.com>
5386
5387 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5388 Determines if a file is garbage left by packaging systems, etc.
5389 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5390 for processing /etc/grub.d scripts.
5391 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5392 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5393 as a condition for processing Linux images.
5394
87888032 53952008-01-10 Pavel Roskin <proski@gnu.org>
5396
5397 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5398 to compile reiserfs.c on PowerPC.
5399
7e54fced 54002008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 5401
5402 * kern/device.c (grub_device_iterate): Do not abort device iteration
5403 when one of the devices cannot be opened.
5404 * kern/disk.c (grub_disk_open): Do not account previous failures of
5405 unrelated functions when grub_errno is checked for.
5406
5aa541e6 54072008-01-08 Robert Millan <rmh@aybabtu.com>
5408
5409 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5410 `! grub_linux_is_bzimage', change order of address comparison to make
5411 it more intuitive, and improve "too big zImage" error message.
5412
7076340d 54132008-01-08 Robert Millan <rmh@aybabtu.com>
5414
5415 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5416 `$(update-grub_DATA)'.
5417 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5418 targets.
5419
9ca70333 54202008-01-07 Robert Millan <rmh@aybabtu.com>
5421
5422 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5423 which instruction is modified by grub-setup during installation
5424 (since it wasn't obvious by only looking at this file).
5425
38ccf575 54262008-01-07 Robert Millan <rmh@aybabtu.com>
5427
5428 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5429 listing actual TODO items.
5430
f5db4291 54312008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5432
868967cf 5433 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5434 correctly.
5435 (grub_reiserfs_get_key_offset): Likewise.
5436 (grub_reiserfs_set_key_offset): Likewise.
5437 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 5438 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 5439
5440 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5441 better to remove the bitfield version completely.
f19dbdb7 5442
868967cf 54432008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 5444
f5db4291 5445 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5446 allocated from the heap, due to the fshelp implementation.
5447 (grub_reiserfs_dir): Free NODE, due to the same reason.
5448
492e6d9d 54492008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5450
5451 Mostly from Vincent Pelletier:
f19dbdb7 5452
492e6d9d 5453 * fs/reiserfs.c: New file.
f19dbdb7 5454
492e6d9d 5455 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5456 (reiserfs_mod_SOURCES): New variable.
5457 (reiserfs_mod_CFLAGS): Likewise.
5458 (reiserfs_mod_LDFLAGS): Likewise.
5459
5460 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5461 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5462 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5463 normal/color.c.
5464
9ce3e7c1 54652008-01-06 Robert Millan <rmh@aybabtu.com>
5466
5467 * normal/color.c: Remove `<grub/env.h>'.
5468
f3b58148 54692008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5470
5471 * include/grub/normal.h: Include <grub/env.h>.
5472
7ac3bcfa 54732008-01-05 Robert Millan <rmh@aybabtu.com>
5474
5475 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5476 usage example with `(hd0,1)'.
fb358190 5477 Reported by Samuel Thibault.
7ac3bcfa 5478
c8ee99d7 54792008-01-05 Robert Millan <rmh@aybabtu.com>
5480
5481 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5482 (grub_linux_boot_zimage): Rename to ...
5483 (grub_linux_boot): ... this.
5484 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5485 (grub_linux_boot_zimage): Conditionalize zImage copy.
5486
5487 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5488 (grub_linux_boot_bzimage): Remove prototype.
5489 (grub_linux_boot_zimage): Rename to ...
5490 (grub_linux_boot): ... this.
5491
5492 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5493 (grub_linux_boot): Remove function.
5494
0ece25b1 54952008-01-05 Robert Millan <rmh@aybabtu.com>
5496
5497 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5498 (grub_env_write_color_highlight): Likewise.
5499 (grub_wait_after_message): Likewise.
5500
5501 * normal/color.c: New file.
5502
5503 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5504 (normal_mod_DEPENDENCIES): Likewise.
5505
5506 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5507 (normal_mod_DEPENDENCIES): Likewise.
5508
5509 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5510 (normal_mod_DEPENDENCIES): Likewise.
5511
5512 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5513 (normal_mod_DEPENDENCIES): Likewise.
5514
5515 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5516 for waiting after a message is printed.
5517 * normal/main.c (read_config_file): Likewise.
5518 (grub_normal_init): Register grub_env_write_color_normal() and
5519 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5520 `color_highlight' variables as global.
5521
5522 * normal/menu.c (grub_wait_after_message): New function.
5523 (grub_color_menu_normal): New variable. Replaces ...
5524 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5525 (grub_color_menu_highlight): New variable. Replaces ...
5526 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5527 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5528 `GRUB_TERM_COLOR_STANDARD'.
5529 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5530 `normal_code' and `highlight_code' to `old_color_normal' and
5531 `old_color_highlight', respectively.
5532 (grub_menu_init_page): Update colors when drawing the menu, based on
5533 `menu_color_normal' and `menu_color_highlight' variables.
5534 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5535 a message is printed.
5536
182dd4e5 55372008-01-05 Robert Millan <rmh@aybabtu.com>
5538
5539 * kern/env.c (grub_env_context_open): Propagate hooks for global
5540 variables to new context.
5541
5542 * kern/main.c (grub_set_root_dev): Export `root' variable.
5543
ddf8f6ad 55442008-01-05 Robert Millan <rmh@aybabtu.com>
5545
5546 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 5547 discs unconditionally, since udev and others have options to provide
ddf8f6ad 5548 them.
5549
d8b43d9b 55502008-01-05 Robert Millan <rmh@aybabtu.com>
5551
5552 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5553
2bff2de3 55542008-01-04 Christian Franke <franke@computer.org>
5555
5556 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5557 of eisa_mmap.
5558
97eab917 55592008-01-03 Pavel Roskin <proski@gnu.org>
5560
5561 * kern/i386/linuxbios/init.c: Put "void" to all function
5562 declarations with no arguments.
5563 * kern/powerpc/ieee1275/init.c: Likewise.
5564 * term/i386/pc/at_keyboard.c: Likewise.
5565 * term/i386/pc/vga_text.c: Likewise.
5566 * util/grub-mkdevicemap.c: Likewise.
5567
b9416d00 55682008-01-02 Robert Millan <rmh@aybabtu.com>
5569
5570 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5571 message when loaded image is out of bounds.
5572 (grub_multiboot_load_elf64): Likewise.
5573
92695df9 55742008-01-02 Pavel Roskin <proski@gnu.org>
5575
5576 * util/grub.d/10_linux.in: Try version without ".old" when
5577 looking for initrd. It's better to use initrd from the newer
5578 kernel of the same version than no initrd at all.
5579
d98d9cad 55802008-01-01 Robert Millan <rmh@aybabtu.com>
5581
5582 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5583
dbfdce36 55842008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5585
f19dbdb7 5586 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 5587 grub_video_get_active_render_target.
5588 (grub_video_adapter): Added unmap_color and get_active_render_target.
5589
f19dbdb7 5590 * video/video.c: Added grub_video_unmap_color and
dbfdce36 5591 grub_video_get_active_render_target.
5592 (grub_video_get_info): Changed method to accept NULL pointer as an
5593 argument to allow detection of active video adapter.
5594
5595 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5596 grub_video_vbe_unmap_color_int.
5597 Added grub_video_vbe_unmap_color and
5598 grub_video_vbe_get_active_render_target.
5599 (grub_video_vbe_adapter): Added unmap_color and
5600 get_active_render_target.
5601
f19dbdb7 5602 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 5603 with grub_video_vbe_unmap_color_int.
5604
5605 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5606 (DEFAULT_NORMAL_COLOR): Likewise.
5607 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5608 (DEFAULT_FG_COLOR): Removed.
5609 (DEFAULT_BG_COLOR): Likewise.
5610 (DEFAULT_CURSOR_COLOR): Changed value.
5611 (grub_virtual_screen): Added standard_color_setting,
5612 normal_color_setting, highlight_color_setting and term_color.
5613 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5614 (bitmap_width): Added.
5615 (bitmap_height): Likewise.
5616 (bitmap): Likewise.
5617 (set_term_color): Likewise.
5618 (grub_virtual_screen_setup): Changed to use new terminal coloring
5619 settings.
5620 (grub_gfxterm_init): Added init for bitmap.
5621 (grub_gfxterm_fini): Added destroy for bitmap.
5622 (redraw_screen_rect): Updated to use background bitmap and new
5623 terminal coloring.
5624 (scroll_up): Added optimization for case when there is no bitmap.
5625 (grub_gfxterm_cls): Fixed to use correct background color.
5626 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5627 coloring.
5628 (grub_virtual_screen_setcolor): Likewise.
5629 (grub_virtual_screen_getcolor): Added.
5630 (grub_gfxterm_background_image_cmd): Likewise.
5631 (grub_video_term): Added setcolor and getcolor.
5632 (MOD_INIT): Added registration of background_image command.
5633 (MOD_TERM): Added unregistration for background_image command.
5634
c3c20931 56352007-12-30 Pavel Roskin <proski@gnu.org>
5636
5637 * loader/multiboot_loader.c: Fix multiboot command
5638 unregistration. Fix all typos in the word "multiboot".
5639
df266716 56402007-12-29 Pavel Roskin <proski@gnu.org>
94239199 5641
5642 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5643 support for initrd names used in Fedora.
5644
fc6e896c 56452007-12-26 Bean <bean123ch@gmail.com>
5646
5647 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5648 (cpio_mod_SOURCES): New variable.
5649 (cpio_mod_CFLAGS): Likewise.
5650 (cpio_mod_LDFLAGS): Likewise.
5651
5652 * fs/cpio.c: New file.
5653
5654 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5655
5656 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5657
5658 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5659
5660 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5661
533110ad 56622007-12-25 Robert Millan <rmh@aybabtu.com>
5663
5664 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5665 (grub_getcolor): New function.
5666
5667 * kern/term.c (grub_getcolor): New function.
5668 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5669 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5670 (print_entry): Set normal and highlight colors to
5671 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5672 respectively, before printing and restore them to old
5673 values afterwards.
5674 (grub_menu_init_page): Likewise. Fill an additional colored space
5675 that would otherwise be left blank.
5676
5677 * term/efi/console.c (grub_console_getcolor): New function.
5678 (struct grub_console_term.getcolor): New variable.
5679 * term/i386/pc/console.c (grub_console_getcolor): New function.
5680 (struct grub_console_term.getcolor): New variable.
5681 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5682 (struct grub_console_term.getcolor): New variable.
5683
5684 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5685 (struct grub_console_term.setcolor): Remove variable.
5686 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5687 (struct grub_console_term.setcolor): Remove variable.
5688 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5689 (struct grub_console_term.setcolor): Remove variable.
5690 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5691 (struct grub_console_term.setcolor): Remove variable.
5692
4931827f 56932007-12-25 Robert Millan <rmh@aybabtu.com>
5694
5695 * configure.ac: Search for possible unifont.hex locations, and
5696 define UNIFONT_HEX if found.
5697
5698 * Makefile.in (UNIFONT_HEX): Define variable.
5699 (DATA): Rename to ...
5700 (PKGLIB): ... this. Update all users.
5701 (PKGDATA): New variable.
5702 (pkgdata_IMAGES): Rename to ...
5703 (pkglib_IMAGES): ... this. Update all users.
5704 (pkgdata_MODULES): Rename to ...
5705 (pkglib_MODULES): ... this. Update all users.
5706 (pkgdata_PROGRAMS): Rename to ...
5707 (pkglib_PROGRAMS): ... this. Update all users.
5708 (pkgdata_DATA): Rename to ...
5709 (pkglib_DATA): ... this. Update all users.
5710 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5711 (unicode.pff, ascii.pff): New rules.
5712 (all-local): Add `$(PKGDATA)' dependency.
5713 (install-local): Process `$(PKGDATA)'.
5714
5715 * util/update-grub_lib.in (font_path): Search for *.pff files in
5716 a few more locations, including `${pkgdata}'.
5717
57e57e31 57182007-12-23 Robert Millan <rmh@aybabtu.com>
5719
5720 Patch from Bean <bean123ch@gmail.com>:
5721 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5722 `size'.
5723
4bc72aa9 57242007-12-21 Bean <bean123ch@gmail.com>
5725
5726 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5727 (ntfscomp_mod_SOURCES): New variable.
5728 (ntfscomp_mod_CFLAGS): Likewise.
5729 (ntfscomp_mod_LDFLAGS): Likewise.
5730
5731 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5732 (grub_probe_SOURCES): Likewise.
5733 (grub_emu_SOURCES): Likewise.
5734
5735 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5736 (grub_emu_SOURCES): Likewise.
5737
5738 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5739 (grub_emu_SOURCES): Likewise.
5740
5741 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5742 (grub_emu_SOURCES): Likewise.
5743
5744 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5745 (read_run_list): Renamed to grub_ntfs_read_run_list.
5746 (decomp_nextvcn): Moved to ntfscomp.c.
5747 (decomp_getch): Likewise.
5748 (decomp_get16): Likewise.
5749 (decomp_block): Likewise.
5750 (read_block): Likewise.
5751 (read_data): Partially moved to ntfscomp.c.
5752 (fixup): Change unsigned to grub_uint16_t.
5753 (read_mft): Change unsigned long to grub_uint32_t.
5754 (read_attr): Likewise.
5755 (read_data): Likewise.
5756 (read_run_data): Likewise.
5757 (read_run_list): Likewise.
5758 (read_mft): Likewise.
5759
5760 * fs/ntfscomp.c: New file.
5761
5762 * include/grub/ntfs.h: New file.
5763
af680a87 57642007-12-16 Robert Millan <rmh@aybabtu.com>
5765
5766 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5767 IDE disk check, since Linux is known to support 20 IDE disks.
5768 Reported by Colin Watson.
5769
84be7599 57702007-12-15 Bean <bean123ch@gmail.com>
5771
5772 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5773 (lnxboot_img_SOURCES): New variable.
5774 (lnxboot_img_ASFLAGS): Likewise.
5775 (lnxboot_img_LDFLAGS): Likewise.
5776
5777 * boot/i386/pc/lnxboot.S: New file.
5778
6af9db01 57792007-11-24 Pavel Roskin <proski@gnu.org>
5780
5781 * configure.ac: Test if '--build-id=none' is supported by the
5782 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5783 objcopy to generate incorrect binary files (binutils
5784 2.17.50.0.18-1 as shipped by Fedora 8).
5785 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5786 linking, so that build ID doesn't break the test.
5787
7361cfe6 57882007-11-24 Pavel Roskin <proski@gnu.org>
5789
5790 * include/grub/i386/time.h: use "void" in the argument list
5791 of grub_cpu_idle().
5792 * include/grub/powerpc/time.h: Likewise.
5793 * include/grub/sparc64/time.h: Likewise.
5794
1593e10c 57952007-11-18 Christian Franke <franke@computer.org>
5796
5797 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5798 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5799 This fixes the problem that function keys did not work in grub-emu.
5800
3b8db1a8 58012007-11-18 Christian Franke <franke@computer.org>
5802
5803 * disk/host.c (grub_host_open): Remove attribute unused from
5804 name parameter. Add check for "host". This fixes the problem
5805 that grub-emu does not find partitions.
5806
2e29408d 58072007-11-18 Christian Franke <franke@computer.org>
5808
5809 * util/hostfs.c (is_dir): New function.
5810 (grub_hostfs_dir): Handle missing dirent.d_type case.
5811 (grub_hostfs_read): Add missing fseek().
5812 (grub_hostfs_label): Clear label pointer. This fixes a crash
5813 of grub-emu on "ls (host)".
5814
398cd047 58152007-11-18 Christian Franke <franke@computer.org>
5816
5817 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5818 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5819 to 64 bit boundary by default.
5820
c405c391 58212007-11-18 Bean <bean123ch@gmail.com>
5822
5823 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5824 (hexdump_mod_SOURCES): New variable.
5825 (hexdump_mod_CFLAGS): Likewise.
5826 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 5827
c405c391 5828 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5829
5830 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5831
5832 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5833
5834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5835
5836 * include/grub/hexdump.h: New file.
5837
5838 * commands/hexdump.c: New file.
5839
5cced7fd 58402007-11-10 Robert Millan <rmh@aybabtu.com>
5841
5842 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5843 in grub_outb() calls.
5844 (beep_on): Likewise.
5845
8b714eb0 58462007-11-10 Christian Franke <franke@computer.org>
5847
5848 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5849 (grub_menu_run): Likewise.
5850
ce0f1839 58512007-11-10 Robert Millan <rmh@aybabtu.com>
5852
5853 * include/grub/i386/efi/machine.h: New file.
5854 * include/grub/i386/linuxbios/machine.h: Likewise.
5855 * include/grub/i386/pc/machine.h: Likewise.
5856 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5857 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5858
5859 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5860 (serial_hw_io_addr): New variable.
5861 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5862 instead of `(unsigned short *) 0x400'.
5863
270c237d 58642007-11-10 Bean <bean123ch@gmail.com>
5865
5866 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5867
a87783bf 58682007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5869
5870 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5871 (vga_mod_SOURCES): Added.
5872 (vga_mod_CFLAGS): Likewise.
5873 (vga_mod_LDFLAGS): Likewise.
5874
5875 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5876 grub_outb() calls.
5877 (set_map_mask): Likewise.
5878 (set_read_map): Likewise.
5879 (set_read_address): Likewise.
5880 (vga_font): Removed variable.
5881 (get_vga_glyph): Removed function.
5882 (invalidate_char): Likewise.
5883 (write_char): Changed to use grub_font_get_glyph() for font
5884 information.
5885 (grub_vga_putchar): Likewise.
5886 (grub_vga_getcharwidth): Likewise.
5887
6433b448 58882007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5889
5890 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5891 flags.
5892 (pxeboot_img_LDFLAGS): Likewise.
5893 (diskboot_img_LDFLAGS): Likewise.
5894 (kernel_img_LDFLAGS): Likewise.
5895
49178511 58962007-11-06 Robert Millan <rmh@aybabtu.com>
5897
5898 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5899 in grub_outb() calls.
5900 (serial_hw_init): Likewise.
5901
53b052de 59022007-11-05 Robert Millan <rmh@aybabtu.com>
5903
5904 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5905 spaces. Skip non-regular files.
5906
5ab33bba 59072007-11-05 Robert Millan <rmh@aybabtu.com>
5908
5909 * kern/disk.c (grub_disk_firmware_fini)
5910 (grub_disk_firmware_is_tainted): New variables.
5911
5912 * include/grub/disk.h (grub_disk_firmware_fini)
5913 (grub_disk_firmware_is_tainted): Likewise.
5914
5915 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5916 (grub_disk_biosdisk_fini): ... to here.
5917 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5918 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5919 is set. Register grub_disk_biosdisk_fini() in
5920 `grub_disk_firmware_fini'.
5921
5922 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5923 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5924 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5925 to finish existing firmware disk interface.
5926
5927 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5928 (ata_mod_SOURCES): New variable.
5929 (ata_mod_CFLAGS): Likewise.
5930 (ata_mod_LDFLAGS): Likewise.
5931
0149ab7c 59322007-11-05 Robert Millan <rmh@aybabtu.com>
5933
5934 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5935 (grub_ata_wait): Reimplement using grub_millisleep().
5936
5937 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5938 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5939
be7ac41e 59402007-11-03 Marco Gerards <marco@gnu.org>
5941
5942 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5943 (CRTC_ADDR_PORT): New macro.
5944 (CRTC_DATA_PORT): Likewise.
5945 (CRTC_CURSOR): Likewise.
5946 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5947 (CRTC_CURSOR_ADDR_LOW): Likewise.
5948 (update_cursor): New function.
5949 (grub_console_real_putchar): Call `update_cursor'.
5950 (grub_console_gotoxy): Likewise.
5951 (grub_console_cls): Set the default color when clearing the
5952 screen.
5953 (grub_console_setcursor): Implemented.
5954
bb06ab2e 59552007-11-03 Marco Gerards <marco@gnu.org>
5956
5957 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5958 become activate.
5959 (grub_ata_pio_write): Likewise.
5960
5961 (grub_atapi_identify): Wait after issuing an ATA command.
5962 (grub_atapi_packet): Likewise.
5963 (grub_ata_identify): Likewise.
5964 (grub_ata_readwrite): Likewise.
5965
cf8f780b 59662007-11-03 Marco Gerards <marco@gnu.org>
5967
5968 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5969 (grub_ata_pio_write): Likewise.
5970 (grub_ata_readwrite): Use `grub_error', instead of
5971 returning `grub_errno'.
5972
ed649e54 59732007-11-03 Marco Gerards <marco@gnu.org>
5974
5975 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5976 grub_ata_pio_write once for every single sector, instead of for
5977 multiple sectors.
5978
ca25d8f0 59792007-10-31 Robert Millan <rmh@aybabtu.com>
5980
5981 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5982
5983 * conf/i386-linuxbios.rmk: New file.
5984
5985 * kern/i386/pc/hardware.c: Likewise.
5986 * term/i386/pc/at_keyboard.c: Likewise.
5987 * term/i386/pc/vga_text.c: Likewise.
5988
5989 * include/grub/i386/linuxbios/boot.h: Likewise.
5990 * include/grub/i386/linuxbios/console.h: Likewise.
5991 * include/grub/i386/linuxbios/init.h: Likewise.
5992 * include/grub/i386/linuxbios/kernel.h: Likewise.
5993 * include/grub/i386/linuxbios/loader.h: Likewise.
5994 * include/grub/i386/linuxbios/memory.h: Likewise.
5995 * include/grub/i386/linuxbios/serial.h: Likewise.
5996 * include/grub/i386/linuxbios/time.h: Likewise.
5997
5998 * kern/i386/linuxbios/init.c: Likewise.
5999 * kern/i386/linuxbios/startup.S: Likewise.
6000 * kern/i386/linuxbios/table.c: Likewise.
6001
e911ecc1 60022007-10-31 Marco Gerards <marco@gnu.org>
6003
6004 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6005 (ata_mod_SOURCES): New variable.
6006 (ata_mod_CFLAGS): Likewise.
6007 (ata_mod_LDFLAGS): Likewise.
6008
6009 * disk/ata.c: New file.
6010
6011 * include/grub/disk.h (grub_disk_dev_id): Add
6012 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 6013
7f66d0e0 60142007-10-31 Robert Millan <rmh@aybabtu.com>
6015
6016 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6017 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6018
6019 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6020 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6021
6022 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6023 `<grub/types.h>'.
6024
6025 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6026
5cd7dd46 60272007-10-27 Robert Millan <rmh@aybabtu.com>
6028
3236ca65 6029 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 6030
2ebfc90f 60312007-10-22 Robert Millan <rmh@aybabtu.com>
6032
6033 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6034 `"../realmode.S"'.
6035 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6036
73fcb0f3 60372007-10-22 Robert Millan <rmh@aybabtu.com>
6038
6039 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6040 (pkgdata_MODULES): Add `biosdisk.mod'.
6041 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6042 variables.
6043
6044 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6045 (grub_biosdisk_init): Replace with ...
6046 (GRUB_MOD_INIT(biosdisk)): ... this.
6047 (grub_biosdisk_fini): Replace with ...
6048 (GRUB_MOD_FINI(biosdisk)): ... this.
6049
6050 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6051 (grub_machine_init): Remove call to grub_biosdisk_init().
6052 (grub_machine_fini): Remove call to grub_machine_fini().
6053
6054 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6055
3381d274 60562007-10-22 Robert Millan <rmh@aybabtu.com>
6057
6058 * include/grub/time.h: New file.
6059 * include/grub/i386/time.h: Likewise.
6060 * include/grub/powerpc/time.h: Likewise.
6061 * include/grub/sparc64/time.h: Likewise.
6062
6063 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6064 instances to ...
6065 (KERNEL_MACHINE_TIME_HEADER): ... this.
6066 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6067 instances to ...
6068 (KERNEL_MACHINE_TIME_HEADER): ... this.
6069 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6070 instances to ...
6071 (KERNEL_MACHINE_TIME_HEADER): ... this.
6072
6073 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6074 (grub_millisleep): New function.
6075 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6076 (grub_millisleep): New function.
6077 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6078 Remove `grub/machine/time.h' include.
6079 (grub_millisleep): New function.
6080 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6081 Remove `grub/machine/time.h' include.
6082 (grub_millisleep): New function.
6083
6084 * include/grub/misc.h (grub_div_roundup): New function.
6085
6086 * kern/misc.c: Include `<grub/time.h>'.
6087 (grub_millisleep_generic): New function.
6088
6089 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6090 Add `time.h'.
6091 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6092 Add `time.h'.
6093 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6094 `machine/time.h'. Add `time.h'.
6095 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6096
a39a0312 60972007-10-21 Robert Millan <rmh@aybabtu.com>
6098
6099 * include/grub/misc.h (grub_max): New function.
6100
2aad70e2 61012007-10-21 Robert Millan <rmh@aybabtu.com>
6102
6103 * util/misc.c (grub_util_info): Call fflush() before returning.
6104
54b71c4b 61052007-10-20 Robert Millan <rmh@aybabtu.com>
6106
6107 * genmk.rb (Image): Copy `extra_flags' from here ...
6108 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6109
6110 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6111 to `argc' and `args' arguments.
6112
a979f513 61132007-10-17 Robert Millan <rmh@aybabtu.com>
6114
6115 * kern/i386/loader.S: New file.
6116
6117 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6118 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6119 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6120 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6121 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6122 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6123 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6124 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6125 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6126 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6127 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6128 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6129 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6130 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6131
6132 * kern/i386/realmode.S: New file.
6133
6134 * kern/i386/pc/startup.S (protstack): Moved from here ...
6135 * kern/i386/realmode.S (protstack)... to here.
6136 * kern/i386/pc/startup.S (gdt): Moved from here ...
6137 * kern/i386/realmode.S (gdt)... to here.
6138 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6139 * kern/i386/realmode.S (prot_to_real)... to here.
6140
6141 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6142 `kern/i386/realmode.S'.
6143
825fc8fd 61442007-10-17 Robert Millan <rmh@aybabtu.com>
6145
6146 * include/grub/i386/loader.h: New file.
6147
6148 * include/grub/i386/pc/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): Moved from here ...
6153 * include/grub/i386/loader.h (grub_linux_prot_size)
6154 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6155 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6156 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6157 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6158
6159 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6160
e179b2f4 61612007-10-15 Robert Millan <rmh@aybabtu.com>
6162
6163 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6164 filesystem when dev->disk is unset.
6165 Do probe for filesystem even when dev->disk->has_partitions is set.
6166 In case a filesystem is found, always report it.
6167 In case it isn't, if dev->disk->has_partitions is set, report that
6168 a partition table was found instead of reporting that no filesystem
6169 could be identified.
6170
5db82af6 61712007-10-12 Robert Millan <rmh@aybabtu.com>
6172
6173 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6174 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6175
68f6ac74 6176 * include/grub/types.h (grub_host_to_target16): New macro.
6177 (grub_host_to_target32): Likewise.
6178 (grub_host_to_target64): Likewise.
6179 (grub_target_to_host16): Likewise.
6180 (grub_target_to_host32): Likewise.
6181 (grub_target_to_host64): Likewise.
5db82af6 6182
6183 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6184 Renamed from to ...
6185 (GRUB_MOD_ALIGN): ...this. Update all users.
6186
68f6ac74 6187 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6188 grub_host_to_target32.
6189 Replace grub_be_to_cpu32 with grub_target_to_host32.
6190 (load_modules): Likewise.
6191 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6192 Replace grub_be_to_cpu32 with grub_target_to_host32.
6193 Replace grub_cpu_to_be16 with grub_host_to_target16.
6194 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 6195
3cf497cc 61962007-10-12 Robert Millan <rmh@aybabtu.com>
6197
6198 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6199 * util/elf/grub-mkimage.c: ... here.
6200
6201 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6202 `util/powerpc/ieee1275/grub-mkimage.c'.
6203
c8cc3692 62042007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 6205
c8cc3692 6206 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6207 and make it easier to figure out.
6208 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6209 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6210 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6211 leave us with less than HEAP_MIN_SIZE total heap.
6212 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 6213
5c58b791 62142007-10-03 Robert Millan <rmh@aybabtu.com>
6215
6216 * include/grub/i386/io.h: New file.
6217 * commands/i386/pc/play.c (inb): Removed.
6218 (outb): Removed.
6219 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6220 with grub_outb().
afcd2ef8 6221 * term/i386/pc/serial.c (inb): Removed.
6222 (outb): Removed.
6223 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6224 with grub_outb().
6225 * term/i386/pc/vga.c (inb): Removed.
6226 (outb): Removed.
6227 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6228 with grub_outb().
5c58b791 6229
1a477ed6 62302007-10-02 Robert Millan <rmh@aybabtu.com>
6231
6232 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6233 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6234 Reported by Marcin Kurek.
6235
6b5d80fa 62362007-09-07 Robert Millan <rmh@aybabtu.com>
6237
6238 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6239 SmartFirmware version updates (as released by Sven Luther), and avoid
6240 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6241 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6242 known broken.
6243
5618afbf 62442007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6245
6246 From Hitoshi Ozeki:
6247 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6248 when merging two regions.
6249
6139dcd9 62502007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6251
508e39ee 6252 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6253 * normal/completion.c (grub_normal_do_completion): Likewise.
6254 Reported by Hitoshi Ozeki.
6255
62562007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 6257
6139dcd9 6258 Do not use devices at boot in chainloading.
f19dbdb7 6259
6139dcd9 6260 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6261 (boot_part_addr): Likewise.
6262 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6263 with BOOT_DRIVE and BOOT_PART_ADDR.
6264 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6265 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6266
38da6516 62672007-08-29 Robert Millan <rmh@aybabtu.com>
6268
6269 Patch from Simon Peter <dn.tlp@gmx.net>:
6270 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6271 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6272 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6273 util/i386/pc/grub-setup.c_DEPENDENCIES.
6274 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6275 util/grub-probe.c_DEPENDENCIES.
6276 * conf/powerpc-ieee1275.rmk: Likewise.
6277
29d0928c 62782007-08-28 Robert Millan <rmh@aybabtu.com>
6279
6280 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6281 to tell grub-mkdevicemap how to name devices.
6282 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6283 feature).
6284
6285 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6286 util/i386/get_disk_name.c.
6287 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6288 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6289 util/ieee1275/get_disk_name.c.
6290
6291 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6292
6293 * DISTLIST: Add util/i386/get_disk_name.c and
6294 util/ieee1275/get_disk_name.c.
6295
6296 * util/grub-mkdevicemap.c: Replace device naming logic with
6297 grub_util_get_disk_name() calls.
6298
5a0d3cca 62992007-08-20 Robert Millan <rmh@aybabtu.com>
6300
6301 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6302 (so that it works for both plural and singular quantities).
6303
8b72db2f 63042007-08-05 Robert Millan <rmh@aybabtu.com>
6305
6306 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6307 so that [xz] isn't taken into account when determining order.
6308
352466bf 63092007-08-02 Marco Gerards <marco@gnu.org>
6310
6311 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6312 `include/multiboot2.h', `include/grub/elfload.h',
6313 `include/multiboot.h', `include/grub/multiboot.h',
6314 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6315 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6316 `kern/elf.c', `loader/multiboot_loader.c',
6317 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6318 `loader/i386/pc/multiboot2.c',
6319 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6320 `util/i386/pc/grub-mkrescue.in'. Remove
6321 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
6322 `include/grub/i386/pc/util/biosdisk.h' and
6323 `include/grub/powerpc/ieee1275/multiboot.h'.
6324
8f096014 63252007-08-02 Bean <bean123ch@gmail.com>
6326
6327 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6328 (ntfs_mod_SOURCES): New variable.
6329 (ntfs_mod_CFLAGS): Likewise.
6330 (ntfs_mod_LDFLAGS): Likewise.
6331
6332 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6333 (grub_probe_SOURCES): Likewise.
6334 (grub_emu_SOURCES): Likewise.
6335
6336 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6337 (grub_emu_SOURCES): Likewise.
6338
6339 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6340 (grub_emu_SOURCES): Likewise.
f19dbdb7 6341
8f096014 6342 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6343
6344 * fs/ntfs.c: New file.
6345
9959f7db 63462007-08-02 Bean <bean123ch@gmail.com>
6347
6348 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6349
6350 * file.h (grub_file): Likewise.
6351
6352 * fshelp.h (grub_fshelp_read_file): Likewise.
6353
6354 * util/i386/pc/grub-setup.c (setup): Likewise.
6355 (save_first_sector): Likewise.
6356 (save_blocklists): Likewise.
f19dbdb7 6357
9959f7db 6358 * fs/affs.c (grub_affs_read_file): Likewise.
6359
6360 * fs/ext2.c (grub_ext2_read_file): Likewise.
6361
6362 * fs/fat.c (grub_fat_read_data): Likewise.
6363
6364 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6365
6366 * fs/hfs.c (grub_hfs_read_file): Likewise.
6367
6368 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6369
6370 * fs/jfs.c (grub_jfs_read_file): Likewise.
6371
6372 * fs/minix.c (grub_minix_read_file): Likewise.
6373
6374 * fs/sfs.c (grub_sfs_read_file): Likewise.
6375
6376 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 6377
9959f7db 6378 * fs/xfs.c (grub_xfs_read_file): Likewise.
6379
6380 * command/blocklist.c (read_blocklist): Likewise.
6381 (print_blocklist): Likewise.
6382
0a203f83 63832007-08-02 Marco Gerards <marco@gnu.org>
6384
6385 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6386 `util/hostfs.c'.
6387
6388 * disk/host.c: New file.
6389
6390 * util/hostfs.c: Likewise.
6391
6392 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6393 return `GRUB_ERR_BAD_FS'.
6394 * fs/sfs.c (grub_sfs_mount): Likewise.
6395 * fs/xfs.c (grub_xfs_mount): Likewise.
6396
6397 * include/grub/disk.h (enum grub_disk_dev_id): Add
6398 `GRUB_DISK_DEVICE_HOST_ID'.
6399
6400 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6401
e5dfe777 64022007-07-24 Jerone Young <jerone@gmail.com>
6403
f19dbdb7 6404 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 6405 modules for compilation.
6406 * conf/powerpc-ieee1275.rmk: Likewise.
6407
6408 * include/multiboot.h: Move multiboot definitions to one file. Rename
6409 many definitions to not get grub specific.
6410 * include/multiboot2.h: Create header with multiboot 2 definitions.
6411 * include/grub/multiboot.h: Header for grub specific function
6412 prototypes and definitions.
6413 * include/grub/multiboot2.h: Likewise.
6414 * include/grub/multiboot_loader.h: Likewise.
6415 * include/grub/i386/pc/multiboot.h: Removed.
6416 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6417
6418 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6419 and 2 to allow for one multiboot and module commands.
6420 * loader/multiboot2.c: Add multiboot2 functionality.
6421 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6422 and definition names.
6423 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6424 2 functions.
6425 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6426 ieee1275 specific multiboot2 code.
6427
6428 * kern/i386/pc/startup.S: Change headers and definition names for
6429 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6430
daf0f0ba 64312007-07-22 Robert Millan <rmh@aybabtu.com>
6432
6433 * geninitheader.sh: Process file specified in first parameter rather
6434 than hardcoding grub_modules_init.lst.
fe6b695a 6435 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 6436 than hardcoding grub_modules_init.h.
6437
6438 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6439 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6440 grub_probe_init.[ch] and grub_setup_init.[ch].
6441
6442 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6443 grub_modules_init.h with grub_emu_init.h.
6444 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6445 grub_probe_init.[ch] files.
6446 * conf/i386-efi.rmk: Likewise.
6447 * conf/i386-pc.rmk: Likewise.
6448 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6449 grub_setup_init.[ch] files.
6450
6451 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6452 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6453 to initialize modules rather than a list of hardcoded functions.
6454 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6455 grub_init_all() to initialize modules rather than a list of hardcoded
6456 functions.
6457
54cdc1cc 64582007-07-22 Robert Millan <rmh@aybabtu.com>
6459
6460 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6461 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6462
ad0686cc 64632007-07-22 Robert Millan <rmh@aybabtu.com>
6464
6465 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6466 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6467 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6468 flag when running on SmartFirmware.
6469 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6470 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6471 was set.
6472
6473 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6474 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6475 rather than decreasing it.
6476
6477 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6478 there's not enough space to do it, fail in the same way as when it
6479 can't be done because there are no partitions.
6480
6481 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6482 when nvsetenv failed.
6483
969c02ec 64842007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6485
6486 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6487 because this rule is automatically generated.
6488 (grub-mkrescue): Removed for the same reason as above.
6489
5a79f472 64902007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6491
6492 Migrate to GNU General Public License Version 3.
f19dbdb7 6493
5a79f472 6494 * COPYING: Replaced with the plain text version of GPLv3.
6495
6496 * config.guess: Updated from gnulib.
6497 * config.sub: Likewise.
6498
6499 * geninit.sh: Output a GPLv3 copyright notice.
6500 * geninitheader.sh: Likewise.
6501 * genmodsrc.sh: Likewise.
6502 * gensymlist.sh.in: Likewise.
6503
6504 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6505 * boot/i386/pc/diskboot.S: Likewise.
6506 * boot/i386/pc/pxeboot.S: Likewise.
6507 * commands/blocklist.c: Likewise.
6508 * commands/boot.c: Likewise.
6509 * commands/cat.c: Likewise.
6510 * commands/cmp.c: Likewise.
6511 * commands/configfile.c: Likewise.
6512 * commands/echo.c: Likewise.
6513 * commands/help.c: Likewise.
6514 * commands/ls.c: Likewise.
6515 * commands/search.c: Likewise.
6516 * commands/terminal.c: Likewise.
6517 * commands/test.c: Likewise.
6518 * commands/videotest.c: Likewise.
6519 * commands/i386/cpuid.c: Likewise.
6520 * commands/i386/pc/halt.c: Likewise.
6521 * commands/i386/pc/play.c: Likewise.
6522 * commands/i386/pc/reboot.c: Likewise.
6523 * commands/i386/pc/vbeinfo.c: Likewise.
6524 * commands/i386/pc/vbetest.c: Likewise.
6525 * commands/ieee1275/halt.c: Likewise.
6526 * commands/ieee1275/reboot.c: Likewise.
6527 * commands/ieee1275/suspend.c: Likewise.
6528 * disk/loopback.c: Likewise.
6529 * disk/lvm.c: Likewise.
6530 * disk/raid.c: Likewise.
6531 * disk/efi/efidisk.c: Likewise.
6532 * disk/i386/pc/biosdisk.c: Likewise.
6533 * disk/ieee1275/ofdisk.c: Likewise.
6534 * font/manager.c: Likewise.
6535 * fs/affs.c: Likewise.
6536 * fs/ext2.c: Likewise.
6537 * fs/fat.c: Likewise.
6538 * fs/fshelp.c: Likewise.
6539 * fs/hfs.c: Likewise.
6540 * fs/hfsplus.c: Likewise.
6541 * fs/iso9660.c: Likewise.
6542 * fs/jfs.c: Likewise.
6543 * fs/minix.c: Likewise.
6544 * fs/sfs.c: Likewise.
6545 * fs/ufs.c: Likewise.
6546 * fs/xfs.c: Likewise.
6547 * hello/hello.c: Likewise.
6548 * include/grub/acorn_filecore.h: Likewise.
6549 * include/grub/arg.h: Likewise.
6550 * include/grub/bitmap.h: Likewise.
6551 * include/grub/boot.h: Likewise.
6552 * include/grub/cache.h: Likewise.
6553 * include/grub/device.h: Likewise.
6554 * include/grub/disk.h: Likewise.
6555 * include/grub/dl.h: Likewise.
6556 * include/grub/elfload.h: Likewise.
6557 * include/grub/env.h: Likewise.
6558 * include/grub/err.h: Likewise.
6559 * include/grub/file.h: Likewise.
6560 * include/grub/font.h: Likewise.
6561 * include/grub/fs.h: Likewise.
6562 * include/grub/fshelp.h: Likewise.
6563 * include/grub/gzio.h: Likewise.
6564 * include/grub/hfs.h: Likewise.
6565 * include/grub/kernel.h: Likewise.
6566 * include/grub/loader.h: Likewise.
6567 * include/grub/lvm.h: Likewise.
6568 * include/grub/misc.h: Likewise.
6569 * include/grub/mm.h: Likewise.
6570 * include/grub/net.h: Likewise.
6571 * include/grub/normal.h: Likewise.
6572 * include/grub/parser.h: Likewise.
6573 * include/grub/partition.h: Likewise.
6574 * include/grub/pc_partition.h: Likewise.
6575 * include/grub/raid.h: Likewise.
6576 * include/grub/rescue.h: Likewise.
6577 * include/grub/script.h: Likewise.
6578 * include/grub/setjmp.h: Likewise.
6579 * include/grub/symbol.h: Likewise.
6580 * include/grub/term.h: Likewise.
6581 * include/grub/terminfo.h: Likewise.
6582 * include/grub/tparm.h: Likewise.
6583 * include/grub/types.h: Likewise.
6584 * include/grub/video.h: Likewise.
6585 * include/grub/efi/api.h: Likewise.
6586 * include/grub/efi/chainloader.h: Likewise.
6587 * include/grub/efi/console.h: Likewise.
6588 * include/grub/efi/console_control.h: Likewise.
6589 * include/grub/efi/disk.h: Likewise.
6590 * include/grub/efi/efi.h: Likewise.
6591 * include/grub/efi/pe32.h: Likewise.
6592 * include/grub/efi/time.h: Likewise.
6593 * include/grub/i386/linux.h: Likewise.
6594 * include/grub/i386/setjmp.h: Likewise.
6595 * include/grub/i386/types.h: Likewise.
6596 * include/grub/i386/efi/kernel.h: Likewise.
6597 * include/grub/i386/efi/loader.h: Likewise.
6598 * include/grub/i386/efi/time.h: Likewise.
6599 * include/grub/i386/pc/biosdisk.h: Likewise.
6600 * include/grub/i386/pc/boot.h: Likewise.
6601 * include/grub/i386/pc/chainloader.h: Likewise.
6602 * include/grub/i386/pc/console.h: Likewise.
6603 * include/grub/i386/pc/init.h: Likewise.
6604 * include/grub/i386/pc/kernel.h: Likewise.
6605 * include/grub/i386/pc/loader.h: Likewise.
6606 * include/grub/i386/pc/memory.h: Likewise.
6607 * include/grub/i386/pc/multiboot.h: Likewise.
6608 * include/grub/i386/pc/serial.h: Likewise.
6609 * include/grub/i386/pc/time.h: Likewise.
6610 * include/grub/i386/pc/vbe.h: Likewise.
6611 * include/grub/i386/pc/vbeblit.h: Likewise.
6612 * include/grub/i386/pc/vbefill.h: Likewise.
6613 * include/grub/i386/pc/vbeutil.h: Likewise.
6614 * include/grub/i386/pc/vga.h: Likewise.
6615 * include/grub/ieee1275/ieee1275.h: Likewise.
6616 * include/grub/ieee1275/ofdisk.h: Likewise.
6617 * include/grub/powerpc/libgcc.h: Likewise.
6618 * include/grub/powerpc/setjmp.h: Likewise.
6619 * include/grub/powerpc/types.h: Likewise.
6620 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6621 * include/grub/powerpc/ieee1275/console.h: Likewise.
6622 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6623 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6624 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6625 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6626 * include/grub/powerpc/ieee1275/time.h: Likewise.
6627 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6628 * include/grub/sparc64/libgcc.h: Likewise.
6629 * include/grub/sparc64/setjmp.h: Likewise.
6630 * include/grub/sparc64/types.h: Likewise.
6631 * include/grub/sparc64/ieee1275/console.h: Likewise.
6632 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6633 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6634 * include/grub/sparc64/ieee1275/time.h: Likewise.
6635 * include/grub/util/biosdisk.h: Likewise.
6636 * include/grub/util/getroot.h: Likewise.
6637 * include/grub/util/lvm.h: Likewise.
6638 * include/grub/util/misc.h: Likewise.
6639 * include/grub/util/raid.h: Likewise.
6640 * include/grub/util/resolve.h: Likewise.
6641 * io/gzio.c: Likewise.
6642 * kern/device.c: Likewise.
6643 * kern/disk.c: Likewise.
6644 * kern/dl.c: Likewise.
6645 * kern/elf.c: Likewise.
6646 * kern/env.c: Likewise.
6647 * kern/err.c: Likewise.
6648 * kern/file.c: Likewise.
6649 * kern/fs.c: Likewise.
6650 * kern/loader.c: Likewise.
6651 * kern/main.c: Likewise.
6652 * kern/misc.c: Likewise.
6653 * kern/mm.c: Likewise.
6654 * kern/parser.c: Likewise.
6655 * kern/partition.c: Likewise.
6656 * kern/rescue.c: Likewise.
6657 * kern/term.c: Likewise.
6658 * kern/efi/efi.c: Likewise.
6659 * kern/efi/init.c: Likewise.
6660 * kern/efi/mm.c: Likewise.
6661 * kern/i386/dl.c: Likewise.
6662 * kern/i386/efi/init.c: Likewise.
6663 * kern/i386/efi/startup.S: Likewise.
6664 * kern/i386/pc/init.c: Likewise.
6665 * kern/i386/pc/lzo1x.S: Likewise.
6666 * kern/i386/pc/startup.S: Likewise.
6667 * kern/ieee1275/ieee1275.c: Likewise.
6668 * kern/powerpc/cache.S: Likewise.
6669 * kern/powerpc/dl.c: Likewise.
6670 * kern/powerpc/ieee1275/cmain.c: Likewise.
6671 * kern/powerpc/ieee1275/crt0.S: Likewise.
6672 * kern/powerpc/ieee1275/init.c: Likewise.
6673 * kern/powerpc/ieee1275/openfw.c: Likewise.
6674 * kern/sparc64/cache.S: Likewise.
6675 * kern/sparc64/dl.c: Likewise.
6676 * kern/sparc64/ieee1275/init.c: Likewise.
6677 * kern/sparc64/ieee1275/openfw.c: Likewise.
6678 * loader/efi/chainloader.c: Likewise.
6679 * loader/efi/chainloader_normal.c: Likewise.
6680 * loader/i386/efi/linux.c: Likewise.
6681 * loader/i386/efi/linux_normal.c: Likewise.
6682 * loader/i386/pc/chainloader.c: Likewise.
6683 * loader/i386/pc/chainloader_normal.c: Likewise.
6684 * loader/i386/pc/linux.c: Likewise.
6685 * loader/i386/pc/linux_normal.c: Likewise.
6686 * loader/i386/pc/multiboot.c: Likewise.
6687 * loader/i386/pc/multiboot_normal.c: Likewise.
6688 * loader/powerpc/ieee1275/linux.c: Likewise.
6689 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6690 * normal/arg.c: Likewise.
6691 * normal/cmdline.c: Likewise.
6692 * normal/command.c: Likewise.
6693 * normal/completion.c: Likewise.
6694 * normal/execute.c: Likewise.
6695 * normal/function.c: Likewise.
6696 * normal/lexer.c: Likewise.
6697 * normal/main.c: Likewise.
6698 * normal/menu.c: Likewise.
6699 * normal/menu_entry.c: Likewise.
6700 * normal/misc.c: Likewise.
6701 * normal/parser.y: Likewise.
6702 * normal/script.c: Likewise.
6703 * normal/i386/setjmp.S: Likewise.
6704 * normal/powerpc/setjmp.S: Likewise.
6705 * normal/sparc64/setjmp.S: Likewise.
6706 * partmap/acorn.c: Likewise.
6707 * partmap/amiga.c: Likewise.
6708 * partmap/apple.c: Likewise.
6709 * partmap/gpt.c: Likewise.
6710 * partmap/pc.c: Likewise.
6711 * partmap/sun.c: Likewise.
6712 * term/gfxterm.c: Likewise.
6713 * term/terminfo.c: Likewise.
6714 * term/efi/console.c: Likewise.
6715 * term/i386/pc/console.c: Likewise.
6716 * term/i386/pc/serial.c: Likewise.
6717 * term/i386/pc/vesafb.c: Likewise.
6718 * term/i386/pc/vga.c: Likewise.
6719 * term/ieee1275/ofconsole.c: Likewise.
6720 * util/biosdisk.c: Likewise.
6721 * util/console.c: Likewise.
6722 * util/genmoddep.c: Likewise.
6723 * util/getroot.c: Likewise.
6724 * util/grub-emu.c: Likewise.
6725 * util/grub-mkdevicemap.c: Likewise.
6726 * util/grub-probe.c: Likewise.
6727 * util/lvm.c: Likewise.
6728 * util/misc.c: Likewise.
6729 * util/raid.c: Likewise.
6730 * util/resolve.c: Likewise.
6731 * util/update-grub.in: Likewise.
6732 * util/update-grub_lib.in: Likewise.
6733 * util/grub.d/00_header.in: Likewise.
6734 * util/grub.d/10_hurd.in: Likewise.
6735 * util/grub.d/10_linux.in: Likewise.
6736 * util/i386/efi/grub-install.in: Likewise.
6737 * util/i386/efi/grub-mkimage.c: Likewise.
6738 * util/i386/pc/grub-install.in: Likewise.
6739 * util/i386/pc/grub-mkimage.c: Likewise.
6740 * util/i386/pc/grub-mkrescue.in: Likewise.
6741 * util/i386/pc/grub-setup.c: Likewise.
6742 * util/i386/pc/misc.c: Likewise.
6743 * util/powerpc/ieee1275/grub-install.in: Likewise.
6744 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6745 * util/powerpc/ieee1275/misc.c: Likewise.
6746 * video/bitmap.c: Likewise.
6747 * video/video.c: Likewise.
6748 * video/i386/pc/vbe.c: Likewise.
6749 * video/i386/pc/vbeblit.c: Likewise.
6750 * video/i386/pc/vbefill.c: Likewise.
6751 * video/i386/pc/vbeutil.c: Likewise.
6752 * video/readers/tga.c: Likewise.
6753
3572d015 67542007-07-02 Robert Millan <rmh@aybabtu.com>
6755
6756 * conf/i386-efi.rmk: Replace obsolete reference to
6757 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6758 with util/getroot.c.
6759 * conf/powerpc-ieee1275.rmk: Likewise.
6760 * conf/sparc64-ieee1275.rmk: Likewise.
6761
6762 * util/grub-emu.c (main): Fix unchecked pointer handling.
6763
2c2a681b 67642007-07-02 Robert Millan <rmh@aybabtu.com>
6765
6766 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6767 invocation to fail, in order to support partition-less media.
6768
6769 * util/i386/pc/grub-install.in: Likewise.
6770
6771 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6772 which fs or partmap modules are needed (akin to its sister scripts).
6773
6774 Also use grub-probe to get rid of unportable /proc/mounts check.
6775
6776 Print the same informational message that the other scripts do, before
fe6b695a 6777 exiting.
2c2a681b 6778
6193defe 67792007-06-23 Robert Millan <rmh@aybabtu.com>
6780
fe6b695a 6781 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 6782 a font file can be found and, if so, echo the GRUB path to it.
6783
6784 * util/update-grub.in: Handle multiple terminals depending on user
6785 input, platform availability and font file presence. Propagate
6786 variables of our findings to /etc/grub.d/ children.
6787
6788 * util/grub.d/00_header.in: Handle multiple terminals, based on
6789 environment setup by update-grub.
6790
eface1dc 67912007-06-23 Robert Millan <rmh@aybabtu.com>
6792
ba50d28f 6793 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 6794
bf697e28 67952007-06-21 Robert Millan <rmh@aybabtu.com>
6796
6797 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6798 indicate end of data section in kernel image.
6799 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6800 GRUB_KERNEL_MACHINE_DATA_END.
6801
6802 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6803 space for it.
6804 * kern/i386/efi/startup.S: Likewise.
6805
6806 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6807 during image generation. Implement --prefix option to override this
6808 patch.
6809 * util/i386/efi/grub-mkimage.c: Likewise.
6810
6811 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6812 code to make path relative to its root into a separate function.
6813
6814 * util/i386/pc/grub-install.in: Use newly provided
6815 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6816 pass the result to grub-install --prefix.
6817
baa574b4 68182007-06-13 Robert Millan <rmh@aybabtu.com>
6819
6820 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6821 DEFAULT_DEVICE_MAP.
6822 * util/grub-emu.c: Use above definitions from misc.h instead of
6823 defining them.
6824 * util/grub-mkdevicemap.c: Likewise.
6825 * util/i386/pc/grub-setup.c: Likewise.
6826 * util/grub-probe.c: Likewise.
6827 (probe): Abort with grub_util_error() when either
6828 grub_guess_root_device or grub_util_get_grub_dev fails.
6829
0215dcbf 68302007-06-12 Robert Millan <rmh@aybabtu.com>
6831
6832 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6833 "pager" assignment.
6834 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6835 "pcdata".
6836 * util/grub-probe.c (probe): Likewise for "drive_name".
6837
8af2ab7b 68382007-06-11 Robert Millan <rmh@aybabtu.com>
6839
6840 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6841 not just the cdrom one.
6842
59d31694 68432007-06-11 Robert Millan <rmh@aybabtu.com>
6844
6845 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6846 Add --pkglibdir=DIR option to override pkglibdir.
6847 Mention --image-type=TYPE in help output.
6848 Fix --grub-mkimage (it was a no-op).
fe6b695a 6849 Abort gracefully when no parameter is given.
59d31694 6850
7ee367e4 68512007-06-11 Robert Millan <rmh@aybabtu.com>
6852
6853 * util/i386/pc/grub-mkrescue.in: New file.
6854 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6855 * Makefile.in: Handle bin_SCRIPTS.
6856
29b0ed46 68572007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6858
6859 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6860 list of video modes.
6861
c0f90770 68622007-06-06 Robert Millan <rmh@aybabtu.com>
6863
6864 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6865 file doesn't exist, or if it is in a filesystem grub can't read.
6866
6867 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6868 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6869 header comment to fit in 80 columns when the variables are resolved.
6870
6871 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6872 could be identified by update-grub. Remove redundant check for
fe6b695a 6873 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 6874 handles that).
6875
fb36dc26 68762007-06-04 Robert Millan <rmh@aybabtu.com>
6877
6878 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6879
6880 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6881
6882 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6883
0c68c93e 68842007-06-04 Robert Millan <rmh@aybabtu.com>
6885
6886 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6887
6888 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6889 grub_apple_partition_map_fini.
6890
6891 * util/biosdisk.c
6892 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6893 to access >2 TiB disks).
6894
6895 Print disk->total_sectors with %llu instead of %lu, since this
6896 variable is always 64-bit (prevents wrong disk size from being displayed
6897 on either >2 TiB disk or big-endian CPU).
6898
6899 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6900 into a generic case that supports all (sane) partition maps.
6901
6902 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6903 breaks big-endian.
6904
6905 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6906 and grub_apple_partition_map_fini() after that.
6907
0f23eb74 69082007-06-01 Robert Millan <rmh@aybabtu.com>
6909
6910 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6911
6912 * util/grub.d/00_header.in: Only enable gfxterm when
6913 convert_system_path_to_grub_path() succeeds.
6914
42c71976 69152007-05-20 Robert Millan <rmh@aybabtu.com>
6916
6917 * util/update-grub_lib.in: New file.
6918 * DISTLIST: Add update-grub_lib.in.
6919 * conf/common.rmk: Generate update-grub_lib and install it in
6920 $(lib_DATA).
6921 * Makefile.in: Add install routine for $(lib_DATA).
6922
6923 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6924 function provided by update-grub_lib to support arbitrary paths of
6925 unifont.pff.
6926 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6927 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6928
5beb2291 69292007-05-19 Robert Millan <rmh@aybabtu.com>
6930
6931 * commands/i386/cpuid.c: New module.
6932 * DISTLIST: Add it.
6933 * conf/i386-efi.rmk: Enable cpuid.mod.
6934 * conf/i386-pc.rmk: Likewise.
6935
7262eca1 69362007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6937
6938 * kern/disk.c (grub_disk_read): Check return value of
6939 grub_realloc().
6940
260ba823 69412007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6942
6943 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6944 arrays.
6945 * disk/raid.c (grub_raid_open): Likewise.
6946
1ecb6cf2 69472007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6948
6949 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6950 stack instead of on the heap.
6951
6952 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6953 before doing a read on it.
6954
6955 * configure.ac: Only use -fno-stack-protector for the target
6956 environment.
f19dbdb7 6957
21c8cbb1 69582007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6959
6960 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6961 __attribute_ ((unused)) to mode_type argument.
6962
6963 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 6964
21c8cbb1 6965 * kern/misc.c (memcmp): Fix prototype.
6966
6967 * include/grub/partition.h [GRUB_UTIL]
6968 (grub_gpt_partition_map_init): Add prototype.
6969 (grub_gpt_partition_map_fini): Likewise.
6970
6971 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6972 at the right place.
6973
6974 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6975 (grub_fat_read_data): Likewise.
6976 (grub_fat_find_dir): Likewise.
6977
6978 * font/manager.c (find_glyph): Make table a const.
6979 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 6980
849d55d3 69812007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6982
6983 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6984 code, first search for device in /dev/mapper, then in /dev.
6985 (grub_util_get_grub_dev): New function.
6986 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6987 prototype.
6988 * util/grub-probe.c (probe): Remove check for RAID, call
6989 grub_util_get_grub_dev() instead of
6990 grub_util_biosdisk_get_grub_dev().
6991 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6992 grub_util_biosdisk_get_grub_dev().
6993 * util/i386/pc/grub-setup.c (main): Likewise.
6994
8fff7c2f 69952007-05-16 Robert Millan <rmh@aybabtu.com>
6996
6997 * DISTLIST: Update for the latest changes.
6998 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6999 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7000 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7001 grub/util/biosdisk.h.
7002 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7003 grub/util/biosdisk.h.
7004
48e12b52 70052007-05-16 Robert Millan <rmh@aybabtu.com>
7006
7007 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7008
46b9d128 70092007-05-16 Robert Millan <rmh@aybabtu.com>
7010
7011 * util/i386/efi/grub-install.in: New.
7012 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7013 newly added grub-install.
7014 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7015 include.
7016 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7017 grub/util/biosdisk.h.
7018 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7019 grub/util/biosdisk.h.
7020
2d1a40a9 70212007-05-16 Robert Millan <rmh@aybabtu.com>
7022
7023 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7024 * include/grub/util/biosdisk.h: ... here.
7025 * util/i386/pc/biosdisk.c: Moved to ...
7026 * util/biosdisk.c: ... here.
7027 * util/i386/pc/getroot.c: Moved to ...
7028 * util/getroot.c: ... here.
7029 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7030 * util/grub-mkdevicemap.c: ... here.
7031 * util/i386/pc/grub-probe.c: Moved to ...
7032 * util/grub-probe.c: ... here.
7033
9e26e3bc 70342007-05-15 Robert Millan <rmh@aybabtu.com>
7035
7036 * util/update-grub.in: Remove duplicated line in grub.cfg header
7037 message.
7038
57f96397 70392007-05-13 Robert Millan <rmh@aybabtu.com>
7040
7041 * util/update-grub.in: Fix a few assumptions about the devices holding
7042 /, /boot and /boot/grub being the same.
7043 * util/grub.d/00_header.in: Likewise.
7044 * util/grub.d/10_hurd.in: Likewise.
7045 * util/grub.d/10_linux.in: Likewise.
7046
7047 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7048 patterns. Use that to define the `.old' suffix as older than `'.
7049
7050 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7051
7052 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7053 the grub.cfg header message.
7054
2e610d62 70552007-05-11 Robert Millan <rmh@aybabtu.com>
7056
7057 * util/update-grub.in: Create device.map if it doesn't already exist,
7058 before attempting to run grub-probe.
7059 Check for grub-probe and grub-mkdevicemap with the same code
7060 grub-install is using.
7061 Remove test mode.
7062
3f6a10ef 70632007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7064
7065 * Makefile.in: Add the datarootdir autoconf variable.
7066
02e7b75e 70672007-05-09 Robert Millan <rmh@aybabtu.com>
7068
7069 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 7070 fail gracefully if dev->disk->partition == NULL.
02e7b75e 7071
75f396cc 70722007-05-07 Robert Millan <rmh@aybabtu.com>
7073
7074 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7075 determine partition map module.
7076 * util/i386/pc/grub-install.in: Use this feature to decide which
7077 partition module to load, instead of hardcoding pc and gpt.
7078
da65cb36 70792007-05-07 Robert Millan <rmh@aybabtu.com>
7080
7081 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7082 source directory differs from build directory.
7083
b57d6a91 70842007-05-05 Robert Millan <rmh@aybabtu.com>
7085
7086 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7087 initialisation.
7088
509d00f1 70892007-05-05 Robert Millan <rmh@aybabtu.com>
7090
7091 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7092
c48f23ef 70932007-05-05 Robert Millan <rmh@aybabtu.com>
7094
7095 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7096 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7097
20b97658 70982007-05-05 Robert Millan <rmh@aybabtu.com>
7099
7100 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7101 (grub_probe_SOURCES): Likewise.
7102 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7103 GPT and initialize dos_part and bsd_part accordingly.
7104 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7105 install_bsd_part.
7106 (main): Activate gpt module for use during partition identification,
7107 and deactivate it afterwards.
7108 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7109 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7110 partition identification, and deactivate it afterwards.
7111
99123174 71122007-05-05 Robert Millan <rmh@aybabtu.com>
7113
7114 * term/i386/pc/console.c (grub_console_fini): Call
7115 grub_term_set_current() before grub_term_unregister().
7116
ebd97f6e 71172007-05-04 Robert Millan <rmh@aybabtu.com>
7118
7119 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7120 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7121 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7122 and update-grub_DATA.
7123 * conf/common.rmk: Build and install update-grub components.
7124 * conf/common.mk: Regenerate.
7125 * util/update-grub.in: New. Core of update-grub.
7126 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7127 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7128 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7129 * util/grub.d/README: New. Document grub.d directory layout.
7130
b06a264d 71312007-05-01 Robert Millan <rmh@aybabtu.com>
7132
7133 * util/grub-emu.c: Move initialization functions
7134 grub_util_biosdisk_init() and grub_init_all() before
7135 grub_util_biosdisk_get_grub_dev(), which relies on them.
7136
41f0050e 71372007-04-19 Robert Millan <rmh@aybabtu.com>
7138
7139 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7140 it is used later.
7141
04582bb3 71422007-04-18 Jerone Young <jerone@gmail.com>
7143
f19dbdb7 7144 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 7145 stanza.
7146
08db4632 71472007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 7148
08db4632 7149 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7150 continue on and look for device node with real device name.
7151
801b76be 71522007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 7153
fe6b695a 7154 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 7155 ability.
7156 * Makefile.in: Add autoconf package transformation code.
7157 * util/i386/pc/grub-install.in: Likewise.
7158 * util/powerpc/ieee1275/grub-install.in: Likewise.
7159
6795c4e1 71602007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7161
7162 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7163 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7164 (EXT2_REVISION): Likewise.
7165 (EXT2_INODE_SIZE): Likewise.
7166 (struct grub_ext2_block_group): Added a missing member
7167 "used_dirs".
7168 (grub_ext2_read_inode): Divide by the inode size in a superblock
7169 instead of 128 to obtain INODES_PER_BLOCK.
7170 Use the macro EXT2_INODE_SIZE instead of directly using
7171 SBLOCK->INODE_SIZE.
7172
d70af616 71732007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7174
7175 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7176 superblock instead of the structure size to compute an
7177 offset. This fixes the problem that GRUB could not read a
7178 filesystem when inode size is different from 128-byte.
7179
3b801603 71802007-03-05 Marco Gerards <marco@gnu.org>
7181
7182 * normal/main.c (read_config_file): When "menu" is not set, create
7183 an initial context.
7184
4785bfe4 71852007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7186
7187 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7188 (HEAP_LIMIT): New macro.
7189 (grub_claim_heap): Claim memory up to `heaplimit'.
7190
a0cbb023 71912007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7192
7193 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7194 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7195 (_start): Likewise.
7196 (grub_arch_modules_addr): Return address after `_end'.
7197 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7198 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7199 (add_segments): Calculate `_end' from phdr size and location.
7200 (ALIGN_UP): Moved to ...
7201 * include/grub/misc.h: here.
7202 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7203 New macro.
7204 (GRUB_IEEE1275_MODULE_BASE): Removed.
7205
fd7d8eba 72062007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7207
7208 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7209 loop boundary.
7210
9b09e6fc 72112007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7212
7213 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7214 All users updated.
7215 (grub_elf64_load_hook_t): Likewise.
7216 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7217 debug output.
7218
3ce27299 72192007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7220
7221 * kern/mm.c: Update copyright.
7222 (grub_mm_debug): Correct syntax error.
7223 (grub_mm_dump_free): New function.
7224 (grub_debug_free): Call `grub_free'.
7225 * include/grub/mm.h: Update copyright.
7226 (grub_mm_dump_free): Add declaration.
7227
077d5fee 72282007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7229
7230 * include/grub/ieee1275/ieee1275.h: Update copyright.
7231 * kern/powerpc/ieee1275/init.c: Likewise.
7232 * kern/powerpc/ieee1275/openfw.c: Likewise.
7233
7234 * loader/powerpc/ieee1275/linux.c: Likewise.
7235 * include/grub/elfload.h: Likewise.
7236 * kern/elf.c: Likewise.
7237 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7238 callers.
7239 (grub_elf64_load): Likewise.
7240 (grub_elf32_load_segment): Move to a nested function.
7241 (grub_elf64_load_segment): Likewise.
7242
dc946850 72432007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7244
7245 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7246 prototype.
7247 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7248 (grub_heap_len): Likewise.
7249 (HEAP_SIZE): New macro.
7250 (grub_claim_heap): New function.
7251 (grub_machine_init): Don't claim heap directly. Call
7252 `grub_claim_heap'.
7253 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7254 (grub_available_iterate): New function.
7255
baa2a121 72562007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7257
7258 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7259 * configure.ac: Use it for testing the HOST and TARGET compilers.
7260
4fe9862e 72612006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7262
7263 * Makefile.in (enable_grub_emu): New variable.
7264 * configure.ac (--enable-grub-emu): New option.
7265 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7266 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7267 * conf/i386-pc.rmk: Likewise.
7268 * conf/powerpc-ieee1275.rmk: Likewise.
7269 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7270
a8aa5762 72712006-12-12 Marco Gerards <marco@gnu.org>
7272
7273 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7274
7275 * kern/env.c (grub_env_unset): Don't free the member `value' when
7276 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7277 pointer.
7278
7279 * normal/main.c (current_menu): Removed.
7280 (free_menu): Unset the `menu' environment variable.
7281 (grub_normal_menu_addentry): Make use of the environment variable
7282 `menu', instead of using the global `current_menu'. Allocate
7283 memory for the sourcecode of this entry.
7284 (read_config_file): New argument `nested', changed all callers.
7285 Only in the case of a new context, initialize a new menu. Set the
7286 `menu' environment variable.
7287 (grub_normal_execute): Don't set and unset the environment
7288 variable `menu' here anymore. Only free the menu when leaving the
7289 context.
7290
7291 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7292 leak.
7293
957b3a3e 72942006-12-11 Marco Gerards <marco@gnu.org>
7295
7296 * normal/menu_entry.c (run): Fix off by one bug so the last line
7297 is executed. Move the loader check to outside the loop.
7298
ef875714 72992006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7300
7301 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7302
4e739985 73032006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7304
7305 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7306 the number of sectors. Reported by Andrey Shuvikov
7307 <mr_hyro@yahoo.com>.
f19dbdb7 7308
790707f2 73092006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7310
7311 * kern/disk.c (grub_disk_read): When there is a read error, always
7312 try to read only the necessary data.
f19dbdb7 7313
790707f2 7314 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7315 disk/raid.c.
7316 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7317 prototype.
7318 [GRUB_UTIL] (grub_raid_fini): Likewise.
7319 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 7320 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 7321 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
7322 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
7323 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7324 and grub_raid_fini().
f19dbdb7 7325
03e58196 73262006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7327
7328 * include/grub/types.h (__unused): Rename to UNUSED.
7329 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7330 (grub_elf64_size): Likewise.
f19dbdb7 7331
ae4f23bf 73322006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7333
7334 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7335 grub_error_push and grub_error_pop in the error-handling path.
7336 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7337 length.
7338
2166cc83 73392006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7340
7341 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7342 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7343 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7344 (kernel_elf_SOURCES): Likewise.
7345 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7346 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7347 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7348 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7349 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7350 (elf_mod_SOURCES): New variable.
7351 (elf_mod_CFLAGS): Likewise.
7352 (elf_mod_LDFLAGS): Likewise.
7353 * include/grub/types.h (__unused): New macro.
7354 * include/grub/elfload.h: New file.
7355 * kern/elf.c: Likewise.
7356 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7357 (ELF32_LOADMASK): New macro.
7358 (ELF64_LOADMASK): Likewise.
7359 (vmlinux): Removed.
7360 (grub_linux_load32): New function.
7361 (grub_linux_load64): Likewise.
7362 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7363 Use grub_elf_t instead of grub_file_t.
7364
a09d5aa5 73652006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7366
7367 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7368 `catch_result' to struct set_color_args.
7369
d976fc51 73702006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7371
7372 * normal/menu.c: Include grub/script.h.
7373 * normal/menu_entry.c: Likewise.
7374 * include/grub/normal.h: Do not include grub/script.h.
7375
67507549 73762006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7377
7378 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7379
69203a99 73802006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7381
7382 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7383 disk.
7384 (grub_disk_close): Print debug messages when closing a disk.
7385 (grub_disk_read): Print debug messages when disk read fails.
7386 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7387 filesystem type.
7388 * kern/partition.c: Include misc.h.
7389 (grub_partition_iterate): Print debug messages when detecting
7390 partition type.
7391
e2b8278c 73922006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7393
7394 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7395 is negative.
7396 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7397
97b2f2ff 73982006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7399
7400 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7401 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7402
6555d655 74032006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7404
7405 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7406 instead of sizeof(lv). Patch by Michael Guntsche.
7407
4d42b77f 74082006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7409
7410 * disk/lvm.c: Rename VGS to VG_LIST.
7411 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7412 (grub_lvm_open): Likewise.
7413 Thanks to Michael Guntsche for finding this bug.
7414
5d74d927 74152006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7416
7417 * configure.ac (AC_INIT): Bumped to 1.95.
7418
a1bb27e4 74192006-10-14 Robert Millan <rmh@aybabtu.com>
7420
7421 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7422 with "/dev/.static/dev/md".
7423
e0994b8b 74242006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7425
7426 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7427 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7428 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7429 DRIVE_NAME are always freed.
7430
7431 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7432 DOS_PART, as a DOS partition is counted from one instead of zero
7433 now. Reported by Robert Millan.
7434
ddd5cee9 74352006-10-14 Robert Millan <rmh@aybabtu.com>
7436
7437 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7438 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7439 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7440 string returned by grub_guess_root_device.
7441 * util/i386/pc/grub-setup.c: Likewise.
7442 * util/i386/pc/grub-probefs.c: Likewise.
7443
7444 * util/i386/pc/grub-probefs.c: Rename to ...
7445 * util/i386/pc/grub-probe.c: ... this.
7446 * DISTLIST: Remove grub-probefs, add grub-probe.
7447 * conf/i386-efi.rmk: Likewise.
7448 * conf/i386-pc.rmk: Likewise.
7449 * util/i386/pc/grub-install.in: Likewise.
7450
7451 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7452 choose which information we want to print.
7453
2b002173 74542006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7455
7456 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7457 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7458 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7459 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7460 video/readers/tga.c and video/i386/pc/vbeutil.c.
7461
74622006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7463
7464 Added support for RAID and LVM.
f19dbdb7 7465
2b002173 7466 * disk/lvm.c: New file.
7467 * disk/raid.c: Likewise.
7468 * include/grub/lvm.h: Likewise.
f19dbdb7 7469 * include/grub/raid.h: Likewise.
2b002173 7470 * include/grub/util/lvm.h: Likewise.
7471 * include/grub/util/raid.h: Likewise.
7472 * util/lvm.c: Likewise.
7473 * util/raid.c: Likewise.
7474
7475 * include/grub/disk.h (grub_disk_dev_id): Add
7476 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7477 (grub_disk_get_size): New prototype.
7478 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7479 returns a partition.
7480 (grub_disk_get_size): New function.
f19dbdb7 7481
2b002173 7482 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7483 verbatim if grub_install_dos_part is -2.
7484
7485 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7486 and LVM devices.
7487
7488 * util/i386/pc/grub-setup.c (setup): New argument
7489 MUST_EMBED. Force embedding of GRUB when the argument is
7490 true. Close FILE before returning.
7491 (main): Add support for RAID and LVM.
f19dbdb7 7492
2b002173 7493 * conf/common.rmk: Add RAID and LVM modules.
7494 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7495 util/lvm.c.
7496 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7497
7498 * kern/misc.c (grub_strstr): New function.
7499 * include/grub/misc.h (grub_strstr): New prototype.
7500
050548d0 75012006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7502
7503 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7504
da849d2d 75052006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7506
7507 * kern/misc.c (grub_strtoull): Guess the base only if not
7508 specified.
7509
97b2f2ff 75102006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 7511
7512 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7513 PowerMac support.
7514
97b2f2ff 75152006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 7516
7517 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7518
7519 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7520 Remove `flags' argument. All callers changed.
7521 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7522 (IEEE1275_IHANDLE_INVALID): New variable.
7523 (IEEE1275_CELL_INVALID): New variable.
7524 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7525 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7526 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7527 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7528 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7529 codes from Open Firmware. All callers updated.
7530 (grub_ieee1275_next_property): Directly return Open Firmware return
7531 code.
7532 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7533 Standardize error checking from `grub_ieee1275_get_property'.
7534 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7535 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7536
97b2f2ff 75372006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 7538
7539 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7540 `instance_to_package_args' to `instance_to_path_args'.
7541
7542 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7543 `grub_ieee1275_chosen'.
7544
7545 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7546 `grub_ieee1275_interpret'.
7547
97b2f2ff 75482006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 7549
7550 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7551
97b2f2ff 75522006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 7553
7554 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7555 (__cmpdi): Likewise.
7556
7557 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7558 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7559 `grub_ssize_t'.
7560
02bb8acc 7561 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 7562
7563 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7564 to type `grub_ssize_t'.
7565 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7566
7f9a8531 75672006-09-22 Marco Gerards <marco@gnu.org>
7568
7569 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7570 newlines.
7571
b5ef1102 75722006-09-22 Marco Gerards <marco@gnu.org>
7573
7574 * commands/echo.c: New file.
7575
7576 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7577
7578 * conf/common.rmk (echo_mod_SOURCES): New variable.
7579 (echo_mod_CFLAGS): Likewise.
7580 (echo_mod_LDFLAGS): Likewise.
7581
2cff3677 75822006-09-22 Marco Gerards <marco@gnu.org>
7583
7584 * normal/main.c (get_line): Malloc memory instead of using
7585 preallocated memory. Removed the arguments `cmdline' and
7586 `max_len'. Updated all callers.
7587
6ba4688b 75882006-09-22 Marco Gerards <marco@gnu.org>
7589
7590 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7591 (normal_mod_DEPENDENCIES): Likewise.
7592
7593 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7594 (normal_mod_DEPENDENCIES): Likewise.
7595
7596 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7597
e02ac02c 75982006-09-22 Johan Rydberg <jrydberg@gnu.org>
7599
7600 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7601 programs.
7602 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7603 (normal_mod_DEPENDENCIES): Likewise.
7604 * conf/i386-pc.mk: Regenerate.
7605 * conf/i386-efi.mk: Likewise
7606 * conf/common.mk: Likewise.
7607 * conf/powerpc-ieee1275.mk: Likewise.
7608 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 7609
8d252e44 76102006-09-22 Robert Millan <rmh@aybabtu.com>
7611
7612 Sync with i386 version.
7613 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7614 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7615
209bf7ac 76162006-09-21 Robert Millan <rmh@aybabtu.com>
7617
7618 Import from GRUB Legacy (lib/device.c):
7619 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7620 (init_device_map) [__linux__]: Add support for I2O devices.
7621
6b146090 76222006-09-14 Marco Gerards <marco@gnu.org>
7623
7624 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7625 `-melf_i386'.
7626
e38600a8 76272006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 7628
7629 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7630 /boot/grub/*.lst.
78fa1790 7631
2952da5d 7632 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 7633
2952da5d 7634 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7635 before adding it to device.map.
7636
01b82a64 76372006-08-15 Johan Rydberg <jrydberg@gnu.org>
7638
fe6b695a 7639 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 7640 compiles a file; using the -MD option.
7641 * conf/common.mk: Regenerate.
7642 * conf/i386-pc.mk: Likewise.
7643 * conf/i386-efi.mk: Likewise.
7644 * conf/powerpc-ieee1275.mk: Likewise.
7645 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 7646
1064790d 76472006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7648
7649 Move the prototypes of grub_setjmp and grub_longjmp to
7650 cpu/setjmp.h, so that each architecture may specify different
7651 attributes.
f19dbdb7 7652
1064790d 7653 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7654 (grub_longjmp): Likewise.
7655 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7656 (grub_longjmp): Likewise.
7657 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7658 (grub_longjmp): Likewise.
7659
7660 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7661 [!GRUB_UTIL] (grub_longjmp): Removed.
7662
29dda3ed 76632006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7664
7665 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7666 "color!" method does not return any value.
7667
ad2a06ed 76682006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7669
7670 * include/grub/bitmap.h: New file.
7671
7672 * include/grub/i386/pc/vbeutil.h: Likewise.
7673
7674 * video/bitmap.c: Likewise.
7675
7676 * video/readers/tga.c: Likewise.
7677
7678 * video/i386/pc/vbeutil.c: Likewise.
7679
7680 * commands/videotest.c: Code cleanup and updated to reflect to new
7681 video API.
7682
7683 * term/gfxterm.c: Likewise.
7684
7685 * video/video.c: Likewise.
7686
7687 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7688 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7689 (bitmap_mod_SOURCES): New entry.
7690 (bitmap_mod_CFLAGS): Likewise.
7691 (bitmap_mod_LDFLAGS): Likewise.
7692 (tga_mod_SOURCES): Likewise.
7693 (tga_mod_CFLAGS): Likewise.
7694 (tga_mod_LDFLAGS): Likewise.
7695
7696 * include/grub/video.h (grub_video_blit_operators): New enum type.
7697 (grub_video_render_target): Changed as forward declaration and moved
7698 actual definition to be video driver specific.
7699 (grub_video_adapter.blit_bitmap): Added blitting operator.
7700 (grub_video_adapter.blit_render_target): Likewise.
7701 (grub_video_blit_bitmap): Likewise.
7702 (grub_video_blit_render_target): Likewise.
7703
7704 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7705 driver specific render target definition.
7706 (grub_video_vbe_map_rgba): Added driver internal helper.
7707 (grub_video_vbe_unmap_color): Updated to use
7708 grub_video_i386_vbeblit_info.
7709 (grub_video_vbe_get_video_ptr): Likewise.
7710
7711 * include/grub/i386/pc/vbeblit.h
7712 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7713 grub_video_i386_vbeblit_info.
7714 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7715 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7716 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7717 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7718 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7719 (grub_video_i386_vbeblit_index_index): Likewise.
7720 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7721 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7722 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7723 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7724 operator.
7725 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7726 operator.
7727
7728 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7729 include/grub/i386/pc/vbeblit.h.
7730
7731 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7732 Updated to use grub_video_i386_vbeblit_info.
7733 (grub_video_i386_vbefill_R8G8B8): Likewise.
7734 (grub_video_i386_vbefill_index): Likewise.
7735 (grub_video_i386_vbefill): Added generic filler.
7736
7737 * video/i386/pc/vbefill.c: Updated to reflect changes on
7738 include/grub/i386/pc/vbefill.h.
7739
7740 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7741 grub_video_i386_vbeblit_info.
7742 (grub_video_vbe_unmap_color): Likewise.
7743 (grub_video_vbe_blit_glyph): Likewise.
7744 (grub_video_vbe_scroll): Likewise.
7745 (grub_video_vbe_draw_pixel): Removed function.
7746 (grub_video_vbe_get_pixel): Likewise.
7747 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7748 updated code to use it.
7749 (common_blitter): Added common blitter for render target and bitmap.
7750 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7751 (grub_video_vbe_blit_render_target): Likewise.
7752
bc8c036d 77532006-07-30 Johan Rydberg <jrydberg@gnu.org>
7754
7755 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7756 is in text mode if there is no console control protocol instance
7757 available.
7758
684a8eff 77592006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7760
7761 * include/grub/video.h: Code cleanup.
7762
7763 * include/grub/i386/pc/vbe.h: Likewise.
7764
7765 * video/i386/pc/vbe.c: Likewise.
7766
7767 * video/i386/pc/vbeblit.c: Likewise.
7768
7769 * video/i386/pc/vbefill.c: Likewise.
7770
7771 * video/video.c: Likewise. Also added more comments.
7772
5915059b 77732006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7774
7775 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7776 (struct grub_biosdisk_dap): Likewise.
7777
7778 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7779 linkage settings for all functions.
7780
90ce5d56 77812006-07-12 Marco Gerards <marco@gnu.org>
7782
7783 * configure.ac (--enable-mm-debug): Fix typo.
7784
7785 * genkernsyms.sh.in: Use proper quoting for `CC'.
7786
43e7f879 77872006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7788
7789 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7790 (normal_mod_ASFLAGS): Remove "-m32".
7791
4889bdec 77922006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7793
7794 * util/misc.c: Include config.h.
7795 [!HAVE_MEMALIGN]: Do not include malloc.h.
7796 (grub_memalign): Use posix_memalign, if present. Then, use
7797 memalign, if present. Otherwise, emit an error.
7798
7799 * util/grub-emu.c: Do not include malloc.h.
7800
7801 * include/grub/util/misc.h: Include unistd.h. This is required for
7802 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7803 D. Eades III <hde@foobar-qux.org>.
7804
7805 * configure.ac (AC_GNU_SOURCE): Added.
7806 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7807 type.
7808
fd39d4da 78092006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7810
7811 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7812 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7813
b786f3b5 78142006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7815
7816 * include/grub/types.h (grub_host_addr_t): Rename to
7817 grub_target_addr_t.
7818 (grub_host_off_t): Rename to grub_target_off_t.
7819 (grub_host_size_t): Rename to grub_target_size_t.
7820 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7821 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7822
7823 * include/grub/kernel.h (struct grub_module_header): Change type
7824 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7825 (grub_module_info): Likewise.
f19dbdb7 7826
051988bb 78272006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7828
7829 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7830 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7831 Velazquez <jesus.velazquez@gmail.com>.
7832
deae281b 78332006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7834
7835 Count partitions from 1 instead of 0 in the string representation
7836 of partitions. Still use 0-based internally.
f19dbdb7 7837
deae281b 7838 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7839 (sun_partition_map_iterate): Use grub_partition_t instead of
7840 struct grub_partition *. Cast DESC->START_CYLINDER to
7841 grub_uint64_t after converting the endian.
7842 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7843 (sun_partition_map_get_name): Add 1 to P->INDEX.
7844
7845 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7846 PCDATA->DOS_PART.
7847 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7848
7849 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7850 zero instead of one.
7851 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7852 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7853
7854 * partmap/apple.c (apple_partition_map_iterate): Change the type
7855 of POS to unsigned.
7856 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7857 (apple_partition_map_get_name): Add 1 into P->INDEX.
7858
7859 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7860 of POS to unsigned.
7861 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7862 calculate the offset of a partition.
7863 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7864 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7865
7866 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7867 SECTOR to grub_disk_addr_t.
7868 (acorn_partition_map_iterate): Likewise.
7869 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7870 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7871 top.
7872 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7873
7874 * kern/i386/pc/init.c (make_install_device): Add 1 into
7875 GRUB_INSTALL_DOS_PART.
7876
7877 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7878 conditional.
7879
524a1e6a 78802006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7881
7882 Clean up the code to support 64-bit addressing in disks and
7883 files. This change is not enough for filesystems yet.
f19dbdb7 7884
524a1e6a 7885 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7886 type of "start" to grub_uint64_t.
7887 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7888 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7889 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7890 convert addresses.
7891
7892 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7893 to grub_disk_addr_t.
7894
7895 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7896 string.
7897
7898 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7899
7900 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7901 to char *.
7902
7903 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7904
7905 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7906
7907 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7908
7909 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7910 to grub_off_t, to detect an error from grub_file_seek.
7911 (grub_multiboot_load_elf32): Likewise.
7912
7913 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7914 maximum unsigned long value when an overflow is detected.
7915 (grub_strtoull): New function.
7916 (grub_divmod64): Likewise.
7917 (grub_lltoa): use grub_divmod64.
7918
7919 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7920 grub_disk_addr_t.
7921 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7922 the pointer to next character. Use grub_strtoull instead of
7923 grub_strtoul.
7924 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7925 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7926 respectively.
7927
fe6b695a 7928 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 7929 return value is signed.
7930 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7931 test if OFFSET is less than zero, as OFFSET is unsigned now.
7932
7933 * kern/disk.c (struct grub_disk_cache): Change the type of
7934 "sector" to grub_disk_addr_t.
7935 (grub_disk_cache_get_index): Change the type of SECTOR to
7936 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7937 unsigned after shifting.
7938 (grub_disk_cache_invalidate): Change the type of SECTOR to
7939 grub_disk_addr_t.
7940 (grub_disk_cache_unlock): Likewise.
7941 (grub_disk_cache_store): Likewise.
7942 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7943 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7944 grub_disk_addr_t and grub_uint64_t, respectively.
7945 (grub_disk_read): 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 START_SECTOR, LEN and
7948 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7949 respectively.
7950 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7951 body, as the value of OFFSET is tweaked by
7952 grub_disk_check_range. Change the types of LEN and N to
7953 grub_size_t.
7954
7955 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7956 and "saved_offset" to grub_off_t.
7957 (test_header): Cast BUF to char *.
7958 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7959 to char *.
7960 (grub_gzio_read): Change the types of OFFSET and SIZE to
7961 grub_off_t and grub_size_t, respectively.
7962
7963 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7964 Removed.
7965 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7966 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7967 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7968 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7969 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7970
7971 * include/grub/types.h (grub_off_t): Unconditionally set to
7972 grub_uint64_t.
7973 (grub_disk_addr_t): Changed to grub_uint64_t.
7974
7975 * include/grub/partition.h (struct grub_partition): Change the
7976 types of "start", "len" and "offset" to grub_disk_addr_t,
7977 grub_uint64_t and grub_disk_addr_t, respectively.
7978 (grub_partition_get_start): Return grub_disk_addr_t.
7979 (grub_partition_get_len): Return grub_uint64_t.
7980
7981 * include/grub/misc.h (grub_strtoull): New prototype.
7982 (grub_divmod64): Likewise.
7983
7984 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7985 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7986 grub_off_t, respectively.
7987 All callers and references changed.
7988
7989 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7990 grub_size_t in "read".
7991 All callers and references changed.
7992
7993 * include/grub/file.h (struct grub_file): Change the types of
7994 "offset" and "size" to grub_off_t and grub_off_t,
7995 respectively. Change the type of SECTOR to grub_disk_addr_t in
7996 "read_hook".
7997 (grub_file_read): Change the type of LEN to grub_size_t.
7998 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7999 grub_off_t.
8000 (grub_file_size): Return grub_off_t.
8001 (grub_file_tell): Likewise.
8002 All callers and references changed.
8003
8004 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8005 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8006 "write".
8007 (struct grub_disk): Change the type of "total_sectors" to
8008 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 8009 "read_hook".
524a1e6a 8010 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8011 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8012 (grub_disk_write): Likewise.
8013 All callers and references changed.
8014
8015 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8016 char * for grub_strncmp to silence gcc.
8017 (grub_iso9660_mount): Likewise.
8018 (grub_iso9660_mount): Likewise.
8019 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8020 return statement.
8021 (grub_iso9660_iterate_dir): Likewise.
8022 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8023
8024 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8025 LEN to grub_disk_addr_t and grub_size_t, respectively.
8026
8027 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8028
8029 * fs/jfs.c (grub_jfs_read_file): Likewise.
8030
8031 * fs/minix.c (grub_jfs_read_file): Likewise.
8032
8033 * fs/sfs.c (grub_jfs_read_file): Likewise.
8034
8035 * fs/ufs.c (grub_jfs_read_file): Likewise.
8036
8037 * fs/xfs.c (grub_jfs_read_file): Likewise.
8038
8039 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8040 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8041 respectively.
8042
8043 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8044 BLKNR to -1 instead of returning GRUB_ERRNO.
8045 (grub_ext2_read_file): Change the types of SECTOR and
8046 LEN to grub_disk_addr_t and grub_size_t, respectively.
8047
8048 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8049 LEN to grub_disk_addr_t and grub_size_t, respectively.
8050
8051 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8052 grub_file_read.
8053
8054 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8055 string. Do not cast SECTOR explicitly.
8056
8057 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8058 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8059 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8060 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8061 over 2TB and LBA mode is not supported, raise an error.
8062 (get_safe_sectors): New function.
8063 (grub_biosdisk_read): Use get_safe_sectors.
8064 (grub_biosdisk_write): Likewise.
8065
8066 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8067 (grub_efidisk_write): Likewise.
8068
8069 * disk/loopback.c (delete_loopback): Cosmetic changes.
8070 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8071 correctly.
8072 (grub_loopback_open): Likewise.
8073 (grub_loopback_read): Likewise. Also, change the type of POS to
8074 grub_off_t, and fix the usage of grub_memset.
8075
8076 * commands/i386/pc/play.c: Include grub/machine/time.h.
8077
8078 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8079 print FILE->SIZE.
8080
8081 * commands/configfile.c: Include grub/env.h.
8082
8083 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8084 GRUB_ERRNO directly instead. Change the type of POS to
8085 grub_off_t. Follow the coding standard.
8086
8087 * commands/blocklist.c: Include grub/partition.h.
8088 (grub_cmd_blocklist): Return an error if the underlying device is
8089 not a disk. Take the starting sector of a partition into account,
8090 if a partition is used.
8091
8092 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8093 a length field.
8094 (lba_mode): Support 64-bit addresses.
8095 (chs_mode): Likewise.
8096 (copy_buffer): Adapted to the new offsets of a length field and a
8097 segment field.
8098 (blocklist_default_start): Allocate 64-bit space.
8099
8100 * boot/i386/pc/boot.S (force_lba): Removed.
8101 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 8102 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 8103 space.
8104 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8105 is useless.
8106 (lba_mode): Refactored to support a 64-bit address. More size
8107 optimization.
8108 (setup_sectors): Likewise.
8109
53af98ad 81102006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8111
8112 * DISTLIST: Added include/grub/i386/linux.h. Removed
8113 include/grub/i386/pc/linux.h
8114
8115 * configure.ac (AC_INIT): Bumped to 1.94.
8116
8117 * config.guess: Updated from gnulib.
8118 * config.sub: Likewise.
8119 * install-sh: Likewise.
8120 * mkinstalldirs: Likewise.
8121
b4c1940a 81222006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8123
8124 * conf/common.rmk (grub_modules_init.lst): Depended on
8125 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8126 MODSRCFILES.
8127
8128 * genmk.rb (PModule::rule): Reverted the previous change.
8129
cfca1cfd 81302006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8131
8132 * conf/common.rmk (grub_modules_init.lst): Depends on
8133 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8134 that the target does not exist before producing.
8135 (grub_modules_init.h): Remove the target before generating.
8136 (grub_emu_init.c): Likewise.
8137
8138 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8139
aa6d7826 81402006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8141
8142 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8143 for the target-specific tests. Make sure that we also have the
8144 up-to-date target variables for those tests.
8145
26c607b9 81462006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8147
8148 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8149 (PModule::rule): Likewise.
8150
0162321a 81512006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8152
8153 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8154 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8155 target-specific flags should be prefixed.
8156 (PModule::rule): Likewise.
8157
6c826348 81582006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8159
8160 * configure.ac (CMP): Check if cmp is available explicitly.
8161
b977bf01 81622006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8163
8164 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8165 (target_cpu): New variable.
8166 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 8167
b977bf01 8168 * util/i386/pc/grub-install.in (host_cpu): Removed.
8169 (target_cpu): New variable.
8170 (pkglibdir): Use target_cpu instead of host_cpu.
8171
8172 * util/genmoddep.c: Removed.
f19dbdb7 8173
b977bf01 8174 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8175 instead of GRUB_HOST_SIZEOF_VOID_P.
8176 * kern/dl.c: Likewise.
8177
8178 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8179 ...
8180 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8181 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8182 (GRUB_TARGET_SIZEOF_LONG): ... this.
8183 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8184 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8185 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8186 to ...
8187 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8188 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8189 (GRUB_TARGET_SIZEOF_LONG): ... this.
8190 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8191 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8192 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8193 to ...
8194 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8195 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8196 (GRUB_TARGET_SIZEOF_LONG): ... this.
8197 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8198 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8199
8200 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8201 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8202 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8203 instead of GRUB_HOST_SIZEOF_LONG.
8204 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8205 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8206 GRUB_CPU_WORDS_BIGENDIAN.
8207 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8208 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8209 grub_host_ssize_t.
8210
8211 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8212 (genmoddep_SOURCES): Likewise.
8213 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8214 (genmoddep_SOURCES): Likewise.
8215 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8216 (genmoddep_SOURCES): Likewise.
8217 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8218 Likewise.
8219 (genmoddep_SOURCES): Likewise.
8220
8221 * genmoddep.awk: New file.
8222
8223 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8224 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8225 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8226 (PModule::rule): Likewise.
8227 (Program::rule): Likewise.
8228 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8229 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8230 respectively.
8231
8232 * configure.ac: Rewritten intensively to use host and target
8233 instead of build and host, respectively.
8234
8235 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8236 (host_cpu): Removed.
8237 (target_cpu): New variable.
8238 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8239 (BUILD_CC): Removed.
8240 (BUILD_CFLAGS): Likewise.
8241 (BUILD_CPPFLAGS): Likewise.
8242 (TARGET_CC): New variable.
8243 (TARGET_CFLAGS): Likewise.
8244 (TARGET_CPPFLAGS): Likewise.
8245 (TARGET_LDFLAGS): Likewise.
8246 (AWK): Likewise.
8247 (include): Use target_cpu instead of host_cpu.
8248 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 8249
b977bf01 8250 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8251
f09771a1 82522006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8253
8254 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8255 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8256 field 'false' to 'exec_on_false'.
8257 (grub_script_create_cmdif): Renamed argument names to reflect above
8258 changes.
8259
8260 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8261
8262 * normal/script.c (grub_script_create_cmdif): Likewise.
8263
118f4fb3 82642006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8265
8266 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8267 top.
8268 (grub_hfsplus_btree_recptr): Likewise.
8269 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8270 FILEBLOCK both to pass a block number and store next block
8271 number.
8272 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8273 overflow file correctly. Specify errors appropriately, because
8274 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8275 grub_hfsplus_btree_recptr to get the pointer to a found key.
8276 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8277 is found.
8278
8279 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8280 linux.mod.
8281 (_linux_mod_SOURCES): New variable.
8282 (_linux_mod_CFLAGS): Likewise.
8283 (_linux_mod_LDFLAGS): Likewise.
8284 (linux_mod_SOURCES): Likewise.
8285 (linux_mod_CFLAGS): Likewise.
8286 (linux_mod_LDFLAGS): Likewise.
8287
8288 * DISTLIST: Added loader/i386/efi/linux.c,
8289 loader/i386/efi/linux_normal.c and
8290 include/grub/i386/efi/loader.h.
8291
8292 * loader/i386/efi/linux.c: New file.
8293 * loader/i386/efi/linux_normal.c: Likewise.
8294 * include/grub/i386/efi/loader.h: Likewise.
8295
89a7d726 82962006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8297
8298 * commands/blocklist.c: New file.
8299
8300 * DISTLIST: Added commands/blocklist.c.
8301
8302 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 8303 color for the background, and a darker color for the foreground.
89a7d726 8304 (grub_console_checkkey): Return READ_KEY.
8305 (grub_console_cls): Set the background to
8306 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8307
8308 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8309
8310 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8311 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8312
8313 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8314 prototype.
8315
8316 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8317 BG. The spec is wrong again.
8318
8319 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8320 prototype.
8321 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
8322
8323 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8324 commands/blocklist.c.
8325 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 8326
89a7d726 8327 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8328 (blocklist_mod_SOURCES): New variable.
8329 (blocklist_mod_CFLAGS): Likewise.
8330 (blocklist_mod_LDFLAGS): Likewise.
8331
75c8f258 83322006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8333
8334 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8335 duplication.
8336 (lba_mode): Use %eax more intensively to reduce the code size.
8337
da2eb181 83382006-05-20 Marco Gerards <marco@gnu.org>
8339
8340 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8341
8342 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8343 for `menuentry'.
8344 (script): Accept leading newlines.
8345 (newlines): New rule to describe 0 or more newlines.
8346 (commands): Accept `command' with trailing newline. Fixed the
8347 order in which arguments were passed to `grub_script_add_cmd'.
8348 Accept commands separated by newlines.
8349 (function): Changed to accept newlines.
8350 (menuentry) Rewritten.
8351
8352 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8353 front of the list, instead of to the end.
8354
577b4050 83552006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8356
8357 * util/i386/pc/grub-install.in (bindir): New variable.
8358 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8359 Shaver <lbgwjl@gmail.com>.
8360
0d6e1189 83612006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8362
8363 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8364 grub/machine/linux.h
8365 * loader/i386/pc/linux.c: Likewise.
8366
8367 * include/grub/i386/pc/linux.h: Moved to ...
8368 * include/grub/i386/linux.h: ... here.
8369
8370 * include/grub/i386/linux.h (struct linux_kernel_params): New
8371 struct.
f19dbdb7 8372
31b86e9f 83732006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8374
8375 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8376 checking.
8377 (grub_video_vbe_blit_glyph): Likewise.
8378 (grub_video_vbe_blit_bitmap): Likewise.
8379 (grub_video_vbe_blit_render_target): Likewise.
8380
83b984de 83812006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8382
8383 * configure.ac (--with-platform): Properly quote the square
8384 brackets.
8385
5f0413bd 83862006-05-08 Marco Gerards <marco@gnu.org>
8387
8388 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8389 this...
8390 (kernel_elf_HEADERS): ...to this. Updated all users.
8391 (grubof_symlist.c): Renamed from this...
8392 (kernel_elf_symlist.c): ...to this. Updated all users.
8393 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8394 (grubof_SOURCES): Renamed from this...
8395 (kernel_elf_SOURCES): ...to this.
8396 (grubof_HEADERS): Renamed from this...
8397 (kernel_elf_HEADERS): ...to this.
8398 (grubof_CFLAGS): Renamed from this...
8399 (kernel_elf_CFLAGS): ...to this.
8400 (grubof_ASFLAGS): Renamed from this...
8401 (kernel_elf_ASFLAGS): ...to this.
8402 (grubof_LDFLAGS): Renamed from this...
8403 (kernel_elf_LDFLAGS): ...to this.
8404
8405 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8406 this...
8407 (kernel_elf_HEADERS): ...to this. Updated all users.
8408 (grubof_symlist.c): Renamed from this...
8409 (kernel_elf_symlist.c): ...to this. Updated all users.
8410 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8411 (grubof_SOURCES): Renamed from this...
8412 (kernel_elf_SOURCES): ...to this.
8413 (grubof_HEADERS): Renamed from this...
8414 (kernel_elf_HEADERS): ...to this.
8415 (grubof_CFLAGS): Renamed from this...
8416 (kernel_elf_CFLAGS): ...to this.
8417 (grubof_ASFLAGS): Renamed from this...
8418 (kernel_elf_ASFLAGS): ...to this.
8419 (grubof_LDFLAGS): Renamed from this...
8420 (kernel_elf_LDFLAGS): ...to this.
8421
8422 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8423 `kernel.elf' instead of `grubof'.
8424
05568c2e 84252006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8426
8427 Add --with-platform to configure. Use pkglibdir instead of
8428 pkgdatadir. This is reported by Roger Leigh.
8429
8430 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8431 (host_vendor): Likewise.
8432 (host_os): Likewise.
8433 (pkgdatadir): Likewise.
8434 (platform): New variable.
8435 (pkglibdir): Likewise.
8436 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 8437
05568c2e 8438 * util/i386/pc/grub-install.in (datadir): Removed.
8439 (host_vendor): Likewise.
8440 (host_os): Likewise.
8441 (pkgdatadir): Likewise.
8442 (platform): New variable.
8443 (pkglibdir): Likewise.
8444 Use PKGLIBDIR instead of PKGDATADIR.
8445
8446 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8447 instead of GRUB_DATADIR.
8448 (main): Likewise.
8449 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8450 (main): Likewise.
8451 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8452 (main): Likewise.
8453
8454 * configure.ac (--with-platform): New option.
8455 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8456
8457 * Makefile.in: Include a makefile based on PLATFORM instead of
8458 HOST_VENDOR.
8459 (pkgdatadir): Not appended by the machine type.
8460 (pkglibdir): Appended by the machine type.
8461 (host_vendor): Removed.
8462 (platform): New variable.
8463 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8464 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8465 (uninstall): Likewise.
8466
4e93851c 84672006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8468
8469 Use the environment context in the menu. Remove the commands
8470 "default" and "timeout", and use variables instead.
f19dbdb7 8471
4e93851c 8472 * normal/menu.c: Include grub/env.h.
8473 (print_entry): Cast TITLE to silence gcc.
8474 (get_timeout): New function.
8475 (set_timeout): Likewise.
8476 (get_entry_number): Likewise.
8477 (run_menu): Use a default entry, a fallback entry and a timeout
8478 in the environment variables "default", "fallback" and
8479 "timeout". Also, tweak the default entry if it is not within the
8480 current menu entries.
8481 (grub_menu_run): Use a fallback entry in the environment variable
8482 "fallback".
8483
8484 * normal/main.c (read_config_file): Do not initialize
8485 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8486 NEWMENU->TIMEOUT.
8487 (grub_normal_execute): Use a data slot to store the menu.
8488
8489 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8490 fallback_entry and timeout.
8491 (struct grub_menu_list): Removed.
8492 (grub_menu_list_t): Likewise.
8493 (struct grub_context): Likewise.
8494 (grub_context_t): Likewise.
8495 (grub_context_get): Likewise.
8496 (grub_context_get_current_menu): Likewise.
8497 (grub_context_push_menu): Likewise.
8498 (grub_context_pop_menu): Likewise.
8499 (grub_default_init): Likewise.
8500 (grub_default_fini): Likewise.
8501 (grub_timeout_init): Likewise.
8502 (grub_timeout_fini): Likewise.
8503
8504 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8505 and timeout.mod.
8506 (normal_mod_SOURCES): Removed normal/context.c.
8507
8508 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8509 commands/default.c, commands/timeout.c and normal/context.c.
8510 (normal_mod_SOURCES): Removed normal/context.c.
8511
8512 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8513 commands/timeout.c and normal/context.c.
8514 (normal_mod_SOURCES): Removed normal/context.c.
8515
8516 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8517 commands/default.c, commands/timeout.c and normal/context.c.
8518 (normal_mod_SOURCES): Removed normal/context.c.
8519
8520 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8521 timeout.mod.
8522 (default_mod_SOURCES): Removed.
8523 (default_mod_CFLAGS): Likewise.
8524 (default_mod_LDFLAGS): Likewise.
8525 (timeout_mod_SOURCES): Removed.
8526 (timeout_mod_CFLAGS): Likewise.
8527 (timeout_mod_LDFLAGS): Likewise.
8528
8529 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8530 normal/context.c.
8531
8532 * commands/default.c: Removed.
8533 * commands/timeout.c: Likewise.
8534 * normal/context.c: Likewise.
8535
1eb9cc1d 85362006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8537
8538 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8539
385bd9c1 85402006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8541
8542 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8543 "next" to "prev" for readability.
8544 (struct grub_env_sorted_var): New struct.
8545 (grub_env_context): Renamed to ...
8546 (initial_context): ... this.
8547 (grub_env_var_context): Renamed to ...
8548 (current_context): ... this.
8549 (grub_env_find): Look only at CURRENT_CONTEXT.
8550 (grub_env_context_open): Rewritten to copy exported variables from
8551 previous context.
8552 (grub_env_context_close): Rewritten according to the new
8553 scheme. Also, add an assertion to prevent the initial context from
8554 removed.
8555 (grub_env_insert): Removed the code for the sorted list.
8556 (grub_env_remove): Likewise.
8557 (grub_env_export): Simply mark the variable with
8558 GRUB_ENV_VAR_GLOBAL.
8559 (grub_env_set): A cosmetic change for naming consistency.
8560 (grub_env_get): Likewise.
8561 (grub_env_unset): Likewise.
8562 (grub_env_iterate): Rewritten to sort variables within this
8563 function.
8564 (grub_register_variable_hook): Fixed for naming consistency. Call
8565 grub_env_find again, only if NAME is not found at the first time.
8566 (mangle_data_slot_name): New function.
8567 (grub_env_set_data_slot): Likewise.
8568 (grub_env_get_data_slot): Likewise.
8569 (grub_env_unset_data_slot): Likewise.
8570
8571 * include/grub/env.h (grub_env_var_type): New enum.
8572 (GRUB_ENV_VAR_LOCAL): New constant.
8573 (GRUB_ENV_VAR_GLOBAL): Likewise.
8574 (GRUB_ENV_VAR_DATA): Likewise.
8575 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8576 "type".
8577 (grub_env_set): Replace VAR with NAME for consistency.
8578 (grub_register_variable_hook): Likewise.
8579 (grub_env_export): Specify the name of the argument.
8580 (grub_env_set_data_slot): New prototype.
8581 (grub_env_get_data_slot): Likewise.
8582 (grub_env_unset_data_slot): Likewise.
8583
7f362539 85842006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8585
8586 Extend the loader so that GRUB can accept a loader which comes
8587 back to GRUB when a loaded image exits. Also, this change adds
8588 support for a chainloader on EFI.
f19dbdb7 8589
7f362539 8590 * term/efi/console.c: Include grub/misc.h.
8591 (grub_console_checkkey): Display a scan code on the top for
8592 debugging. This will be removed once the EFI port gets stable.
8593 Correct the scan code mapping.
8594
8595 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8596 allocate memory from larger regions, in order to reduce the number
8597 of allocated regions. Otherwise, the MacOSX loader panics.
8598 (filter_memory_map): Avoid less than 1MB for compatibility with
8599 other loaders.
8600 (add_memory_regions): Allocate from the tail of a region, if
8601 possible, to avoid allocating a region near to 1MB, for the MacOSX
8602 loader.
8603
8604 * kern/efi/init.c (grub_efi_set_prefix): Specify
8605 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8606
8607 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8608 argument IMAGE_HANDLE and specify it to get a loaded image.
8609 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8610 grub_efi_get_loaded_image.
fe6b695a 8611 (grub_efi_get_filename): Divide the length by the size of
7f362539 8612 grub_efi_char16_t.
8613 (grub_efi_get_device_path): New function.
8614 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8615 the length by the size of grub_efi_char16_t for a file path device
8616 path node.
8617
8618 * kern/loader.c (grub_loader_noreturn): New variable.
8619 (grub_loader_set): Accept a new argument NORETURN. Set
8620 GRUB_LOADER_NORETURN to NORETURN.
8621 All callers changed.
8622 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8623 grub_machine_fini.
8624
8625 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8626 prototype.
8627 (grub_efi_get_loaded_image): Take an argument to specify an image
8628 handle.
8629
8630 * include/grub/loader.h (grub_loader_set): Added one more argument
8631 NORETURN.
8632
8633 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8634 instead of grub_efi_open_protocol.
8635 (grub_efidisk_get_device_name): Likewise.
8636 (grub_efidisk_close): Print a newline.
8637 (grub_efidisk_get_device_handle): Fixed to use
8638 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8639 GRUB_EFI_DEVICE_PATH_TYPE.
8640
8641 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8642 * kern/efi/efi.c (device_path_guid): ... here.
8643
8644 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8645 chain.mod.
8646 (kernel_mod_HEADERS): Added efi/disk.h.
8647 (_chain_mod_SOURCES): New variable.
8648 (_chain_mod_CFLAGS): Likewise.
8649 (_chain_mod_LDFLAGS): Likewise.
8650 (chain_mod_SOURCES): Likewise.
8651 (chain_mod_CFLAGS): Likewise.
8652 (chain_mod_LDFLAGS): Likewise.
8653
8654 * DISTLIST: Added include/grub/efi/chainloader.h,
8655 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8656
8657 * include/grub/efi/chainloader.h: New file.
8658 * loader/efi/chainloader.c: Likewise.
8659 * loader/efi/chainloader_normal.c: Likewise.
8660
c0111d6e 86612006-04-30 Marco Gerards <marco@gnu.org>
8662
8663 * commands/configfile.c (grub_cmd_source): New function.
8664 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8665 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8666
df5341da 86672006-04-30 Marco Gerards <marco@gnu.org>
8668
8669 * normal/execute.c (grub_script_execute_cmd): Change the return
8670 type to `grub_err_t'. Correctly return the error.
8671 (grub_script_execute_cmdline): In case a command line is not a
8672 command or a function, try to interpret it as an assignment.
8673
f85934bd 86742006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8675
8676 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8677 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8678 skip a node whose name is obviously invalid as UTF-16,
8679 i.e. contains a NUL character. Stop the iteration when the last
8680 directory entry is found. Instead of using the return value of
8681 grub_hfsplus_btree_iterate_node, store the value in RET and use
8682 it, because the iterator can be stopped by the last directory
8683 entry.
8684
8f8a2cf8 86852006-04-30 Marco Gerards <marco@gnu.org>
8686
8687 * include/grub/env.h (grub_env_export): New prototype. Reported
8688 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8689
a27e84ce 86902006-04-30 Marco Gerards <marco@gnu.org>
8691
8692 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8693 size of the extents in a catalog file record.
8694
eaef0553 86952006-04-29 Marco Gerards <marco@gnu.org>
8696
8697 * commands/configfile.c (grub_cmd_configfile): Execute the
8698 configfile within its own context.
8699
8700 * include/grub/env.h (grub_env_context_open): New prototype.
8701 (grub_env_context_close): Likewise.
8702
8703 * kern/env.c (grub_env): Removed.
8704 (grub_env_sorted): Likewise.
8705 (grub_env_context): New variable.
8706 (grub_env_var_context): Likewise.
8707 (grub_env_find): Search both the active context and the global
8708 context.
8709 (grub_env_context_open): New function.
8710 (grub_env_context_close): Likewise.
8711 (grub_env_insert): Likewise.
8712 (grub_env_remove): Likewise.
8713 (grub_env_export): Likewise.
8714 (grub_env_set): Changed to use helper functions to avoid code
8715 duplication.
8716 (grub_env_iterate): Rewritten so both the current context and the
8717 global context are being used.
8718
8719 * normal/command.c (export_command): New function.
8720 (grub_command_init): Register the `export' function.
8721
7b455f4d 87222006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8723
8724 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8725 explicitly to suppress gcc's warnings.
8726 * fs/fat.c (grub_fat_find_dir): Likewise.
8727 (grub_fat_label): Likewise.
8728 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8729 (grub_xfs_mount): Likewise.
8730 (grub_xfs_label): Likewise.
8731 * fs/affs.c (grub_affs_mount): Likewise.
8732 (grub_affs_label): Likewise.
8733 (grub_affs_iterate_dir): Likewise.
8734 * fs/sfs.c (grub_sfs_mount): Likewise.
8735 (grub_sfs_iterate_dir): Likewise.
8736 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8737 * fs/hfs.c (grub_hfs_mount): Likewise.
8738 (grub_hfs_cmp_catkeys): Likewise.
8739 (grub_hfs_find_dir): Likewise.
8740 (grub_hfs_dir): Likewise.
8741 (grub_hfs_label): Likewise.
8742 * fs/jfs.c (grub_jfs_mount): Likewise.
8743 (grub_jfs_opendir): Likewise.
8744 (grub_jfs_getent): Likewise.
8745 (grub_jfs_lookup_symlink): Likewise.
8746 (grub_jfs_label): Likewise.
8747 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8748 (grub_hfsplus_iterate_dir): Likewise.
8749 (grub_hfsplus_btree_iterate_node): Made static.
8750
8751 * util/grub-emu.c (prefix): New variable.
8752 (grub_machine_set_prefix): New function.
8753 (main): Do not set the environment variable "prefix" here. Only
8754 set PREFIX, which is used later by grub_machine_set_prefix.
8755
8756 * include/grub/video.h: Do not include grub/symbol.h.
8757 (grub_video_register): Not exported. This symbol is not defined in
8758 the kernel.
8759 (grub_video_unregister): Likewise.
8760 (grub_video_iterate): Likewise.
8761 (grub_video_setup): Likewise.
8762 (grub_video_restore): Likewise.
8763 (grub_video_get_info): Likewise.
8764 (grub_video_get_blit_format): Likewise.
8765 (grub_video_set_palette): Likewise.
8766 (grub_video_get_palette): Likewise.
8767 (grub_video_set_viewport): Likewise.
8768 (grub_video_get_viewport): Likewise.
8769 (grub_video_map_color): Likewise.
8770 (grub_video_map_rgb): Likewise.
8771 (grub_video_map_rgba): Likewise.
8772 (grub_video_fill_rect): Likewise.
8773 (grub_video_blit_glyph): Likewise.
8774 (grub_video_blit_bitmap): Likewise.
8775 (grub_video_blit_render_target): Likewise.
8776 (grub_video_scroll): Likewise.
8777 (grub_video_swap_buffers): Likewise.
8778 (grub_video_create_render_target): Likewise.
8779 (grub_video_delete_render_target): Likewise.
8780 (grub_video_set_active_render_target): Likewise.
8781
8782 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8783 Undefined.
8784 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8785
8786 * conf/sparc64-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/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8792 config.h. Use 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-pc.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 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8802 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8803 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8804 instead of $(srcdir)/genkernsyms.sh.
8805
8806 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8807 genkernsyms.sh.
8808
8809 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8810 genkernsyms.sh.
8811 (gensymlist.sh): New target.
8812 (genkernsyms.sh): Likewise.
8813
8814 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8815 genkernsyms.sh.in and gensymlist.sh.in.
8816
8817 * genkernsyms.sh: Removed.
8818 * gensymlist.sh: Likewise.
f19dbdb7 8819
7b455f4d 8820 * genkernsyms.sh.in: New file.
8821 * gensymlist.sh.in: Likewise.
8822
1885bb27 88232006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8824
8825 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8826 clobber "prefix", since we may have already set it manually.
8827
71538dff 88282006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8829
8830 * kern/misc.c (abort): New alias for grub_abort.
8831
2965c7cc 88322006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8833
8834 A new machine-specific function "grub_machine_set_prefix" is
8835 defined. This is called after loading modules, so that a prefix
8836 initialization can use modules. Also, this change adds an
8837 intensive debugging feature for the memory manager via the
8838 configure option "--enable-mm-debug".
f19dbdb7 8839
2965c7cc 8840 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8841 PART.LEN.
8842
8843 * kern/sparc64/ieee1275/init.c (abort): Removed.
8844 (grub_stop): Likewise.
8845 (grub_exit): New function.
8846 (grub_set_prefix): Renamed to ...
8847 (grub_machine_set_prefix): ... this.
8848 (grub_machine_init): Do not call grub_set_prefix.
8849
8850 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8851 (grub_machine_set_prefix): ... this.
8852 (grub_machine_init): Do not call grub_set_prefix.
8853
8854 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8855 (grub_machine_init): Do not set the prefix here.
8856
8857 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8858
8859 * kern/efi/init.c: Include grub/mm.h.
8860 (grub_efi_set_prefix): New function.
8861
8862 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8863 (grub_efi_get_filename): New function.
8864 (grub_print_device_path): Renamed to ...
8865 (grub_efi_print_device_path): ... this.
8866
8867 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8868 [MM_DEBUG] (grub_realloc): Likewise.
8869 [MM_DEBUG] (grub_free): Likewise.
8870 [MM_DEBUG] (grub_memalign): Likewise.
8871 [MM_DEBUG] (grub_mm_debug): New variable.
8872 [MM_DEBUG] (grub_debug_malloc): New function.
8873 [MM_DEBUG] (grub_debug_free): New function.
8874 [MM_DEBUG] (grub_debug_realloc): New function.
8875 [MM_DEBUG] (grub_debug_memalign): New function.
8876
8877 * kern/misc.c (grub_abort): Print a newline to distinguish
8878 the message.
8879
8880 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8881 grub_set_root_dev after loading modules. This is necessary when
8882 setting a prefix depends on modules.
8883
8884 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8885 (grub_efi_print_device_path): ... this.
8886 (grub_efi_get_filename): New prototype.
8887 (grub_efi_set_prefix): Likewise.
8888
8889 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8890 and grub/disk.h.
8891 (grub_efidisk_get_device_handle): New prototype.
8892 (grub_efidisk_get_device_name): Likewise.
8893
8894 * include/grub/mm.h: Include config.h.
8895 (MM_DEBUG): Removed.
8896 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8897 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8898 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8899 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8900 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8901 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8902 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8903 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8904 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8905
8906 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8907
8908 * disk/efi/efidisk.c: Include grub/partition.h.
8909 (iterate_child_devices): New function.
8910 (add_device): First, compare only last device path nodes, so that
8911 devices are sorted by the types.
8912 (grub_efidisk_get_device_handle): New function.
8913 (grub_efidisk_get_device_name): Likewise.
8914
8915 * configure.ac (--enable-mm-debug): New option to enable the
8916 memory manager debugging feature. This makes the binary much
8917 bigger, so is disabled by default.
8918
9cacaa17 89192006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8920
8921 Use grub_abort instead of grub_stop, and grub_exit must be
8922 define in each architecture now. Also, this change adds support
8923 for EFI disks.
f19dbdb7 8924
9cacaa17 8925 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8926 (grub_getkey): New function.
8927 (grub_term_get_current): Likewise.
8928
8929 * util/i386/pc/grub-setup.c: Include grub/term.h.
8930 (grub_getkey): New function.
8931 (grub_term_get_current): Likewise.
8932
8933 * util/misc.c (grub_stop): Renamed to ...
8934 (grub_exit): ... this.
8935
8936 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8937 (grub_exit): ... this.
8938 (grub_machine_init): Use grub_abort instead of abort.
8939 (grub_stop): Removed.
8940
8941 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8942 abort.
8943
8944 * kern/i386/pc/startup.S (grub_exit): New function.
8945 (cold_reboot): New label.
8946
8947 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8948 (grub_efi_init): Call grub_efidisk_init.
8949 (grub_efi_fini): Call grub_efidisk_fini.
8950
8951 * kern/efi/efi.c: Include grub/mm.h.
8952 (grub_efi_console_control_guid): Renamed to ...
8953 (console_control_guid): ... this.
8954 (grub_efi_loaded_image_guid): Renamed to ...
8955 (loaded_image_guid): ... this.
8956 (grub_efi_locate_handle): New function.
8957 (grub_efi_open_protocol): Likewise.
8958 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8959 GRUB_EFI_CONSOLE_CONTROL_GUID.
8960 (grub_efi_exit): Removed.
8961 (grub_stop): Likewise.
8962 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8963 (grub_exit): New function.
8964 (grub_print_device_path): Likewise.
8965
8966 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8967 (grub_enter_rescue_mode): Register "exit".
8968
8969 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8970 (grub_abort): New function.
8971
8972 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8973
8974 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8975
8976 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8977
8978 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8979 (grub_print_device_path): New prototype.
8980 (grub_efi_locate_handle): Likewise.
8981 (grub_efi_open_protocol): Likewise.
8982
8983 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8984 * disk/efi/efidisk.c: Likewise.
8985
8986 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8987
8988 * include/grub/efi/console_control.h
8989 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8990
8991 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8992 last 8 bytes as an array.
8993 (GRUB_EFI_DISK_IO_GUID): New macro.
8994 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8995 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8996 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8997 grub_uint8_t.
8998 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8999 (struct grub_efi_device_path): Rename the member "sub_type" to
9000 "subtype".
9001 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9002 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9003 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9004 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9005 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9006 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9007 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9008 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9009 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9010 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9011 (struct grub_efi_pci_device_path): New structure.
9012 (grub_efi_pci_device_path_t): New type.
9013 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9014 (struct grub_efi_pccard_device_path): New structure.
9015 (grub_efi_pccard_device_path_t): New type.
9016 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9017 (struct grub_efi_memory_mapped_device_path): New structure.
9018 (grub_efi_memory_mapped_device_path_t): New type.
9019 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9020 (struct grub_efi_vendor_device_path): New structure.
9021 (grub_efi_vendor_device_path_t): New type.
9022 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9023 (struct grub_efi_controller_device_path): New structure.
9024 (grub_efi_controller_device_path_t): New type.
9025 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9026 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9027 (struct grub_efi_acpi_device_path): New structure.
9028 (grub_efi_acpi_device_path_t): New type.
9029 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9030 (struct grub_efi_expanded_acpi_device_path): New structure.
9031 (grub_efi_expanded_acpi_device_path_t): New type.
9032 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9033 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9034 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9035 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9036 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9037 (struct grub_efi_atapi_device_path): New structure.
9038 (grub_efi_atapi_device_path_t): New type.
9039 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9040 (struct grub_efi_fibre_channel_device_path): New structure.
9041 (grub_efi_fibre_channel_device_path_t): New type.
9042 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9043 (struct grub_efi_1394_device_path): New structure.
9044 (grub_efi_1394_device_path_t): New type.
9045 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9046 (struct grub_efi_usb_device_path): New structure.
9047 (grub_efi_usb_device_path_t): New type.
9048 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9049 (struct grub_efi_usb_class_device_path): New structure.
9050 (grub_efi_usb_class_device_path_t): New type.
9051 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9052 (struct grub_efi_i2o_device_path): New structure.
9053 (grub_efi_i2o_device_path_t): New type.
9054 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9055 (struct grub_efi_mac_address_device_path): New structure.
9056 (grub_efi_mac_address_device_path_t): New type.
9057 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9058 (struct grub_efi_ipv4_device_path): New structure.
9059 (grub_efi_ipv4_device_path_t): New type.
9060 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9061 (struct grub_efi_ipv6_device_path): New structure.
9062 (grub_efi_ipv6_device_path_t): New type.
9063 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9064 (struct grub_efi_infiniband_device_path): New structure.
9065 (grub_efi_infiniband_device_path_t): New type.
9066 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9067 (struct grub_efi_uart_device_path): New structure.
9068 (grub_efi_uart_device_path_t): New type.
9069 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9070 (struct grub_efi_vendor_messaging_device_path): New structure.
9071 (grub_efi_vendor_messaging_device_path_t): New type.
9072 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9073 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9074 (struct grub_efi_hard_drive_device_path): New structure.
9075 (grub_efi_hard_drive_device_path_t): New type.
9076 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9077 (struct grub_efi_cdrom_device_path): New structure.
9078 (grub_efi_cdrom_device_path_t): New type.
9079 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9080 (struct grub_efi_vendor_media_device_path): New structure.
9081 (grub_efi_vendor_media_device_path_t): New type.
9082 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9083 (struct grub_efi_file_path_device_path): New structure.
9084 (grub_efi_file_path_device_path_t): New type.
9085 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9086 (struct grub_efi_protocol_device_path): New structure.
9087 (grub_efi_protocol_device_path_t): New type.
9088 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9089 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9090 (struct grub_efi_bios_device_path): New structure.
9091 (grub_efi_bios_device_path_t): New type.
9092 (struct grub_efi_disk_io): New structure.
9093 (grub_efi_disk_io_t): New type.
9094 (struct grub_efi_block_io_media): New structure.
9095 (grub_efi_block_io_media_t): New type.
9096 (struct grub_efi_block_io): New structure.
9097 (grub_efi_block_io_t): New type.
9098
9099 * include/grub/misc.h (grub_stop): Removed.
9100 (grub_exit): New prototype.
9101 (grub_abort): Likewise.
9102
9103 * include/grub/disk.h (enum grub_disk_dev_id): Added
9104 GRUB_DISK_DEVICE_EFIDISK_ID.
9105
9106 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9107 disk/efi/efidisk.c.
9108 (kernel_syms.lst): Remove the target if an error occurs.
9109
49986a9f 91102006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9111
9112 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9113 as it was simply too buggy.
9114
970d3b8a 91152006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9116
9117 * kern/misc.c (grub_lltoa): New function.
9118 (grub_vsprintf): Added support for the long long suffix,
9119 i.e. "ll".
9120
ff04ec24 91212006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9122
9123 * Makefile.in (LDFLAGS): Add variable.
9124 (LD): Remove variable.
9125 * configure.ac: Add -m32 to LDFLAGS.
9126 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9127 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9128 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9129 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9130 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9131 variables.
9132 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9133 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9134 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9135
37e5e1a4 91362006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9137
9138 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9139 length for unknown glyph.
9140
c352d8dd 91412006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9142
2eab1c0d 9143 Add support for pre-loaded modules into the EFI port.
f19dbdb7 9144
2eab1c0d 9145 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9146 completely. Accept one more argument DIR. The caller has changed.
9147
9148 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9149
9150 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9151 (grub_efi_loaded_image_guid): New variable.
9152 (grub_efi_get_loaded_image): New function.
9153 (grub_arch_modules_addr): Likewise.
9154
9155 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9156 prototype.
9157
9158 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9159 (struct grub_efi_loaded_image): New structure.
9160 (grub_efi_loaded_image_t): New type.
9161
91622006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9163
c352d8dd 9164 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9165 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9166 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9167
6d01d6b4 91682006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9169
9170 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9171
976a4ea0 91722006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9173
9174 * DISTLIST: Added include/grub/efi/console.h,
9175 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9176 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9177
9178 * include/grub/efi/console.h: New file.
9179 * include/grub/efi/time.h: Likewise.
9180 * include/grub/i386/efi/kernel.h: Likewise.
9181 * kern/efi/init.c: Likewise.
9182 * kern/efi/mm.c: Likewise.
9183 * term/efi/console.c: Likewise.
f19dbdb7 9184
976a4ea0 9185 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9186 (grub_stop): Removed.
9187 (grub_get_rtc): Likewise.
9188 (grub_machine_init): Simply call grub_efi_init.
9189 (grub_machine_fini): Call grub_efi_fini.
9190
9191 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9192 (grub_efi_output_string): Removed.
9193 (grub_efi_stall): New function.
9194 (grub_stop): Likewise.
9195 (grub_get_rtc): Likewise.
9196
9197 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9198 (grub_efi_stall): New prototype.
9199 (grub_efi_allocate_pages): Likewise.
9200 (grub_efi_free_pages): Likewise.
9201 (grub_efi_get_memory_map): Likewise.
9202 (grub_efi_mm_init): Likewise.
9203 (grub_efi_mm_fini): Likewise.
9204 (grub_efi_init): Likewise.
9205 (grub_efi_fini): Likewise.
9206
9207 * include/grub/i386/efi/time.h: Do not include
9208 grub/symbol.h. Include grub/efi/time.h.
9209 (GRUB_TICKS_PER_SECOND): Removed.
9210 (grub_get_rtc): Likewise.
9211
9212 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9213 Added padding. The EFI spec is buggy.
9214 (GRUB_EFI_BLACK): New macro.
9215 (GRUB_EFI_BLUE): Likewise.
9216 (GRUB_EFI_GREEN): Likewise.
9217 (GRUB_EFI_CYAN): Likewise.
9218 (GRUB_EFI_RED): Likewise.
9219 (GRUB_EFI_MAGENTA): Likewise.
9220 (GRUB_EFI_BROWN): Likewise.
9221 (GRUB_EFI_LIGHTGRAY): Likewise.
9222 (GRUB_EFI_BRIGHT): Likewise.
9223 (GRUB_EFI_DARKGRAY): Likewise.
9224 (GRUB_EFI_LIGHTBLUE): Likewise.
9225 (GRUB_EFI_LIGHTGREEN): Likewise.
9226 (GRUB_EFI_LIGHTCYAN): Likewise.
9227 (GRUB_EFI_LIGHTRED): Likewise.
9228 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9229 (GRUB_EFI_YELLOW): Likewise.
9230 (GRUB_EFI_WHITE): Likewise.
9231 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9232 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9233 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9234 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9235 (GRUB_EFI_BACKGROUND_RED): Likewise.
9236 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9237 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9238 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9239 (GRUB_EFI_TEXT_ATTR): Likewise.
9240
9241 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9242 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9243 (kernel_mod_HEADERS): Added efi/time.h.
9244
83709125 92452006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9246
9247 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9248 include/grub/efi/api.h, include/grub/efi/console_control.h,
9249 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9250 include/grub/i386/efi/time.h, kern/efi/efi.c,
9251 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9252 and util/i386/efi/grub-mkimage.c.
9253
9254 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9255
9256 * genmk.rb (PModule#rule): Do not export symbols if
9257 #{prefix}_EXPORTS is set to "no".
9258
9259 * conf/i386-efi.mk: New file.
9260 * conf/i386-efi.rmk: Likewise.
9261 * include/grub/efi/api.h: Likewise.
9262 * include/grub/efi/console_control.h: Likewise.
9263 * include/grub/efi/efi.h: Likewise.
9264 * include/grub/efi/pe32.h: Likewise.
9265 * include/grub/i386/efi/time.h: Likewise.
9266 * kern/efi/efi.c: Likewise.
9267 * kern/i386/efi/init.c: Likewise.
9268 * kern/i386/efi/startup.S: Likewise.
9269 * util/i386/efi/grub-mkimage.c: Likewise.
9270
92712006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 9272
9273 * include/grub/script.h: Include <grub/parser.h> and
9274 "grub_script.tab.h".
9275 (struct grub_lexer_param): New struct.
9276 (struct grub_parser_param): Likewise.
9277 (grub_script_create_arglist): Pass the state in an argument.
9278 (grub_script_add_arglist): Likewise.
9279 (grub_script_create_cmdline): Likewise.
9280 (grub_script_create_cmdblock): Likewise.
9281 (grub_script_create_cmdif): Likewise.
9282 (grub_script_create_cmdmenu): Likewise.
9283 (grub_script_add_cmd): Likewise.
9284 (grub_script_arg_add): Likewise.
9285 (grub_script_lexer_ref): Likewise.
9286 (grub_script_lexer_deref): Likewise.
9287 (grub_script_lexer_record_start): Likewise.
9288 (grub_script_lexer_record_stop): Likewise.
9289 (grub_script_mem_record): Likewise.
9290 (grub_script_mem_record_stop): Likewise.
9291 (grub_script_malloc): Likewise.
9292 (grub_script_yylex): Likewise.
9293 (grub_script_yyparse): Likewise.
9294 (grub_script_yyerror): Likewise.
9295 (grub_script_yylex): Likewise.
9296 (grub_script_lexer_init): Return the state.
9297
9298 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9299 (grub_script_lexer_done): Likewise.
9300 (grub_script_lexer_getline): Likewise.
9301 (grub_script_lexer_refs): Likewise.
9302 (script): Likewise.
9303 (newscript): Likewise.
9304 (record): Likewise.
9305 (recording): Likewise.
9306 (recordpos): Likewise.
9307 (recordlen): Likewise.
9308 (grub_script_lexer_init): Return the state instead of setting
9309 global variables.
9310 (grub_script_lexer_ref): Use the newly added argument for state
9311 instead of globals.
9312 (grub_script_lexer_deref): Likewise.
9313 (grub_script_lexer_record_start): Likewise.
9314 (grub_script_lexer_record_stop): Likewise.
9315 (recordchar): Likewise.
9316 (nextchar): Likewise.
9317 (grub_script_yylex2): Likewise.
9318 (grub_script_yylex): Likewise.
9319 (grub_script_yyerror): Likewise.
9320
9321 * normal/parser.y (func_mem): Removed variable.
9322 (menu_entry): Likewise.
9323 (err): Likewise.
9324 (%lex-param): New parser option.
9325 (%parse-param): Likewise.
9326 (script): Always return the AST.
9327 (argument): Pass the state around.
9328 (arguments): Likewise.
9329 (grubcmd): Likewise.
9330 (commands): Likewise.
9331 (function): Likewise.
9332 (menuentry): Likewise.
9333 (if_statement): Likewise.
9334 (if): Likewise.
9335
9336 * normal/script.c (grub_script_memused): Removed variable.
9337 (grub_script_parsed): Likewise.
9338 (grub_script_malloc): Added a state argument. Use that instead of
9339 global variables.
9340 (grub_script_mem_record): Likewise.
9341 (grub_script_mem_record_stop): Likewise.
9342 (grub_script_arg_add): Likewise.
9343 (grub_script_add_arglist): Likewise.
9344 (grub_script_create_cmdline): Likewise.
9345 (grub_script_create_cmdif): Likewise.
9346 (grub_script_create_cmdmenu): Likewise.
9347 (grub_script_add_cmd): Likewise.
9348 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 9349
e2a8c904 93502006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 9351
9352 * normal/command.c (grub_command_init): Remove the title command.
9353
9354 * normal/lexer.c (grub_script_yylex): Renamed from this...
9355 (grub_script_yylex2): ... to this.
9356 (grub_script_yylex): New function. Temporary
9357 introduced to filter some tokens.
9358 (grub_script_yyerror): Print a newline.
9359
9360 * normal/main.c (read_config_file): Output information about the
9361 lines that contain errors. Wait for a key after all lines have
9362 been processed. Don't return an empty menu.
9363
9364 * normal/parser.y (func_mem): Don't initialize.
9365 (menu_entry): Likewise.
9366 (err): New variable.
9367 (script): Don't return anything when an error was encountered.
9368 (ws, returns): Removed rules.
9369 (argument): Disabled concatenated variable support.
9370 (arguments): Remove explicit separators.
9371 (grubcmd): Likewise.
9372 (function): Likewise.
9373 (menuentry): Likewise.
9374 (if): Likewise.
9375 (commands): Likewise. Add error handling.
9376
9377 * normal/script.c (grub_script_create_cmdline): If
9378 `grub_script_parsed' is 0, assume the parser encountered an error.
9379
c9a86192 93802006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9381
9382 * configure.ac: Add support for EFI. Fix the typo
9383 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9384
70f3b243 93852006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9386
9387 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9388 foreign multibyte characters should be shown correctly.
9389
65f201ad 93902006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9391
9392 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9393 calculation.
9394 (read_config_file): Made it to close file before returning.
9395
b4b93674 93962006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9397
9398 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9399 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9400 video/i386/pc/vbefill.c.
9401
9402 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9403 video/i386/pc/vbefill.c.
9404
9405 * include/grub/video.h (grub_video_blit_format): New enum.
9406 (grub_video_mode_info): Added new member blit_format.
9407 (grub_video_get_blit_format): New function prototype.
9408
9409 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9410 function prototype.
9411 (grub_video_vbe_map_rgb): Likewise.
9412 (grub_video_vbe_unmap_color): Likewise.
9413
9414 * include/grub/i386/pc/vbeblit.h: New file.
9415
9416 * include/grub/i386/pc/vbefill.h: New file.
9417
9418 * video/video.c (grub_video_get_blit_format): New function.
9419 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9420 (grub_video_vbe_map_rgb): Likewise.
9421 (grub_video_vbe_unmap_color): Likewise.
9422
9423 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9424 optimized fills.
9425 (grub_video_vbe_blit_render_target): Changed to use more optimized
9426 blits.
9427 (grub_video_vbe_setup): Added detection for optimized settings.
9428 (grub_video_vbe_create_render_target): Likewise.
9429
9430 * video/i386/pc/vbeblit.c: New file.
9431
9432 * video/i386/pc/vbefill.c: New file.
9433
c2379b9c 94342006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9435
9436 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9437 here...
9438
9439 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9440 parsing to support both hex and dec ranges. If filename was missing
9441 show usage information.
9442
bd0d7896 94432006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9444
9445 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9446 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9447
9448 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9449 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9450 (video_mod_SOURCES): Added.
9451 (video_mod_CFLAGS): Likewise.
9452 (video_mod_LDFLAGS): Likewise.
9453 (gfxterm_mod_SOURCES): Likewise.
9454 (gfxterm_mod_CFLAGS): Likewise.
9455 (gfxterm_mod_LDFLAGS): Likewise.
9456 (videotest_mod_SOURCES): Likewise.
9457 (videotest_mod_CFLAGS): Likewise.
9458 (videotest_mod_LDFLAGS): Likewise.
9459 (vesafb_mod_SOURCES): Removed.
9460 (vesafb_mod_CFLAGS): Likewise.
9461 (vesafb_mod_LDFLAGS): Likewise.
9462 (vga_mod_SOURCES): Likewise.
9463 (vga_mod_CFLAGS): Likewise.
9464 (vga_mod_LDFLAGS): Likewise.
9465
9466 * commands/videotest.c: New file.
9467
9468 * font/manager.c (fill_with_default_glyph): Modified to use
9469 grub_font_glyph.
9470 (grub_font_get_glyph): Likewise.
9471 (fontmanager): Renamed from this...
9472 (font_manager): ... to this.
9473
9474 * include/grub/font.h (grub_font_glyph): Added new structure.
9475 (grub_font_get_glyph): Modified to use grub_font_glyph.
9476
9477 * include/grub/misc.h (grub_abs): Added as inline function.
9478
9479 * include/grub/video.h: New file.
9480
9481 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9482 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9483 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9484 (grub_vbe_get_controller_info): Renamed from this...
9485 (grub_vbe_bios_get_controller_info): ... to this.
9486 (grub_vbe_get_mode_info): Renamed from this...
9487 (grub_vbe_bios_get_mode_info): ... to this.
9488 (grub_vbe_set_mode): Renamed from this...
9489 (grub_vbe_bios_set_mode): ... to this.
9490 (grub_vbe_get_mode): Renamed from this...
9491 (grub_vbe_bios_get_mode): ... to this.
9492 (grub_vbe_set_memory_window): Renamed from this...
9493 (grub_vbe_bios_set_memory_window): ... to this.
9494 (grub_vbe_get_memory_window): Renamed from this...
9495 (grub_vbe_bios_get_memory_window): ... to this.
9496 (grub_vbe_set_scanline_length): Renamed from this...
9497 (grub_vbe_set_scanline_length): ... to this.
9498 (grub_vbe_get_scanline_length): Renamed from this...
9499 (grub_vbe_bios_get_scanline_length): ... to this.
9500 (grub_vbe_set_display_start): Renamed from this...
9501 (grub_vbe_bios_set_display_start): ... to this.
9502 (grub_vbe_get_display_start): Renamed from this...
9503 (grub_vbe_bios_get_display_start): ... to this.
9504 (grub_vbe_set_palette_data): Renamed from this...
9505 (grub_vbe_bios_set_palette_data): ... to this.
9506 (grub_vbe_set_pixel_rgb): Removed.
9507 (grub_vbe_set_pixel_index): Likewise.
9508
9509 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9510 from this...
9511 (grub_vbe_bios_get_controller_info): ... to this.
9512 (grub_vbe_get_mode_info): Renamed from this...
9513 (grub_vbe_bios_get_mode_info): ... to this.
9514 (grub_vbe_set_mode): Renamed from this...
9515 (grub_vbe_bios_set_mode): ... to this.
9516 (grub_vbe_get_mode): Renamed from this...
9517 (grub_vbe_bios_get_mode): ... to this.
9518 (grub_vbe_set_memory_window): Renamed from this...
9519 (grub_vbe_bios_set_memory_window): ... to this.
9520 (grub_vbe_get_memory_window): Renamed from this...
9521 (grub_vbe_bios_get_memory_window): ... to this.
9522 (grub_vbe_set_scanline_length): Renamed from this...
9523 (grub_vbe_set_scanline_length): ... to this.
9524 (grub_vbe_get_scanline_length): Renamed from this...
9525 (grub_vbe_bios_get_scanline_length): ... to this.
9526 (grub_vbe_set_display_start): Renamed from this...
9527 (grub_vbe_bios_set_display_start): ... to this.
9528 (grub_vbe_get_display_start): Renamed from this...
9529 (grub_vbe_bios_get_display_start): ... to this.
9530 (grub_vbe_set_palette_data): Renamed from this...
9531 (grub_vbe_bios_set_palette_data): ... to this.
9532 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9533 getting corrupted after calling it. Added more pushes and pops.
9534 (grub_vbe_bios_set_mode): Likewise.
9535 (grub_vbe_bios_get_mode): Likewise.
9536 (grub_vbe_bios_get_memory_window): Likewise.
9537 (grub_vbe_bios_set_scanline_length): Likewise.
9538 (grub_vbe_bios_get_scanline_length): Likewise.
9539 (grub_vbe_bios_get_display_start): Likewise.
9540 (grub_vbe_bios_set_palette_data): Likewise.
9541
9542 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9543 (cl_insert): Likewise.
9544 (cl_delete): Likewise.
9545
9546 * term/gfxterm.c: New file.
9547
9548 * term/i386/pc/vesafb.c: Removed file.
9549
9550 * video/video.c: New file.
9551
9552 * video/i386/pc/vbe.c (real2pm): Added new function.
9553 (grub_video_vbe_draw_pixel): Likewise.
9554 (grub_video_vbe_get_video_ptr): Likewise.
9555 (grub_video_vbe_get_pixel): Likewise
9556 (grub_video_vbe_init): Likewise.
9557 (grub_video_vbe_fini): Likewise.
9558 (grub_video_vbe_setup): Likewise.
9559 (grub_video_vbe_get_info): Likewise.
9560 (grub_video_vbe_set_palette): Likewise.
9561 (grub_video_vbe_get_palette): Likewise.
9562 (grub_video_vbe_set_viewport): Likewise.
9563 (grub_video_vbe_get_viewport): Likewise.
9564 (grub_video_vbe_map_color): Likewise.
9565 (grub_video_vbe_map_rgb): Likewise.
9566 (grub_video_vbe_map_rgba): Likewise.
9567 (grub_video_vbe_unmap_color): Likewise.
9568 (grub_video_vbe_fill_rect): Likewise.
9569 (grub_video_vbe_blit_glyph): Likewise.
9570 (grub_video_vbe_blit_bitmap): Likewise.
9571 (grub_video_vbe_blit_render_target): Likewise.
9572 (grub_video_vbe_scroll): Likewise.
9573 (grub_video_vbe_swap_buffers): Likewise.
9574 (grub_video_vbe_create_render_target): Likewise.
9575 (grub_video_vbe_delete_render_target): Likewise.
9576 (grub_video_vbe_set_active_render_target): Likewise.
9577 (grub_vbe_set_pixel_rgb): Remove function.
9578 (grub_vbe_set_pixel_index): Likewise.
9579 (index_color_mode): Remove static variable.
9580 (active_mode): Likewise.
9581 (framebuffer): Likewise.
9582 (bytes_per_scan_line): Likewise.
9583 (grub_video_vbe_adapter): Added new static variable.
9584 (framebuffer): Likewise.
9585 (render_target): Likewise.
9586 (initial_mode): Likewise.
9587 (mode_in_use): Likewise.
9588 (mode_list): Likewise.
9589
5f97350b 95902006-03-10 Marco Gerards <marco@gnu.org>
9591
9592 * configure.ac (AC_INIT): Bumped to 1.93.
9593
9594 * DISTLIST: Added `include/grub/hfs.h'.
9595
a3c5c6f8 95962006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9597
9598 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9599 18H, which might help the BIOS falling back to next boot media.
9600
6de53d26 96012006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9602
9603 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9604 Poe Chen <poe.poechen@gmail.com>.
9605
77c4a393 96062006-01-17 Marco Gerards <marco@gnu.org>
9607
9608 * include/grub/normal.h: Include <grub/script.h>.
9609 (grub_command_list): Removed struct.
9610 (grub_command_list_t): Removed type.
9611 (grub_menu_entry): Remove members `num' and `command_list'. Add
9612 members `commands' and `sourcecode'.
9613 * include/grub/script.h: Add inclusion guards.
9614 (grub_script_cmd_menuentry): New struct.
9615 (grub_script_execute_menuentry): New prototype.
9616 (grub_script_lexer_record_start): Likewise.
9617 (grub_script_lexer_record_stop): Likewise.
9618 * normal/execute.c (grub_script_execute_menuentry): New function.
9619 * normal/lexer.c (record, recording, recordpos, recordlen): New
9620 variables.
9621 (grub_script_lexer_record_start): New function.
9622 (grub_script_lexer_record_stop): Likewise.
9623 (recordchar): Likewise.
9624 (nextchar): Likewise.
9625 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9626 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9627 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9628 (current_menu): New variable.
9629 (free_menu): Mainly rewritten.
9630 (grub_normal_menu_addentry): New function.
9631 (read_config_file): Rewritten.
9632 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 9633 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 9634 the menu entry.
9635 (run): Mainly rewritten.
9636 * normal/parser.y (menu_entry): New variable.
9637 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9638 (menuentry): New rule.
9639 (command): Add `menuentry'.
9640 (if_statement): Allow additional returns before `fi'.
9641 * normal/script.c (grub_script_create_cmdmenu): New function.
9642
144f1f98 96432006-01-03 Marco Gerards <marco@gnu.org>
9644
9645 * INSTALL: GNU Bison is required.
9646 * configure.ac: Rewritten the test to detect Bison.
9647 * Makefile.in (YACC): New variable. Reported by Xun Sun
9648 <xun.sun.cn@gmail.com>.
9649
af4b2d89 96502006-01-03 Marco Gerards <marco@gnu.org>
9651
9652 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9653 the HFS+ filesystem to filesystem blocks.
9654 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9655 GCC warning is silenced.
9656
15643b71 96572006-01-03 Marco Gerards <marco@gnu.org>
9658
9659 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9660 read from disk from big endian to host byte order.
9661
00905879 96622006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9663
9664 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9665 documentation.
9666 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9667 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9668 embedded HFS+ filesystem.
9669 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9670 (grub_hfs_sblock): Move from here...
9671 * include/grub/hfs.h: To here... New file.
9672 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9673 documentation.
9674 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9675 New macros.
9676 (grub_hfsplus_volheader): Change type of member `magic' to
9677 `grub_uint16_t'.
9678 (grub_hfsplus_data): Add new member `embedded_offset'.
9679 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9680 returned block.
9681 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9682 Calculate the offset.
9683
8899bc3e 96842005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9685
9686 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9687 Removed.
9688 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9689
ae8c0277 96902005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9691
9692 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9693 ENV->NAME is NULL after allocating ENV->VALUE.
9694
07084456 96952005-12-25 Marco Gerards <marco@gnu.org>
9696
9697 * kern/env.c (grub_env_set): Rewritten the error handling code.
9698
4750f5f1 96992005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9700
9701 * geninit.sh: Made more robust, and more portable.
9702
50214199 97032005-12-25 Marco Gerards <marco@gnu.org>
9704
9705 Add support for Apple HFS+ filesystems.
f19dbdb7 9706
50214199 9707 * fs/hfsplus.c: New file.
9708
9709 * DISTLIST: Added `fs/hfsplus.c'.
9710
9711 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9712 (hfsplus_mod_SOURCES): New variable.
9713 (hfsplus_mod_CFLAGS): Likewise.
9714 (hfsplus_mod_LDFLAGS): Likewise.
9715 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9716 (grub_setup_SOURCES): Likewise.
9717 (grub_mkdevicemap_SOURCES): Likewise.
9718 (grub_emu_SOURCES): Likewise.
9719 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9720
9721 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9722
9723 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9724
befaed6c 97252005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9726
9727 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9728 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9729 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9730 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9731 normal/lexer.c, normal/parser.y, normal/script.c, and
9732 partmap/gpt.c.
9733 Removed kern/sparc64/cache.c.
9734
9735 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9736 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9737 grub_emu_init.c.
9738
9739 * configure.ac (AC_INIT): Bumped to 1.92.
9740
6a124103 97412005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9742
9743 * kern/err.c (grub_error_push): Added new function to support error
9744 stacks.
9745 (grub_error_pop): Likewise.
9746 (grub_error_stack_items): New local variable to support error stacks.
9747 (grub_error_stack_pos): Likewise.
9748 (grub_error_stack_assert): Likewise.
9749 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9750 stack depth.
9751 (grub_print_error): Added support to print errors from error stack.
9752
9753 * include/grub/err.h (grub_error_push): Added function prototype.
9754 (grub_error_pop): Likewise.
9755
be973c1b 97562005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9757
9758 * configure.ac: Accept `powerpc64' as host_cpu.
9759 (amd64): Rename to `biarch32'.
9760
9761 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9762 non-cacheline-aligned addresses.
9763
9764 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9765 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9766 if `size' is non-zero.
9767
b04216ab 97682005-12-03 Marco Gerards <mgerards@xs4all.nl>
9769
9770 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9771 and `cd' to make sure the filename is not prefixed with a
9772 directory name.
9773 (pkgdata_MODULES): Add `gpt.mod'.
9774 (gpt_mod_SOURCES): New variable.
9775 (gpt_mod_CFLAGS): Likewise.
9776 (gpt_mod_LDFLAGS): Likewise.
9777
9778 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9779
9780 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9781 New macro.
9782
9783 * partmap/gpt.c: New file.
9784
9785 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9786 GPT partition map is detected.
9787
41730ed9 97882005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9789
9790 * commands/i386/pc/play.c: New file.
9791 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9792 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9793 macros.
f19dbdb7 9794
95dc3643 97952005-11-27 Marco Gerards <mgerards@xs4all.nl>
9796
9797 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9798 ((unused))' to silence gcc warning.
9799
1569ec51 98002005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9801
9802 * configure.ac: Correct `AC_PROG_YACC' test.
9803
9abde152 98042005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9805
9806 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9807 check before installing files.
9808
44b83271 98092005-11-22 Mike Small <smallm@panix.com>
9810
9811 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9812 number regex so multidigit numbers are recognized correctly.
9813
98142005-11-22 Mike Small <smallm@panix.com>
9815
9816 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9817 debugging message before attempting to claim memory.
9818 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9819 multiple addresses in case of failure.
9820
9c12956b 98212005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9822
9823 * term/tparm.c (get_space): Remove empty `if' statement.
9824
9825 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9826
9827 * kern/parser.c (check_varstate): Rename `state' to 's'.
9828
aeaf81d9 98292005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9830
9831 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9832 variable definitions to the beginning of each function. Sort stack
9833 variables by size.
9834 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9835 `buf' argument to `char *'.
9836
79bbb63f 98372005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9838
9839 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9840 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 9841 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 9842 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9843 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9844 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9845 configfile.mod, search.mod, gzio.mod and test.mod.
9846 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9847 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9848 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9849 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9850 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9851 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9852 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9853 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9854 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9855 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9856 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9857 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9858 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9859 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9860 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9861 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9862 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9863 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9864 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9865 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9866 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9867 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9868 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9869
9870 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9871 `grep --include'.
9872 (pkgdata_MODULES): Add test.mod.
9873
233b1628 98742005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9875
9876 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9877 appending to variables with "+=".
9878 (PModule): Use full pathname to generate *.lst filenames.
9879
9880 * Makefile.in: Fixed list rules moved from genmk.rb.
9881 (.DELETE_ON_ERROR): New special target.
9882 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9883
9884 * conf/i386-pc.rmk: Include conf/common.mk.
9885 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 9886 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 9887 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9888 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9889 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9890 configfile.mod, search.mod, gzio.mod and test.mod.
9891 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9892 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9893 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9894 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9895 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9896 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9897 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9898 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9899 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9900 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9901 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9902 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9903 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9904 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9905 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9906 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9907 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9908 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9909 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9910 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9911 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9912 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9913 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9914 here...
9915 * conf/common.rmk: ... to here. New file.
9916
9917 * conf/common.mk: New file.
9918
16f820c8 99192005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9920
9921 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9922 (grub_script.tab.c): ... here.
9923
9924 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9925 (grub_script.tab.c): ... here.
9926
9927 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9928 (grub_script.tab.c): ... here.
9929
9930 * normal/command.c (grub_command_find): Fixed a memory leak of
9931 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9932
63ba1554 99332005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9934
9935 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9936 "@" which marks the start of a comment on ARM.
9937 (VARIABLE): Likewise.
9938
7f67dc13 99392005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9940
79bbb63f 9941 Add support for Linux/ADFS partition tables.
7f67dc13 9942
9943 * partmap/acorn.c: New file.
9944
9945 * include/grub/acorn_filecore.h: Likewise.
9946
9947 * DISTLIST: Added `partmap/acorn.c' and
9948 `include/grub/acorn_filecore.h'.
f19dbdb7 9949
7f67dc13 9950 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9951 `partmap/acorn.c'.
9952 (pkgdata_MODULES): Add `acorn.mod'.
9953 (acorn_mod_SOURCES): New variable.
9954 (acorn_mod_CFLAGS): Likewise.
9955
9956 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9957 `partmap/acorn.c'.
9958 (pkgdata_MODULES): Add `acorn.mod'.
9959 (acorn_mod_SOURCES): New variable.
9960 (acorn_mod_CFLAGS): Likewise.
9961
9962 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9963 (pkgdata_MODULES): Add `acorn.mod'.
9964 (acorn_mod_SOURCES): New variable.
9965 (acorn_mod_CFLAGS): Likewise.
9966 (acorn_mod_LDFLAGS): Likewise.
9967
9968 * include/types.h (grub_disk_addr_t): New typedef.
9969
6d099807 99702005-11-13 Marco Gerards <mgerards@xs4all.nl>
9971
9972 * geninit.sh: New file.
9973
9974 * geninitheader.sh: Likewise.
9975
9976 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9977 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9978 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9979 * commands/configfile.c (grub_configfile_init)
9980 (grub_configfile_fini): Likewise.
9981 * commands/default.c (grub_default_init, grub_default_fini):
9982 Likewise.
9983 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9984 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9985 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9986 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9987 Likewise.
9988 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9989 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9990 Likewise.
9991 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 9992 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 9993 Likewise.
9994 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9995 Likewise.
fe6b695a 9996 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 9997 Likewise.
9998 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9999 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10000 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10001 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10002 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10003 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10004 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10005 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10006 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10007 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10008 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10009 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10010 * partmap/amiga.c (grub_amiga_partition_map_init)
10011 (grub_amiga_partition_map_fini): Likewise.
10012 * partmap/apple.c (grub_apple_partition_map_init)
10013 (grub_apple_partition_map_fini): Likewise.
10014 * partmap/pc.c (grub_pc_partition_map_init)
10015 (grub_pc_partition_map_fini): Likewise.
10016 * partmap/sun.c (grub_sun_partition_map_init,
10017 grub_sun_partition_map_fini): Likewise.
10018 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10019 Likewise.
10020
10021 * util/grub-emu.c: Include <grub_modules_init.h>.
10022 (main): Don't initialize and de-initialize any modules directly,
10023 use `grub_init_all' and `grub_fini_all' instead.
10024
10025 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10026 `grub_vesafb_mod_init'.
10027 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10028 all users.
10029 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10030 `grub_vga_mod_init'. Updated all users.
10031 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 10032
6d099807 10033 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10034 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10035 rules.
10036
10037 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10038 Generate a function to initialize the module in utilities.
10039 Updated all callers.
10040 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10041 initialize the module in utilities. Updated all callers.
10042
9046bcf0 100432005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10044
10045 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10046 escape sequence and a literal ^L to clear the screen.
10047
10048 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10049 when returning from Open Firmware.
10050
d13ea639 100512005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10052
10053 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10054 (grub_ofconsole_height): Likewise.
10055 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10056 manually insert a '\n'.
10057 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10058 `grub_ofconsole_height'. Return early if these are already set.
10059
a8fcf206 100602005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10061
10062 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10063 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10064 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10065 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10066 and `normal/script.c'.
10067 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10068 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10069 (test_mod_SOURCES): New variable.
10070 (test_mod_CFLAGS): Likewise.
10071 (test_mod_LDFLAGS): Likewise.
10072 (pkgdata_MODULES): Add `test.mod'.
10073 (grub_script.tab.c): New rule.
10074 (grub_script.tab.h): Likewise.
10075
b6b32745 100762005-11-07 Marco Gerards <mgerards@xs4all.nl>
10077
10078 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10079 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10080 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10081 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10082 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10083 (test_mod_SOURCES): New variable.
10084 (test_mod_CFLAGS): Likewise.
10085 (pkgdata_MODULES): Add `test.mod'.
10086 (grub_script.tab.c): New rule.
10087 (grub_script.tab.h): Likewise.
10088
daac212a 100892005-11-06 Marco Gerards <mgerards@xs4all.nl>
10090
10091 Add initial scripting support.
10092
10093 * commands/test.c: New file.
10094 * include/grub/script.h: Likewise.
10095 * normal/execute.c: Likewise.
10096 * normal/function.c: Likewise.
10097 * normal/lexer.c: Likewise.
10098 * normal/parser.y: Likewise.
10099 * normal/script.c: Likewise.
10100
10101 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 10102
daac212a 10103 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10104 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10105 `normal/function.c' and `normal/script.c'.
10106 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10107 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 10108 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10109 variables.
daac212a 10110 (pkgdata_MODULES): Add `test.mod'.
10111 (grub_script.tab.c): New rule.
10112 (grub_script.tab.h): Likewise.
10113
10114 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10115
10116 * include/grub/normal.h (grub_test_init): New prototype.
10117 (grub_test_fini): Likewise.
f19dbdb7 10118
daac212a 10119 * normal/command.c: Include <grub/script.h>.
10120 (grub_command_execute): Rewritten.
f19dbdb7 10121
daac212a 10122 * util/grub-emu.c (main): Call `grub_test_init' and
10123 `grub_test_fini'.
10124
77500b2b 101252005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10126
10127 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10128 to 0.
10129 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10130 there are no pending characters.
10131
e45deb9e 101322005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10133
10134 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10135 `grub_strndup' to drop device arguments. Replace unnecessary
10136 `grub_strndup' with `grub_strdup'.
10137
4ce32619 101382005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10139
10140 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10141 `debug' environment variable has been set.
10142
101432005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 10144
4ce32619 10145 * Makefile.in (install-local): Use $(DATA).
10146 (uninstall): Likewise.
10147 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10148 (sbin_UTILITIES): ... to here.
10149 (sbin_SCRIPTS): New variable.
10150 (grub_install_SOURCES): New variable.
10151 * util/powerpc/ieee1275/grub-install.in: New file.
10152 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10153 variable.
10154 (add_segments): Call `grub_util_get_path'.
10155
25fe6f03 101562005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10157
10158 From Timothy Baldwin:
10159 * commands/ls.c (grub_ls_list_files): Close FILE with
10160 grub_file_close.
10161 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10162
04ccf3ec 101632005-10-24 Marco Gerards <mgerards@xs4all.nl>
10164
10165 * include/grub/parser.h: New file.
10166
10167 * kern/parser.c: Likewise.
10168
10169 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10170 (grub_setup_SOURCES): Likewise.
10171 (grub_probefs_SOURCES): Likewise.
10172 (grub_emu_SOURCES): Likewise.
10173 (kernel_img_HEADERS): Add `parser.h'.
10174
10175 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10176 (grub_emu_SOURCES): Add `kern/parser.c'.
10177 (grubof_SOURCES): Likewise.
10178
10179 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10180 (grubof_SOURCES): Add `kern/parser.c'.
10181
10182 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10183
10184 * kern/misc.c (grub_split_cmdline): Removed function.
10185
10186 * kern/rescue.c: Include <grub/parser.h>.
10187 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10188 of `grub_split_cmdline'.
10189
10190 * normal/command.c: Include <grub/parser.h>.
10191 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10192 of `grub_split_cmdline'.
10193
10194 * normal/completion.c: Include <grub/parser.h>.
10195 (cmdline_state): New variable.
10196 (iterate_dir): End the filename with a quote depending on the
10197 command line state.
10198 (get_state): new function.
10199 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10200 split the arguments and determine the current argument. When the
10201 argument string is not quoted, escape all spaces.
10202
6d8f4b0e 102032005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10204
10205 * normal/sparc64/setjmp.S: New file.
10206
15cf03ed 102072005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10208
10209 * include/grub/sparc64/libgcc.h: New file.
10210 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10211 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10212 normal/sparc64/setjmp.c.
10213
03e8661a 102142005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10215
10216 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10217 * kern/sparc64/cache.S: New file.
10218 * kern/sparc64/cache.c: Removed.
10219 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10220 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10221 -mtune=ultrasparc.
10222 (COMMON_LDFLAGS): Add -melf64_sparc.
10223 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10224 (grubof_SOURCES): Use cache.S instead of cache.c.
10225 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10226 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10227 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10228 commented though.
10229 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10230 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10231 (linux_mod_CFLAGS): Commented out.
10232 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10233 out because module isn't built.
10234 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10235 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10236 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10237 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10238 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10239 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10240 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10241 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10242 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10243 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10244 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10245 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10246 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10247 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10248
34eeec8a 102492005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10250
10251 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10252 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10253 longer, because HFS should not be used on PC.
10254
708367a3 102552005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10256
10257 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10258 consistently within the loop.
10259
6fa1251a 102602005-10-15 Marco Gerards <mgerards@xs4all.nl>
10261
10262 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10263 directory can not be read.
10264
4801580b 102652005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10266
10267 * configure.ac (AC_INIT): Increase the version number to 1.91.
10268
10269 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10270 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10271 term/i386/pc/serial.c.
10272
219ad426 102732005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10274
10275 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10276 file size must be permitted.
10277
10278 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10279 between %ah and %al.
10280
688e5699 102812005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10282
10283 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10284 grub_uint64_t.
10285 Call the hook with a NUL-terminated filename.
10286 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10287 grub_cpu_to_be32.
10288
10289 * kern/term.c (cursor_state): New variable.
10290 (grub_term_set_current): Reset the cursor state on a new
10291 terminal.
10292 (grub_setcursor): Rewritten to use CURSOR_STATE.
10293 (grub_getcursor): New function.
10294
10295 * include/grub/term.h (grub_getcursor): New prototype.
10296
10297 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10298 integers on ARM. Reported by Timothy Baldwin
10299 <T.E.Baldwin99@members.leeds.ac.uk>.
10300
bb34586c 103012005-10-11 Marco Gerards <mgerards@xs4all.nl>
10302
10303 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10304 allocated.
10305 (grub_sfs_dir): Likewise.
10306
9a909877 103072005-10-09 Marco Gerards <mgerards@xs4all.nl>
10308
10309 Add support for the SFS filesystem.
10310
10311 * fs/sfs.c: New file.
10312
10313 * DISTLIST: Added `fs/sfs.c'.
10314
10315 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10316 (grub_probefs_SOURCES): Likewise.
10317 (grub_emu_SOURCES): Likewise.
10318 (pkgdata_MODULES): Add `sfs.mod'.
10319 (sfs_mod_SOURCES): New variable.
10320 (sfs_mod_CFLAGS): Likewise.
10321 (sfs_mod_LDFLAGS): Likewise.
10322
10323 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10324 (pkgdata_MODULES): Add `sfs.mod'.
10325 (sfs_mod_SOURCES): New variable.
10326 (sfs_mod_CFLAGS): Likewise.
10327
10328 * util/grub-emu.c (main): Call `grub_sfs_init' and
10329 `grub_sfs_fini'.
10330
10331 * include/grub/fs.h (grub_sfs_init): New prototype.
10332 (grub_sfs_fini): Likewise.
10333
57bdbde3 103342005-10-07 Marco Gerards <mgerards@xs4all.nl>
10335
10336 Add support for the AFFS filesystem.
10337
10338 * fs/affs.c: New file.
10339
10340 * DISTLIST: Added `fs/affs.c'.
10341
10342 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10343 (grub_probefs_SOURCES): Likewise.
10344 (grub_emu_SOURCES): Likewise.
10345 (pkgdata_MODULES): Add `affs.mod'.
10346 (affs_mod_SOURCES): New variable.
10347 (affs_mod_CFLAGS): Likewise.
10348 (affs_mod_LDFLAGS): Likewise.
10349
10350 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10351 (pkgdata_MODULES): Add `affs.mod'.
10352 (affs_mod_SOURCES): New variable.
10353 (affs_mod_CFLAGS): Likewise.
10354
10355 * util/grub-emu.c (main): Call `grub_affs_init' and
10356 `grub_affs_fini'.
10357
10358 * include/grub/fs.h (grub_affs_init): New prototype.
10359 (grub_affs_fini): Likewise.
10360
047b67e0 103612005-10-01 Marco Gerards <mgerards@xs4all.nl>
10362
10363 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10364
59b8208a 103652005-10-01 Marco Gerards <mgerards@xs4all.nl>
10366
10367 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10368 `-m32' to CFLAGS.
10369
10370 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10371 linking.
f19dbdb7 10372
59b8208a 10373 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10374 (COMMON_LDFLAGS): New variable.
10375 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10376 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10377 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10378 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10379 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10380 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10381 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10382 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10383 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10384 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10385 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10386 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10387 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10388 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10389 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10390 variables.
10391 (normal_mod_ASFLAGS): Add `-m32'.
10392
10393 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10394 (grub_host_size_t, grub_host_ssize_t): New types.
10395 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 10396 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 10397 `GRUB_HOST_SIZEOF_VOID_P'.
10398
10399 * include/grub/kernel.h (struct grub_module_header): Type of
10400 member offset changed to `grub_host_off_t'. Type of member size
10401 changed to `grub_host_size_t'.
10402 (struct grub_module_info): Type of member offset changed to
10403 `grub_host_off_t'. Type of member size changed to
10404 `grub_host_size_t'.
10405
b4093103 104062005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10407
10408 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 10409
b4093103 10410 * kern/i386/pc/startup.S (multiboot_header): New label.
10411 (multiboot_entry): Likewise.
10412 (multiboot_trampoline): Likewise.
10413
10414 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10415 Increased to 0x4A0.
10416
10417 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10418 put parentheses after a question mark.
10419 [!GRUB_UTIL] (my_mod): New variable.
10420
10421 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10422
b2499b29 104232005-09-28 Marco Gerards <mgerards@xs4all.nl>
10424
10425 Adds support for the XFS filesystem. Btrees are not supported
10426 yet.
10427
10428 * fs/xfs.c: New file.
10429
10430 * DISTLIST: Added `fs/xfs.c'.
10431
10432 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10433 (grub_probefs_SOURCES): Likewise.
10434 (grub_emu_SOURCES): Likewise.
10435 (pkgdata_MODULES): Add `xfs.mod'.
10436 (xfs_mod_SOURCES): New variable.
10437 (xfs_mod_CFLAGS): Likewise.
10438
10439 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10440 (pkgdata_MODULES): Add `xfs.mod'.
10441 (xfs_mod_SOURCES): New variable.
10442 (xfs_mod_CFLAGS): Likewise.
10443
10444 * util/grub-emu.c (main): Call `grub_xfs_init' and
10445 `grub_xfs_fini'.
10446
10447 * include/grub/fs.h (grub_xfs_init): New prototype.
10448 (grub_xfs_fini): Likewise.
10449
f19dbdb7 10450
83d37a62 104512005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10452
10453 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10454 color modes, allow greater than 16 colors to be configured as
10455 a default palette.
10456
47d2d65e 104572005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10458
10459 * normal/completion.c (complete_arguments): Add the qualifier
10460 const into OPTIONS.
10461
10462 From Omniflux <omniflux+lists@omniflux.com>:
10463 * include/grub/terminfo.h: New file.
10464 * include/grub/tparm.h: Likewise.
10465 * include/grub/i386/pc/serial.h: Likewise.
10466 * term/terminfo.c: Likewise.
10467 * term/tparm.c: Likewise.
10468 * term/i386/pc/serial.c: Likewise.
10469 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10470 serial.mod.
10471 (terminfo_mod_SOURCES): New variable.
10472 (terminfo_mod_CFLAGS): Likewise.
10473 (serial_mod_SOURCES): Likewise.
10474 (serial_mod_CFLAGS): Likewise.
10475
48b671ff 104762005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10477
10478 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10479 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10480 and kern/powerpc/ieee1275/cmain.c, respectively.
10481
10482 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10483 * kern/powerpc/ieee1275/crt0.S: ... here.
10484
10485 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10486 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 10487
48b671ff 10488 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10489 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10490 instead of boot/powerpc/ieee1275/crt0.S and
10491 boot/powerpc/ieee1275/cmain.c, respectively.
10492
10493 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10494 sectors. It was not used anyway.
10495
09fc77a7 104962005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10497
10498 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10499 `unused parameter' warning.
10500
003789c7 105012005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10502
10503 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10504 function.
10505 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10506 getcharwidth.
10507
67f44c86 105082005-08-28 Marco Gerards <metgerards@student.han.nl>
10509
10510 * include/grub/normal.h (enum grub_completion_type): Added
10511 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10512
10513 * normal/cmdline.c (print_completion): Handle
10514 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10515 * normal/menu_entry.c (store_completion): Likewise.
10516
10517 * normal/completion.c (complete_arguments): New function.
10518 (grub_normal_do_completion): Call `complete_arguments' when the
10519 current words start with a dash.
10520
0b5abe02 105212005-08-27 Marco Gerards <metgerards@student.han.nl>
10522
10523 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10524 `gzio.mod' instead of `io.mod').
10525
d9864ee1 105262005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10527
10528 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10529 (DISTDIRS): Added io and video.
10530 Rewrite the search routine to make an output consistently.
10531
10532 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10533 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10534 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10535 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10536 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10537 util/powerpc/ieee1275/misc.c.
f19dbdb7 10538
d9864ee1 10539 * include/grub/gzio.h: New file.
10540 * io/gzio.c: Likewise.
f19dbdb7 10541
d9864ee1 10542 * kern/file.c (grub_file_close): Call grub_device_close only if
10543 FILE->DEVICE is not NULL.
10544
10545 * include/grub/mm.h [!NULL] (NULL): New macro.
10546
10547 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10548
10549 * conf/powerpc-ieee1275.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 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10555 (pkgdata_MODULES): Added gzio.mod.
10556 (gzio_mod_SOURCES): New variable.
10557 (gzio_mod_CFLAGS): Likewise.
10558
10559 * commands/cat.c: Include grub/gzio.h.
10560 (grub_cmd_cat): Use grub_gzfile_open instead of
10561 grub_file_open.
f19dbdb7 10562
d9864ee1 10563 * commands/cmp.c: Include grub/gzio.h.
10564 (grub_cmd_cmp): Use grub_gzfile_open instead of
10565 grub_file_open.
10566
10567 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10568 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10569 grub_file_open.
10570 (grub_rescue_cmd_module): Likewise.
10571
fa46f4b5 105722005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10573
10574 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10575 kern/sparc64/ieee1275/init.c because it contains _start.
10576 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10577
e9211b5d 105782005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10579
10580 * configure.ac: Add support for sparc64 host with ieee1275
10581 firmware.
10582 * configure: Generated from configure.ac.
10583 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10584 instead of int.
10585 (grub_ofdisk_read): Likewise.
10586 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10587 pointers as (void *) to remove a warning.
10588 (grub_ofdisk_close): Likewise.
10589 (grub_ofdisk_read): Likewise.
10590 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10591 returns, so make it return void to remove a warning.
10592 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10593 Corresponding prototype change.
10594 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10595 values, and cast the pointers as (void *) to remove a warning.
10596 (grub_mm_dump): Likewise.
10597 * conf/sparc64-ieee1275.mk: New file.
10598 * conf/sparc64-ieee1275.rmk: Likewise.
10599 * include/grub/sparc64/setjmp.h: Likewise.
10600 * include/grub/sparc64/types.h: Likewise.
10601 * include/grub/sparc64/ieee1275/console.h: Likewise.
10602 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10603 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10604 * include/grub/sparc64/ieee1275/time.h: Likewise.
10605 * kern/sparc64/cache.c: Likewise.
10606 * kern/sparc64/dl.c: Likewise.
10607 * kern/sparc64/ieee1275/init.c: Likewise.
10608 * kern/sparc64/ieee1275/openfw.c: Likewise.
10609
385c6a92 106102005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10611
10612 * util/console.c (grub_ncurses_putchar): If C is greater than
10613 0x7f, set C to a question mark.
10614 (grub_ncurses_getcharwidth): New function.
10615 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10616 getcharwidth.
10617
10618 * normal/menu.c (print_entry): Made aware of Unicode. First,
10619 convert TITLE to UCS-4, and predict the cursor position by
10620 grub_getcharwidth.
10621
10622 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10623 const to SRC.
10624 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10625
16ccb8b1 106262005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10627
10628 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10629 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10630 grub_strcat.
10631
10632 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10633 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10634 grub_strcpy and grub_strlen. Take it into account that a space
10635 character is inserted as a delimiter.
10636
6a85ce79 106372005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10638
10639 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 10640 invalid magic in the error.
6a85ce79 10641
10642 * commands/search.c: New file.
f19dbdb7 10643
6a85ce79 10644 * util/grub-emu.c (main): Call grub_search_init and
10645 grub_search_fini.
10646
10647 * kern/rescue.c (grub_rescue_print_disks): Removed.
10648 (grub_rescue_print_devices): New function.
10649 (grub_rescue_cmd_ls): Use grub_device_iterate with
10650 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10651 grub_rescue_print_disks.
10652
10653 * kern/partition.c (grub_partition_iterate): Return the result of
10654 PARTMAP->ITERATE instead of GRUB_ERRNO.
10655
10656 * kern/device.c: Include grub/partition.h.
10657 (grub_device_iterate): New function.
10658
10659 * include/grub/partition.h (grub_partition_iterate): Return int
10660 instead of grub_err_t.
10661
10662 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10663 prototype.
10664 [GRUB_UTIL] (grub_search_fini): Likewise.
10665
10666 * include/grub/device.h (grub_device_iterate): New prototype.
10667
10668 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10669 commands/search.c.
10670 (pkgdata_MODULES): Added search.mod.
10671 (search_mod_SOURCES): New variable.
10672 (search_mod_CFLAGS): Likewise.
10673
10674 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10675 (pkgdata_MODULES): Added search.mod.
10676 (search_mod_SOURCES): New variable.
10677 (search_mod_CFLAGS): Likewise.
10678
10679 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10680 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10681 All callers changed.
10682
10683 * DISTLIST: Added commands/search.c.
10684
ef095434 106852005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10686
10687 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10688 conversion.
10689 (grub_getcharwidth): New function.
10690
10691 * kern/misc.c (grub_utf8_to_ucs4): New function.
10692
10693 * include/grub/term.h (struct grub_term): Added a new member
10694 "getcharwidth".
10695 (grub_getcharwidth): New prototype.
10696
10697 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10698
10699 * term/i386/pc/console.c (map_char): New function. Segregated from
10700 grub_console_putchar.
10701 (grub_console_putchar): Use map_char.
10702 (grub_console_getcharwidth): New function.
10703 (grub_console_term): Specified grub_console_getcharwidth as
10704 getcharwidth.
10705
10706 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10707 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10708
10709 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10710 GRUB_ERRNO.
10711 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10712 on grub_strtoul completely.
10713 (write_char): Declare local variables in the beginning of the
10714 function.
10715 (grub_vesafb_getcharwidth): New function.
10716 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10717 getcharwidth.
10718
1f0a95e4 107192005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10720
10721 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10722 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10723 commands/i386/pc/vbetest.c.
10724
10725 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10726 call grub_vbe_get_controller_info again, because the returned
10727 information is volatile.
10728 (grub_vbe_set_video_mode): Mostly rewritten.
10729 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10730 grub_vbe_status_t correctly.
10731 (grub_vbe_get_video_mode_info): Likewise.
10732 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10733 several if statements.
10734
10735 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10736 * commands/i386/pc/vbeinfo.c: ... this.
10737
10738 * commands/i386/pc/vbe_test.c: Renamed to ...
10739 * commands/i386/pc/vbetest.c: ... this.
10740
10741 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10742 ...
10743 (grub_cmd_vbeinfo): ... this. Save video modes before
10744 iterating. Skip a video mode, if it is not available, not enough
10745 information is given or it is monochrome. Show the memory
10746 model. Leave the interpretation of MODEVAR to grub_strtoul
10747 completely.
10748 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10749 (GRUB_MOD_FINI): Likewise.
10750
10751 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10752 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10753 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10754 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10755 grub_strtoul completely.
10756 (real2pm): Removed.
10757 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10758 (GRUB_MOD_FINI): Likewise.
10759
10760 * normal/misc.c: Include grub/mm.h.
10761
10762 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10763 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10764 (vbe_list_modes_mod_SOURCES): Removed.
10765 (vbe_list_modes_mod_CFLAGS): Likewise.
10766 (vbe_test_mod_SOURCES): Likewise.
10767 (vbe_test_mod_CFLAGS): Likewise.
10768 (vbeinfo_mod_SOURCES): New variable.
10769 (vbeinfo_mod_CFLAGS): Likewise.
10770 (vbetest_mod_SOURCES): Likewise.
10771 (vbetest_mod_CFLAGS): Likewise.
10772
992ffbbe 107732005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10774
10775 * normal/misc.c: New file.
10776
10777 * DISTLIST: Added normal/misc.c.
f19dbdb7 10778
992ffbbe 10779 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10780 DISK to HOOK. Call HOOK with DISK.
10781 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10782 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10783 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10784
10785 * normal/menu_entry.c (struct screen): Added a new member
10786 "completion_shown".
10787 (completion_buffer): New global variable.
10788 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10789 (store_completion): New function.
10790 (complete): Likewise.
10791 (clear_completions): Likewise.
10792 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10793 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10794 a tab, call complete.
10795
10796 * normal/completion.c (disk_dev): Removed.
10797 (print_simple_completion): Likewise.
10798 (print_partition_completion): Likewise.
10799 (print_func): New global variable.
10800 (add_completion): Do not take the arguments WHAT or PRINT any
10801 longer. Added a new argument TYPE. Instead of printing directly,
10802 call PRINT_FUNC if not NULL.
10803 All callers changed.
10804 (complete_device): Use a local variable DEV instead of
10805 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10806 (grub_normal_do_completion): Take a new argument HOOK. Do not
10807 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10808 empty string, return NULL instead.
10809 All callers changed.
10810
10811 * normal/cmdline.c (print_completion): New function.
10812
10813 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10814 to HOOK.
10815 All callers changed.
10816
10817 * kern/disk.c (grub_print_partinfo): Removed.
10818
10819 * include/grub/partition.h (struct grub_partition_map): Add a new
10820 argument DISK into HOOK of ITERATE.
10821 (grub_partition_iterate): Add a new argument DISK to HOOK.
10822
10823 * include/grub/normal.h (enum grub_completion_type): New enum.
10824 (grub_completion_type_t): New type.
10825 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10826 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10827 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10828 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10829 (grub_normal_do_completion): Added a new argument HOOK.
10830 (grub_normal_print_device_info): New prototype.
10831
10832 * include/grub/disk.h (grub_print_partinfo): Removed.
10833
10834 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10835 (normal_mod_SOURCES): Likewise.
10836 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10837 (normal_mod_SOURCES): Likewise.
10838
10839 * commands/ls.c (grub_ls_list_disks): Use
10840 grub_normal_print_device_info instead of grub_print_partinfo. Free
10841 PNAME.
10842 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10843 duplicating the code.
10844
0bd41162 108452005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10846
10847 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 10848 follow GCS more precisely.
10849 * commands/i386/pc/vbe_test.c: Likewise.
10850 * include/grub/i386/pc/vbe.h: Likewise.
10851 * term/i386/pc/vesafb.c: Likewise.
10852 * video/i386/pc/vbe.c: Likewise.
0bd41162 10853
6323696a 108542005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10855
10856 * DISTLIST: Added term/i386/pc/vesafb.c
10857 DISTLIST: Added video/i386/pc/vbe.c
10858 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10859 DISTLIST: Added commands/i386/pc/vbe_test.c.
10860 * commands/i386/pc/vbe_list_modes.c: New file.
10861 * commands/i386/pc/vbe_test.c: Likewise.
10862 * term/i386/pc/vesafb.c: Likewise.
10863 * video/i386/pc/vbe.c: Likewise.
10864 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10865 (grub_vbe_probe) Added prototype.
10866 (grub_vbe_set_video_mode) Likewise.
10867 (grub_vbe_get_video_mode) Likewise.
10868 (grub_vbe_get_video_mode_info) Likewise.
10869 (grub_vbe_set_pixel_rgb) Likewise.
10870 (grub_vbe_set_pixel_index) Likewise.
10871 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10872 (pkgdata_MODULES): Added vesafb.mod.
10873 (pkgdata_MODULES): Added vbe_list_modes.mod.
10874 (pkgdata_MODULES): Added vbe_test.mod.
10875 (vbe_mod_SOURCES): Added.
10876 (vbe_mod_CFLAGS): Likewise.
10877 (vesafb_mod_SOURCES): Likewise.
10878 (vesafb_mod_CFLAGS): Likewise.
10879 (vbe_list_modes_mod_SOURCES): Likewise.
10880 (vbe_list_modes_mod_CFLAGS): Likewise.
10881 (vbe_test_mod_SOURCES): Likewise.
10882 (vbe_test_mod_CFLAGS): Likewise.
10883
0a74e62f 108842005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10885
0a74e62f 10886 * normal/command.c (grub_command_execute): If INTERACTIVE is
10887 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10888 CMDLINE. Disable the pager if INTERACTIVE is true.
10889 All callers are changed.
10890
10891 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10892 before reading a config file.
10893 * normal/main.c (read_config_file): Even if a command is not
10894 found, register it if it is within an entry.
10895
10896 * util/grub-emu.c: Include sys/types.h and unistd.h.
10897 (options): Added --hold.
10898 (struct arguments): Added a new member "hold".
10899 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10900 missing.
10901 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10902 cleared by a debugger, if it is not zero.
10903
10904 * include/grub/normal.h (grub_command_execute): Add an argument
10905 INTERACTIVE.
10906
e51f85ae 109072005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10908
10909 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10910
e9c6f39b 109112005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10912
10913 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10914 program with another one, because the old one didn't detect a bug
10915 in gcc-3.4. Always use regparm 2, because the new test is still
10916 not enough for gcc-4.0. Someone must investigate a simple test
10917 case which detects a bug in gcc-4.0.
10918
8de3495c 109192005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10920
10921 * DISTLIST: Added normal/completion.c.
10922
10923 * normal/completion.c: New file.
f19dbdb7 10924
8de3495c 10925 * term/i386/pc/console.c (grub_console_getwh): New function.
10926 (grub_console_term): Assign grub_console_getwh to getwh.
10927
10928 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10929 function is defined in normal/completion.c as
10930 grub_normal_do_completion.
10931 (grub_cmdline_get): Use grub_normal_do_completion instead of
10932 grub_tab_complete.
10933
10934 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10935 returns non-zero, otherwise return 0.
10936 (grub_partition_iterate): First, probe the partition map. Then,
10937 call ITERATE only for this partition map.
10938
10939 * kern/misc.c (grub_strncmp): Rewritten.
10940
10941 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10942 returns non-zero. Otherwise return 0.
10943
10944 * include/grub/partition.h (grub_partition_map_iterate): Return
10945 int instead of void.
10946
10947 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10948
10949 * include/grub/misc.h (grub_strncmp): Change the type of N to
10950 grub_size_t.
10951
10952 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10953 of void.
10954
10955 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 10956 unsigned explicitly before comparing it with I.
8de3495c 10957
10958 * kern/main.c (grub_env_write_root): Add the attribute unused into
10959 VAR.
10960
10961 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10962 normal/completion.c.
10963 (normal_mod_SOURCES): Likewise.
10964 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10965 (normal_mod_SOURCES): Likewise.
10966
10967 * normal/command.c (grub_iterate_commands): If ITERATE returns
10968 non-zero, return one immediately.
10969
e85e144b 109702005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10971
10972 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10973 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10974 descriptions.
10975 (grub_vbe_get_controller_info): New function.
10976 (grub_vbe_get_mode_info): Likewise.
10977 (grub_vbe_set_mode): Likewise.
10978 (grub_vbe_get_mode): Likewise.
10979 (grub_vbe_set_memory_window): Likewise.
10980 (grub_vbe_get_memory_window): Likewise.
10981 (grub_vbe_set_scanline_length): Likewise.
10982 (grub_vbe_get_scanline_length): Likewise.
10983 (grub_vbe_set_display_start): Likewise.
10984 (grub_vbe_get_display_start): Likewise.
10985 (grub_vbe_set_palette_data): Likewise.
10986 * include/grub/i386/pc/vbe.h: New file.
10987
c46153d2 109882005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10989
10990 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10991 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10992 * DISTLIST: Likewise.
10993 * kern/ieee1275/of.c: Moved to ...
10994 * kern/ieee1275/ieee1275.c: ... here.
10995
0cb90c45 109962005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10997
10998 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10999 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11000 Pass 0 as `end' parameter to grub_strtoul().
11001
a19fb360 110022005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11003
11004 * include/grub/powerpc/ieee1275/console.h: Do not include
11005 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11006 ifdef.
11007 (grub_console_cur_color): Remove i386-specific prototype.
11008 (grub_console_real_putchar): Likewise.
11009 (grub_console_checkkey): Likewise.
11010 (grub_console_getkey): Likewise.
11011 (grub_console_getxy): Likewise.
11012 (grub_console_gotoxy): Likewise.
11013 (grub_console_cls): Likewise.
11014 (grub_console_setcursor): Likewise.
11015 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11016 Include <grub/machine/console.h>.
11017 * term/ieee1275/ofconsole.c: Likewise.
11018
4ac9bd04 110192005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11020
11021 * Makefile.in (LIBLZO): New variable.
11022
11023 * configure.ac: Check for LZO version 2.
11024
11025 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11026 lzo/lzo1x.h instead of lzo1x.h.
11027
11028 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11029 of -llzo.
11030
11031 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11032 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11033
11034 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11035 copying the data from PARTITION to P.
11036
f4917dfd 110372005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11038
11039 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11040 negative, unload the module.
11041
11042 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11043 map is "pc_partition_map" but not "pc".
11044 (usage): Fix the description. The options are --boot-image and
11045 --core-image but not --boot-file or --core-file.
11046 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11047 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11048 DEFAULT_DIRECTORY.
11049
11050 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11051 --core-file. Specify INSTALL_DEVICE as an argument.
11052
11053 * util/console.c: Include config.h.
11054 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11055 [HAVE_NCURSES_H]: Include ncurses.h.
11056 [HAVE_CURSES_H]: Include curses.h.
11057 [!A_NORMAL] (A_NORMAL): Defined as zero.
11058 [!A_STANDOUT] (A_STANDOUT): Likewise.
11059
11060 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11061 -lncurses.
11062 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11063
11064 * configure.ac: Check for curses libraries and headers.
11065
11066 * Makefile.in (LIBCURSES): New variable.
11067
11068 * genmk.rb (Script::rule): Set the executable bits.
11069
11070 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11071 name of the PC partition map is "pc_partition_map" but not "pc".
11072
0e143073 110732005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11074
11075 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11076 (modules): Likewise.
11077 (usage): Added descriptions for --modules and --grub-probefs.
11078 Handle --modules and --grub-probefs. Save the arguments in MODULES
11079 and GRUB_PROBEFS, respectively.
11080 Auto-detect a filesystem module against GRUBDIR. If the result is
11081 empty and modules are not specified explicitly, abort the
11082 installation. Add the result to MODULES.
11083
11084 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11085 disk/powerpc/ieee1275/ofdisk.c,
11086 include/grub/powerpc/ieee1275/init.h and
11087 term/powerpc/ieee1275/ofconsole.c.
11088 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11089 term/ieee1275/ofconsole.c.
11090
11091 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11092
11093 * COPYING: Upgraded to the latest version. Only the address of the
11094 FSF office has changed.
f19dbdb7 11095
efd6e6d5 110962005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11097
11098 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11099 kern/ieee1275.c with kern/ieee1275/of.c.
11100
11101 * kern/ieee1275.c: Moved to ...
11102 * kern/ieee1275/of.c: ... here.
11103
8ceafda2 111042005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11105
11106 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 11107 readability.
8ceafda2 11108
11109 * config.guess: Updated to the latest version from gnulib.
11110 * config.sub: Likewise.
11111 * install.sh: Likewise.
11112 * mkinstalldirs: Likewise.
11113
11114 * include/grub/console.h: Removed. This file is arch-specific. Do
11115 not put this in include/grub.
11116
11117 * include/grub/i386/pc/console.h: Resurrected.
11118
11119 * util/console.c: Include grub/machine/console.h instead of
11120 grub/console.h.
11121 * util/grub-emu.c: Likewise.
11122
267f6cd9 111232005-08-04 Marco Gerards <metgerards@student.han.nl>
11124
11125 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11126 hardcoded value.
f19dbdb7 11127
267f6cd9 11128 From Vincent Pelletier <subdino2004@yahoo.fr>
11129 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11130 Redefined to use grub_getwh.
11131 (grub_term): New member named getwh.
11132 (grub_getwh): New prototype.
11133 * kern/term.c (grub_getwh): New function.
11134 * term/i386/pc/console.c (grub_console_getwh): New function.
11135 (grub_console_term): New member `getwh'.
11136 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11137 (grub_vga_term): New member `getwh'.
0b5abe02 11138 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 11139 grub_ssize_t.
11140 (grub_ofconsole_getw): New function.
11141 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11142 (grub_ofconsole_term): New field named getwh and new initial
11143 value.
11144
3be7266d 111452005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11146
11147 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11148 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11149 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11150 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11151 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11152 of <grub/machine/ieee1275.h>.
11153 * commands/ieee1275/reboot.c: Likewise.
11154 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11155 * kern/ieee1275.c: ... to here. All users updated. Change all
11156 parameter structs to use new type `grub_ieee1275_cell_t'.
11157 * term/powerpc/ieee1275/ofconsole.c: Move ...
11158 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11159 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11160 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11161 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11162 to return int.
11163 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11164 Remove unused prototypes. All users updated.
11165 * include/grub/powerpc/ieee1275/console.h: Removed.
11166 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11167 `grub_ieee1275_cell_t'.
11168 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11169 Cast comparisons with -1 to the correct type.
11170 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11171 type to match `grub_ieee1275_entry_fn'.
11172
8b5f3938 111732005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11174
11175 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11176
11177 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11178 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11179 partmap/sun.c.
11180 (grub_probefs_SOURCES): New variable.
11181
11182 * util/i386/pc/grub-probefs.c: New file.
11183
11184 * util/i386/pc/grub-setup.c (main): Call
11185 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11186 grub_hfs_init and grub_jfs_init to initialize the system. Call
11187 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11188 grub_pc_partition_map_fini to finish the system.
11189
ea409713 111902005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11191
11192 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11193 function.
11194 (grub_multiboot_load_elf32): Likewise.
11195 (grub_multiboot_is_elf64): Likewise.
11196 (grub_multiboot_load_elf64): Likewise.
11197 (grub_multiboot_load_elf): Likewise.
11198 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11199 an ELF32 or ELF64 file.
11200 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11201
11202 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11203 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11204 NULL before calling FS->LABEL.
11205 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11206 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11207 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11208 before calling FS->LABEL.
11209
141a288b 112102005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11211
11212 * util/i386/pc/grub-install.in (datadir): New variable.
11213 (libdir): Removed.
11214 (pkgdatadir): New variable.
11215 (pkglibdir): Removed.
11216
0d5f8a54 112172005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11218
11219 * DISTLIST: Added util/i386/pc/grub-install.in.
11220
11221 * util/i386/pc/grub-install.in: New file.
11222
11223 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11224 (grub_install_SOURCES): Likewise.
11225
11226 * genmk.rb: Added support for scripts.
11227 (Script): New class.
11228 (scripts): New variable.
11229
11230 * Makefile.in (install-local): Install sbin_SCRIPTS by
11231 INSTALL_SCRIPT.
11232 (uninstall): Remove sbin_SCRIPTS.
11233
11234 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11235 device, try to get a GRUB device by
11236 grub_util_biosdisk_get_grub_dev.
11237 Free DEST_DEV.
11238
11239 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11240 description for --device-map.
11241
5f968e1e 112422005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11243
11244 Change the semantics of variable hooks. They now return strings
11245 instead of error values.
f19dbdb7 11246
5f968e1e 11247 * util/i386/pc/grub-setup.c: Include grub/env.h.
11248 (setup): Use grub_device_set_root instead of grub_env_set.
11249
11250 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11251 grub_env_get instead of grub_device_set_root and
11252 grub_device_get_root, respectively.
11253
11254 * kern/main.c (grub_env_write_root): New function.
11255 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11256 grub_env_set instead of grub_device_set_root.
11257
11258 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11259 many variables.
11260 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11261 rather than calling ENV->WRITE_HOOK afterwards.
11262 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11263 passing a pointer of a pointer.
11264 (grub_register_variable_hook): Change the types of "read_hook" and
11265 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11266 respectively.
11267 Allocate the default empty string on the heap, because this string
11268 may be freed later.
11269
11270 * kern/device.c: Include grub/env.h.
11271 (grub_device_set_root): Removed.
11272 (grub_device_get_root): Likewise.
11273 (grub_device_open): Use grub_env_get instead of
11274 grub_device_get_root.
11275
11276 * include/grub/env.h (grub_env_read_hook_t): New type.
11277 (grub_env_write_hook_t): Likewise.
11278 (grub_env_var): Change the types of "read_hook" and "write_hook"
11279 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11280 (grub_register_variable_hook): Likewise.
11281
11282 * include/grub/device.h (grub_device_set_root): Removed.
11283 (grub_device_set_root): Likewise.
11284
11285 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11286 make sure that DIRNAME terminates with '/', so that
11287 grub_fat_find_dir will fail if PATH is not a directory.
11288
11289 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11290 from DIRNAME.
11291 Use the qualifier auto for print_files and print_files_long.
11292 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11293 as a regular file.
11294 Put a newline only if there is no error.
11295 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11296 used.
11297
896f0afd 112982005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11299
11300 * kern/partition.c (grub_partition_probe): Initialize PART to
11301 NULL. Otherwise, when no partition map is registered, this returns
11302 a garbage.
11303
b28b81b2 113042005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11305
11306 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11307 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11308 valid.
11309
5f3607e0 113102005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11311
11312 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11313 information on each device, if it does not have partitions. Print
11314 "Device" instead of "Disk", because this function is not specific
11315 to disk devices.
11316
11317 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11318 static to ensure that it is put on the memory rather than a
11319 register.
11320
502c87e8 113212005-07-17 Yoshinori Okuji <okuji@enbug.org>
11322
11323 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11324 (grub_cat_init): Likewise.
11325 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11326 (options): Likewise.
11327 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11328 (grub_configfile_init): Likewise.
11329 * font/manager.c (GRUB_MOD_INIT): Likewise.
11330 * commands/help.c (GRUB_MOD_INIT): Likewise.
11331 (grub_help_init): Likewise.
11332 * normal/command.c (grub_command_init): Likewise.
11333 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11334 * disk/loopback.c (grub_loop_init): Likewise.
11335 (GRUB_MOD_INIT): Likewise.
11336 * commands/ls.c (grub_ls_init): Likewise.
11337 (GRUB_MOD_INIT): Likewise.
11338 (options): Likewise.
11339 * commands/boot.c (grub_boot_init): Likewise.
11340 (GRUB_MOD_INIT): Likewise.
11341 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11342 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11343 (GRUB_MOD_INIT): Likewise.
11344 * commands/cmp.c (grub_cmp_init): Likewise.
11345 (GRUB_MOD_INIT): Likewise.
11346
11347 * normal/arg.c: Use <> instead of "" to include header files.
11348 (SHORT_ARG_HELP): New macro.
11349 (SHORT_ARG_USAGE): Likewise.
11350 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11351 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11352 descriptions.
11353 (find_short): Check if C is 'h' or 'u' explicitly.
11354 (grub_arg_show_help): Use space characters instead of tabs. Treat
11355 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11356 are shown with --help and --usage only if they are not used for
11357 the command itself.
11358 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11359 'h' and 'u'.
11360
11361 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11362 const into "longarg". Change the type of "shortarg" to int.
11363
f806d18e 113642005-07-17 Yoshinori Okuji <okuji@enbug.org>
11365
11366 * boot/i386/pc/boot.S (boot_drive_check): New label.
11367
11368 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11369 macro.
11370
11371 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11372 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11373
e293232b 113742005-07-17 Yoshinori Okuji <okuji@enbug.org>
11375
11376 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11377 When turning off Gate A20, skip the check and return immediately,
11378 because this is not fatal usually.
11379
ebedfd00 113802005-07-17 Yoshinori Okuji <okuji@enbug.org>
11381
11382 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11383 be 0x7C00 instead of 0x8000.
11384
11385 * boot/i386/pc/pxeboot.S: Rewritten.
11386
11387 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11388 EXT_C.
11389 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11390 result.
11391
654fc59f 113922005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11393
11394 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11395 robustness. This routine now supports a BIOS call and System
11396 Control Port A to modify the gate A20.
11397
11398 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11399 Increased to 0x440.
11400
09f9923f 114012005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11402
11403 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11404 device path and resulting ihandle.
11405 (grub_ofdisk_close): dprintf the ihandle being closed.
11406 (grub_ofdisk_read): dprintf function parameters.
11407 * kern/mm.c (grub_mm_init_region): Likewise.
11408 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11409 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11410 size, and boot arguments.
11411 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11412 before loading into memory.
11413 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11414 before loading into memory.
11415
7ef504d8 114162005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11417
11418 * kern/mm.c: Added much documentation.
11419 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11420 8, set to 5 instead of 8.
11421
e0f050c2 114222005-07-10 Yoshinori Okuji <okuji@enbug.org>
11423
11424 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11425
11426 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11427 (grub_mkdevicemap_SOURCES): New variable.
11428
11429 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11430 lib/device.c of GRUB Legacy.
11431
7224189a 114322005-07-10 Yoshinori Okuji <okuji@enbug.org>
11433
11434 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11435 instead of PATH is NULL.
11436
68c864eb 114372005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11438
11439 * commands/cmp.c (BUFFER_SIZE): New macro.
11440 (grub_cmd_cmp): Close the right file at the right time. Compare
11441 only data just read. Don't report files of different size as
11442 identical. Dynamically allocate buffers. Move variable
11443 declarations at the beginning of function.
11444
e6f3e614 114452005-07-09 Yoshinori Okuji <okuji@enbug.org>
11446
11447 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11448 reverse.
11449
f8f1559a 114502004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11451
11452 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11453 when backspace is pressed at beginning of line.
11454
39c9d41d 114552005-07-03 Yoshinori Okuji <okuji@enbug.org>
11456
11457 * DISTLIST: Added genfslist.sh.
11458
11459 * normal/main.c (fs_module_list): New variable.
11460 (autoload_fs_module): New function.
11461 (read_fs_list): Likewise.
11462 (grub_normal_execute): Call read_fs_list.
11463
11464 * kern/fs.c (grub_fs_autoload_hook): New variable.
11465 (grub_fs_probe): Added support for auto-loading.
11466
11467 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11468 (grub_fs_module_list_t): New type.
11469
11470 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11471 (grub_fs_autoload_hook): New prototype.
11472
11473 * genfslist.sh: New file.
f19dbdb7 11474
39c9d41d 11475 * genmk.rb: Added a rule to generate a filesystem list.
11476
121c1d83 114772005-06-30 Marco Gerards <metgerards@student.han.nl>
11478
11479 * configure.ac: Fix the test for cross-compiling.
11480
11481 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11482 define GRUB_UTIL anymore.
11483
11484 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11485 so this function works on other systems than just big endian.
11486 (load_modules): Likewise.
11487 (add_segments): Likewise.
11488
e75d76e1 114892005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11490
11491 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11492 contains `l' modifier, get a long from va_arg().
11493
50b5a0a7 114942005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11495
11496 * kern/mm.c (grub_free): If the next free block which is being
11497 merged is the first free block, set the first block to the block
11498 being freed.
11499 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11500
89371b20 115012005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11502
11503 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11504 `grub_ieee1275_chosen'.
11505
168d6e58 115062005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11507
11508 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11509 (grub_ieee1275_chosen): New variable.
11510 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11511 `chosen'.
11512 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11513 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11514 Rename first argument to `phandle' for consistency.
11515 (grub_ieee1275_get_property_length): Likewise.
11516 (grub_ieee1275_next_property): Likewise. Change type of first argument
11517 to grub_ieee1275_phandle_t.
11518 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11519 Move export next to declaration.
11520 (grub_ieee1275_chosen): New variable.
11521 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11522 Correct cosmetic typo.
11523 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11524 `grub_ieee1275_chosen'.
11525 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11526 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11527 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11528 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11529 `grub_ieee1275_chosen'.
11530
ca5baa3f 115312005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11532
11533 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11534 /chosen/bootargs.
11535 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11536 /chosen/bootargs as "variable=value" pairs.
11537
708b345f 115382005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11539
11540 * include/grub/misc.h (grub_dprintf): New macro.
11541 (grub_real_dprintf): New prototype.
11542 (grub_strword): Likewise.
11543 (grub_iswordseparator): Likewise.
11544 * kern/misc.c (grub_real_dprintf): New function.
11545 (grub_strword): Likewise.
11546 (grub_iswordseparator): Likewise.
11547
f4c5e67c 115482005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11549
11550 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11551 (roundup): Remove macro.
11552 (grub_ieee1275_flags): Make static.
11553 (grub_ieee1275_realmode): Remove.
11554 (grub_ieee1275_test_flag): New function.
11555 (grub_ieee1275_set_flag): Likewise.
11556 (find_options): Rename to `grub_ieee1275_find_options'; update
11557 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11558 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11559 (cmain): New prototype.
11560 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11561 `grub_ieee1275_flags' directly.
11562 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11563 machine/biosdisk.h.
11564 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11565 Don't include grub/machine/init.h.
11566 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11567 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11568 Remove prototype.
11569 (grub_ieee1275_realmode): Likewise.
11570 (grub_ieee1275_flag): New enum.
11571 (grub_ieee1275_test_flag): New prototype.
11572 (grub_ieee1275_set_flag): New prototype.
11573 * include/grub/powerpc/ieee1275/init.h: Remove file.
11574 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11575 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11576 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11577 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11578 comment.
11579 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11580 `grub_ieee1275_test_flag'.
11581 (grub_ieee1275_encode_devname): Likewise.
11582
ed16607e 115832005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11584
11585 * include/grub/powerpc/ieee1275/ieee1275.h
11586 (grub_ieee1275_encode_devname): New prototype.
11587 (grub_ieee1275_get_filename): Likewise.
11588 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11589 function.
11590 (grub_set_prefix): Likewise.
11591 (grub_machine_init): Call grub_set_prefix.
11592 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11593 (grub_parse_type): New enum.
11594 (grub_ieee1275_get_devargs): New function.
11595 (grub_ieee1275_get_devname): Likewise.
11596 (grub_ieee1275_parse_args): Likewise.
11597 (grub_ieee1275_get_filename): Likewise.
11598 (grub_ieee1275_encode_devname): Likewise.
11599
be369920 116002005-03-30 Marco Gerards <metgerards@student.han.nl>
11601
11602 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11603 `grub_loader_unset'.
11604
a5ce3a4a 116052005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11606
11607 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11608 instead of grub_ieee1275_interpret.
11609 (grub_halt_init): New function.
11610 (grub_halt_fini): Likewise.
11611 (GRUB_MOD_INIT): Correct message grammar.
11612 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11613 instead of grub_ieee1275_interpret.
11614 (grub_reboot_init): New function.
11615 (grub_reboot_fini): Likewise.
11616 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11617 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11618 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11619 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11620 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11621 function.
11622 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11623 Add prototype.
11624 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11625 prototype.
11626 (grub_halt): Likewise.
11627 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11628 (cmain): Remove __attribute__((unused)).
11629 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11630 (grub_heap_len): Likewise.
11631 (grub_machine_fini): New function.
11632 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11633 (grub_halt): Likewise.
11634 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11635 function.
11636 * util/powerpc/ieee1275/misc.c: New file.
11637
0058f771 116382005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11639
11640 * DISTLIST: New file.
11641 * gendistlist.sh: Likewise.
f19dbdb7 11642
0058f771 11643 * Makefile.in (COMMON_DISTFILES): Removed.
11644 (BOOT_DISTFILES): Likewise.
11645 (CONF_DISTFILES): Likewise.
11646 (DISK_DISTFILES): Likewise.
11647 (FS_DISTFILES): Likewise.
11648 (INCLUDE_DISTFILES): Likewise.
11649 (KERN_DISTFILES): Likewise.
11650 (LOADER_DISTFILES): Likewise.
11651 (TERM_DISTFILES): Likewise.
11652 (UTIL_DISTFILES): Likewise.
11653 (DISTFILES): Likewise.
11654 (uninstall): Uninstall files in $(pkgdata_DATA).
11655 (DISTLIST): New target.
11656 (distdir): Use the contents of the file DISTLIST to get a list of
11657 distributed files.
11658
46b3b8a5 116592005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11660
11661 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11662 descriptor. This is ported from GRUB Legacy.
11663
11664 * gencmdlist.sh: Added an extra semicolon to make it work with
11665 old sed versions. Reported by Robert Bihlmeyer
11666 <robbe@orcus.priv.at>.
11667
5822ff87 116682005-03-08 Yoshinori Okuji <okuji@enbug.org>
11669
11670 Automatic loading of commands is supported.
f19dbdb7 11671
5822ff87 11672 * normal/main.c (read_command_list): New function.
11673 (grub_normal_execute): Call read_command_list.
11674
11675 * normal/command.c (grub_register_command): Return zero or CMD.
11676 Allocate CMD->NAME from the heap.
11677 Initialize CMD->MODULE_NAME to zero.
11678 Find the same name as well. If the same command is found and it is
11679 a dummy command, overwrite members. If it is not a dummy command,
11680 return zero.
11681 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11682 (grub_command_find): If a dummy command is found, load a module
11683 and retry to find a command only once.
11684
11685 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11686 make sure that each command is loaded.
11687
11688 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11689 macro.
11690 (struct grub_command): Remove const from the member `name'.
11691 Add a new member `module_name'.
11692 (grub_register_command): Return grub_command_t.
11693
11694 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11695 sure that each command is loaded.
11696
11697 * genmk.rb (PModule::rule): Specify a module name without the
11698 suffix ".mod" to gencmdlist.sh.
11699
7b1f4b57 117002005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11701
11702 * gencmdlist.sh: New file.
f19dbdb7 11703
7b1f4b57 11704 * genmk.rb (PModule::rule): Generate a rule for a command list.
11705 Clean command.lst.
11706 Generate command.lst from $(COMMANDFILES).
11707
11708 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11709 (DATA): Added $(pkgdata_DATA).
11710 (install-local): Install files in $(pkgdata_DATA).
11711
062aaf39 117122005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11713
11714 * term/i386/pc/vga.c (debug_command): Removed.
11715 (GRUB_MOD_INIT): Do not register the command "debug".
11716
11717 From Hollis Blanchard:
11718 * commands/configfile.c: New file.
11719 * conf/i386-pc.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 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11725 commands/configfile.c.
11726 (pkgdata_MODULES): Added configfile.mod.
11727 (configfile_mod_SOURCES): New variable.
11728 (configfile_mod_CFLAGS): Likewise.
11729 * util/grub-emu.c (main): Call grub_configfile_init and
11730 grub_configfile_fini.
11731 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11732 prototype.
11733 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 11734
cee01aa6 117352005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11736
11737 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11738 address.
11739
11740 * commands/help.c (grub_cmd_help): Do not print newlines after
11741 the last command in print_command_help.
11742
93f3a1d8 117432005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11744
11745 * commands/default.h: New file.
11746 * commands/timeout.h: Likewise.
11747 * normal/context.c: Likewise.
f19dbdb7 11748
93f3a1d8 11749 * util/misc.c: Do not include sys/times.h.
11750 Include sys/time.h and grub/machine/time.h.
11751 (grub_get_rtc): Rewritten with gettimeofday.
11752
11753 * util/grub-emu.c (main): Call grub_default_init and
11754 grub_timeout_init before grub_normal_init, and call
11755 grub_timeout_fini and grub_default_fini after grub_main.
11756
11757 * util/console.c (grub_ncurses_checkkey): Return the read
11758 character or -1.
11759
11760 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11761 timeouts.
11762
11763 * normal/main.c (read_config_file): Push MENU. If this fails,
11764 print an error and wait for a user input.
11765 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11766 If a menu is empty or an error occurs, pop MENU.
11767 (grub_normal_execute): Pop and free MENU after grub_menu_run
11768 returns.
11769
11770 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11771
11772 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11773 include time.h.
11774 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11775 without GRUB_UTIL.
11776 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11777 time.h.
11778 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11779 without GRUB_UTIL.
11780
11781 * include/grub/normal.h (struct grub_menu_list): New struct.
11782 (grub_menu_list_t): New type.
11783 (struct grub_context): New struct.
11784 (grub_context_t): New type.
11785 (grub_register_command): Got rid of EXPORT_FUNC.
11786 (grub_unregister_command): Likewise.
11787 (grub_context_get): New prototype.
11788 (grub_context_get_current_menu): Likewise.
11789 (grub_context_push_menu): Likewise.
11790 (grub_context_pop_menu): Likewise.
11791 [GRUB_UTIL] (grub_default_init): Likewise.
11792 [GRUB_UTIL] (grub_default_fini): Likewise.
11793 [GRUB_UTIL] (grub_timeout_init): Likewise.
11794 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11795
11796 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11797 commands/timeout.c and normal/context.c.
11798 (pkgdata_MODULES): Added default.mod and timeout.mod.
11799 (normal_mod_SOURCES): Added normal/context.c.
11800 (default_mod_SOURCES): New variable.
11801 (default_mod_CFLAGS): Likewise.
11802 (timeout_mod_SOURCES): Likewise.
11803 (timeout_mod_CFLAGS): Likewise.
11804 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11805 conf/i386-pc.rmk.
11806 (pkgdata_MODULES): Added default.mod and timeout.mod.
11807 (normal_mod_SOURCES): Added normal/context.c.
11808 (default_mod_SOURCES): New variable.
11809 (default_mod_CFLAGS): Likewise.
11810 (timeout_mod_SOURCES): Likewise.
11811 (timeout_mod_CFLAGS): Likewise.
11812
11813 * Makefile.in (all-local): Added $(MKFILES).
11814
4ed2e1dd 118152005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11816
11817 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11818 (grub_emu_SOURCES): Likewise.
11819 (pkgdata_MODULES): Add `sun.mod'.
11820 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11821 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11822 `partmap/sun.c'.
11823 (pkgdata_MODULES): Add `sun.mod'.
11824 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11825 * include/grub/partition.h (grub_sun_partition_map_init): New
11826 prototype.
11827 (grub_sun_partition_map_fini): Likewise.
11828 * partmap/sun.c: New file.
11829 * util/grub-emu.c (main): Initialize and de-initialize the sun
11830 partitionmap support.
11831
4d4e372e 118322005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11833
11834 This implements an Emacs-like menu entry editor.
f19dbdb7 11835
4d4e372e 11836 * normal/menu_entry.c: New file.
f19dbdb7 11837
4d4e372e 11838 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11839 characters to ASCII.
11840 (saved_char): New variable.
11841 (grub_ncurses_checkkey): Rewritten completely.
11842 (grub_ncurses_getkey): Likewise.
11843 (grub_ncurses_init): Call raw instead of cbreak.
11844
11845 * normal/menu.c (print_entry): Do not put a space.
11846 (init_page): Renamed to ...
11847 (grub_menu_init_page): ... this. All callers changed.
11848 (edit_menu_entry): Removed.
11849 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11850
11851 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11852
11853 * kern/misc.c (grub_vprintf): Call grub_refresh.
11854
11855 * normal/menu.c (DISP_LEFT): Renamed to ...
11856 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11857 * normal/menu.c (DISP_UP): Renamed to ...
11858 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11859 * normal/menu.c (DISP_RIGHT): Renamed to ...
11860 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11861 * normal/menu.c (DISP_DOWN): Renamed to ...
11862 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11863 * normal/menu.c (DISP_HLINE): Renamed to ...
11864 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11865 * normal/menu.c (DISP_VLINE): Renamed to ...
11866 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11867 * normal/menu.c (DISP_UL): Renamed to ...
11868 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11869 * normal/menu.c (DISP_UR): Renamed to ...
11870 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11871 * normal/menu.c (DISP_LL): Renamed to ...
11872 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11873 * normal/menu.c (DISP_LR): Renamed to ...
11874 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11875 * normal/menu.c (TERM_WIDTH): Renamed to ...
11876 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11877 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11878 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11879 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11880 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11881 * normal/menu.c (TERM_MARGIN): Renamed to ...
11882 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11883 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11884 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11885 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11886 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11887 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11888 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11889 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11890 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11891 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11892 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11893 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11894 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11895 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11896 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11897 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11898 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11899 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11900 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11901 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11902 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11903 All callers changed.
11904
11905 * include/grub/normal.h: New prototype.
11906
11907 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11908 normal/menu_entry.c.
11909 (normal_mod_SOURCES): Likewise.
11910 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11911 (normal_mod_SOURCES): Likewise.
11912
e6b92c8a 119132005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11914
11915 * include/grub/normal.h (grub_halt_init): New prototype.
11916 (grub_halt_fini): Likewise.
11917 (grub_reboot_init): Likewise.
11918 (grub_reboot_fini): Likewise.
11919
11920 * util/grub-emu.c: Include signal.h.
11921 (main_env): New global variable.
11922 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11923 catch C-c.
11924 (grub_machine_fini): New function.
11925 (main): Call grub_halt_init and grub_reboot_init before
11926 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11927 Call setjmp with MAIN_ENV to go back afterwards.
11928 Call grub_machine_fini right before return.
11929
11930 * include/grub/util/misc.h: Include setjmp.h.
11931 (main_env): New prototype.
11932
11933 * include/grub/kernel.h (grub_machine_fini): New prototype.
11934 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11935 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11936
11937 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11938 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11939 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 11940
e6b92c8a 11941 * util/i386/pc/misc.c: New file.
f19dbdb7 11942
e6b92c8a 11943 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11944 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11945 commands/i386/pc/reboot.c.
11946
c642636f 119472005-02-14 Guillem Jover <guillem@hadrons.org>
11948
11949 * include/grub/dl.h (grub_dl_check_header): New prototype.
11950 (grub_arch_dl_check_header): Change return type to grub_err_t,
11951 remove size parameter and export function. Update all callers.
11952 * kern/dl.c (grub_dl_check_header): New function.
11953 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11954 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11955 are inside the core.
11956 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11957 independent ELF header checks.
11958 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11959 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11960 `grub_dl_check_header' instead of explicit checks. Check for the
11961 ELF type.
11962 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11963 `grub_dl_check_header' instead of explicit checks. Remove arch
11964 specific ELF header checks.
11965
e6b92c8a 11966 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11967 argument SIZE.
11968
5eabe94b 119692005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11970
11971 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11972 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11973
1b14a681 119742005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11975
11976 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 11977 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 11978 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 11979 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 11980 * partmap/amiga.c (amiga_partition_map_iterate): Return
11981 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11982 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11983
aca108aa 119842005-02-01 Guillem Jover <guillem@hadrons.org>
11985
11986 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11987 help info.
11988
c9f9c556 119892005-01-31 Marco Gerards <metgerards@student.han.nl>
11990
11991 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11992 Removed prototype.
11993 (grub_rescue_cmd_linux): New prototype.
11994 (grub_rescue_cmd_initrd): Likewise.
11995 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11996 `bi_rec'.
11997 (grub_linux_release_mem): Release the memory for the initrd.
11998 (grub_load_linux): Renamed from this...
11999 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12000 Changed `entry' not to be static. Loop over memory regions to
12001 find another one when the default fails.
12002 (grub_rescue_cmd_initrd): New function.
12003 (grub_linux_init): Remove function.
12004 (grub_linux_fini): Likewise.
12005 (GRUB_MOD_INIT): Register `initrd'.
12006 (GRUB_MOD_FINI): Unregister `initrd'.
12007 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12008 Function removed.
12009 (grub_linux_normal_fini): Likewise.
12010 (GRUB_MOD_INIT): Register `initrd'.
12011 (GRUB_MOD_FINI): Unregister `initrd'.
12012
990cf3aa 120132005-01-31 Marco Gerards <metgerards@student.han.nl>
12014
12015 * commands/help.c: New file.
12016 * normal/arg.c (show_help): Renamed to...
12017 (grub_arg_show_help): ... this.
12018 * commands/i386/pc/halt.c: New file.
12019 * commands/i386/pc/reboot.c: Likewise.
12020 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12021 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12022 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12023 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12024 variables.
12025 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12026 `commands/help.c'.
12027 (pkgdata_MODULES): Add `help.mod'.
12028 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12029 * grub/i386/pc/init.h (grub_reboot): New prototype.
12030 (grub_halt): Likewise.
12031 * include/grub/normal.h (grub_arg_show_help): New prototype.
12032 (grub_help_init): Likewise.
12033 (grub_help_fini): Likewise.
12034 * util/grub-emu.c (main): Initialize and deinitialize the help
12035 command.
12036
12037 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12038
12039 * normal/command.c (grub_command_init): Fixed the description of
12040 the `set' and `unset' commands.
12041
120422005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 12043
12044 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12045 function.
12046 * commands/ieee1275/halt.c: New file.
12047 * commands/ieee1275/reboot.c: Likewise.
12048 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12049 `__attribute__ ((unused))'. Some GCS related fixed.
12050 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12051 (grub_suspend_fini): Likewise.
12052 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12053 and `halt.mod'.
12054 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12055 (halt_mod_CFLAGS): New variables.
12056 * include/grub/powerpc/ieee1275/ieee1275.h
12057 (grub_ieee1275_interpret): New prototype.
12058
1ab09cc7 120592005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12060
12061 * include/grub/misc.h (memmove): New prototype.
12062 (memcpy): Likewise.
12063
8b8cbdb2 120642005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12065
12066 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12067 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12068
e3741a27 120692005-01-22 Marco Gerards <metgerards@student.han.nl>
12070
12071 * kern/misc.c (grub_strndup): Function rewritten.
12072
776bd780 120732005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12074
12075 * normal/menu.c (TERM_WIDTH): Macro redefined.
12076 (TERM_TOP_BORDER_Y): Likewise.
12077 (draw_border): Replaced while-loop by a for-loop. Make the number
12078 of lines consistent with the number of lines displayed in
12079 print_entries. Added a margin below the rectangle.
12080 (print_entry): Make the entry fit in the rectangle.
12081 (print_entries): Display the scroll arrows next to the right
12082 border.
12083
78026bce 120842005-01-21 Marco Gerards <metgerards@student.han.nl>
12085
12086 * fs/minix.c (grub_minix_find_file): Reserve more space for
12087 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12088 `grub_strncpy' to copy `path' into it.
12089
67bbaf0f 120902005-01-21 Marco Gerards <metgerards@student.han.nl>
12091
12092 Add the loopback device, a device via which files can be accessed
12093 as devices.
f19dbdb7 12094
67bbaf0f 12095 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12096 (pkgdata_MODULES): Add loopback.mod.
12097 (loopback_mod_SOURCES): New variable.
12098 (loopback_mod_CFLAGS): Likewise.
12099 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12100 `disk/loopback.c'.
12101 (pkgdata_MODULES): Add loopback.mod.
12102 (loopback_mod_SOURCES): New variable.
12103 (loopback_mod_CFLAGS): Likewise.
12104 * disk/loopback.c: new file.
12105 * include/grub/normal.h (grub_loop_init): New prototype.
12106 (grub_loop_fini): New prototype.
12107 * util/grub-emu.c (main): Initialize and de-initialize loopback
12108 support.
12109 * include/grub/disk.h (grub_disk_dev_id): Add
12110 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12111
6f1c18bd 121122005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12113
12114 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12115 function.
12116 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12117 (suspend_mod_SOURCES): New variable.
12118 (suspend_mod_CFLAGS): Likewise.
12119 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12120 New prototype.
12121 * commands/ieee1275/suspend.c: New file.
12122
b38551da 121232005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12124
12125 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 12126 ((unused))' to `__attribute__ ((used))'.
b38551da 12127 (GRUB_MOD_FINI): Likewise.
12128 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12129 * genmk.rb (PModule): Assign space to common symbols when linking
12130 modules.
12131
777aff39 121322005-01-20 Marco Gerards <metgerards@student.han.nl>
12133
12134 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12135 `unsigned' arguments to `grub_size_t'.
12136 (grub_malloc): Likewise.
12137 (grub_realloc): Likewise.
12138 (grub_memalign): Likewise.
12139 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12140 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12141 * util/misc.c (grub_malloc): Likewise.
12142 (grub_realloc): Likewise.
12143 * kern/mm.c (get_header_from_pointer): Change the casts to
12144 `unsigned' into a cast to `grub_size_t'.
12145
12146 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12147 point to `currnode' when `currnode' is changed.
12148
12149 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12150 Schottelius <nico-linux@schottelius.org>.
12151
d0ff18e1 121522005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12153
12154 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12155 (note_path): Remove variable.
12156 (GRUB_IEEE1275_NOTE_NAME): New macro.
12157 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12158 (grub_ieee1275_note_hdr): New structure.
12159 (grub_ieee1275_note_desc): Likewise.
12160 (grub_ieee1275_note): Likewise.
12161 (load_note): Remove `dir' argument. All callers updated. Remove
12162 `note_img' and `path'. Do not load a file from `note_path'.
12163 Initialize a struct grub_ieee1275_note and write that to `out'.
12164 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12165
4ca7004c 121662005-01-05 Marco Gerards <metgerards@student.han.nl>
12167
12168 * util/misc.c (grub_util_read_image): Revert last change. It
12169 called `grub_util_read_at', which seeks from the beginning of the
12170 file.
12171
0b412211 121722005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12173
12174 * TODO: Add note about endianness in grub-mkimage.
12175 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12176 section.
12177 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12178 (grub_mkimage_SOURCES): New target.
12179 * include/grub/kernel.h (grub_start_addr): Remove variable.
12180 (grub_end_addr): Likewise.
12181 (grub_total_module_size): Likewise.
12182 (grub_kernel_image_size): Likewise.
12183 (GRUB_MODULE_MAGIC): New constant.
12184 (grub_module_info): New structure.
12185 (grub_arch_modules_addr): New prototype.
12186 (grub_get_end_addr): Remove prototype.
12187 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12188 * include/grub/powerpc/ieee1275/kernel.h: New file.
12189 * include/grub/util/misc.h (grub_util_get_fp_size): New
12190 prototype.
12191 (grub_util_read_at): Likewise.
12192 (grub_util_write_image_at): Likewise.
12193 * kern/main.c (grub_get_end_addr): Remove function.
12194 (grub_load_modules): Call grub_arch_modules_addr instead of using
12195 grub_end_addr. Look for a grub_module_info struct in memory. Use
12196 the grub_module_info fields instead of calling grub_get_end_addr
12197 as loop conditions. Move grub_add_unused_region code here.
12198 (grub_add_unused_region): Remove function.
12199 * kern/i386/pc/init.c: Include grub/cache.h.
12200 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12201 one call to add_mem_region.
12202 (grub_arch_modules_addr): New function.
12203 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12204 (grub_total_module_size): Likewise.
12205 Include grub/machine/kernel.h.
12206 (grub_arch_modules_addr): New function.
12207 * util/grub-emu.c (grub_end_addr): Remove variable.
12208 (grub_total_module_size): Likewise.
12209 (grub_arch_modules_addr): New function.
12210 * util/misc.c: Include unistd.h.
12211 (grub_util_get_fp_size): New function.
12212 (grub_util_read_at): Likewise.
12213 (grub_util_write_image_at): Likewise.
12214 (grub_util_read_image): Call grub_util_read_at.
12215 (grub_util_write_image): Call grub_util_write_image_at.
12216 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12217 additional memory in kernel_img for a struct grub_module_info.
12218 Fill in that grub_module_info.
12219 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12220
458786f8 122212005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12222
12223 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12224 New function.
12225 * include/grub/powerpc/ieee1275/ieee1275.h
12226 (grub_ieee1275_milliseconds): New prototype.
12227 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12228 Change to 1000.
12229 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12230 grub_ieee1275_milliseconds.
12231
ac507d1b 122322005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12233
12234 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12235 variable.
12236 (find_options): New function.
12237 (cmain): Call find_options.
12238 * include/grub/powerpc/ieee1275/ieee1275.h
12239 (grub_ieee1275_realmode): New extern variable.
12240 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12241 grub_map if grub_ieee1275_realmode is false.
12242
6b8fd1c4 122432004-12-29 Marco Gerards <metgerards@student.han.nl>
12244
12245 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12246 lines are inserted and make it work like readline. Reported by
12247 Vincent Pelletier <subdino2004@yahoo.fr>.
12248
8514a1e0 122492004-12-28 Marco Gerards <metgerards@student.han.nl>
12250
12251 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12252
12253 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12254 `kern/powerpc/cache.S'.
12255
924b6140 122562004-12-27 Marco Gerards <metgerards@student.han.nl>
12257
12258 * genmk.rb: Handle the `Program' class in the main loop. Written
12259 by Johan Rydberg <jrydberg@gnu.org>.
12260 (Program): New class.
12261 (programs): New variable.
12262 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12263 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12264 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12265 (help_arch): Function removed.
12266 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12267 `powerpc/libgcc.h' and `loader.h'.
12268 (pkgdata_PROGRAMS): New variable.
12269 (sbin_UTILITIES): Variable removed.
12270 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12271 (grubof_SOURCES): Variable re-defined so it only includes the
12272 core functionality.
12273 (grubof_CFLAGS): Remove `-DGRUBOF'.
12274 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12275 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12276 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12277 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12278 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12279 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12280 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12281 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12282 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12283 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12284 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12285 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12286 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12287 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12288 (pc_mod_CFLAGS): New variables.
12289 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12290 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12291 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12292 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12293 Moved from here...
12294 * include/grub/i386/pc/init.h (grub_os_area_addr)
12295 (rub_os_area_size): ... to here.
12296 * include/grub/powerpc/ieee1275/ieee1275.h
12297 (grub_ieee1275_entry_fn): Export symbol.
12298 * include/grub/powerpc/ieee1275/init.h: New file.
12299 * include/grub/powerpc/libgcc.h: Likewise.
12300 * include/grub/cache.h: Likewise.
12301 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12302 <hollis@penguinppc.org>.
12303 * kern/dl.c: Include <grub/cache.h>.
12304 (grub_dl_flush_cache): New function.
12305 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12306 for this module.
12307 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12308 (grub_console_init): Removed prototypes.
12309 (grub_machine_init): Don't initialize the modules anymore.
12310 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12311 static.
12312 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12313 Macro undef removed.
12314 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12315 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12316 relocation `R_PPC_REL32'. Return an error when the relocation is
12317 unknown.
12318 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12319 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12320 * util/misc.c (grub_arch_sync_caches): Likewise.
12321
e4b47e0c 123222004-12-19 Marco Gerards <metgerards@student.han.nl>
12323
12324 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12325 `symlist.c', add `grubof_symlist.c'.
12326 (symlist.c): Variable removed.
12327 (grubof_HEADERS): Variable added.
12328 (grubof_symlist.c): New target.
12329 (kernel_syms.lst): Use `grubof_HEADERS' instead of
12330 `kernel_img_HEADERS'.
12331 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12332 * kern/powerpc/dl.c: New file.
12333 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12334 Function removed.
12335 (grub_arch_dl_relocate_symbols): Likewise.
12336 (grub_register_exported_symbols): Likewise.
12337
4ceb3636 123382004-12-13 Marco Gerards <metgerards@student.han.nl>
12339
12340 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12341 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12342 to fail instead. Reported by Vincent Pelletier
12343 <subdino2004@yahoo.fr>.
12344
12345 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12346 it is not allocated. Reported by Vincent Pelletier
12347 <subdino2004@yahoo.fr>.
12348
12349 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12350 output so the output looks better.
f19dbdb7 12351
3f1578fe 123522004-12-04 Marco Gerards <metgerards@student.han.nl>
12353
12354 Modulize the partition map support and add support for the amiga
12355 partition map.
f19dbdb7 12356
3f1578fe 12357 * commands/ls.c: Include <grub/partition.h> instead of
12358 <grub/machine/partition.h>.
12359 * kern/disk.c: Likewise.
12360 * kern/rescue.c: Likewise.
12361 * loader/i386/pc/chainloader.c: Likewise.
12362 * normal/cmdline.c: Likewise.
12363 * kern/powerpc/ieee1275/init.c: Likewise.
12364 (grub_machine_init): Call `grub_pc_partition_map_init',
12365 `grub_amiga_partition_map_init' and
12366 `grub_apple_partition_map_init'.
12367 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12368 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12369 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12370 `partition.h' and `pc_partition.h'.
12371 (grub_setup_SOURCES): Remove
12372 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12373 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12374 (grub_emu_SOURCES): Likewise.
12375 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12376 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12377 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12378 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12379 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12380 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12381 (grubof_SOURCES): Likewise.
12382 * disk/i386/pc/partition.c: File removed.
12383 * disk/powerpc/ieee1275/partition.c: Likewise.
12384 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12385 * include/grub/i386/pc/partition.h: Likewise.
12386 * kern/partition.c: New file.
12387 * partmap/amiga.c: Likewise.
12388 * partmap/apple.c: Likewise.
12389 * partmap/pc.c: Likewise.
12390 * include/grub/partition.h: Likewise..
12391 * include/grub/pc_partition.h: Likewise.
12392 * util/grub-emu.c: Include <grub/partition.h> instead of
12393 <grub/machine/partition.h>.
12394 (main): Call `grub_pc_partition_map_init',
12395 `grub_amiga_partition_map_init' and
12396 `grub_apple_partition_map_init' and deinitialize afterwards.
12397 * util/i386/pc/biosdisk.c: Include `#include
12398 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12399 `<grub/machine/partition.h>'.
12400 * util/i386/pc/grub-setup.c: Likewise.
12401 * util/i386/pc/biosdisk.c: Likewise.
12402 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12403 partition information in case of a PC partition.
12404 * util/i386/pc/grub-setup.c: Include `#include
12405 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12406 `<grub/machine/partition.h>'.
12407 (setup): Only access the PC specific partition information in case
12408 of a PC partition.
12409
0ef4ced9 124102004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 12411
0ef4ced9 12412 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12413 (grub_longjmp): Likewise.
12414 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12415 20.
12416 * normal/powerpc/setjmp.S: New file.
12417 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12418 `normal/powerpc/setjmp.S'.
12419 (grubof_CFLAGS): Add `-DGRUBOF'.
12420 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12421 [GRUB_UTIL && !GRUBOF].
f19dbdb7 12422
19950e29 124232004-11-16 Marco Gerards <metgerards@student.han.nl>
12424
12425 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12426 property named `name'. Correctly handle the error returned by
12427 `grub_ieee1275_finddevice' if a device can not be opened.
12428
a2fea427 124292004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12430
12431 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12432 `actual' for negativity.
12433 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12434 kern/fshelp.c.
12435
41ea0ea3 124362004-11-01 Marco Gerards <metgerards@student.han.nl>
12437
12438 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12439 (PAGE_OFFSET): New macro.
12440 (CRTC_ADDR_PORT): Likewise.
12441 (CRTC_DATA_PORT): Likewise.
12442 (START_ADDR_HIGH_REGISTER): Likewise.
12443 (START_ADDR_LOW_REGISTER): Likewise.
12444 (GRAPHICS_ADDR_PORT): Likewise.
12445 (GRAPHICS_DATA_PORT): Likewise.
12446 (READ_MAP_REGISTER): Likewise.
12447 (INPUT_STATUS1_REGISTER): Likewise.
12448 (INPUT_STATUS1_VERTR_BIT): Likewise.
12449 (page): New variable.
12450 (wait_vretrace): New function.
12451 (set_read_map): Likewise.
12452 (set_start_address): Likewise.
12453 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12454 the right page.
12455 (check_vga_mem): Take the page into account.
12456 (write_char): Likewise.
12457 (write_cursor): Likewise.
12458 (scroll_up): Likewise. Copy the page to the page that is not
12459 shown and switch between both pages.
12460 (grub_vga_putchar): Fix off by one error.
12461 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12462 account.
12463
ad0bd20b 124642004-11-01 Marco Gerards <metgerards@student.han.nl>
12465
12466 Add support for iso9660 (including rockridge).
f19dbdb7 12467
ad0bd20b 12468 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12469 (iso9660_mod_SOURCES): New variable.
12470 (iso9660_mod_CFLAGS): Likewise.
12471 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12472 * include/grub/fs.h (grub_iso9660_init): New prototype.
12473 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12474 * fs/iso9660.c: New file.
12475
12476 * include/grub/misc.h (grub_strncat): New prototype.
12477 * kern/misc.c (grub_strncat): New function.
f19dbdb7 12478
ad0bd20b 12479 * fs/hfs.c (grub_hfs_mount): Translate the error
12480 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12481 * fs/jfs.c (grub_jfs_mount): Likewise.
12482 * fs/ufs.c (grub_ufs_mount): Likewise.
12483
a5477a59 124842004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12485
12486 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12487 which initialized BAT registers.
12488 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12489 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12490 Move from here...
12491 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12492 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12493 ... to here.
12494 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12495 (grub_mapclaim): Likewise.
12496 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12497 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12498 hand.
12499
9304c1f8 125002004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12501
12502 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12503 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12504 -ffreestanding and -msoft-float.
12505
86f4ae25 125062004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12507
12508 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12509 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12510 set in grub_ieee1275_flags.
12511
38912228 125122004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12513
12514 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12515 prototype.
12516 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12517 grub_console_init first.
12518 Change the memory range used for grub_ieee1275_claim and
12519 grub_mm_init_region.
12520 Print an error message if the claim fails.
12521 Include <grub/misc.h>.
12522
d1923dc8 125232004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12524
12525 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12526 Call grub_children_iterate for device nodes of type `scsi',
12527 `ide', or `ata'.
12528 (grub_ofdisk_open): Remove manual device alias resolution.
12529 Fix memory leak when device cannot be opened.
f19dbdb7 12530 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 12531 (grub_children_iterate): New prototype.
12532 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12533 New function.
12534 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12535 Return -1 if args.size was -1.
12536
4512e4f3 125372004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12538
12539 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12540 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12541 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12542 Open Firmware's memory for it; claim memory from _start to _end.
12543 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12544 (_end): New extern.
12545 (_start): Zero BSS from __bss_start to _end.
12546 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12547 New extern.
12548 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12549
4d61feb0 125502004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12551
ad0bd20b 12552 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12553 -1 if args.base was -1.
4d61feb0 12554
026fa2f9 125552004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12556
12557 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12558 escape sequence instead of a literal ^L. Also call
12559 grub_ofconsole_gotoxy.
12560
9f2220ef 125612004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12562
12563 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12564 void * arguments to grub_addr_t. All callers updated. Also make
12565 the `result' argument optional.
12566 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12567 All callers updated.
12568
8a572cd7 125692004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12570
12571 * commands/ls.c (grub_ls_list_files): Use the string following the
12572 initial ')', if present, as the filesystem path.
12573 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12574
12575 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12576
18aa81f2 125772004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12578
12579 Make the source code of the menu interface more readable.
f19dbdb7 12580
18aa81f2 12581 * normal/menu.c: Include grub/mm.h.
12582 (TERM_WIDTH): New macro.
12583 (TERM_HEIGHT): Likewise.
12584 (TERM_INFO_HEIGHT): Likewise.
12585 (TERM_MARGIN): Likewise.
12586 (TERM_SCROLL_WIDTH): Likewise.
12587 (TERM_TOP_BORDER_Y): Likewise.
12588 (TERM_LEFT_BORDER_X): Likewise.
12589 (TERM_BORDER_WIDTH): Likewise.
12590 (TERM_MESSAGE_HEIGHT): Likewise.
12591 (TERM_BORDER_HEIGHT): Likewise.
12592 (TERM_NUM_ENTRIES): Likewise.
12593 (TERM_FIRST_ENTRY_Y): Likewise.
12594 (TERM_ENTRY_WIDTH): Likewise.
12595 (TERM_CURSOR_X): Likewise.
12596 (draw_border): Use macros instead of magic numbers.
12597 (print_entry): Likewise.
12598 (print_entries): Likewise.
12599 (run_menu): Likewise. Also, handle the key 'e'.
12600 (run_menu_entry): Ignore empty command lines.
12601 (print_message): Added a new argument EDIT. If EDIT is true,
12602 print a different message.
12603 (init_page): Likewise.
12604 (edit_menu_entry): New function. Not implemented yet.
12605
b47efe30 126062004-09-17 Marco Gerards <metgerards@student.han.nl>
12607
12608 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12609 can be loaded from normal mode.
f19dbdb7 12610
b47efe30 12611 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12612 `multiboot.mod'.
12613 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12614 (multiboot_mod_CFLAGS): New variables.
12615 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 12616 * loader/i386/pc/multiboot_normal.c: Likewise.
12617
b47efe30 12618 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12619 attribute `unused'.
f19dbdb7 12620
b47efe30 12621 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12622 `fdiro' to read the mode information from instead of `diro'.
12623
12624 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12625 looking up a symlink.
12626
12627 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12628 macro.
12629 * normal/command.c (grub_command_execute): Don't parse the
12630 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12631 flags of the command.
12632
12633 * normal/menu.c (grub_menu_run): Fix typo.
12634
da75ac71 126352004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12636
12637 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12638
12639 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12640 `y + 1' instead of `y - 1'.
12641
12642 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 12643
062b24c2 126442004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12645
12646 From Hollis Blanchard <hollis@penguinppc.org>:
12647 * kern/misc.c (memmove): New alias for grub_memmove.
12648 (memcmp): New alias for grub_memcmp.
12649 (memset): New alias for grub_memset.
f19dbdb7 12650 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 12651 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 12652 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 12653 (grub_ieee1275_get_property): Likewise.
f19dbdb7 12654
8ddad845 126552004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12656
12657 Added normal mode command `chainloader' as module chain.mod, which
12658 depends on normal.mod and _chain.mod.
f19dbdb7 12659
8ddad845 12660 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12661 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12662 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12663 Deleted prototype.
12664 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12665 but arguments parsing moved to ...
12666 (grub_chainloader_cmd): ... here. New function.
12667 * include/grub/i386/pc/chainloader.h: New file.
12668 * loader/i386/pc/chainloader_normal.c: Likewise.
12669
2c1f4ce3 126702004-09-11 Marco Gerards <metgerards@student.han.nl>
12671
12672 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12673 (grub_mkimage_LDFLAGS): Likewise.
12674 (grub_emu_SOURCES): Likewise.
12675 (kernel_img_HEADERS): Added fshelp.h.
12676 * fs/ext2.c: Include <grub/fshelp.h>.
12677 (FILETYPE_REG): New macro.
12678 (FILETYPE_INO_REG): Likewise.
12679 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12680 Changed all users.
12681 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12682 all users.
12683 (grub_fshelp_node): New struct.
12684 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12685 to a pointer.
12686 (grub_ext2_get_file_block): Removed function.
12687 (grub_ext2_read_block): New function.
12688 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12689 This function was written.
12690 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12691 (grub_ext2_find_file): Removed function.
12692 (grub_ext2_read_symlink): New function.
12693 (grub_ext2_iterate_dir): Likewise.
12694 (grub_ext2_open): Rewritten.
12695 (grub_ext2_dir): Rewritten.
12696 * include/grub/fshelp.h: New file.
12697 * fs/fshelp.c: Likewise.
12698
3c52136a 126992004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12700
12701 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12702 (print_message): Add a missing newline.
12703 (run_menu): Added timeout support.
12704 (run_menu_entry): New local function.
12705 (grub_menu_run): Added support for booting.
12706
12707 * kern/loader.c (grub_loader_is_loaded): New function.
12708
12709 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12710 (grub_get_rtc): Exported.
12711
12712 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12713 (grub_get_rtc): Exported.
12714
12715 * include/grub/normal.h (struct grub_command_list): Remove
12716 constant from the member `command'.
12717
12718 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12719
12720 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12721
12722 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12723
aa033560 127242004-08-28 Marco Gerards <metgerards@student.han.nl>
12725
12726 Add support for the JFS filesystem.
12727
12728 * fs/jfs.c: New file.
12729 * include/grub/fs.h (grub_jfs_init): New prototype.
12730 (grub_jfs_fini): New prototype.
12731 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12732 (grub_emu_SOURCES): Likewise.
12733 (pkgdata_MODULES): Add jfs.mod.
12734 (jfs_mod_SOURCES): New variable.
12735 (jfs_mod_CFLAGS): Likewise.
12736 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12737 (grubof_SOURCES): Likewise.
12738 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12739
12740 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12741 endian to the host endian.
12742 (grub_fat_utf16_to_utf8): Move function from there...
12743 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 12744 the endianness of the source string anymore.
aa033560 12745 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12746
94bc45af 127472004-08-24 Marco Gerards <metgerards@student.han.nl>
12748
12749 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12750 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12751 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12752 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 12753
94bc45af 12754 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12755 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12756 for `node_found' and `it_dir'.
12757 (grub_hfs_dir): Add prototype for `dir_hook'.
12758
12759 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12760 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12761 and `indir32' to silence a gcc warning.
12762
12763 * include/grub/fs.h (grub_hfs_init): New prototype.
12764 (grub_hfs_fini): Likewise.
f19dbdb7 12765
12766
97543f08 127672004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12768
12769 Each disk device has its own id now. This is useful to make use
12770 of multiple disk devices.
f19dbdb7 12771
97543f08 12772 * include/grub/disk.h (grub_disk_dev_id): New enum.
12773 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12774 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12775
12776 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12777 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12778
12779 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12780 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12781
12782 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12783 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12784
12785 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12786 "id" which is used by the cache manager.
12787
12788 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12789 of just "GRUB".
12790
64372eb4 127912004-08-18 Marco Gerards <metgerards@student.han.nl>
12792
12793 * fs/hfs.c: New file.
12794 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12795 (grub_emu_SOURCES): Likewise.
12796 (pkgdata_MODULES): Add hfs.mod.
12797 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12798 (grubof_SOURCES): Likewise.
12799 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12800
12801 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12802 * kern/misc.c (grub_strncasecmp): Add function.
12803
cc61b58f 128042004-08-14 Marco Gerards <metgerards@student.han.nl>
12805
12806 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12807 with parentheses.
12808
12809 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12810 (grub_ext2_dir): In case the directory entry type is unknown, read
12811 it from the inode.
12812
0ef123f6 128132004-08-02 Peter Bruin <pjbruin@dds.nl>
12814
12815 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12816 grub_load_linux instead of grub_rescue_cmd_linux as second
12817 argument of grub_rescue_register_command.
12818
12819 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12820
a447c5df 128212004-07-27 Marco Gerards <metgerards@student.han.nl>
12822
12823 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12824 function.
12825 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12826 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12827 `loader/powerpc/ieee1275/linux.c',
12828 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12829 * include/grub/powerpc/ieee1275/ieee1275.h
12830 (grub_ieee1275_release): New prototype.
12831 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12832 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12833 normal, boot, linux and linux_normal.
12834 * loader/powerpc/ieee1275/linux.c: New file.
12835 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12836
5a9e3546 128372004-07-12 Marco Gerards <metgerards@student.han.nl>
12838
12839 * normal/arg.c (grub_arg_parse): Correct error handling after
12840 reallocating the argumentlist (check if `argl' is not null instead
12841 of checking if `args' is not null).
12842 * kern/mm.c (grub_realloc): Return the same pointer when using the
12843 same region, instead of returning the header address.
12844
e15199cb 128452004-07-11 Marco Gerards <metgerards@student.han.nl>
12846
12847 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12848 one block instead of two when looking for the initial partition.
12849 (grub_partition_probe): Initialize the local variable `p' with 0.
12850 Use base 10 for the grub_strtoul call.
12851 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12852 need for one local variable.
12853 (grub_strtoul): Don't add the new value to `num', instead of that
12854 just assign it.
12855
020616c2 128562004-07-11 Marco Gerards <metgerards@student.han.nl>
12857
12858 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12859 (pxeboot_img_SOURCES): New variable.
12860 (pxeboot_img_ASFLAGS): Likewise.
12861 (pxeboot_img_LDFLAGS): Likewise.
12862 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12863 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12864 <lode_leroy@hotmail.com>.
12865
6c51eb64 128662004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12867
12868 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12869 there was no input.
12870
cfb12aff 128712004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12872
12873 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12874 the history buffer logic.
12875
6eabba74 128762004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12877
12878 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12879 (FILETYPE_INO_SYMLINK): New macros.
12880 (grub_ext2_find_file): Check if the node is a directory using the
12881 inode stat information instead of using the filetype in the
12882 dirent. Exclude the first character of an absolute symlink.
12883 (grub_ext2_dir): Mask out the filetype part of the mode member of
12884 the inode.
12885
66e19ef8 128862004-05-24 Marco Gerards <metgerards@student.han.nl>
12887
12888 Add support for UFS version 1 and 2. Add support for the minix
12889 filesystem version 1 and 2, both the variants with 14 and 30 long
12890 filenames.
f19dbdb7 12891
66e19ef8 12892 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12893 fs/minix.c.
12894 (grub_emu_SOURCES): Likewise.
12895 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12896 (ufs_mod_SOURCES): New variable.
12897 (ufs_mod_CFLAGS): Likewise.
12898 (minix_mod_SOURCES): Likewise.
12899 (minix_mod_CFLAGS): Likewise.
12900 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12901 fs/minix.c.
12902 (grubof_SOURCES): Likewise.
12903 * fs/ufs.c: New file.
12904 * fs/minix.c: New file.
12905 * include/grub/fs.h (grub_ufs_init): New prototype.
12906 (grub_ufs_fini): Likewise.
12907 (grub_minix_init): Likewise.
12908 (grub_minix_fini): Likewise.
12909 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12910 minix fs.
12911
cc2e748a 129122004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12913
12914 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12915 commands/ls.c, commands/terminal.c, commands/boot.c,
12916 commands/cmp.c and commands/cat.c.
12917 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12918
12919 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12920 "env.h"
12921
4b13b216 129222004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12923
12924 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12925 and grub_, respectively. Because the conversion is trivial and
12926 mechanical, I omit the details here. Please refer to the CVS
12927 if you need more information.
12928
6a142551 129292004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12930
12931 * include/pupa: Renamed to ...
12932 * include/grub: ... this.
12933 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12934 * util/i386/pc/grub-mkimage.c: ... this.
12935 * util/i386/pc/pupa-setup.c: Renamed to ...
12936 * util/i386/pc/grub-setup.c: ... this.
12937 * util/pupa-emu.c: Renamed to ...
12938 * util/grub-emu.c: ... this.
12939
e56cdf21 129402004-03-29 Marco Gerards <metgerards@student.han.nl>
12941
12942 Add support for the newworld apple macintosh (PPC). This has been
12943 tested on the powerbook 2000 only. It only adds support for
12944 generic ieee1275 functions, console and disk support. This should
12945 be easy to port to other architectures with support for Open
12946 Firmware.
f19dbdb7 12947
e56cdf21 12948 * configure.ac: Accept the powerpc as host_cpu. In the case of
12949 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12950 specific tests are only executed while building for the i386.
12951 Inverse test for crosscompile.
12952 * genmk.rb (Utility): Allow assembler files.
12953 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12954 * conf/powerpc-ieee1275.rmk: New file.
12955 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12956 * disk/powerpc/ieee1275/partition.c: Likewise.
12957 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12958 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12959 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12960 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12961 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12962 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12963 * include/pupa/powerpc/ieee1275/loader.h
12964 * include/pupa/powerpc/setjmp.h: Likewise.
12965 * include/pupa/powerpc/types.h: Likewise.
12966 * kern/powerpc/ieee1275/init.c: Likewise.
12967 * kern/powerpc/ieee1275/openfw.c: Likewise.
12968 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12969
12970 These files were written by Johan Rydberg
12971 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 12972
e56cdf21 12973 * boot/powerpc/ieee1275/cmain.c: New file.
12974 * boot/powerpc/ieee1275/crt0.S: Likewise.
12975 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12976 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12977
8c8cc205 129782004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12979
12980 * Makefile.in: Update copyright.
12981 * genmodsrc.sh: Likewise.
12982 * gensymlist.sh: Likewise.
12983 * term/i386/pc/vga.c: Indent correctly.
12984
12985 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12986 bugreporting address.
12987 * util/i386/pc/pupa-setup.c (usage): Likewise,
12988 (main): Call pupa_ext2_init and pupa_ext2_fini.
12989
f19dbdb7 12990 * fs/fat.c (log2): Renamed to ...
8c8cc205 12991 (fat_log2): ... this.
12992 All callers changed.
12993 * kern/misc.c (memcpy): Alias to pupa_memmove.
12994 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12995 lvalue cast.
12996 * util/console.c (pupa_ncurses_fini): Return 0.
12997
12998 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12999 Move fail label here.
13000 [__GNU__]: Don't warn when using stat.
13001 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13002 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13003 long int. Use strtol instead of strtoul.
f19dbdb7 13004
db1771cf 130052004-03-14 Marco Gerards <metgerards@student.han.nl>
13006
13007 * commands/boot.c: New file.
13008 * commands/cat.c: Likewise.
13009 * commands/cmp.c: Likewise.
13010 * commands/ls.c: Likewise.
13011 * commands/terminal.c: Likewise.
13012 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13013 (pupa_register_command): Changed interface to match the new
13014 argument parser.
13015 (pupa_command_execute): Changed (almost rewritten) so it uses
13016 pupa_split_command. Added support for setting variables using the
13017 syntax `foo=bar'.
13018 (rescue_command): Changed to work with the new argument parser.
13019 (terminal_command): Moved from here to commands/terminal.c.
13020 (set_command): New function.
13021 (unset_command): New function.
13022 (insmod_command): New function.
13023 (rmmod_command): New function.
13024 (lsmod_command): New function.
13025 (pupa_command_init): Don't initialize the command terminal
13026 anymore. Initialize the commands set, unset, insmod, rmmod and
13027 lsmod.
13028 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13029 (kernel_img_HEADERS): Add arg.h and env.h.
13030 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13031 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13032 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13033 normal/arg.c.
13034 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13035 terminal.mod.
13036 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13037 (boot_mod_SOURCES): New variable.
13038 (terminal_mod_SOURCES): Likewise.
13039 (ls_mod_SOURCES): Likewise.
13040 (cmp_mod_SOURCES): Likewise.
13041 (cat_mod_SOURCES): Likewise.
13042
13043 * normal/arg.c: New file.
13044 * kern/env.c: Likewise.
13045 * include/pupa/arg.h: Likewise.
13046 * include/pupa/env.h: Likewise.
13047 * font/manager.c (font_command): Changed to match argument parsing
13048 interface changes.
13049 (PUPA_MOD_INIT): Likewise.
13050 * hello/hello.c (pupa_cmd_hello): Likewise.
13051 (PUPA_MOD_INIT): Likewise.
13052 * include/pupa/disk.h: Include <pupa/device.h>.
13053 (pupa_print_partinfo): New prototype.
13054 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13055 (pupa_dl_get_prefix): Likewise.
13056 * include/pupa/misc.h: Include <pupa/err.h>.
13057 (pupa_isgraph): New prototype.
13058 (pupa_isdigit): Likewise.
13059 (pupa_split_cmdline): Likewise.
13060 * include/pupa/normal.h: Include <pupa/arg.h>.
13061 (pupa_command): Changed the prototype of the member `func' to
13062 match the argument parsing interface. Added member `options'.
13063 (pupa_register_command): Updated to match function.
13064 (pupa_arg_parse): New prototype.
13065 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13066 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13067 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13068 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13069 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13070 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13071 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13072 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13073 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13074 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13075 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13076 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13077 * kern/disk.c: Include <pupa/file.h>.
13078 (pupa_print_partinfo): New function.
13079 * kern/dl.c: Include <pupa/env.h>.
13080 (pupa_dl_dir): Variable removed.
13081 (pupa_dl_load): Use the environment variable `prefix' instead of
13082 the variable pupa_dl_dir.
13083 (pupa_dl_set_prefix): Function removed.
13084 (pupa_dl_get_prefix): Likewise.
13085 * kern/i386/pc/init.c: Include <pupa/env.h>.
13086 (pupa_machine_init): Use the environment variable `prefix' instead of
13087 using pupa_dl_set_prefix to set the prefix.
13088 * kern/main.c: Include <pupa/env.h>.
13089 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13090 using pupa_dl_get_prefix to get the prefix.
13091 * kern/misc.c: Include <pupa/env.h>.
13092 (pupa_isdigit): New function.
13093 (pupa_isgraph): Likewise.
13094 (pupa_ftoa): Likewise.
13095 (pupa_vsprintf): Added support for printing values of the type
13096 `double'. Make it possible to format variable output when using
13097 formatting like `%1.2%f'.
13098 (pupa_split_cmdline): New function.
13099 * kern/rescue.c: Include <pupa/env.h>.
13100 (next_word): Removed function.
13101 (pupa_rescue_cmd_prefix): Likewise.
13102 (pupa_rescue_cmd_set): New function.
13103 (pupa_rescue_cmd_unset): New function.
13104 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13105 split the command line instead of splitting it here. Added
13106 support for setting variables using the syntax `foo=bar'. Don't
13107 initialize the prefix command anymore. Initialized the set and
13108 unset commands.
13109 * normal/cmdline.c: Include <pupa/env.h>.
13110 (pupa_tab_complete): Added prototypes for print_simple_completion,
13111 print_partition_completion, add_completion, iterate_commands,
13112 iterate_dev, iterate_part and iterate_dir. Moved code to print
13113 partition information from here to kern/disk.c.
fe6b695a 13114 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 13115 * normal/main.c: Include <pupa/env.h>.
13116 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13117 instead of using pupa_dl_get_prefix to get the prefix.
13118 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13119 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13120 warning.
13121 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13122 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13123 ((unused))' to silence a gcc warning.
13124 (pupa_vga_setcolor): Likewise.
13125 (debug_command): Changed to match argument parsing
13126 interface changes.
13127 * util/pupa-emu.c: Include <pupa/env.h>.
13128 (options): Added 0's for unused fields to silence a gcc warning.
13129 (argp): Likewise.
13130 (main): Use the environment variable `prefix' instead of using
13131 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13132 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13133 and terminal.
13134
13135 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13136 * util/misc.c: Include <malloc.h>.
13137 (pupa_malloc): Rewritten so errors are correctly reported.
13138 (pupa_realloc): Likewise.
13139 (pupa_memalign): Likewise.
13140 (pupa_mm_init_region): Declare unused variables with
13141 `__attribute__ ((unused))' to silence a gcc warning.
13142 * normal/i386/setjmp.S: Remove tab at the end of the file to
13143 silence a gcc warning.
13144 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13145 variables with `__attribute__ ((unused))' to silence a gcc
13146 warning.
13147 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13148 local variable i unsigned to silence a gcc warning.
13149
13150 * kern/term.c: Include <pupa/misc.h>.
13151 (pupa_more_lines): New variable.
13152 (pupa_more): Likewise.
13153 (pupa_putcode): When the pager is active pause at the end of every
13154 screen.
13155 (pupa_set_more): New function.
13156 * include/pupa/term.h (pupa_set_more): New prototype.
13157
13158
3b1139cb 131592004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13160
13161 Now this project is GRUB 2 rather than PUPA. The location of
13162 the CVS repository was moved to GRUB's.
f19dbdb7 13163
3b1139cb 13164 * configure.ac: Use bug-grub as the reporting address.
13165 Use GRUB instead of PUPA.
13166 Change the version number to 1.90.
13167
8367695c 131682004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13169
13170 * genkernsyms.sh: Updated copyright information.
13171 * genmk.rb: Likewise.
13172 * genmodsrc.sh: Likewise.
13173 * gensymlist.sh: Likewise.
13174 * boot/i386/pc/boot.S: Likewise.
13175 * boot/i386/pc/diskboot.S: Likewise.
13176 * disk/i386/pc/biosdisk.c: Likewise.
13177 * disk/i386/pc/partition.c: Likewise.
13178 * font/manager.c: Likewise.
13179 * fs/ext2.c: Likewise.
13180 * fs/fat.c: Likewise.
13181 * include/pupa/boot.h: Likewise.
13182 * include/pupa/device.h: Likewise.
13183 * include/pupa/disk.h: Likewise.
13184 * include/pupa/dl.h: Likewise.
13185 * include/pupa/elf.h: Likewise.
13186 * include/pupa/err.h: Likewise.
13187 * include/pupa/file.h: Likewise.
13188 * include/pupa/font.h: Likewise.
13189 * include/pupa/fs.h: Likewise.
13190 * include/pupa/kernel.h: Likewise.
13191 * include/pupa/loader.h: Likewise.
13192 * include/pupa/misc.h: Likewise.
13193 * include/pupa/mm.h: Likewise.
13194 * include/pupa/net.h: Likewise.
13195 * include/pupa/normal.h: Likewise.
13196 * include/pupa/rescue.h: Likewise.
13197 * include/pupa/setjmp.h: Likewise.
13198 * include/pupa/symbol.h: Likewise.
13199 * include/pupa/term.h: Likewise.
13200 * include/pupa/types.h: Likewise.
13201 * include/pupa/i386/setjmp.h: Likewise.
13202 * include/pupa/i386/types.h: Likewise.
13203 * include/pupa/i386/pc/biosdisk.h: Likewise.
13204 * include/pupa/i386/pc/boot.h: Likewise.
13205 * include/pupa/i386/pc/console.h: Likewise.
13206 * include/pupa/i386/pc/init.h: Likewise.
13207 * include/pupa/i386/pc/kernel.h: Likewise.
13208 * include/pupa/i386/pc/linux.h: Likewise.
13209 * include/pupa/i386/pc/loader.h: Likewise.
13210 * include/pupa/i386/pc/memory.h: Likewise.
13211 * include/pupa/i386/pc/multiboot.h: Likewise.
13212 * include/pupa/i386/pc/partition.h: Likewise.
13213 * include/pupa/i386/pc/time.h: Likewise.
13214 * include/pupa/i386/pc/vga.h: Likewise.
13215 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13216 * include/pupa/util/getroot.h: Likewise.
13217 * include/pupa/util/misc.h: Likewise.
13218 * include/pupa/util/resolve.h: Likewise.
13219 * kern/device.c: Likewise.
13220 * kern/disk.c: Likewise.
13221 * kern/dl.c: Likewise.
13222 * kern/err.c: Likewise.
13223 * kern/file.c: Likewise.
13224 * kern/fs.c: Likewise.
13225 * kern/loader.c: Likewise.
13226 * kern/main.c: Likewise.
13227 * kern/misc.c: Likewise.
13228 * kern/mm.c: Likewise.
13229 * kern/rescue.c: Likewise.
13230 * kern/term.c: Likewise.
13231 * kern/i386/dl.c: Likewise.
13232 * kern/i386/pc/init.c: Likewise.
13233 * kern/i386/pc/lzo1x.S: Likewise.
13234 * kern/i386/pc/startup.S: Likewise.
13235 * loader/i386/pc/chainloader.c: Likewise.
13236 * loader/i386/pc/linux.c: Likewise.
13237 * loader/i386/pc/multiboot.c: Likewise.
13238 * normal/cmdline.c: Likewise.
13239 * normal/command.c: Likewise.
13240 * normal/main.c: Likewise.
13241 * normal/menu.c: Likewise.
13242 * normal/i386/setjmp.S: Likewise.
13243 * term/i386/pc/console.c: Likewise.
13244 * term/i386/pc/vga.c: Likewise.
13245 * util/console.c: Likewise.
13246 * util/genmoddep.c: Likewise.
13247 * util/misc.c: Likewise.
13248 * util/pupa-emu.c: Likewise.
13249 * util/resolve.c: Likewise.
13250 * util/unifont2pff.rb: Likewise.
13251 * util/i386/pc/biosdisk.c: Likewise.
13252 * util/i386/pc/getroot.c: Likewise.
13253 * util/i386/pc/pupa-mkimage.c: Likewise.
13254 * util/i386/pc/pupa-setup.c: Likewise.
13255
e6eced71 132562004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13257
13258 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13259 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13260 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13261 reading and reset it after reading.
13262 (pupa_ext2_close): Return PUPA_ERR_NONE.
13263
13264 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13265 Correct value.
13266 (struct linux_kernel_header): Add kernel_version and
13267 initrd_addr_max.
13268 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13269 pupa_file_read succeeds.
13270 (pupa_rescue_cmd_initrd): Implement.
13271
5aded270 132722003-12-03 Marco Gerards <metgerards@student.han.nl>
13273
13274 * fs/ext2.c (pupa_ext2_label): New function.
13275 (pupa_ext2_fs): Added label.
13276 * fs/fat.c (pupa_fat_label): New function.
13277 (pupa_fat_fs): Added label.
13278 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13279
13280 * kern/misc.c (pupa_strndup): New function.
13281 * include/pupa/misc.h (pupa_strndup): New prototype.
13282
13283 * include/pupa/normal.h: Include <pupa/err.h>.
13284 (pupa_set_history): New prototype.
13285 (pupa_iterate_commands): New prototype.
13286 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13287 <pupa/disk.h>, <pupa/file.h>.
13288 (hist_size): New variable.
13289 (hist_lines): Likewise.
13290 (hist_end): Likewise.
13291 (hist_used): Likewise.
13292 (pupa_set_history): New function.
13293 (pupa_history_get): Likewise.
13294 (pupa_history_add): Likewise.
13295 (pupa_history_replace): Likewise.
13296 (pupa_tab_complete): Likewise.
13297 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13298 completion shows partitionnames while completing partitions, this
13299 feature was suggested by Jeff Bailey.
13300 * normal/command.c (pupa_iterate_commands): New function.
13301 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13302 (pupa_normal_init): Initialize history buffer.
13303 (PUPA_MOD_INIT): Likewise.
13304 (pupa_normal_fini): Free the history buffer.
13305 (PUPA_MOD_FINI): Likewise.
13306
13307 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13308 key.
13309
13310 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13311 * configure.ac [i386]: Check for regparam bug.
13312 (NESTED_FUNC_ATTR) [! i386]: Defined.
13313
1f7315a3 133142003-11-17 Marco Gerards <metgerards@student.han.nl>
13315
13316 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13317 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13318 (pupa_emu_SOURCES): New variable.
13319 (pupa_emu_LDFLAGS): Likewise.
13320 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
13321 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
13322 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
13323 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13324 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13325 (pupa_jmp_buf): New typedef.
13326 (pupa_setjmp) [PUPA_UTIL]: New macro.
13327 (pupa_longjmp) [PUPA_UTIL]: Likewise.
13328 * include/pupa/term.h (struct pupa_term): New member `refresh'.
13329 (pupa_refresh): New prototype.
13330 * include/pupa/util/getroot.h: New file.
13331 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13332 it.
13333 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13334 (pupa_rescue_cmd_cat): Likewise.
13335 (pupa_rescue_cmd_ls): Likewise.
13336 (pupa_rescue_cmd_testload): Likewise.
13337 (pupa_rescue_cmd_lsmod): Likewise.
13338 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13339 * normal/menu.c (run_menu): Likewise.
13340 * kern/term.c (pupa_cls): Likewise.
13341 (pupa_refresh): New function.
13342 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13343 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13344 * util/console.c: New file.
f19dbdb7 13345
1f7315a3 13346 * util/i386/pc/getroot.c: New file.
13347 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13348 (pupa_putchar): New function.
13349 (pupa_refresh): Likewise.
13350 (xgetcwd): Function moved to ...
13351 (strip_extra_slashes): Likewise.
13352 (get_prefix): Likewise.
f19dbdb7 13353 * util/i386/pc/getroot.c: ... here.
1f7315a3 13354 (find_root_device): Function moved and renamed to...
13355 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13356 Changed all callers.
13357 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13358 and renamed to...
13359 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13360 Changed all callers.
13361 * util/misc.c (pupa_memalign): New function.
13362 (pupa_mm_init_region): Likewise.
13363 (pupa_register_exported_symbols): Likewise.
13364 (pupa_putchar): Function removed.
13365 * util/pupa-emu.c: New file.
13366
9a5c1ade 133672003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13368
13369 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13370 (_multiboot_mod_SOURCES): New variable.
13371 (_multiboot_mod_CFLAGS): Likewise.
13372 * loader/i386/pc/multiboot.c: New file.
13373 * include/pupa/i386/pc/multiboot.h: Likewise.
13374 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13375 (pupa_multiboot_real_boot): New function.
13376 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13377 (pupa_multiboot_real_boot): New prototype.
13378 (pupa_rescue_cmd_multiboot): Likewise
13379 (pupa_rescue_cmd_module): Likewise.
13380
13381 * kern/loader.c (pupa_loader_set): Continue when
13382 pupa_loader_unload_func() fails.
13383 (pupa_loader_unset): New function.
13384 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13385
13386 * kern/misc.c (pupa_stpcpy): New function.
13387 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13388
8e72a9c0 133892003-11-12 Marco Gerards <metgerards@student.han.nl>
13390
13391 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13392 for available extensions.
13393
13394 * include/pupa/i386/pc/time.h: New file.
13395 * kern/disk.c: Include <pupa/machine/time.h>.
13396 (PUPA_CACHE_TIMEOUT): New macro.
13397 (pupa_last_time): New variable.
13398 (pupa_disk_open): Flush the cache when there was a timeout.
13399 (pupa_disk_close): Reset the timer.
13400 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13401 pupa_currticks.
13402 * util/misc.c: Include <sys/times.h>
13403 (pupa_get_rtc): New function.
13404
c4adbd32 134052003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13406
13407 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13408 as blocks.
13409 (pupa_ext2_get_file_block): Use blocks member.
13410
13411 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13412 first block. Return -1 instead of pupa_errno on error.
13413
bfd30f06 134142003-10-27 Marco Gerards <metgerards@student.han.nl>
13415
13416 * README: In the pupa-mkimage example use _chain instead of chain
13417 and ext2 instead of fat.
13418 * TODO: Replace ext2fs with jfs as an example. Add an item for
13419 adding journal playback for ext2fs.
13420 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13421 (pkgdata_MODULES): Added ext2.mod.
13422 (ext2_mod_SOURCES): New variable.
13423 (ext2_mod_CFLAGS): Likewise.
13424 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13425 * include/pupa/misc.h (pupa_strncpy): New prototype.
13426 (pupa_strcat): Likewise.
13427 (pupa_strncmp): Likewise.
13428 * kern/misc.c (pupa_strcat): Enable function.
13429 (pupa_strncpy): New function.
13430 (pupa_strncmp): Likewise.
13431 * fs/ext2.c: New file.
f19dbdb7 13432
bfd30f06 13433 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13434 when the read failed before retrying.
13435 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13436 (_FILE_OFFSET_BITS): Likewise.
13437 * configure.ac: Added AC_SYS_LARGEFILE.
13438
98d15063 134392003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13440
13441 * genmk.rb (PModule#rule): Make sure to get only symbol names
13442 from the output of nm.
13443 Reported by Robert Millan <zeratul2@wanadoo.es>.
13444
18d9c7cd 134452003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13446
13447 I forgot to check in these changes for a long time. This adds
13448 incomplete support for VGA console, and this is still very
13449 buggy. Also, a lot of consideration is required for I18N,
13450 UNICODE, and VGA font issues. Therefore, assume that this is
13451 such that "better than nothing".
f19dbdb7 13452
18d9c7cd 13453 * font/manager.c: New file.
13454 * include/pupa/font.h: Likewise.
13455 * include/pupa/i386/pc/vga.h: Likewise.
13456 * term/i386/pc/vga.c: Likewise.
13457 * util/unifont2pff.rb: Likewise.
13458
13459 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13460 (pkgdata_MODULES): Added vga.mod and font.mod.
13461 (vga_mod_SOURCES): New variables.
13462 (vga_mod_CFLAGS): Likewise.
13463 (font_mod_SOURCES): Likewise.
13464 (font_mod_CFLAGS): Likewise.
13465
13466 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13467
13468 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 13469 (struct pupa_term): Added init and fini.
18d9c7cd 13470 Changed the argument of putchar to pupa_uint32_t.
13471
13472 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13473 (pupa_console_real_putchar): New prototype.
13474 (pupa_console_putchar): Removed.
13475 (pupa_console_checkkey): Exported.
13476 (pupa_console_getkey): Likewise.
13477
13478 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13479 characters.
13480
13481 * kern/term.c (pupa_term_set_current): Rewritten.
13482 (pupa_putchar): Likewise.
13483 (pupa_putcode): New function.
13484
13485 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13486 (pupa_console_real_putchar): ... this.
13487 (pupa_vga_set_mode): New function.
13488 (pupa_vga_get_font): Likewise.
13489
13490 * normal/command.c: Include pupa/term.h.
13491 (terminal_command): New function.
13492 (pupa_command_init): Register the command "terminal".
13493
13494 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13495 (DISP_UP): Likewise.
13496 (DISP_RIGHT): Likewise.
13497 (DISP_DOWN): Likewise.
13498 (DISP_HLINE): Likewise.
13499 (DISP_VLINE): Likewise.
13500 (DISP_UL): Likewise.
13501 (DISP_UR): Likewise.
13502 (DISP_LL): Likewise.
13503 (DISP_LR): Likewise.
13504
13505 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 13506
977329f5 135072003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13508
13509 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13510 FIX. Reverse the path_list.
13511
13512 * include/pupa/normal.h: Export pupa_register_command and
13513 pupa_unregister_command.
13514
13515 * hello/hello.c (pupa_cmd_hello): New module.
13516 * conf/i386-pc.rmk: Added hello.mod.
13517
1f5ab428 135182003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13519
13520 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 13521
1f5ab428 13522 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13523 (compress_kernel): New variable.
13524 (generate_image): Heavily modified to support compressing a
13525 large part of the core image.
13526
13527 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13528 leak.
13529 (pupa_util_load_image): New function.
13530
13531 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13532 (pupa_compressed_size): New variable.
13533 (codestart): Enable Gate A20 here.
13534 Decompress the compressed part of the core image.
13535 Rearrange the code to put functions and variables which are
13536 required for initialization in the non-compressed part.
13537 Include lzo1x.S.
13538
13539 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13540 here.
13541
13542 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13543
f19dbdb7 13544 * include/pupa/i386/pc/kernel.h
1f5ab428 13545 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13546 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13547 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13548 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13549 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13550
13551 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13552
13553 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13554 (Utility#rule): Likewise.
13555
13556 * configure.ac: Check if LZO is available.
13557
ce5bf700 135582003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13559
13560 * include/pupa/normal.h: New file.
13561 * include/pupa/setjmp.h: Likewise.
13562 * include/pupa/i386/setjmp.h: Likewise.
13563 * normal/cmdline.c: Likewise.
13564 * normal/command.c: Likewise.
13565 * normal/main.c: Likewise.
13566 * normal/menu.c: Likewise.
13567 * normal/i386/setjmp.S: Likewise.
f19dbdb7 13568
ce5bf700 13569 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13570 (pupa_rescue_cmd_initrd): Likewise.
13571
13572 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13573 Likewise.
13574
13575 * kern/i386/pc/startup.S (translation_table): New variable.
13576 (translate_keycode): New function.
13577 (pupa_console_getkey): Call translate_keycode.
13578
13579 * kern/rescue.c (attempt_normal_mode): New function.
13580 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13581 it failed, print a message.
13582
13583 * kern/mm.c (pupa_real_malloc): Print more information when a
13584 free magic is broken.
13585 (pupa_free): If the first free header is not free actually, set
13586 it to P.
13587
13588 * kern/main.c (pupa_load_normal_mode): Just load the module
13589 "normal".
13590 (pupa_main): Don't print the message
13591 "Entering into rescue mode..." here.
13592
13593 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13594 Declared.
13595 (pupa_rescue_cmd_initrd): Likewise.
13596 (pupa_rescue_cmd_initrd): Likewise.
13597
13598 * include/pupa/symbol.h (FUNCTION): Specify the type.
13599 (VARIABLE): Likewise.
13600
13601 * include/pupa/err.h (pupa_err_t): Added
13602 PUPA_ERR_UNKNOWN_COMMAND.
13603
13604 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13605 (pupa_dl_get_prefix): Likewise.
13606
13607 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13608 Added _chain.mod and _linux.mod instead of chain.mod and
13609 linux.mod.
13610 (chain_mod_SOURCES): Renamed to ...
13611 (_chain_mod_SOURCES): ... this.
13612 (chain_mod_CFLAGS): Renamed to ...
13613 (_chain_mod_CFLAGS): ... this.
13614 (linux_mod_SOURCES): Renamed to ...
13615 (_linux_mod_SOURCES): ... this.
13616 (linux_mod_CFLAGS): Renamed to ...
13617 (_linux_mod_CFLAGS): ... this.
13618 (normal_mod_SOURCES): New variable.
13619 (normal_mod_CFLAGS): Likewise.
13620 (normal_mod_ASFLAGS): Likewise.
13621
136222003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13623
13624 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13625 possible.
13626
fe6b695a 13627 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 13628 recursively.
13629 (pupa_dl_unref): Unrefer depending modules recursively.
13630 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13631 a module is unloaded before one depending on that module is
13632 unloaded.
13633 (pupa_dl_unload): Unload depending modules explicitly,
13634 if possible.
13635
c04da074 136362003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13637
13638 * include/pupa/i386/pc/linux.h: New file.
13639 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 13640
c04da074 13641 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13642 Removed.
13643 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13644 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13645 of PUPA_CHAINLOADER_BOOT_SECTOR.
13646
13647 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13648 (pupa_linux_prot_size): New variable.
13649 (pupa_linux_tmp_addr): Likewise.
13650 (pupa_linux_real_addr): Likewise.
13651 (pupa_linux_boot_zimage): New function.
13652 (pupa_linux_boot_bzimage): Likewise.
13653
13654 * kern/i386/pc/init.c (struct mem_region): New structure.
13655 (MAX_REGIONS): New macro.
13656 (mem_regions): New variable.
13657 (num_regions): Likewise.
13658 (pupa_os_area_addr): Likewise.
13659 (pupa_os_area_size): Likewise.
13660 (pupa_lower_mem): Likewise.
13661 (pupa_upper_mem): Likewise.
13662 (add_mem_region): New function.
13663 (compact_mem_regions): Likewise.
13664 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13665 the size of the conventional memory and that of so-called upper
13666 memory (before the first memory hole).
13667 Instead of adding each found region to free memory, use
13668 add_mem_region and add them after removing overlaps.
13669 Also, add only 1/4 of the upper memory to free memory. The rest
13670 is used for loading OS images. Maybe this is ad hoc, but this
13671 makes it much easier to relocate OS images when booting.
13672
13673 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13674 (pupa_enter_rescue_mode): Don't register initrd and module.
13675
13676 * kern/mm.c: Include pupa/dl.h.
13677
13678 * kern/main.c: Include pupa/file.h and pupa/device.h.
13679
13680 * kern/loader.c (pupa_loader_load_module_func): Removed.
13681 (pupa_loader_load_module): Likewise.
13682
13683 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13684 ``.o''.
13685
13686 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13687 (pupa_linux_tmp_addr): Likewise.
13688 (pupa_linux_real_addr): Likewise.
13689 (pupa_linux_boot_zimage): Likewise.
13690 (pupa_linux_boot_bzimage): Likewise.
13691
13692 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13693 (pupa_upper_mem): Likewise.
13694 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13695 module is too dangerous.
13696
13697 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13698 (pupa_os_area_size): Likewise.
13699 (pupa_loader_set): Remove the first argument. Loader doesn't
13700 manage modules or initrd any longer.
13701 (pupa_loader_load_module): Removed.
13702
13703 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13704 (linux_mod_SOURCES): New variable.
13705 (linux_mod_CFLAGS): Likewise.
13706
a13f9237 137072003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13708
13709 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13710 the length of a blocklist correctly.
13711
13712 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13713 Use ioctl only if the OS file is a block device.
13714 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13715 not very useful for normal files.
13716
13717 * kern/main.c (pupa_set_root_dev): New function.
13718 (pupa_load_normal_mode): Likewise.
13719 (pupa_main): Call those above.
13720
13721 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13722 pupa_uint16_t.
13723
13724 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13725
a5ffe966 137262003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13727
13728 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13729 (setup): Configure the installed partition information and the
13730 dl prefix.
13731
13732 * loader/i386/pc/chainloader.c (my_mod): New variable.
13733 (pupa_chainloader_unload): New function.
13734 (pupa_rescue_cmd_chainloader): Refer itself.
13735 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13736
13737 * kern/i386/pc/startup.S (install_partition): Removed.
13738 (version_string): Likewise.
13739 (config_file): Likewise.
13740 (pupa_install_dos_part): New variable.
13741 (pupa_install_bsd_part): Likewise.
13742 (pupa_prefix): Likewise.
13743 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13744
13745 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13746 and pupa/misc.h.
13747 (make_install_device): New function.
13748 (pupa_machine_init): Set the dl prefix.
13749
13750 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13751 (buf): Renamed to ...
13752 (linebuf): ... this.
13753 (pupa_rescue_cmd_prefix): New function.
13754 (pupa_rescue_cmd_insmod): Likewise.
13755 (pupa_rescue_cmd_rmmod): Likewise.
13756 (pupa_rescue_cmd_lsmod): Likewise.
13757 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13758 rmmod and lsmod.
13759
13760 * kern/mm.c (pupa_memalign): If failed even after invalidating
13761 disk caches, unload unneeded modules and retry.
13762
13763 * kern/misc.c (pupa_memmove): New function.
13764 (pupa_memcpy): Removed.
13765 (pupa_strcpy): New function.
13766 (pupa_itoa): Made static.
13767
13768 * kern/dl.c (pupa_dl_iterate): New function.
13769 (pupa_dl_ref): Likewise.
13770 (pupa_dl_unref): Likewise.
13771 (pupa_dl_unload): Return if succeeded or not.
13772 (pupa_dl_unload_unneeded): New function.
13773 (pupa_dl_unload_all): Likewise.
13774 (pupa_dl_init): Renamed to ...
13775 (pupa_dl_set_prefix): ... this.
13776 (pupa_dl_get_prefix): New function.
13777
13778 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13779 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13780 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13781 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13782 (pupa_install_dos_part): Declared.
13783 (pupa_install_bsd_part): Likewise.
13784 (pupa_prefix): Likewise.
13785 (pupa_boot_drive): Likewise.
13786
13787 * include/pupa/types.h: Fix a typo.
13788
13789 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13790 pupa_memmove.
13791 (pupa_memmove): Declared.
13792 (pupa_strcpy): Likewise.
13793
13794 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13795 pupa_mod_init takes one argument, its own module.
13796 (pupa_dl_unload_unneeded): Declared.
13797 (pupa_dl_unload_all): Likewise.
13798 (pupa_dl_ref): Likewise.
13799 (pupa_dl_unref): Likewise.
13800 (pupa_dl_iterate): Likewise.
13801 (pupa_dl_init): Renamed to ...
13802 (pupa_dl_set_prefix): ... this.
13803 (pupa_dl_get_prefix): Declared.
13804
13805 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 13806 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 13807 unloaded.
13808 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13809 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13810
13811 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13812 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13813
012d7999 138142003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13815
13816 * util/i386/pc/pupa-setup.c (setup): Define the internal
13817 function find_first_partition_start at the top level, because GCC
13818 3.0.x cannot compile internal functions in deeper scopes
13819 correctly.
13820 (find_root_device): Use lstat instead of stat.
13821 Don't follow symbolic links.
13822 Fix the path-constructing code.
13823
13824 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13825 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13826 by a BLKGETSIZE ioctl first, because block devices don't fill
13827 the member st_mode of the structure stat on Linux.
13828 [__linux__] (linux_find_partition): Use a temporary buffer
13829 REAL_DEV for the working space. Copy it to DEV before returning.
13830 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13831 buffer cache consistent.
13832 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13833 strncmp. The previous value was merely wrong.
13834 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13835
13836 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13837 FAT size is 12. The previous value was merely wrong.
13838
13839 * kern/main.c (pupa_main): Don't split the starting message from
13840 newlines.
13841
13842 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13843 LF, because BIOS goes crazy about character attributes in this
13844 case.
13845
1cc73a62 138462003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13847
13848 * include/i386/pc/util/biosdisk.h: New file.
13849 * util/i386/pc/biosdisk.c: Likewise.
13850 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 13851
1cc73a62 13852 * Makefile.in (INCLUDE_DISTFILES): Added
13853 include/pupa/i386/pc/util/biosdisk.h.
13854 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13855 directory util/i386/pc.
13856 (install-local): Added a rule for sbin_UTILITIES.
13857 (uninstall): Likewise.
13858
13859 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13860
13861 * util/misc.c (xrealloc): New function.
13862 (pupa_malloc): Likewise.
13863 (pupa_free): Likewise.
13864 (pupa_realloc): Likewise.
13865 (pupa_stop): Likewise.
13866 (pupa_putchar): Likewise.
13867
13868 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13869
13870 * include/pupa/util/misc.h (xrealloc): Declared.
13871
13872 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13873 macro.
13874 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13875 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13876
13877 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13878 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13879
13880 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13881 way should be implemented.
13882 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13883
13884 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13885 the size of NAME for safety.
13886 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13887 0x88.
13888
13889 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13890 (pupa_setup_SOURCES): Likewise.
13891
13892 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13893
08b70fe8 138942002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13895
13896 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13897 bunch of pushl's from pusha, because this destroys the return
13898 value.
13899
62ddcc8f 139002002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13901
13902 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13903 This means that any missing prototypes could be fatal. Also, you
13904 must take care when writing assembly code. See the comments at
13905 the beginning of startup.S, for more details.
f19dbdb7 13906
62ddcc8f 13907 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13908 compilation mechanism.
13909 (pupa_chainloader_real_boot): Likewise.
13910 (pupa_biosdisk_rw_int13_extensions): Likewise.
13911 (pupa_biosdisk_rw_standard): Likewise.
13912 (pupa_biosdisk_check_int13_extensions): Likewise.
13913 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13914 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13915 (pupa_get_memsize): Likewise.
13916 (pupa_get_mmap_entry): Likewise.
13917 (pupa_console_putchar): Likewise.
13918 (pupa_console_setcursor): Likewise.
13919 (pupa_getrtsecs): Use pushl instead of push.
13920
13921 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13922 memory instead of the stack for a mmap entry, because some
13923 BIOSes may ignore the maximum size and overflow.
13924
13925 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13926
13927 * genmk.rb (PModule#rule): Compile automatically generated
13928 sources with module-specific CFLAGS as well as other sources.
13929
9962ed99 139302002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13931
13932 * configure.ac: Check ld.
13933 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13934 respectively, before checking endianness and sizes.
13935
13936 * Makefile.in (LD): New variable.
f19dbdb7 13937
abdfc3c5 139382002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13939
13940 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13941
6a161fa9 139422002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13943
13944 * Changelog: New file.
13945