]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-01-30 Christian Franke <franke@computer.org>
[grub2.git] / ChangeLog
CommitLineData
56192c23 12009-01-30 Christian Franke <franke@computer.org>
2
3 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4 in option help text.
5
d72521b3 62009-01-27 Pavel Roskin <proski@gnu.org>
7
8 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
9
994b5e84 102009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
11
12 * commands/lsmmap.c: Add include to grub/machine/memory.h.
13
14 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
15
16 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
17 unregister function.
18
6a7eab2c 192009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
20
21 * disk/scsi.c (grub_scsi_read): Fix sign problem.
22
23 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
24
25 * util/grub-mkfont.c (usage): Fix typo.
26
27 * util/elf/grub-mkimage.c (load_modules): Fix warning.
28
1806b56e 292009-01-26 Daniel Mierswa <impulze@impulze.org>
30
3fb18f09 31 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
32
336e1fb9 33 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
34
1806b56e 35 * kern/misc.c (grub_strcasecmp): New function.
36 (grub_strcasecmp): Use grub_size_t instead of int for length.
37 Fix return value.
38 * include/grub/misc.h: Update function prototypes.
39
580b2a0f 402009-01-26 Robert Millan <rmh@aybabtu.com>
41
42 * configure.ac: Fix cross-compilation check.
ef257b36 43
d31c24f1 442009-01-22 Christian Franke <franke@computer.org>
45
46 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
47 (precision) digit string. Allow `.format2' without `format1' (width).
48 Limit input chars for `%s' output to `format2' if specified. This is
49 compatible with standard printf ().
50
3138b44c 512009-01-22 Christian Franke <franke@computer.org>
52
53 * disk/ata.c (grub_ata_wait_status): Replace by ...
54 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
55 other status bits may be invalid while BSY is asserted.
56 (grub_ata_check_ready): New function.
57 (grub_ata_cmd): Removed.
58 (grub_ata_wait_drq): New function.
59 (grub_ata_strncpy): Remove inline.
60 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
61 and error check now done by grub_ata_wait_drq ().
62 (grub_ata_pio_write): Likewise.
63 (grub_atapi_identify): Set DEV before check for !BSY. Use
64 grub_ata_wait_drq () to wait for data.
65 (grub_ata_device_initialize): Add status register check to
66 detect missing SATA slave devices. Add debug messages.
67 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
68 (grub_atapi_packet): Set DEV before check for !BSY. Replace
69 transfer loop by grub_ata_pio_write ().
70 (grub_ata_identify): Set DEV before check for !BSY. Use
71 grub_ata_wait_drq () to wait for data.
ef257b36 72 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 73 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
74 read/write in one loop. Fix invalid command on write. Fix incomplete
75 command on (size % batch) == 0. Add missing error check after write of
76 last block. Add debug messages.
77 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
78
59a64ef6 792009-01-19 Christian Franke <franke@computer.org>
80
81 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
82 (GRUB_ATAPI_IREASON_*): Likewise.
83 (grub_ata_pio_write): Fix timeout error return.
84 (grub_atapi_identify): Add grub_ata_wait () after cmd.
85 (grub_atapi_wait_drq): New function.
86 (grub_atapi_packet): New parameter `size'.
87 Use grub_atapi_wait_drq () and direct write instead of
88 grub_ata_pio_write ().
89 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
90 reads the number of bytes requested by the device for each DRQ
91 assertion.
92 (grub_atapi_write): Remove old implementation, return not
93 implemented instead.
94
1cfe20b3 952009-01-19 Christian Franke <franke@computer.org>
96
97 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
98 of 512 to calculate data size.
99 (grub_scsi_read12): Likewise.
100 (grub_scsi_write10): Likewise.
101 (grub_scsi_write12): Likewise.
102 (grub_scsi_read): Adjust size according to blocksize.
103 Add checks for invalid blocksize and unaligned transfer.
104
bee5fe5d 1052009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
106
107 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
108
ef257b36 109 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 110 width glyphs.
111
3e643f8c 1122009-01-19 Robert Millan <rmh@aybabtu.com>
113
114 * config.guess: Update to latest version from config git.
115 * config.sub: Likewise.
116
4fa80998 1172009-01-17 Felix Zielcke <fzielcke@z-51.de>
118
119 * Makefile.in: Change font compilation to use new grub-mkfont instead
120 of java version.
121
122 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
123 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
124 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
125 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
126 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
127 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
128 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
129 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
130 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
131
7086085b 1322009-01-16 Christian Franke <franke@computer.org>
133
134 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
135 (enum grub_ata_timeout_milliseconds): New enum.
136 (grub_ata_wait_status): Add parameter milliseconds.
137 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
138 recovery from timed-out commands.
139 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
140 return grub_errno instead of REG_ERROR.
141 (grub_ata_pio_write): Add parameter milliseconds.
142 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
143 Pass milliseconds to grub_ata_wait_status () and
144 grub_ata_pio_read ().
145 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
146 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
147 grub_ata_wait_status (). Fix IDENTIFY timeout check.
148 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
149 It is not suitable for device detection, because DEV bit is ignored,
150 the command may run too long, and not all devices set the signature
151 properly.
152 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
153 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
154 Fix device selection, DEV bit must be set first to address the registers
155 of the correct device.
156 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
157 grub_ata_pio_read/write ().
158 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
159 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
160
4a412913 1612009-01-13 Carles Pina i Estany <carles@pina.cat>
162
163 * util/grub-editenv.c (main): Use fseeko(), not fseek().
164
7795c55e 1652009-01-13 Bean <bean123ch@gmail.com>
d913988c 166
167 * util/grub-mkfont.c (write_font): forget to remove some debug code.
168
7795c55e 1692009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 170
171 * Makefile.in: (enable_grub_mkfont): New variable.
172 (freetype_cflags): Likewise.
173 (freetype_libs): Likewise.
174
175 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
176 (grub_mkfont_SOURCES): New variable.
177 (grub_mkfont_CFLAGS): Likewise.
178 (grub_mkfont_LDFLAGS): Likewise.
179
180 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
181 library if `--enable-grub-mkfont' is requested.
182 (enable_grub_mkfont): New variable.
183 (freetype_cflags): Likewise.
184 (freetype_libs): Likewise.
185
186 * util/grub-mkfont.c: New file.
187
093af1fe 1882009-01-12 Christian Franke <franke@computer.org>
189
190 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
191 mode check. Fix setting of compat_use[].
192
f36cc108 1932009-01-10 Robert Millan <rmh@aybabtu.com>
194
195 Update a few copyright years which we forgot to do in 2008 (only for
196 files whose changes made in 2008 were copyright-significant)
197
198 * Makefile.in: Add 2008 to Copyright line.
199 * disk/ieee1275/ofdisk.c: Likewise.
200 * disk/efi/efidisk.c: Likewise.
201 * kern/dl.c: Likewise.
202 * kern/sparc64/ieee1275/init.c: Likewise.
203 * kern/mm.c: Likewise.
204 * kern/efi/mm.c: Likewise.
205 * boot/i386/pc/boot.S: Likewise.
206 * genfslist.sh: Likewise.
207 * fs/iso9660.c: Likewise.
208 * fs/hfs.c: Likewise.
209 * fs/jfs.c: Likewise.
210 * fs/minix.c: Likewise.
211 * fs/ufs.c: Likewise.
212 * gensymlist.sh.in: Likewise.
213 * genkernsyms.sh.in: Likewise.
214 * include/grub/misc.h: Likewise.
215 * include/grub/types.h: Likewise.
216 * include/grub/symbol.h: Likewise.
217 * include/grub/elf.h: Likewise.
218 * include/grub/kernel.h: Likewise.
219 * include/grub/disk.h: Likewise.
220 * include/grub/dl.h: Likewise.
221 * include/grub/i386/linux.h: Likewise.
222 * include/grub/i386/pc/biosdisk.h: Likewise.
223 * include/grub/efi/api.h: Likewise.
224 * include/grub/efi/pe32.h: Likewise.
225 * include/grub/util/misc.h: Likewise.
226 * normal/execute.c: Likewise.
227 * normal/arg.c: Likewise.
228 * normal/completion.c: Likewise.
229 * normal/lexer.c: Likewise.
230 * normal/parser.y: Likewise.
231 * normal/misc.c: Likewise.
232 * commands/i386/pc/vbeinfo.c: Likewise.
233 * commands/hexdump.c: Likewise.
234 * commands/terminal.c: Likewise.
235 * commands/ls.c: Likewise.
236 * commands/help.c: Likewise.
237 * partmap/pc.c: Likewise.
238 * loader/efi/chainloader.c: Likewise.
239 * loader/multiboot_loader.c: Likewise.
240 * loader/i386/pc/multiboot2.c: Likewise.
241 * term/efi/console.c: Likewise.
242 * term/i386/pc/serial.c: Likewise.
243 * util/lvm.c: Likewise.
244 * util/console.c: Likewise.
245 * util/i386/efi/grub-mkimage.c: Likewise.
246 * util/raid.c: Likewise.
247
7f02114b 2482009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
249
250 * commands/videotest.c: Removed include to grub/machine/memory.h.
251
252 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
253 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
254 (video_mod_SOURCES): Removed.
255 (video_mod_CFLAGS): Likewise.
256 (video_mod_LDFLAGS): Likewise.
257 (gfxterm_mod_SOURCES): Likewise.
258 (gfxterm_mod_CFLAGS): Likewise.
259 (gfxterm_mod_LDFLAGS): Likewise.
260 (videotest_mod_SOURCES): Likewise.
261 (videotest_mod_CFLAGS): Likewise.
262 (videotest_mod_LDFLAGS): Likewise.
263 (bitmap_mod_SOURCES): Likewise.
264 (bitmap_mod_CFLAGS): Likewise.
265 (bitmap_mod_LDFLAGS): Likewise.
266 (tga_mod_SOURCES): Likewise.
267 (tga_mod_CFLAGS): Likewise.
268 (tga_mod_LDFLAGS): Likewise.
269 (jpeg_mod_SOURCES): Likewise.
270 (jpeg_mod_CFLAGS): Likewise.
271 (jpeg_mod_LDFLAGS): Likewise.
272 (png_mod_SOURCES): Likewise.
273 (png_mod_CFLAGS): Likewise.
274 (png_mod_LDFLAGS): Likewise.
275
276 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
277 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
278 (video_mod_SOURCES): Added.
279 (video_mod_CFLAGS): Likewise.
280 (video_mod_LDFLAGS): Likewise.
281 (videotest_mod_SOURCES): Likewise.
282 (videotest_mod_CFLAGS): Likewise.
283 (videotest_mod_LDFLAGS): Likewise.
284 (bitmap_mod_SOURCES): Likewise.
285 (bitmap_mod_CFLAGS): Likewise.
286 (bitmap_mod_LDFLAGS): Likewise.
287 (tga_mod_SOURCES): Likewise.
288 (tga_mod_CFLAGS): Likewise.
289 (tga_mod_LDFLAGS): Likewise.
290 (jpeg_mod_SOURCES): Likewise.
291 (jpeg_mod_CFLAGS): Likewise.
292 (jpeg_mod_LDFLAGS): Likewise.
293 (png_mod_SOURCES): Likewise.
294 (png_mod_CFLAGS): Likewise.
295 (png_mod_LDFLAGS): Likewise.
296 (gfxterm_mod_SOURCES): Likewise.
297 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 298 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 299
300 * term/gfxterm.c: Removed include to grub/machine/memory.h,
301 grub/machine/console.h.
302
644fff97 3032009-01-04 Jerone Young <jerone@gmail.com>
304
305 Make on screen instructions clearer
306
307 Based on patch created by Jidanni <jidanni@jidanni.org>
308
309 * normal/menu.c: print clearer instructions on the screen
310
1e901a75 3112009-01-02 Colin D Bennett <colin@gibibit.com>
312
313 New font engine.
34c44600 314
1e901a75 315 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
316 build system and fixed gfxterm.c to work with different sized fonts.
317
318 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 319
1e901a75 320 * configure: Re-generated.
34c44600 321
1e901a75 322 * DISTLIST: Removed font/manager.c.
323 Added font/font.c.
324 Added font/font_cmd.c.
34c44600 325
1e901a75 326 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
327 compilation.
34c44600 328
1e901a75 329 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 330
331 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 332
333 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 334
1e901a75 335 * normal/menu.c: Likewise.
34c44600 336
1e901a75 337 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
338 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 339
1e901a75 340 * include/grub/font.h: Replaced with new file.
34c44600 341
1e901a75 342 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
343 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
344 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
345 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
346 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 347 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 348 fg_red, fg_green, fg_blue, fg_alpha.
349 (grub_video_adapter): Removed blit_glyph.
34c44600 350 (grub_video_blit_glyph): Removed.
351
1e901a75 352 * font/manager.c: Removed file.
34c44600 353
354 * font/font.c: New file.
355
1e901a75 356 * font/font_cmd.c: Likewise.
34c44600 357
1e901a75 358 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 359
1e901a75 360 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
361 (grub_video_vbe_map_rgba): Likewise.
362 (grub_video_vbe_unmap_color_int): Likewise.
363 (grub_video_vbe_blit_glyph): Removed.
364 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 365
1e901a75 366 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
367 (get_pixel): Likewise.
34c44600 368 (set_pixel): Likewise.
369
1e901a75 370 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 371
1e901a75 372 * term/gfxterm.c: Adapted to new font engine.
34c44600 373
1e901a75 374 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 375
1e901a75 376 * term/i386/pc/vga.c: Likewise.
34c44600 377
1e901a75 378 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 379
1e901a75 380 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 381
1e901a75 382 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 383
1e901a75 384 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 385
1e901a75 386 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 387
1e901a75 388 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 389
1e901a75 390 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 391
1e901a75 392 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 393
1e901a75 394 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
395
396 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 397
1e901a75 398 * util/grub-mkconfig_lib.in: Changed font extension.
399
278922e8 4002008-12-28 Felix Zielcke <fzielcke@z-51.de>
401
402 * util/getroot.c (grub_util_get_grub_dev): Add support for
403 /dev/md/dNNpNN style partitionable mdraid devices.
404
3ced05cf 4052008-12-12 Alex Smith <alex@alex-smith.me.uk>
406
407 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
408 at a time limit of the PXE TFTP API correctly.
409 (grub_pxefs_close): Likewise.
410
7fd0ee30 4112008-11-29 Robert Millan <rmh@aybabtu.com>
412
34c44600 413 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 414 grub_ata_device_initialize() calls.
415
34c44600 4162008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 417
418 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
419 iteration failed.
420 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
421
89313780 4222008-11-28 Robert Millan <rmh@aybabtu.com>
423
424 Fix build on powerpc-ieee1275. Based on patch created by
425 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
426 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
427 `kern/ieee1275/mmap.c'.
428 * include/grub/powerpc/ieee1275/memory.h: New file.
429
15257703 430 Provide grub-install on coreboot.
431 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
432 (grub_install_SOURCES): New variable.
433 * util/i386/pc/grub-install.in: Add a few condition checks to make it
434 usable on coreboot.
435
9fc5388a 4362008-11-25 Felix Zielcke <fzielcke@z-51.de>
437
438 * util/grub-fstest.c (grub_term_get_current_input): Change return type
439 to `grub_term_input_t'.
440 (grub_term_get_current_output): Change return type to
441 `grub_term_output_t'.
442
bc3a2f31 4432008-11-22 Robert Millan <rmh@aybabtu.com>
444
34c44600 445 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 446 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
447 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
448 grub_vga_text_cls().
449
80fc88f2 450 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 451 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 452
cbf36fd3 453 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
454 to 0x200000 (avoids trouble with some OFW implementations, and matches
455 with the one in Yaboot).
456 Reported by Manoel Abranches
457
73e8e268 4582008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 459
460 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
461 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
462
73e8e268 463 * util/grub-mkconfig_lib.in (grub_warn): New function.
464 (convert_system_path_to_grub_path): Use grub_warn() when issuing
465 warnings, to obtain consistent formatting.
466 * util/grub.d/00_header.in: Likewise.
467 * util/update-grub_lib.in: Likewise.
468
e94045a1 469 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 470 Move comment text to `#error' stanza.
e94045a1 471
79d29fd7 472 Harmonize ieee1275's grub_available_iterate() with the generic
473 grub_machine_mmap_iterate() interface (fixes a recently-introduced
474 build problem on i386-ieee1275):
475 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
476 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
477 parameter `type'. Update all users of this function.
478 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
479 `kern/ieee1275/mmap.c'.
480 * kern/ieee1275/init.c
481 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
482 with ...
483 (grub_machine_mmap_iterate): ... this.
484 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
485 return type to `grub_err_t'. Update all implementations of this
486 function prototype.
487 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
488 Likewise.
489
60d6b16e 490 Add `lsmmap' command (lists firmware-provided memory map):
491 * commands/lsmmap.c: New file.
492 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
493 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
494 variables.
495 * conf/powerpc-ieee1275.rmk: Likewise.
496 * conf/i386-coreboot.rmk: Likewise.
497 * conf/i386-ieee1275.rmk: Likewise.
498
ebaaf49b 4992008-11-19 Robert Millan <rmh@aybabtu.com>
500
501 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 502 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
503 constraints to initrd allocation (based on code from
504 loader/i386/pc/linux.c). Without them, initrd was allocated too high
505 for Linux to find it.
ebaaf49b 506
dfab719f 5072008-11-14 Robert Millan <rmh@aybabtu.com>
508
509 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
510 order to cope with duplicate slashes.
511
10fc3eb9 5122008-11-14 Robert Millan <rmh@aybabtu.com>
513
514 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
515 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
516 don't want to mess with lower memory, because it is used in the Linux
517 loader.
518
519 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 520 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 521 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
522 is in our heap (probably as a result of it being corrupted during
2f2a3442 523 decompression). Add #error instance with comment to explain why this
524 loader isn't currently usable on PC/BIOS.
10fc3eb9 525
e2e07847 5262008-11-14 Robert Millan <rmh@aybabtu.com>
527
528 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 529 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 530
fe8e8d69 5312008-11-12 Robert Millan <rmh@aybabtu.com>
532
533 Make loader/i386/linux.c buildable on i386-pc (although disabled).
534
535 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
536 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
537 from here ...
538 * include/grub/i386/pc/memory.h: ... to here.
539
976b07d0 5402008-11-12 Robert Millan <rmh@aybabtu.com>
541
542 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
543 split).
544
545 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
546 (grub_console_cur_color, grub_console_real_putchar)
547 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
548 (grub_console_setcolorstate, grub_console_setcolor)
549 (grub_console_getcolor): Move from here ...
550 * include/grub/i386/vga_common.h: ... to here (new file).
551
552 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
553 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
554 `<grub/i386/io.h>'.
555 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
556 `<grub/i386/vga_common.h>'.
557
76679cd3 5582008-11-12 Robert Millan <rmh@aybabtu.com>
559
560 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
561 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
562 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
563 variables.
564 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
565 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
566
567 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
568 grub_console_init() with call to grub_vga_text_init().
569 (grub_machine_fini): Replace call to
570 grub_console_fini() with call to grub_vga_text_fini() and
571 grub_at_keyboard_fini().
572
573 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
574 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
575 (grub_console_setcolorstate, grub_console_setcolor)
576 (grub_console_getcolor): New function prototypes.
577
578 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
579 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
580 (grub_vga_text_setcursor): Static-ize.
581 (grub_vga_text_term): New structure.
582 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
583
584 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
585 (grub_console_cur_color, grub_console_standard_color)
586 (grub_console_normal_color, grub_console_highlight_color)
587 (map_char, grub_console_putchar, grub_console_getcharwidth)
588 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
589 (grub_console_getcolor): Move from here ...
590 * term/i386/vga_common.c: ... to here (same function names).
591
95b841d3 5922008-11-12 Robert Millan <rmh@aybabtu.com>
593
594 Use newly-added Multiboot support in coreboot.
595
596 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
597 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
598
599 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
600 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
601 (codestart): Store the MBI in `startup_multiboot_info' when we're
602 being loaded using Multiboot.
603
604 * kern/i386/coreboot/init.c (grub_machine_init): Move
605 grub_at_keyboard_init() call to beginning of function (useful for
606 debugging). Call grub_machine_mmap_init() before attempting to use
607 grub_machine_mmap_iterate().
608 (grub_lower_mem, grub_upper_mem): Move from here ...
609 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
610 here (new file).
611
612 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
613 function prototype.
614
761ca975 6152008-11-12 Robert Millan <rmh@aybabtu.com>
616
617 Fix a regression introduced by the at_keyboard.mod split. Because
618 some terminals are default on some platforms and non-default on
619 others, the first terminal being registered determines which is
620 going to be default.
621
622 * kern/term.c (grub_term_register_input): If this is the first
623 terminal being registered, set it as the current one.
624 (grub_term_register_output): Likewise.
625
626 * term/efi/console.c (grub_console_init): Do not call
627 grub_term_set_current_output() or grub_term_set_current_input().
628 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
629 * term/i386/pc/console.c (grub_console_init): Likewise.
630 (grub_console_fini): Do not call grub_term_set_current_input()
631 (but leave grub_term_set_current_output() to restore text mode).
632
6c529df7 6332008-11-10 Robert Millan <rmh@aybabtu.com>
634
635 * util/grub.d/00_header.in: Add backward compatibility check for
636 versions of terminal.mod that don't understand `terminal_input' or
637 `terminal_output'.
638
132e4113 6392008-11-09 Robert Millan <rmh@aybabtu.com>
640
641 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
642 `terminal_input' / `terminal_output', not `terminal'.
643
ac293d50 6442008-11-08 Robert Millan <rmh@aybabtu.com>
645
646 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 647 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 648
0025933a 6492008-11-08 Robert Millan <rmh@aybabtu.com>
650
651 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 652 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 653 members. Update all users.
654 * util/console.c (grub_ncurses_term): Split in ...
655 (grub_ncurses_term_input): ... this, and ...
656 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 657 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 658
37c86336 6592008-11-08 Robert Millan <rmh@aybabtu.com>
660
661 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
662 (PKGDATA): Add $(pkgdata_SRCDIR).
663 (pkglib_BUILDDIR): New variable.
664 (pkgdata_SRCDIR): New variable.
665 (build_env.mk): New target.
666 (include_DATA): New variable.
667 (install-local): Install $(include_DATA) files in $(includedir).
668
b6c15a2d 6692008-11-07 Pavel Roskin <proski@gnu.org>
670
d99d46f1 671 * gendistlist.sh: Use C locale for sorting to ensure consistent
672 output on all systems.
673
b6c15a2d 674 * util/grub.d/00_header.in: Remove incorrect space before
675 "serial".
676
c32ee8c9 6772008-11-07 Robert Millan <rmh@aybabtu.com>
678
679 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
680 per specification.
681 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
682 * loader/multiboot_loader.c (find_multi_boot2_header): New function
683 (based on find_multi_boot1_header).
684 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
685 using find_multi_boot2_header(), and abort if neither Multiboot or
686 Multiboot headers were found.
687
651c29b7 6882008-11-07 Robert Millan <rmh@aybabtu.com>
689
690 Modularize at_keyboard.mod:
691
692 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
693 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
694 (at_keyboard_mod_LDFLAGS): New variables.
695
696 Actual terminal split:
697
698 * include/grub/term.h (struct grub_term): Split in ...
699 (struct grub_term_input): ... this, and ...
700 (struct grub_term_output): ... this. Update all users.
701 (grub_term_set_current): Split in ...
702 (grub_term_set_current_input): ... this, and ...
703 (grub_term_set_current_output): ... this.
704 (grub_term_get_current): Split in ...
705 (grub_term_get_current_input): ... this, and ...
706 (grub_term_get_current_output): ... this.
707 (grub_term_register): Split in ...
708 (grub_term_register_input): ... this, and ...
709 (grub_term_register_output): ... this.
710 (grub_term_unregister): Split in ...
711 (grub_term_unregister_input): ... this, and ...
712 (grub_term_unregister_output): ... this.
713 (grub_term_iterate): Split in ...
714 (grub_term_iterate_input): ... this, and ...
715 (grub_term_iterate_output): ... this.
716
717 * kern/term.c (grub_term_list): Split in ...
718 (grub_term_list_input): ... this, and ...
719 (grub_term_list_output): ... this. Update all users.
720 (grub_cur_term): Split in ...
721 (grub_cur_term_input): ... this, and ...
722 (grub_cur_term_output): ... this. Update all users.
723 (grub_term_set_current): Split in ...
724 (grub_term_set_current_input): ... this, and ...
725 (grub_term_set_current_output): ... this.
726 (grub_term_get_current): Split in ...
727 (grub_term_get_current_input): ... this, and ...
728 (grub_term_get_current_output): ... this.
729 (grub_term_register): Split in ...
730 (grub_term_register_input): ... this, and ...
731 (grub_term_register_output): ... this.
732 (grub_term_unregister): Split in ...
733 (grub_term_unregister_input): ... this, and ...
734 (grub_term_unregister_output): ... this.
735 (grub_term_iterate): Split in ...
736 (grub_term_iterate_input): ... this, and ...
737 (grub_term_iterate_output): ... this.
738
739 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
740 a check for input and one for output (and only attempt to get keys
741 from user when input works).
742
743 * util/grub-probe.c (grub_term_get_current): Split in ...
744 (grub_term_get_current_input): ... this, and ...
745 (grub_term_get_current_output): ... this.
746 * util/grub-fstest.c: Likewise.
747 * util/i386/pc/grub-setup.c: Likewise.
748 * util/grub-editenv.c: Likewise.
749
750 Portability adjustments:
751
752 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
753 `term/i386/pc/at_keyboard.c'.
754 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
755 grub_keyboard_controller_init() (now handled by terminal .init).
756 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
757 grub_at_keyboard_init().
758 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
759 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
760 at_keyboard.mod via input terminal interface).
761 * include/grub/i386/coreboot/console.h: Convert into a stub for
762 `<grub/i386/pc/console.h>'.
763
764 Migrate full terminals to new API:
765
766 * term/efi/console.c (grub_console_term): Split into ...
767 (grub_console_term_input): ... this, and ...
768 (grub_console_term_output): ... this. Update all users.
769 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
770 (grub_ofconsole_init): Split into ...
771 (grub_ofconsole_init_input): ... this, and ...
772 (grub_ofconsole_init_output): ... this.
773 (grub_ofconsole_term): Split into ...
774 (grub_ofconsole_term_input): ... this, and ...
775 (grub_ofconsole_term_output): ... this. Update all users.
776 * term/i386/pc/serial.c (grub_serial_term): Split into ...
777 (grub_serial_term_input): ... this, and ...
778 (grub_serial_term_output): ... this. Update all users.
779 * term/i386/pc/console.c (grub_console_term): Split into ...
780 (grub_console_term_input): ... this, and ...
781 (grub_console_term_output): ... this. Update all users.
782 (grub_console_term_input): Only enable it on PC/BIOS platform.
783 (grub_console_init): Remove grub_keyboard_controller_init() call.
784
785 Migrate input terminals to new API:
786
787 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
788 `i386' and `i386/pc' to enable build on x86_64 (this driver is
789 i386-specific anyway).
790 (grub_console_checkkey): Rename to ...
791 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
792 users.
793 (grub_keyboard_controller_orig): New variable.
794 (grub_console_getkey): Rename to ...
795 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
796 users.
797 (grub_keyboard_controller_init): Static-ize. Save original
798 controller value so that it can be restored ...
799 (grub_keyboard_controller_fini): ... here (new function).
800 (grub_at_keyboard_term): New structure.
801 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
802 functions.
803
804 Migrate output terminals to new API:
805
806 * term/i386/pc/vga.c (grub_vga_term): Change type to
807 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
808 members. Update all users.
809 * term/gfxterm.c (grub_video_term): Change type to
810 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
811 members. Update all users.
812 * include/grub/i386/pc/console.h (grub_console_checkkey)
813 (grub_console_getkey): Do not export (no longer needed by gfxterm,
814 etc).
815
816 Migrate `terminal' command and userland tools to new API:
817
818 * commands/terminal.c (grub_cmd_terminal): Split into ...
819 (grub_cmd_terminal_input): ... this, and ...
820 (grub_cmd_terminal_output): ... this.
821 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
822 `terminal_input' and `terminal_output'.
823 * util/grub.d/00_header.in: Adjust `terminal' calls to new
824 `terminal_input' / `terminal_output' API.
825 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
826 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
827 provided ${GRUB_TERMINAL}, convert it).
828
96e5d876 8292008-11-04 Robert Millan <rmh@aybabtu.com>
830
831 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
832 for FreeBSD.
833 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
834
556f3775 8352008-11-03 Bean <bean123ch@gmail.com>
836
837 * kern/elf.c (grub_elf32_load): Revert to previous code.
838 (grub_elf64_load): Likewise.
839
840 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
841
926b9823 8422008-11-01 Robert Millan <rmh@aybabtu.com>
843
844 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
845 (TARGET_CPPFLAGS): Likewise.
846 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
847
1432e958 8482008-11-01 Carles Pina i Estany <carles@pina.cat>
849
850 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
851
dba3f844 8522008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 853
854 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
855 addition of objects until the code is not going to be able to fail.
856
dba3f844 8572008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 858
859 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
860 (add a missing NULL check, and correct them by moving the pointer
861 operations after the actual check).
862
7ab28c21 8632008-10-29 Robert Millan <rmh@aybabtu.com>
864
865 * util/i386/pc/grub-install.in: Handle empty string as output from
866 make_system_path_relative_to_its_root().
867
1b7748eb 8682008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
869
870 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
871 circular metadata worst case scenario. If the metadata is circular
872 then copy the wrap in place.
873 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
874 project lib/format_text/layout.h
875 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
876
c9618ab2 8772008-10-03 Felix Zielcke <fzielcke@z-51.de>
878
7a36edca 879 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 880
bf981c62 8812008-10-03 Felix Zielcke <fzielcke@z-51.de>
882
883 * util/update-grub_lib.in: Mention filename in warning message.
884
6d994591 8852008-09-29 Felix Zielcke <fzielcke@z-51.de>
886
887 * NEWS: Update for rename of update-grub to grub-mkconfig.
888
18ade780 8892008-09-29 Felix Zielcke <fzielcke@z-51.de>
890
891 * util/update-grub_lib.in: Copy to ...
892 * util/grub-mkconfig_lib.in: ... this. Update all users.
893 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
894 * util/update-grub.in: Rename to ...
895 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
896 option. Add `--output' option to allow users to specify the generated
897 configuration file. Default to stdout.
898 (update_grub_dir): Rename to ...
899 (grub_mkconfig_dir): ... this.
900 (grub_cfg): Default to an empty string.
901 * conf/common.rmk (update-grub): Rename to ...
902 (grub-mkconfig): ... this.
903 (update-grub_lib): Copy to ...
904 (grub-mkconfig_lib): ... this.
905 (update-grub_SCRIPTS): Copy to ...
906 (grub-mkconfig_SCRIPTS): ... this. Update all users.
907 (update-grub_DATA): Rename to ...
908 (grub-mkconfig_DATA): ... this.
909
556ce6ac 9102008-09-28 Robert Millan <rmh@aybabtu.com>
911
912 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
913 to `modified'. Add the real `created' field.
914 (grub_iso9660_uuid): Use `modified' rather than `created' for
915 constructing the UUID.
916
9172008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 918
919 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
920 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
921
92274e85 9222008-09-28 Bean <bean123ch@gmail.com>
923
924 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
925 Thanks to Christian Franke for finding this bug.
926
add6f17a 9272008-09-25 Robert Millan <rmh@aybabtu.com>
928
929 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
930 instances of grub_util_get_disk_name() (see previous commit).
931
d2a367b8 9322008-09-25 Robert Millan <rmh@aybabtu.com>
933
934 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
935 `util/i386/get_disk_name.c'.
936 * conf/i386-efi.rmk: Likewise.
937 * conf/x86_64-efi.rmk: Likewise.
938 * conf/i386-coreboot.rmk: Likewise.
939 * conf/i386-ieee1275.rmk: Likewise.
940 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
941 `util/ieee1275/get_disk_name.c'.
942 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
943 * util/ieee1275/get_disk_name.c: Remove file.
944 * util/i386/get_disk_name.c: Remove file.
945 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
946 "hd%d" for device.map entries, rather than using
947 grub_util_get_disk_name().
948
81a06771 9492008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 950
951 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
952 warning.
953 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
954
5a004279 9552008-09-24 Carles Pina i Estany <carles@pina.cat>
956
957 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
958 Changed to 0x5100.
959 (GRUB_TERM_PPAGE): Changed to 0x4900.
960
397093d3 9612008-09-24 Robert Millan <rmh@aybabtu.com>
962
963 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
964 macros (they were i386-pc specific).
965 * include/grub/sparc64/ieee1275/console.h: Likewise.
966 * include/grub/efi/console.h: Likewise.
967
a91b6c7c 9682008-09-22 Bean <bean123ch@gmail.com>
969
970 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
971 resident and in attribute list.
972
973 * include/grub/ntfs.h (BMP_LEN): Removed.
974
c40fd116 9752008-09-22 Bean <bean123ch@gmail.com>
976
81a06771 977 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 978 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
979
980 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
981 error occurs, as grub_disk_open will call grub_disk_close, which will
982 call p->close (scsi).
983
81a06771 9842008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 985
986 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
987 (AC_PREREQ): Bumped to 2.59.
988 (AC_TRY_COMPILE): Replace obsolete macro with ...
989 (AC_COMPILE_IFELSE): ... this.
990 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
991 (AC_LINK_IFELSE): ... this.
992
5dc43410 9932008-09-21 Felix Zielcke <fzielcke@z-51.de>
994
995 * autogen.sh: Add a call to `gendistlist.sh'.
996
9035dce4 9972008-09-19 Christian Franke <franke@computer.org>
998
999 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1000 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1001 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1002 Export __enable_execute_stack() to modules.
1003 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1004 New function.
1005
7fd75377 10062008-09-09 Felix Zielcke <fzielcke@z-51.de>
1007
040030b3 1008 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1009 Sort the list.
1010
10112008-09-09 Felix Zielcke <fzielcke@z-51.de>
1012
1013 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 1014 #include <grub/util/hostdisk.h>.
1015
89d5ffcf 10162008-09-08 Robert Millan <rmh@aybabtu.com>
1017
1018 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1019 segments when their filesz is zero (grub_file_read() interprets
81a06771 1020 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 1021 Use `lowest_segment' rather than 0 for calculating the current
1022 segment load address.
1023
40da438f 10242008-09-08 Robert Millan <rmh@aybabtu.com>
1025
1026 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1027 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1028 clobbered useful information.
1029
ddbf5556 10302008-09-08 Robert Millan <rmh@aybabtu.com>
1031
1032 * include/grub/util/biosdisk.h: Move to ...
1033 * include/grub/util/hostdisk.h: ... here. Update all users.
1034 * util/biosdisk.c: Move to ...
1035 * util/hostdisk.c: ... here. Update all users.
1036
783d0f48 10372008-09-07 Robert Millan <rmh@aybabtu.com>
1038
1039 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1040 variables.
1041 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1042 and length can be stored directly in the `mbi->mmap_addr' and
1043 `mbi->mmap_length' struct fields.
1044
548e2ea5 10452008-09-07 Robert Millan <rmh@aybabtu.com>
1046
1047 * conf/i386.rmk: New file. Provides declaration for building
1048 `cpuid.mod'.
1049 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1050 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1051 variables.
1052 Include `conf/i386.mk'.
1053 * conf/i386-efi.rmk: Likewise.
1054 * conf/x86_64-efi.rmk: Likewise.
1055 * conf/i386-coreboot.rmk: Likewise.
1056 * conf/i386-ieee1275.rmk: Likewise.
1057
0ea85a37 10582008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1059
1060 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1061 Adds optimization support for BGR based modes.
1062
1063 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1064 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1065 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1066 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1067 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1068 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1069 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1070 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1071 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1072 (grub_video_i386_vbeblit_index_index): Likewise.
1073 (grub_video_i386_vbeblit_replace_directN): Added.
1074 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1075 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1076 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1077 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1078 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1079 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 1080 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 1081 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1082 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1083 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1084 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1085 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1086 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1087
1088 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1089 (grub_video_i386_vbefill_R8G8B8): Likewise.
1090 (grub_video_i386_vbefill_index): Likewise.
1091 (grub_video_i386_vbefill_direct32): Added.
1092 (grub_video_i386_vbefill_direct24): Likewise.
1093 (grub_video_i386_vbefill_direct16): Likewise.
1094 (grub_video_i386_vbefill_direct8): Likewise.
1095
81a06771 1096 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 1097 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1098 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1099 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1100 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1101 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 1102
0ea85a37 1103 * video/video.c (grub_video_get_blit_format): Updated to use new
1104 blit formats. Added handling for 16 bit color modes.
81a06771 1105
1106 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 1107 fillers.
1108 (common_blitter): Updated to use new blitters.
1109
1110 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1111 Removed.
1112 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1113 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1114 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1115 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1116 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1117 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1118 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1119 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1120 (grub_video_i386_vbeblit_index_index): Likewise.
1121 (grub_video_i386_vbeblit_replace_directN): Added.
1122 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1123 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1124 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1125 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1126 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1127 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1128 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1129 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1130 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1131 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1132 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1133 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1134 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 1135
0ea85a37 1136 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1137 (grub_video_i386_vbefill_R8G8B8): Likewise.
1138 (grub_video_i386_vbefill_index): Likewise.
1139 (grub_video_i386_vbefill_direct32): Added.
1140 (grub_video_i386_vbefill_direct24): Likewise.
1141 (grub_video_i386_vbefill_direct16): Likewise.
1142 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 1143
0ea85a37 1144 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1145 types.
81a06771 1146
0ea85a37 1147 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1148 types.
81a06771 1149
0ea85a37 1150 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1151 blitter types.
81a06771 1152
0ea85a37 1153 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1154 types.
1155
e8a83df6 11562008-09-06 Felix Zielcke <fzielcke@z-51.de>
1157
1158 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1159 RAID level 1.
1160
6bcd8ee5 11612008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 1162
6bcd8ee5 1163 * fs/iso9660.c (grub_iso9660_date): New structure.
1164 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1165 (grub_iso9660_uuid): New function.
c375ae58 1166
59261157 11672008-09-05 Bean <bean123ch@gmail.com>
1168
1169 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1170
1171 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1172 insensitive bit for names in Win32 and Win32 & DOS namespace.
1173
1174 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1175
1176 * include/grub/types.h (LONG_MAX): Likewise.
1177
58b6645a 11782008-09-04 Felix Zielcke <fzielcke@z-51.de>
1179
4ee55921 1180 * util/getroot.c: Include <config.h>.
1181 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1182 add support for /dev/md/N devices and handle LVM double dash escaping.
1183
11842008-09-04 Felix Zielcke <fzielcke@z-51.de>
1185
1186 * config.guess: Update to latest version from config git.
1187 * config.sub: Likewise.
58b6645a 1188
9124f65d 11892008-09-03 Robert Millan <rmh@aybabtu.com>
1190
1191 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1192 `disk->total_sectors'.
1193
81a06771 11942008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 1195
1196 * include/grub/normal.h: Fixed incorrect comment for
1197 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1198
81a06771 11992008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 1200
1201 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1202 values with defines.
1203
1204 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1205 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1206 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1207 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1208 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1209 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1210 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1211 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1212 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1213 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1214 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1215 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1216 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1217 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1218 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1219 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1220 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1221 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1222 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1223
93d5cbf8 12242008-08-31 Robert Millan <rmh@aybabtu.com>
1225
1226 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1227 declaration.
1228 (grub_multiboot): Fix a few warnings.
1229
21751d50 12302008-08-31 Robert Millan <rmh@aybabtu.com>
1231
1232 * loader/i386/pc/multiboot.c: Update comment not to say that
1233 boot_device support is unimplemented.
1234
e27a75c5 12352008-08-31 Robert Millan <rmh@aybabtu.com>
1236
1237 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1238 or memory map support are unimplemented.
1239
81a06771 12402008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 1241
1242 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1243
81a06771 12442008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 1245
1246 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1247 total video memory in 'vbeinfo' output; show color format details for
1248 each video mode.
1249
7c5d8d95 12502008-08-30 Pavel Roskin <proski@gnu.org>
1251
1252 * util/genmoddep.c: Remove for real this time.
1253 * DISTLIST: Remove util/genmoddep.c.
1254
4cebd25a 12552008-08-30 Robert Millan <rmh@aybabtu.com>
1256
1257 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1258 as required by Multiboot spec (it was already 4-byte aligned, but
1259 only by chance).
1260
b497a269 12612008-08-29 Pavel Roskin <proski@gnu.org>
1262
e3925185 1263 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1264 * kern/powerpc/ieee1275/startup.S: ... this.
1265 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1266 * DISTLIST: Likewise.
1267
b497a269 1268 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1269 grub/cpu/kernel.h. Add start label for consistency with other
1270 platforms. Add grub_prefix immediately after start. Add jump
1271 to the code after grub_prefix.
1272 * include/grub/powerpc/kernel.h: Provide valid values for
1273 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1274
6e5a42fe 12752008-08-29 Bean <bean123ch@gmail.com>
1276
1277 * configure.ac: Change host_os to cygwin for mingw.
1278 (asprintf): New check for function.
1279
1280 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1281 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1282
1283 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 1284 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 1285 sync, sleep and grub_util_get_disk_size for mingw.
1286
1287 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1288 to get size in mingw.
1289 (open_device): Use flag O_BINARY if it's defined.
1290 (find_root_device): Add dummy code for mingw.
1291
1292 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1293 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1294 (get_scsi_disk_name): Return 0 for mingw.
1295
1296 * util/hostfs.c: #include <grub/util/misc.h>.
1297 (grub_hostfs_open): Use "rb" flag to open file, use
1298 grub_util_get_disk_size to get disk size for mingw.
1299
1300 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1301 (asprintf): New function if HAVE_ASPRINTF is not set.
1302 (sync): New function for mingw.
1303 (sleep): Likewise.
1304 (grub_util_get_disk_size): Likewise.
1305
ab3f2673 13062008-08-28 Pavel Roskin <proski@gnu.org>
1307
1308 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1309 kern/time.c.
1310
1c282483 13112008-08-28 Robert Millan <rmh@aybabtu.com>
1312
1313 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1314
678e849c 13152008-08-28 Robert Millan <rmh@aybabtu.com>
1316
1317 Change find_grub_drive() syntax so it doesn't prevent it from
1318 detecting NULL names as errors.
1319
1320 * util/biosdisk.c (find_grub_drive): Move free slot search code
1321 from here ...
1322 (find_free_slot): ... to here.
1323 (read_device_map): Use find_free_slot() to search for free slots.
1324
965c75ca 13252008-08-27 Marco Gerards <marco@gnu.org>
1326
1327 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1328 (scsi_mod_SOURCES): New variable.
1329 (scsi_mod_CFLAGS): Likewise
1330 (scsi_mod_LDFLAGS): Likewise.
1331
1332 * disk/scsi.c: New file.
1333
1334 * include/grub/scsi.h: Likewise.
1335
1336 * include/grub/scsicmd.h: Likewise.
1337
1338 * disk/ata.c: Include <grub/scsi.h>.
1339 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1340 instead.
1341 (grub_ata_iterate): Skip ATAPI devices.
1342 (grub_ata_open): Only handle ATAPI devices.
1343 (struct grub_atapi_read): Removed.
1344 (grub_atapi_readsector): Likewise.
1345 (grub_ata_read): No longer handle ATAPI devices.
1346 (grub_ata_write): Likewise.
1347 (grub_atapi_iterate): New function.
1348 (grub_atapi_read): Likewise.
1349 (grub_atapi_write): Likewise.
1350 (grub_atapi_open): Likewise.
1351 (grub_atapi_close): Likewise.
1352 (grub_atapi_dev): New variable.
1353 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1354 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1355
1356 * include/grub/disk.h (enum grub_disk_dev_id): Add
1357 `GRUB_DISK_DEVICE_SCSI_ID'.
1358
c07ae501 13592008-08-26 Robert Millan <rmh@aybabtu.com>
1360
1361 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1362 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1363 descriptive.
1364
5ed20adc 13652008-08-23 Bean <bean123ch@gmail.com>
1366
1367 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1368 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1369 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1370 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1371 dm_nv.mod.
1372 (raid5rec_mod_SOURCES): New macro.
1373 (raid5rec_mod_CFLAGS): Likewise.
1374 (raid5rec_mod_LDFLAGS): Likewise.
1375 (raid6rec_mod_SOURCES): Likewise.
1376 (raid6rec_mod_CFLAGS): Likewise.
1377 (raid6rec_mod_LDFLAGS): Likewise.
1378 (mdraid_mod_SOURCES): Likewise.
1379 (mdraid_mod_CFLAGS): Likewise.
1380 (mdraid_mod_LDFLAGS): Likewise.
1381 (dm_nv_mod_SOURCES): Likewise.
1382 (dm_nv_mod_CFLAGS): Likewise.
1383 (dm_nv_mod_LDFLAGS): Likewise.
1384
1385 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1386 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1387 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1388
1389 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1390 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1391
1392 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1393
1394 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1395
1396 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1397
1398 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1399
1400 * disk/raid5_recover.c: New file.
1401
1402 * disk/raid6_recover.c: Likewise.
1403
1404 * disk/mdraid_linux.c: Likewise.
1405
1406 * disk/dmraid_nvidia.c: Likewise.
1407
1408 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1409 ULONG_MAX.
1410
1411 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1412 calculate the size of raid device.
1413 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1414 different layout of raid5.
1415 (grub_raid_scan_device): Remove code specific to mdraid.
1416 (grub_raid_list): New variable.
1417 (free_array): New function.
1418 (grub_raid_register): Likewise.
1419 (grub_raid_unregister): Likewise.
1420 (grub_raid_rescan): Likewise.
1421 (GRUB_MOD_INIT): Don't iterate device here.
1422 (GRUB_MOD_FINI): Use free_array to release resource.
1423
1424 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1425 (grub_raid5_recover_func_t): New function variable type.
1426 (grub_raid6_recover_func_t): Likewise.
1427 (grub_raid5_recover_func): New variable.
1428 (grub_raid6_recover_func): Likewise.
1429 (grub_raid_register): New function.
1430 (grub_raid_unregister): Likewise.
1431 (grub_raid_rescan): Likewise.
1432 (grub_raid_block_xor): Likewise.
1433
1434 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1435 (CMD_CRC): New macro.
1436 (part): Removed.
1437 (read_file): Handle device as well as file.
1438 (cmd_crc): New function.
1439 (fstest): Handle multiple disks.
1440 (options): Remove part, raw and long, add root and diskcount.
1441 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 1442 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 1443 add handling for the new options, support multiple disks.
1444
1445 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1446
29c18915 14472008-08-23 Bean <bean123ch@gmail.com>
1448
1449 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1450
1451 * genfslist.sh: Ignore kernel.mod.
1452
1453 * genpartmaplist.sh: Likewise.
1454
8415f261 14552008-08-23 Robert Millan <rmh@aybabtu.com>
1456
1457 * util/getroot.c (find_root_device): Skip anything that starts with
1458 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1459
d5a7dc5b 14602008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 1461
d5a7dc5b 1462 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1463 * util/grub.d/00_header.in: Allow the administrator to change default
1464 gfxmode via ${GRUB_GFXMODE}.
1465
380cfbb4 14662008-08-21 Felix Zielcke <fzielcke@z-51.de>
1467
1468 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1469
c9baafe7 14702008-08-21 Robert Millan <rmh@aybabtu.com>
1471
1472 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1473 loader.
1474 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1475 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1476
e290bef2 14772008-08-20 Carles Pina i Estany <carles@pina.cat>
1478
1479 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1480 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1481
f9dbfc96 14822008-08-19 Robert Millan <rmh@aybabtu.com>
1483
1484 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1485 (struct grub_virtual_screen): Remove `cursor_color'.
1486 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1487 initialization.
1488 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1489
dd6bd6ab 14902008-08-18 Robert Millan <rmh@aybabtu.com>
1491
1492 Unify (identical) linux_normal.c files.
1493 * loader/i386/efi/linux_normal.c: Move from here ...
1494 * loader/linux_normal.c: ... to here. Update all users.
1495 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1496 * loader/i386/ieee1275/linux_normal.c: Likewise.
1497
7f42f83e 14982008-08-18 Robert Millan <rmh@aybabtu.com>
1499
1500 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1501 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1502 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1503 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1504 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1505 New macros.
1506 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1507 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1508 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1509 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1510 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1511 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1512 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1513 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1514 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1515 portably using grub_getxy().
1516 Replace `-EFI' with `-bzImage' in boot message.
1517
38487ddb 15182008-08-17 Robert Millan <rmh@aybabtu.com>
1519
1520 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1521
deceb3ec 15222008-08-17 Robert Millan <rmh@aybabtu.com>
1523
1524 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1525
1526 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1527 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1528 (grub_machine_mmap_iterate): New function declaration.
1529 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1530 structure.
1531 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1532 macros.
1533
1534 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1535 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1536 Move e820 parsing from here ...
1537 * kern/i386/pc/mmap.c: New file.
1538 (grub_machine_mmap_iterate): ... to here.
1539
1540 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1541 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1542 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1543 (grub_available_iterate): Redeclare to return `void', and redeclare
1544 its hook to use grub_uint64_t as addr and size parameters, and rename
1545 to ...
1546 (grub_machine_mmap_iterate): ... this. Update all users.
1547
1548 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1549 to make it more readable. Rename to ...
1550 (grub_machine_mmap_iterate): ... this.
1551
1552 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1553 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1554 (grub_multiboot): Allocate an extra region after the payload, and fill
1555 it with a Multiboot memory map. Adjust a.out loader to calculate size
1556 with the extra space.
1557 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1558 with the extra space.
1559
f8aa0f43 15602008-08-17 Carles Pina i Estany <carles@pina.cat>
1561
9807deb9 1562 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 1563
605f5bb6 15642008-08-17 Felix Zielcke <fzielcke@z-51.de>
1565
1566 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1567 mdate-sh to the list `find' searches for.
1568 * DISTLIST: Regenerated.
1569
210db6c6 15702008-08-16 Felix Zielcke <fzielcke@z-51.de>
1571
1572 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1573 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 1574 genmoddep.awk, gensymlist.sh.in.
1575 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 1576 * DISTLIST: Regenerated.
48cdbfd4 1577 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 1578
1082b929 15792008-08-16 Robert Millan <rmh@aybabtu.com>
1580
1581 * disk/raid.c (grub_raid_init): Handle/report errors set by
1582 grub_device_iterate().
1583 * disk/lvm.c (grub_lvm_init): Likewise.
1584
42ce5170 15852008-08-15 Bean <bean123ch@gmail.com>
1586
1587 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1588 and datehook.mod.
1589 (datetime_mod_SOURCES): New macro.
1590 (datetime_mod_CFLAGS): Likewise.
1591 (datetime_mod_LDFLAGS): Likewise.
1592 (date_mod_SOURCES): Likewise.
1593 (date_mod_CFLAGS): Likewise.
1594 (date_mod_LDFLAGS): Likewise.
1595 (datehook_mod_SOURCES): Likewise.
1596 (datehook_mod_CFLAGS): Likewise.
1597 (datehook_mod_LDFLAGS): Likewise.
1598
1599 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1600 and datehook.mod.
1601 (datetime_mod_SOURCES): New macro.
1602 (datetime_mod_CFLAGS): Likewise.
1603 (datetime_mod_LDFLAGS): Likewise.
1604 (date_mod_SOURCES): Likewise.
1605 (date_mod_CFLAGS): Likewise.
1606 (date_mod_LDFLAGS): Likewise.
1607 (datehook_mod_SOURCES): Likewise.
1608 (datehook_mod_CFLAGS): Likewise.
1609 (datehook_mod_LDFLAGS): Likewise.
1610
1611 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1612 and datehook.mod.
1613 (datetime_mod_SOURCES): New macro.
1614 (datetime_mod_CFLAGS): Likewise.
1615 (datetime_mod_LDFLAGS): Likewise.
1616 (date_mod_SOURCES): Likewise.
1617 (date_mod_CFLAGS): Likewise.
1618 (date_mod_LDFLAGS): Likewise.
1619 (datehook_mod_SOURCES): Likewise.
1620 (datehook_mod_CFLAGS): Likewise.
1621 (datehook_mod_LDFLAGS): Likewise.
1622
1623 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1624 and datehook.mod.
1625 (datetime_mod_SOURCES): New macro.
1626 (datetime_mod_CFLAGS): Likewise.
1627 (datetime_mod_LDFLAGS): Likewise.
1628 (date_mod_SOURCES): Likewise.
1629 (date_mod_CFLAGS): Likewise.
1630 (date_mod_LDFLAGS): Likewise.
1631 (datehook_mod_SOURCES): Likewise.
1632 (datehook_mod_CFLAGS): Likewise.
1633 (datehook_mod_LDFLAGS): Likewise.
1634
1635 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1636 and datehook.mod.
1637 (datetime_mod_SOURCES): New macro.
1638 (datetime_mod_CFLAGS): Likewise.
1639 (datetime_mod_LDFLAGS): Likewise.
1640 (date_mod_SOURCES): Likewise.
1641 (date_mod_CFLAGS): Likewise.
1642 (date_mod_LDFLAGS): Likewise.
1643 (datehook_mod_SOURCES): Likewise.
1644 (datehook_mod_CFLAGS): Likewise.
1645 (datehook_mod_LDFLAGS): Likewise.
1646
1647 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1648
1649 * commands/date.c: New file.
1650
1651 * hook/datehook.c: Likewise.
1652
1653 * include/grub/lib/datetime.h: Likewise.
1654
1655 * include/grub/i386/cmos.h: Likewise.
1656
1657 * lib/datetime.c: Likewise.
1658
1659 * lib/i386/datetime.c: Likewise.
1660
1661 * lib/efi/datetime.c: Likewise.
1662
0e9242da 16632008-08-14 Robert Millan <rmh@aybabtu.com>
1664
1665 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1666 (grub_mkelfimage_SOURCES): New variable.
1667 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1668
1669 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1670 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1671 * conf/powerpc-ieee1275.rmk: Likewise.
1672 * conf/i386-ieee1275.rmk: Likewise.
1673
1674 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1675 * kern/i386/coreboot/init.c: Likewise.
1676
1677 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1678 with `<grub/cpu/kernel.h>'.
1679 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1680 to ...
1681 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1682 * kern/i386/coreboot/startup.S: Likewise.
1683
1684 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1685 (GRUB_MOD_GAP): Remove.
1686 * include/grub/powerpc/kernel.h: New file.
1687 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1688 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1689 * include/grub/i386/kernel.h: New file.
1690 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1691 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1692 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1693
1694 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1695 `grub-mkelfimage'.
1696 Use --directory when invoking grub_mkimage.
1697
1698 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1699 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1700 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1701 and GRUB_KERNEL_CPU_PREFIX.
1702
b86408f8 17032008-08-14 Felix Zielcke <fzielcke@z-51.de>
1704
d5e619ca 1705 * include/grub/err.h (grub_err_printf): New function prototype.
1706 * util/misc.c (grub_err_printf): New function.
1707 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1708 grub_printf.
1709 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 1710
7161f0e0 17112008-08-13 Robert Millan <rmh@aybabtu.com>
1712
1713 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1714
a1967522 17152008-08-13 Robert Millan <rmh@aybabtu.com>
1716
1717 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1718 boot entry.
1719
371458b5 17202008-08-12 Robert Millan <rmh@aybabtu.com>
1721
1722 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1723 of the relocation code from here ...
1724 (grub_multiboot): ... to here.
1725 (forward_relocator, backward_relocator): Move from here ...
1726 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1727 (grub_multiboot_backward_relocator): ... to here.
1728 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1729 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1730 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1731 (grub_multiboot_forward_relocator_end)
1732 (grub_multiboot_backward_relocator)
1733 (grub_multiboot_backward_relocator_end): New variables.
1734
05f9452b 17352008-08-12 Bean <bean123ch@gmail.com>
1736
1737 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1738
20024ab0 17392008-08-11 Robert Millan <rmh@aybabtu.com>
1740
1741 * kern/i386/linuxbios/startup.S: Move from here ...
1742 * kern/i386/coreboot/startup.S: ... to here.
1743
1744 * kern/i386/linuxbios/init.c: Move from here ...
1745 * kern/i386/coreboot/init.c: ... to here.
1746
1747 * kern/i386/linuxbios/table.c: Move from here ...
1748 * kern/i386/coreboot/mmap.c: ... to here.
1749
1750 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1751
e352e9cd 17522008-08-11 Robert Millan <rmh@aybabtu.com>
1753
1754 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1755 errors. Leave it to the upper layer to handle them.
1756
2d05bc6a 17572008-08-09 Christian Franke <franke@computer.org>
1758
1759 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1760 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1761 Install `grub.d/10_windows' only on Cygwin.
1762 * configure.ac: Add subst of `target_os'.
1763 Check `target_os' also before setting TARGET_OBJ2ELF.
1764 Add `--enable-grub-pe2elf'.
1765
042bd419 17662008-08-08 Robert Millan <rmh@aybabtu.com>
1767
1768 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1769 (grub_last_time): Change type to grub_uint64_t.
1770 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1771 (grub_disk_close): Likewise.
1772
1773 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1774 (run_menu): Migrate code from to using grub_get_time_ms().
1775
1776 * util/misc.c (grub_get_time_ms): New function.
1777
7f280db5 17782008-08-08 Marco Gerards <marco@gnu.org>
1779
1780 * disk/ata.c (grub_ata_regget): Change return type to
1781 `grub_uint8_t'.
1782 (grub_ata_regget2): Likewise.
1783 (grub_ata_wait_status): New function.
1784 (grub_ata_wait_busy): Removed function, updated all users to use
1785 `grub_ata_wait_status'.
1786 (grub_ata_wait_drq): Likewise.
1787 (grub_ata_cmd): New function.
1788 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1789 error handling.
1790 (grub_ata_pio_write): Add error handling.
1791 (grub_atapi_identify): Likewise.
1792 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1793 handling.
1794 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1795 handling. Actually use the detected registers. Reorder the
1796 detection logic such that it is easier to read.
1797 (grub_ata_pciinit): Do not assign the same ID to each controller.
1798 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1799 handling.
1800 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1801
1802 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1803
1fbc5e66 18042008-08-08 Marco Gerards <marco@gnu.org>
1805
1806 * NEWS: Update.
1807
819ce6c0 18082008-08-07 Bean <bean123ch@gmail.com>
1809
1810 * include/grub/x86_64/pci.h: New file.
1811
5c41d44d 18122008-08-07 Christian Franke <franke@computer.org>
1813
1814 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1815 (TIMER2_GATE): Likewise.
1816 (grub_pit_wait): Add enable/disable of the timer2 gate
1817 bit of port 0x61. This fixes a possible infinite loop.
1818
5ebc275d 18192008-08-07 Bean <bean123ch@gmail.com>
1820
1821 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1822 kern/i386/tsc.c and kern/i386/pit.c.
1823
1824 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1825 x86_64 platform.
1826
1827 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1828 <grub/i386/tsc.h>.
1829
1830 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1831
e383b3d0 18322008-08-07 Bean <bean123ch@gmail.com>
1833
1834 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1835
1836 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1837
1838 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1839 multiple inclusion. Add #include <grub/types.h>.
1840
1cbb58ac 18412008-08-06 Christian Franke <franke@computer.org>
1842
1843 * conf/common.rmk: Build and install `10_windows'.
1844 * util/grub.d/10_windows.in: New script.
1845
337f5a1e 18462008-08-06 Pavel Roskin <proski@gnu.org>
1847
1848 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1849
057bc4ac 18502008-08-06 Robert Millan <rmh@aybabtu.com>
1851
1852 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1853 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1854
2b99f123 18552008-08-06 Bean <bean123ch@gmail.com>
1856
1857 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1858 (grub_pxefs_fs_int): Remove dummy definition.
1859 (grub_pxefs_open): Use data->block_size to store the current block
1860 size setting.
1861 (grub_pxefs_read): Use block size stored in data->block_size. As the
1862 value of grub_pxe_blksize can be changed after the file is opened.
1863
9f0234cb 18642008-08-06 Bean <bean123ch@gmail.com>
1865
1866 * fs/i386/pc/pxe.c (curr_file): new variable.
1867 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1868 require the dummy internal file system anymore.
1869 (grub_pxefs_read): Removed.
1870 (grub_pxefs_close): Likewise.
1871 (grub_pxefs_fs_int): Likewise.
1872 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1873 connection when we switch file.
1874 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1875
a55d42e0 18762008-08-06 Robert Millan <rmh@aybabtu.com>
1877
1878 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1879 `halt.mod'.
1880 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1881 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1882
1883 * kern/i386/halt.c: New file.
1884 * kern/i386/reboot.c: Likewise.
1885 * include/grub/i386/reboot.h: Likewise.
1886 * include/grub/i386/halt.h: Likewise.
1887
1888 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1889 Include `<grub/cpu/halt.h>'.
1890 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1891 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1892
1893 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1894 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1895 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1896 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1897 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1898 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1899 from here ...
1900 * include/grub/i386/at_keyboard.h: ... to here.
1901
24371d26 19022008-08-05 Robert Millan <rmh@aybabtu.com>
1903
1904 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1905 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1906 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1907 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1908 `kern/generic/millisleep.c'.
1909
1910 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1911 instead of grub_get_rtc().
1912 (grub_tsc_init): Initialize `tsc_boot_time'.
1913
1914 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1915 (grub_machine_init): Use grub_tsc_init() rather than
1916 installing an RTC-based handler via grub_install_get_time_ms().
1917
1918 * kern/i386/pit.c: New file.
1919 * include/grub/i386/pit.h: Likewise.
1920
9e7007b3 19212008-08-05 Bean <bean123ch@gmail.com>
1922
1923 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1924
1925 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1926 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1927 (pxe_mod_SOURCES): New macro.
1928 (pxe_mod_CFLAGS): Likewise.
1929 (pxe_mod_LDFLAGS): Likewise.
1930 (pxecmd_mod_SOURCES): Likewise.
1931 (pxecmd_mod_CFLAGS): Likewise.
1932 (pxecmd_mod_LDFLAGS): Likewise.
1933
1934 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1935 (grub_pxe_call): Likewise.
1936
1937 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1938
1939 * commands/i386/pc/pxecmd.c: New file.
1940
9f0234cb 1941 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 1942
1943 * include/grub/i386/pc/pxe.h: Likewise.
1944
6977d49f 19452008-08-05 Bean <bean123ch@gmail.com>
1946
1947 * util/console.c (grub_console_cur_color): New variable.
1948 (grub_console_standard_color): Likewise.
1949 (grub_console_normal_color): Likewise.
1950 (grub_console_highlight_color): Likewise.
1951 (color_map): Likewise.
1952 (use_color): Likewise.
1953 (NUM_COLORS): New macro.
1954 (grub_ncurses_setcolorstate): Handle color properly.
1955 (grub_ncurses_setcolor): Don't change color here, just remember the
1956 settings, color will be set in grub_ncurses_setcolorstate.
1957 (grub_ncurses_getcolor): New function.
1958 (grub_ncurses_init): Initialize color pairs.
1959 (grub_ncurses_term): New member grub_ncurses_getcolor.
1960
9c2ff3ee 19612008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 1962
9c2ff3ee 1963 High resolution timer support. Implemented for x86 CPUs using TSC.
1964 Extracted generic grub_millisleep() so it's linked in only as needed.
1965 This requires a Pentium compatible CPU; if the RDTSC instruction is
1966 not supported, then it falls back on the generic grub_get_time_ms()
1967 implementation that uses the machine's RTC.
1968
1969 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1970 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1971 `kern/generic/millisleep.c'.
1972
1973 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1974 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1975
1976 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1977 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1978
1979 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1980
1981 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1982 `kern/generic/millisleep.c'.
1983
1984 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1985
1986 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1987
1988 * kern/generic/rtc_get_time_ms.c: New file.
1989
1990 * kern/generic/millisleep.c: New file.
337f5a1e 1991
9c2ff3ee 1992 * kern/misc.c: Don't include
1993 <kern/time.h> anymore.
1994 (grub_millisleep_generic): Removed.
1995
1996 * commands/sleep.c (grub_interruptible_millisleep): Uses
1997 grub_get_time_ms() instead of grub_get_rtc().
1998
1999 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2000 function.
2001 (grub_cpu_is_cpuid_supported): New inline function.
2002 (grub_cpu_is_tsc_supported): New inline function.
2003 (grub_tsc_init): New function prototype.
2004 (grub_tsc_get_time_ms): New function prototype.
2005
2006 * kern/i386/tsc.c (grub_get_time_ms): New file.
2007
2008 * include/grub/time.h: Include <grub/types.h.
2009 (grub_millisleep_generic): Removed.
2010 (grub_get_time_ms): New prototype.
2011 (grub_install_get_time_ms): New prototype.
2012 (grub_rtc_get_time_ms): New prototype.
2013
2014 * kern/time.c (grub_get_time_ms): New function.
2015 (grub_install_get_time_ms): New function.
2016
2017 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2018 <grub/time.h> anymore.
2019 (grub_millisleep): Removed.
2020 (grub_machine_init): Call grub_tsc_init.
2021
2022 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2023 get_time_ms() implementation.
2024
2025 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2026 (ieee1275_get_time_ms): New function.
2027 (grub_machine_init): Install get_time_ms() implementation.
2028
2029 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2030 (grub_machine_init): Call grub_tsc_init().
2031 (grub_millisleep): Removed.
bf06a93f 2032
9c2ff3ee 2033 * kern/ieee1275/init.c (grub_millisleep): Removed.
2034 (grub_machine_init): Install ieee1275_get_time_ms()
2035 implementation.
2036 (ieee1275_get_time_ms): New function.
2037 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2038 real work.
2039
9ec92aaf 20402008-08-05 Marco Gerards <marco@gnu.org>
2041
2042 * disk/ata.c: Include <grub/pci.h>.
2043 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2044 (grub_ata_initialize): Rewritten.
2045 (grub_ata_device_initialize): New function.
2046
8d23f507 20472008-08-04 Pavel Roskin <proski@gnu.org>
2048
2049 * kern/main.c: Include grub/mm.h.
2050
5e15ee3d 20512008-08-04 Robert Millan <rmh@aybabtu.com>
2052
2053 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2054 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2055 corruption problem).
2056
a9053f8f 20572008-08-04 Robert Millan <rmh@aybabtu.com>
2058
2059 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2060 warnings introduced in my last commit.
2061
dd19c7d7 20622008-08-03 Robert Millan <rmh@aybabtu.com>
2063
2064 Make PCI available on all i386 architectures.
2065
2066 * include/grub/i386/pc/pci.h: Move from here ...
2067 * include/grub/i386/pci.h: ... to here.
2068
2069 * include/grub/i386/pc/pci.h: Remove.
2070 * include/grub/i386/efi/pci.h: Remove.
2071 * include/grub/x86_64/efi/pci.h: Remove.
2072
2073 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2074 `<grub/cpu/pci.h>'.
2075
2076 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2077 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2078 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2079
2080 * conf/i386-ieee1275.rmk: Likewise.
2081
e14a6184 20822008-08-03 Robert Millan <rmh@aybabtu.com>
2083
2084 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2085 (grub_console_setcursor): Make it possible to set cursor off.
2086
52768e37 20872008-08-03 Robert Millan <rmh@aybabtu.com>
2088
2089 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2090 of modules instead of assuming which platform provides what.
2091 * util/update-grub.in: Likewise.
2092
2d52f57f 20932008-08-03 Robert Millan <rmh@aybabtu.com>
2094
2095 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2096 instead of `grub_install_dos_part' to determine whether a drive needs
2097 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 2098 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 2099
2a5cd121 21002008-08-02 Robert Millan <rmh@aybabtu.com>
2101
2102 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2103
93808428 21042008-08-02 Robert Millan <rmh@aybabtu.com>
2105
2106 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2107 of informational grub_dprintf() calls.
2108
3bd0a12a 21092008-08-02 Robert Millan <rmh@aybabtu.com>
2110
2111 * disk/memdisk.c (memdisk_size): Don't initialize.
2112 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2113
2114 * include/grub/i386/pc/kernel.h
2115 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2116 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2117 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2118 (grub_arch_memdisk_size): Remove.
2119
2120 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2121 field (was only used to transfer a constant). Add `type' field to
2122 support multiple module types.
2123 (grub_module_iterate): New function.
2124
2125 * kern/device.c (grub_device_open): Do not hide error messages
2126 when grub_disk_open() fails. Use grub_print_error() instead.
2127
2128 * kern/i386/pc/init.c (grub_arch_modules_addr)
2129 (grub_arch_memdisk_size): Remove functions.
2130 (grub_arch_modules_addr): Return the module address in high memory
2131 (now that it isn't copied anymore).
2132
2133 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2134 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2135 decompression routine (grub_total_module_size already includes that
2136 now). Don't copy modules back to low memory.
2137
2138 * kern/main.c: Include `<grub/mm.h>'.
2139 (grub_load_modules): Split out (and use) ...
2140 (grub_module_iterate): ... this function, which iterates through
2141 module objects and runs a hook.
2142 Comment out grub_mm_init_region() call, as it would cause non-ELF
2143 modules to be overwritten.
2144
2145 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2146 the memdisk image in its own region, make it part of the module list.
2147 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2148 (main): Parse --memdisk|-m option, and pass user-provided path as
2149 parameter to generate_image().
2150 (add_segments): Pass `memdisk_path' down to load_modules().
2151 (load_modules): Embed memdisk image in module section when requested.
2152 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2153 `header.type' instead of `header.offset'.
2154
2155 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2156 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2157 (memdisk_mod_LDFLAGS): New variables.
2158 * conf/i386-coreboot.rmk: Likewise.
2159 * conf/i386-ieee1275.rmk: Likewise.
2160
a927cc73 21612008-08-02 Robert Millan <rmh@aybabtu.com>
2162
2163 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2164 (backward_relocator): New variables. Used to allocate and relocate
2165 the payload, respectively.
2166 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 2167 address, install the appropriate relocator code in each bound of
a927cc73 2168 the payload, and set the entry point such that
2169 grub_multiboot_real_boot() will jump to one of them.
2170
2171 * kern/i386/loader.S (grub_multiboot_payload_size)
2172 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2173 (grub_multiboot_payload_entry_offset): New variables.
2174 (grub_multiboot_real_boot): Set cpu context to what the relocator
2175 expects, and jump to the relocator instead of the payload.
2176
2177 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2178 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2179 (grub_multiboot_payload_entry_offset): Export.
2180
b15d8a0c 21812008-08-01 Bean <bean123ch@gmail.com>
2182
2183 * normal/menu_entry.c (editor_getline): Don't return the original
2184 string as result, as it will be released by lexer once it has done
2185 using it.
2186
cdfb3d22 21872008-08-01 Robert Millan <rmh@aybabtu.com>
2188
2189 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2190 within menuentries, not before them.
2191 util/grub.d/10_hurd.in: Likewise.
2192
9175e93d 21932008-08-01 Bean <bean123ch@gmail.com>
2194
2195 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2196 (bufio_mod_SOURCES): New macro.
2197 (bufio_mod_CFLAGS): Likewise.
2198 (bufio_mod_LDFLAGS): Likewise.
2199
2200 * include/grub/bufio.h: New file.
2201
2202 * io/bufio.c: Likewise.
2203
2204 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2205 (grub_video_reader_png): Use grub_buffile_open to open file.
2206
2207 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2208 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2209
2210 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2211 (grub_video_reader_tga): Use grub_buffile_open to open file.
2212
2213 * font/manager.c: Include <grub/bufio.h>.
2214 (add_font): Use grub_buffile_open to open file.
2215
3d8383e7 22162008-07-31 Robert Millan <rmh@aybabtu.com>
2217
2218 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2219 ELF segments, use a macro for arbitrarily accessing any of them instead
2220 of preparing a pointer that allows access to one at a time.
2221 (grub_multiboot_load_elf64): Likewise.
2222
16e641b6 22232008-07-31 Bean <bean123ch@gmail.com>
2224
2225 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2226 GRUB_KERNEL_MACHINE_DATA_END.
2227
59198b72 22282008-07-30 Robert Millan <rmh@aybabtu.com>
2229
2230 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2231 Increase from 0x50 to 0x60.
2232 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2233 use UUIDs to identify the root drive for them. If that's not
2234 possible, abort.
2235 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2236 check, for cross-disk installs.
2237
ae88bca3 22382008-07-30 Robert Millan <rmh@aybabtu.com>
2239
2240 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2241 is non-empty, use it to set the `prefix' environment variable instead
2242 of the usual approach.
2243 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2244 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2245 environment variable instead of dummy make_install_device().
2246
2247 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2248 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 2249 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 2250
2251 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2252 New variable reference.
2253 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2254 New macro. Defines offset of `grub_prefix' within startup.S (relative
2255 to `start').
2256 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2257 section within startup.S (relative to `start').
2258 * include/grub/i386/coreboot/kernel.h: Likewise.
2259
2260 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2261 Overwrite grub_prefix with its contents, at the beginning of the
2262 first segment.
2263 (main): Understand -p|--prefix.
2264
14f41dd1 22652008-07-30 Robert Millan <rmh@aybabtu.com>
2266
2267 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2268
4ca049a3 22692008-07-30 Robert Millan <rmh@aybabtu.com>
2270
2271 * term/i386/pc/vga_text.c (grub_console_cls): Use
2272 grub_console_gotoxy() to go back to beginning of the screen.
2273 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2274
2921d337 22752008-07-29 Christian Franke <franke@computer.org>
2276
2277 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2278 Add conversion of emulated mount points on Cygwin.
2279
b609876d 22802008-07-29 Christian Franke <franke@computer.org>
2281
2282 * util/update-grub.in: Add a check for admin
2283 group on Cygwin.
2284 Remove old `grub.cfg.new' before creation.
2285 Add `-f' to `mv' to handle the different filesystem
2286 semantics of Windows.
2287
e93e4679 22882008-07-29 Bean <bean123ch@gmail.com>
2289
2290 * normal/main.c (get_line): Fix buffer overflow bug.
2291
41694fd0 22922008-07-28 Robert Millan <rmh@aybabtu.com>
2293
2294 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2295 (struct grub_apple_header): New struct. Describes the layout of
2296 the partmap header.
2297 (apple_partition_map_iterate): Check the header magic as well as the
2298 partition magic (which was already being checked).
2299
cfd0b4e6 23002008-07-28 Pavel Roskin <proski@gnu.org>
2301
2302 * genmk.rb: Add a warning to the beginning of the output that
2303 it's a generated file and should not be edited.
2304
93cce016 23052008-07-28 Robert Millan <rmh@aybabtu.com>
2306
2307 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2308 with the same number are found, just use issue a warning with
2309 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 2310
cd1df915 23112008-07-27 Robert Millan <rmh@aybabtu.com>
2312
2313 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2314 information.
2315
b70a8427 23162008-07-27 Bean <bean123ch@gmail.com>
2317
2318 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2319 (grub_fat_find_dir): Ignore case when comparing filename.
2320
8f5e379f 23212008-07-27 Bean <bean123ch@gmail.com>
2322
2323 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2324 smallino, as it's more descriptive, and i8count can be confused with
2325 the other field count.
2326 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2327 inode type.
2328
a85cd5a0 23292008-07-27 Bean <bean123ch@gmail.com>
2330
2331 * commands/crc.c: New file.
2332
2333 * lib/crc.c: Likewise.
2334
2335 * include/grub/lib/crc.h: Likewise.
2336
2337 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2338
2339 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2340 (hexdump): Move this function to ...
2341
2342 * lib/hexdump.c: ... here.
2343
2344 * include/grub/hexdump.h: Renamed to ...
2345
2346 * include/grub/lib/hexdump.h: ... this.
2347
2348 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2349
2350 * util/grub-editenv.c: Likewise.
2351
2352 * include/envblk.h: Renamed to ...
2353
2354 * include/lib/envblk.h: ... this.
2355
2356 * util/envblk.c: Renamed to ...
2357
2358 * lib/envblk.c: ... this.
2359
2360 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2361 lib/hexdump.c.
2362 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2363 (pkglib_MODULES): Add crc.mod.
2364 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2365 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2366 (crc_mod_SOURCES): New macro.
2367 (crc_mod_CFLAGS): Likewise.
2368 (crc_mod_LDFLAGS): Likewise.
2369
2370 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2371
2372 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2373
2374 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2375
2376 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2377
2378 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2379
c298def0 23802008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 2381
2382 * commands/help.c: Include <grub/term.h>.
2383 (TERM_WIDTH): Removed. Updated all users.
2384
cc349fb3 23852008-07-27 Pavel Roskin <proski@gnu.org>
2386
2387 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2388 spurious warnings about a comment within a comment.
2389
9051607e 23902008-07-25 Robert Millan <rmh@aybabtu.com>
2391
2392 * util/getroot.c (find_root_device): Skip devices that match
2393 /dev/dm-[0-9]. This lets the real device be found for any type of
2394 abstraction (LVM, EVMS, RAID..).
2395 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2396 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2397 device is found first, find_root_device() will now skip it.
2398
01453bfc 23992008-07-24 Pavel Roskin <proski@gnu.org>
2400
2401 * include/grub/types.h: Use __builtin_bswap32() and
2402 __builtin_bswap64() with gcc 4.3 and newer.
2403
6af9849f 24042008-07-24 Christian Franke <franke@computer.org>
2405
3a0fa256 2406 * util/i386/pc/grub-install.in: If `--debug' is specified,
2407 pass `--verbose' to grub-setup.
2408 Abort script if make_system_path_relative_to_its_root() fails.
2409
7810e747 24102008-07-24 Bean <bean123ch@gmail.com>
2411
2412 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2413 variable `target_platform' should be `platform'.
2414
42290e17 24152008-07-24 Bean <bean123ch@gmail.com>
2416
51cc5193 2417 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 2418 (grub_png_init_fixed_block): New function.
2419 (grub_png_decode_image_data): Handle fixed huffman code compression.
2420
2a8a80e4 24212008-07-24 Bean <bean123ch@gmail.com>
2422
2423 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2424 (grub_pe2elf_SOURCES): New macro.
2425 (CLEANFILES): Add grub-pe2elf.
2426
2427 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2428 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2429 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2430 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2431 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
2432 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
2433 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
2434 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2435 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2436 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2437 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2438 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2439 (GRUB_PE32_DT_FUNCTION): Likewise.
2440 (GRUB_PE32_REL_I386_DIR32): Likewise.
2441 (GRUB_PE32_REL_I386_REL32): Likewise.
2442 (grub_pe32_symbol): New structure.
2443 (grub_pe32_reloc): Likewise.
2444
2445 * util/grub-pe2elf.c: New file.
2446
2447 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2448 start symbol in non pc platform.
2449
2450 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2451
2452 The following patches are from Christian Franke.
2453
2454 * include/grub/dl.h: Remove .previous, gas supports this only
2455 for ELF format.
2456
2457 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2458 Remove .type, gas supports this only for ELF format.
2459
2460 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2461 nullbytes in symbol table. This fixes an infinite loop if table is
2462 zero filled.
2463
2464 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2465 TARGET_IMG_LDFLAGS and EXEEXT.
2466
2467 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2468 TARGET_IMG_LDFLAGS_AC.
2469 (grub_CHECK_STACK_ARG_PROBE): New function.
2470
2471 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2472
2473 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2474
2475 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2476 to set TARGET_IMG_LD* accordingly.
2477 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2478 Add call to grub_CHECK_STACK_ARG_PROBE.
2479 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2480
2481 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2482
2483 * genmk.rb: Add EXEEXT to CLEANFILES.
2484
12ccdb75 24852008-07-23 Robert Millan <rmh@aybabtu.com>
2486
2487 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2488 define the codes for arrows and lines used for the menu).
2489 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2490 as well.
2491
2492 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2493 fonts, because the latter are too slow.
2494
18eeaf04 24952008-07-21 Bean <bean123ch@gmail.com>
2496
2497 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2498 a20. Run keyboard test last, as it will cause macbook to halt.
2499
b095e2ad 25002008-07-18 Pavel Roskin <proski@gnu.org>
2501
2502 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2503 load foreign architecture modules correctly anyway. Keep
2504 support for loading host architecture modules, whether we
2505 compile them or not.
2506
737feb35 25072008-07-17 Pavel Roskin <proski@gnu.org>
2508
3f4ce737 2509 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2510 change target_cpu. The compiler default can mismatch target_cpu
2511 in any case.
2512
4ad2d049 2513 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2514 * kern/efi/efi.c: Likewise.
2515
f6130a12 2516 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2517 target compiler is functional.
2518 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2519 are set up.
2520
58393a2d 2521 * configure.ac: Default to efi platform for x86_64-apple. Allow
2522 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2523 adjustments from the rest, only do them if target is not
2524 explicitly given. Merge other adjustments with the final sanity
2525 check. Remove an extraneous check for supported CPU. Be
2526 specific which CPU and which platform is not supported.
2527
737feb35 2528 * configure.ac: Default to pc platform for x86_64.
2529
546f966a 25302008-07-17 Robert Millan <rmh@aybabtu.com>
2531
2532 Partial LinuxBIOS -> Coreboot rename.
2533
2534 * conf/i386-linuxbios.rmk: Renamed to ...
2535 * conf/i386-coreboot.rmk: ... this.
2536 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2537 * configure.ac: Accept "coreboot" as input platform (but maintain
2538 compatibility with "linuxbios").
2539 * include/grub/i386/linuxbios: Renamed to ...
2540 * include/grub/i386/coreboot: ... this.
2541
20011694 25422008-07-17 Bean <bean123ch@gmail.com>
2543
2544 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 2545 (appleldr_mod_SOURCE): New variable.
20011694 2546 (appleldr_mod_CFLAGS): Likewise.
2547 (appleldr_mod_LDFLAGS): Likewise.
2548 (pci_mod_SOURCES): Likewise.
2549 (pci_mod_CFLAGS): Likewise.
2550 (pci_mod_LDFLAGS): Likewise.
2551 (lspci_mod_SOURCES): Likewise.
2552 (lspci_mod_CFLAGS): Likewise.
2553 (lspci_mod_LDFLAGS): Likewise.
2554
2555 * conf/x86_64-efi.rmk: New file.
2556
2557 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2558 macro.
2559 (grub_efidisk_write): Likewise.
2560
2561 * include/efi/api.h (efi_call_0): New macro.
2562 (efi_call_1): Likewise.
2563 (efi_call_2): Likewise.
2564 (efi_call_3): Likewise.
2565 (efi_call_4): Likewise.
2566 (efi_call_5): Likewise.
2567 (efi_call_6): Likewise.
2568
2569 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2570 grub_rescue_cmd_chainloader.
2571
2572 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2573 (grub_pe32_optional_header): Change some fields based on i386 or
2574 x86_64 platform.
2575 (GRUB_PE32_PE32_MAGIC): Likewise.
2576
2577 * include/grub/efi/uga_draw.h: New file.
2578
2579 * include/grub/elf.h (STN_ABS): New constant.
2580 (R_X86_64_NONE): Relocation constant for x86_64.
2581 (R_X86_64_64): Likewise.
2582 (R_X86_64_PC32): Likewise.
2583 (R_X86_64_GOT32): Likewise.
2584 (R_X86_64_PLT32): Likewise.
2585 (R_X86_64_COPY): Likewise.
2586 (R_X86_64_GLOB_DAT): Likewise.
2587 (R_X86_64_JUMP_SLOT): Likewise.
2588 (R_X86_64_RELATIVE): Likewise.
2589 (R_X86_64_GOTPCREL): Likewise.
2590 (R_X86_64_32): Likewise.
2591 (R_X86_64_32S): Likewise.
2592 (R_X86_64_16): Likewise.
2593 (R_X86_64_PC16): Likewise.
2594 (R_X86_64_8): Likewise.
2595 (R_X86_64_PC8): Likewise.
2596
2597 * include/grub/i386/efi/pci.h: New file.
2598
2599 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2600 Change it value based on platform.
2601 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2602 (GRUB_E820_RAM): Likewise.
2603 (GRUB_E820_RESERVED): Likewise.
2604 (GRUB_E820_ACPI): Likewise.
2605 (GRUB_E820_NVS): Likewise.
2606 (GRUB_E820_EXEC_CODE): Likewise.
2607 (GRUB_E820_MAX_ENTRY): Likewise.
2608 (grub_e820_mmap): New structure.
2609 (linux_kernel_header): Change the efi field according to different
2610 kernel version, also field from linux_kernel_header.
2611
2612 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2613
2614 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2615 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2616 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2617 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2618 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2619 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2620 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2621 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2622 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2623 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2624
2625 * include/grub/x86_64/efi/kernel.h: New file.
2626
2627 * include/grub/x86_64/efi/loader.h: Likewise.
2628
2629 * include/grub/x86_64/efi/machine.h: Likewise.
2630
2631 * include/grub/x86_64/efi/pci.h: Likewise.
2632
2633 * include/grub/x86_64/efi/time.h: Likewise.
2634
2635 * include/grub/x86_64/linux.h: Likewise.
2636
2637 * include/grub/x86_64/setjmp.h: Likewise.
2638
2639 * include/grub/x86_64/time.h: Likewise.
2640
2641 * include/grub/x86_64/types.h: Likewise.
2642
2643 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2644 GRUB_TARGET_SIZEOF_VOID_P.
2645
2646 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2647 (grub_efi_locate_handle): Likewise.
2648 (grub_efi_open_protocol): Likewise.
2649 (grub_efi_set_text_mode): Likewise.
2650 (grub_efi_stall): Likewise.
2651 (grub_exit): Likewise.
2652 (grub_reboot): Likewise.
2653 (grub_halt): Likewise.
2654 (grub_efi_exit_boot_services): Likewise.
2655 (grub_get_rtc): Likewise.
2656
2657 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2658 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2659 (grub_efi_allocate_pages): Wrap efi calls.
2660 (grub_efi_free_pages): Wrap efi calls.
2661 (grub_efi_get_memory_map): Wrap efi calls.
2662
2663 * kern/x86_64/dl.c: New file.
2664
2665 * kern/x86_64/efi/callwrap.S: Likewise.
2666
2667 * kern/x86_64/efi/startup.S: Likewise.
2668
2669 * loader/efi/appleloader.c: Likewise.
2670
2671 * loader/efi/chainloader.c (cmdline): New variable.
2672 (grub_chainloader_unload): Wrap efi calls.
2673 (grub_chainloader_boot): Likewise.
2674 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2675 command line.
2676
2677 * loader/efi/chainloader_normal.c (chainloader_command):
2678 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2679 command line.
2680
2681 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2682 method.
2683 (grub_e820_add_region): New function.
2684 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2685 booting.
2686 (grub_find_video_card): New function.
2687 (grub_linux_setup_video): New function.
2688 (grub_rescue_cmd_linux): Probe for video information.
2689
2690 * normal/x86_64/setjmp.S: New file.
2691
2692 * term/efi/console.c (map_char): New function.
2693 (grub_console_putchar): Map unicode char.
2694 (grub_console_checkkey): Wrap efi calls.
2695 (grub_console_getkey): Likewise.
2696 (grub_console_getwh): Likewise.
2697 (grub_console_gotoxy): Likewise.
2698 (grub_console_cls): Likewise.
2699 (grub_console_setcolorstate): Likewise.
2700 (grub_console_setcursor): Likewise.
2701
2702 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2703
59652a20 27042008-07-16 Pavel Roskin <proski@gnu.org>
2705
ef294055 2706 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2707 format strings.
2708
59652a20 2709 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2710 pointer, not an integer. This fixes a warning and prevents
2711 precision loss on 64-bit systems.
2712 (relocate_addresses): Remove unneeded cast.
2713
afc3b5d7 27142008-07-15 Pavel Roskin <proski@gnu.org>
2715
506b2b3e 2716 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2717
62ead89c 2718 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2719
c4cd51d7 2720 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2721 Fix comparison between signed and unsigned.
2722
0d3d8f28 2723 * include/grub/i386/ieee1275/console.h: Declare
2724 grub_console_init() and grub_console_fini().
2725
8804b286 2726 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2727 It's empty and unused.
2728
ee01cf35 2729 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2730 beginning to avoid warnings with some compilers.
2731
afc3b5d7 2732 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2733 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2734
e4e8eaa5 27352008-07-14 Pavel Roskin <proski@gnu.org>
2736
407aceb4 2737 * kern/env.c (grub_register_variable_hook): Don't copy empty
2738 string, it leaks memory. Pass "" to grub_env_set(), it should
2739 handle constant strings.
2740
e4e8eaa5 2741 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2742 * commands/cmp.c (grub_cmd_cmp): Likewise.
2743 * kern/dl.c (grub_dl_flush_cache): Likewise.
2744 (grub_dl_load_core): Likewise.
2745 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2746 (grub_elf64_load_phdrs): Likewise.
2747
d4e2dad3 27482008-07-13 Pavel Roskin <proski@gnu.org>
2749
2750 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2751 between signed and unsigned.
2752 (LzmaEnc_Finish): Fix warning about an unused parameter.
2753
aa24b516 27542008-07-13 Bean <bean123ch@gmail.com>
2755
2756 * Makefile.in (enable_lzo): New rule.
2757
2758 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2759
2760 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2761
2762 * boot/i386/pc/lnxboot.S: #include <config.h>.
2763
2764 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 2765 its value according to the compression algorithm used, lzo or lzma.
aa24b516 2766
2767 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2768 compression algorithm according to configure macro.
2769
2770 * kern/i386/pc/startup.S (codestart): Likewise.
2771
2772 * kern/i386/pc/lzma_decode.S: New file.
2773
2774 * include/grub/lib/LzFind.h: Likewise.
2775
2776 * include/grub/lib/LzHash.h: Likewise.
2777
2778 * include/grub/lib/LzmaDec.h: Likewise.
2779
2780 * include/grub/lib/LzmaEnc.h: Likewise.
2781
2782 * include/grub/lib/LzmaTypes.h: Likewise.
2783
2784 * lib/LzFind.c: Likewise.
2785
2786 * lib/LzmaDec.c: Likewise.
2787
2788 * lib/LzmaEnc.c: Likewise.
2789
4ae821ac 27902008-07-13 Bean <bean123ch@gmail.com>
2791
2792 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2793 (grub_ext4_extent_header): New structure.
2794 (grub_ext4_extent): Likewise.
2795 (grub_ext4_extent_idx): Likewise.
2796 (grub_ext4_find_leaf): New function.
2797 (grub_ext2_read_block): Handle extents.
2798
9a745147 27992008-07-12 Robert Millan <rmh@aybabtu.com>
2800
2801 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2802
d49a4cf6 28032008-07-11 Robert Millan <rmh@aybabtu.com>
2804
2805 * util/grub.d/40_custom.in: New file. Example on how to add custom
2806 entries to /etc/grub.d.
2807 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2808 40_custom (implicitly, by merging all the grub.d rules).
2809
947414b4 28102008-07-11 Pavel Roskin <proski@gnu.org>
2811
0059cf6f 2812 * commands/read.c (grub_getline): Fix invalid memory access.
2813 Don't add newline to the variable value.
2814
947414b4 2815 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2816 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2817 (serial_hw_get_port): Check validity of the port number.
2818 (grub_cmd_serial): Check return value of serial_hw_get_port().
2819
62a02d00 28202008-07-07 Pavel Roskin <proski@gnu.org>
2821
2822 * boot/i386/pc/diskboot.S (notification_string): Replace
2823 "Loading kernel" with just "loading". This is shorter, less
2824 confusing and saves a few bytes for possible future changes.
2825
3e5581b0 28262008-07-05 Pavel Roskin <proski@gnu.org>
2827
ea387a48 2828 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2829 size for ATAPI devices, they are undefined. Output sector
2830 number in decimal form.
2831
3e5581b0 2832 * disk/ata.c: Use named constants for status bits.
2833
fdecb8fd 28342008-07-04 Pavel Roskin <proski@gnu.org>
2835
bcd35b90 2836 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2837 grub_addr_t before casting it to the void pointer to fix a
2838 warning. Non-addressable regions are discarded earlier.
2839 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2840 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2841 (check_signature): Don't shadow table_header.
2842 (grub_linuxbios_table_iterate): Cast numeric constants to
2843 grub_linuxbios_table_header_t.
2844 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2845 grub_stop().
2846
af58ab3d 2847 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2848 prevent warnings.
2849
1759aa57 2850 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2851 pointer, which can cause warnings. Support 64-bit addresses.
2852
fdecb8fd 2853 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2854 of sizeof(long). This fixes PowerPC image generation on x86_64.
2855
8516d2a8 28562008-07-04 Robert Millan <rmh@aybabtu.com>
2857
2858 This fixes a performance issue when pc & gpt partmap iterators
2859 didn't abort iteration even after our hook found what it was
fe987087 2860 looking for (often causing expensive probes of non-existent drives).
8516d2a8 2861
2862 Some callers relied on previous buggy behaviour, since they would
34c44600 2863 raise an error when their own hooks caused early abortion of its
8516d2a8 2864 iteration.
2865
2866 * kern/device.c (grub_device_open): Improve error message.
2867 * disk/lvm.c (grub_lvm_open): Likewise.
2868 * disk/raid.c (grub_raid_open): Likewise.
2869
2870 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2871 when hook requests it, independently of grub_errno.
2872 (pc_partition_map_probe): Do not fail when find_func() caused
2873 early abortion of pc_partition_map_iterate().
2874
2875 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2876 when hook requests it, independently of grub_errno.
2877 (gpt_partition_map_probe): Do not fail when find_func() caused
2878 early abortion of gpt_partition_map_iterate().
2879
2880 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2881 when hook requests it, independently of grub_errno. Do not fail when
2882 part_map_iterate_hook() caused early abortion of p->iterate().
2883
2884 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2885 when grub_partition_iterate() returned with non-zero.
2886
277d0de9 28872008-07-03 Pavel Roskin <proski@gnu.org>
2888
2889 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2890 like we do in grub_ata_pio_read().
2891 (grub_ata_readwrite): Always write individual sectors. Fix the
2892 sector count for the remainder.
2893 (grub_ata_write): Enable writing to ATA devices. Correctly
2894 report error for ATAPI devices.
2895
d4c9b428 28962008-07-02 Pavel Roskin <proski@gnu.org>
2897
e43fc690 2898 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2899 warning.
2900
f707af42 2901 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2902 for every read sector, we already increment it for the whole
2903 batch. This fixes reading more than 256 sectors at once.
2904
11e16b15 2905 * util/grub-editenv.c (cmd_info): Cast argument to long
2906 explicitly. ptrdiff_t reduces to int on i386.
2907
cbabfdd4 2908 * util/grub-editenv.c (main): Be specific which parameter is
2909 missing.
2910
b8fbce0a 2911 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2912 (memdisk): Make memdisk_orig_addr a pointer.
2913
c9c8e606 2914 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2915 for file offsets, use grub_off_t instead. Fix printf format
2916 warnings.
2917
ca62e598 2918 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2919 there. Real unexpected warnings should not drown in the noise
2920 about known problems.
2921
ce8d1766 2922 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2923 grub_disk_addr_t for memory addresses.
2924
00c7a56a 2925 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2926 explicitly to fix a warning.
2927
08d3ef09 2928 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2929
cb71ba20 2930 * Makefile.in (MODULE_LDFLAGS): New variable.
2931 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2932 the linker accepts --build-id=none.
2933 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2934 MODULE_LDFLAGS.
2935 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2936
d4c9b428 2937 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2938 those in Linux XFS code. Provide a way to access 64-bit parent
2939 inode.
2940 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2941 the end of struct grub_xfs_dir_header.
2942
d4156eee 29432008-07-02 Bean <bean123ch@gmail.com>
2944
2945 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2946 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2947 and GRUB_IEEE1275_FLAG_NO_ANSI.
2948
2949 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2950 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2951 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2952
2953 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2954 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2955
2956 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2957 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2958
2959 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2960 esc sequence on non ANSI terminal.
2961 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2962
2963 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2964 beginning of file.
2965
2270f77b 29662008-07-02 Bean <bean123ch@gmail.com>
2967
2968 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2969 (grub_editenv_SOURCES): New variable.
2970 (pkglib_MODULES): Add loadenv.mod.
2971 (loadenv_mod_SOURCES): New variable.
2972 (loadenv_mod_CFLAGS): Likewise.
2973 (loadenv_mod_LDFLAGS): Likewise.
2974
2975 * include/grub/envblk.h: New file.
2976
2977 * util/envblk.c: New file.
2978
2979 * util/grub-editenv.c: New file.
2980
2981 * commands/loadenv.c: New file.
2982
0e9e51ec 29832008-07-01 Pavel Roskin <proski@gnu.org>
2984
d89b7634 2985 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2986 not unsigned char. This fixes warnings and is consistent with
2987 other tags.
2988
bf1835b1 2989 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2990
8222a04b 2991 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2992
6a42d99d 2993 * term/tparm.c (analyze): Always set *popcount.
2994
10b159d1 2995 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2996 cast to fix a warning.
2997
b8789f6c 2998 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2999 cast to suppress a warning.
3000
29d7e38a 3001 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3002 grub_fshelp_read_file() expects.
3003
f341f669 3004 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3005 write uuid as a 32-bit value in CPU byte order, so declare and
3006 use it as such.
3007
0e9e51ec 3008 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3009 long if the format specifier expects it.
3010 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3011 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3012 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3013 long to fix a warning.
3014 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3015 grub_dprintf() arguments to fix warnings.
3016
3aefa857 30172008-06-30 Pavel Roskin <proski@gnu.org>
3018
56c7668b 3019 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3020 install_bsd_part immediately before core.img is embedded or
3021 modified on disk. This fixes core.img verification if core.img
3022 cannot be embedded.
3023
3aefa857 3024 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3025 core_path to calculate the blocklist.
3026 Patch from Javier Martín <lordhabbit@gmail.com>
3027
5444088d 30282008-06-29 Robert Millan <rmh@aybabtu.com>
3029
3030 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3031 block to disk block.
3032 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3033 Patch from Niels Böhm <bitbucket@arcor.de>
3034
674835c8 30352008-06-29 Robert Millan <rmh@aybabtu.com>
3036
3037 * util/update-grub_lib.in (font_path): Search for fonts in
3038 /boot/grub first, which is more likely to be readable (we aren't
3039 deciding where fonts live, just looking for them).
3040
f527dbc8 30412008-06-26 Pavel Roskin <proski@gnu.org>
3042
6c2d8df6 3043 * util/biosdisk.c (read_device_map): Don't leave dead map
3044 entries for devices failing stat() check.
3045
f527dbc8 3046 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3047 core_path_dev for the core.img path on the target device.
3048
aebe3d13 30492008-06-26 Robert Millan <rmh@aybabtu.com>
3050
3051 * disk/fs_uuid.c: New file.
3052 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3053 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3054 (fs_uuid_mod_LDFLAGS): New variables.
3055 * include/grub/disk.h (grub_disk_dev_id): Add
3056 `GRUB_DISK_DEVICE_UUID_ID'.
3057 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3058 implement iterate().
3059
37aaf354 30602008-06-26 Robert Millan <rmh@aybabtu.com>
3061
3062 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3063 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3064 Linux image includes no initrd.
3065
25ff262a 30662008-06-21 Javier Martín <lordhabbit@gmail.com>
3067
3068 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3069 call to resolve the core image location that effectively appended the
3070 name twice.
3071
76a2bd44 30722008-06-21 Robert Millan <rmh@aybabtu.com>
3073
3074 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3075 call from here ...
3076
3077 * util/grub.d/10_hurd.in: ... to here ...
3078 * util/grub.d/10_linux.in: ... and here.
3079
650e1c79 30802008-06-19 Robert Millan <rmh@aybabtu.com>
3081
fe987087 3082 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 3083 after it has been set by grub_machine_set_prefix().
3084
6ce63911 30852008-06-19 Robert Millan <rmh@aybabtu.com>
3086
3087 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3088 search result when not saving to variable, not the other way around.
3089 When saving to variable, abort iteration as soon as a match is found.
3090
73940cec 30912008-06-19 Robert Millan <rmh@aybabtu.com>
3092
3093 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3094 check for partition that provides /boot/grub. Its logic is flawed,
3095 as it prevents prepare_grub_to_access_device() from being called
3096 multiple times.
3097
3c62a39d 30982008-06-19 Robert Millan <rmh@aybabtu.com>
3099
3100 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3101 "insmod" command directly when abstraction modules are needed,
fe987087 3102 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 3103 since it had already been processed).
3104
47395a42 31052008-06-19 Pavel Roskin <proski@gnu.org>
3106
3107 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3108 changed. This is needed in case GRUB_LIBDIR changes.
3109 * conf/i386-ieee1275.rmk: Likewise.
3110 * conf/i386-linuxbios.rmk: Likewise.
3111 * conf/i386-pc.rmk: Likewise.
3112 * conf/powerpc-ieee1275.rmk: Likewise.
3113
a145ac2d 31142008-06-18 Pavel Roskin <proski@gnu.org>
3115
3116 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3117 kernel_elf_symlist.c to symlist.c for consistency with other
3118 architectures. Update all users.
3119 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3120
7847c51e 31212008-06-18 Robert Millan <rmh@aybabtu.com>
3122
3123 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3124 it in prefix.
3125
3126 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3127 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3128 a RAID device, run setup() for all members independently on whether
3129 LVM abstraction is being used.
3130 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3131 If grub-mkimage has set `*install_dos_part == -2', don't override this
3132 value.
3133 Perform *install_dos_part adjustments independently on whether
3134 we're embedding or not.
3135 Clarify error message when image is too big for embedding.
3136 Remove duplicate *install_dos_part stanza.
3137
b23e5644 31382008-06-17 Robert Millan <rmh@aybabtu.com>
3139
3140 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3141 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3142 variables.
3143 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3144 values in grub_ofconsole_normal_color and
3145 grub_ofconsole_highlight_color (they're not directly related to
3146 background and foreground).
3147 (grub_ofconsole_setcolorstate): Extract background and foreground
3148 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3149
0aac2f79 31502008-06-17 Robert Millan <rmh@aybabtu.com>
3151
3152 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3153 /boot/grub for the check in last commit, not /boot (they could be
3154 different partitions).
3155
3cca7ef3 31562008-06-16 Robert Millan <rmh@aybabtu.com>
3157
3158 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3159 asked to setup access for the same partition that provides /boot,
3160 don't bother using UUIDs since our root already has the value we
3161 want.
3162
347396d8 31632008-06-16 Robert Millan <rmh@aybabtu.com>
3164
3165 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3166 I2O devices.
3167 Patch from Sven Mueller <sven@debian.org>.
3168
991477f8 31692008-06-16 Robert Millan <rmh@aybabtu.com>
3170
3171 * util/update-grub.in: Check for $EUID instead of $UID.
3172 Reported by Vincent Zweije.
3173
d31a32a1 31742008-06-16 Bean <bean123ch@gmail.com>
3175
fe987087 3176 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 3177 (grub_ext2_read_block): Likewise.
3178 (grub_ext2_read_inode): Likewise.
3179 (grub_ext2_mount): Likewise.
3180 (grub_ext2_close): Likewise.
3181 (grub_ext3_get_journal): Removed.
3182
fe987087 3183 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 3184 (grub_reiserfs_read_symlink): Likewise.
3185 (grub_reiserfs_mount): Likewise.
3186 (grub_reiserfs_open): Likewise.
3187 (grub_reiserfs_read): Likewise.
3188 (grub_reiserfs_close): Likewise.
3189 (grub_reiserfs_get_journal): Removed.
3190
3191 * fs/fshelp.c (grub_fshelp_read): Removed.
3192 (grub_fshelp_map_block): Likewise.
3193
3194 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3195 (grub_fshelp_journal): Likewise.
3196 (grub_fshelp_read): Likewise.
3197 (grub_fshelp_map_block): Likewise.
3198
3540a760 31992008-06-16 Pavel Roskin <proski@gnu.org>
3200
3201 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3202 floating point anymore.
3203 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3204
95614c84 32052008-06-15 Pavel Roskin <proski@gnu.org>
3206
3207 * commands/ls.c (grub_ls_list_files): Use integer calculations
3208 for human readable format, avoid floating point use.
3209 * kern/misc.c (grub_ftoa): Remove.
3210 (grub_vsprintf): Remove floating point support.
3211
50465dd6 32122008-06-15 Robert Millan <rmh@aybabtu.com>
3213
fe6b695a 3214 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 3215 devices.
3216 Reported by Max Vozeler.
3217
a9207284 32182008-06-15 Robert Millan <rmh@aybabtu.com>
3219
3220 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3221 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3222 skipped later.
3223 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3224 the beginning of the prefix.
3225
3226 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3227 It is assumed that if we have a memdisk, grub-mkimage has set
3228 grub_prefix to include the "(memdisk)" drive in it.
3229
a7cbd45a 32302008-06-15 Robert Millan <rmh@aybabtu.com>
3231
3232 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3233 Initialize keyboard controller after registering the terminal, so that
3234 grub_printf() can be called from grub_keyboard_controller_init().
3235
21cf716a 32362008-06-15 Robert Millan <rmh@aybabtu.com>
3237
3238 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3239 extent-btree which is written as big endian on disk.
3240 Reported by Alain Greppin <al@chilibi.org>.
3241
23a64d8e 32422008-06-14 Robert Millan <rmh@aybabtu.com>
3243
3244 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3245 * util/i386/pc/grub-install.in (modules): Likewise.
3246
d687651c 32472008-06-13 Pavel Roskin <proski@gnu.org>
3248
3249 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3250
dfe9ddd4 32512008-06-13 Bean <bean123ch@gmail.com>
3252
3253 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3254
3255 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3256
3257 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3258 to indicate sparse block.
3259
16ae7781 32602008-06-12 Pavel Roskin <proski@gnu.org>
3261
e6d1a308 3262 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3263 number, grub_fshelp_read() does it for us.
3264
16ae7781 3265 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3266 linear disk read with journal translation.
3267 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3268 * include/grub/fshelp.h: Declare grub_fshelp_read().
3269
40fd3a2b 32702008-06-09 Pavel Roskin <proski@gnu.org>
3271
3272 * fs/minix.c (grub_minix_mount): Handle error reading
3273 superblock.
3274
f5679726 32752008-06-08 Robert Millan <rmh@aybabtu.com>
3276
3277 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3278 don't append the RAID prefix afterwards.
3279 Reported by Clint Adams.
3280
ce525529 32812008-06-08 Robert Millan <rmh@aybabtu.com>
3282
3283 Based on description from Pavel:
3284 * kern/disk.c (grub_disk_check_range): Rename to ...
3285 (grub_disk_adjust_range): ... this. Add a comment explaining the
3286 tasks performed by this function.
3287
ad4936a0 32882008-06-08 Robert Millan <rmh@aybabtu.com>
3289
3290 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3291 `num_serial' (for consistency with other variables).
3292 (struct grub_ntfs_data): Add `uuid' member.
3293 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3294 (grub_ntfs_uuid): New function.
3295 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3296
dc20b0f9 32972008-06-07 Pavel Roskin <proski@gnu.org>
3298
3299 * util/biosdisk.c (open_device): Revert last change to the
3300 function, it broke installation. The sector needs to be
3301 different dependent on which device is opened.
3302
c5e3cfba 33032008-06-06 Robert Millan <rmh@aybabtu.com>
3304
3305 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3306 rest of GRUB, and breakage doesn't happen if its value were modified.
3307
3308 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3309 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3310 a constant (same value).
3311 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3312 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3313
26a1f8c4 33142008-06-06 Robert Millan <rmh@aybabtu.com>
3315
3316 * util/biosdisk.c (open_device): Do not modify sector offset when
3317 accessing a partition. kern/disk.c already handles this for us.
3318
25d6b327 33192008-06-06 Robert Millan <rmh@aybabtu.com>
3320
3321 * util/grub-emu.c (grub_machine_init): Move code in this function from
3322 here ...
3323 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3324 segfault in case grub_printf() is called).
3325
3326 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3327 grub_probe. Update all users not to explicitly add it again.
3328 (grub_device): New variable; contains corresponding device for grubdir.
3329 (fs_module, partmap_module, devabstraction_module): Pass
3330 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3331 every time.
3332
9ece62fb 33332008-06-05 Robert Millan <rmh@aybabtu.com>
3334
3335 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3336 is found, print it (same layout as with labels).
3337
1ad36d37 33382008-06-04 Robert Millan <rmh@aybabtu.com>
3339
3340 * util/biosdisk.c (get_drive): Rename to ...
3341 (find_grub_drive): ... this. Update all users.
3342
3343 (get_os_disk): Rename to ...
3344 (convert_system_partition_to_system_disk): ... this. Update all users.
3345
3346 (find_drive): Rename to ...
3347 (find_system_device): ... this. Update all users.
3348
e6a30859 33492008-06-04 Robert Millan <rmh@aybabtu.com>
3350
3351 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3352 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3353 (make_device_map): Likewise.
3354
00c108a4 33552008-06-01 Robert Millan <rmh@aybabtu.com>
3356
3357 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3358 before dereferencing it.
3359
3360 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3361 union with fat12/fat16-specific ones. Add some new fields, including
3362 `num_serial' for both versions.
3363 (struct grub_fat_data): Add `uuid' member.
3364 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3365 names. Initialize `data->uuid' using `num_serial'.
3366 (grub_fat_uuid): New function.
3367 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3368
3369 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3370 (grub_reiserfs_uuid): New function.
3371 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3372 member.
3373
3374 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3375 (grub_xfs_uuid): New function.
3376 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3377
1385c5bb 33782008-06-01 Robert Millan <rmh@aybabtu.com>
3379
3380 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3381 code that is backward compatible with pre-uuid search command.
3382
c682dfd7 33832008-05-31 Robert Millan <rmh@aybabtu.com>
3384
3385 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3386 floppies after everything else, to ensure floppy drive isn't accessed
3387 unnecessarily (patch from Bean).
3388
b7db5d47 33892008-05-31 Robert Millan <rmh@aybabtu.com>
3390
3391 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3392 not print device names when we were asked to set a variable.
3393
6e037aa9 33942008-05-31 Robert Millan <rmh@aybabtu.com>
3395
3396 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3397 using "cursor-on" and "cursor-off" commands (understood at least by
3398 the Open Firmware flavour on OLPC).
3399
41305bc8 34002008-05-31 Michael Gorven <michael@gorven.za.net>
3401
3402 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3403 on and off sequences.
3404
69ba137e 34052008-05-31 Robert Millan <rmh@aybabtu.com>
3406
3407 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3408 * util/update-grub.in: Likewise.
3409
520ae21b 34102008-05-30 Pavel Roskin <proski@gnu.org>
3411
3412 * util/biosdisk.c (linux_find_partition): Simplify logic and
3413 make the code more universal. Keep special processing for
3414 devfs, but use a simple rule for all other devices. If the
3415 device ends with a number, append 'p' and the partition number.
3416 Otherwise, append only the partition number.
3417
5786569b 34182008-05-30 Robert Millan <rmh@aybabtu.com>
3419
3420 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3421 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3422 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3423 the `root' parameter to Linux.
3424
51500452 34252008-05-30 Robert Millan <rmh@aybabtu.com>
3426
3427 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3428 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3429 --fs_uuid with --fs-uuid.
3430 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3431 all filesystems support them).
3432
811d3878 34332008-05-30 Robert Millan <rmh@aybabtu.com>
3434
3435 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 3436 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 3437
cab63c95 34382008-05-30 Robert Millan <rmh@aybabtu.com>
3439
3440 * util/grub.d/00_header.in: Remove obsolete comment referencing
3441 convert_system_path_to_grub_path().
3442 * util/update-grub.in: Likewise.
3443 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3444 (convert_system_path_to_grub_path): Add a warning message explaining
3445 that this function is deprecated. Rely on is_path_readable_by_grub()
3446 for the readability checks.
3447 (font_path): Use is_path_readable_by_grub() for the readability
3448 check rather than convert_system_path_to_grub_path().
3449
972e2f7a 34502008-05-30 Robert Millan <rmh@aybabtu.com>
3451
3452 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3453 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3454 converting it first.
3455 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3456 grub.cfg for access to font file, and afterwards call it again to set
3457 the root device.
3458
62191274 34592008-05-30 Robert Millan <rmh@aybabtu.com>
3460
3461 * commands/search.c (options): Add --fs_uuid option.
3462 (search_fs_uuid): New function.
3463 (grub_cmd_search): Fix --set argument passing.
3464 Use search_fs_uuid() when requested via --fs_uuid.
3465 (grub_search_init): Update help message.
3466 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3467 and redeclare it as an array of 16-bit words.
3468 (grub_ext2_uuid): New function.
3469 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3470 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3471 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3472 (GRUB_DEVICE_BOOT_UUID): New variables.
3473 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3474 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3475 whenever possible.
3476 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3477 just assume `root' variable has the right value.
3478 * util/grub.d/10_linux.in: Likewise.
3479 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3480 via PRINT_FS_UUID.
3481 (main): Recognise `-t fs_uuid' argument.
3482
01b73ec8 34832008-05-30 Robert Millan <rmh@aybabtu.com>
3484
3485 * util/biosdisk.c (map): Redefine structure to hold information
3486 about GRUB drive name.
fe6b695a 3487 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 3488 drive names.
3489 (call_hook): Remove.
3490 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3491 member. Assume drive has partitions.
3492 (grub_util_biosdisk_open): Access device names via `.device' struct
3493 member.
3494 (open_device): Likewise.
3495 (find_drive): Likewise.
3496 (read_device_map): Adjust map[] usage to match the new struct
3497 definition. Don't check for duplicates (still possible, but not cheap
3498 anymore).
3499 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3500 (make_device_name): Remove assumption of BIOS-like drive names.
3501
22f16596 35022008-05-30 Pavel Roskin <proski@gnu.org>
3503
3504 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3505 compiling execute.c doesn't need grub_script.tab.h anymore.
3506 (normal/command.c_DEPENDENCIES): Likewise.
3507 (normal/function.c_DEPENDENCIES): Likewise.
3508 * conf/i386-ieee1275.rmk: Likewise.
3509 * conf/i386-linuxbios.rmk: Likewise.
3510 * conf/i386-pc.rmk: Likewise.
3511 * conf/powerpc-ieee1275.rmk: Likewise.
3512 * conf/sparc64-ieee1275.rmk: Likewise.
3513
528ad8f2 35142008-05-29 Pavel Roskin <proski@gnu.org>
3515
d1dff95d 3516 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3517 when scanning metadata for volume group name.
3518
528ad8f2 3519 * include/grub/script.h: Don't include grub_script.tab.h. It's
3520 a generated file, which may only be included from the files with
3521 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3522 use union YYSTYPE, as the later allows forward declaration.
3523 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3524
47248e08 35252008-05-29 Robert Millan <rmh@aybabtu.com>
3526
3527 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3528 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3529 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3530 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3531 scan codes.
3532
ee632529 35332008-05-29 Robert Millan <rmh@aybabtu.com>
3534
3535 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3536 control key combinations.
3537
eee96e08 35382008-05-29 Robert Millan <rmh@aybabtu.com>
3539
3540 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3541 * util/ieee1275/grub-install.in: ... to here.
3542 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3543 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3544 (grub_install_SOURCES): Likewise.
3545
da9a6a94 35462008-05-29 Robert Millan <rmh@aybabtu.com>
3547
3548 * fs/affs.c: Update copyright year.
3549 * fs/ext2.c: Likewise.
3550 * fs/fshelp.c: Likewise.
3551 * fs/hfsplus.c: Likewise.
3552 * fs/ntfs.c: Likewise.
3553 * fs/xfs.c: Likewise.
3554 * include/grub/fshelp.h: Likewise.
3555 * util/grub-mkdevicemap.c: Likewise.
3556
12e65f3a 35572008-05-28 Robert Millan <rmh@aybabtu.com>
3558
3559 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3560 might need to be fatfs to support some firmware implementations
3561 (e.g. OFW or EFI).
3562
23023641 35632008-05-28 Robert Millan <rmh@aybabtu.com>
3564
3565 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3566 devices.
3567 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3568 (make_device_map): Likewise.
3569
887d2619 35702008-05-20 Bean <bean123ch@gmail.com>
3571
3572 * fs/fshelp.c (grub_fshelp_map_block): New function.
3573 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3574 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3575
3576 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3577 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3578 (grub_fshelp_journal): New structure.
3579 (grub_fshelp_map_block): New function prototype.
3580 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3581 (grub_fshelp_map_block): Likewise.
3582
3583 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3584 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3585 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3586 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3587 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3588 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3589 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3590 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3591 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3592 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3593 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3594 (grub_ext2_sblock): New members for journal support.
3595 (grub_ext3_journal_header): New structure.
3596 (grub_ext3_journal_revoke_header): Likewise.
3597 (grub_ext3_journal_block_tag): Likewise.
3598 (grub_ext3_journal_sblock): Likewise.
3599 (grub_fshelp_node): New members logfile and journal.
3600 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3601 grub_fshelp_map_block to get real block number.
3602 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3603 number.
3604 (grub_ext2_read_inode): Likewise.
3605 (grub_ext3_get_journal): New function.
3606 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3607 (grub_ext2_close): Release memory used by journal.
3608
3609 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3610 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3611 (grub_reiserfs_transaction_header): Renamed to
3612 grub_reiserfs_description_block, replace field data with real_blocks.
3613 (grub_reiserfs_commit_block): New structure.
3614 (grub_reiserfs_data): New member journal.
3615 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3616 number.
3617 (grub_reiserfs_read_symlink): Likewise.
3618 (grub_reiserfs_iterate_dir): Likewise.
3619 (grub_reiserfs_open): Likewise.
3620 (grub_reiserfs_read): Likewise.
3621 (grub_reiserfs_get_journal): New function.
3622 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3623 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3624 using grub_reiserfs_get_journal.
3625 (grub_reiserfs_close): Release memory used by journal.
3626
3627 * fs/affs.c (grub_affs_read_block): Change block type to
3628 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3629
3630 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3631
3632 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3633
3634 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3635
3636 * fs/udf.c (grub_udf_read_block): Change block type to
3637 grub_disk_addr_t. Use type cast to avoid warning.
3638
3639 * fs/xfs.c (grub_xfs_read_block): Likewise.
3640
b7c6bed5 36412008-05-16 Christian Franke <franke@computer.org>
3642
3643 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3644 to ensure that break with ESC will always work.
3645 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3646 Remove ESC from keyboard queue.
3647
eedf167f 36482008-05-16 Christian Franke <franke@computer.org>
3649
3650 * util/biosdisk.c: [__CYGWIN__] Add includes.
3651 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3652 (get_os_disk): Move variable declarations to OS specific
3653 parts to avoid warning.
3654 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3655 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3656 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3657 Cygwin.
3658 * util/getroot.c: [__CYGWIN__] Add includes.
3659 (strip_extra_slashes): Fix "/" case.
3660 [__CYGWIN__] (get_win32_path): New function.
3661 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3662 [__CYGWIN__] (find_root_device): Disable.
3663 [__CYGWIN__] (get_bootsec_serial): New function.
3664 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3665 [__linux__] (grub_guess_root_device): Add early returns to simplify
3666 structure.
3667 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3668 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3669 check for Linux only.
3670
a079699e 36712008-05-15 Bean <bean123ch@gmail.com>
3672
3673 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3674 keyboard hang problem in apple's intel mac.
3675
1cf4059a 36762008-05-09 Robert Millan <rmh@aybabtu.com>
3677
3678 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3679 devices.
3680 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3681 (make_device_map): Likewise.
3682 Reported by Aurelien Jarno <aurel32@debian.org>
3683
ed759390 36842008-05-07 Ian Campbell <ijc@hellion.org.uk>
3685
3686 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3687 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3688 (make_device_map): Output entries for xvd type disks.
3689
b56c4eaa 36902008-05-07 Robert Millan <rmh@aybabtu.com>
3691
3692 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3693 devices.
3694 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3695 (make_device_map): Likewise.
3696 Reported by Roland Dreier <rdreier@cisco.com>
3697
7f8866ed 36982008-05-07 Robert Millan <rmh@aybabtu.com>
3699
3700 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3701 grub_strstr() call. Correct a few mistakes in failure path handling.
3702
b0346e0f 37032008-05-06 Robert Millan <rmh@aybabtu.com>
3704
3705 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3706 Do not print a trailing slash (therefore, the root directory is an
3707 empty string).
3708 (convert_system_path_to_grub_path): Do not remove trailing slash
3709 from make_system_path_relative_to_its_root() output.
3710
3711 * util/i386/pc/grub-install.in: Add trailing slash to output from
3712 make_system_path_relative_to_its_root().
3713
6cf12cbd 37142008-05-06 Robert Millan <rmh@aybabtu.com>
3715
3716 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3717 ensures that output lines aren't intermangled with those sent to
3718 stderr (via grub_util_info()).
3719 * util/grub-probe.c (grub_refresh): Likewise.
3720 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3721
0fbb3117 37222008-05-05 Christian Franke <franke@computer.org>
3723
3724 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3725 Add Cygwin device names.
3726 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3727 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3728 (check_device): Return error instead of success on empty name.
3729 (make_device_map): Move label inside linux specific code to
3730 prevent compiler warning.
3731
8124cdb7 37322008-04-30 Robert Millan <rmh@aybabtu.com>
3733
3734 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3735 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3736 first boot option.
3737 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3738
094c01d0 37392008-04-29 Robert Millan <rmh@aybabtu.com>
3740
3741 * docs/grub.cfg: New file (example GRUB configuration).
3742
f4b1fc02 37432008-04-26 Robert Millan <rmh@aybabtu.com>
3744
329ce2a5 3745 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3746 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3747 and `disk/ieee1275/nand.c'.
f4b1fc02 3748
25f16ec1 37492008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 3750
25f16ec1 3751 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3752 i386-linuxbios.
3753
3754 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3755 change the buffer size to 4096 for cdrom device.
3756
3757 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3758 and nand.mod.
3759 (_linux_mod_SOURCES): New variable.
3760 (_linux_mod_CFLAGS): Likewise.
3761 (_linux_mod_LDFLAGS): Likewise.
3762 (linux_mod_SOURCES): Likewise.
3763 (linux_mod_CFLAGS): Likewise.
3764 (linux_mod_LDFLAGS): Likewise.
3765 (nand_mod_SOURCES): Likewise.
3766 (nand_mod_CFLAGS): Likewise.
3767 (nand_mod_LDFLAGS): Likewise.
3768
3769 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3770 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3771 type property. (nand device in olpc don't have this property)
3772
3773 * include/grub/disk.h (grub_disk_dev_id): New macro
3774 GRUB_DISK_DEVICE_NAND_ID.
3775
3776 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3777 function prototype.
3778 (grub_rescue_cmd_initrd): Likewise.
3779
3780 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3781 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3782 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 3783
25f16ec1 3784 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3785 GRUB_MACHINE_IEEE1275 is defined.
3786
3787 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3788 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3789
3790 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3791 on nested function heap_init.
3792 (grub_upper_mem): New variable for i386-ieee1275.
3793 (grub_get_extended_memory): New function for i386-ieee1275.
3794 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3795
3796 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3797 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3798 property.
f19dbdb7 3799
25f16ec1 3800 * loader/i386/ieee1275/linux.c: New file.
3801
3802 * loader/i386/ieee1275/linux_normal.c: New file.
3803
3804 * disk/ieee1275/nand.c: New file.
3805
e89d61e9 38062008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3807
3808 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3809 value.
3810 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3811
602566f6 38122008-04-18 Robert Millan <rmh@aybabtu.com>
3813
3814 Restructures early code path on ieee1275 to unify grub_main() as
3815 the first C function that is executed in every platform.
3816
3817 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3818 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3819 cmain().
3820 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3821 * kern/ieee1275/cmain.c (cmain): Rename to ...
3822 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3823 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3824 at the beginning.
3825
57490c2b 38262008-04-18 Robert Millan <rmh@aybabtu.com>
3827
3828 * util/update-grub.in: Fix syntax error when setting
3829 `GRUB_PRELOAD_MODULES'.
3830 Reported by Stephane Chazelas <stephane@artesyncp.com>
3831
1977517d 38322008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3833
3834 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3835 section into account, newer toolchains generate unique build ids
3836 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 3837 we want build ids to be preserved
1977517d 3838 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3839 far from other sections don't cause the raw binary images grow
3840 size
3841
bfb1f1a2 38422008-04-15 Robert Millan <rmh@aybabtu.com>
3843
3844 * disk/lvm.c: Update copyright year.
3845 * kern/misc.c: Likewise.
3846
01979850 38472008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3848
3849 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 3850 there is no memory left for physical volume name.
01979850 3851
0a1150e2 38522008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3853
3854 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3855 volume name mapping to support bigger than 9 character names properly.
3856
82ead3fe 38572008-04-13 Robert Millan <rmh@aybabtu.com>
3858
3859 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3860 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3861
e54a72f5 38622008-04-13 Christian Franke <franke@computer.org>
3863
3864 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3865 to create a floppy emulation boot CD when non emulation mode
3866 does not work.
3867 Enable Joliet CD filesystem extension.
3868
9fe86034 38692008-04-13 Robert Millan <rmh@aybabtu.com>
3870
3871 * kern/misc.c (grub_strncat): Fix off-by-one error.
3872 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3873
3874 * kern/env.c (grub_env_context_close): Clear current context, not
3875 previous one.
3876 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3877
3878 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3879
7ceeee39 38802008-04-13 Robert Millan <rmh@aybabtu.com>
3881
3882 Improve robustness when handling LVM.
3883
3884 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 3885 (and leave `*p' unmodified).
7ceeee39 3886 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3887 through it.
3888 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3889 iterating through it.
3890 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3891 through it.
fe6b695a 3892 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 3893 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3894 Don't assume `vg->pvs != NULL' when iterating through it.
3895
58cd3d85 38962008-04-13 Robert Millan <rmh@aybabtu.com>
3897
3898 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3899 * genmk.rb (partmap): New variable.
3900 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3901 (#{partmap}): New target rule.
3902 * genpartmaplist.sh: New file.
3903 * Makefile.in (pkglib_DATA): Add partmap.lst.
3904 (partmap.lst): New target rule.
3905 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3906 modules (including all partition maps), instead of preloading them.
3907
78b51059 39082007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3909
3910 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3911 `linux-boot-prober' (if installed) to detect other operating
3912 systems which are installed on the computer and add them to
3913 the boot menu.
3914 * conf/common.rmk: Build and install 30_os-prober.
3915
a91627b4 39162008-04-12 Robert Millan <rmh@aybabtu.com>
3917
3918 * kern/powerpc/ieee1275/init.c: Move from here ...
3919 * kern/ieee1275/init.c: ... to here. Update all users.
3920
3921 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3922 * kern/ieee1275/cmain.c: ... to here. Update all users.
3923
3924 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3925 * kern/ieee1275/openfw.c: ... to here. Update all users.
3926
3927 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3928 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3929
322562ea 39302008-04-10 Pavel Roskin <proski@gnu.org>
3931
3932 * configure.ac: Always use "_cv_" in cache variables for
3933 compatibility with Autoconf 2.62.
3934
a02a73c5 39352008-04-07 Robert Millan <rmh@aybabtu.com>
3936
3937 Revert grub/machine/init.h addition by Pavel (since it breaks on
3938 i386-ieee1275 and others):
3939 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3940 * util/powerpc/ieee1275/misc.c: Likewise.
3941
25c024b1 39422008-04-07 Robert Millan <rmh@aybabtu.com>
3943
3944 * util/grub-probe.c (probe): Improve error message.
3945
3cbd2f98 39462008-04-07 Robert Millan <rmh@aybabtu.com>
3947
3948 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3949 (this prevents the presence of a bogus entry from ruining the whole
3950 thing).
3951
87a297bf 39522008-04-06 Pavel Roskin <proski@gnu.org>
3953
36747a62 3954 * util/biosdisk.c: Include grub/util/biosdisk.h.
3955 * util/grub-fstest.c (execute_command): Make static.
3956 * util/grub-mkdevicemap.c (check_device): Likewise.
3957 * util/i386/pc/misc.c: Include grub/machine/init.h.
3958 * util/powerpc/ieee1275/misc.c: Likewise.
3959 * util/lvm.c: Include grub/util/lvm.h.
3960 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3961 grub/cache.h.
3962 * util/raid.c: Include grub/util/raid.h.
3963 (grub_util_getdiskname): Make static.
3964
87a297bf 3965 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3966 grub_hostfs_fini(), as they are called from grub_init_all() and
3967 grub_fini_all() respectively. This fixes an infinite loop in
3968 grub-fstest due to double registration of hostfs.
3969 Reported by Christian Franke <Christian.Franke@t-online.de>
3970
f6ce7629 39712008-04-05 Pavel Roskin <proski@gnu.org>
3972
3973 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3974 all 8 functions. Otherwise, probe function 0 only.
3975
070e49e4 39762008-04-04 Pavel Roskin <proski@gnu.org>
3977
8b088a4c 3978 * commands/lspci.c (grub_lspci_iter): Print the bus number
3979 correctly.
3980
4f657021 3981 * commands/lspci.c (grub_pci_classes): Fix typos.
3982 (grub_lspci_iter): Don't print func twice. Print vendor ID
3983 before device ID, as it's normally done.
3984
070e49e4 3985 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3986 Fix signedness warnings.
3987 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3988 Likewise.
3989 * util/ieee1275/get_disk_name.c: Include config.h so that
3990 _GNU_SOURCE is defined and getline() is declared. Mark an
3991 unused argument as such. Fix a signedness warning.
3992
ba7328dc 39932008-04-02 Pavel Roskin <proski@gnu.org>
3994
26887f22 3995 * genkernsyms.sh.in: Use more robust assignments for CC and
3996 srcdir. Quote srcdir.
3997 * gensymlist.sh.in: Likewise. Assert at the compile time that
3998 the symbol table is not empty.
3999
ba7328dc 4000 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4001 * fs/cpio.c (grub_cpio_read): Likewise.
4002
0f582c6b 40032008-04-01 Pavel Roskin <proski@gnu.org>
4004
4b6e1995 4005 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4006 * disk/host.c (grub_host_open): Likewise.
4007 * disk/loopback.c (grub_loopback_open): Likewise.
4008 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4009 disk->id as in disk/host.c, not a multi-character constant.
4010
828a2768 4011 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4012 later is obsolete, potentially dangerous and sets a bad example.
4013 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4014 * util/misc.c (grub_util_get_image_size): Likewise.
4015
2bb4fb47 4016 * disk/loopback.c (options): Improve help for "--partitions".
4017
0f582c6b 4018 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4019 options to align them with the short options, e.g. "echo -e".
4020
a33224e0 40212008-03-31 Bean <bean123ch@gmail.com>
4022
4023 * video/reader/png.c (grub_png_data): New member is_16bit and
4024 image_data.
4025 (grub_png_decode_image_header): Detect 16 bit png image.
4026 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4027 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4028 (grub_video_reader_png): Release memory occupied by image_data.
4029
4030 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4031 4096 bytes.
4032 (grub_nfs_mount): Skip the test for sector per cluster.
4033
4034 * include/grub/ntfs.h (MAX_SPC): Removed.
4035
86cb4f54 40362008-03-31 Bean <bean123ch@gmail.com>
4037
4038 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4039 (grub_probe_SOURCES): Add fs/afs.c.
4040 (grub_fstest_SOURCES): Likewise.
4041 (afs_mod_SOURCES): New variable.
4042 (afs_mod_CFLAGS): Likewise.
4043 (afs_mod_LDFLAGS): Likewise.
4044
4045 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4046 (grub_emu_SOURCES): Likewise.
4047
4048 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4049
4050 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4051
4052 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4053
4054 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4055
4056 * fs/afs.c: New file.
4057
17c74c21 40582008-03-30 Pavel Roskin <proski@gnu.org>
4059
4cb68e89 4060 * disk/host.c: Include grub/misc.h to fix a warning.
4061 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4062 warnings about implicit declarations.
4063
8790bb04 4064 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4065 variable.
4066 * include/grub/i386/loader.h: Change declaration of
4067 grub_linux_boot() to match what grub_loader_set() expects.
4068 * util/getroot.c (grub_guess_root_device): Return const char* to
4069 fix a warning.
4070 * util/grub-probe.c (probe): Fix a warning about uninitialized
4071 abstraction_name variable.
4072 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4073 second argument as unused to fix a warning.
4074
9a3f3296 4075 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4076 missing grub_error() call.
4077
0ecef90d 4078 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4079 2.60 and newer uses it to define datadir.
4080
0bf6d401 4081 * commands/sleep.c: Fix warning about implicit declaration.
4082 * disk/memdisk.c: Likewise.
4083 * loader/aout.c: Likewise.
4084 * loader/i386/bsd_normal.c: Likewise.
4085 * util/grub-probe.c: Likewise.
4086
7cdacf97 4087 * commands/i386/cpuid.c (has_longmode): Make static.
4088 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4089 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4090
17c74c21 4091 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4092 GDT. This is more robust, as %ds can change.
4093 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4094 calling real_to_prot().
4095 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4096
80a3e68b 40972008-03-28 Pavel Roskin <proski@gnu.org>
4098
4099 * kern/i386/pc/startup.S: Assert that uncompressed functions
4100 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4101 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4102 code, as they push parts of the code (error handlers) beyond
4103 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4104 code as correctness and size.
4105
77bcd272 41062008-03-28 Pavel Roskin <proski@gnu.org>
4107
4108 * kern/i386/pc/startup.S
4109 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4110 data block address to the real mode, keep offset minimal. This
4111 works around a bug in AWARD BIOS on old Athlon systems, which
4112 makes CD detection hang.
4113
c5dfd43b 41142008-03-26 Pavel Roskin <proski@gnu.org>
4115
4116 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4117 const.
4118 * include/grub/normal.h: Add grub_parse_color_name_pair()
4119 declaration.
4120
bf962df2 41212008-03-24 Bean <bean123ch@gmail.com>
4122
4123 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4124 (cd_count): Removed.
4125 (cd_drive): New variable.
4126 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4127 (grub_biosdisk_call_hook): Likewise.
4128 (grub_biosdisk_iterate): Change cdrom detection method.
4129 (grub_biosdisk_open): Replace cd_start with cd_drive.
4130 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4131 detect cdrom device.
4132
4133 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4134 Removed.
4135 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4136 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4137 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4138 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4139 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4140 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4141 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4142 (grub_biosdisk_cdrp): New structure.
4143 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4144
4145 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4146
4147 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4148 device.
4149
4150 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4151 New function.
4152
68e7fc7a 41532008-03-20 Robert Millan <rmh@aybabtu.com>
4154
4155 Remove 2 TiB limit in ata.mod.
4156 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4157 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4158 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4159 grub_uint64_t instead of grub_uint32_t.
4160
38ad2cf5 41612008-03-05 Bean <bean123ch@gmail.com>
4162
4163 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4164 (grub_multiboot): Set boot device.
4165
4166 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4167
2b89344e 41682008-03-02 Bean <bean123ch@gmail.com>
4169
4170 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4171 symlink_buffer.
4172
87a95d1f 41732008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4174
4175 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4176 texinfo.tex.
4177
4178 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4179 modified.
4180
4181 * docs/fdl.texi: New file.
f19dbdb7 4182
87a95d1f 4183 * docs/mdate-sh: New file. Copied from gnulib.
4184 * docs/texinfo.tex: Likewise.
4185
4186 * config.guess: Updated from gnulib.
4187 * install-sh: Likewise.
4188
7dc15d8e 41892008-02-28 Robert Millan <rmh@aybabtu.com>
4190
4191 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4192 (aout_mod_SOURCES): New variable.
4193 (aout_mod_CFLAGS): Likewise.
4194 (aout_mod_LDFLAGS): Likewise.
4195
4196 * conf/i386-ieee1275.rmk: Likewise.
4197
b00ab696 41982008-02-28 Robert Millan <rmh@aybabtu.com>
4199
4200 * util/update-grub.in: Reorganise terminal validity check. Accept
4201 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4202 Based on suggestion by Franklin PIAT.
4203
79ca2d78 42042008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4205
4206 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4207 function.
4208 * util/getroot.c (grub_util_check_block_device): New function that
4209 returns the given argument if it is a block device and returns NULL else.
4210 * util/grub-probe.c (argument_is_device): New variable.
4211 (probe): Promote device_name from a variable to an argument. Receive
4212 device_name from grub_util_check_block_device() if path is NULL and from
4213 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 4214 (options): Introduce new parameter '-d, --device'.
79ca2d78 4215 (main): Add description of the new parameter to the help screen.
4216 Rename path variable to argument. Set argument_is_device if the '-d'
4217 option is given. Pass argument to probe() depending on
4218 argument_is_device.
4219
0d16e571 42202008-02-24 Bean <bean123ch@gmail.com>
4221
4222 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4223 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4224 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4225 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4226 (GRUB_ISO9660_VOLDESC_END): Likewise.
4227 (grub_iso9660_primary_voldesc): New member escape.
4228 (grub_iso9660_data): New member joliet.
4229 (grub_iso9660_convert_string): New function.
4230 (grub_iso9660_mount): Detect joliet extension.
4231 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4232 (grub_iso9660_iso9660_label): Likewise.
4233
4234 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4235 (grub_setup_SOURCES): Add fs/udf.c.
4236 (grub_fstest_SOURCES): Likewise.
4237 (udf_mod_SOURCES): New variable.
4238 (udf_mod_CFLAGS): Likewise.
4239 (udf_mod_LDFLAGS): Likewise.
4240
4241 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4242 (grub_emu_SOURCES): Likewise.
4243
4244 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4245
4246 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4247
4248 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4249
4250 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4251
4252 * fs/udf.c: New file.
4253
8a594a17 42542008-02-24 Robert Millan <rmh@aybabtu.com>
4255
4256 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4257 (normal/lexer.c_DEPENDENCIES): New variables.
4258 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4259 (normal/lexer.c_DEPENDENCIES): Likewise.
4260 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4261 (normal/lexer.c_DEPENDENCIES): Likewise.
4262 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4263 (normal/lexer.c_DEPENDENCIES): Likewise.
4264 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4265 (normal/lexer.c_DEPENDENCIES): Likewise.
4266 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4267 (normal/lexer.c_DEPENDENCIES): Likewise.
4268
2dc33c03 42692008-02-23 Robert Millan <rmh@aybabtu.com>
4270
4271 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4272 since they were intended to be in hex. This didn't break previously
4273 because of a bug in gpt_partition_map_iterate() (see below).
4274
4275 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4276 when checking the validity of GPT header.
4277 Remove `partno', since it always provides the same information as `i'.
4278
f6f4cfb0 42792008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4280
4281 * include/grub/efi/time.h: Fix a wrong comment.
4282
79ff665f 42832008-02-19 Pavel Roskin <proski@gnu.org>
4284
4285 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4286 message.
4287
d38e24c2 42882008-02-19 Bean <bean123ch@gmail.com>
4289
4290 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4291 (aout_mod_SOURCES): New variable.
4292 (aout_mod_CFLAGS): Likewise.
4293 (aout_mod_LDFLAGS): Likewise.
4294 (_bsd_mod_SOURCES): New variable.
4295 (_bsd_mod_CFLAGS): Likewise.
4296 (_bsd_mod_LDFLAGS): Likewise.
4297 (bsd_mod_SOURCES): New variable.
4298 (bsd_mod_CFLAGS): Likewise.
4299 (bsd_mod_LDFLAGS): Likewise.
4300
4301 * include/grub/aout.h: New file.
4302
4303 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4304
4305 * include/grub/i386/bsd.h: New file.
4306
4307 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4308 to make it public.
4309
4310 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4311 function is called, so that it's possible to change it inside the hook.
4312 (grub_elf64_load): Likewise.
4313 (grub_elf_file): Don't close the file if elf header is not found.
4314 (grub_elf_close): Close the file if grub_elf_file fails (The new
4315 grub_elf_file won't close it).
4316 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4317 (grub_elf64_size): Likewise.
4318
4319 * kern/i386/loader.S (grub_unix_real_boot): New function.
4320
4321 * loader/aout.c: New file.
4322
4323 * loader/i386/bsd.c: New file.
4324
4325 * loader/i386/bsd_normal.c: New file.
4326
4327 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4328
4329 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 4330 can test other formats.
d38e24c2 4331
b93bdb0f 43322008-02-19 Robert Millan <rmh@aybabtu.com>
4333
4334 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4335 (grub_gpt_partition_type_empty): Redefine with macro from
4336 `<grub/gpt_partition.h>'.
4337 (gpt_partition_map_iterate): Adjust partition type comparison.
4338
4339 Export `entry' as partmap-specific `part.data' struct.
4340 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4341
4342 * include/grub/gpt_partition.h (grub_gpt_header)
4343 (grub_gpt_partentry): ... to here (new file).
4344
4345 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4346
4347 (grub_gpt_partition_type_bios_boot): New const variable, defined
4348 with macro from `<grub/gpt_partition.h>'.
4349
4350 (setup): Replace `first_start' with `embed_region', which keeps
4351 track of the embed region (and is partmap-agnostic).
4352
4353 Replace find_first_partition_start() with find_usable_region(),
4354 which finds a usable region for embedding using partmap-specific
4355 knowledge (supports PC/MSDOS and GPT).
4356
4357 Fix all assumptions that the embed region start at sector 1, using
4358 `embed_region.start' from now on. Similarly, use `embed_region.end'
4359 rather than `first_start' to calculate available size.
4360
4361 In grub_util_info() message, replace "into after the MBR" with an
4362 indication of the specific sector our embed region starts at.
4363
66cb40f6 43642008-02-19 Robert Millan <rmh@aybabtu.com>
4365
4366 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4367 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4368 `commands/reboot.c'.
4369 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4370 (halt_mod_SOURCES): Likewise.
4371 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4372 (halt_mod_SOURCES): Likewise.
4373
b7202015 43742008-02-17 Christian Franke <franke@computer.org>
4375
4376 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4377
32b0fc49 43782008-02-17 Robert Millan <rmh@aybabtu.com>
4379
4380 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4381 set `first_start' to 0 for non-PC/MSDOS partition maps.
4382
aca63502 43832008-02-16 Robert Millan <rmh@aybabtu.com>
4384
4385 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4386 do not assume partition map is PC/MSDOS before performing checks that
4387 are specific to that layout.
4388
0de8be86 43892008-02-13 Robert Millan <rmh@aybabtu.com>
4390
4391 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4392 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4393 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4394
c3db8364 43952008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4396
4397 * configure.ac: Only a cosmetic change on the handling of
4398 -fno-stack-protector.
4399
f714229e 44002008-02-12 Alexandre Boeglin <alex@boeglin.org>
4401
c3db8364 4402 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4403 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4404 reboot.c.
f714229e 4405 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4406 (halt_mod_SOURCES): New variable.
4407 (halt_mod_CFLAGS): Likewise.
4408 (halt_mod_LDFLAGS): Likewise.
4409 (reboot_mod_SOURCES): Likewise.
4410 (reboot_mod_CFLAGS): Likewise.
4411 (reboot_mod_LDFLAGS): Likewise.
4412
c3db8364 4413 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4414 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4415 reboot.c.
f714229e 4416 (halt_mod_SOURCES): Likewise.
4417 (reboot_mod_SOURCES): Likewise.
4418
c3db8364 4419 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4420 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 4421 (reboot_mod_SOURCES): Likewise.
4422
4423 * commands/i386/pc/reboot.c: merge this file ...
4424
4425 * commands/ieee1275/reboot.c: ... and this file ...
4426
4427 * commands/reboot.c: ... to this file.
c3db8364 4428 Add some precompiler directive to include the correct header for
4429 each machine.
f714229e 4430
4431 * commands/ieee1275/halt.c: move this file ...
4432
4433 * commands/halt.c: ... to here.
c3db8364 4434 Add some precompiler directive to include the correct header for
4435 each machine.
f714229e 4436
4437 * include/grub/efi/efi.h (grub_reboot): New function declaration.
4438 (grub_halt): Likewise.
4439
4440 * kern/efi/efi.c (grub_reboot): New function.
4441 (grub_halt): Likewise.
4442
c74493e0 44432008-02-12 Robert Millan <rmh@aybabtu.com>
4444
4445 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4446 /dev (like it is done for /dev/mapper). This doesn't provide support
4447 for EVMS, but at least it is now easy to identify the problem when it
4448 arises.
4449
d0db4b04 44502008-02-11 Robert Millan <rmh@aybabtu.com>
4451
4452 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4453 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4454 comparing it with -1, not 0.
4455
bf748642 44562008-02-10 Robert Millan <rmh@aybabtu.com>
4457
4458 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4459 `disk/lvm.c'.
4460 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4461 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4462
4463 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4464 `disk/lvm.c' to the end of the list.
4465 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4466 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4467
b5db202a 44682008-02-10 Robert Millan <rmh@aybabtu.com>
4469
4470 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4471 grub_print_error() instead. This will let user know why we're entering
4472 rescue mode.
4473 Based on suggestions from Sam Morris.
4474
83abee31 44752008-02-10 Alexandre Boeglin <alex@boeglin.org>
4476
4477 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4478 on remaining N args, instead of "--" arg N times.
4479
78d5a08b 44802008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4481
4482 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4483 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4484 pattern for unknown glyphs.
4485
68807e5f 44862008-02-09 Robert Millan <rmh@aybabtu.com>
4487
4488 * configure.ac: Probe for `help2man'.
4489 * Makefile.in (builddir): New variable.
4490 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4491 or otherwise add a few flags/options to it.
4492 (install-local): For every executable utility or script that is
4493 installed, invoke $(HELP2MAN) to install a manpage based on --help
4494 output.
4495
4496 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4497 that it doesn't prevent --help from working in build tree.
4498
4499 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4500 with `bug-grub@gnu.org'.
4501 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4502 * util/update-grub.in (usage): New function.
4503 Implement proper argument check, with support for --help and --version
4504 (as well as existing -y).
4505
45062008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 4507
4508 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4509 avoid overwriting previous output.
4510 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4511
c1962162 45122008-02-09 Robert Millan <rmh@aybabtu.com>
4513
4514 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4515 drawing the menu.
4516
3dac2e3f 45172008-02-09 Robert Millan <rmh@aybabtu.com>
4518
4519 * commands/sleep.c: New file.
4520 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4521 (sleep_mod_SOURCES): New variable.
4522 (sleep_mod_CFLAGS): Likewise.
4523 (sleep_mod_LDFLAGS): Likewise.
4524
7a634e08 45252008-02-09 Robert Millan <rmh@aybabtu.com>
4526
4527 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4528 situations in which we can deduce the RAID size and the superblock
4529 doesn't match it.
4530
b92f0c18 45312008-02-09 Robert Millan <rmh@aybabtu.com>
4532
4533 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4534 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4535 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4536
4537 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4538 and return a grub_diskmemberlist_t composed of physical array members.
4539 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4540
4541 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4542 prototype.
4543 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4544 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4545 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4546
4547 * util/grub-probe.c (probe): Move partmap probing code from here ...
4548 (probe_partmap): ... to here.
4549 (probe): Use probe_partmap() once for the disk we're probing, and
4550 additionally, when such disk contains a memberlist() struct member,
4551 once for each disk that is contained in the structure returned by
4552 memberlist().
4553
91a4bf68 45542008-02-09 Robert Millan <rmh@aybabtu.com>
4555
4556 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4557 environment variable to 'all' in order to obtain debug output from
4558 non-util/ code.
4559 * util/i386/pc/grub-setup.c (main): Likewise.
4560
a96f9caa 45612008-02-08 Robert Millan <rmh@aybabtu.com>
4562
4563 * disk/raid.c (grub_raid_scan_device): Check for
4564 `array->device[sb.this_disk.number]' rather than for
4565 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 4566 guaranteed to be accessible.
a96f9caa 4567
b37a9222 45682008-02-08 Robert Millan <rmh@aybabtu.com>
4569
4570 * disk/raid.c: Update copyright.
4571 * fs/cpio.c: Likewise.
4572 * include/grub/raid.h: Likewise.
4573 * loader/i386/pc/multiboot.c: Likewise.
4574 * util/hostfs.c: Likewise.
4575
5626aee1 45762008-02-08 Robert Millan <rmh@aybabtu.com>
4577
4578 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4579 to a grub_disk_t array.
4580 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4581 `device[x]'.
4582 (grub_raid_scan_device): Replace `device[x].name' accesses with
4583 `device[x]->name'. Simplify initialization of `array->device[x]'.
4584
554f0187 45852008-02-08 Robert Millan <rmh@aybabtu.com>
4586
4587 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4588 grub_dprintf() calls.
4589 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4590 error message.
4591
1ec8425d 45922008-02-07 Christian Franke <franke@computer.org>
4593
4594 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4595 instead of fseek and ftell to support large files.
4596 (grub_hostfs_read): Likewise.
4597
f2156fda 45982008-02-07 Robert Millan <rmh@aybabtu.com>
4599
4600 Patch from Jeroen Dekkers.
4601 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 4602 failure, since successfully reading all array members might not be
f2156fda 4603 required.
4604
9216e0e7 46052008-02-06 Robert Millan <rmh@aybabtu.com>
4606
4607 * util/grub-probe.c (probe): Simplify partmap probing (with the
4608 assumption that the first word up to the underscore equals to
4609 the module name).
4610
b0dfd29a 46112008-02-06 Christian Franke <franke@computer.org>
4612
4613 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4614 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4615 last block of a cpio or tar stream.
4616 Check for "TRAILER!!!" instead of any empty data
4617 block to detect last block of a cpio stream.
4618 (grub_cpio_dir): Fix constness of variable np.
4619 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4620 cpio or tar trailer is detected. This fixes a crash
4621 on open of a non existing file.
4622
c32865bf 46232008-02-05 Bean <bean123ch@gmail.com>
4624
4625 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4626 address of entry.
4627 (grub_multiboot_load_elf64): Likewise.
4628 (grub_multiboot): Initialize mbi structure.
4629
4630 * util/grub-fstest.c: Don't include unused header file script.h.
4631
fe6b695a 4632 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 4633 of file.
4634 (grub_fstest_SOURCES): Likewise.
4635
409480b7 46362008-02-05 Robert Millan <rmh@aybabtu.com>
4637
4638 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4639 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4640 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4641 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4642
4643 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4644 (translation_table): Replace hardcoded values with macros
4645 provided by `<grub/term.h>'.
4646
4647 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4648 (keyboard_map): Correct/add a few values, with macros provided
4649 by `<grub/term.h>'.
4650 (keyboard_map_shift): Zero values that don't differ from their
4651 `keyboard_map' equivalents.
4652 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4653 Discard the second scan code that is always sent by Caps lock.
4654 Only use `keyboard_map_shift' when it provides a non-zero value,
4655 otherwise fallback to `keyboard_map'.
4656
99fadbaa 46572008-02-04 Bean <bean123ch@gmail.com>
4658
4659 * Makefile.in (enable_grub_fstest): New variable.
4660
4661 * conf/common.rmk (grub_fstest_init.lst): New rule.
4662 (grub_fstest_init.h): Likewise.
4663 (grub_fstest_init.c): Likewise.
4664 (util/grub-fstest.c_DEPENDENCIES): New variable.
4665 (grub_fstest_SOURCES): Likewise.
4666
4667 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4668
4669 * util/grub-fstest.c: New file.
4670
bf567c50 46712008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4672
4673 Make grub-setup handle a separate root device.
f19dbdb7 4674
bf567c50 4675 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4676 so that the root device can be compared with the destination
4677 device.
4678 When embedding the core image, if the root and destination devices
4679 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4680 0xFF.
4681 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 4682
9be6b98b 46832008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4684
4685 Add support for having a grub directory in a different drive. This
4686 is still only the data handling part.
f19dbdb7 4687
9be6b98b 4688 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4689 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4690 (grub_root_drive): New variable.
4691
4692 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4693 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4694 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4695 as it was.
4696
4697 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4698
4699 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4700 macro.
4701 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4702
4703 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4704 is bogus, because PXE booting does not specify any drive
4705 correctly.
4706
4707 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4708 am not sure if this is really correct.
4709
4710 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4711 is always identical to the boot drive when booting from a CD.
4712
4713 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4714 longer.
4715 (root_drive): New variable.
4716 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4717 (setup_sectors): Push %dx right after popping it, because %dh will
4718 be modified later.
4719 (copy_buffer): Restore %dx.
4720
e0ca0677 47212008-02-03 Robert Millan <rmh@aybabtu.com>
4722
4723 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4724 use `cdboot.img' for cdrom images.
4725
3b3f6629 47262008-02-03 Robert Millan <rmh@aybabtu.com>
4727
4728 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4729 only setup gfxterm when `font' command has succeeded.
4730
d42b3672 47312008-02-03 Robert Millan <rmh@aybabtu.com>
4732
4733 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4734 (grub_rescue_cmd_multiboot_loader)
4735 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4736
fa370ea6 47372008-02-03 Pavel Roskin <proski@gnu.org>
4738
e0c5dacb 4739 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 4740 %edx and %esi from stack only after grub_gate_a20() is called.
4741 grub_gate_a20() clobbers %edx.
4742
f2a76e1d 47432008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4744
4745 * configure.ac (AC_INIT): Bumped to 1.96.
4746
4747 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4748 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4749 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4750 video/readers/png.c.
4751
90fd32d1 47522008-02-03 Bean <bean123ch@gmail.com>
9be665dd 4753
4754 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4755 (cdboot_img_SOURCES): New variable.
4756 (cdboot_img_ASFLAGS): New variable.
4757 (cdboot_img_LDFLAGS): New variable.
4758
4759 * boot/i386/pc/cdboot.S: New file.
4760
4761 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4762 (cd_count): Likewise.
4763 (grub_biosdisk_get_drive): Add support for cd device.
4764 (grub_biosdisk_call_hook): Likewise.
4765 (grub_biosdisk_iterate): Likewise.
4766 (grub_biosdisk_open): Likewise.
4767 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4768 (grub_biosdisk_rw): Support reading from cd device.
4769 (GRUB_MOD_INIT): Iterate cd devices.
4770
4771 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4772 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4773 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4774
4775 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4776
4020aa53 47772008-02-02 Robert Millan <rmh@aybabtu.com>
4778
4779 * commands/read.c: New file.
4780 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4781 (read_mod_SOURCES): New variable.
4782 (read_mod_CFLAGS): Likewise.
4783 (read_mod_LDFLAGS): Likewise.
4784
e03a1132 47852008-02-02 Robert Millan <rmh@aybabtu.com>
4786
4787 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4788 determining whether menu has to be displayed.
4789
58c69220 47902008-02-02 Marco Gerards <marco@gnu.org>
4791
4792 * bus/pci.c: New file.
4793
4794 * include/grub/pci.h: Likewise.
4795
4796 * include/grub/i386/pc/pci.h: Likewise.
4797
4798 * commands/lspci.c: Likewise.
4799
4800 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4801 `lspci.mod'.
4802 (pci_mod_SOURCES): New variable.
4803 (pci_mod_CFLAGS): Likewise.
4804 (pci_mod_LDFLAGS): Likewise.
4805 (lspci_mod_SOURCES): Likewise.
4806 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 4807 (lspci_mod_LDFLAGS): Likewise.
58c69220 4808
c004e1b4 48092008-02-02 Bean <bean123ch@gmail.com>
4810
4811 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4812 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4813
4814 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4815 (grub_xfs_btree_node): New structure.
4816 (grub_xfs_btree_root): New structure.
4817 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4818 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4819 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4820 (GRUB_XFS_EXTENT_SIZE): Likewise.
4821 (grub_xfs_read_block): Support btree format type.
4822 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4823 Use directory block as basic unit.
4824
4825 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4826
4827 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4828 __attribute__ ((__regparm__ (1))).
4829
f95562bf 48302008-02-01 Robert Millan <rmh@aybabtu.com>
4831
4832 Correct a mistake in previous commit.
4833
4834 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4835 top.
4836 (normal/command.c_DEPENDENCIES): New variable.
4837
7d31f41f 48382008-02-01 Robert Millan <rmh@aybabtu.com>
4839
4840 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4841 top.
4842 (normal/command.c_DEPENDENCIES): New variable.
4843 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4844 * conf/i386-ieee1275.rmk: Likewise.
4845 * conf/i386-linuxbios.rmk: Likewise.
4846 * conf/i386-pc.rmk: Likewise.
4847 * conf/sparc64-ieee1275.rmk: Likewise.
4848 * conf/powerpc-ieee1275.rmk: Likewise.
4849 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4850
4851 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4852
60b6be74 48532008-02-01 Robert Millan <rmh@aybabtu.com>
4854
4855 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4856 call at beginning of function.
4857
078522ab 48582008-01-31 Pavel Roskin <proski@gnu.org>
4859
4860 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 4861 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4862 (grub_mkrescue_SOURCES): Likewise.
078522ab 4863 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4864
ccaa8a5f 48652008-01-30 Robert Millan <rmh@aybabtu.com>
4866
4867 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4868 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4869 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4870 (grub_probe_SOURCES): ... to here.
4871
4872 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4873 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4874 * conf/i386-ieee1275.rmk: Likewise.
4875 * conf/i386-linuxbios.rmk: Likewise.
4876 * conf/powerpc-ieee1275.rmk: Likewise.
4877
ae5a9cd7 48782008-01-30 Tristan Gingold <gingold@free.fr>
4879
4880 * kern/rescue.c: Silently accept empty lines.
4881
70bc2ef2 48822008-01-29 Bean <bean123ch@gmail.com>
4883
4884 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4885 (real_code_2): Code cleanup and change comment style.
4886 (move_memory): Avoid using 32-bit address mode.
4887
6a4d50ea 48882008-01-29 Bean <bean123ch@gmail.com>
4889
4890 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4891 (png_mod_SOURCES): New variable.
4892 (png_mod_CFLAGS): Likewise.
4893 (png_mod_LDFLAGS): Likewise.
4894
4895 * video/readers/png.c: New file.
4896
11cc30ac 48972008-01-28 Robert Millan <rmh@aybabtu.com>
4898
4899 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4900 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4901 `ifndef GRUB_MOD_GAP' hack.
4902 * util/elf/grub-mkimage.c (add_segments): Likewise.
4903
3abc589f 49042008-01-27 Robert Millan <rmh@aybabtu.com>
4905
4906 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4907 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 4908 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 4909
e1907778 49102008-01-27 Robert Millan <rmh@aybabtu.com>
4911
4912 Get grub-emu to build again (including parallel builds).
4913
4914 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4915 Split into ...
4916 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4917 (normal/execute.c_DEPENDENCIES): ... this, ...
4918 (grub-emu_DEPENDENCIES): ... and this.
4919
4920 * conf/i386-efi.rmk: Likewise.
4921 * conf/i386-linuxbios.rmk: Likewise.
4922 * conf/i386-ieee1275.rmk: Likewise.
4923 * conf/powerpc-ieee1275.rmk: Likewise.
4924 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4925
2216b101 49262008-01-27 Robert Millan <rmh@aybabtu.com>
4927
4928 * NEWS: Add a few items.
4929
f75172d9 49302008-01-27 Robert Millan <rmh@aybabtu.com>
4931
4932 Fix parallel builds with grub-emu. Based on earlier commit for
4933 grub-probe and grub-setup.
4934
4935 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4936 (util/grub-emu.c_DEPENDENCIES): ... this.
4937 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4938 (util/grub-emu.c_DEPENDENCIES): ... this.
4939 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4940 (util/grub-emu.c_DEPENDENCIES): ... this.
4941 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4942 (util/grub-emu.c_DEPENDENCIES): ... this.
4943 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4944 (util/grub-emu.c_DEPENDENCIES): ... this.
4945
3f51de77 49462008-01-27 Pavel Roskin <proski@gnu.org>
4947
4948 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4949 to create a gap between _end and the modules added to the image
4950 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4951 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4952 * util/elf/grub-mkimage.c (add_segments): Likewise.
4953
2033f53e 49542008-01-26 Pavel Roskin <proski@gnu.org>
4955
4956 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4957 just return an error.
4958
22da1f6f 49592008-01-26 Bean <bean123ch@gmail.com>
4960
4961 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4962 (grub_reiserfs_get_item): Save offset of the next item.
4963 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4964
2a9525e6 49652008-01-25 Robert Millan <rmh@aybabtu.com>
4966
4967 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4968 make all filesystem sources appear together (possibly fixing omissions
4969 while at it).
4970 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4971 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4972 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4973 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4974
4975 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4976 add `kern/file.c'.
4977 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4978 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4979 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4980 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4981
4982 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4983 (probe): Add a sanity check to make sure of our ability to read
4984 requested files when probing for filesystem type.
4985
4986 * genmk.rb: Update copyright year (2007).
4987
4988 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4989 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4990 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4991 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4992 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4993 : Remove function prototypes.
4994
b95f71b5 49952008-01-25 Robert Millan <rmh@aybabtu.com>
4996
4997 Revert my previous commits (based on wrong assumption of how grub_errno
4998 works).
4999
fe6b695a 5000 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 5001 * kern/file.c (grub_file_open): Likewise.
5002
d08bbb49 50032008-01-24 Pavel Roskin <proski@gnu.org>
5004
5005 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5006 that hang if GRUB tries to setup colors.
5007 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5008 colors for firmwares that don't support it.
5009 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5010 Recognize Open Hack'Ware, set flags to work around its
5011 limitations.
5012
605e36ed 50132008-01-24 Robert Millan <rmh@aybabtu.com>
5014
5015 * kern/file.c (grub_file_open): Do not account previous failures of
5016 unrelated functions when grub_errno is checked for.
5017 Reported by Oleg Strikov.
5018
bac332a1 50192008-01-24 Bean <bean123ch@gmail.com>
5020
5021 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5022 (grub_ufs_sblock): New member volume name.
5023 (grub_ufs_find_file): Fix string copy bug.
5024 (grub_ufs_label): Implement this function properly.
5025
5026 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5027 (grub_hfs_iterate_records): Use the correct file number for extents
5028 and catalog file. Fix problem in next index calculation.
5029 (grub_hfs_find_node): Replace recursive function call with loop.
5030 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5031
15c80c09 50322008-01-23 Robert Millan <rmh@aybabtu.com>
5033
5034 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5035 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5036 (grub_multiboot2_real_boot): New function prototype.
5037
5038 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5039 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5040
5041 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5042 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5043
305338fd 50442008-01-23 Robert Millan <rmh@aybabtu.com>
5045
5046 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5047 #ifdef'ed out grub_printf().
5048
3ea52685 50492008-01-23 Robert Millan <rmh@aybabtu.com>
5050
5051 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5052 grub_dprintf calls, since they make "debug=all" mode unusable.
5053 (grub_console_checkkey): Likewise.
5054
5882ae4b 50552008-01-23 Robert Millan <rmh@aybabtu.com>
5056
5057 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5058 `term/i386/pc/at_keyboard.c'.
5059 (pkglib_MODULES): Add `serial.mod'.
5060 (serial_mod_SOURCES): New variable.
5061 (serial_mod_CFLAGS): Likewise.
5062 (serial_mod_LDFLAGS): Likewise.
5063
5064 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5065 `<grub/powerpc/ieee1275/console.h>'.
5066 (grub_keyboard_controller_init): New function prototype.
5067 (grub_console_checkkey): Likewise.
5068 (grub_console_getkey): Likewise.
5069
5070 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5071 keyboard on i386.
5072
5073 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5074 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5075
06ab5303 50762008-01-23 Robert Millan <rmh@aybabtu.com>
5077
5078 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5079 present, "(memdisk)/boot/grub" becomes the default prefix.
5080
5081 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5082 a memdisk tarball with all the modules. Add --overlay=DIR option that
5083 allows users to overlay additional files into the image.
5084
dbb475a4 50852008-01-23 Robert Millan <rmh@aybabtu.com>
5086
5087 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5088 and `machine/memory.h'.
5089 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5090 (_multiboot_mod_SOURCES): New variable.
5091 (_multiboot_mod_CFLAGS): Likewise.
5092 (_multiboot_mod_LDFLAGS): Likewise.
5093 (multiboot_mod_SOURCES): Likewise.
5094 (multiboot_mod_CFLAGS): Likewise.
5095 (multiboot_mod_LDFLAGS): Likewise.
5096
5097 * include/grub/i386/ieee1275/loader.h: New file.
5098
5099 * include/grub/i386/ieee1275/machine.h: Likewise.
5100
5101 * include/grub/i386/ieee1275/memory.h: Likewise.
5102
5103 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5104 variable declaration.
5105 (grub_os_area_size): Likewise.
5106
5107 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5108 (grub_lower_mem, grub_upper_mem): New variables.
5109 (grub_stop_floppy): New function (just to make
5110 grub_multiboot2_real_boot() happy).
5111
5112 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5113 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5114 (grub_stop): New function.
5115 Include `"../realmode.S"' and `"../loader.S"'.
5116
5117 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5118 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5119
5120 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5121 rely on grub_multiboot2_real_boot() for final boot.
5122
25638629 51232008-01-22 Robert Millan <rmh@aybabtu.com>
5124
5125 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5126 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5127 device that doesn't look like an SD card.
5128 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5129 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5130 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5131 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5132 found.
5133
9dad816d 51342008-01-22 Robert Millan <rmh@aybabtu.com>
5135
5136 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5137 avoid claiming over our own code.
5138
34842f2d 51392008-01-22 Bean <bean123ch@gmail.com>
5140
5141 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5142 (jpeg_mod_SOURCES): New variable.
5143 (jpeg_mod_CFLAGS): Likewise.
5144 (jpeg_mod_LDFLAGS): Likewise.
5145
5146 * video/readers/jpeg.c : New file.
5147
44023a28 51482008-01-22 Bean <bean123ch@gmail.com>
5149
5150 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5151 there are no more items.
5152
bc2d8ac6 51532008-01-21 Robert Millan <rmh@aybabtu.com>
5154
5155 * kern/mm.c (grub_mm_init_region): Improve debug message.
5156
261bd4bc 51572008-01-21 Robert Millan <rmh@aybabtu.com>
5158
5159 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5160 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5161 address.
5162 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5163 a C macro.
5164 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5165 Indicates start of upper memory.
5166 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5167 (generate_image): Abort when image size is big enough to corrupt
5168 upper memory.
5169
5170 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5171 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5172 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5173 instead of hardcoding 0xA0000.
5174 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5175 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5176 instead of hardcoding 0xA0000.
5177
f970b55e 51782008-01-21 Robert Millan <rmh@aybabtu.com>
5179
5180 * disk/memdisk.c (memdisk_size): New variable.
5181 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5182 `memdisk_size'.
5183 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5184 image to dynamic memory.
5185 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5186 `memdisk_size'. Free memdisk block.
5187
1a8b0526 51882008-01-21 Robert Millan <rmh@aybabtu.com>
5189
5190 Fix detection of very small filesystems (like tar).
5191
5192 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5193 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5194 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5195 a problem with this disk).
5196
6e9b4aab 51972008-01-21 Robert Millan <rmh@aybabtu.com>
5198
5199 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5200 on grub_biosdisk_rw_standard() error.
5201
0d8837b2 52022008-01-21 Robert Millan <rmh@aybabtu.com>
5203
5204 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5205 recent changes.
5206 * kern/elf.c: Likewise.
5207 * kern/ieee1275/ieee1275.c: Likewise.
5208 * kern/powerpc/ieee1275/openfw.c: Likewise.
5209 * term/ieee1275/ofconsole.c: Likewise.
5210
ffd36e34 52112008-01-21 Robert Millan <rmh@aybabtu.com>
5212
5213 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5214
3f0093d0 5215 * include/grub/kernel.h (grub_arch_memdisk_addr)
5216 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 5217
3f0093d0 5218 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5219 (grub_arch_memdisk_size): ... to here.
ffd36e34 5220
6c391b21 52212008-01-21 Robert Millan <rmh@aybabtu.com>
5222
5223 Mostly based on bugfix from Bean.
5224
5225 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5226 attribute with hook() parameter.
5227 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5228 declaration.
5229 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5230 attribute with hook() parameter.
5231 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5232 declaration.
5233
55a581dc 52342008-01-21 Robert Millan <rmh@aybabtu.com>
5235
5236 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5237 (pkglib_MODULES): Add `memdisk.mod'.
5238 (memdisk_mod_SOURCES): New variable.
5239 (memdisk_mod_CFLAGS): Likewise.
5240 (memdisk_mod_LDFLAGS): Likewise.
5241
5242 * disk/memdisk.c: New file.
5243
5244 * include/grub/disk.h (grub_disk_dev_id): Add
5245 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5246
5247 * include/grub/i386/pc/kernel.h
5248 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5249 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5250 (grub_kernel_image_size): New variable declaration.
5251 (grub_total_module_size): Likewise.
5252 (grub_memdisk_image_size): Likewise.
5253
5254 * include/grub/i386/pc/memory.h
5255 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5256
5257 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5258 (grub_arch_memdisk_addr): New variable declaration.
5259 (grub_arch_memdisk_size): Likewise.
5260
5261 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5262 (grub_arch_memdisk_size): Likewise.
5263
5264 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5265 (codestart): Replace hardcoded `0x100000' with
5266 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5267
5268 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5269 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5270 not NULL, append the contents of the file it refers to, at the end of
5271 the compressed kernel image. Initialize `grub_memdisk_image_size'
5272 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5273 (options): Add "memdisk"|'m' option.
5274 (main): Parse --memdisk|-m option, and pass user-provided path as
5275 parameter to generate_image().
5276
3d7f54c9 52772008-01-20 Robert Millan <rmh@aybabtu.com>
5278
5279 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5280 grub_dprintf() calls from here ...
5281 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5282
0bf74728 52832008-01-20 Robert Millan <rmh@aybabtu.com>
5284
5285 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5286
5287 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5288 declaration.
5289 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5290 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5291 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 5292 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 5293 property).
5294 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5295 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5296
33bf70a7 52972008-01-19 Robert Millan <rmh@aybabtu.com>
5298
fe6b695a 5299 Get rid of confusing function (superseded by
33bf70a7 5300 `grub_ieee1275_get_integer_property')
5301 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5302 prototype.
5303 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5304 function.
5305 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5306 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 5307 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 5308
e2da7d26 53092008-01-19 Robert Millan <rmh@aybabtu.com>
5310
5311 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5312 command after "shut-down", since implementations differ on which
5313 the command for halt is.
5314
59f1fd8d 53152008-01-19 Robert Millan <rmh@aybabtu.com>
5316
5317 * include/grub/i386/linuxbios/console.h: Add header protection.
5318 (grub_keyboard_controller_init): New function prototype.
5319 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5320 (KEYBOARD_COMMAND_READ): Likewise.
5321 (KEYBOARD_COMMAND_WRITE): Likewise.
5322 (KEYBOARD_SCANCODE_SET1): Likewise.
5323 (grub_keyboard_controller_write): New function.
5324 (grub_keyboard_controller_read): Likewise.
5325 (grub_keyboard_controller_init): Likewise.
5326
5327 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5328 (grub_console_init): On coreboot/LinuxBIOS, call
5329 grub_keyboard_controller_init().
5330
5f5a7c15 53312008-01-19 Robert Millan <rmh@aybabtu.com>
5332
5333 PowerPC changes provided by Pavel Roskin.
5334
5335 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5336 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5337 don't rely on cmain() doing it.
5338 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5339 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5340
1210e168 53412008-01-16 Robert Millan <rmh@aybabtu.com>
5342
5343 * include/grub/i386/linuxbios/memory.h
5344 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5345 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5346 receive `table_header' as argument. Instead, probe for it in the
5347 known memory ranges where it can be present.
5348 (grub_available_iterate): Do not pass a fixed `table_header' address
5349 to grub_linuxbios_table_iterate().
5350
3d04eab8 53512008-01-15 Robert Millan <rmh@aybabtu.com>
5352
5353 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5354 * conf/i386-ieee1275.rmk: New file.
5355 * include/grub/i386/ieee1275/console.h: Likewise.
5356 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5357 * include/grub/i386/ieee1275/kernel.h: Likewise.
5358 * include/grub/i386/ieee1275/time.h: Likewise.
5359 * kern/i386/ieee1275/init.c: Likewise.
5360 * kern/i386/ieee1275/startup.S: Likewise.
5361
d1bc1b73 53622008-01-15 Robert Millan <rmh@aybabtu.com>
5363
5364 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5365 when pointers are 32-bit (but still do set it to one when they are
5366 64-bit).
5367
66a65807 53682008-01-15 Robert Millan <rmh@aybabtu.com>
5369
5370 * include/grub/ieee1275/ieee1275.h
5371 (grub_ieee1275_get_integer_property): New function prototype.
5372
5373 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5374 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 5375 grub_ieee1275_get_property() to handle endianness.
66a65807 5376
5377 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5378 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 5379 where appropriate.
66a65807 5380 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5381 (grub_map): Likewise.
5382 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5383
a83ccafd 53842008-01-15 Bean <bean123ch@gmail.com>
5385
5386 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5387 (grub_script_execute_cmdline): Reset grub_errno.
5388
5389 * normal/main.c (read_config_file): Reset grub_errno.
5390
5391 * normal/parse.y (script_init): New.
5392 (script): Move function and menuentry here.
5393 (delimiter): New.
5394 (command): Add delimiter at the end of command.
5395 (commands): Adjust to match the new command.
5396 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 5397 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 5398 (if): Use the new commands.
5399
5400 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5401
df6ecfc6 54022008-01-15 Robert Millan <rmh@aybabtu.com>
5403
5404 * normal/menu.c (run_menu): Move timeout message from here ...
5405 (print_timeout): ... to here.
5406 (run_menu): Use print_timeout() once during initial draw to print
5407 the whole message, and again in every clock tick to update only
5408 the number of seconds.
5409
87ae25eb 54102008-01-15 Robert Millan <rmh@aybabtu.com>
5411
5412 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5413 actual size of `available' from grub_ieee1275_get_property(), and
5414 restrict parsing to that bound.
5415
47bf09a4 54162008-01-15 Christian Franke <franke@computer.org>
5417
5418 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5419 (argp_program_version): Remove variable.
5420 (argp_program_bug_address): Likewise.
5421 (options): Convert from struct argp_option to struct option.
5422 (struct arguments): Remove.
5423 (parse_opt): Remove.
5424 (usage): New function.
5425 (main): Replace struct args members by simple variables.
5426 Replace argp_parse() by getopt_long().
5427 Add switch to evaluate options.
5428 Add missing "(...)" around root_dev in prefix string.
5429
c86f1469 54302008-01-14 Robert Millan <rmh@aybabtu.com>
5431
5432 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
5433 for grub_ieee1275_exit(), in order to improve portability.
5434
e622c559 54352008-01-14 Robert Millan <rmh@aybabtu.com>
5436
5437 * util/grub.d/10_linux.in (prefix): Define.
5438 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
5439
44cb1ec8 54402008-01-13 Pavel Roskin <proski@gnu.org>
5441
5442 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5443 grub_errno if no errors have been detected.
5444
1eb8c802 54452008-01-12 Robert Millan <rmh@aybabtu.com>
5446
5447 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5448 (grub_util_get_dev_abstraction): New function prototype.
5449
5450 * util/getroot.c: Include `<grub/util/getroot.h>'
5451 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5452 (grub_util_get_dev_abstraction): ... here (new function).
5453
5454 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5455 `PRINT_ABSTRACTION'.
5456 (probe): Probe for abstraction type when requested.
5457 (main): Understand `--target=abstraction'.
5458
5459 * util/i386/efi/grub-install.in: Add abstraction module to core
5460 image when it is found to be necessary.
5461 * util/i386/pc/grub-install.in: Likewise.
5462 * util/powerpc/ieee1275/grub-install.in: Likewise.
5463
5464 * util/update-grub_lib.in (font_path): Return system path without
5465 converting to GRUB path.
5466 * util/update-grub.in: Convert system path returned by font_path()
5467 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5468 abstraction module is needed for loading fonts (if any). Export
5469 that as `GRUB_PRELOAD_MODULES'.
5470 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5471 insmod commands).
5472
52bd3de9 54732008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5474
5475 Remove some unused code from reiserfs.
f19dbdb7 5476
52bd3de9 5477 * fs/reiserfs.c (struct grub_reiserfs_key)
5478 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5479 (struct grub_reiserfs_node_body): Removed.
5480 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5481 Likewise.
5482 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5483 Likewise.
5484 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5485 Likewise.
5486 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5487 Likewise.
5488 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5489 Likewise.
5490 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5491 Likewise.
5492 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5493 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5494 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5495
2f80039d 54962008-01-10 Robert Millan <rmh@aybabtu.com>
5497
5498 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5499 Determines if a file is garbage left by packaging systems, etc.
5500 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5501 for processing /etc/grub.d scripts.
5502 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5503 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5504 as a condition for processing Linux images.
5505
87888032 55062008-01-10 Pavel Roskin <proski@gnu.org>
5507
5508 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5509 to compile reiserfs.c on PowerPC.
5510
7e54fced 55112008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 5512
5513 * kern/device.c (grub_device_iterate): Do not abort device iteration
5514 when one of the devices cannot be opened.
5515 * kern/disk.c (grub_disk_open): Do not account previous failures of
5516 unrelated functions when grub_errno is checked for.
5517
5aa541e6 55182008-01-08 Robert Millan <rmh@aybabtu.com>
5519
5520 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5521 `! grub_linux_is_bzimage', change order of address comparison to make
5522 it more intuitive, and improve "too big zImage" error message.
5523
7076340d 55242008-01-08 Robert Millan <rmh@aybabtu.com>
5525
5526 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5527 `$(update-grub_DATA)'.
5528 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5529 targets.
5530
9ca70333 55312008-01-07 Robert Millan <rmh@aybabtu.com>
5532
5533 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5534 which instruction is modified by grub-setup during installation
5535 (since it wasn't obvious by only looking at this file).
5536
38ccf575 55372008-01-07 Robert Millan <rmh@aybabtu.com>
5538
5539 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5540 listing actual TODO items.
5541
f5db4291 55422008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5543
868967cf 5544 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5545 correctly.
5546 (grub_reiserfs_get_key_offset): Likewise.
5547 (grub_reiserfs_set_key_offset): Likewise.
5548 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 5549 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 5550
5551 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5552 better to remove the bitfield version completely.
f19dbdb7 5553
868967cf 55542008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 5555
f5db4291 5556 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5557 allocated from the heap, due to the fshelp implementation.
5558 (grub_reiserfs_dir): Free NODE, due to the same reason.
5559
492e6d9d 55602008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5561
5562 Mostly from Vincent Pelletier:
f19dbdb7 5563
492e6d9d 5564 * fs/reiserfs.c: New file.
f19dbdb7 5565
492e6d9d 5566 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5567 (reiserfs_mod_SOURCES): New variable.
5568 (reiserfs_mod_CFLAGS): Likewise.
5569 (reiserfs_mod_LDFLAGS): Likewise.
5570
5571 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5572 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5573 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5574 normal/color.c.
5575
9ce3e7c1 55762008-01-06 Robert Millan <rmh@aybabtu.com>
5577
5578 * normal/color.c: Remove `<grub/env.h>'.
5579
f3b58148 55802008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5581
5582 * include/grub/normal.h: Include <grub/env.h>.
5583
7ac3bcfa 55842008-01-05 Robert Millan <rmh@aybabtu.com>
5585
5586 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5587 usage example with `(hd0,1)'.
fb358190 5588 Reported by Samuel Thibault.
7ac3bcfa 5589
c8ee99d7 55902008-01-05 Robert Millan <rmh@aybabtu.com>
5591
5592 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5593 (grub_linux_boot_zimage): Rename to ...
5594 (grub_linux_boot): ... this.
5595 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5596 (grub_linux_boot_zimage): Conditionalize zImage copy.
5597
5598 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5599 (grub_linux_boot_bzimage): Remove prototype.
5600 (grub_linux_boot_zimage): Rename to ...
5601 (grub_linux_boot): ... this.
5602
5603 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5604 (grub_linux_boot): Remove function.
5605
0ece25b1 56062008-01-05 Robert Millan <rmh@aybabtu.com>
5607
5608 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5609 (grub_env_write_color_highlight): Likewise.
5610 (grub_wait_after_message): Likewise.
5611
5612 * normal/color.c: New file.
5613
5614 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5615 (normal_mod_DEPENDENCIES): Likewise.
5616
5617 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5618 (normal_mod_DEPENDENCIES): Likewise.
5619
5620 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5621 (normal_mod_DEPENDENCIES): Likewise.
5622
5623 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5624 (normal_mod_DEPENDENCIES): Likewise.
5625
5626 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5627 for waiting after a message is printed.
5628 * normal/main.c (read_config_file): Likewise.
5629 (grub_normal_init): Register grub_env_write_color_normal() and
5630 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5631 `color_highlight' variables as global.
5632
5633 * normal/menu.c (grub_wait_after_message): New function.
5634 (grub_color_menu_normal): New variable. Replaces ...
5635 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5636 (grub_color_menu_highlight): New variable. Replaces ...
5637 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5638 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5639 `GRUB_TERM_COLOR_STANDARD'.
5640 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5641 `normal_code' and `highlight_code' to `old_color_normal' and
5642 `old_color_highlight', respectively.
5643 (grub_menu_init_page): Update colors when drawing the menu, based on
5644 `menu_color_normal' and `menu_color_highlight' variables.
5645 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5646 a message is printed.
5647
182dd4e5 56482008-01-05 Robert Millan <rmh@aybabtu.com>
5649
5650 * kern/env.c (grub_env_context_open): Propagate hooks for global
5651 variables to new context.
5652
5653 * kern/main.c (grub_set_root_dev): Export `root' variable.
5654
ddf8f6ad 56552008-01-05 Robert Millan <rmh@aybabtu.com>
5656
5657 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 5658 discs unconditionally, since udev and others have options to provide
ddf8f6ad 5659 them.
5660
d8b43d9b 56612008-01-05 Robert Millan <rmh@aybabtu.com>
5662
5663 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5664
2bff2de3 56652008-01-04 Christian Franke <franke@computer.org>
5666
5667 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5668 of eisa_mmap.
5669
97eab917 56702008-01-03 Pavel Roskin <proski@gnu.org>
5671
5672 * kern/i386/linuxbios/init.c: Put "void" to all function
5673 declarations with no arguments.
5674 * kern/powerpc/ieee1275/init.c: Likewise.
5675 * term/i386/pc/at_keyboard.c: Likewise.
5676 * term/i386/pc/vga_text.c: Likewise.
5677 * util/grub-mkdevicemap.c: Likewise.
5678
b9416d00 56792008-01-02 Robert Millan <rmh@aybabtu.com>
5680
5681 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5682 message when loaded image is out of bounds.
5683 (grub_multiboot_load_elf64): Likewise.
5684
92695df9 56852008-01-02 Pavel Roskin <proski@gnu.org>
5686
5687 * util/grub.d/10_linux.in: Try version without ".old" when
5688 looking for initrd. It's better to use initrd from the newer
5689 kernel of the same version than no initrd at all.
5690
d98d9cad 56912008-01-01 Robert Millan <rmh@aybabtu.com>
5692
5693 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5694
dbfdce36 56952008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5696
f19dbdb7 5697 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 5698 grub_video_get_active_render_target.
5699 (grub_video_adapter): Added unmap_color and get_active_render_target.
5700
f19dbdb7 5701 * video/video.c: Added grub_video_unmap_color and
dbfdce36 5702 grub_video_get_active_render_target.
5703 (grub_video_get_info): Changed method to accept NULL pointer as an
5704 argument to allow detection of active video adapter.
5705
5706 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5707 grub_video_vbe_unmap_color_int.
5708 Added grub_video_vbe_unmap_color and
5709 grub_video_vbe_get_active_render_target.
5710 (grub_video_vbe_adapter): Added unmap_color and
5711 get_active_render_target.
5712
f19dbdb7 5713 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 5714 with grub_video_vbe_unmap_color_int.
5715
5716 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5717 (DEFAULT_NORMAL_COLOR): Likewise.
5718 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5719 (DEFAULT_FG_COLOR): Removed.
5720 (DEFAULT_BG_COLOR): Likewise.
5721 (DEFAULT_CURSOR_COLOR): Changed value.
5722 (grub_virtual_screen): Added standard_color_setting,
5723 normal_color_setting, highlight_color_setting and term_color.
5724 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5725 (bitmap_width): Added.
5726 (bitmap_height): Likewise.
5727 (bitmap): Likewise.
5728 (set_term_color): Likewise.
5729 (grub_virtual_screen_setup): Changed to use new terminal coloring
5730 settings.
5731 (grub_gfxterm_init): Added init for bitmap.
5732 (grub_gfxterm_fini): Added destroy for bitmap.
5733 (redraw_screen_rect): Updated to use background bitmap and new
5734 terminal coloring.
5735 (scroll_up): Added optimization for case when there is no bitmap.
5736 (grub_gfxterm_cls): Fixed to use correct background color.
5737 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5738 coloring.
5739 (grub_virtual_screen_setcolor): Likewise.
5740 (grub_virtual_screen_getcolor): Added.
5741 (grub_gfxterm_background_image_cmd): Likewise.
5742 (grub_video_term): Added setcolor and getcolor.
5743 (MOD_INIT): Added registration of background_image command.
5744 (MOD_TERM): Added unregistration for background_image command.
5745
c3c20931 57462007-12-30 Pavel Roskin <proski@gnu.org>
5747
5748 * loader/multiboot_loader.c: Fix multiboot command
5749 unregistration. Fix all typos in the word "multiboot".
5750
df266716 57512007-12-29 Pavel Roskin <proski@gnu.org>
94239199 5752
5753 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5754 support for initrd names used in Fedora.
5755
fc6e896c 57562007-12-26 Bean <bean123ch@gmail.com>
5757
5758 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5759 (cpio_mod_SOURCES): New variable.
5760 (cpio_mod_CFLAGS): Likewise.
5761 (cpio_mod_LDFLAGS): Likewise.
5762
5763 * fs/cpio.c: New file.
5764
5765 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5766
5767 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5768
5769 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5770
5771 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5772
533110ad 57732007-12-25 Robert Millan <rmh@aybabtu.com>
5774
5775 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5776 (grub_getcolor): New function.
5777
5778 * kern/term.c (grub_getcolor): New function.
5779 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5780 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5781 (print_entry): Set normal and highlight colors to
5782 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5783 respectively, before printing and restore them to old
5784 values afterwards.
5785 (grub_menu_init_page): Likewise. Fill an additional colored space
5786 that would otherwise be left blank.
5787
5788 * term/efi/console.c (grub_console_getcolor): New function.
5789 (struct grub_console_term.getcolor): New variable.
5790 * term/i386/pc/console.c (grub_console_getcolor): New function.
5791 (struct grub_console_term.getcolor): New variable.
5792 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5793 (struct grub_console_term.getcolor): New variable.
5794
5795 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5796 (struct grub_console_term.setcolor): Remove variable.
5797 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5798 (struct grub_console_term.setcolor): Remove variable.
5799 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5800 (struct grub_console_term.setcolor): Remove variable.
5801 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5802 (struct grub_console_term.setcolor): Remove variable.
5803
4931827f 58042007-12-25 Robert Millan <rmh@aybabtu.com>
5805
5806 * configure.ac: Search for possible unifont.hex locations, and
5807 define UNIFONT_HEX if found.
5808
5809 * Makefile.in (UNIFONT_HEX): Define variable.
5810 (DATA): Rename to ...
5811 (PKGLIB): ... this. Update all users.
5812 (PKGDATA): New variable.
5813 (pkgdata_IMAGES): Rename to ...
5814 (pkglib_IMAGES): ... this. Update all users.
5815 (pkgdata_MODULES): Rename to ...
5816 (pkglib_MODULES): ... this. Update all users.
5817 (pkgdata_PROGRAMS): Rename to ...
5818 (pkglib_PROGRAMS): ... this. Update all users.
5819 (pkgdata_DATA): Rename to ...
5820 (pkglib_DATA): ... this. Update all users.
5821 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5822 (unicode.pff, ascii.pff): New rules.
5823 (all-local): Add `$(PKGDATA)' dependency.
5824 (install-local): Process `$(PKGDATA)'.
5825
5826 * util/update-grub_lib.in (font_path): Search for *.pff files in
5827 a few more locations, including `${pkgdata}'.
5828
57e57e31 58292007-12-23 Robert Millan <rmh@aybabtu.com>
5830
5831 Patch from Bean <bean123ch@gmail.com>:
5832 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5833 `size'.
5834
4bc72aa9 58352007-12-21 Bean <bean123ch@gmail.com>
5836
5837 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5838 (ntfscomp_mod_SOURCES): New variable.
5839 (ntfscomp_mod_CFLAGS): Likewise.
5840 (ntfscomp_mod_LDFLAGS): Likewise.
5841
5842 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5843 (grub_probe_SOURCES): Likewise.
5844 (grub_emu_SOURCES): Likewise.
5845
5846 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5847 (grub_emu_SOURCES): Likewise.
5848
5849 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5850 (grub_emu_SOURCES): Likewise.
5851
5852 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5853 (grub_emu_SOURCES): Likewise.
5854
5855 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5856 (read_run_list): Renamed to grub_ntfs_read_run_list.
5857 (decomp_nextvcn): Moved to ntfscomp.c.
5858 (decomp_getch): Likewise.
5859 (decomp_get16): Likewise.
5860 (decomp_block): Likewise.
5861 (read_block): Likewise.
5862 (read_data): Partially moved to ntfscomp.c.
5863 (fixup): Change unsigned to grub_uint16_t.
5864 (read_mft): Change unsigned long to grub_uint32_t.
5865 (read_attr): Likewise.
5866 (read_data): Likewise.
5867 (read_run_data): Likewise.
5868 (read_run_list): Likewise.
5869 (read_mft): Likewise.
5870
5871 * fs/ntfscomp.c: New file.
5872
5873 * include/grub/ntfs.h: New file.
5874
af680a87 58752007-12-16 Robert Millan <rmh@aybabtu.com>
5876
5877 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5878 IDE disk check, since Linux is known to support 20 IDE disks.
5879 Reported by Colin Watson.
5880
84be7599 58812007-12-15 Bean <bean123ch@gmail.com>
5882
5883 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5884 (lnxboot_img_SOURCES): New variable.
5885 (lnxboot_img_ASFLAGS): Likewise.
5886 (lnxboot_img_LDFLAGS): Likewise.
5887
5888 * boot/i386/pc/lnxboot.S: New file.
5889
6af9db01 58902007-11-24 Pavel Roskin <proski@gnu.org>
5891
5892 * configure.ac: Test if '--build-id=none' is supported by the
5893 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5894 objcopy to generate incorrect binary files (binutils
5895 2.17.50.0.18-1 as shipped by Fedora 8).
5896 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5897 linking, so that build ID doesn't break the test.
5898
7361cfe6 58992007-11-24 Pavel Roskin <proski@gnu.org>
5900
5901 * include/grub/i386/time.h: use "void" in the argument list
5902 of grub_cpu_idle().
5903 * include/grub/powerpc/time.h: Likewise.
5904 * include/grub/sparc64/time.h: Likewise.
5905
1593e10c 59062007-11-18 Christian Franke <franke@computer.org>
5907
5908 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5909 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5910 This fixes the problem that function keys did not work in grub-emu.
5911
3b8db1a8 59122007-11-18 Christian Franke <franke@computer.org>
5913
5914 * disk/host.c (grub_host_open): Remove attribute unused from
5915 name parameter. Add check for "host". This fixes the problem
5916 that grub-emu does not find partitions.
5917
2e29408d 59182007-11-18 Christian Franke <franke@computer.org>
5919
5920 * util/hostfs.c (is_dir): New function.
5921 (grub_hostfs_dir): Handle missing dirent.d_type case.
5922 (grub_hostfs_read): Add missing fseek().
5923 (grub_hostfs_label): Clear label pointer. This fixes a crash
5924 of grub-emu on "ls (host)".
5925
398cd047 59262007-11-18 Christian Franke <franke@computer.org>
5927
5928 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5929 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5930 to 64 bit boundary by default.
5931
c405c391 59322007-11-18 Bean <bean123ch@gmail.com>
5933
5934 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5935 (hexdump_mod_SOURCES): New variable.
5936 (hexdump_mod_CFLAGS): Likewise.
5937 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 5938
c405c391 5939 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5940
5941 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5942
5943 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5944
5945 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5946
5947 * include/grub/hexdump.h: New file.
5948
5949 * commands/hexdump.c: New file.
5950
5cced7fd 59512007-11-10 Robert Millan <rmh@aybabtu.com>
5952
5953 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5954 in grub_outb() calls.
5955 (beep_on): Likewise.
5956
8b714eb0 59572007-11-10 Christian Franke <franke@computer.org>
5958
5959 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5960 (grub_menu_run): Likewise.
5961
ce0f1839 59622007-11-10 Robert Millan <rmh@aybabtu.com>
5963
5964 * include/grub/i386/efi/machine.h: New file.
5965 * include/grub/i386/linuxbios/machine.h: Likewise.
5966 * include/grub/i386/pc/machine.h: Likewise.
5967 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5968 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5969
5970 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5971 (serial_hw_io_addr): New variable.
5972 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5973 instead of `(unsigned short *) 0x400'.
5974
270c237d 59752007-11-10 Bean <bean123ch@gmail.com>
5976
5977 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5978
a87783bf 59792007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5980
5981 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5982 (vga_mod_SOURCES): Added.
5983 (vga_mod_CFLAGS): Likewise.
5984 (vga_mod_LDFLAGS): Likewise.
5985
5986 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5987 grub_outb() calls.
5988 (set_map_mask): Likewise.
5989 (set_read_map): Likewise.
5990 (set_read_address): Likewise.
5991 (vga_font): Removed variable.
5992 (get_vga_glyph): Removed function.
5993 (invalidate_char): Likewise.
5994 (write_char): Changed to use grub_font_get_glyph() for font
5995 information.
5996 (grub_vga_putchar): Likewise.
5997 (grub_vga_getcharwidth): Likewise.
5998
6433b448 59992007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6000
6001 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6002 flags.
6003 (pxeboot_img_LDFLAGS): Likewise.
6004 (diskboot_img_LDFLAGS): Likewise.
6005 (kernel_img_LDFLAGS): Likewise.
6006
49178511 60072007-11-06 Robert Millan <rmh@aybabtu.com>
6008
6009 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6010 in grub_outb() calls.
6011 (serial_hw_init): Likewise.
6012
53b052de 60132007-11-05 Robert Millan <rmh@aybabtu.com>
6014
6015 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6016 spaces. Skip non-regular files.
6017
5ab33bba 60182007-11-05 Robert Millan <rmh@aybabtu.com>
6019
6020 * kern/disk.c (grub_disk_firmware_fini)
6021 (grub_disk_firmware_is_tainted): New variables.
6022
6023 * include/grub/disk.h (grub_disk_firmware_fini)
6024 (grub_disk_firmware_is_tainted): Likewise.
6025
6026 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6027 (grub_disk_biosdisk_fini): ... to here.
6028 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6029 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6030 is set. Register grub_disk_biosdisk_fini() in
6031 `grub_disk_firmware_fini'.
6032
6033 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6034 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6035 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6036 to finish existing firmware disk interface.
6037
6038 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6039 (ata_mod_SOURCES): New variable.
6040 (ata_mod_CFLAGS): Likewise.
6041 (ata_mod_LDFLAGS): Likewise.
6042
0149ab7c 60432007-11-05 Robert Millan <rmh@aybabtu.com>
6044
6045 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6046 (grub_ata_wait): Reimplement using grub_millisleep().
6047
6048 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6049 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6050
be7ac41e 60512007-11-03 Marco Gerards <marco@gnu.org>
6052
6053 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6054 (CRTC_ADDR_PORT): New macro.
6055 (CRTC_DATA_PORT): Likewise.
6056 (CRTC_CURSOR): Likewise.
6057 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6058 (CRTC_CURSOR_ADDR_LOW): Likewise.
6059 (update_cursor): New function.
6060 (grub_console_real_putchar): Call `update_cursor'.
6061 (grub_console_gotoxy): Likewise.
6062 (grub_console_cls): Set the default color when clearing the
6063 screen.
6064 (grub_console_setcursor): Implemented.
6065
bb06ab2e 60662007-11-03 Marco Gerards <marco@gnu.org>
6067
6068 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6069 become activate.
6070 (grub_ata_pio_write): Likewise.
6071
6072 (grub_atapi_identify): Wait after issuing an ATA command.
6073 (grub_atapi_packet): Likewise.
6074 (grub_ata_identify): Likewise.
6075 (grub_ata_readwrite): Likewise.
6076
cf8f780b 60772007-11-03 Marco Gerards <marco@gnu.org>
6078
6079 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6080 (grub_ata_pio_write): Likewise.
6081 (grub_ata_readwrite): Use `grub_error', instead of
6082 returning `grub_errno'.
6083
ed649e54 60842007-11-03 Marco Gerards <marco@gnu.org>
6085
6086 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6087 grub_ata_pio_write once for every single sector, instead of for
6088 multiple sectors.
6089
ca25d8f0 60902007-10-31 Robert Millan <rmh@aybabtu.com>
6091
6092 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6093
6094 * conf/i386-linuxbios.rmk: New file.
6095
6096 * kern/i386/pc/hardware.c: Likewise.
6097 * term/i386/pc/at_keyboard.c: Likewise.
6098 * term/i386/pc/vga_text.c: Likewise.
6099
6100 * include/grub/i386/linuxbios/boot.h: Likewise.
6101 * include/grub/i386/linuxbios/console.h: Likewise.
6102 * include/grub/i386/linuxbios/init.h: Likewise.
6103 * include/grub/i386/linuxbios/kernel.h: Likewise.
6104 * include/grub/i386/linuxbios/loader.h: Likewise.
6105 * include/grub/i386/linuxbios/memory.h: Likewise.
6106 * include/grub/i386/linuxbios/serial.h: Likewise.
6107 * include/grub/i386/linuxbios/time.h: Likewise.
6108
6109 * kern/i386/linuxbios/init.c: Likewise.
6110 * kern/i386/linuxbios/startup.S: Likewise.
6111 * kern/i386/linuxbios/table.c: Likewise.
6112
e911ecc1 61132007-10-31 Marco Gerards <marco@gnu.org>
6114
6115 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6116 (ata_mod_SOURCES): New variable.
6117 (ata_mod_CFLAGS): Likewise.
6118 (ata_mod_LDFLAGS): Likewise.
6119
6120 * disk/ata.c: New file.
6121
6122 * include/grub/disk.h (grub_disk_dev_id): Add
6123 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 6124
7f66d0e0 61252007-10-31 Robert Millan <rmh@aybabtu.com>
6126
6127 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6128 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6129
6130 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6131 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6132
6133 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6134 `<grub/types.h>'.
6135
6136 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6137
5cd7dd46 61382007-10-27 Robert Millan <rmh@aybabtu.com>
6139
3236ca65 6140 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 6141
2ebfc90f 61422007-10-22 Robert Millan <rmh@aybabtu.com>
6143
6144 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6145 `"../realmode.S"'.
6146 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6147
73fcb0f3 61482007-10-22 Robert Millan <rmh@aybabtu.com>
6149
6150 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6151 (pkgdata_MODULES): Add `biosdisk.mod'.
6152 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6153 variables.
6154
6155 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6156 (grub_biosdisk_init): Replace with ...
6157 (GRUB_MOD_INIT(biosdisk)): ... this.
6158 (grub_biosdisk_fini): Replace with ...
6159 (GRUB_MOD_FINI(biosdisk)): ... this.
6160
6161 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6162 (grub_machine_init): Remove call to grub_biosdisk_init().
6163 (grub_machine_fini): Remove call to grub_machine_fini().
6164
6165 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6166
3381d274 61672007-10-22 Robert Millan <rmh@aybabtu.com>
6168
6169 * include/grub/time.h: New file.
6170 * include/grub/i386/time.h: Likewise.
6171 * include/grub/powerpc/time.h: Likewise.
6172 * include/grub/sparc64/time.h: Likewise.
6173
6174 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6175 instances to ...
6176 (KERNEL_MACHINE_TIME_HEADER): ... this.
6177 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6178 instances to ...
6179 (KERNEL_MACHINE_TIME_HEADER): ... this.
6180 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6181 instances to ...
6182 (KERNEL_MACHINE_TIME_HEADER): ... this.
6183
6184 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6185 (grub_millisleep): New function.
6186 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6187 (grub_millisleep): New function.
6188 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6189 Remove `grub/machine/time.h' include.
6190 (grub_millisleep): New function.
6191 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6192 Remove `grub/machine/time.h' include.
6193 (grub_millisleep): New function.
6194
6195 * include/grub/misc.h (grub_div_roundup): New function.
6196
6197 * kern/misc.c: Include `<grub/time.h>'.
6198 (grub_millisleep_generic): New function.
6199
6200 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6201 Add `time.h'.
6202 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6203 Add `time.h'.
6204 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6205 `machine/time.h'. Add `time.h'.
6206 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6207
a39a0312 62082007-10-21 Robert Millan <rmh@aybabtu.com>
6209
6210 * include/grub/misc.h (grub_max): New function.
6211
2aad70e2 62122007-10-21 Robert Millan <rmh@aybabtu.com>
6213
6214 * util/misc.c (grub_util_info): Call fflush() before returning.
6215
54b71c4b 62162007-10-20 Robert Millan <rmh@aybabtu.com>
6217
6218 * genmk.rb (Image): Copy `extra_flags' from here ...
6219 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6220
6221 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6222 to `argc' and `args' arguments.
6223
a979f513 62242007-10-17 Robert Millan <rmh@aybabtu.com>
6225
6226 * kern/i386/loader.S: New file.
6227
6228 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6229 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6230 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6231 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6232 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6233 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6234 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6235 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6236 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6237 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6238 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6239 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6240 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6241 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6242
6243 * kern/i386/realmode.S: New file.
6244
6245 * kern/i386/pc/startup.S (protstack): Moved from here ...
6246 * kern/i386/realmode.S (protstack)... to here.
6247 * kern/i386/pc/startup.S (gdt): Moved from here ...
6248 * kern/i386/realmode.S (gdt)... to here.
6249 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6250 * kern/i386/realmode.S (prot_to_real)... to here.
6251
6252 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6253 `kern/i386/realmode.S'.
6254
825fc8fd 62552007-10-17 Robert Millan <rmh@aybabtu.com>
6256
6257 * include/grub/i386/loader.h: New file.
6258
6259 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6260 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6261 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6262 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6263 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6264 * include/grub/i386/loader.h (grub_linux_prot_size)
6265 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6266 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6267 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6268 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6269
6270 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6271
e179b2f4 62722007-10-15 Robert Millan <rmh@aybabtu.com>
6273
6274 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6275 filesystem when dev->disk is unset.
6276 Do probe for filesystem even when dev->disk->has_partitions is set.
6277 In case a filesystem is found, always report it.
6278 In case it isn't, if dev->disk->has_partitions is set, report that
6279 a partition table was found instead of reporting that no filesystem
6280 could be identified.
6281
5db82af6 62822007-10-12 Robert Millan <rmh@aybabtu.com>
6283
6284 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6285 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6286
68f6ac74 6287 * include/grub/types.h (grub_host_to_target16): New macro.
6288 (grub_host_to_target32): Likewise.
6289 (grub_host_to_target64): Likewise.
6290 (grub_target_to_host16): Likewise.
6291 (grub_target_to_host32): Likewise.
6292 (grub_target_to_host64): Likewise.
5db82af6 6293
6294 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6295 Renamed from to ...
6296 (GRUB_MOD_ALIGN): ...this. Update all users.
6297
68f6ac74 6298 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6299 grub_host_to_target32.
6300 Replace grub_be_to_cpu32 with grub_target_to_host32.
6301 (load_modules): Likewise.
6302 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6303 Replace grub_be_to_cpu32 with grub_target_to_host32.
6304 Replace grub_cpu_to_be16 with grub_host_to_target16.
6305 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 6306
3cf497cc 63072007-10-12 Robert Millan <rmh@aybabtu.com>
6308
6309 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6310 * util/elf/grub-mkimage.c: ... here.
6311
6312 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6313 `util/powerpc/ieee1275/grub-mkimage.c'.
6314
c8cc3692 63152007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 6316
c8cc3692 6317 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6318 and make it easier to figure out.
6319 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6320 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6321 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6322 leave us with less than HEAP_MIN_SIZE total heap.
6323 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 6324
5c58b791 63252007-10-03 Robert Millan <rmh@aybabtu.com>
6326
6327 * include/grub/i386/io.h: New file.
6328 * commands/i386/pc/play.c (inb): Removed.
6329 (outb): Removed.
6330 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6331 with grub_outb().
afcd2ef8 6332 * term/i386/pc/serial.c (inb): Removed.
6333 (outb): Removed.
6334 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6335 with grub_outb().
6336 * term/i386/pc/vga.c (inb): Removed.
6337 (outb): Removed.
6338 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6339 with grub_outb().
5c58b791 6340
1a477ed6 63412007-10-02 Robert Millan <rmh@aybabtu.com>
6342
6343 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6345 Reported by Marcin Kurek.
6346
6b5d80fa 63472007-09-07 Robert Millan <rmh@aybabtu.com>
6348
6349 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6350 SmartFirmware version updates (as released by Sven Luther), and avoid
6351 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6352 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6353 known broken.
6354
5618afbf 63552007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6356
6357 From Hitoshi Ozeki:
6358 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6359 when merging two regions.
6360
6139dcd9 63612007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6362
508e39ee 6363 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6364 * normal/completion.c (grub_normal_do_completion): Likewise.
6365 Reported by Hitoshi Ozeki.
6366
63672007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 6368
6139dcd9 6369 Do not use devices at boot in chainloading.
f19dbdb7 6370
6139dcd9 6371 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6372 (boot_part_addr): Likewise.
6373 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6374 with BOOT_DRIVE and BOOT_PART_ADDR.
6375 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6376 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6377
38da6516 63782007-08-29 Robert Millan <rmh@aybabtu.com>
6379
6380 Patch from Simon Peter <dn.tlp@gmx.net>:
6381 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6382 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6383 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6384 util/i386/pc/grub-setup.c_DEPENDENCIES.
6385 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6386 util/grub-probe.c_DEPENDENCIES.
6387 * conf/powerpc-ieee1275.rmk: Likewise.
6388
29d0928c 63892007-08-28 Robert Millan <rmh@aybabtu.com>
6390
6391 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6392 to tell grub-mkdevicemap how to name devices.
6393 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6394 feature).
6395
6396 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6397 util/i386/get_disk_name.c.
6398 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6399 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6400 util/ieee1275/get_disk_name.c.
6401
6402 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6403
6404 * DISTLIST: Add util/i386/get_disk_name.c and
6405 util/ieee1275/get_disk_name.c.
6406
6407 * util/grub-mkdevicemap.c: Replace device naming logic with
6408 grub_util_get_disk_name() calls.
6409
5a0d3cca 64102007-08-20 Robert Millan <rmh@aybabtu.com>
6411
6412 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6413 (so that it works for both plural and singular quantities).
6414
8b72db2f 64152007-08-05 Robert Millan <rmh@aybabtu.com>
6416
6417 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6418 so that [xz] isn't taken into account when determining order.
6419
352466bf 64202007-08-02 Marco Gerards <marco@gnu.org>
6421
6422 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6423 `include/multiboot2.h', `include/grub/elfload.h',
6424 `include/multiboot.h', `include/grub/multiboot.h',
6425 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6426 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6427 `kern/elf.c', `loader/multiboot_loader.c',
6428 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6429 `loader/i386/pc/multiboot2.c',
6430 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6431 `util/i386/pc/grub-mkrescue.in'. Remove
6432 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
6433 `include/grub/i386/pc/util/biosdisk.h' and
6434 `include/grub/powerpc/ieee1275/multiboot.h'.
6435
8f096014 64362007-08-02 Bean <bean123ch@gmail.com>
6437
6438 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6439 (ntfs_mod_SOURCES): New variable.
6440 (ntfs_mod_CFLAGS): Likewise.
6441 (ntfs_mod_LDFLAGS): Likewise.
6442
6443 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6444 (grub_probe_SOURCES): Likewise.
6445 (grub_emu_SOURCES): Likewise.
6446
6447 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6448 (grub_emu_SOURCES): Likewise.
6449
6450 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6451 (grub_emu_SOURCES): Likewise.
f19dbdb7 6452
8f096014 6453 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6454
6455 * fs/ntfs.c: New file.
6456
9959f7db 64572007-08-02 Bean <bean123ch@gmail.com>
6458
6459 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6460
6461 * file.h (grub_file): Likewise.
6462
6463 * fshelp.h (grub_fshelp_read_file): Likewise.
6464
6465 * util/i386/pc/grub-setup.c (setup): Likewise.
6466 (save_first_sector): Likewise.
6467 (save_blocklists): Likewise.
f19dbdb7 6468
9959f7db 6469 * fs/affs.c (grub_affs_read_file): Likewise.
6470
6471 * fs/ext2.c (grub_ext2_read_file): Likewise.
6472
6473 * fs/fat.c (grub_fat_read_data): Likewise.
6474
6475 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6476
6477 * fs/hfs.c (grub_hfs_read_file): Likewise.
6478
6479 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6480
6481 * fs/jfs.c (grub_jfs_read_file): Likewise.
6482
6483 * fs/minix.c (grub_minix_read_file): Likewise.
6484
6485 * fs/sfs.c (grub_sfs_read_file): Likewise.
6486
6487 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 6488
9959f7db 6489 * fs/xfs.c (grub_xfs_read_file): Likewise.
6490
6491 * command/blocklist.c (read_blocklist): Likewise.
6492 (print_blocklist): Likewise.
6493
0a203f83 64942007-08-02 Marco Gerards <marco@gnu.org>
6495
6496 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6497 `util/hostfs.c'.
6498
6499 * disk/host.c: New file.
6500
6501 * util/hostfs.c: Likewise.
6502
6503 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6504 return `GRUB_ERR_BAD_FS'.
6505 * fs/sfs.c (grub_sfs_mount): Likewise.
6506 * fs/xfs.c (grub_xfs_mount): Likewise.
6507
6508 * include/grub/disk.h (enum grub_disk_dev_id): Add
6509 `GRUB_DISK_DEVICE_HOST_ID'.
6510
6511 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6512
e5dfe777 65132007-07-24 Jerone Young <jerone@gmail.com>
6514
f19dbdb7 6515 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 6516 modules for compilation.
6517 * conf/powerpc-ieee1275.rmk: Likewise.
6518
6519 * include/multiboot.h: Move multiboot definitions to one file. Rename
6520 many definitions to not get grub specific.
6521 * include/multiboot2.h: Create header with multiboot 2 definitions.
6522 * include/grub/multiboot.h: Header for grub specific function
6523 prototypes and definitions.
6524 * include/grub/multiboot2.h: Likewise.
6525 * include/grub/multiboot_loader.h: Likewise.
6526 * include/grub/i386/pc/multiboot.h: Removed.
6527 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6528
6529 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6530 and 2 to allow for one multiboot and module commands.
6531 * loader/multiboot2.c: Add multiboot2 functionality.
6532 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6533 and definition names.
6534 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6535 2 functions.
6536 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6537 ieee1275 specific multiboot2 code.
6538
6539 * kern/i386/pc/startup.S: Change headers and definition names for
6540 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6541
daf0f0ba 65422007-07-22 Robert Millan <rmh@aybabtu.com>
6543
6544 * geninitheader.sh: Process file specified in first parameter rather
6545 than hardcoding grub_modules_init.lst.
fe6b695a 6546 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 6547 than hardcoding grub_modules_init.h.
6548
6549 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6550 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6551 grub_probe_init.[ch] and grub_setup_init.[ch].
6552
6553 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6554 grub_modules_init.h with grub_emu_init.h.
6555 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6556 grub_probe_init.[ch] files.
6557 * conf/i386-efi.rmk: Likewise.
6558 * conf/i386-pc.rmk: Likewise.
6559 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6560 grub_setup_init.[ch] files.
6561
6562 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6563 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6564 to initialize modules rather than a list of hardcoded functions.
6565 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6566 grub_init_all() to initialize modules rather than a list of hardcoded
6567 functions.
6568
54cdc1cc 65692007-07-22 Robert Millan <rmh@aybabtu.com>
6570
6571 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6572 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6573
ad0686cc 65742007-07-22 Robert Millan <rmh@aybabtu.com>
6575
6576 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6577 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6578 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6579 flag when running on SmartFirmware.
6580 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6581 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6582 was set.
6583
6584 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6585 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6586 rather than decreasing it.
6587
6588 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6589 there's not enough space to do it, fail in the same way as when it
6590 can't be done because there are no partitions.
6591
6592 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6593 when nvsetenv failed.
6594
969c02ec 65952007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6596
6597 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6598 because this rule is automatically generated.
6599 (grub-mkrescue): Removed for the same reason as above.
6600
5a79f472 66012007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6602
6603 Migrate to GNU General Public License Version 3.
f19dbdb7 6604
5a79f472 6605 * COPYING: Replaced with the plain text version of GPLv3.
6606
6607 * config.guess: Updated from gnulib.
6608 * config.sub: Likewise.
6609
6610 * geninit.sh: Output a GPLv3 copyright notice.
6611 * geninitheader.sh: Likewise.
6612 * genmodsrc.sh: Likewise.
6613 * gensymlist.sh.in: Likewise.
6614
6615 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6616 * boot/i386/pc/diskboot.S: Likewise.
6617 * boot/i386/pc/pxeboot.S: Likewise.
6618 * commands/blocklist.c: Likewise.
6619 * commands/boot.c: Likewise.
6620 * commands/cat.c: Likewise.
6621 * commands/cmp.c: Likewise.
6622 * commands/configfile.c: Likewise.
6623 * commands/echo.c: Likewise.
6624 * commands/help.c: Likewise.
6625 * commands/ls.c: Likewise.
6626 * commands/search.c: Likewise.
6627 * commands/terminal.c: Likewise.
6628 * commands/test.c: Likewise.
6629 * commands/videotest.c: Likewise.
6630 * commands/i386/cpuid.c: Likewise.
6631 * commands/i386/pc/halt.c: Likewise.
6632 * commands/i386/pc/play.c: Likewise.
6633 * commands/i386/pc/reboot.c: Likewise.
6634 * commands/i386/pc/vbeinfo.c: Likewise.
6635 * commands/i386/pc/vbetest.c: Likewise.
6636 * commands/ieee1275/halt.c: Likewise.
6637 * commands/ieee1275/reboot.c: Likewise.
6638 * commands/ieee1275/suspend.c: Likewise.
6639 * disk/loopback.c: Likewise.
6640 * disk/lvm.c: Likewise.
6641 * disk/raid.c: Likewise.
6642 * disk/efi/efidisk.c: Likewise.
6643 * disk/i386/pc/biosdisk.c: Likewise.
6644 * disk/ieee1275/ofdisk.c: Likewise.
6645 * font/manager.c: Likewise.
6646 * fs/affs.c: Likewise.
6647 * fs/ext2.c: Likewise.
6648 * fs/fat.c: Likewise.
6649 * fs/fshelp.c: Likewise.
6650 * fs/hfs.c: Likewise.
6651 * fs/hfsplus.c: Likewise.
6652 * fs/iso9660.c: Likewise.
6653 * fs/jfs.c: Likewise.
6654 * fs/minix.c: Likewise.
6655 * fs/sfs.c: Likewise.
6656 * fs/ufs.c: Likewise.
6657 * fs/xfs.c: Likewise.
6658 * hello/hello.c: Likewise.
6659 * include/grub/acorn_filecore.h: Likewise.
6660 * include/grub/arg.h: Likewise.
6661 * include/grub/bitmap.h: Likewise.
6662 * include/grub/boot.h: Likewise.
6663 * include/grub/cache.h: Likewise.
6664 * include/grub/device.h: Likewise.
6665 * include/grub/disk.h: Likewise.
6666 * include/grub/dl.h: Likewise.
6667 * include/grub/elfload.h: Likewise.
6668 * include/grub/env.h: Likewise.
6669 * include/grub/err.h: Likewise.
6670 * include/grub/file.h: Likewise.
6671 * include/grub/font.h: Likewise.
6672 * include/grub/fs.h: Likewise.
6673 * include/grub/fshelp.h: Likewise.
6674 * include/grub/gzio.h: Likewise.
6675 * include/grub/hfs.h: Likewise.
6676 * include/grub/kernel.h: Likewise.
6677 * include/grub/loader.h: Likewise.
6678 * include/grub/lvm.h: Likewise.
6679 * include/grub/misc.h: Likewise.
6680 * include/grub/mm.h: Likewise.
6681 * include/grub/net.h: Likewise.
6682 * include/grub/normal.h: Likewise.
6683 * include/grub/parser.h: Likewise.
6684 * include/grub/partition.h: Likewise.
6685 * include/grub/pc_partition.h: Likewise.
6686 * include/grub/raid.h: Likewise.
6687 * include/grub/rescue.h: Likewise.
6688 * include/grub/script.h: Likewise.
6689 * include/grub/setjmp.h: Likewise.
6690 * include/grub/symbol.h: Likewise.
6691 * include/grub/term.h: Likewise.
6692 * include/grub/terminfo.h: Likewise.
6693 * include/grub/tparm.h: Likewise.
6694 * include/grub/types.h: Likewise.
6695 * include/grub/video.h: Likewise.
6696 * include/grub/efi/api.h: Likewise.
6697 * include/grub/efi/chainloader.h: Likewise.
6698 * include/grub/efi/console.h: Likewise.
6699 * include/grub/efi/console_control.h: Likewise.
6700 * include/grub/efi/disk.h: Likewise.
6701 * include/grub/efi/efi.h: Likewise.
6702 * include/grub/efi/pe32.h: Likewise.
6703 * include/grub/efi/time.h: Likewise.
6704 * include/grub/i386/linux.h: Likewise.
6705 * include/grub/i386/setjmp.h: Likewise.
6706 * include/grub/i386/types.h: Likewise.
6707 * include/grub/i386/efi/kernel.h: Likewise.
6708 * include/grub/i386/efi/loader.h: Likewise.
6709 * include/grub/i386/efi/time.h: Likewise.
6710 * include/grub/i386/pc/biosdisk.h: Likewise.
6711 * include/grub/i386/pc/boot.h: Likewise.
6712 * include/grub/i386/pc/chainloader.h: Likewise.
6713 * include/grub/i386/pc/console.h: Likewise.
6714 * include/grub/i386/pc/init.h: Likewise.
6715 * include/grub/i386/pc/kernel.h: Likewise.
6716 * include/grub/i386/pc/loader.h: Likewise.
6717 * include/grub/i386/pc/memory.h: Likewise.
6718 * include/grub/i386/pc/multiboot.h: Likewise.
6719 * include/grub/i386/pc/serial.h: Likewise.
6720 * include/grub/i386/pc/time.h: Likewise.
6721 * include/grub/i386/pc/vbe.h: Likewise.
6722 * include/grub/i386/pc/vbeblit.h: Likewise.
6723 * include/grub/i386/pc/vbefill.h: Likewise.
6724 * include/grub/i386/pc/vbeutil.h: Likewise.
6725 * include/grub/i386/pc/vga.h: Likewise.
6726 * include/grub/ieee1275/ieee1275.h: Likewise.
6727 * include/grub/ieee1275/ofdisk.h: Likewise.
6728 * include/grub/powerpc/libgcc.h: Likewise.
6729 * include/grub/powerpc/setjmp.h: Likewise.
6730 * include/grub/powerpc/types.h: Likewise.
6731 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6732 * include/grub/powerpc/ieee1275/console.h: Likewise.
6733 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6734 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6735 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6736 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6737 * include/grub/powerpc/ieee1275/time.h: Likewise.
6738 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6739 * include/grub/sparc64/libgcc.h: Likewise.
6740 * include/grub/sparc64/setjmp.h: Likewise.
6741 * include/grub/sparc64/types.h: Likewise.
6742 * include/grub/sparc64/ieee1275/console.h: Likewise.
6743 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6744 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6745 * include/grub/sparc64/ieee1275/time.h: Likewise.
6746 * include/grub/util/biosdisk.h: Likewise.
6747 * include/grub/util/getroot.h: Likewise.
6748 * include/grub/util/lvm.h: Likewise.
6749 * include/grub/util/misc.h: Likewise.
6750 * include/grub/util/raid.h: Likewise.
6751 * include/grub/util/resolve.h: Likewise.
6752 * io/gzio.c: Likewise.
6753 * kern/device.c: Likewise.
6754 * kern/disk.c: Likewise.
6755 * kern/dl.c: Likewise.
6756 * kern/elf.c: Likewise.
6757 * kern/env.c: Likewise.
6758 * kern/err.c: Likewise.
6759 * kern/file.c: Likewise.
6760 * kern/fs.c: Likewise.
6761 * kern/loader.c: Likewise.
6762 * kern/main.c: Likewise.
6763 * kern/misc.c: Likewise.
6764 * kern/mm.c: Likewise.
6765 * kern/parser.c: Likewise.
6766 * kern/partition.c: Likewise.
6767 * kern/rescue.c: Likewise.
6768 * kern/term.c: Likewise.
6769 * kern/efi/efi.c: Likewise.
6770 * kern/efi/init.c: Likewise.
6771 * kern/efi/mm.c: Likewise.
6772 * kern/i386/dl.c: Likewise.
6773 * kern/i386/efi/init.c: Likewise.
6774 * kern/i386/efi/startup.S: Likewise.
6775 * kern/i386/pc/init.c: Likewise.
6776 * kern/i386/pc/lzo1x.S: Likewise.
6777 * kern/i386/pc/startup.S: Likewise.
6778 * kern/ieee1275/ieee1275.c: Likewise.
6779 * kern/powerpc/cache.S: Likewise.
6780 * kern/powerpc/dl.c: Likewise.
6781 * kern/powerpc/ieee1275/cmain.c: Likewise.
6782 * kern/powerpc/ieee1275/crt0.S: Likewise.
6783 * kern/powerpc/ieee1275/init.c: Likewise.
6784 * kern/powerpc/ieee1275/openfw.c: Likewise.
6785 * kern/sparc64/cache.S: Likewise.
6786 * kern/sparc64/dl.c: Likewise.
6787 * kern/sparc64/ieee1275/init.c: Likewise.
6788 * kern/sparc64/ieee1275/openfw.c: Likewise.
6789 * loader/efi/chainloader.c: Likewise.
6790 * loader/efi/chainloader_normal.c: Likewise.
6791 * loader/i386/efi/linux.c: Likewise.
6792 * loader/i386/efi/linux_normal.c: Likewise.
6793 * loader/i386/pc/chainloader.c: Likewise.
6794 * loader/i386/pc/chainloader_normal.c: Likewise.
6795 * loader/i386/pc/linux.c: Likewise.
6796 * loader/i386/pc/linux_normal.c: Likewise.
6797 * loader/i386/pc/multiboot.c: Likewise.
6798 * loader/i386/pc/multiboot_normal.c: Likewise.
6799 * loader/powerpc/ieee1275/linux.c: Likewise.
6800 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6801 * normal/arg.c: Likewise.
6802 * normal/cmdline.c: Likewise.
6803 * normal/command.c: Likewise.
6804 * normal/completion.c: Likewise.
6805 * normal/execute.c: Likewise.
6806 * normal/function.c: Likewise.
6807 * normal/lexer.c: Likewise.
6808 * normal/main.c: Likewise.
6809 * normal/menu.c: Likewise.
6810 * normal/menu_entry.c: Likewise.
6811 * normal/misc.c: Likewise.
6812 * normal/parser.y: Likewise.
6813 * normal/script.c: Likewise.
6814 * normal/i386/setjmp.S: Likewise.
6815 * normal/powerpc/setjmp.S: Likewise.
6816 * normal/sparc64/setjmp.S: Likewise.
6817 * partmap/acorn.c: Likewise.
6818 * partmap/amiga.c: Likewise.
6819 * partmap/apple.c: Likewise.
6820 * partmap/gpt.c: Likewise.
6821 * partmap/pc.c: Likewise.
6822 * partmap/sun.c: Likewise.
6823 * term/gfxterm.c: Likewise.
6824 * term/terminfo.c: Likewise.
6825 * term/efi/console.c: Likewise.
6826 * term/i386/pc/console.c: Likewise.
6827 * term/i386/pc/serial.c: Likewise.
6828 * term/i386/pc/vesafb.c: Likewise.
6829 * term/i386/pc/vga.c: Likewise.
6830 * term/ieee1275/ofconsole.c: Likewise.
6831 * util/biosdisk.c: Likewise.
6832 * util/console.c: Likewise.
6833 * util/genmoddep.c: Likewise.
6834 * util/getroot.c: Likewise.
6835 * util/grub-emu.c: Likewise.
6836 * util/grub-mkdevicemap.c: Likewise.
6837 * util/grub-probe.c: Likewise.
6838 * util/lvm.c: Likewise.
6839 * util/misc.c: Likewise.
6840 * util/raid.c: Likewise.
6841 * util/resolve.c: Likewise.
6842 * util/update-grub.in: Likewise.
6843 * util/update-grub_lib.in: Likewise.
6844 * util/grub.d/00_header.in: Likewise.
6845 * util/grub.d/10_hurd.in: Likewise.
6846 * util/grub.d/10_linux.in: Likewise.
6847 * util/i386/efi/grub-install.in: Likewise.
6848 * util/i386/efi/grub-mkimage.c: Likewise.
6849 * util/i386/pc/grub-install.in: Likewise.
6850 * util/i386/pc/grub-mkimage.c: Likewise.
6851 * util/i386/pc/grub-mkrescue.in: Likewise.
6852 * util/i386/pc/grub-setup.c: Likewise.
6853 * util/i386/pc/misc.c: Likewise.
6854 * util/powerpc/ieee1275/grub-install.in: Likewise.
6855 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6856 * util/powerpc/ieee1275/misc.c: Likewise.
6857 * video/bitmap.c: Likewise.
6858 * video/video.c: Likewise.
6859 * video/i386/pc/vbe.c: Likewise.
6860 * video/i386/pc/vbeblit.c: Likewise.
6861 * video/i386/pc/vbefill.c: Likewise.
6862 * video/i386/pc/vbeutil.c: Likewise.
6863 * video/readers/tga.c: Likewise.
6864
3572d015 68652007-07-02 Robert Millan <rmh@aybabtu.com>
6866
6867 * conf/i386-efi.rmk: Replace obsolete reference to
6868 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6869 with util/getroot.c.
6870 * conf/powerpc-ieee1275.rmk: Likewise.
6871 * conf/sparc64-ieee1275.rmk: Likewise.
6872
6873 * util/grub-emu.c (main): Fix unchecked pointer handling.
6874
2c2a681b 68752007-07-02 Robert Millan <rmh@aybabtu.com>
6876
6877 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6878 invocation to fail, in order to support partition-less media.
6879
6880 * util/i386/pc/grub-install.in: Likewise.
6881
6882 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6883 which fs or partmap modules are needed (akin to its sister scripts).
6884
6885 Also use grub-probe to get rid of unportable /proc/mounts check.
6886
6887 Print the same informational message that the other scripts do, before
fe6b695a 6888 exiting.
2c2a681b 6889
6193defe 68902007-06-23 Robert Millan <rmh@aybabtu.com>
6891
fe6b695a 6892 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 6893 a font file can be found and, if so, echo the GRUB path to it.
6894
6895 * util/update-grub.in: Handle multiple terminals depending on user
6896 input, platform availability and font file presence. Propagate
6897 variables of our findings to /etc/grub.d/ children.
6898
6899 * util/grub.d/00_header.in: Handle multiple terminals, based on
6900 environment setup by update-grub.
6901
eface1dc 69022007-06-23 Robert Millan <rmh@aybabtu.com>
6903
ba50d28f 6904 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 6905
bf697e28 69062007-06-21 Robert Millan <rmh@aybabtu.com>
6907
6908 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6909 indicate end of data section in kernel image.
6910 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6911 GRUB_KERNEL_MACHINE_DATA_END.
6912
6913 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6914 space for it.
6915 * kern/i386/efi/startup.S: Likewise.
6916
6917 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6918 during image generation. Implement --prefix option to override this
6919 patch.
6920 * util/i386/efi/grub-mkimage.c: Likewise.
6921
6922 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6923 code to make path relative to its root into a separate function.
6924
6925 * util/i386/pc/grub-install.in: Use newly provided
6926 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6927 pass the result to grub-install --prefix.
6928
baa574b4 69292007-06-13 Robert Millan <rmh@aybabtu.com>
6930
6931 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6932 DEFAULT_DEVICE_MAP.
6933 * util/grub-emu.c: Use above definitions from misc.h instead of
6934 defining them.
6935 * util/grub-mkdevicemap.c: Likewise.
6936 * util/i386/pc/grub-setup.c: Likewise.
6937 * util/grub-probe.c: Likewise.
6938 (probe): Abort with grub_util_error() when either
6939 grub_guess_root_device or grub_util_get_grub_dev fails.
6940
0215dcbf 69412007-06-12 Robert Millan <rmh@aybabtu.com>
6942
6943 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6944 "pager" assignment.
6945 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6946 "pcdata".
6947 * util/grub-probe.c (probe): Likewise for "drive_name".
6948
8af2ab7b 69492007-06-11 Robert Millan <rmh@aybabtu.com>
6950
6951 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6952 not just the cdrom one.
6953
59d31694 69542007-06-11 Robert Millan <rmh@aybabtu.com>
6955
6956 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6957 Add --pkglibdir=DIR option to override pkglibdir.
6958 Mention --image-type=TYPE in help output.
6959 Fix --grub-mkimage (it was a no-op).
fe6b695a 6960 Abort gracefully when no parameter is given.
59d31694 6961
7ee367e4 69622007-06-11 Robert Millan <rmh@aybabtu.com>
6963
6964 * util/i386/pc/grub-mkrescue.in: New file.
6965 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6966 * Makefile.in: Handle bin_SCRIPTS.
6967
29b0ed46 69682007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6969
6970 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6971 list of video modes.
6972
c0f90770 69732007-06-06 Robert Millan <rmh@aybabtu.com>
6974
6975 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6976 file doesn't exist, or if it is in a filesystem grub can't read.
6977
6978 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6979 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6980 header comment to fit in 80 columns when the variables are resolved.
6981
6982 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6983 could be identified by update-grub. Remove redundant check for
fe6b695a 6984 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 6985 handles that).
6986
fb36dc26 69872007-06-04 Robert Millan <rmh@aybabtu.com>
6988
6989 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6990
6991 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6992
6993 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6994
0c68c93e 69952007-06-04 Robert Millan <rmh@aybabtu.com>
6996
6997 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6998
6999 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7000 grub_apple_partition_map_fini.
7001
7002 * util/biosdisk.c
7003 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7004 to access >2 TiB disks).
7005
7006 Print disk->total_sectors with %llu instead of %lu, since this
7007 variable is always 64-bit (prevents wrong disk size from being displayed
7008 on either >2 TiB disk or big-endian CPU).
7009
7010 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7011 into a generic case that supports all (sane) partition maps.
7012
7013 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7014 breaks big-endian.
7015
7016 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7017 and grub_apple_partition_map_fini() after that.
7018
0f23eb74 70192007-06-01 Robert Millan <rmh@aybabtu.com>
7020
7021 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7022
7023 * util/grub.d/00_header.in: Only enable gfxterm when
7024 convert_system_path_to_grub_path() succeeds.
7025
42c71976 70262007-05-20 Robert Millan <rmh@aybabtu.com>
7027
7028 * util/update-grub_lib.in: New file.
7029 * DISTLIST: Add update-grub_lib.in.
7030 * conf/common.rmk: Generate update-grub_lib and install it in
7031 $(lib_DATA).
7032 * Makefile.in: Add install routine for $(lib_DATA).
7033
7034 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7035 function provided by update-grub_lib to support arbitrary paths of
7036 unifont.pff.
7037 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7038 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7039
5beb2291 70402007-05-19 Robert Millan <rmh@aybabtu.com>
7041
7042 * commands/i386/cpuid.c: New module.
7043 * DISTLIST: Add it.
7044 * conf/i386-efi.rmk: Enable cpuid.mod.
7045 * conf/i386-pc.rmk: Likewise.
7046
7262eca1 70472007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7048
7049 * kern/disk.c (grub_disk_read): Check return value of
7050 grub_realloc().
7051
260ba823 70522007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7053
7054 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7055 arrays.
7056 * disk/raid.c (grub_raid_open): Likewise.
7057
1ecb6cf2 70582007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7059
7060 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7061 stack instead of on the heap.
7062
7063 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7064 before doing a read on it.
7065
7066 * configure.ac: Only use -fno-stack-protector for the target
7067 environment.
f19dbdb7 7068
21c8cbb1 70692007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7070
7071 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7072 __attribute_ ((unused)) to mode_type argument.
7073
7074 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 7075
21c8cbb1 7076 * kern/misc.c (memcmp): Fix prototype.
7077
7078 * include/grub/partition.h [GRUB_UTIL]
7079 (grub_gpt_partition_map_init): Add prototype.
7080 (grub_gpt_partition_map_fini): Likewise.
7081
7082 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7083 at the right place.
7084
7085 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7086 (grub_fat_read_data): Likewise.
7087 (grub_fat_find_dir): Likewise.
7088
7089 * font/manager.c (find_glyph): Make table a const.
7090 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 7091
849d55d3 70922007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7093
7094 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7095 code, first search for device in /dev/mapper, then in /dev.
7096 (grub_util_get_grub_dev): New function.
7097 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7098 prototype.
7099 * util/grub-probe.c (probe): Remove check for RAID, call
7100 grub_util_get_grub_dev() instead of
7101 grub_util_biosdisk_get_grub_dev().
7102 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7103 grub_util_biosdisk_get_grub_dev().
7104 * util/i386/pc/grub-setup.c (main): Likewise.
7105
8fff7c2f 71062007-05-16 Robert Millan <rmh@aybabtu.com>
7107
7108 * DISTLIST: Update for the latest changes.
7109 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7110 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7111 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7112 grub/util/biosdisk.h.
7113 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7114 grub/util/biosdisk.h.
7115
48e12b52 71162007-05-16 Robert Millan <rmh@aybabtu.com>
7117
7118 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7119
46b9d128 71202007-05-16 Robert Millan <rmh@aybabtu.com>
7121
7122 * util/i386/efi/grub-install.in: New.
7123 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7124 newly added grub-install.
7125 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7126 include.
7127 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7128 grub/util/biosdisk.h.
7129 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7130 grub/util/biosdisk.h.
7131
2d1a40a9 71322007-05-16 Robert Millan <rmh@aybabtu.com>
7133
7134 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7135 * include/grub/util/biosdisk.h: ... here.
7136 * util/i386/pc/biosdisk.c: Moved to ...
7137 * util/biosdisk.c: ... here.
7138 * util/i386/pc/getroot.c: Moved to ...
7139 * util/getroot.c: ... here.
7140 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7141 * util/grub-mkdevicemap.c: ... here.
7142 * util/i386/pc/grub-probe.c: Moved to ...
7143 * util/grub-probe.c: ... here.
7144
9e26e3bc 71452007-05-15 Robert Millan <rmh@aybabtu.com>
7146
7147 * util/update-grub.in: Remove duplicated line in grub.cfg header
7148 message.
7149
57f96397 71502007-05-13 Robert Millan <rmh@aybabtu.com>
7151
7152 * util/update-grub.in: Fix a few assumptions about the devices holding
7153 /, /boot and /boot/grub being the same.
7154 * util/grub.d/00_header.in: Likewise.
7155 * util/grub.d/10_hurd.in: Likewise.
7156 * util/grub.d/10_linux.in: Likewise.
7157
7158 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7159 patterns. Use that to define the `.old' suffix as older than `'.
7160
7161 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7162
7163 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7164 the grub.cfg header message.
7165
2e610d62 71662007-05-11 Robert Millan <rmh@aybabtu.com>
7167
7168 * util/update-grub.in: Create device.map if it doesn't already exist,
7169 before attempting to run grub-probe.
7170 Check for grub-probe and grub-mkdevicemap with the same code
7171 grub-install is using.
7172 Remove test mode.
7173
3f6a10ef 71742007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7175
7176 * Makefile.in: Add the datarootdir autoconf variable.
7177
02e7b75e 71782007-05-09 Robert Millan <rmh@aybabtu.com>
7179
7180 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 7181 fail gracefully if dev->disk->partition == NULL.
02e7b75e 7182
75f396cc 71832007-05-07 Robert Millan <rmh@aybabtu.com>
7184
7185 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7186 determine partition map module.
7187 * util/i386/pc/grub-install.in: Use this feature to decide which
7188 partition module to load, instead of hardcoding pc and gpt.
7189
da65cb36 71902007-05-07 Robert Millan <rmh@aybabtu.com>
7191
7192 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7193 source directory differs from build directory.
7194
b57d6a91 71952007-05-05 Robert Millan <rmh@aybabtu.com>
7196
7197 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7198 initialisation.
7199
509d00f1 72002007-05-05 Robert Millan <rmh@aybabtu.com>
7201
7202 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7203
c48f23ef 72042007-05-05 Robert Millan <rmh@aybabtu.com>
7205
7206 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7207 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7208
20b97658 72092007-05-05 Robert Millan <rmh@aybabtu.com>
7210
7211 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7212 (grub_probe_SOURCES): Likewise.
7213 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7214 GPT and initialize dos_part and bsd_part accordingly.
7215 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7216 install_bsd_part.
7217 (main): Activate gpt module for use during partition identification,
7218 and deactivate it afterwards.
7219 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7220 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7221 partition identification, and deactivate it afterwards.
7222
99123174 72232007-05-05 Robert Millan <rmh@aybabtu.com>
7224
7225 * term/i386/pc/console.c (grub_console_fini): Call
7226 grub_term_set_current() before grub_term_unregister().
7227
ebd97f6e 72282007-05-04 Robert Millan <rmh@aybabtu.com>
7229
7230 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7231 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7232 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7233 and update-grub_DATA.
7234 * conf/common.rmk: Build and install update-grub components.
7235 * conf/common.mk: Regenerate.
7236 * util/update-grub.in: New. Core of update-grub.
7237 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7238 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7239 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7240 * util/grub.d/README: New. Document grub.d directory layout.
7241
b06a264d 72422007-05-01 Robert Millan <rmh@aybabtu.com>
7243
7244 * util/grub-emu.c: Move initialization functions
7245 grub_util_biosdisk_init() and grub_init_all() before
7246 grub_util_biosdisk_get_grub_dev(), which relies on them.
7247
41f0050e 72482007-04-19 Robert Millan <rmh@aybabtu.com>
7249
7250 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7251 it is used later.
7252
04582bb3 72532007-04-18 Jerone Young <jerone@gmail.com>
7254
f19dbdb7 7255 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 7256 stanza.
7257
08db4632 72582007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 7259
08db4632 7260 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7261 continue on and look for device node with real device name.
7262
801b76be 72632007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 7264
fe6b695a 7265 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 7266 ability.
7267 * Makefile.in: Add autoconf package transformation code.
7268 * util/i386/pc/grub-install.in: Likewise.
7269 * util/powerpc/ieee1275/grub-install.in: Likewise.
7270
6795c4e1 72712007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7272
7273 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7274 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7275 (EXT2_REVISION): Likewise.
7276 (EXT2_INODE_SIZE): Likewise.
7277 (struct grub_ext2_block_group): Added a missing member
7278 "used_dirs".
7279 (grub_ext2_read_inode): Divide by the inode size in a superblock
7280 instead of 128 to obtain INODES_PER_BLOCK.
7281 Use the macro EXT2_INODE_SIZE instead of directly using
7282 SBLOCK->INODE_SIZE.
7283
d70af616 72842007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7285
7286 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7287 superblock instead of the structure size to compute an
7288 offset. This fixes the problem that GRUB could not read a
7289 filesystem when inode size is different from 128-byte.
7290
3b801603 72912007-03-05 Marco Gerards <marco@gnu.org>
7292
7293 * normal/main.c (read_config_file): When "menu" is not set, create
7294 an initial context.
7295
4785bfe4 72962007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7297
7298 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7299 (HEAP_LIMIT): New macro.
7300 (grub_claim_heap): Claim memory up to `heaplimit'.
7301
a0cbb023 73022007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7303
7304 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7305 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7306 (_start): Likewise.
7307 (grub_arch_modules_addr): Return address after `_end'.
7308 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7309 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7310 (add_segments): Calculate `_end' from phdr size and location.
7311 (ALIGN_UP): Moved to ...
7312 * include/grub/misc.h: here.
7313 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7314 New macro.
7315 (GRUB_IEEE1275_MODULE_BASE): Removed.
7316
fd7d8eba 73172007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7318
7319 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7320 loop boundary.
7321
9b09e6fc 73222007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7323
7324 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7325 All users updated.
7326 (grub_elf64_load_hook_t): Likewise.
7327 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7328 debug output.
7329
3ce27299 73302007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7331
7332 * kern/mm.c: Update copyright.
7333 (grub_mm_debug): Correct syntax error.
7334 (grub_mm_dump_free): New function.
7335 (grub_debug_free): Call `grub_free'.
7336 * include/grub/mm.h: Update copyright.
7337 (grub_mm_dump_free): Add declaration.
7338
077d5fee 73392007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7340
7341 * include/grub/ieee1275/ieee1275.h: Update copyright.
7342 * kern/powerpc/ieee1275/init.c: Likewise.
7343 * kern/powerpc/ieee1275/openfw.c: Likewise.
7344
7345 * loader/powerpc/ieee1275/linux.c: Likewise.
7346 * include/grub/elfload.h: Likewise.
7347 * kern/elf.c: Likewise.
7348 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7349 callers.
7350 (grub_elf64_load): Likewise.
7351 (grub_elf32_load_segment): Move to a nested function.
7352 (grub_elf64_load_segment): Likewise.
7353
dc946850 73542007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7355
7356 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7357 prototype.
7358 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7359 (grub_heap_len): Likewise.
7360 (HEAP_SIZE): New macro.
7361 (grub_claim_heap): New function.
7362 (grub_machine_init): Don't claim heap directly. Call
7363 `grub_claim_heap'.
7364 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7365 (grub_available_iterate): New function.
7366
baa2a121 73672007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7368
7369 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7370 * configure.ac: Use it for testing the HOST and TARGET compilers.
7371
4fe9862e 73722006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7373
7374 * Makefile.in (enable_grub_emu): New variable.
7375 * configure.ac (--enable-grub-emu): New option.
7376 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7377 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7378 * conf/i386-pc.rmk: Likewise.
7379 * conf/powerpc-ieee1275.rmk: Likewise.
7380 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7381
a8aa5762 73822006-12-12 Marco Gerards <marco@gnu.org>
7383
7384 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7385
7386 * kern/env.c (grub_env_unset): Don't free the member `value' when
7387 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7388 pointer.
7389
7390 * normal/main.c (current_menu): Removed.
7391 (free_menu): Unset the `menu' environment variable.
7392 (grub_normal_menu_addentry): Make use of the environment variable
7393 `menu', instead of using the global `current_menu'. Allocate
7394 memory for the sourcecode of this entry.
7395 (read_config_file): New argument `nested', changed all callers.
7396 Only in the case of a new context, initialize a new menu. Set the
7397 `menu' environment variable.
7398 (grub_normal_execute): Don't set and unset the environment
7399 variable `menu' here anymore. Only free the menu when leaving the
7400 context.
7401
7402 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7403 leak.
7404
957b3a3e 74052006-12-11 Marco Gerards <marco@gnu.org>
7406
7407 * normal/menu_entry.c (run): Fix off by one bug so the last line
7408 is executed. Move the loader check to outside the loop.
7409
ef875714 74102006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7411
7412 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7413
4e739985 74142006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7415
7416 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7417 the number of sectors. Reported by Andrey Shuvikov
7418 <mr_hyro@yahoo.com>.
f19dbdb7 7419
790707f2 74202006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7421
7422 * kern/disk.c (grub_disk_read): When there is a read error, always
7423 try to read only the necessary data.
f19dbdb7 7424
790707f2 7425 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7426 disk/raid.c.
7427 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7428 prototype.
7429 [GRUB_UTIL] (grub_raid_fini): Likewise.
7430 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 7431 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 7432 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
7433 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
7434 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7435 and grub_raid_fini().
f19dbdb7 7436
03e58196 74372006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7438
7439 * include/grub/types.h (__unused): Rename to UNUSED.
7440 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7441 (grub_elf64_size): Likewise.
f19dbdb7 7442
ae4f23bf 74432006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7444
7445 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7446 grub_error_push and grub_error_pop in the error-handling path.
7447 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7448 length.
7449
2166cc83 74502006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7451
7452 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7453 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7454 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7455 (kernel_elf_SOURCES): Likewise.
7456 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7457 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7458 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7459 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7460 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7461 (elf_mod_SOURCES): New variable.
7462 (elf_mod_CFLAGS): Likewise.
7463 (elf_mod_LDFLAGS): Likewise.
7464 * include/grub/types.h (__unused): New macro.
7465 * include/grub/elfload.h: New file.
7466 * kern/elf.c: Likewise.
7467 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7468 (ELF32_LOADMASK): New macro.
7469 (ELF64_LOADMASK): Likewise.
7470 (vmlinux): Removed.
7471 (grub_linux_load32): New function.
7472 (grub_linux_load64): Likewise.
7473 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7474 Use grub_elf_t instead of grub_file_t.
7475
a09d5aa5 74762006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7477
7478 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7479 `catch_result' to struct set_color_args.
7480
d976fc51 74812006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7482
7483 * normal/menu.c: Include grub/script.h.
7484 * normal/menu_entry.c: Likewise.
7485 * include/grub/normal.h: Do not include grub/script.h.
7486
67507549 74872006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7488
7489 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7490
69203a99 74912006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7492
7493 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7494 disk.
7495 (grub_disk_close): Print debug messages when closing a disk.
7496 (grub_disk_read): Print debug messages when disk read fails.
7497 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7498 filesystem type.
7499 * kern/partition.c: Include misc.h.
7500 (grub_partition_iterate): Print debug messages when detecting
7501 partition type.
7502
e2b8278c 75032006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7504
7505 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7506 is negative.
7507 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7508
97b2f2ff 75092006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7510
7511 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7512 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7513
6555d655 75142006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7515
7516 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7517 instead of sizeof(lv). Patch by Michael Guntsche.
7518
4d42b77f 75192006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7520
7521 * disk/lvm.c: Rename VGS to VG_LIST.
7522 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7523 (grub_lvm_open): Likewise.
7524 Thanks to Michael Guntsche for finding this bug.
7525
5d74d927 75262006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7527
7528 * configure.ac (AC_INIT): Bumped to 1.95.
7529
a1bb27e4 75302006-10-14 Robert Millan <rmh@aybabtu.com>
7531
7532 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7533 with "/dev/.static/dev/md".
7534
e0994b8b 75352006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7536
7537 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7538 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7539 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7540 DRIVE_NAME are always freed.
7541
7542 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7543 DOS_PART, as a DOS partition is counted from one instead of zero
7544 now. Reported by Robert Millan.
7545
ddd5cee9 75462006-10-14 Robert Millan <rmh@aybabtu.com>
7547
7548 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7549 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7550 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7551 string returned by grub_guess_root_device.
7552 * util/i386/pc/grub-setup.c: Likewise.
7553 * util/i386/pc/grub-probefs.c: Likewise.
7554
7555 * util/i386/pc/grub-probefs.c: Rename to ...
7556 * util/i386/pc/grub-probe.c: ... this.
7557 * DISTLIST: Remove grub-probefs, add grub-probe.
7558 * conf/i386-efi.rmk: Likewise.
7559 * conf/i386-pc.rmk: Likewise.
7560 * util/i386/pc/grub-install.in: Likewise.
7561
7562 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7563 choose which information we want to print.
7564
2b002173 75652006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7566
7567 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7568 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7569 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7570 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7571 video/readers/tga.c and video/i386/pc/vbeutil.c.
7572
75732006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7574
7575 Added support for RAID and LVM.
f19dbdb7 7576
2b002173 7577 * disk/lvm.c: New file.
7578 * disk/raid.c: Likewise.
7579 * include/grub/lvm.h: Likewise.
f19dbdb7 7580 * include/grub/raid.h: Likewise.
2b002173 7581 * include/grub/util/lvm.h: Likewise.
7582 * include/grub/util/raid.h: Likewise.
7583 * util/lvm.c: Likewise.
7584 * util/raid.c: Likewise.
7585
7586 * include/grub/disk.h (grub_disk_dev_id): Add
7587 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7588 (grub_disk_get_size): New prototype.
7589 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7590 returns a partition.
7591 (grub_disk_get_size): New function.
f19dbdb7 7592
2b002173 7593 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7594 verbatim if grub_install_dos_part is -2.
7595
7596 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7597 and LVM devices.
7598
7599 * util/i386/pc/grub-setup.c (setup): New argument
7600 MUST_EMBED. Force embedding of GRUB when the argument is
7601 true. Close FILE before returning.
7602 (main): Add support for RAID and LVM.
f19dbdb7 7603
2b002173 7604 * conf/common.rmk: Add RAID and LVM modules.
7605 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7606 util/lvm.c.
7607 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7608
7609 * kern/misc.c (grub_strstr): New function.
7610 * include/grub/misc.h (grub_strstr): New prototype.
7611
050548d0 76122006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7613
7614 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7615
da849d2d 76162006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7617
7618 * kern/misc.c (grub_strtoull): Guess the base only if not
7619 specified.
7620
97b2f2ff 76212006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 7622
7623 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7624 PowerMac support.
7625
97b2f2ff 76262006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 7627
7628 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7629
7630 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7631 Remove `flags' argument. All callers changed.
7632 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7633 (IEEE1275_IHANDLE_INVALID): New variable.
7634 (IEEE1275_CELL_INVALID): New variable.
7635 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7636 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7637 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7638 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7639 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7640 codes from Open Firmware. All callers updated.
7641 (grub_ieee1275_next_property): Directly return Open Firmware return
7642 code.
7643 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7644 Standardize error checking from `grub_ieee1275_get_property'.
7645 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7646 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7647
97b2f2ff 76482006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 7649
7650 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7651 `instance_to_package_args' to `instance_to_path_args'.
7652
7653 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7654 `grub_ieee1275_chosen'.
7655
7656 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7657 `grub_ieee1275_interpret'.
7658
97b2f2ff 76592006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 7660
7661 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7662
97b2f2ff 76632006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 7664
7665 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7666 (__cmpdi): Likewise.
7667
7668 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7669 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7670 `grub_ssize_t'.
7671
02bb8acc 7672 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 7673
7674 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7675 to type `grub_ssize_t'.
7676 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7677
7f9a8531 76782006-09-22 Marco Gerards <marco@gnu.org>
7679
7680 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7681 newlines.
7682
b5ef1102 76832006-09-22 Marco Gerards <marco@gnu.org>
7684
7685 * commands/echo.c: New file.
7686
7687 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7688
7689 * conf/common.rmk (echo_mod_SOURCES): New variable.
7690 (echo_mod_CFLAGS): Likewise.
7691 (echo_mod_LDFLAGS): Likewise.
7692
2cff3677 76932006-09-22 Marco Gerards <marco@gnu.org>
7694
7695 * normal/main.c (get_line): Malloc memory instead of using
7696 preallocated memory. Removed the arguments `cmdline' and
7697 `max_len'. Updated all callers.
7698
6ba4688b 76992006-09-22 Marco Gerards <marco@gnu.org>
7700
7701 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7702 (normal_mod_DEPENDENCIES): Likewise.
7703
7704 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7705 (normal_mod_DEPENDENCIES): Likewise.
7706
7707 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7708
e02ac02c 77092006-09-22 Johan Rydberg <jrydberg@gnu.org>
7710
7711 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7712 programs.
7713 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7714 (normal_mod_DEPENDENCIES): Likewise.
7715 * conf/i386-pc.mk: Regenerate.
7716 * conf/i386-efi.mk: Likewise
7717 * conf/common.mk: Likewise.
7718 * conf/powerpc-ieee1275.mk: Likewise.
7719 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 7720
8d252e44 77212006-09-22 Robert Millan <rmh@aybabtu.com>
7722
7723 Sync with i386 version.
7724 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7725 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7726
209bf7ac 77272006-09-21 Robert Millan <rmh@aybabtu.com>
7728
7729 Import from GRUB Legacy (lib/device.c):
7730 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7731 (init_device_map) [__linux__]: Add support for I2O devices.
7732
6b146090 77332006-09-14 Marco Gerards <marco@gnu.org>
7734
7735 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7736 `-melf_i386'.
7737
e38600a8 77382006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 7739
7740 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7741 /boot/grub/*.lst.
78fa1790 7742
2952da5d 7743 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 7744
2952da5d 7745 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7746 before adding it to device.map.
7747
01b82a64 77482006-08-15 Johan Rydberg <jrydberg@gnu.org>
7749
fe6b695a 7750 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 7751 compiles a file; using the -MD option.
7752 * conf/common.mk: Regenerate.
7753 * conf/i386-pc.mk: Likewise.
7754 * conf/i386-efi.mk: Likewise.
7755 * conf/powerpc-ieee1275.mk: Likewise.
7756 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 7757
1064790d 77582006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7759
7760 Move the prototypes of grub_setjmp and grub_longjmp to
7761 cpu/setjmp.h, so that each architecture may specify different
7762 attributes.
f19dbdb7 7763
1064790d 7764 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7765 (grub_longjmp): Likewise.
7766 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7767 (grub_longjmp): Likewise.
7768 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7769 (grub_longjmp): Likewise.
7770
7771 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7772 [!GRUB_UTIL] (grub_longjmp): Removed.
7773
29dda3ed 77742006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7775
7776 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7777 "color!" method does not return any value.
7778
ad2a06ed 77792006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7780
7781 * include/grub/bitmap.h: New file.
7782
7783 * include/grub/i386/pc/vbeutil.h: Likewise.
7784
7785 * video/bitmap.c: Likewise.
7786
7787 * video/readers/tga.c: Likewise.
7788
7789 * video/i386/pc/vbeutil.c: Likewise.
7790
7791 * commands/videotest.c: Code cleanup and updated to reflect to new
7792 video API.
7793
7794 * term/gfxterm.c: Likewise.
7795
7796 * video/video.c: Likewise.
7797
7798 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7799 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7800 (bitmap_mod_SOURCES): New entry.
7801 (bitmap_mod_CFLAGS): Likewise.
7802 (bitmap_mod_LDFLAGS): Likewise.
7803 (tga_mod_SOURCES): Likewise.
7804 (tga_mod_CFLAGS): Likewise.
7805 (tga_mod_LDFLAGS): Likewise.
7806
7807 * include/grub/video.h (grub_video_blit_operators): New enum type.
7808 (grub_video_render_target): Changed as forward declaration and moved
7809 actual definition to be video driver specific.
7810 (grub_video_adapter.blit_bitmap): Added blitting operator.
7811 (grub_video_adapter.blit_render_target): Likewise.
7812 (grub_video_blit_bitmap): Likewise.
7813 (grub_video_blit_render_target): Likewise.
7814
7815 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7816 driver specific render target definition.
7817 (grub_video_vbe_map_rgba): Added driver internal helper.
7818 (grub_video_vbe_unmap_color): Updated to use
7819 grub_video_i386_vbeblit_info.
7820 (grub_video_vbe_get_video_ptr): Likewise.
7821
7822 * include/grub/i386/pc/vbeblit.h
7823 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7824 grub_video_i386_vbeblit_info.
7825 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7826 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7827 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7828 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7829 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7830 (grub_video_i386_vbeblit_index_index): Likewise.
7831 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7832 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7833 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7834 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7835 operator.
7836 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7837 operator.
7838
7839 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7840 include/grub/i386/pc/vbeblit.h.
7841
7842 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7843 Updated to use grub_video_i386_vbeblit_info.
7844 (grub_video_i386_vbefill_R8G8B8): Likewise.
7845 (grub_video_i386_vbefill_index): Likewise.
7846 (grub_video_i386_vbefill): Added generic filler.
7847
7848 * video/i386/pc/vbefill.c: Updated to reflect changes on
7849 include/grub/i386/pc/vbefill.h.
7850
7851 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7852 grub_video_i386_vbeblit_info.
7853 (grub_video_vbe_unmap_color): Likewise.
7854 (grub_video_vbe_blit_glyph): Likewise.
7855 (grub_video_vbe_scroll): Likewise.
7856 (grub_video_vbe_draw_pixel): Removed function.
7857 (grub_video_vbe_get_pixel): Likewise.
7858 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7859 updated code to use it.
7860 (common_blitter): Added common blitter for render target and bitmap.
7861 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7862 (grub_video_vbe_blit_render_target): Likewise.
7863
bc8c036d 78642006-07-30 Johan Rydberg <jrydberg@gnu.org>
7865
7866 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7867 is in text mode if there is no console control protocol instance
7868 available.
7869
684a8eff 78702006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7871
7872 * include/grub/video.h: Code cleanup.
7873
7874 * include/grub/i386/pc/vbe.h: Likewise.
7875
7876 * video/i386/pc/vbe.c: Likewise.
7877
7878 * video/i386/pc/vbeblit.c: Likewise.
7879
7880 * video/i386/pc/vbefill.c: Likewise.
7881
7882 * video/video.c: Likewise. Also added more comments.
7883
5915059b 78842006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7885
7886 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7887 (struct grub_biosdisk_dap): Likewise.
7888
7889 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7890 linkage settings for all functions.
7891
90ce5d56 78922006-07-12 Marco Gerards <marco@gnu.org>
7893
7894 * configure.ac (--enable-mm-debug): Fix typo.
7895
7896 * genkernsyms.sh.in: Use proper quoting for `CC'.
7897
43e7f879 78982006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7899
7900 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7901 (normal_mod_ASFLAGS): Remove "-m32".
7902
4889bdec 79032006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7904
7905 * util/misc.c: Include config.h.
7906 [!HAVE_MEMALIGN]: Do not include malloc.h.
7907 (grub_memalign): Use posix_memalign, if present. Then, use
7908 memalign, if present. Otherwise, emit an error.
7909
7910 * util/grub-emu.c: Do not include malloc.h.
7911
7912 * include/grub/util/misc.h: Include unistd.h. This is required for
7913 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7914 D. Eades III <hde@foobar-qux.org>.
7915
7916 * configure.ac (AC_GNU_SOURCE): Added.
7917 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7918 type.
7919
fd39d4da 79202006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7921
7922 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7923 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7924
b786f3b5 79252006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7926
7927 * include/grub/types.h (grub_host_addr_t): Rename to
7928 grub_target_addr_t.
7929 (grub_host_off_t): Rename to grub_target_off_t.
7930 (grub_host_size_t): Rename to grub_target_size_t.
7931 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7932 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7933
7934 * include/grub/kernel.h (struct grub_module_header): Change type
7935 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7936 (grub_module_info): Likewise.
f19dbdb7 7937
051988bb 79382006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7939
7940 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7941 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7942 Velazquez <jesus.velazquez@gmail.com>.
7943
deae281b 79442006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7945
7946 Count partitions from 1 instead of 0 in the string representation
7947 of partitions. Still use 0-based internally.
f19dbdb7 7948
deae281b 7949 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7950 (sun_partition_map_iterate): Use grub_partition_t instead of
7951 struct grub_partition *. Cast DESC->START_CYLINDER to
7952 grub_uint64_t after converting the endian.
7953 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7954 (sun_partition_map_get_name): Add 1 to P->INDEX.
7955
7956 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7957 PCDATA->DOS_PART.
7958 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7959
7960 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7961 zero instead of one.
7962 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7963 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7964
7965 * partmap/apple.c (apple_partition_map_iterate): Change the type
7966 of POS to unsigned.
7967 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7968 (apple_partition_map_get_name): Add 1 into P->INDEX.
7969
7970 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7971 of POS to unsigned.
7972 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7973 calculate the offset of a partition.
7974 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7975 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7976
7977 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7978 SECTOR to grub_disk_addr_t.
7979 (acorn_partition_map_iterate): Likewise.
7980 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7981 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7982 top.
7983 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7984
7985 * kern/i386/pc/init.c (make_install_device): Add 1 into
7986 GRUB_INSTALL_DOS_PART.
7987
7988 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7989 conditional.
7990
524a1e6a 79912006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7992
7993 Clean up the code to support 64-bit addressing in disks and
7994 files. This change is not enough for filesystems yet.
f19dbdb7 7995
524a1e6a 7996 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7997 type of "start" to grub_uint64_t.
7998 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7999 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8000 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8001 convert addresses.
8002
8003 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8004 to grub_disk_addr_t.
8005
8006 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8007 string.
8008
8009 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8010
8011 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8012 to char *.
8013
8014 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8015
8016 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8017
8018 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8019
8020 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8021 to grub_off_t, to detect an error from grub_file_seek.
8022 (grub_multiboot_load_elf32): Likewise.
8023
8024 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8025 maximum unsigned long value when an overflow is detected.
8026 (grub_strtoull): New function.
8027 (grub_divmod64): Likewise.
8028 (grub_lltoa): use grub_divmod64.
8029
8030 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8031 grub_disk_addr_t.
8032 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8033 the pointer to next character. Use grub_strtoull instead of
8034 grub_strtoul.
8035 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8036 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8037 respectively.
8038
fe6b695a 8039 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 8040 return value is signed.
8041 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8042 test if OFFSET is less than zero, as OFFSET is unsigned now.
8043
8044 * kern/disk.c (struct grub_disk_cache): Change the type of
8045 "sector" to grub_disk_addr_t.
8046 (grub_disk_cache_get_index): Change the type of SECTOR to
8047 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8048 unsigned after shifting.
8049 (grub_disk_cache_invalidate): Change the type of SECTOR to
8050 grub_disk_addr_t.
8051 (grub_disk_cache_unlock): Likewise.
8052 (grub_disk_cache_store): Likewise.
8053 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8054 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8055 grub_disk_addr_t and grub_uint64_t, respectively.
8056 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8057 body, as the value of OFFSET is tweaked by
8058 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8059 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8060 respectively.
8061 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8062 body, as the value of OFFSET is tweaked by
8063 grub_disk_check_range. Change the types of LEN and N to
8064 grub_size_t.
8065
8066 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8067 and "saved_offset" to grub_off_t.
8068 (test_header): Cast BUF to char *.
8069 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8070 to char *.
8071 (grub_gzio_read): Change the types of OFFSET and SIZE to
8072 grub_off_t and grub_size_t, respectively.
8073
8074 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8075 Removed.
8076 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8077 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8078 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8079 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8080 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8081
8082 * include/grub/types.h (grub_off_t): Unconditionally set to
8083 grub_uint64_t.
8084 (grub_disk_addr_t): Changed to grub_uint64_t.
8085
8086 * include/grub/partition.h (struct grub_partition): Change the
8087 types of "start", "len" and "offset" to grub_disk_addr_t,
8088 grub_uint64_t and grub_disk_addr_t, respectively.
8089 (grub_partition_get_start): Return grub_disk_addr_t.
8090 (grub_partition_get_len): Return grub_uint64_t.
8091
8092 * include/grub/misc.h (grub_strtoull): New prototype.
8093 (grub_divmod64): Likewise.
8094
8095 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8096 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8097 grub_off_t, respectively.
8098 All callers and references changed.
8099
8100 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8101 grub_size_t in "read".
8102 All callers and references changed.
8103
8104 * include/grub/file.h (struct grub_file): Change the types of
8105 "offset" and "size" to grub_off_t and grub_off_t,
8106 respectively. Change the type of SECTOR to grub_disk_addr_t in
8107 "read_hook".
8108 (grub_file_read): Change the type of LEN to grub_size_t.
8109 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8110 grub_off_t.
8111 (grub_file_size): Return grub_off_t.
8112 (grub_file_tell): Likewise.
8113 All callers and references changed.
8114
8115 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8116 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8117 "write".
8118 (struct grub_disk): Change the type of "total_sectors" to
8119 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 8120 "read_hook".
524a1e6a 8121 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8122 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8123 (grub_disk_write): Likewise.
8124 All callers and references changed.
8125
8126 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8127 char * for grub_strncmp to silence gcc.
8128 (grub_iso9660_mount): Likewise.
8129 (grub_iso9660_mount): Likewise.
8130 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8131 return statement.
8132 (grub_iso9660_iterate_dir): Likewise.
8133 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8134
8135 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8136 LEN to grub_disk_addr_t and grub_size_t, respectively.
8137
8138 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8139
8140 * fs/jfs.c (grub_jfs_read_file): Likewise.
8141
8142 * fs/minix.c (grub_jfs_read_file): Likewise.
8143
8144 * fs/sfs.c (grub_jfs_read_file): Likewise.
8145
8146 * fs/ufs.c (grub_jfs_read_file): Likewise.
8147
8148 * fs/xfs.c (grub_jfs_read_file): Likewise.
8149
8150 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8151 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8152 respectively.
8153
8154 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8155 BLKNR to -1 instead of returning GRUB_ERRNO.
8156 (grub_ext2_read_file): Change the types of SECTOR and
8157 LEN to grub_disk_addr_t and grub_size_t, respectively.
8158
8159 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8160 LEN to grub_disk_addr_t and grub_size_t, respectively.
8161
8162 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8163 grub_file_read.
8164
8165 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8166 string. Do not cast SECTOR explicitly.
8167
8168 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8169 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8170 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8171 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8172 over 2TB and LBA mode is not supported, raise an error.
8173 (get_safe_sectors): New function.
8174 (grub_biosdisk_read): Use get_safe_sectors.
8175 (grub_biosdisk_write): Likewise.
8176
8177 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8178 (grub_efidisk_write): Likewise.
8179
8180 * disk/loopback.c (delete_loopback): Cosmetic changes.
8181 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8182 correctly.
8183 (grub_loopback_open): Likewise.
8184 (grub_loopback_read): Likewise. Also, change the type of POS to
8185 grub_off_t, and fix the usage of grub_memset.
8186
8187 * commands/i386/pc/play.c: Include grub/machine/time.h.
8188
8189 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8190 print FILE->SIZE.
8191
8192 * commands/configfile.c: Include grub/env.h.
8193
8194 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8195 GRUB_ERRNO directly instead. Change the type of POS to
8196 grub_off_t. Follow the coding standard.
8197
8198 * commands/blocklist.c: Include grub/partition.h.
8199 (grub_cmd_blocklist): Return an error if the underlying device is
8200 not a disk. Take the starting sector of a partition into account,
8201 if a partition is used.
8202
8203 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8204 a length field.
8205 (lba_mode): Support 64-bit addresses.
8206 (chs_mode): Likewise.
8207 (copy_buffer): Adapted to the new offsets of a length field and a
8208 segment field.
8209 (blocklist_default_start): Allocate 64-bit space.
8210
8211 * boot/i386/pc/boot.S (force_lba): Removed.
8212 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 8213 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 8214 space.
8215 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8216 is useless.
8217 (lba_mode): Refactored to support a 64-bit address. More size
8218 optimization.
8219 (setup_sectors): Likewise.
8220
53af98ad 82212006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8222
8223 * DISTLIST: Added include/grub/i386/linux.h. Removed
8224 include/grub/i386/pc/linux.h
8225
8226 * configure.ac (AC_INIT): Bumped to 1.94.
8227
8228 * config.guess: Updated from gnulib.
8229 * config.sub: Likewise.
8230 * install-sh: Likewise.
8231 * mkinstalldirs: Likewise.
8232
b4c1940a 82332006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8234
8235 * conf/common.rmk (grub_modules_init.lst): Depended on
8236 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8237 MODSRCFILES.
8238
8239 * genmk.rb (PModule::rule): Reverted the previous change.
8240
cfca1cfd 82412006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8242
8243 * conf/common.rmk (grub_modules_init.lst): Depends on
8244 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8245 that the target does not exist before producing.
8246 (grub_modules_init.h): Remove the target before generating.
8247 (grub_emu_init.c): Likewise.
8248
8249 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8250
aa6d7826 82512006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8252
8253 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8254 for the target-specific tests. Make sure that we also have the
8255 up-to-date target variables for those tests.
8256
26c607b9 82572006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8258
8259 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8260 (PModule::rule): Likewise.
8261
0162321a 82622006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8263
8264 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8265 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8266 target-specific flags should be prefixed.
8267 (PModule::rule): Likewise.
8268
6c826348 82692006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8270
8271 * configure.ac (CMP): Check if cmp is available explicitly.
8272
b977bf01 82732006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8274
8275 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8276 (target_cpu): New variable.
8277 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 8278
b977bf01 8279 * util/i386/pc/grub-install.in (host_cpu): Removed.
8280 (target_cpu): New variable.
8281 (pkglibdir): Use target_cpu instead of host_cpu.
8282
8283 * util/genmoddep.c: Removed.
f19dbdb7 8284
b977bf01 8285 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8286 instead of GRUB_HOST_SIZEOF_VOID_P.
8287 * kern/dl.c: Likewise.
8288
8289 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8290 ...
8291 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8292 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8293 (GRUB_TARGET_SIZEOF_LONG): ... this.
8294 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8295 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8296 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8297 to ...
8298 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8299 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8300 (GRUB_TARGET_SIZEOF_LONG): ... this.
8301 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8302 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8303 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8304 to ...
8305 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8306 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8307 (GRUB_TARGET_SIZEOF_LONG): ... this.
8308 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8309 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8310
8311 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8312 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8313 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8314 instead of GRUB_HOST_SIZEOF_LONG.
8315 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8316 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8317 GRUB_CPU_WORDS_BIGENDIAN.
8318 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8319 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8320 grub_host_ssize_t.
8321
8322 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8323 (genmoddep_SOURCES): Likewise.
8324 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8325 (genmoddep_SOURCES): Likewise.
8326 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8327 (genmoddep_SOURCES): Likewise.
8328 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8329 Likewise.
8330 (genmoddep_SOURCES): Likewise.
8331
8332 * genmoddep.awk: New file.
8333
8334 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8335 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8336 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8337 (PModule::rule): Likewise.
8338 (Program::rule): Likewise.
8339 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8340 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8341 respectively.
8342
8343 * configure.ac: Rewritten intensively to use host and target
8344 instead of build and host, respectively.
8345
8346 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8347 (host_cpu): Removed.
8348 (target_cpu): New variable.
8349 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8350 (BUILD_CC): Removed.
8351 (BUILD_CFLAGS): Likewise.
8352 (BUILD_CPPFLAGS): Likewise.
8353 (TARGET_CC): New variable.
8354 (TARGET_CFLAGS): Likewise.
8355 (TARGET_CPPFLAGS): Likewise.
8356 (TARGET_LDFLAGS): Likewise.
8357 (AWK): Likewise.
8358 (include): Use target_cpu instead of host_cpu.
8359 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 8360
b977bf01 8361 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8362
f09771a1 83632006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8364
8365 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8366 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8367 field 'false' to 'exec_on_false'.
8368 (grub_script_create_cmdif): Renamed argument names to reflect above
8369 changes.
8370
8371 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8372
8373 * normal/script.c (grub_script_create_cmdif): Likewise.
8374
118f4fb3 83752006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8376
8377 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8378 top.
8379 (grub_hfsplus_btree_recptr): Likewise.
8380 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8381 FILEBLOCK both to pass a block number and store next block
8382 number.
8383 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8384 overflow file correctly. Specify errors appropriately, because
8385 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8386 grub_hfsplus_btree_recptr to get the pointer to a found key.
8387 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8388 is found.
8389
8390 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8391 linux.mod.
8392 (_linux_mod_SOURCES): New variable.
8393 (_linux_mod_CFLAGS): Likewise.
8394 (_linux_mod_LDFLAGS): Likewise.
8395 (linux_mod_SOURCES): Likewise.
8396 (linux_mod_CFLAGS): Likewise.
8397 (linux_mod_LDFLAGS): Likewise.
8398
8399 * DISTLIST: Added loader/i386/efi/linux.c,
8400 loader/i386/efi/linux_normal.c and
8401 include/grub/i386/efi/loader.h.
8402
8403 * loader/i386/efi/linux.c: New file.
8404 * loader/i386/efi/linux_normal.c: Likewise.
8405 * include/grub/i386/efi/loader.h: Likewise.
8406
89a7d726 84072006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8408
8409 * commands/blocklist.c: New file.
8410
8411 * DISTLIST: Added commands/blocklist.c.
8412
8413 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 8414 color for the background, and a darker color for the foreground.
89a7d726 8415 (grub_console_checkkey): Return READ_KEY.
8416 (grub_console_cls): Set the background to
8417 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8418
8419 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8420
8421 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8422 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8423
8424 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8425 prototype.
8426
8427 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8428 BG. The spec is wrong again.
8429
8430 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8431 prototype.
8432 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
8433
8434 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8435 commands/blocklist.c.
8436 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 8437
89a7d726 8438 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8439 (blocklist_mod_SOURCES): New variable.
8440 (blocklist_mod_CFLAGS): Likewise.
8441 (blocklist_mod_LDFLAGS): Likewise.
8442
75c8f258 84432006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8444
8445 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8446 duplication.
8447 (lba_mode): Use %eax more intensively to reduce the code size.
8448
da2eb181 84492006-05-20 Marco Gerards <marco@gnu.org>
8450
8451 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8452
8453 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8454 for `menuentry'.
8455 (script): Accept leading newlines.
8456 (newlines): New rule to describe 0 or more newlines.
8457 (commands): Accept `command' with trailing newline. Fixed the
8458 order in which arguments were passed to `grub_script_add_cmd'.
8459 Accept commands separated by newlines.
8460 (function): Changed to accept newlines.
8461 (menuentry) Rewritten.
8462
8463 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8464 front of the list, instead of to the end.
8465
577b4050 84662006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8467
8468 * util/i386/pc/grub-install.in (bindir): New variable.
8469 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8470 Shaver <lbgwjl@gmail.com>.
8471
0d6e1189 84722006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8473
8474 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8475 grub/machine/linux.h
8476 * loader/i386/pc/linux.c: Likewise.
8477
8478 * include/grub/i386/pc/linux.h: Moved to ...
8479 * include/grub/i386/linux.h: ... here.
8480
8481 * include/grub/i386/linux.h (struct linux_kernel_params): New
8482 struct.
f19dbdb7 8483
31b86e9f 84842006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8485
8486 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8487 checking.
8488 (grub_video_vbe_blit_glyph): Likewise.
8489 (grub_video_vbe_blit_bitmap): Likewise.
8490 (grub_video_vbe_blit_render_target): Likewise.
8491
83b984de 84922006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8493
8494 * configure.ac (--with-platform): Properly quote the square
8495 brackets.
8496
5f0413bd 84972006-05-08 Marco Gerards <marco@gnu.org>
8498
8499 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8500 this...
8501 (kernel_elf_HEADERS): ...to this. Updated all users.
8502 (grubof_symlist.c): Renamed from this...
8503 (kernel_elf_symlist.c): ...to this. Updated all users.
8504 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8505 (grubof_SOURCES): Renamed from this...
8506 (kernel_elf_SOURCES): ...to this.
8507 (grubof_HEADERS): Renamed from this...
8508 (kernel_elf_HEADERS): ...to this.
8509 (grubof_CFLAGS): Renamed from this...
8510 (kernel_elf_CFLAGS): ...to this.
8511 (grubof_ASFLAGS): Renamed from this...
8512 (kernel_elf_ASFLAGS): ...to this.
8513 (grubof_LDFLAGS): Renamed from this...
8514 (kernel_elf_LDFLAGS): ...to this.
8515
8516 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8517 this...
8518 (kernel_elf_HEADERS): ...to this. Updated all users.
8519 (grubof_symlist.c): Renamed from this...
8520 (kernel_elf_symlist.c): ...to this. Updated all users.
8521 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8522 (grubof_SOURCES): Renamed from this...
8523 (kernel_elf_SOURCES): ...to this.
8524 (grubof_HEADERS): Renamed from this...
8525 (kernel_elf_HEADERS): ...to this.
8526 (grubof_CFLAGS): Renamed from this...
8527 (kernel_elf_CFLAGS): ...to this.
8528 (grubof_ASFLAGS): Renamed from this...
8529 (kernel_elf_ASFLAGS): ...to this.
8530 (grubof_LDFLAGS): Renamed from this...
8531 (kernel_elf_LDFLAGS): ...to this.
8532
8533 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8534 `kernel.elf' instead of `grubof'.
8535
05568c2e 85362006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8537
8538 Add --with-platform to configure. Use pkglibdir instead of
8539 pkgdatadir. This is reported by Roger Leigh.
8540
8541 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8542 (host_vendor): Likewise.
8543 (host_os): Likewise.
8544 (pkgdatadir): Likewise.
8545 (platform): New variable.
8546 (pkglibdir): Likewise.
8547 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 8548
05568c2e 8549 * util/i386/pc/grub-install.in (datadir): Removed.
8550 (host_vendor): Likewise.
8551 (host_os): Likewise.
8552 (pkgdatadir): Likewise.
8553 (platform): New variable.
8554 (pkglibdir): Likewise.
8555 Use PKGLIBDIR instead of PKGDATADIR.
8556
8557 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8558 instead of GRUB_DATADIR.
8559 (main): Likewise.
8560 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8561 (main): Likewise.
8562 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8563 (main): Likewise.
8564
8565 * configure.ac (--with-platform): New option.
8566 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8567
8568 * Makefile.in: Include a makefile based on PLATFORM instead of
8569 HOST_VENDOR.
8570 (pkgdatadir): Not appended by the machine type.
8571 (pkglibdir): Appended by the machine type.
8572 (host_vendor): Removed.
8573 (platform): New variable.
8574 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8575 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8576 (uninstall): Likewise.
8577
4e93851c 85782006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8579
8580 Use the environment context in the menu. Remove the commands
8581 "default" and "timeout", and use variables instead.
f19dbdb7 8582
4e93851c 8583 * normal/menu.c: Include grub/env.h.
8584 (print_entry): Cast TITLE to silence gcc.
8585 (get_timeout): New function.
8586 (set_timeout): Likewise.
8587 (get_entry_number): Likewise.
8588 (run_menu): Use a default entry, a fallback entry and a timeout
8589 in the environment variables "default", "fallback" and
8590 "timeout". Also, tweak the default entry if it is not within the
8591 current menu entries.
8592 (grub_menu_run): Use a fallback entry in the environment variable
8593 "fallback".
8594
8595 * normal/main.c (read_config_file): Do not initialize
8596 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8597 NEWMENU->TIMEOUT.
8598 (grub_normal_execute): Use a data slot to store the menu.
8599
8600 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8601 fallback_entry and timeout.
8602 (struct grub_menu_list): Removed.
8603 (grub_menu_list_t): Likewise.
8604 (struct grub_context): Likewise.
8605 (grub_context_t): Likewise.
8606 (grub_context_get): Likewise.
8607 (grub_context_get_current_menu): Likewise.
8608 (grub_context_push_menu): Likewise.
8609 (grub_context_pop_menu): Likewise.
8610 (grub_default_init): Likewise.
8611 (grub_default_fini): Likewise.
8612 (grub_timeout_init): Likewise.
8613 (grub_timeout_fini): Likewise.
8614
8615 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8616 and timeout.mod.
8617 (normal_mod_SOURCES): Removed normal/context.c.
8618
8619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8620 commands/default.c, commands/timeout.c and normal/context.c.
8621 (normal_mod_SOURCES): Removed normal/context.c.
8622
8623 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8624 commands/timeout.c and normal/context.c.
8625 (normal_mod_SOURCES): Removed normal/context.c.
8626
8627 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8628 commands/default.c, commands/timeout.c and normal/context.c.
8629 (normal_mod_SOURCES): Removed normal/context.c.
8630
8631 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8632 timeout.mod.
8633 (default_mod_SOURCES): Removed.
8634 (default_mod_CFLAGS): Likewise.
8635 (default_mod_LDFLAGS): Likewise.
8636 (timeout_mod_SOURCES): Removed.
8637 (timeout_mod_CFLAGS): Likewise.
8638 (timeout_mod_LDFLAGS): Likewise.
8639
8640 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8641 normal/context.c.
8642
8643 * commands/default.c: Removed.
8644 * commands/timeout.c: Likewise.
8645 * normal/context.c: Likewise.
8646
1eb9cc1d 86472006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8648
8649 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8650
385bd9c1 86512006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8652
8653 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8654 "next" to "prev" for readability.
8655 (struct grub_env_sorted_var): New struct.
8656 (grub_env_context): Renamed to ...
8657 (initial_context): ... this.
8658 (grub_env_var_context): Renamed to ...
8659 (current_context): ... this.
8660 (grub_env_find): Look only at CURRENT_CONTEXT.
8661 (grub_env_context_open): Rewritten to copy exported variables from
8662 previous context.
8663 (grub_env_context_close): Rewritten according to the new
8664 scheme. Also, add an assertion to prevent the initial context from
8665 removed.
8666 (grub_env_insert): Removed the code for the sorted list.
8667 (grub_env_remove): Likewise.
8668 (grub_env_export): Simply mark the variable with
8669 GRUB_ENV_VAR_GLOBAL.
8670 (grub_env_set): A cosmetic change for naming consistency.
8671 (grub_env_get): Likewise.
8672 (grub_env_unset): Likewise.
8673 (grub_env_iterate): Rewritten to sort variables within this
8674 function.
8675 (grub_register_variable_hook): Fixed for naming consistency. Call
8676 grub_env_find again, only if NAME is not found at the first time.
8677 (mangle_data_slot_name): New function.
8678 (grub_env_set_data_slot): Likewise.
8679 (grub_env_get_data_slot): Likewise.
8680 (grub_env_unset_data_slot): Likewise.
8681
8682 * include/grub/env.h (grub_env_var_type): New enum.
8683 (GRUB_ENV_VAR_LOCAL): New constant.
8684 (GRUB_ENV_VAR_GLOBAL): Likewise.
8685 (GRUB_ENV_VAR_DATA): Likewise.
8686 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8687 "type".
8688 (grub_env_set): Replace VAR with NAME for consistency.
8689 (grub_register_variable_hook): Likewise.
8690 (grub_env_export): Specify the name of the argument.
8691 (grub_env_set_data_slot): New prototype.
8692 (grub_env_get_data_slot): Likewise.
8693 (grub_env_unset_data_slot): Likewise.
8694
7f362539 86952006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8696
8697 Extend the loader so that GRUB can accept a loader which comes
8698 back to GRUB when a loaded image exits. Also, this change adds
8699 support for a chainloader on EFI.
f19dbdb7 8700
7f362539 8701 * term/efi/console.c: Include grub/misc.h.
8702 (grub_console_checkkey): Display a scan code on the top for
8703 debugging. This will be removed once the EFI port gets stable.
8704 Correct the scan code mapping.
8705
8706 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8707 allocate memory from larger regions, in order to reduce the number
8708 of allocated regions. Otherwise, the MacOSX loader panics.
8709 (filter_memory_map): Avoid less than 1MB for compatibility with
8710 other loaders.
8711 (add_memory_regions): Allocate from the tail of a region, if
8712 possible, to avoid allocating a region near to 1MB, for the MacOSX
8713 loader.
8714
8715 * kern/efi/init.c (grub_efi_set_prefix): Specify
8716 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8717
8718 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8719 argument IMAGE_HANDLE and specify it to get a loaded image.
8720 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8721 grub_efi_get_loaded_image.
fe6b695a 8722 (grub_efi_get_filename): Divide the length by the size of
7f362539 8723 grub_efi_char16_t.
8724 (grub_efi_get_device_path): New function.
8725 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8726 the length by the size of grub_efi_char16_t for a file path device
8727 path node.
8728
8729 * kern/loader.c (grub_loader_noreturn): New variable.
8730 (grub_loader_set): Accept a new argument NORETURN. Set
8731 GRUB_LOADER_NORETURN to NORETURN.
8732 All callers changed.
8733 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8734 grub_machine_fini.
8735
8736 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8737 prototype.
8738 (grub_efi_get_loaded_image): Take an argument to specify an image
8739 handle.
8740
8741 * include/grub/loader.h (grub_loader_set): Added one more argument
8742 NORETURN.
8743
8744 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8745 instead of grub_efi_open_protocol.
8746 (grub_efidisk_get_device_name): Likewise.
8747 (grub_efidisk_close): Print a newline.
8748 (grub_efidisk_get_device_handle): Fixed to use
8749 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8750 GRUB_EFI_DEVICE_PATH_TYPE.
8751
8752 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8753 * kern/efi/efi.c (device_path_guid): ... here.
8754
8755 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8756 chain.mod.
8757 (kernel_mod_HEADERS): Added efi/disk.h.
8758 (_chain_mod_SOURCES): New variable.
8759 (_chain_mod_CFLAGS): Likewise.
8760 (_chain_mod_LDFLAGS): Likewise.
8761 (chain_mod_SOURCES): Likewise.
8762 (chain_mod_CFLAGS): Likewise.
8763 (chain_mod_LDFLAGS): Likewise.
8764
8765 * DISTLIST: Added include/grub/efi/chainloader.h,
8766 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8767
8768 * include/grub/efi/chainloader.h: New file.
8769 * loader/efi/chainloader.c: Likewise.
8770 * loader/efi/chainloader_normal.c: Likewise.
8771
c0111d6e 87722006-04-30 Marco Gerards <marco@gnu.org>
8773
8774 * commands/configfile.c (grub_cmd_source): New function.
8775 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8776 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8777
df5341da 87782006-04-30 Marco Gerards <marco@gnu.org>
8779
8780 * normal/execute.c (grub_script_execute_cmd): Change the return
8781 type to `grub_err_t'. Correctly return the error.
8782 (grub_script_execute_cmdline): In case a command line is not a
8783 command or a function, try to interpret it as an assignment.
8784
f85934bd 87852006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8786
8787 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8788 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8789 skip a node whose name is obviously invalid as UTF-16,
8790 i.e. contains a NUL character. Stop the iteration when the last
8791 directory entry is found. Instead of using the return value of
8792 grub_hfsplus_btree_iterate_node, store the value in RET and use
8793 it, because the iterator can be stopped by the last directory
8794 entry.
8795
8f8a2cf8 87962006-04-30 Marco Gerards <marco@gnu.org>
8797
8798 * include/grub/env.h (grub_env_export): New prototype. Reported
8799 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8800
a27e84ce 88012006-04-30 Marco Gerards <marco@gnu.org>
8802
8803 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8804 size of the extents in a catalog file record.
8805
eaef0553 88062006-04-29 Marco Gerards <marco@gnu.org>
8807
8808 * commands/configfile.c (grub_cmd_configfile): Execute the
8809 configfile within its own context.
8810
8811 * include/grub/env.h (grub_env_context_open): New prototype.
8812 (grub_env_context_close): Likewise.
8813
8814 * kern/env.c (grub_env): Removed.
8815 (grub_env_sorted): Likewise.
8816 (grub_env_context): New variable.
8817 (grub_env_var_context): Likewise.
8818 (grub_env_find): Search both the active context and the global
8819 context.
8820 (grub_env_context_open): New function.
8821 (grub_env_context_close): Likewise.
8822 (grub_env_insert): Likewise.
8823 (grub_env_remove): Likewise.
8824 (grub_env_export): Likewise.
8825 (grub_env_set): Changed to use helper functions to avoid code
8826 duplication.
8827 (grub_env_iterate): Rewritten so both the current context and the
8828 global context are being used.
8829
8830 * normal/command.c (export_command): New function.
8831 (grub_command_init): Register the `export' function.
8832
7b455f4d 88332006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8834
8835 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8836 explicitly to suppress gcc's warnings.
8837 * fs/fat.c (grub_fat_find_dir): Likewise.
8838 (grub_fat_label): Likewise.
8839 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8840 (grub_xfs_mount): Likewise.
8841 (grub_xfs_label): Likewise.
8842 * fs/affs.c (grub_affs_mount): Likewise.
8843 (grub_affs_label): Likewise.
8844 (grub_affs_iterate_dir): Likewise.
8845 * fs/sfs.c (grub_sfs_mount): Likewise.
8846 (grub_sfs_iterate_dir): Likewise.
8847 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8848 * fs/hfs.c (grub_hfs_mount): Likewise.
8849 (grub_hfs_cmp_catkeys): Likewise.
8850 (grub_hfs_find_dir): Likewise.
8851 (grub_hfs_dir): Likewise.
8852 (grub_hfs_label): Likewise.
8853 * fs/jfs.c (grub_jfs_mount): Likewise.
8854 (grub_jfs_opendir): Likewise.
8855 (grub_jfs_getent): Likewise.
8856 (grub_jfs_lookup_symlink): Likewise.
8857 (grub_jfs_label): Likewise.
8858 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8859 (grub_hfsplus_iterate_dir): Likewise.
8860 (grub_hfsplus_btree_iterate_node): Made static.
8861
8862 * util/grub-emu.c (prefix): New variable.
8863 (grub_machine_set_prefix): New function.
8864 (main): Do not set the environment variable "prefix" here. Only
8865 set PREFIX, which is used later by grub_machine_set_prefix.
8866
8867 * include/grub/video.h: Do not include grub/symbol.h.
8868 (grub_video_register): Not exported. This symbol is not defined in
8869 the kernel.
8870 (grub_video_unregister): Likewise.
8871 (grub_video_iterate): Likewise.
8872 (grub_video_setup): Likewise.
8873 (grub_video_restore): Likewise.
8874 (grub_video_get_info): Likewise.
8875 (grub_video_get_blit_format): Likewise.
8876 (grub_video_set_palette): Likewise.
8877 (grub_video_get_palette): Likewise.
8878 (grub_video_set_viewport): Likewise.
8879 (grub_video_get_viewport): Likewise.
8880 (grub_video_map_color): Likewise.
8881 (grub_video_map_rgb): Likewise.
8882 (grub_video_map_rgba): Likewise.
8883 (grub_video_fill_rect): Likewise.
8884 (grub_video_blit_glyph): Likewise.
8885 (grub_video_blit_bitmap): Likewise.
8886 (grub_video_blit_render_target): Likewise.
8887 (grub_video_scroll): Likewise.
8888 (grub_video_swap_buffers): Likewise.
8889 (grub_video_create_render_target): Likewise.
8890 (grub_video_delete_render_target): Likewise.
8891 (grub_video_set_active_render_target): Likewise.
8892
8893 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8894 Undefined.
8895 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8896
8897 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8898 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8899 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8900 instead of $(srcdir)/genkernsyms.sh.
8901
8902 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8903 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8904 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8905 instead of $(srcdir)/genkernsyms.sh.
8906
8907 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8908 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8909 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8910 instead of $(srcdir)/genkernsyms.sh.
8911
8912 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8913 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8914 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8915 instead of $(srcdir)/genkernsyms.sh.
8916
8917 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8918 genkernsyms.sh.
8919
8920 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8921 genkernsyms.sh.
8922 (gensymlist.sh): New target.
8923 (genkernsyms.sh): Likewise.
8924
8925 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8926 genkernsyms.sh.in and gensymlist.sh.in.
8927
8928 * genkernsyms.sh: Removed.
8929 * gensymlist.sh: Likewise.
f19dbdb7 8930
7b455f4d 8931 * genkernsyms.sh.in: New file.
8932 * gensymlist.sh.in: Likewise.
8933
1885bb27 89342006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8935
8936 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8937 clobber "prefix", since we may have already set it manually.
8938
71538dff 89392006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8940
8941 * kern/misc.c (abort): New alias for grub_abort.
8942
2965c7cc 89432006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8944
8945 A new machine-specific function "grub_machine_set_prefix" is
8946 defined. This is called after loading modules, so that a prefix
8947 initialization can use modules. Also, this change adds an
8948 intensive debugging feature for the memory manager via the
8949 configure option "--enable-mm-debug".
f19dbdb7 8950
2965c7cc 8951 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8952 PART.LEN.
8953
8954 * kern/sparc64/ieee1275/init.c (abort): Removed.
8955 (grub_stop): Likewise.
8956 (grub_exit): New function.
8957 (grub_set_prefix): Renamed to ...
8958 (grub_machine_set_prefix): ... this.
8959 (grub_machine_init): Do not call grub_set_prefix.
8960
8961 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8962 (grub_machine_set_prefix): ... this.
8963 (grub_machine_init): Do not call grub_set_prefix.
8964
8965 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8966 (grub_machine_init): Do not set the prefix here.
8967
8968 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8969
8970 * kern/efi/init.c: Include grub/mm.h.
8971 (grub_efi_set_prefix): New function.
8972
8973 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8974 (grub_efi_get_filename): New function.
8975 (grub_print_device_path): Renamed to ...
8976 (grub_efi_print_device_path): ... this.
8977
8978 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8979 [MM_DEBUG] (grub_realloc): Likewise.
8980 [MM_DEBUG] (grub_free): Likewise.
8981 [MM_DEBUG] (grub_memalign): Likewise.
8982 [MM_DEBUG] (grub_mm_debug): New variable.
8983 [MM_DEBUG] (grub_debug_malloc): New function.
8984 [MM_DEBUG] (grub_debug_free): New function.
8985 [MM_DEBUG] (grub_debug_realloc): New function.
8986 [MM_DEBUG] (grub_debug_memalign): New function.
8987
8988 * kern/misc.c (grub_abort): Print a newline to distinguish
8989 the message.
8990
8991 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8992 grub_set_root_dev after loading modules. This is necessary when
8993 setting a prefix depends on modules.
8994
8995 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8996 (grub_efi_print_device_path): ... this.
8997 (grub_efi_get_filename): New prototype.
8998 (grub_efi_set_prefix): Likewise.
8999
9000 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9001 and grub/disk.h.
9002 (grub_efidisk_get_device_handle): New prototype.
9003 (grub_efidisk_get_device_name): Likewise.
9004
9005 * include/grub/mm.h: Include config.h.
9006 (MM_DEBUG): Removed.
9007 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9008 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9009 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9010 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9011 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9012 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9013 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9014 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9015 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9016
9017 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9018
9019 * disk/efi/efidisk.c: Include grub/partition.h.
9020 (iterate_child_devices): New function.
9021 (add_device): First, compare only last device path nodes, so that
9022 devices are sorted by the types.
9023 (grub_efidisk_get_device_handle): New function.
9024 (grub_efidisk_get_device_name): Likewise.
9025
9026 * configure.ac (--enable-mm-debug): New option to enable the
9027 memory manager debugging feature. This makes the binary much
9028 bigger, so is disabled by default.
9029
9cacaa17 90302006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9031
9032 Use grub_abort instead of grub_stop, and grub_exit must be
9033 define in each architecture now. Also, this change adds support
9034 for EFI disks.
f19dbdb7 9035
9cacaa17 9036 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9037 (grub_getkey): New function.
9038 (grub_term_get_current): Likewise.
9039
9040 * util/i386/pc/grub-setup.c: Include grub/term.h.
9041 (grub_getkey): New function.
9042 (grub_term_get_current): Likewise.
9043
9044 * util/misc.c (grub_stop): Renamed to ...
9045 (grub_exit): ... this.
9046
9047 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9048 (grub_exit): ... this.
9049 (grub_machine_init): Use grub_abort instead of abort.
9050 (grub_stop): Removed.
9051
9052 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9053 abort.
9054
9055 * kern/i386/pc/startup.S (grub_exit): New function.
9056 (cold_reboot): New label.
9057
9058 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9059 (grub_efi_init): Call grub_efidisk_init.
9060 (grub_efi_fini): Call grub_efidisk_fini.
9061
9062 * kern/efi/efi.c: Include grub/mm.h.
9063 (grub_efi_console_control_guid): Renamed to ...
9064 (console_control_guid): ... this.
9065 (grub_efi_loaded_image_guid): Renamed to ...
9066 (loaded_image_guid): ... this.
9067 (grub_efi_locate_handle): New function.
9068 (grub_efi_open_protocol): Likewise.
9069 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9070 GRUB_EFI_CONSOLE_CONTROL_GUID.
9071 (grub_efi_exit): Removed.
9072 (grub_stop): Likewise.
9073 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9074 (grub_exit): New function.
9075 (grub_print_device_path): Likewise.
9076
9077 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9078 (grub_enter_rescue_mode): Register "exit".
9079
9080 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9081 (grub_abort): New function.
9082
9083 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9084
9085 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9086
9087 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9088
9089 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9090 (grub_print_device_path): New prototype.
9091 (grub_efi_locate_handle): Likewise.
9092 (grub_efi_open_protocol): Likewise.
9093
9094 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9095 * disk/efi/efidisk.c: Likewise.
9096
9097 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9098
9099 * include/grub/efi/console_control.h
9100 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9101
9102 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9103 last 8 bytes as an array.
9104 (GRUB_EFI_DISK_IO_GUID): New macro.
9105 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9106 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9107 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9108 grub_uint8_t.
9109 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9110 (struct grub_efi_device_path): Rename the member "sub_type" to
9111 "subtype".
9112 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9113 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9114 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9115 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9116 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9117 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9118 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9119 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9120 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9121 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9122 (struct grub_efi_pci_device_path): New structure.
9123 (grub_efi_pci_device_path_t): New type.
9124 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9125 (struct grub_efi_pccard_device_path): New structure.
9126 (grub_efi_pccard_device_path_t): New type.
9127 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9128 (struct grub_efi_memory_mapped_device_path): New structure.
9129 (grub_efi_memory_mapped_device_path_t): New type.
9130 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9131 (struct grub_efi_vendor_device_path): New structure.
9132 (grub_efi_vendor_device_path_t): New type.
9133 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9134 (struct grub_efi_controller_device_path): New structure.
9135 (grub_efi_controller_device_path_t): New type.
9136 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9137 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9138 (struct grub_efi_acpi_device_path): New structure.
9139 (grub_efi_acpi_device_path_t): New type.
9140 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9141 (struct grub_efi_expanded_acpi_device_path): New structure.
9142 (grub_efi_expanded_acpi_device_path_t): New type.
9143 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9144 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9145 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9146 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9147 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9148 (struct grub_efi_atapi_device_path): New structure.
9149 (grub_efi_atapi_device_path_t): New type.
9150 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9151 (struct grub_efi_fibre_channel_device_path): New structure.
9152 (grub_efi_fibre_channel_device_path_t): New type.
9153 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9154 (struct grub_efi_1394_device_path): New structure.
9155 (grub_efi_1394_device_path_t): New type.
9156 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9157 (struct grub_efi_usb_device_path): New structure.
9158 (grub_efi_usb_device_path_t): New type.
9159 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9160 (struct grub_efi_usb_class_device_path): New structure.
9161 (grub_efi_usb_class_device_path_t): New type.
9162 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9163 (struct grub_efi_i2o_device_path): New structure.
9164 (grub_efi_i2o_device_path_t): New type.
9165 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9166 (struct grub_efi_mac_address_device_path): New structure.
9167 (grub_efi_mac_address_device_path_t): New type.
9168 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9169 (struct grub_efi_ipv4_device_path): New structure.
9170 (grub_efi_ipv4_device_path_t): New type.
9171 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9172 (struct grub_efi_ipv6_device_path): New structure.
9173 (grub_efi_ipv6_device_path_t): New type.
9174 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9175 (struct grub_efi_infiniband_device_path): New structure.
9176 (grub_efi_infiniband_device_path_t): New type.
9177 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9178 (struct grub_efi_uart_device_path): New structure.
9179 (grub_efi_uart_device_path_t): New type.
9180 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9181 (struct grub_efi_vendor_messaging_device_path): New structure.
9182 (grub_efi_vendor_messaging_device_path_t): New type.
9183 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9184 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9185 (struct grub_efi_hard_drive_device_path): New structure.
9186 (grub_efi_hard_drive_device_path_t): New type.
9187 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9188 (struct grub_efi_cdrom_device_path): New structure.
9189 (grub_efi_cdrom_device_path_t): New type.
9190 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9191 (struct grub_efi_vendor_media_device_path): New structure.
9192 (grub_efi_vendor_media_device_path_t): New type.
9193 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9194 (struct grub_efi_file_path_device_path): New structure.
9195 (grub_efi_file_path_device_path_t): New type.
9196 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9197 (struct grub_efi_protocol_device_path): New structure.
9198 (grub_efi_protocol_device_path_t): New type.
9199 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9200 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9201 (struct grub_efi_bios_device_path): New structure.
9202 (grub_efi_bios_device_path_t): New type.
9203 (struct grub_efi_disk_io): New structure.
9204 (grub_efi_disk_io_t): New type.
9205 (struct grub_efi_block_io_media): New structure.
9206 (grub_efi_block_io_media_t): New type.
9207 (struct grub_efi_block_io): New structure.
9208 (grub_efi_block_io_t): New type.
9209
9210 * include/grub/misc.h (grub_stop): Removed.
9211 (grub_exit): New prototype.
9212 (grub_abort): Likewise.
9213
9214 * include/grub/disk.h (enum grub_disk_dev_id): Added
9215 GRUB_DISK_DEVICE_EFIDISK_ID.
9216
9217 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9218 disk/efi/efidisk.c.
9219 (kernel_syms.lst): Remove the target if an error occurs.
9220
49986a9f 92212006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9222
9223 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9224 as it was simply too buggy.
9225
970d3b8a 92262006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9227
9228 * kern/misc.c (grub_lltoa): New function.
9229 (grub_vsprintf): Added support for the long long suffix,
9230 i.e. "ll".
9231
ff04ec24 92322006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9233
9234 * Makefile.in (LDFLAGS): Add variable.
9235 (LD): Remove variable.
9236 * configure.ac: Add -m32 to LDFLAGS.
9237 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9238 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9239 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9240 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9241 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9242 variables.
9243 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9244 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9245 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9246
37e5e1a4 92472006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9248
9249 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9250 length for unknown glyph.
9251
c352d8dd 92522006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9253
2eab1c0d 9254 Add support for pre-loaded modules into the EFI port.
f19dbdb7 9255
2eab1c0d 9256 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9257 completely. Accept one more argument DIR. The caller has changed.
9258
9259 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9260
9261 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9262 (grub_efi_loaded_image_guid): New variable.
9263 (grub_efi_get_loaded_image): New function.
9264 (grub_arch_modules_addr): Likewise.
9265
9266 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9267 prototype.
9268
9269 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9270 (struct grub_efi_loaded_image): New structure.
9271 (grub_efi_loaded_image_t): New type.
9272
92732006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9274
c352d8dd 9275 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9276 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9277 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9278
6d01d6b4 92792006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9280
9281 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9282
976a4ea0 92832006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9284
9285 * DISTLIST: Added include/grub/efi/console.h,
9286 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9287 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9288
9289 * include/grub/efi/console.h: New file.
9290 * include/grub/efi/time.h: Likewise.
9291 * include/grub/i386/efi/kernel.h: Likewise.
9292 * kern/efi/init.c: Likewise.
9293 * kern/efi/mm.c: Likewise.
9294 * term/efi/console.c: Likewise.
f19dbdb7 9295
976a4ea0 9296 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9297 (grub_stop): Removed.
9298 (grub_get_rtc): Likewise.
9299 (grub_machine_init): Simply call grub_efi_init.
9300 (grub_machine_fini): Call grub_efi_fini.
9301
9302 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9303 (grub_efi_output_string): Removed.
9304 (grub_efi_stall): New function.
9305 (grub_stop): Likewise.
9306 (grub_get_rtc): Likewise.
9307
9308 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9309 (grub_efi_stall): New prototype.
9310 (grub_efi_allocate_pages): Likewise.
9311 (grub_efi_free_pages): Likewise.
9312 (grub_efi_get_memory_map): Likewise.
9313 (grub_efi_mm_init): Likewise.
9314 (grub_efi_mm_fini): Likewise.
9315 (grub_efi_init): Likewise.
9316 (grub_efi_fini): Likewise.
9317
9318 * include/grub/i386/efi/time.h: Do not include
9319 grub/symbol.h. Include grub/efi/time.h.
9320 (GRUB_TICKS_PER_SECOND): Removed.
9321 (grub_get_rtc): Likewise.
9322
9323 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9324 Added padding. The EFI spec is buggy.
9325 (GRUB_EFI_BLACK): New macro.
9326 (GRUB_EFI_BLUE): Likewise.
9327 (GRUB_EFI_GREEN): Likewise.
9328 (GRUB_EFI_CYAN): Likewise.
9329 (GRUB_EFI_RED): Likewise.
9330 (GRUB_EFI_MAGENTA): Likewise.
9331 (GRUB_EFI_BROWN): Likewise.
9332 (GRUB_EFI_LIGHTGRAY): Likewise.
9333 (GRUB_EFI_BRIGHT): Likewise.
9334 (GRUB_EFI_DARKGRAY): Likewise.
9335 (GRUB_EFI_LIGHTBLUE): Likewise.
9336 (GRUB_EFI_LIGHTGREEN): Likewise.
9337 (GRUB_EFI_LIGHTCYAN): Likewise.
9338 (GRUB_EFI_LIGHTRED): Likewise.
9339 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9340 (GRUB_EFI_YELLOW): Likewise.
9341 (GRUB_EFI_WHITE): Likewise.
9342 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9343 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9344 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9345 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9346 (GRUB_EFI_BACKGROUND_RED): Likewise.
9347 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9348 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9349 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9350 (GRUB_EFI_TEXT_ATTR): Likewise.
9351
9352 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9353 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9354 (kernel_mod_HEADERS): Added efi/time.h.
9355
83709125 93562006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9357
9358 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9359 include/grub/efi/api.h, include/grub/efi/console_control.h,
9360 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9361 include/grub/i386/efi/time.h, kern/efi/efi.c,
9362 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9363 and util/i386/efi/grub-mkimage.c.
9364
9365 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9366
9367 * genmk.rb (PModule#rule): Do not export symbols if
9368 #{prefix}_EXPORTS is set to "no".
9369
9370 * conf/i386-efi.mk: New file.
9371 * conf/i386-efi.rmk: Likewise.
9372 * include/grub/efi/api.h: Likewise.
9373 * include/grub/efi/console_control.h: Likewise.
9374 * include/grub/efi/efi.h: Likewise.
9375 * include/grub/efi/pe32.h: Likewise.
9376 * include/grub/i386/efi/time.h: Likewise.
9377 * kern/efi/efi.c: Likewise.
9378 * kern/i386/efi/init.c: Likewise.
9379 * kern/i386/efi/startup.S: Likewise.
9380 * util/i386/efi/grub-mkimage.c: Likewise.
9381
93822006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 9383
9384 * include/grub/script.h: Include <grub/parser.h> and
9385 "grub_script.tab.h".
9386 (struct grub_lexer_param): New struct.
9387 (struct grub_parser_param): Likewise.
9388 (grub_script_create_arglist): Pass the state in an argument.
9389 (grub_script_add_arglist): Likewise.
9390 (grub_script_create_cmdline): Likewise.
9391 (grub_script_create_cmdblock): Likewise.
9392 (grub_script_create_cmdif): Likewise.
9393 (grub_script_create_cmdmenu): Likewise.
9394 (grub_script_add_cmd): Likewise.
9395 (grub_script_arg_add): Likewise.
9396 (grub_script_lexer_ref): Likewise.
9397 (grub_script_lexer_deref): Likewise.
9398 (grub_script_lexer_record_start): Likewise.
9399 (grub_script_lexer_record_stop): Likewise.
9400 (grub_script_mem_record): Likewise.
9401 (grub_script_mem_record_stop): Likewise.
9402 (grub_script_malloc): Likewise.
9403 (grub_script_yylex): Likewise.
9404 (grub_script_yyparse): Likewise.
9405 (grub_script_yyerror): Likewise.
9406 (grub_script_yylex): Likewise.
9407 (grub_script_lexer_init): Return the state.
9408
9409 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9410 (grub_script_lexer_done): Likewise.
9411 (grub_script_lexer_getline): Likewise.
9412 (grub_script_lexer_refs): Likewise.
9413 (script): Likewise.
9414 (newscript): Likewise.
9415 (record): Likewise.
9416 (recording): Likewise.
9417 (recordpos): Likewise.
9418 (recordlen): Likewise.
9419 (grub_script_lexer_init): Return the state instead of setting
9420 global variables.
9421 (grub_script_lexer_ref): Use the newly added argument for state
9422 instead of globals.
9423 (grub_script_lexer_deref): Likewise.
9424 (grub_script_lexer_record_start): Likewise.
9425 (grub_script_lexer_record_stop): Likewise.
9426 (recordchar): Likewise.
9427 (nextchar): Likewise.
9428 (grub_script_yylex2): Likewise.
9429 (grub_script_yylex): Likewise.
9430 (grub_script_yyerror): Likewise.
9431
9432 * normal/parser.y (func_mem): Removed variable.
9433 (menu_entry): Likewise.
9434 (err): Likewise.
9435 (%lex-param): New parser option.
9436 (%parse-param): Likewise.
9437 (script): Always return the AST.
9438 (argument): Pass the state around.
9439 (arguments): Likewise.
9440 (grubcmd): Likewise.
9441 (commands): Likewise.
9442 (function): Likewise.
9443 (menuentry): Likewise.
9444 (if_statement): Likewise.
9445 (if): Likewise.
9446
9447 * normal/script.c (grub_script_memused): Removed variable.
9448 (grub_script_parsed): Likewise.
9449 (grub_script_malloc): Added a state argument. Use that instead of
9450 global variables.
9451 (grub_script_mem_record): Likewise.
9452 (grub_script_mem_record_stop): Likewise.
9453 (grub_script_arg_add): Likewise.
9454 (grub_script_add_arglist): Likewise.
9455 (grub_script_create_cmdline): Likewise.
9456 (grub_script_create_cmdif): Likewise.
9457 (grub_script_create_cmdmenu): Likewise.
9458 (grub_script_add_cmd): Likewise.
9459 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 9460
e2a8c904 94612006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 9462
9463 * normal/command.c (grub_command_init): Remove the title command.
9464
9465 * normal/lexer.c (grub_script_yylex): Renamed from this...
9466 (grub_script_yylex2): ... to this.
9467 (grub_script_yylex): New function. Temporary
9468 introduced to filter some tokens.
9469 (grub_script_yyerror): Print a newline.
9470
9471 * normal/main.c (read_config_file): Output information about the
9472 lines that contain errors. Wait for a key after all lines have
9473 been processed. Don't return an empty menu.
9474
9475 * normal/parser.y (func_mem): Don't initialize.
9476 (menu_entry): Likewise.
9477 (err): New variable.
9478 (script): Don't return anything when an error was encountered.
9479 (ws, returns): Removed rules.
9480 (argument): Disabled concatenated variable support.
9481 (arguments): Remove explicit separators.
9482 (grubcmd): Likewise.
9483 (function): Likewise.
9484 (menuentry): Likewise.
9485 (if): Likewise.
9486 (commands): Likewise. Add error handling.
9487
9488 * normal/script.c (grub_script_create_cmdline): If
9489 `grub_script_parsed' is 0, assume the parser encountered an error.
9490
c9a86192 94912006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9492
9493 * configure.ac: Add support for EFI. Fix the typo
9494 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9495
70f3b243 94962006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9497
9498 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9499 foreign multibyte characters should be shown correctly.
9500
65f201ad 95012006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9502
9503 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9504 calculation.
9505 (read_config_file): Made it to close file before returning.
9506
b4b93674 95072006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9508
9509 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9510 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9511 video/i386/pc/vbefill.c.
9512
9513 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9514 video/i386/pc/vbefill.c.
9515
9516 * include/grub/video.h (grub_video_blit_format): New enum.
9517 (grub_video_mode_info): Added new member blit_format.
9518 (grub_video_get_blit_format): New function prototype.
9519
9520 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9521 function prototype.
9522 (grub_video_vbe_map_rgb): Likewise.
9523 (grub_video_vbe_unmap_color): Likewise.
9524
9525 * include/grub/i386/pc/vbeblit.h: New file.
9526
9527 * include/grub/i386/pc/vbefill.h: New file.
9528
9529 * video/video.c (grub_video_get_blit_format): New function.
9530 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9531 (grub_video_vbe_map_rgb): Likewise.
9532 (grub_video_vbe_unmap_color): Likewise.
9533
9534 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9535 optimized fills.
9536 (grub_video_vbe_blit_render_target): Changed to use more optimized
9537 blits.
9538 (grub_video_vbe_setup): Added detection for optimized settings.
9539 (grub_video_vbe_create_render_target): Likewise.
9540
9541 * video/i386/pc/vbeblit.c: New file.
9542
9543 * video/i386/pc/vbefill.c: New file.
9544
c2379b9c 95452006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9546
9547 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9548 here...
9549
9550 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9551 parsing to support both hex and dec ranges. If filename was missing
9552 show usage information.
9553
bd0d7896 95542006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9555
9556 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9557 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9558
9559 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9560 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9561 (video_mod_SOURCES): Added.
9562 (video_mod_CFLAGS): Likewise.
9563 (video_mod_LDFLAGS): Likewise.
9564 (gfxterm_mod_SOURCES): Likewise.
9565 (gfxterm_mod_CFLAGS): Likewise.
9566 (gfxterm_mod_LDFLAGS): Likewise.
9567 (videotest_mod_SOURCES): Likewise.
9568 (videotest_mod_CFLAGS): Likewise.
9569 (videotest_mod_LDFLAGS): Likewise.
9570 (vesafb_mod_SOURCES): Removed.
9571 (vesafb_mod_CFLAGS): Likewise.
9572 (vesafb_mod_LDFLAGS): Likewise.
9573 (vga_mod_SOURCES): Likewise.
9574 (vga_mod_CFLAGS): Likewise.
9575 (vga_mod_LDFLAGS): Likewise.
9576
9577 * commands/videotest.c: New file.
9578
9579 * font/manager.c (fill_with_default_glyph): Modified to use
9580 grub_font_glyph.
9581 (grub_font_get_glyph): Likewise.
9582 (fontmanager): Renamed from this...
9583 (font_manager): ... to this.
9584
9585 * include/grub/font.h (grub_font_glyph): Added new structure.
9586 (grub_font_get_glyph): Modified to use grub_font_glyph.
9587
9588 * include/grub/misc.h (grub_abs): Added as inline function.
9589
9590 * include/grub/video.h: New file.
9591
9592 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9593 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9594 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9595 (grub_vbe_get_controller_info): Renamed from this...
9596 (grub_vbe_bios_get_controller_info): ... to this.
9597 (grub_vbe_get_mode_info): Renamed from this...
9598 (grub_vbe_bios_get_mode_info): ... to this.
9599 (grub_vbe_set_mode): Renamed from this...
9600 (grub_vbe_bios_set_mode): ... to this.
9601 (grub_vbe_get_mode): Renamed from this...
9602 (grub_vbe_bios_get_mode): ... to this.
9603 (grub_vbe_set_memory_window): Renamed from this...
9604 (grub_vbe_bios_set_memory_window): ... to this.
9605 (grub_vbe_get_memory_window): Renamed from this...
9606 (grub_vbe_bios_get_memory_window): ... to this.
9607 (grub_vbe_set_scanline_length): Renamed from this...
9608 (grub_vbe_set_scanline_length): ... to this.
9609 (grub_vbe_get_scanline_length): Renamed from this...
9610 (grub_vbe_bios_get_scanline_length): ... to this.
9611 (grub_vbe_set_display_start): Renamed from this...
9612 (grub_vbe_bios_set_display_start): ... to this.
9613 (grub_vbe_get_display_start): Renamed from this...
9614 (grub_vbe_bios_get_display_start): ... to this.
9615 (grub_vbe_set_palette_data): Renamed from this...
9616 (grub_vbe_bios_set_palette_data): ... to this.
9617 (grub_vbe_set_pixel_rgb): Removed.
9618 (grub_vbe_set_pixel_index): Likewise.
9619
9620 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9621 from this...
9622 (grub_vbe_bios_get_controller_info): ... to this.
9623 (grub_vbe_get_mode_info): Renamed from this...
9624 (grub_vbe_bios_get_mode_info): ... to this.
9625 (grub_vbe_set_mode): Renamed from this...
9626 (grub_vbe_bios_set_mode): ... to this.
9627 (grub_vbe_get_mode): Renamed from this...
9628 (grub_vbe_bios_get_mode): ... to this.
9629 (grub_vbe_set_memory_window): Renamed from this...
9630 (grub_vbe_bios_set_memory_window): ... to this.
9631 (grub_vbe_get_memory_window): Renamed from this...
9632 (grub_vbe_bios_get_memory_window): ... to this.
9633 (grub_vbe_set_scanline_length): Renamed from this...
9634 (grub_vbe_set_scanline_length): ... to this.
9635 (grub_vbe_get_scanline_length): Renamed from this...
9636 (grub_vbe_bios_get_scanline_length): ... to this.
9637 (grub_vbe_set_display_start): Renamed from this...
9638 (grub_vbe_bios_set_display_start): ... to this.
9639 (grub_vbe_get_display_start): Renamed from this...
9640 (grub_vbe_bios_get_display_start): ... to this.
9641 (grub_vbe_set_palette_data): Renamed from this...
9642 (grub_vbe_bios_set_palette_data): ... to this.
9643 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9644 getting corrupted after calling it. Added more pushes and pops.
9645 (grub_vbe_bios_set_mode): Likewise.
9646 (grub_vbe_bios_get_mode): Likewise.
9647 (grub_vbe_bios_get_memory_window): Likewise.
9648 (grub_vbe_bios_set_scanline_length): Likewise.
9649 (grub_vbe_bios_get_scanline_length): Likewise.
9650 (grub_vbe_bios_get_display_start): Likewise.
9651 (grub_vbe_bios_set_palette_data): Likewise.
9652
9653 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9654 (cl_insert): Likewise.
9655 (cl_delete): Likewise.
9656
9657 * term/gfxterm.c: New file.
9658
9659 * term/i386/pc/vesafb.c: Removed file.
9660
9661 * video/video.c: New file.
9662
9663 * video/i386/pc/vbe.c (real2pm): Added new function.
9664 (grub_video_vbe_draw_pixel): Likewise.
9665 (grub_video_vbe_get_video_ptr): Likewise.
9666 (grub_video_vbe_get_pixel): Likewise
9667 (grub_video_vbe_init): Likewise.
9668 (grub_video_vbe_fini): Likewise.
9669 (grub_video_vbe_setup): Likewise.
9670 (grub_video_vbe_get_info): Likewise.
9671 (grub_video_vbe_set_palette): Likewise.
9672 (grub_video_vbe_get_palette): Likewise.
9673 (grub_video_vbe_set_viewport): Likewise.
9674 (grub_video_vbe_get_viewport): Likewise.
9675 (grub_video_vbe_map_color): Likewise.
9676 (grub_video_vbe_map_rgb): Likewise.
9677 (grub_video_vbe_map_rgba): Likewise.
9678 (grub_video_vbe_unmap_color): Likewise.
9679 (grub_video_vbe_fill_rect): Likewise.
9680 (grub_video_vbe_blit_glyph): Likewise.
9681 (grub_video_vbe_blit_bitmap): Likewise.
9682 (grub_video_vbe_blit_render_target): Likewise.
9683 (grub_video_vbe_scroll): Likewise.
9684 (grub_video_vbe_swap_buffers): Likewise.
9685 (grub_video_vbe_create_render_target): Likewise.
9686 (grub_video_vbe_delete_render_target): Likewise.
9687 (grub_video_vbe_set_active_render_target): Likewise.
9688 (grub_vbe_set_pixel_rgb): Remove function.
9689 (grub_vbe_set_pixel_index): Likewise.
9690 (index_color_mode): Remove static variable.
9691 (active_mode): Likewise.
9692 (framebuffer): Likewise.
9693 (bytes_per_scan_line): Likewise.
9694 (grub_video_vbe_adapter): Added new static variable.
9695 (framebuffer): Likewise.
9696 (render_target): Likewise.
9697 (initial_mode): Likewise.
9698 (mode_in_use): Likewise.
9699 (mode_list): Likewise.
9700
5f97350b 97012006-03-10 Marco Gerards <marco@gnu.org>
9702
9703 * configure.ac (AC_INIT): Bumped to 1.93.
9704
9705 * DISTLIST: Added `include/grub/hfs.h'.
9706
a3c5c6f8 97072006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9708
9709 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9710 18H, which might help the BIOS falling back to next boot media.
9711
6de53d26 97122006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9713
9714 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9715 Poe Chen <poe.poechen@gmail.com>.
9716
77c4a393 97172006-01-17 Marco Gerards <marco@gnu.org>
9718
9719 * include/grub/normal.h: Include <grub/script.h>.
9720 (grub_command_list): Removed struct.
9721 (grub_command_list_t): Removed type.
9722 (grub_menu_entry): Remove members `num' and `command_list'. Add
9723 members `commands' and `sourcecode'.
9724 * include/grub/script.h: Add inclusion guards.
9725 (grub_script_cmd_menuentry): New struct.
9726 (grub_script_execute_menuentry): New prototype.
9727 (grub_script_lexer_record_start): Likewise.
9728 (grub_script_lexer_record_stop): Likewise.
9729 * normal/execute.c (grub_script_execute_menuentry): New function.
9730 * normal/lexer.c (record, recording, recordpos, recordlen): New
9731 variables.
9732 (grub_script_lexer_record_start): New function.
9733 (grub_script_lexer_record_stop): Likewise.
9734 (recordchar): Likewise.
9735 (nextchar): Likewise.
9736 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9737 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9738 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9739 (current_menu): New variable.
9740 (free_menu): Mainly rewritten.
9741 (grub_normal_menu_addentry): New function.
9742 (read_config_file): Rewritten.
9743 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 9744 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 9745 the menu entry.
9746 (run): Mainly rewritten.
9747 * normal/parser.y (menu_entry): New variable.
9748 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9749 (menuentry): New rule.
9750 (command): Add `menuentry'.
9751 (if_statement): Allow additional returns before `fi'.
9752 * normal/script.c (grub_script_create_cmdmenu): New function.
9753
144f1f98 97542006-01-03 Marco Gerards <marco@gnu.org>
9755
9756 * INSTALL: GNU Bison is required.
9757 * configure.ac: Rewritten the test to detect Bison.
9758 * Makefile.in (YACC): New variable. Reported by Xun Sun
9759 <xun.sun.cn@gmail.com>.
9760
af4b2d89 97612006-01-03 Marco Gerards <marco@gnu.org>
9762
9763 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9764 the HFS+ filesystem to filesystem blocks.
9765 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9766 GCC warning is silenced.
9767
15643b71 97682006-01-03 Marco Gerards <marco@gnu.org>
9769
9770 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9771 read from disk from big endian to host byte order.
9772
00905879 97732006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9774
9775 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9776 documentation.
9777 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9778 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9779 embedded HFS+ filesystem.
9780 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9781 (grub_hfs_sblock): Move from here...
9782 * include/grub/hfs.h: To here... New file.
9783 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9784 documentation.
9785 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9786 New macros.
9787 (grub_hfsplus_volheader): Change type of member `magic' to
9788 `grub_uint16_t'.
9789 (grub_hfsplus_data): Add new member `embedded_offset'.
9790 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9791 returned block.
9792 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9793 Calculate the offset.
9794
8899bc3e 97952005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9796
9797 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9798 Removed.
9799 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9800
ae8c0277 98012005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9802
9803 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9804 ENV->NAME is NULL after allocating ENV->VALUE.
9805
07084456 98062005-12-25 Marco Gerards <marco@gnu.org>
9807
9808 * kern/env.c (grub_env_set): Rewritten the error handling code.
9809
4750f5f1 98102005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9811
9812 * geninit.sh: Made more robust, and more portable.
9813
50214199 98142005-12-25 Marco Gerards <marco@gnu.org>
9815
9816 Add support for Apple HFS+ filesystems.
f19dbdb7 9817
50214199 9818 * fs/hfsplus.c: New file.
9819
9820 * DISTLIST: Added `fs/hfsplus.c'.
9821
9822 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9823 (hfsplus_mod_SOURCES): New variable.
9824 (hfsplus_mod_CFLAGS): Likewise.
9825 (hfsplus_mod_LDFLAGS): Likewise.
9826 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9827 (grub_setup_SOURCES): Likewise.
9828 (grub_mkdevicemap_SOURCES): Likewise.
9829 (grub_emu_SOURCES): Likewise.
9830 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9831
9832 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9833
9834 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9835
befaed6c 98362005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9837
9838 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9839 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9840 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9841 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9842 normal/lexer.c, normal/parser.y, normal/script.c, and
9843 partmap/gpt.c.
9844 Removed kern/sparc64/cache.c.
9845
9846 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9847 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9848 grub_emu_init.c.
9849
9850 * configure.ac (AC_INIT): Bumped to 1.92.
9851
6a124103 98522005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9853
9854 * kern/err.c (grub_error_push): Added new function to support error
9855 stacks.
9856 (grub_error_pop): Likewise.
9857 (grub_error_stack_items): New local variable to support error stacks.
9858 (grub_error_stack_pos): Likewise.
9859 (grub_error_stack_assert): Likewise.
9860 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9861 stack depth.
9862 (grub_print_error): Added support to print errors from error stack.
9863
9864 * include/grub/err.h (grub_error_push): Added function prototype.
9865 (grub_error_pop): Likewise.
9866
be973c1b 98672005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9868
9869 * configure.ac: Accept `powerpc64' as host_cpu.
9870 (amd64): Rename to `biarch32'.
9871
9872 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9873 non-cacheline-aligned addresses.
9874
9875 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9876 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9877 if `size' is non-zero.
9878
b04216ab 98792005-12-03 Marco Gerards <mgerards@xs4all.nl>
9880
9881 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9882 and `cd' to make sure the filename is not prefixed with a
9883 directory name.
9884 (pkgdata_MODULES): Add `gpt.mod'.
9885 (gpt_mod_SOURCES): New variable.
9886 (gpt_mod_CFLAGS): Likewise.
9887 (gpt_mod_LDFLAGS): Likewise.
9888
9889 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9890
9891 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9892 New macro.
9893
9894 * partmap/gpt.c: New file.
9895
9896 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9897 GPT partition map is detected.
9898
41730ed9 98992005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9900
9901 * commands/i386/pc/play.c: New file.
9902 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9903 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9904 macros.
f19dbdb7 9905
95dc3643 99062005-11-27 Marco Gerards <mgerards@xs4all.nl>
9907
9908 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9909 ((unused))' to silence gcc warning.
9910
1569ec51 99112005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9912
9913 * configure.ac: Correct `AC_PROG_YACC' test.
9914
9abde152 99152005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9916
9917 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9918 check before installing files.
9919
44b83271 99202005-11-22 Mike Small <smallm@panix.com>
9921
9922 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9923 number regex so multidigit numbers are recognized correctly.
9924
99252005-11-22 Mike Small <smallm@panix.com>
9926
9927 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9928 debugging message before attempting to claim memory.
9929 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9930 multiple addresses in case of failure.
9931
9c12956b 99322005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9933
9934 * term/tparm.c (get_space): Remove empty `if' statement.
9935
9936 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9937
9938 * kern/parser.c (check_varstate): Rename `state' to 's'.
9939
aeaf81d9 99402005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9941
9942 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9943 variable definitions to the beginning of each function. Sort stack
9944 variables by size.
9945 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9946 `buf' argument to `char *'.
9947
79bbb63f 99482005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9949
9950 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9951 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 9952 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 9953 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9954 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9955 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9956 configfile.mod, search.mod, gzio.mod and test.mod.
9957 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9958 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9959 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9960 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9961 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9962 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9963 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9964 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9965 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9966 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9967 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9968 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9969 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9970 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9971 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9972 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9973 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9974 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9975 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9976 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9977 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9978 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9979 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9980
9981 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9982 `grep --include'.
9983 (pkgdata_MODULES): Add test.mod.
9984
233b1628 99852005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9986
9987 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9988 appending to variables with "+=".
9989 (PModule): Use full pathname to generate *.lst filenames.
9990
9991 * Makefile.in: Fixed list rules moved from genmk.rb.
9992 (.DELETE_ON_ERROR): New special target.
9993 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9994
9995 * conf/i386-pc.rmk: Include conf/common.mk.
9996 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 9997 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 9998 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9999 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10000 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10001 configfile.mod, search.mod, gzio.mod and test.mod.
10002 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10003 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10004 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10005 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10006 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10007 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10008 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10009 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10010 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10011 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10012 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10013 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10014 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10015 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10016 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10017 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10018 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10019 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10020 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10021 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10022 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10023 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10024 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10025 here...
10026 * conf/common.rmk: ... to here. New file.
10027
10028 * conf/common.mk: New file.
10029
16f820c8 100302005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10031
10032 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10033 (grub_script.tab.c): ... here.
10034
10035 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10036 (grub_script.tab.c): ... here.
10037
10038 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10039 (grub_script.tab.c): ... here.
10040
10041 * normal/command.c (grub_command_find): Fixed a memory leak of
10042 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10043
63ba1554 100442005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10045
10046 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10047 "@" which marks the start of a comment on ARM.
10048 (VARIABLE): Likewise.
10049
7f67dc13 100502005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10051
79bbb63f 10052 Add support for Linux/ADFS partition tables.
7f67dc13 10053
10054 * partmap/acorn.c: New file.
10055
10056 * include/grub/acorn_filecore.h: Likewise.
10057
10058 * DISTLIST: Added `partmap/acorn.c' and
10059 `include/grub/acorn_filecore.h'.
f19dbdb7 10060
7f67dc13 10061 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10062 `partmap/acorn.c'.
10063 (pkgdata_MODULES): Add `acorn.mod'.
10064 (acorn_mod_SOURCES): New variable.
10065 (acorn_mod_CFLAGS): Likewise.
10066
10067 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10068 `partmap/acorn.c'.
10069 (pkgdata_MODULES): Add `acorn.mod'.
10070 (acorn_mod_SOURCES): New variable.
10071 (acorn_mod_CFLAGS): Likewise.
10072
10073 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10074 (pkgdata_MODULES): Add `acorn.mod'.
10075 (acorn_mod_SOURCES): New variable.
10076 (acorn_mod_CFLAGS): Likewise.
10077 (acorn_mod_LDFLAGS): Likewise.
10078
10079 * include/types.h (grub_disk_addr_t): New typedef.
10080
6d099807 100812005-11-13 Marco Gerards <mgerards@xs4all.nl>
10082
10083 * geninit.sh: New file.
10084
10085 * geninitheader.sh: Likewise.
10086
10087 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10088 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10089 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10090 * commands/configfile.c (grub_configfile_init)
10091 (grub_configfile_fini): Likewise.
10092 * commands/default.c (grub_default_init, grub_default_fini):
10093 Likewise.
10094 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10095 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10096 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10097 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10098 Likewise.
10099 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10100 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10101 Likewise.
10102 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 10103 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 10104 Likewise.
10105 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10106 Likewise.
fe6b695a 10107 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 10108 Likewise.
10109 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10110 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10111 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10112 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10113 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10114 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10115 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10116 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10117 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10118 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10119 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10120 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10121 * partmap/amiga.c (grub_amiga_partition_map_init)
10122 (grub_amiga_partition_map_fini): Likewise.
10123 * partmap/apple.c (grub_apple_partition_map_init)
10124 (grub_apple_partition_map_fini): Likewise.
10125 * partmap/pc.c (grub_pc_partition_map_init)
10126 (grub_pc_partition_map_fini): Likewise.
10127 * partmap/sun.c (grub_sun_partition_map_init,
10128 grub_sun_partition_map_fini): Likewise.
10129 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10130 Likewise.
10131
10132 * util/grub-emu.c: Include <grub_modules_init.h>.
10133 (main): Don't initialize and de-initialize any modules directly,
10134 use `grub_init_all' and `grub_fini_all' instead.
10135
10136 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10137 `grub_vesafb_mod_init'.
10138 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10139 all users.
10140 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10141 `grub_vga_mod_init'. Updated all users.
10142 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 10143
6d099807 10144 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10145 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10146 rules.
10147
10148 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10149 Generate a function to initialize the module in utilities.
10150 Updated all callers.
10151 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10152 initialize the module in utilities. Updated all callers.
10153
9046bcf0 101542005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10155
10156 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10157 escape sequence and a literal ^L to clear the screen.
10158
10159 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10160 when returning from Open Firmware.
10161
d13ea639 101622005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10163
10164 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10165 (grub_ofconsole_height): Likewise.
10166 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10167 manually insert a '\n'.
10168 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10169 `grub_ofconsole_height'. Return early if these are already set.
10170
a8fcf206 101712005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10172
10173 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10174 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10175 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10176 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10177 and `normal/script.c'.
10178 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10179 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10180 (test_mod_SOURCES): New variable.
10181 (test_mod_CFLAGS): Likewise.
10182 (test_mod_LDFLAGS): Likewise.
10183 (pkgdata_MODULES): Add `test.mod'.
10184 (grub_script.tab.c): New rule.
10185 (grub_script.tab.h): Likewise.
10186
b6b32745 101872005-11-07 Marco Gerards <mgerards@xs4all.nl>
10188
10189 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10190 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10191 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10192 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10193 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10194 (test_mod_SOURCES): New variable.
10195 (test_mod_CFLAGS): Likewise.
10196 (pkgdata_MODULES): Add `test.mod'.
10197 (grub_script.tab.c): New rule.
10198 (grub_script.tab.h): Likewise.
10199
daac212a 102002005-11-06 Marco Gerards <mgerards@xs4all.nl>
10201
10202 Add initial scripting support.
10203
10204 * commands/test.c: New file.
10205 * include/grub/script.h: Likewise.
10206 * normal/execute.c: Likewise.
10207 * normal/function.c: Likewise.
10208 * normal/lexer.c: Likewise.
10209 * normal/parser.y: Likewise.
10210 * normal/script.c: Likewise.
10211
10212 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 10213
daac212a 10214 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10215 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10216 `normal/function.c' and `normal/script.c'.
10217 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10218 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 10219 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10220 variables.
daac212a 10221 (pkgdata_MODULES): Add `test.mod'.
10222 (grub_script.tab.c): New rule.
10223 (grub_script.tab.h): Likewise.
10224
10225 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10226
10227 * include/grub/normal.h (grub_test_init): New prototype.
10228 (grub_test_fini): Likewise.
f19dbdb7 10229
daac212a 10230 * normal/command.c: Include <grub/script.h>.
10231 (grub_command_execute): Rewritten.
f19dbdb7 10232
daac212a 10233 * util/grub-emu.c (main): Call `grub_test_init' and
10234 `grub_test_fini'.
10235
77500b2b 102362005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10237
10238 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10239 to 0.
10240 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10241 there are no pending characters.
10242
e45deb9e 102432005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10244
10245 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10246 `grub_strndup' to drop device arguments. Replace unnecessary
10247 `grub_strndup' with `grub_strdup'.
10248
4ce32619 102492005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10250
10251 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10252 `debug' environment variable has been set.
10253
102542005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 10255
4ce32619 10256 * Makefile.in (install-local): Use $(DATA).
10257 (uninstall): Likewise.
10258 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10259 (sbin_UTILITIES): ... to here.
10260 (sbin_SCRIPTS): New variable.
10261 (grub_install_SOURCES): New variable.
10262 * util/powerpc/ieee1275/grub-install.in: New file.
10263 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10264 variable.
10265 (add_segments): Call `grub_util_get_path'.
10266
25fe6f03 102672005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10268
10269 From Timothy Baldwin:
10270 * commands/ls.c (grub_ls_list_files): Close FILE with
10271 grub_file_close.
10272 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10273
04ccf3ec 102742005-10-24 Marco Gerards <mgerards@xs4all.nl>
10275
10276 * include/grub/parser.h: New file.
10277
10278 * kern/parser.c: Likewise.
10279
10280 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10281 (grub_setup_SOURCES): Likewise.
10282 (grub_probefs_SOURCES): Likewise.
10283 (grub_emu_SOURCES): Likewise.
10284 (kernel_img_HEADERS): Add `parser.h'.
10285
10286 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10287 (grub_emu_SOURCES): Add `kern/parser.c'.
10288 (grubof_SOURCES): Likewise.
10289
10290 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10291 (grubof_SOURCES): Add `kern/parser.c'.
10292
10293 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10294
10295 * kern/misc.c (grub_split_cmdline): Removed function.
10296
10297 * kern/rescue.c: Include <grub/parser.h>.
10298 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10299 of `grub_split_cmdline'.
10300
10301 * normal/command.c: Include <grub/parser.h>.
10302 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10303 of `grub_split_cmdline'.
10304
10305 * normal/completion.c: Include <grub/parser.h>.
10306 (cmdline_state): New variable.
10307 (iterate_dir): End the filename with a quote depending on the
10308 command line state.
10309 (get_state): new function.
10310 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10311 split the arguments and determine the current argument. When the
10312 argument string is not quoted, escape all spaces.
10313
6d8f4b0e 103142005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10315
10316 * normal/sparc64/setjmp.S: New file.
10317
15cf03ed 103182005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10319
10320 * include/grub/sparc64/libgcc.h: New file.
10321 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10322 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10323 normal/sparc64/setjmp.c.
10324
03e8661a 103252005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10326
10327 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10328 * kern/sparc64/cache.S: New file.
10329 * kern/sparc64/cache.c: Removed.
10330 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10331 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10332 -mtune=ultrasparc.
10333 (COMMON_LDFLAGS): Add -melf64_sparc.
10334 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10335 (grubof_SOURCES): Use cache.S instead of cache.c.
10336 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10337 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10338 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10339 commented though.
10340 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10341 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10342 (linux_mod_CFLAGS): Commented out.
10343 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10344 out because module isn't built.
10345 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10346 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10347 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10348 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10349 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10350 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10351 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10352 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10353 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10354 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10355 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10356 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10357 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10358 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10359
34eeec8a 103602005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10361
10362 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10363 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10364 longer, because HFS should not be used on PC.
10365
708367a3 103662005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10367
10368 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10369 consistently within the loop.
10370
6fa1251a 103712005-10-15 Marco Gerards <mgerards@xs4all.nl>
10372
10373 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10374 directory can not be read.
10375
4801580b 103762005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10377
10378 * configure.ac (AC_INIT): Increase the version number to 1.91.
10379
10380 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10381 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10382 term/i386/pc/serial.c.
10383
219ad426 103842005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10385
10386 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10387 file size must be permitted.
10388
10389 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10390 between %ah and %al.
10391
688e5699 103922005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10393
10394 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10395 grub_uint64_t.
10396 Call the hook with a NUL-terminated filename.
10397 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10398 grub_cpu_to_be32.
10399
10400 * kern/term.c (cursor_state): New variable.
10401 (grub_term_set_current): Reset the cursor state on a new
10402 terminal.
10403 (grub_setcursor): Rewritten to use CURSOR_STATE.
10404 (grub_getcursor): New function.
10405
10406 * include/grub/term.h (grub_getcursor): New prototype.
10407
10408 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10409 integers on ARM. Reported by Timothy Baldwin
10410 <T.E.Baldwin99@members.leeds.ac.uk>.
10411
bb34586c 104122005-10-11 Marco Gerards <mgerards@xs4all.nl>
10413
10414 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10415 allocated.
10416 (grub_sfs_dir): Likewise.
10417
9a909877 104182005-10-09 Marco Gerards <mgerards@xs4all.nl>
10419
10420 Add support for the SFS filesystem.
10421
10422 * fs/sfs.c: New file.
10423
10424 * DISTLIST: Added `fs/sfs.c'.
10425
10426 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10427 (grub_probefs_SOURCES): Likewise.
10428 (grub_emu_SOURCES): Likewise.
10429 (pkgdata_MODULES): Add `sfs.mod'.
10430 (sfs_mod_SOURCES): New variable.
10431 (sfs_mod_CFLAGS): Likewise.
10432 (sfs_mod_LDFLAGS): Likewise.
10433
10434 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10435 (pkgdata_MODULES): Add `sfs.mod'.
10436 (sfs_mod_SOURCES): New variable.
10437 (sfs_mod_CFLAGS): Likewise.
10438
10439 * util/grub-emu.c (main): Call `grub_sfs_init' and
10440 `grub_sfs_fini'.
10441
10442 * include/grub/fs.h (grub_sfs_init): New prototype.
10443 (grub_sfs_fini): Likewise.
10444
57bdbde3 104452005-10-07 Marco Gerards <mgerards@xs4all.nl>
10446
10447 Add support for the AFFS filesystem.
10448
10449 * fs/affs.c: New file.
10450
10451 * DISTLIST: Added `fs/affs.c'.
10452
10453 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10454 (grub_probefs_SOURCES): Likewise.
10455 (grub_emu_SOURCES): Likewise.
10456 (pkgdata_MODULES): Add `affs.mod'.
10457 (affs_mod_SOURCES): New variable.
10458 (affs_mod_CFLAGS): Likewise.
10459 (affs_mod_LDFLAGS): Likewise.
10460
10461 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10462 (pkgdata_MODULES): Add `affs.mod'.
10463 (affs_mod_SOURCES): New variable.
10464 (affs_mod_CFLAGS): Likewise.
10465
10466 * util/grub-emu.c (main): Call `grub_affs_init' and
10467 `grub_affs_fini'.
10468
10469 * include/grub/fs.h (grub_affs_init): New prototype.
10470 (grub_affs_fini): Likewise.
10471
047b67e0 104722005-10-01 Marco Gerards <mgerards@xs4all.nl>
10473
10474 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10475
59b8208a 104762005-10-01 Marco Gerards <mgerards@xs4all.nl>
10477
10478 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10479 `-m32' to CFLAGS.
10480
10481 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10482 linking.
f19dbdb7 10483
59b8208a 10484 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10485 (COMMON_LDFLAGS): New variable.
10486 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10487 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10488 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10489 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10490 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10491 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10492 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10493 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10494 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10495 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10496 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10497 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10498 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10499 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10500 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10501 variables.
10502 (normal_mod_ASFLAGS): Add `-m32'.
10503
10504 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10505 (grub_host_size_t, grub_host_ssize_t): New types.
10506 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 10507 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 10508 `GRUB_HOST_SIZEOF_VOID_P'.
10509
10510 * include/grub/kernel.h (struct grub_module_header): Type of
10511 member offset changed to `grub_host_off_t'. Type of member size
10512 changed to `grub_host_size_t'.
10513 (struct grub_module_info): Type of member offset changed to
10514 `grub_host_off_t'. Type of member size changed to
10515 `grub_host_size_t'.
10516
b4093103 105172005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10518
10519 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 10520
b4093103 10521 * kern/i386/pc/startup.S (multiboot_header): New label.
10522 (multiboot_entry): Likewise.
10523 (multiboot_trampoline): Likewise.
10524
10525 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10526 Increased to 0x4A0.
10527
10528 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10529 put parentheses after a question mark.
10530 [!GRUB_UTIL] (my_mod): New variable.
10531
10532 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10533
b2499b29 105342005-09-28 Marco Gerards <mgerards@xs4all.nl>
10535
10536 Adds support for the XFS filesystem. Btrees are not supported
10537 yet.
10538
10539 * fs/xfs.c: New file.
10540
10541 * DISTLIST: Added `fs/xfs.c'.
10542
10543 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10544 (grub_probefs_SOURCES): Likewise.
10545 (grub_emu_SOURCES): Likewise.
10546 (pkgdata_MODULES): Add `xfs.mod'.
10547 (xfs_mod_SOURCES): New variable.
10548 (xfs_mod_CFLAGS): Likewise.
10549
10550 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10551 (pkgdata_MODULES): Add `xfs.mod'.
10552 (xfs_mod_SOURCES): New variable.
10553 (xfs_mod_CFLAGS): Likewise.
10554
10555 * util/grub-emu.c (main): Call `grub_xfs_init' and
10556 `grub_xfs_fini'.
10557
10558 * include/grub/fs.h (grub_xfs_init): New prototype.
10559 (grub_xfs_fini): Likewise.
10560
f19dbdb7 10561
83d37a62 105622005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10563
10564 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10565 color modes, allow greater than 16 colors to be configured as
10566 a default palette.
10567
47d2d65e 105682005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10569
10570 * normal/completion.c (complete_arguments): Add the qualifier
10571 const into OPTIONS.
10572
10573 From Omniflux <omniflux+lists@omniflux.com>:
10574 * include/grub/terminfo.h: New file.
10575 * include/grub/tparm.h: Likewise.
10576 * include/grub/i386/pc/serial.h: Likewise.
10577 * term/terminfo.c: Likewise.
10578 * term/tparm.c: Likewise.
10579 * term/i386/pc/serial.c: Likewise.
10580 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10581 serial.mod.
10582 (terminfo_mod_SOURCES): New variable.
10583 (terminfo_mod_CFLAGS): Likewise.
10584 (serial_mod_SOURCES): Likewise.
10585 (serial_mod_CFLAGS): Likewise.
10586
48b671ff 105872005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10588
10589 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10590 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10591 and kern/powerpc/ieee1275/cmain.c, respectively.
10592
10593 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10594 * kern/powerpc/ieee1275/crt0.S: ... here.
10595
10596 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10597 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 10598
48b671ff 10599 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10600 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10601 instead of boot/powerpc/ieee1275/crt0.S and
10602 boot/powerpc/ieee1275/cmain.c, respectively.
10603
10604 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10605 sectors. It was not used anyway.
10606
09fc77a7 106072005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10608
10609 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10610 `unused parameter' warning.
10611
003789c7 106122005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10613
10614 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10615 function.
10616 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10617 getcharwidth.
10618
67f44c86 106192005-08-28 Marco Gerards <metgerards@student.han.nl>
10620
10621 * include/grub/normal.h (enum grub_completion_type): Added
10622 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10623
10624 * normal/cmdline.c (print_completion): Handle
10625 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10626 * normal/menu_entry.c (store_completion): Likewise.
10627
10628 * normal/completion.c (complete_arguments): New function.
10629 (grub_normal_do_completion): Call `complete_arguments' when the
10630 current words start with a dash.
10631
0b5abe02 106322005-08-27 Marco Gerards <metgerards@student.han.nl>
10633
10634 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10635 `gzio.mod' instead of `io.mod').
10636
d9864ee1 106372005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10638
10639 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10640 (DISTDIRS): Added io and video.
10641 Rewrite the search routine to make an output consistently.
10642
10643 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10644 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10645 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10646 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10647 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10648 util/powerpc/ieee1275/misc.c.
f19dbdb7 10649
d9864ee1 10650 * include/grub/gzio.h: New file.
10651 * io/gzio.c: Likewise.
f19dbdb7 10652
d9864ee1 10653 * kern/file.c (grub_file_close): Call grub_device_close only if
10654 FILE->DEVICE is not NULL.
10655
10656 * include/grub/mm.h [!NULL] (NULL): New macro.
10657
10658 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10659
10660 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10661 (pkgdata_MODULES): Added gzio.mod.
10662 (gzio_mod_SOURCES): New variable.
10663 (gzio_mod_CFLAGS): Likewise.
10664
10665 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10666 (pkgdata_MODULES): Added gzio.mod.
10667 (gzio_mod_SOURCES): New variable.
10668 (gzio_mod_CFLAGS): Likewise.
10669
10670 * commands/cat.c: Include grub/gzio.h.
10671 (grub_cmd_cat): Use grub_gzfile_open instead of
10672 grub_file_open.
f19dbdb7 10673
d9864ee1 10674 * commands/cmp.c: Include grub/gzio.h.
10675 (grub_cmd_cmp): Use grub_gzfile_open instead of
10676 grub_file_open.
10677
10678 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10679 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10680 grub_file_open.
10681 (grub_rescue_cmd_module): Likewise.
10682
fa46f4b5 106832005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10684
10685 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10686 kern/sparc64/ieee1275/init.c because it contains _start.
10687 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10688
e9211b5d 106892005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10690
10691 * configure.ac: Add support for sparc64 host with ieee1275
10692 firmware.
10693 * configure: Generated from configure.ac.
10694 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10695 instead of int.
10696 (grub_ofdisk_read): Likewise.
10697 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10698 pointers as (void *) to remove a warning.
10699 (grub_ofdisk_close): Likewise.
10700 (grub_ofdisk_read): Likewise.
10701 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10702 returns, so make it return void to remove a warning.
10703 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10704 Corresponding prototype change.
10705 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10706 values, and cast the pointers as (void *) to remove a warning.
10707 (grub_mm_dump): Likewise.
10708 * conf/sparc64-ieee1275.mk: New file.
10709 * conf/sparc64-ieee1275.rmk: Likewise.
10710 * include/grub/sparc64/setjmp.h: Likewise.
10711 * include/grub/sparc64/types.h: Likewise.
10712 * include/grub/sparc64/ieee1275/console.h: Likewise.
10713 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10714 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10715 * include/grub/sparc64/ieee1275/time.h: Likewise.
10716 * kern/sparc64/cache.c: Likewise.
10717 * kern/sparc64/dl.c: Likewise.
10718 * kern/sparc64/ieee1275/init.c: Likewise.
10719 * kern/sparc64/ieee1275/openfw.c: Likewise.
10720
385c6a92 107212005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10722
10723 * util/console.c (grub_ncurses_putchar): If C is greater than
10724 0x7f, set C to a question mark.
10725 (grub_ncurses_getcharwidth): New function.
10726 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10727 getcharwidth.
10728
10729 * normal/menu.c (print_entry): Made aware of Unicode. First,
10730 convert TITLE to UCS-4, and predict the cursor position by
10731 grub_getcharwidth.
10732
10733 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10734 const to SRC.
10735 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10736
16ccb8b1 107372005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10738
10739 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10740 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10741 grub_strcat.
10742
10743 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10744 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10745 grub_strcpy and grub_strlen. Take it into account that a space
10746 character is inserted as a delimiter.
10747
6a85ce79 107482005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10749
10750 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 10751 invalid magic in the error.
6a85ce79 10752
10753 * commands/search.c: New file.
f19dbdb7 10754
6a85ce79 10755 * util/grub-emu.c (main): Call grub_search_init and
10756 grub_search_fini.
10757
10758 * kern/rescue.c (grub_rescue_print_disks): Removed.
10759 (grub_rescue_print_devices): New function.
10760 (grub_rescue_cmd_ls): Use grub_device_iterate with
10761 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10762 grub_rescue_print_disks.
10763
10764 * kern/partition.c (grub_partition_iterate): Return the result of
10765 PARTMAP->ITERATE instead of GRUB_ERRNO.
10766
10767 * kern/device.c: Include grub/partition.h.
10768 (grub_device_iterate): New function.
10769
10770 * include/grub/partition.h (grub_partition_iterate): Return int
10771 instead of grub_err_t.
10772
10773 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10774 prototype.
10775 [GRUB_UTIL] (grub_search_fini): Likewise.
10776
10777 * include/grub/device.h (grub_device_iterate): New prototype.
10778
10779 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10780 commands/search.c.
10781 (pkgdata_MODULES): Added search.mod.
10782 (search_mod_SOURCES): New variable.
10783 (search_mod_CFLAGS): Likewise.
10784
10785 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10786 (pkgdata_MODULES): Added search.mod.
10787 (search_mod_SOURCES): New variable.
10788 (search_mod_CFLAGS): Likewise.
10789
10790 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10791 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10792 All callers changed.
10793
10794 * DISTLIST: Added commands/search.c.
10795
ef095434 107962005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10797
10798 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10799 conversion.
10800 (grub_getcharwidth): New function.
10801
10802 * kern/misc.c (grub_utf8_to_ucs4): New function.
10803
10804 * include/grub/term.h (struct grub_term): Added a new member
10805 "getcharwidth".
10806 (grub_getcharwidth): New prototype.
10807
10808 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10809
10810 * term/i386/pc/console.c (map_char): New function. Segregated from
10811 grub_console_putchar.
10812 (grub_console_putchar): Use map_char.
10813 (grub_console_getcharwidth): New function.
10814 (grub_console_term): Specified grub_console_getcharwidth as
10815 getcharwidth.
10816
10817 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10818 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10819
10820 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10821 GRUB_ERRNO.
10822 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10823 on grub_strtoul completely.
10824 (write_char): Declare local variables in the beginning of the
10825 function.
10826 (grub_vesafb_getcharwidth): New function.
10827 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10828 getcharwidth.
10829
1f0a95e4 108302005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10831
10832 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10833 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10834 commands/i386/pc/vbetest.c.
10835
10836 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10837 call grub_vbe_get_controller_info again, because the returned
10838 information is volatile.
10839 (grub_vbe_set_video_mode): Mostly rewritten.
10840 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10841 grub_vbe_status_t correctly.
10842 (grub_vbe_get_video_mode_info): Likewise.
10843 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10844 several if statements.
10845
10846 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10847 * commands/i386/pc/vbeinfo.c: ... this.
10848
10849 * commands/i386/pc/vbe_test.c: Renamed to ...
10850 * commands/i386/pc/vbetest.c: ... this.
10851
10852 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10853 ...
10854 (grub_cmd_vbeinfo): ... this. Save video modes before
10855 iterating. Skip a video mode, if it is not available, not enough
10856 information is given or it is monochrome. Show the memory
10857 model. Leave the interpretation of MODEVAR to grub_strtoul
10858 completely.
10859 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10860 (GRUB_MOD_FINI): Likewise.
10861
10862 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10863 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10864 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10865 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10866 grub_strtoul completely.
10867 (real2pm): Removed.
10868 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10869 (GRUB_MOD_FINI): Likewise.
10870
10871 * normal/misc.c: Include grub/mm.h.
10872
10873 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10874 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10875 (vbe_list_modes_mod_SOURCES): Removed.
10876 (vbe_list_modes_mod_CFLAGS): Likewise.
10877 (vbe_test_mod_SOURCES): Likewise.
10878 (vbe_test_mod_CFLAGS): Likewise.
10879 (vbeinfo_mod_SOURCES): New variable.
10880 (vbeinfo_mod_CFLAGS): Likewise.
10881 (vbetest_mod_SOURCES): Likewise.
10882 (vbetest_mod_CFLAGS): Likewise.
10883
992ffbbe 108842005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10885
10886 * normal/misc.c: New file.
10887
10888 * DISTLIST: Added normal/misc.c.
f19dbdb7 10889
992ffbbe 10890 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10891 DISK to HOOK. Call HOOK with DISK.
10892 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10893 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10894 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10895
10896 * normal/menu_entry.c (struct screen): Added a new member
10897 "completion_shown".
10898 (completion_buffer): New global variable.
10899 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10900 (store_completion): New function.
10901 (complete): Likewise.
10902 (clear_completions): Likewise.
10903 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10904 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10905 a tab, call complete.
10906
10907 * normal/completion.c (disk_dev): Removed.
10908 (print_simple_completion): Likewise.
10909 (print_partition_completion): Likewise.
10910 (print_func): New global variable.
10911 (add_completion): Do not take the arguments WHAT or PRINT any
10912 longer. Added a new argument TYPE. Instead of printing directly,
10913 call PRINT_FUNC if not NULL.
10914 All callers changed.
10915 (complete_device): Use a local variable DEV instead of
10916 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10917 (grub_normal_do_completion): Take a new argument HOOK. Do not
10918 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10919 empty string, return NULL instead.
10920 All callers changed.
10921
10922 * normal/cmdline.c (print_completion): New function.
10923
10924 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10925 to HOOK.
10926 All callers changed.
10927
10928 * kern/disk.c (grub_print_partinfo): Removed.
10929
10930 * include/grub/partition.h (struct grub_partition_map): Add a new
10931 argument DISK into HOOK of ITERATE.
10932 (grub_partition_iterate): Add a new argument DISK to HOOK.
10933
10934 * include/grub/normal.h (enum grub_completion_type): New enum.
10935 (grub_completion_type_t): New type.
10936 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10937 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10938 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10939 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10940 (grub_normal_do_completion): Added a new argument HOOK.
10941 (grub_normal_print_device_info): New prototype.
10942
10943 * include/grub/disk.h (grub_print_partinfo): Removed.
10944
10945 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10946 (normal_mod_SOURCES): Likewise.
10947 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10948 (normal_mod_SOURCES): Likewise.
10949
10950 * commands/ls.c (grub_ls_list_disks): Use
10951 grub_normal_print_device_info instead of grub_print_partinfo. Free
10952 PNAME.
10953 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10954 duplicating the code.
10955
0bd41162 109562005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10957
10958 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 10959 follow GCS more precisely.
10960 * commands/i386/pc/vbe_test.c: Likewise.
10961 * include/grub/i386/pc/vbe.h: Likewise.
10962 * term/i386/pc/vesafb.c: Likewise.
10963 * video/i386/pc/vbe.c: Likewise.
0bd41162 10964
6323696a 109652005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10966
10967 * DISTLIST: Added term/i386/pc/vesafb.c
10968 DISTLIST: Added video/i386/pc/vbe.c
10969 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10970 DISTLIST: Added commands/i386/pc/vbe_test.c.
10971 * commands/i386/pc/vbe_list_modes.c: New file.
10972 * commands/i386/pc/vbe_test.c: Likewise.
10973 * term/i386/pc/vesafb.c: Likewise.
10974 * video/i386/pc/vbe.c: Likewise.
10975 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10976 (grub_vbe_probe) Added prototype.
10977 (grub_vbe_set_video_mode) Likewise.
10978 (grub_vbe_get_video_mode) Likewise.
10979 (grub_vbe_get_video_mode_info) Likewise.
10980 (grub_vbe_set_pixel_rgb) Likewise.
10981 (grub_vbe_set_pixel_index) Likewise.
10982 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10983 (pkgdata_MODULES): Added vesafb.mod.
10984 (pkgdata_MODULES): Added vbe_list_modes.mod.
10985 (pkgdata_MODULES): Added vbe_test.mod.
10986 (vbe_mod_SOURCES): Added.
10987 (vbe_mod_CFLAGS): Likewise.
10988 (vesafb_mod_SOURCES): Likewise.
10989 (vesafb_mod_CFLAGS): Likewise.
10990 (vbe_list_modes_mod_SOURCES): Likewise.
10991 (vbe_list_modes_mod_CFLAGS): Likewise.
10992 (vbe_test_mod_SOURCES): Likewise.
10993 (vbe_test_mod_CFLAGS): Likewise.
10994
0a74e62f 109952005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10996
0a74e62f 10997 * normal/command.c (grub_command_execute): If INTERACTIVE is
10998 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10999 CMDLINE. Disable the pager if INTERACTIVE is true.
11000 All callers are changed.
11001
11002 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11003 before reading a config file.
11004 * normal/main.c (read_config_file): Even if a command is not
11005 found, register it if it is within an entry.
11006
11007 * util/grub-emu.c: Include sys/types.h and unistd.h.
11008 (options): Added --hold.
11009 (struct arguments): Added a new member "hold".
11010 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11011 missing.
11012 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11013 cleared by a debugger, if it is not zero.
11014
11015 * include/grub/normal.h (grub_command_execute): Add an argument
11016 INTERACTIVE.
11017
e51f85ae 110182005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11019
11020 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11021
e9c6f39b 110222005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11023
11024 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11025 program with another one, because the old one didn't detect a bug
11026 in gcc-3.4. Always use regparm 2, because the new test is still
11027 not enough for gcc-4.0. Someone must investigate a simple test
11028 case which detects a bug in gcc-4.0.
11029
8de3495c 110302005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11031
11032 * DISTLIST: Added normal/completion.c.
11033
11034 * normal/completion.c: New file.
f19dbdb7 11035
8de3495c 11036 * term/i386/pc/console.c (grub_console_getwh): New function.
11037 (grub_console_term): Assign grub_console_getwh to getwh.
11038
11039 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11040 function is defined in normal/completion.c as
11041 grub_normal_do_completion.
11042 (grub_cmdline_get): Use grub_normal_do_completion instead of
11043 grub_tab_complete.
11044
11045 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11046 returns non-zero, otherwise return 0.
11047 (grub_partition_iterate): First, probe the partition map. Then,
11048 call ITERATE only for this partition map.
11049
11050 * kern/misc.c (grub_strncmp): Rewritten.
11051
11052 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11053 returns non-zero. Otherwise return 0.
11054
11055 * include/grub/partition.h (grub_partition_map_iterate): Return
11056 int instead of void.
11057
11058 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11059
11060 * include/grub/misc.h (grub_strncmp): Change the type of N to
11061 grub_size_t.
11062
11063 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11064 of void.
11065
11066 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 11067 unsigned explicitly before comparing it with I.
8de3495c 11068
11069 * kern/main.c (grub_env_write_root): Add the attribute unused into
11070 VAR.
11071
11072 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11073 normal/completion.c.
11074 (normal_mod_SOURCES): Likewise.
11075 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11076 (normal_mod_SOURCES): Likewise.
11077
11078 * normal/command.c (grub_iterate_commands): If ITERATE returns
11079 non-zero, return one immediately.
11080
e85e144b 110812005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11082
11083 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11084 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11085 descriptions.
11086 (grub_vbe_get_controller_info): New function.
11087 (grub_vbe_get_mode_info): Likewise.
11088 (grub_vbe_set_mode): Likewise.
11089 (grub_vbe_get_mode): Likewise.
11090 (grub_vbe_set_memory_window): Likewise.
11091 (grub_vbe_get_memory_window): Likewise.
11092 (grub_vbe_set_scanline_length): Likewise.
11093 (grub_vbe_get_scanline_length): Likewise.
11094 (grub_vbe_set_display_start): Likewise.
11095 (grub_vbe_get_display_start): Likewise.
11096 (grub_vbe_set_palette_data): Likewise.
11097 * include/grub/i386/pc/vbe.h: New file.
11098
c46153d2 110992005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11100
11101 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11102 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11103 * DISTLIST: Likewise.
11104 * kern/ieee1275/of.c: Moved to ...
11105 * kern/ieee1275/ieee1275.c: ... here.
11106
0cb90c45 111072005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11108
11109 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11110 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11111 Pass 0 as `end' parameter to grub_strtoul().
11112
a19fb360 111132005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11114
11115 * include/grub/powerpc/ieee1275/console.h: Do not include
11116 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11117 ifdef.
11118 (grub_console_cur_color): Remove i386-specific prototype.
11119 (grub_console_real_putchar): Likewise.
11120 (grub_console_checkkey): Likewise.
11121 (grub_console_getkey): Likewise.
11122 (grub_console_getxy): Likewise.
11123 (grub_console_gotoxy): Likewise.
11124 (grub_console_cls): Likewise.
11125 (grub_console_setcursor): Likewise.
11126 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11127 Include <grub/machine/console.h>.
11128 * term/ieee1275/ofconsole.c: Likewise.
11129
4ac9bd04 111302005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11131
11132 * Makefile.in (LIBLZO): New variable.
11133
11134 * configure.ac: Check for LZO version 2.
11135
11136 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11137 lzo/lzo1x.h instead of lzo1x.h.
11138
11139 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11140 of -llzo.
11141
11142 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11143 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11144
11145 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11146 copying the data from PARTITION to P.
11147
f4917dfd 111482005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11149
11150 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11151 negative, unload the module.
11152
11153 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11154 map is "pc_partition_map" but not "pc".
11155 (usage): Fix the description. The options are --boot-image and
11156 --core-image but not --boot-file or --core-file.
11157 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11158 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11159 DEFAULT_DIRECTORY.
11160
11161 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11162 --core-file. Specify INSTALL_DEVICE as an argument.
11163
11164 * util/console.c: Include config.h.
11165 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11166 [HAVE_NCURSES_H]: Include ncurses.h.
11167 [HAVE_CURSES_H]: Include curses.h.
11168 [!A_NORMAL] (A_NORMAL): Defined as zero.
11169 [!A_STANDOUT] (A_STANDOUT): Likewise.
11170
11171 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11172 -lncurses.
11173 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11174
11175 * configure.ac: Check for curses libraries and headers.
11176
11177 * Makefile.in (LIBCURSES): New variable.
11178
11179 * genmk.rb (Script::rule): Set the executable bits.
11180
11181 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11182 name of the PC partition map is "pc_partition_map" but not "pc".
11183
0e143073 111842005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11185
11186 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11187 (modules): Likewise.
11188 (usage): Added descriptions for --modules and --grub-probefs.
11189 Handle --modules and --grub-probefs. Save the arguments in MODULES
11190 and GRUB_PROBEFS, respectively.
11191 Auto-detect a filesystem module against GRUBDIR. If the result is
11192 empty and modules are not specified explicitly, abort the
11193 installation. Add the result to MODULES.
11194
11195 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11196 disk/powerpc/ieee1275/ofdisk.c,
11197 include/grub/powerpc/ieee1275/init.h and
11198 term/powerpc/ieee1275/ofconsole.c.
11199 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11200 term/ieee1275/ofconsole.c.
11201
11202 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11203
11204 * COPYING: Upgraded to the latest version. Only the address of the
11205 FSF office has changed.
f19dbdb7 11206
efd6e6d5 112072005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11208
11209 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11210 kern/ieee1275.c with kern/ieee1275/of.c.
11211
11212 * kern/ieee1275.c: Moved to ...
11213 * kern/ieee1275/of.c: ... here.
11214
8ceafda2 112152005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11216
11217 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 11218 readability.
8ceafda2 11219
11220 * config.guess: Updated to the latest version from gnulib.
11221 * config.sub: Likewise.
11222 * install.sh: Likewise.
11223 * mkinstalldirs: Likewise.
11224
11225 * include/grub/console.h: Removed. This file is arch-specific. Do
11226 not put this in include/grub.
11227
11228 * include/grub/i386/pc/console.h: Resurrected.
11229
11230 * util/console.c: Include grub/machine/console.h instead of
11231 grub/console.h.
11232 * util/grub-emu.c: Likewise.
11233
267f6cd9 112342005-08-04 Marco Gerards <metgerards@student.han.nl>
11235
11236 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11237 hardcoded value.
f19dbdb7 11238
267f6cd9 11239 From Vincent Pelletier <subdino2004@yahoo.fr>
11240 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11241 Redefined to use grub_getwh.
11242 (grub_term): New member named getwh.
11243 (grub_getwh): New prototype.
11244 * kern/term.c (grub_getwh): New function.
11245 * term/i386/pc/console.c (grub_console_getwh): New function.
11246 (grub_console_term): New member `getwh'.
11247 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11248 (grub_vga_term): New member `getwh'.
0b5abe02 11249 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 11250 grub_ssize_t.
11251 (grub_ofconsole_getw): New function.
11252 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11253 (grub_ofconsole_term): New field named getwh and new initial
11254 value.
11255
3be7266d 112562005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11257
11258 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11259 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11260 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11261 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11262 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11263 of <grub/machine/ieee1275.h>.
11264 * commands/ieee1275/reboot.c: Likewise.
11265 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11266 * kern/ieee1275.c: ... to here. All users updated. Change all
11267 parameter structs to use new type `grub_ieee1275_cell_t'.
11268 * term/powerpc/ieee1275/ofconsole.c: Move ...
11269 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11270 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11271 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11272 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11273 to return int.
11274 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11275 Remove unused prototypes. All users updated.
11276 * include/grub/powerpc/ieee1275/console.h: Removed.
11277 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11278 `grub_ieee1275_cell_t'.
11279 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11280 Cast comparisons with -1 to the correct type.
11281 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11282 type to match `grub_ieee1275_entry_fn'.
11283
8b5f3938 112842005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11285
11286 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11287
11288 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11289 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11290 partmap/sun.c.
11291 (grub_probefs_SOURCES): New variable.
11292
11293 * util/i386/pc/grub-probefs.c: New file.
11294
11295 * util/i386/pc/grub-setup.c (main): Call
11296 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11297 grub_hfs_init and grub_jfs_init to initialize the system. Call
11298 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11299 grub_pc_partition_map_fini to finish the system.
11300
ea409713 113012005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11302
11303 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11304 function.
11305 (grub_multiboot_load_elf32): Likewise.
11306 (grub_multiboot_is_elf64): Likewise.
11307 (grub_multiboot_load_elf64): Likewise.
11308 (grub_multiboot_load_elf): Likewise.
11309 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11310 an ELF32 or ELF64 file.
11311 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11312
11313 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11314 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11315 NULL before calling FS->LABEL.
11316 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11317 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11318 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11319 before calling FS->LABEL.
11320
141a288b 113212005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11322
11323 * util/i386/pc/grub-install.in (datadir): New variable.
11324 (libdir): Removed.
11325 (pkgdatadir): New variable.
11326 (pkglibdir): Removed.
11327
0d5f8a54 113282005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11329
11330 * DISTLIST: Added util/i386/pc/grub-install.in.
11331
11332 * util/i386/pc/grub-install.in: New file.
11333
11334 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11335 (grub_install_SOURCES): Likewise.
11336
11337 * genmk.rb: Added support for scripts.
11338 (Script): New class.
11339 (scripts): New variable.
11340
11341 * Makefile.in (install-local): Install sbin_SCRIPTS by
11342 INSTALL_SCRIPT.
11343 (uninstall): Remove sbin_SCRIPTS.
11344
11345 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11346 device, try to get a GRUB device by
11347 grub_util_biosdisk_get_grub_dev.
11348 Free DEST_DEV.
11349
11350 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11351 description for --device-map.
11352
5f968e1e 113532005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11354
11355 Change the semantics of variable hooks. They now return strings
11356 instead of error values.
f19dbdb7 11357
5f968e1e 11358 * util/i386/pc/grub-setup.c: Include grub/env.h.
11359 (setup): Use grub_device_set_root instead of grub_env_set.
11360
11361 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11362 grub_env_get instead of grub_device_set_root and
11363 grub_device_get_root, respectively.
11364
11365 * kern/main.c (grub_env_write_root): New function.
11366 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11367 grub_env_set instead of grub_device_set_root.
11368
11369 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11370 many variables.
11371 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11372 rather than calling ENV->WRITE_HOOK afterwards.
11373 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11374 passing a pointer of a pointer.
11375 (grub_register_variable_hook): Change the types of "read_hook" and
11376 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11377 respectively.
11378 Allocate the default empty string on the heap, because this string
11379 may be freed later.
11380
11381 * kern/device.c: Include grub/env.h.
11382 (grub_device_set_root): Removed.
11383 (grub_device_get_root): Likewise.
11384 (grub_device_open): Use grub_env_get instead of
11385 grub_device_get_root.
11386
11387 * include/grub/env.h (grub_env_read_hook_t): New type.
11388 (grub_env_write_hook_t): Likewise.
11389 (grub_env_var): Change the types of "read_hook" and "write_hook"
11390 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11391 (grub_register_variable_hook): Likewise.
11392
11393 * include/grub/device.h (grub_device_set_root): Removed.
11394 (grub_device_set_root): Likewise.
11395
11396 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11397 make sure that DIRNAME terminates with '/', so that
11398 grub_fat_find_dir will fail if PATH is not a directory.
11399
11400 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11401 from DIRNAME.
11402 Use the qualifier auto for print_files and print_files_long.
11403 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11404 as a regular file.
11405 Put a newline only if there is no error.
11406 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11407 used.
11408
896f0afd 114092005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11410
11411 * kern/partition.c (grub_partition_probe): Initialize PART to
11412 NULL. Otherwise, when no partition map is registered, this returns
11413 a garbage.
11414
b28b81b2 114152005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11416
11417 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11418 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11419 valid.
11420
5f3607e0 114212005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11422
11423 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11424 information on each device, if it does not have partitions. Print
11425 "Device" instead of "Disk", because this function is not specific
11426 to disk devices.
11427
11428 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11429 static to ensure that it is put on the memory rather than a
11430 register.
11431
502c87e8 114322005-07-17 Yoshinori Okuji <okuji@enbug.org>
11433
11434 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11435 (grub_cat_init): Likewise.
11436 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11437 (options): Likewise.
11438 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11439 (grub_configfile_init): Likewise.
11440 * font/manager.c (GRUB_MOD_INIT): Likewise.
11441 * commands/help.c (GRUB_MOD_INIT): Likewise.
11442 (grub_help_init): Likewise.
11443 * normal/command.c (grub_command_init): Likewise.
11444 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11445 * disk/loopback.c (grub_loop_init): Likewise.
11446 (GRUB_MOD_INIT): Likewise.
11447 * commands/ls.c (grub_ls_init): Likewise.
11448 (GRUB_MOD_INIT): Likewise.
11449 (options): Likewise.
11450 * commands/boot.c (grub_boot_init): Likewise.
11451 (GRUB_MOD_INIT): Likewise.
11452 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11453 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11454 (GRUB_MOD_INIT): Likewise.
11455 * commands/cmp.c (grub_cmp_init): Likewise.
11456 (GRUB_MOD_INIT): Likewise.
11457
11458 * normal/arg.c: Use <> instead of "" to include header files.
11459 (SHORT_ARG_HELP): New macro.
11460 (SHORT_ARG_USAGE): Likewise.
11461 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11462 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11463 descriptions.
11464 (find_short): Check if C is 'h' or 'u' explicitly.
11465 (grub_arg_show_help): Use space characters instead of tabs. Treat
11466 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11467 are shown with --help and --usage only if they are not used for
11468 the command itself.
11469 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11470 'h' and 'u'.
11471
11472 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11473 const into "longarg". Change the type of "shortarg" to int.
11474
f806d18e 114752005-07-17 Yoshinori Okuji <okuji@enbug.org>
11476
11477 * boot/i386/pc/boot.S (boot_drive_check): New label.
11478
11479 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11480 macro.
11481
11482 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11483 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11484
e293232b 114852005-07-17 Yoshinori Okuji <okuji@enbug.org>
11486
11487 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11488 When turning off Gate A20, skip the check and return immediately,
11489 because this is not fatal usually.
11490
ebedfd00 114912005-07-17 Yoshinori Okuji <okuji@enbug.org>
11492
11493 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11494 be 0x7C00 instead of 0x8000.
11495
11496 * boot/i386/pc/pxeboot.S: Rewritten.
11497
11498 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11499 EXT_C.
11500 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11501 result.
11502
654fc59f 115032005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11504
11505 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11506 robustness. This routine now supports a BIOS call and System
11507 Control Port A to modify the gate A20.
11508
11509 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11510 Increased to 0x440.
11511
09f9923f 115122005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11513
11514 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11515 device path and resulting ihandle.
11516 (grub_ofdisk_close): dprintf the ihandle being closed.
11517 (grub_ofdisk_read): dprintf function parameters.
11518 * kern/mm.c (grub_mm_init_region): Likewise.
11519 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11520 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11521 size, and boot arguments.
11522 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11523 before loading into memory.
11524 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11525 before loading into memory.
11526
7ef504d8 115272005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11528
11529 * kern/mm.c: Added much documentation.
11530 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11531 8, set to 5 instead of 8.
11532
e0f050c2 115332005-07-10 Yoshinori Okuji <okuji@enbug.org>
11534
11535 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11536
11537 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11538 (grub_mkdevicemap_SOURCES): New variable.
11539
11540 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11541 lib/device.c of GRUB Legacy.
11542
7224189a 115432005-07-10 Yoshinori Okuji <okuji@enbug.org>
11544
11545 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11546 instead of PATH is NULL.
11547
68c864eb 115482005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11549
11550 * commands/cmp.c (BUFFER_SIZE): New macro.
11551 (grub_cmd_cmp): Close the right file at the right time. Compare
11552 only data just read. Don't report files of different size as
11553 identical. Dynamically allocate buffers. Move variable
11554 declarations at the beginning of function.
11555
e6f3e614 115562005-07-09 Yoshinori Okuji <okuji@enbug.org>
11557
11558 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11559 reverse.
11560
f8f1559a 115612004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11562
11563 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11564 when backspace is pressed at beginning of line.
11565
39c9d41d 115662005-07-03 Yoshinori Okuji <okuji@enbug.org>
11567
11568 * DISTLIST: Added genfslist.sh.
11569
11570 * normal/main.c (fs_module_list): New variable.
11571 (autoload_fs_module): New function.
11572 (read_fs_list): Likewise.
11573 (grub_normal_execute): Call read_fs_list.
11574
11575 * kern/fs.c (grub_fs_autoload_hook): New variable.
11576 (grub_fs_probe): Added support for auto-loading.
11577
11578 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11579 (grub_fs_module_list_t): New type.
11580
11581 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11582 (grub_fs_autoload_hook): New prototype.
11583
11584 * genfslist.sh: New file.
f19dbdb7 11585
39c9d41d 11586 * genmk.rb: Added a rule to generate a filesystem list.
11587
121c1d83 115882005-06-30 Marco Gerards <metgerards@student.han.nl>
11589
11590 * configure.ac: Fix the test for cross-compiling.
11591
11592 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11593 define GRUB_UTIL anymore.
11594
11595 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11596 so this function works on other systems than just big endian.
11597 (load_modules): Likewise.
11598 (add_segments): Likewise.
11599
e75d76e1 116002005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11601
11602 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11603 contains `l' modifier, get a long from va_arg().
11604
50b5a0a7 116052005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11606
11607 * kern/mm.c (grub_free): If the next free block which is being
11608 merged is the first free block, set the first block to the block
11609 being freed.
11610 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11611
89371b20 116122005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11613
11614 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11615 `grub_ieee1275_chosen'.
11616
168d6e58 116172005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11618
11619 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11620 (grub_ieee1275_chosen): New variable.
11621 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11622 `chosen'.
11623 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11624 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11625 Rename first argument to `phandle' for consistency.
11626 (grub_ieee1275_get_property_length): Likewise.
11627 (grub_ieee1275_next_property): Likewise. Change type of first argument
11628 to grub_ieee1275_phandle_t.
11629 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11630 Move export next to declaration.
11631 (grub_ieee1275_chosen): New variable.
11632 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11633 Correct cosmetic typo.
11634 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11635 `grub_ieee1275_chosen'.
11636 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11637 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11638 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11639 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11640 `grub_ieee1275_chosen'.
11641
ca5baa3f 116422005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11643
11644 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11645 /chosen/bootargs.
11646 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11647 /chosen/bootargs as "variable=value" pairs.
11648
708b345f 116492005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11650
11651 * include/grub/misc.h (grub_dprintf): New macro.
11652 (grub_real_dprintf): New prototype.
11653 (grub_strword): Likewise.
11654 (grub_iswordseparator): Likewise.
11655 * kern/misc.c (grub_real_dprintf): New function.
11656 (grub_strword): Likewise.
11657 (grub_iswordseparator): Likewise.
11658
f4c5e67c 116592005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11660
11661 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11662 (roundup): Remove macro.
11663 (grub_ieee1275_flags): Make static.
11664 (grub_ieee1275_realmode): Remove.
11665 (grub_ieee1275_test_flag): New function.
11666 (grub_ieee1275_set_flag): Likewise.
11667 (find_options): Rename to `grub_ieee1275_find_options'; update
11668 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11669 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11670 (cmain): New prototype.
11671 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11672 `grub_ieee1275_flags' directly.
11673 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11674 machine/biosdisk.h.
11675 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11676 Don't include grub/machine/init.h.
11677 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11678 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11679 Remove prototype.
11680 (grub_ieee1275_realmode): Likewise.
11681 (grub_ieee1275_flag): New enum.
11682 (grub_ieee1275_test_flag): New prototype.
11683 (grub_ieee1275_set_flag): New prototype.
11684 * include/grub/powerpc/ieee1275/init.h: Remove file.
11685 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11686 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11687 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11688 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11689 comment.
11690 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11691 `grub_ieee1275_test_flag'.
11692 (grub_ieee1275_encode_devname): Likewise.
11693
ed16607e 116942005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11695
11696 * include/grub/powerpc/ieee1275/ieee1275.h
11697 (grub_ieee1275_encode_devname): New prototype.
11698 (grub_ieee1275_get_filename): Likewise.
11699 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11700 function.
11701 (grub_set_prefix): Likewise.
11702 (grub_machine_init): Call grub_set_prefix.
11703 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11704 (grub_parse_type): New enum.
11705 (grub_ieee1275_get_devargs): New function.
11706 (grub_ieee1275_get_devname): Likewise.
11707 (grub_ieee1275_parse_args): Likewise.
11708 (grub_ieee1275_get_filename): Likewise.
11709 (grub_ieee1275_encode_devname): Likewise.
11710
be369920 117112005-03-30 Marco Gerards <metgerards@student.han.nl>
11712
11713 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11714 `grub_loader_unset'.
11715
a5ce3a4a 117162005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11717
11718 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11719 instead of grub_ieee1275_interpret.
11720 (grub_halt_init): New function.
11721 (grub_halt_fini): Likewise.
11722 (GRUB_MOD_INIT): Correct message grammar.
11723 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11724 instead of grub_ieee1275_interpret.
11725 (grub_reboot_init): New function.
11726 (grub_reboot_fini): Likewise.
11727 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11728 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11729 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11730 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11731 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11732 function.
11733 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11734 Add prototype.
11735 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11736 prototype.
11737 (grub_halt): Likewise.
11738 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11739 (cmain): Remove __attribute__((unused)).
11740 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11741 (grub_heap_len): Likewise.
11742 (grub_machine_fini): New function.
11743 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11744 (grub_halt): Likewise.
11745 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11746 function.
11747 * util/powerpc/ieee1275/misc.c: New file.
11748
0058f771 117492005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11750
11751 * DISTLIST: New file.
11752 * gendistlist.sh: Likewise.
f19dbdb7 11753
0058f771 11754 * Makefile.in (COMMON_DISTFILES): Removed.
11755 (BOOT_DISTFILES): Likewise.
11756 (CONF_DISTFILES): Likewise.
11757 (DISK_DISTFILES): Likewise.
11758 (FS_DISTFILES): Likewise.
11759 (INCLUDE_DISTFILES): Likewise.
11760 (KERN_DISTFILES): Likewise.
11761 (LOADER_DISTFILES): Likewise.
11762 (TERM_DISTFILES): Likewise.
11763 (UTIL_DISTFILES): Likewise.
11764 (DISTFILES): Likewise.
11765 (uninstall): Uninstall files in $(pkgdata_DATA).
11766 (DISTLIST): New target.
11767 (distdir): Use the contents of the file DISTLIST to get a list of
11768 distributed files.
11769
46b3b8a5 117702005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11771
11772 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11773 descriptor. This is ported from GRUB Legacy.
11774
11775 * gencmdlist.sh: Added an extra semicolon to make it work with
11776 old sed versions. Reported by Robert Bihlmeyer
11777 <robbe@orcus.priv.at>.
11778
5822ff87 117792005-03-08 Yoshinori Okuji <okuji@enbug.org>
11780
11781 Automatic loading of commands is supported.
f19dbdb7 11782
5822ff87 11783 * normal/main.c (read_command_list): New function.
11784 (grub_normal_execute): Call read_command_list.
11785
11786 * normal/command.c (grub_register_command): Return zero or CMD.
11787 Allocate CMD->NAME from the heap.
11788 Initialize CMD->MODULE_NAME to zero.
11789 Find the same name as well. If the same command is found and it is
11790 a dummy command, overwrite members. If it is not a dummy command,
11791 return zero.
11792 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11793 (grub_command_find): If a dummy command is found, load a module
11794 and retry to find a command only once.
11795
11796 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11797 make sure that each command is loaded.
11798
11799 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11800 macro.
11801 (struct grub_command): Remove const from the member `name'.
11802 Add a new member `module_name'.
11803 (grub_register_command): Return grub_command_t.
11804
11805 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11806 sure that each command is loaded.
11807
11808 * genmk.rb (PModule::rule): Specify a module name without the
11809 suffix ".mod" to gencmdlist.sh.
11810
7b1f4b57 118112005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11812
11813 * gencmdlist.sh: New file.
f19dbdb7 11814
7b1f4b57 11815 * genmk.rb (PModule::rule): Generate a rule for a command list.
11816 Clean command.lst.
11817 Generate command.lst from $(COMMANDFILES).
11818
11819 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11820 (DATA): Added $(pkgdata_DATA).
11821 (install-local): Install files in $(pkgdata_DATA).
11822
062aaf39 118232005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11824
11825 * term/i386/pc/vga.c (debug_command): Removed.
11826 (GRUB_MOD_INIT): Do not register the command "debug".
11827
11828 From Hollis Blanchard:
11829 * commands/configfile.c: New file.
11830 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11831 commands/configfile.c.
11832 (pkgdata_MODULES): Added configfile.mod.
11833 (configfile_mod_SOURCES): New variable.
11834 (configfile_mod_CFLAGS): Likewise.
11835 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11836 commands/configfile.c.
11837 (pkgdata_MODULES): Added configfile.mod.
11838 (configfile_mod_SOURCES): New variable.
11839 (configfile_mod_CFLAGS): Likewise.
11840 * util/grub-emu.c (main): Call grub_configfile_init and
11841 grub_configfile_fini.
11842 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11843 prototype.
11844 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 11845
cee01aa6 118462005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11847
11848 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11849 address.
11850
11851 * commands/help.c (grub_cmd_help): Do not print newlines after
11852 the last command in print_command_help.
11853
93f3a1d8 118542005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11855
11856 * commands/default.h: New file.
11857 * commands/timeout.h: Likewise.
11858 * normal/context.c: Likewise.
f19dbdb7 11859
93f3a1d8 11860 * util/misc.c: Do not include sys/times.h.
11861 Include sys/time.h and grub/machine/time.h.
11862 (grub_get_rtc): Rewritten with gettimeofday.
11863
11864 * util/grub-emu.c (main): Call grub_default_init and
11865 grub_timeout_init before grub_normal_init, and call
11866 grub_timeout_fini and grub_default_fini after grub_main.
11867
11868 * util/console.c (grub_ncurses_checkkey): Return the read
11869 character or -1.
11870
11871 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11872 timeouts.
11873
11874 * normal/main.c (read_config_file): Push MENU. If this fails,
11875 print an error and wait for a user input.
11876 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11877 If a menu is empty or an error occurs, pop MENU.
11878 (grub_normal_execute): Pop and free MENU after grub_menu_run
11879 returns.
11880
11881 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11882
11883 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11884 include time.h.
11885 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11886 without GRUB_UTIL.
11887 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11888 time.h.
11889 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11890 without GRUB_UTIL.
11891
11892 * include/grub/normal.h (struct grub_menu_list): New struct.
11893 (grub_menu_list_t): New type.
11894 (struct grub_context): New struct.
11895 (grub_context_t): New type.
11896 (grub_register_command): Got rid of EXPORT_FUNC.
11897 (grub_unregister_command): Likewise.
11898 (grub_context_get): New prototype.
11899 (grub_context_get_current_menu): Likewise.
11900 (grub_context_push_menu): Likewise.
11901 (grub_context_pop_menu): Likewise.
11902 [GRUB_UTIL] (grub_default_init): Likewise.
11903 [GRUB_UTIL] (grub_default_fini): Likewise.
11904 [GRUB_UTIL] (grub_timeout_init): Likewise.
11905 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11906
11907 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11908 commands/timeout.c and normal/context.c.
11909 (pkgdata_MODULES): Added default.mod and timeout.mod.
11910 (normal_mod_SOURCES): Added normal/context.c.
11911 (default_mod_SOURCES): New variable.
11912 (default_mod_CFLAGS): Likewise.
11913 (timeout_mod_SOURCES): Likewise.
11914 (timeout_mod_CFLAGS): Likewise.
11915 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11916 conf/i386-pc.rmk.
11917 (pkgdata_MODULES): Added default.mod and timeout.mod.
11918 (normal_mod_SOURCES): Added normal/context.c.
11919 (default_mod_SOURCES): New variable.
11920 (default_mod_CFLAGS): Likewise.
11921 (timeout_mod_SOURCES): Likewise.
11922 (timeout_mod_CFLAGS): Likewise.
11923
11924 * Makefile.in (all-local): Added $(MKFILES).
11925
4ed2e1dd 119262005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11927
11928 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11929 (grub_emu_SOURCES): Likewise.
11930 (pkgdata_MODULES): Add `sun.mod'.
11931 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11932 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11933 `partmap/sun.c'.
11934 (pkgdata_MODULES): Add `sun.mod'.
11935 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11936 * include/grub/partition.h (grub_sun_partition_map_init): New
11937 prototype.
11938 (grub_sun_partition_map_fini): Likewise.
11939 * partmap/sun.c: New file.
11940 * util/grub-emu.c (main): Initialize and de-initialize the sun
11941 partitionmap support.
11942
4d4e372e 119432005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11944
11945 This implements an Emacs-like menu entry editor.
f19dbdb7 11946
4d4e372e 11947 * normal/menu_entry.c: New file.
f19dbdb7 11948
4d4e372e 11949 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11950 characters to ASCII.
11951 (saved_char): New variable.
11952 (grub_ncurses_checkkey): Rewritten completely.
11953 (grub_ncurses_getkey): Likewise.
11954 (grub_ncurses_init): Call raw instead of cbreak.
11955
11956 * normal/menu.c (print_entry): Do not put a space.
11957 (init_page): Renamed to ...
11958 (grub_menu_init_page): ... this. All callers changed.
11959 (edit_menu_entry): Removed.
11960 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11961
11962 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11963
11964 * kern/misc.c (grub_vprintf): Call grub_refresh.
11965
11966 * normal/menu.c (DISP_LEFT): Renamed to ...
11967 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11968 * normal/menu.c (DISP_UP): Renamed to ...
11969 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11970 * normal/menu.c (DISP_RIGHT): Renamed to ...
11971 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11972 * normal/menu.c (DISP_DOWN): Renamed to ...
11973 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11974 * normal/menu.c (DISP_HLINE): Renamed to ...
11975 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11976 * normal/menu.c (DISP_VLINE): Renamed to ...
11977 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11978 * normal/menu.c (DISP_UL): Renamed to ...
11979 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11980 * normal/menu.c (DISP_UR): Renamed to ...
11981 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11982 * normal/menu.c (DISP_LL): Renamed to ...
11983 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11984 * normal/menu.c (DISP_LR): Renamed to ...
11985 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11986 * normal/menu.c (TERM_WIDTH): Renamed to ...
11987 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11988 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11989 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11990 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11991 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11992 * normal/menu.c (TERM_MARGIN): Renamed to ...
11993 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11994 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11995 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11996 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11997 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11998 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11999 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12000 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12001 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12002 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12003 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12004 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12005 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12006 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12007 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12008 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12009 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12010 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12011 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12012 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12013 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12014 All callers changed.
12015
12016 * include/grub/normal.h: New prototype.
12017
12018 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12019 normal/menu_entry.c.
12020 (normal_mod_SOURCES): Likewise.
12021 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12022 (normal_mod_SOURCES): Likewise.
12023
e6b92c8a 120242005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12025
12026 * include/grub/normal.h (grub_halt_init): New prototype.
12027 (grub_halt_fini): Likewise.
12028 (grub_reboot_init): Likewise.
12029 (grub_reboot_fini): Likewise.
12030
12031 * util/grub-emu.c: Include signal.h.
12032 (main_env): New global variable.
12033 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12034 catch C-c.
12035 (grub_machine_fini): New function.
12036 (main): Call grub_halt_init and grub_reboot_init before
12037 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12038 Call setjmp with MAIN_ENV to go back afterwards.
12039 Call grub_machine_fini right before return.
12040
12041 * include/grub/util/misc.h: Include setjmp.h.
12042 (main_env): New prototype.
12043
12044 * include/grub/kernel.h (grub_machine_fini): New prototype.
12045 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12046 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12047
12048 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12049 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12050 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 12051
e6b92c8a 12052 * util/i386/pc/misc.c: New file.
f19dbdb7 12053
e6b92c8a 12054 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12055 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12056 commands/i386/pc/reboot.c.
12057
c642636f 120582005-02-14 Guillem Jover <guillem@hadrons.org>
12059
12060 * include/grub/dl.h (grub_dl_check_header): New prototype.
12061 (grub_arch_dl_check_header): Change return type to grub_err_t,
12062 remove size parameter and export function. Update all callers.
12063 * kern/dl.c (grub_dl_check_header): New function.
12064 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12065 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12066 are inside the core.
12067 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12068 independent ELF header checks.
12069 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12070 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12071 `grub_dl_check_header' instead of explicit checks. Check for the
12072 ELF type.
12073 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12074 `grub_dl_check_header' instead of explicit checks. Remove arch
12075 specific ELF header checks.
12076
e6b92c8a 12077 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12078 argument SIZE.
12079
5eabe94b 120802005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12081
12082 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12083 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12084
1b14a681 120852005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12086
12087 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 12088 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 12089 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 12090 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 12091 * partmap/amiga.c (amiga_partition_map_iterate): Return
12092 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12093 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12094
aca108aa 120952005-02-01 Guillem Jover <guillem@hadrons.org>
12096
12097 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12098 help info.
12099
c9f9c556 121002005-01-31 Marco Gerards <metgerards@student.han.nl>
12101
12102 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12103 Removed prototype.
12104 (grub_rescue_cmd_linux): New prototype.
12105 (grub_rescue_cmd_initrd): Likewise.
12106 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12107 `bi_rec'.
12108 (grub_linux_release_mem): Release the memory for the initrd.
12109 (grub_load_linux): Renamed from this...
12110 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12111 Changed `entry' not to be static. Loop over memory regions to
12112 find another one when the default fails.
12113 (grub_rescue_cmd_initrd): New function.
12114 (grub_linux_init): Remove function.
12115 (grub_linux_fini): Likewise.
12116 (GRUB_MOD_INIT): Register `initrd'.
12117 (GRUB_MOD_FINI): Unregister `initrd'.
12118 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12119 Function removed.
12120 (grub_linux_normal_fini): Likewise.
12121 (GRUB_MOD_INIT): Register `initrd'.
12122 (GRUB_MOD_FINI): Unregister `initrd'.
12123
990cf3aa 121242005-01-31 Marco Gerards <metgerards@student.han.nl>
12125
12126 * commands/help.c: New file.
12127 * normal/arg.c (show_help): Renamed to...
12128 (grub_arg_show_help): ... this.
12129 * commands/i386/pc/halt.c: New file.
12130 * commands/i386/pc/reboot.c: Likewise.
12131 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12132 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12133 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12134 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12135 variables.
12136 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12137 `commands/help.c'.
12138 (pkgdata_MODULES): Add `help.mod'.
12139 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12140 * grub/i386/pc/init.h (grub_reboot): New prototype.
12141 (grub_halt): Likewise.
12142 * include/grub/normal.h (grub_arg_show_help): New prototype.
12143 (grub_help_init): Likewise.
12144 (grub_help_fini): Likewise.
12145 * util/grub-emu.c (main): Initialize and deinitialize the help
12146 command.
12147
12148 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12149
12150 * normal/command.c (grub_command_init): Fixed the description of
12151 the `set' and `unset' commands.
12152
121532005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 12154
12155 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12156 function.
12157 * commands/ieee1275/halt.c: New file.
12158 * commands/ieee1275/reboot.c: Likewise.
12159 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12160 `__attribute__ ((unused))'. Some GCS related fixed.
12161 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12162 (grub_suspend_fini): Likewise.
12163 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12164 and `halt.mod'.
12165 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12166 (halt_mod_CFLAGS): New variables.
12167 * include/grub/powerpc/ieee1275/ieee1275.h
12168 (grub_ieee1275_interpret): New prototype.
12169
1ab09cc7 121702005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12171
12172 * include/grub/misc.h (memmove): New prototype.
12173 (memcpy): Likewise.
12174
8b8cbdb2 121752005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12176
12177 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12178 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12179
e3741a27 121802005-01-22 Marco Gerards <metgerards@student.han.nl>
12181
12182 * kern/misc.c (grub_strndup): Function rewritten.
12183
776bd780 121842005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12185
12186 * normal/menu.c (TERM_WIDTH): Macro redefined.
12187 (TERM_TOP_BORDER_Y): Likewise.
12188 (draw_border): Replaced while-loop by a for-loop. Make the number
12189 of lines consistent with the number of lines displayed in
12190 print_entries. Added a margin below the rectangle.
12191 (print_entry): Make the entry fit in the rectangle.
12192 (print_entries): Display the scroll arrows next to the right
12193 border.
12194
78026bce 121952005-01-21 Marco Gerards <metgerards@student.han.nl>
12196
12197 * fs/minix.c (grub_minix_find_file): Reserve more space for
12198 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12199 `grub_strncpy' to copy `path' into it.
12200
67bbaf0f 122012005-01-21 Marco Gerards <metgerards@student.han.nl>
12202
12203 Add the loopback device, a device via which files can be accessed
12204 as devices.
f19dbdb7 12205
67bbaf0f 12206 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12207 (pkgdata_MODULES): Add loopback.mod.
12208 (loopback_mod_SOURCES): New variable.
12209 (loopback_mod_CFLAGS): Likewise.
12210 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12211 `disk/loopback.c'.
12212 (pkgdata_MODULES): Add loopback.mod.
12213 (loopback_mod_SOURCES): New variable.
12214 (loopback_mod_CFLAGS): Likewise.
12215 * disk/loopback.c: new file.
12216 * include/grub/normal.h (grub_loop_init): New prototype.
12217 (grub_loop_fini): New prototype.
12218 * util/grub-emu.c (main): Initialize and de-initialize loopback
12219 support.
12220 * include/grub/disk.h (grub_disk_dev_id): Add
12221 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12222
6f1c18bd 122232005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12224
12225 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12226 function.
12227 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12228 (suspend_mod_SOURCES): New variable.
12229 (suspend_mod_CFLAGS): Likewise.
12230 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12231 New prototype.
12232 * commands/ieee1275/suspend.c: New file.
12233
b38551da 122342005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12235
12236 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 12237 ((unused))' to `__attribute__ ((used))'.
b38551da 12238 (GRUB_MOD_FINI): Likewise.
12239 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12240 * genmk.rb (PModule): Assign space to common symbols when linking
12241 modules.
12242
777aff39 122432005-01-20 Marco Gerards <metgerards@student.han.nl>
12244
12245 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12246 `unsigned' arguments to `grub_size_t'.
12247 (grub_malloc): Likewise.
12248 (grub_realloc): Likewise.
12249 (grub_memalign): Likewise.
12250 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12251 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12252 * util/misc.c (grub_malloc): Likewise.
12253 (grub_realloc): Likewise.
12254 * kern/mm.c (get_header_from_pointer): Change the casts to
12255 `unsigned' into a cast to `grub_size_t'.
12256
12257 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12258 point to `currnode' when `currnode' is changed.
12259
12260 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12261 Schottelius <nico-linux@schottelius.org>.
12262
d0ff18e1 122632005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12264
12265 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12266 (note_path): Remove variable.
12267 (GRUB_IEEE1275_NOTE_NAME): New macro.
12268 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12269 (grub_ieee1275_note_hdr): New structure.
12270 (grub_ieee1275_note_desc): Likewise.
12271 (grub_ieee1275_note): Likewise.
12272 (load_note): Remove `dir' argument. All callers updated. Remove
12273 `note_img' and `path'. Do not load a file from `note_path'.
12274 Initialize a struct grub_ieee1275_note and write that to `out'.
12275 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12276
4ca7004c 122772005-01-05 Marco Gerards <metgerards@student.han.nl>
12278
12279 * util/misc.c (grub_util_read_image): Revert last change. It
12280 called `grub_util_read_at', which seeks from the beginning of the
12281 file.
12282
0b412211 122832005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12284
12285 * TODO: Add note about endianness in grub-mkimage.
12286 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12287 section.
12288 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12289 (grub_mkimage_SOURCES): New target.
12290 * include/grub/kernel.h (grub_start_addr): Remove variable.
12291 (grub_end_addr): Likewise.
12292 (grub_total_module_size): Likewise.
12293 (grub_kernel_image_size): Likewise.
12294 (GRUB_MODULE_MAGIC): New constant.
12295 (grub_module_info): New structure.
12296 (grub_arch_modules_addr): New prototype.
12297 (grub_get_end_addr): Remove prototype.
12298 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12299 * include/grub/powerpc/ieee1275/kernel.h: New file.
12300 * include/grub/util/misc.h (grub_util_get_fp_size): New
12301 prototype.
12302 (grub_util_read_at): Likewise.
12303 (grub_util_write_image_at): Likewise.
12304 * kern/main.c (grub_get_end_addr): Remove function.
12305 (grub_load_modules): Call grub_arch_modules_addr instead of using
12306 grub_end_addr. Look for a grub_module_info struct in memory. Use
12307 the grub_module_info fields instead of calling grub_get_end_addr
12308 as loop conditions. Move grub_add_unused_region code here.
12309 (grub_add_unused_region): Remove function.
12310 * kern/i386/pc/init.c: Include grub/cache.h.
12311 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12312 one call to add_mem_region.
12313 (grub_arch_modules_addr): New function.
12314 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12315 (grub_total_module_size): Likewise.
12316 Include grub/machine/kernel.h.
12317 (grub_arch_modules_addr): New function.
12318 * util/grub-emu.c (grub_end_addr): Remove variable.
12319 (grub_total_module_size): Likewise.
12320 (grub_arch_modules_addr): New function.
12321 * util/misc.c: Include unistd.h.
12322 (grub_util_get_fp_size): New function.
12323 (grub_util_read_at): Likewise.
12324 (grub_util_write_image_at): Likewise.
12325 (grub_util_read_image): Call grub_util_read_at.
12326 (grub_util_write_image): Call grub_util_write_image_at.
12327 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12328 additional memory in kernel_img for a struct grub_module_info.
12329 Fill in that grub_module_info.
12330 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12331
458786f8 123322005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12333
12334 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12335 New function.
12336 * include/grub/powerpc/ieee1275/ieee1275.h
12337 (grub_ieee1275_milliseconds): New prototype.
12338 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12339 Change to 1000.
12340 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12341 grub_ieee1275_milliseconds.
12342
ac507d1b 123432005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12344
12345 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12346 variable.
12347 (find_options): New function.
12348 (cmain): Call find_options.
12349 * include/grub/powerpc/ieee1275/ieee1275.h
12350 (grub_ieee1275_realmode): New extern variable.
12351 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12352 grub_map if grub_ieee1275_realmode is false.
12353
6b8fd1c4 123542004-12-29 Marco Gerards <metgerards@student.han.nl>
12355
12356 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12357 lines are inserted and make it work like readline. Reported by
12358 Vincent Pelletier <subdino2004@yahoo.fr>.
12359
8514a1e0 123602004-12-28 Marco Gerards <metgerards@student.han.nl>
12361
12362 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12363
12364 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12365 `kern/powerpc/cache.S'.
12366
924b6140 123672004-12-27 Marco Gerards <metgerards@student.han.nl>
12368
12369 * genmk.rb: Handle the `Program' class in the main loop. Written
12370 by Johan Rydberg <jrydberg@gnu.org>.
12371 (Program): New class.
12372 (programs): New variable.
12373 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12374 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12375 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12376 (help_arch): Function removed.
12377 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12378 `powerpc/libgcc.h' and `loader.h'.
12379 (pkgdata_PROGRAMS): New variable.
12380 (sbin_UTILITIES): Variable removed.
12381 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12382 (grubof_SOURCES): Variable re-defined so it only includes the
12383 core functionality.
12384 (grubof_CFLAGS): Remove `-DGRUBOF'.
12385 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12386 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12387 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12388 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12389 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12390 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12391 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12392 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12393 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12394 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12395 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12396 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12397 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12398 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12399 (pc_mod_CFLAGS): New variables.
12400 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12401 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12402 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12403 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12404 Moved from here...
12405 * include/grub/i386/pc/init.h (grub_os_area_addr)
12406 (rub_os_area_size): ... to here.
12407 * include/grub/powerpc/ieee1275/ieee1275.h
12408 (grub_ieee1275_entry_fn): Export symbol.
12409 * include/grub/powerpc/ieee1275/init.h: New file.
12410 * include/grub/powerpc/libgcc.h: Likewise.
12411 * include/grub/cache.h: Likewise.
12412 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12413 <hollis@penguinppc.org>.
12414 * kern/dl.c: Include <grub/cache.h>.
12415 (grub_dl_flush_cache): New function.
12416 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12417 for this module.
12418 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12419 (grub_console_init): Removed prototypes.
12420 (grub_machine_init): Don't initialize the modules anymore.
12421 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12422 static.
12423 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12424 Macro undef removed.
12425 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12426 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12427 relocation `R_PPC_REL32'. Return an error when the relocation is
12428 unknown.
12429 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12430 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12431 * util/misc.c (grub_arch_sync_caches): Likewise.
12432
e4b47e0c 124332004-12-19 Marco Gerards <metgerards@student.han.nl>
12434
12435 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12436 `symlist.c', add `grubof_symlist.c'.
12437 (symlist.c): Variable removed.
12438 (grubof_HEADERS): Variable added.
12439 (grubof_symlist.c): New target.
12440 (kernel_syms.lst): Use `grubof_HEADERS' instead of
12441 `kernel_img_HEADERS'.
12442 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12443 * kern/powerpc/dl.c: New file.
12444 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12445 Function removed.
12446 (grub_arch_dl_relocate_symbols): Likewise.
12447 (grub_register_exported_symbols): Likewise.
12448
4ceb3636 124492004-12-13 Marco Gerards <metgerards@student.han.nl>
12450
12451 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12452 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12453 to fail instead. Reported by Vincent Pelletier
12454 <subdino2004@yahoo.fr>.
12455
12456 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12457 it is not allocated. Reported by Vincent Pelletier
12458 <subdino2004@yahoo.fr>.
12459
12460 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12461 output so the output looks better.
f19dbdb7 12462
3f1578fe 124632004-12-04 Marco Gerards <metgerards@student.han.nl>
12464
12465 Modulize the partition map support and add support for the amiga
12466 partition map.
f19dbdb7 12467
3f1578fe 12468 * commands/ls.c: Include <grub/partition.h> instead of
12469 <grub/machine/partition.h>.
12470 * kern/disk.c: Likewise.
12471 * kern/rescue.c: Likewise.
12472 * loader/i386/pc/chainloader.c: Likewise.
12473 * normal/cmdline.c: Likewise.
12474 * kern/powerpc/ieee1275/init.c: Likewise.
12475 (grub_machine_init): Call `grub_pc_partition_map_init',
12476 `grub_amiga_partition_map_init' and
12477 `grub_apple_partition_map_init'.
12478 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12479 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12480 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12481 `partition.h' and `pc_partition.h'.
12482 (grub_setup_SOURCES): Remove
12483 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12484 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12485 (grub_emu_SOURCES): Likewise.
12486 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12487 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12488 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12489 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12490 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12491 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12492 (grubof_SOURCES): Likewise.
12493 * disk/i386/pc/partition.c: File removed.
12494 * disk/powerpc/ieee1275/partition.c: Likewise.
12495 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12496 * include/grub/i386/pc/partition.h: Likewise.
12497 * kern/partition.c: New file.
12498 * partmap/amiga.c: Likewise.
12499 * partmap/apple.c: Likewise.
12500 * partmap/pc.c: Likewise.
12501 * include/grub/partition.h: Likewise..
12502 * include/grub/pc_partition.h: Likewise.
12503 * util/grub-emu.c: Include <grub/partition.h> instead of
12504 <grub/machine/partition.h>.
12505 (main): Call `grub_pc_partition_map_init',
12506 `grub_amiga_partition_map_init' and
12507 `grub_apple_partition_map_init' and deinitialize afterwards.
12508 * util/i386/pc/biosdisk.c: Include `#include
12509 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12510 `<grub/machine/partition.h>'.
12511 * util/i386/pc/grub-setup.c: Likewise.
12512 * util/i386/pc/biosdisk.c: Likewise.
12513 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12514 partition information in case of a PC partition.
12515 * util/i386/pc/grub-setup.c: Include `#include
12516 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12517 `<grub/machine/partition.h>'.
12518 (setup): Only access the PC specific partition information in case
12519 of a PC partition.
12520
0ef4ced9 125212004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 12522
0ef4ced9 12523 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12524 (grub_longjmp): Likewise.
12525 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12526 20.
12527 * normal/powerpc/setjmp.S: New file.
12528 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12529 `normal/powerpc/setjmp.S'.
12530 (grubof_CFLAGS): Add `-DGRUBOF'.
12531 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12532 [GRUB_UTIL && !GRUBOF].
f19dbdb7 12533
19950e29 125342004-11-16 Marco Gerards <metgerards@student.han.nl>
12535
12536 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12537 property named `name'. Correctly handle the error returned by
12538 `grub_ieee1275_finddevice' if a device can not be opened.
12539
a2fea427 125402004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12541
12542 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12543 `actual' for negativity.
12544 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12545 kern/fshelp.c.
12546
41ea0ea3 125472004-11-01 Marco Gerards <metgerards@student.han.nl>
12548
12549 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12550 (PAGE_OFFSET): New macro.
12551 (CRTC_ADDR_PORT): Likewise.
12552 (CRTC_DATA_PORT): Likewise.
12553 (START_ADDR_HIGH_REGISTER): Likewise.
12554 (START_ADDR_LOW_REGISTER): Likewise.
12555 (GRAPHICS_ADDR_PORT): Likewise.
12556 (GRAPHICS_DATA_PORT): Likewise.
12557 (READ_MAP_REGISTER): Likewise.
12558 (INPUT_STATUS1_REGISTER): Likewise.
12559 (INPUT_STATUS1_VERTR_BIT): Likewise.
12560 (page): New variable.
12561 (wait_vretrace): New function.
12562 (set_read_map): Likewise.
12563 (set_start_address): Likewise.
12564 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12565 the right page.
12566 (check_vga_mem): Take the page into account.
12567 (write_char): Likewise.
12568 (write_cursor): Likewise.
12569 (scroll_up): Likewise. Copy the page to the page that is not
12570 shown and switch between both pages.
12571 (grub_vga_putchar): Fix off by one error.
12572 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12573 account.
12574
ad0bd20b 125752004-11-01 Marco Gerards <metgerards@student.han.nl>
12576
12577 Add support for iso9660 (including rockridge).
f19dbdb7 12578
ad0bd20b 12579 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12580 (iso9660_mod_SOURCES): New variable.
12581 (iso9660_mod_CFLAGS): Likewise.
12582 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12583 * include/grub/fs.h (grub_iso9660_init): New prototype.
12584 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12585 * fs/iso9660.c: New file.
12586
12587 * include/grub/misc.h (grub_strncat): New prototype.
12588 * kern/misc.c (grub_strncat): New function.
f19dbdb7 12589
ad0bd20b 12590 * fs/hfs.c (grub_hfs_mount): Translate the error
12591 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12592 * fs/jfs.c (grub_jfs_mount): Likewise.
12593 * fs/ufs.c (grub_ufs_mount): Likewise.
12594
a5477a59 125952004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12596
12597 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12598 which initialized BAT registers.
12599 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12600 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12601 Move from here...
12602 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12603 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12604 ... to here.
12605 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12606 (grub_mapclaim): Likewise.
12607 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12608 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12609 hand.
12610
9304c1f8 126112004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12612
12613 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12614 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12615 -ffreestanding and -msoft-float.
12616
86f4ae25 126172004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12618
12619 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12620 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12621 set in grub_ieee1275_flags.
12622
38912228 126232004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12624
12625 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12626 prototype.
12627 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12628 grub_console_init first.
12629 Change the memory range used for grub_ieee1275_claim and
12630 grub_mm_init_region.
12631 Print an error message if the claim fails.
12632 Include <grub/misc.h>.
12633
d1923dc8 126342004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12635
12636 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12637 Call grub_children_iterate for device nodes of type `scsi',
12638 `ide', or `ata'.
12639 (grub_ofdisk_open): Remove manual device alias resolution.
12640 Fix memory leak when device cannot be opened.
f19dbdb7 12641 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 12642 (grub_children_iterate): New prototype.
12643 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12644 New function.
12645 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12646 Return -1 if args.size was -1.
12647
4512e4f3 126482004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12649
12650 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12651 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12652 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12653 Open Firmware's memory for it; claim memory from _start to _end.
12654 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12655 (_end): New extern.
12656 (_start): Zero BSS from __bss_start to _end.
12657 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12658 New extern.
12659 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12660
4d61feb0 126612004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12662
ad0bd20b 12663 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12664 -1 if args.base was -1.
4d61feb0 12665
026fa2f9 126662004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12667
12668 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12669 escape sequence instead of a literal ^L. Also call
12670 grub_ofconsole_gotoxy.
12671
9f2220ef 126722004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12673
12674 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12675 void * arguments to grub_addr_t. All callers updated. Also make
12676 the `result' argument optional.
12677 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12678 All callers updated.
12679
8a572cd7 126802004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12681
12682 * commands/ls.c (grub_ls_list_files): Use the string following the
12683 initial ')', if present, as the filesystem path.
12684 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12685
12686 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12687
18aa81f2 126882004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12689
12690 Make the source code of the menu interface more readable.
f19dbdb7 12691
18aa81f2 12692 * normal/menu.c: Include grub/mm.h.
12693 (TERM_WIDTH): New macro.
12694 (TERM_HEIGHT): Likewise.
12695 (TERM_INFO_HEIGHT): Likewise.
12696 (TERM_MARGIN): Likewise.
12697 (TERM_SCROLL_WIDTH): Likewise.
12698 (TERM_TOP_BORDER_Y): Likewise.
12699 (TERM_LEFT_BORDER_X): Likewise.
12700 (TERM_BORDER_WIDTH): Likewise.
12701 (TERM_MESSAGE_HEIGHT): Likewise.
12702 (TERM_BORDER_HEIGHT): Likewise.
12703 (TERM_NUM_ENTRIES): Likewise.
12704 (TERM_FIRST_ENTRY_Y): Likewise.
12705 (TERM_ENTRY_WIDTH): Likewise.
12706 (TERM_CURSOR_X): Likewise.
12707 (draw_border): Use macros instead of magic numbers.
12708 (print_entry): Likewise.
12709 (print_entries): Likewise.
12710 (run_menu): Likewise. Also, handle the key 'e'.
12711 (run_menu_entry): Ignore empty command lines.
12712 (print_message): Added a new argument EDIT. If EDIT is true,
12713 print a different message.
12714 (init_page): Likewise.
12715 (edit_menu_entry): New function. Not implemented yet.
12716
b47efe30 127172004-09-17 Marco Gerards <metgerards@student.han.nl>
12718
12719 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12720 can be loaded from normal mode.
f19dbdb7 12721
b47efe30 12722 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12723 `multiboot.mod'.
12724 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12725 (multiboot_mod_CFLAGS): New variables.
12726 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 12727 * loader/i386/pc/multiboot_normal.c: Likewise.
12728
b47efe30 12729 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12730 attribute `unused'.
f19dbdb7 12731
b47efe30 12732 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12733 `fdiro' to read the mode information from instead of `diro'.
12734
12735 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12736 looking up a symlink.
12737
12738 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12739 macro.
12740 * normal/command.c (grub_command_execute): Don't parse the
12741 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12742 flags of the command.
12743
12744 * normal/menu.c (grub_menu_run): Fix typo.
12745
da75ac71 127462004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12747
12748 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12749
12750 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12751 `y + 1' instead of `y - 1'.
12752
12753 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 12754
062b24c2 127552004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12756
12757 From Hollis Blanchard <hollis@penguinppc.org>:
12758 * kern/misc.c (memmove): New alias for grub_memmove.
12759 (memcmp): New alias for grub_memcmp.
12760 (memset): New alias for grub_memset.
f19dbdb7 12761 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 12762 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 12763 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 12764 (grub_ieee1275_get_property): Likewise.
f19dbdb7 12765
8ddad845 127662004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12767
12768 Added normal mode command `chainloader' as module chain.mod, which
12769 depends on normal.mod and _chain.mod.
f19dbdb7 12770
8ddad845 12771 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12772 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12773 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12774 Deleted prototype.
12775 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12776 but arguments parsing moved to ...
12777 (grub_chainloader_cmd): ... here. New function.
12778 * include/grub/i386/pc/chainloader.h: New file.
12779 * loader/i386/pc/chainloader_normal.c: Likewise.
12780
2c1f4ce3 127812004-09-11 Marco Gerards <metgerards@student.han.nl>
12782
12783 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12784 (grub_mkimage_LDFLAGS): Likewise.
12785 (grub_emu_SOURCES): Likewise.
12786 (kernel_img_HEADERS): Added fshelp.h.
12787 * fs/ext2.c: Include <grub/fshelp.h>.
12788 (FILETYPE_REG): New macro.
12789 (FILETYPE_INO_REG): Likewise.
12790 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12791 Changed all users.
12792 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12793 all users.
12794 (grub_fshelp_node): New struct.
12795 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12796 to a pointer.
12797 (grub_ext2_get_file_block): Removed function.
12798 (grub_ext2_read_block): New function.
12799 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12800 This function was written.
12801 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12802 (grub_ext2_find_file): Removed function.
12803 (grub_ext2_read_symlink): New function.
12804 (grub_ext2_iterate_dir): Likewise.
12805 (grub_ext2_open): Rewritten.
12806 (grub_ext2_dir): Rewritten.
12807 * include/grub/fshelp.h: New file.
12808 * fs/fshelp.c: Likewise.
12809
3c52136a 128102004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12811
12812 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12813 (print_message): Add a missing newline.
12814 (run_menu): Added timeout support.
12815 (run_menu_entry): New local function.
12816 (grub_menu_run): Added support for booting.
12817
12818 * kern/loader.c (grub_loader_is_loaded): New function.
12819
12820 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12821 (grub_get_rtc): Exported.
12822
12823 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12824 (grub_get_rtc): Exported.
12825
12826 * include/grub/normal.h (struct grub_command_list): Remove
12827 constant from the member `command'.
12828
12829 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12830
12831 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12832
12833 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12834
aa033560 128352004-08-28 Marco Gerards <metgerards@student.han.nl>
12836
12837 Add support for the JFS filesystem.
12838
12839 * fs/jfs.c: New file.
12840 * include/grub/fs.h (grub_jfs_init): New prototype.
12841 (grub_jfs_fini): New prototype.
12842 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12843 (grub_emu_SOURCES): Likewise.
12844 (pkgdata_MODULES): Add jfs.mod.
12845 (jfs_mod_SOURCES): New variable.
12846 (jfs_mod_CFLAGS): Likewise.
12847 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12848 (grubof_SOURCES): Likewise.
12849 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12850
12851 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12852 endian to the host endian.
12853 (grub_fat_utf16_to_utf8): Move function from there...
12854 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 12855 the endianness of the source string anymore.
aa033560 12856 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12857
94bc45af 128582004-08-24 Marco Gerards <metgerards@student.han.nl>
12859
12860 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12861 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12862 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12863 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 12864
94bc45af 12865 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12866 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12867 for `node_found' and `it_dir'.
12868 (grub_hfs_dir): Add prototype for `dir_hook'.
12869
12870 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12871 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12872 and `indir32' to silence a gcc warning.
12873
12874 * include/grub/fs.h (grub_hfs_init): New prototype.
12875 (grub_hfs_fini): Likewise.
f19dbdb7 12876
12877
97543f08 128782004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12879
12880 Each disk device has its own id now. This is useful to make use
12881 of multiple disk devices.
f19dbdb7 12882
97543f08 12883 * include/grub/disk.h (grub_disk_dev_id): New enum.
12884 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12885 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12886
12887 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12888 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12889
12890 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12891 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12892
12893 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12894 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12895
12896 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12897 "id" which is used by the cache manager.
12898
12899 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12900 of just "GRUB".
12901
64372eb4 129022004-08-18 Marco Gerards <metgerards@student.han.nl>
12903
12904 * fs/hfs.c: New file.
12905 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12906 (grub_emu_SOURCES): Likewise.
12907 (pkgdata_MODULES): Add hfs.mod.
12908 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12909 (grubof_SOURCES): Likewise.
12910 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12911
12912 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12913 * kern/misc.c (grub_strncasecmp): Add function.
12914
cc61b58f 129152004-08-14 Marco Gerards <metgerards@student.han.nl>
12916
12917 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12918 with parentheses.
12919
12920 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12921 (grub_ext2_dir): In case the directory entry type is unknown, read
12922 it from the inode.
12923
0ef123f6 129242004-08-02 Peter Bruin <pjbruin@dds.nl>
12925
12926 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12927 grub_load_linux instead of grub_rescue_cmd_linux as second
12928 argument of grub_rescue_register_command.
12929
12930 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12931
a447c5df 129322004-07-27 Marco Gerards <metgerards@student.han.nl>
12933
12934 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12935 function.
12936 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12937 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12938 `loader/powerpc/ieee1275/linux.c',
12939 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12940 * include/grub/powerpc/ieee1275/ieee1275.h
12941 (grub_ieee1275_release): New prototype.
12942 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12943 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12944 normal, boot, linux and linux_normal.
12945 * loader/powerpc/ieee1275/linux.c: New file.
12946 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12947
5a9e3546 129482004-07-12 Marco Gerards <metgerards@student.han.nl>
12949
12950 * normal/arg.c (grub_arg_parse): Correct error handling after
12951 reallocating the argumentlist (check if `argl' is not null instead
12952 of checking if `args' is not null).
12953 * kern/mm.c (grub_realloc): Return the same pointer when using the
12954 same region, instead of returning the header address.
12955
e15199cb 129562004-07-11 Marco Gerards <metgerards@student.han.nl>
12957
12958 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12959 one block instead of two when looking for the initial partition.
12960 (grub_partition_probe): Initialize the local variable `p' with 0.
12961 Use base 10 for the grub_strtoul call.
12962 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12963 need for one local variable.
12964 (grub_strtoul): Don't add the new value to `num', instead of that
12965 just assign it.
12966
020616c2 129672004-07-11 Marco Gerards <metgerards@student.han.nl>
12968
12969 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12970 (pxeboot_img_SOURCES): New variable.
12971 (pxeboot_img_ASFLAGS): Likewise.
12972 (pxeboot_img_LDFLAGS): Likewise.
12973 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12974 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12975 <lode_leroy@hotmail.com>.
12976
6c51eb64 129772004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12978
12979 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12980 there was no input.
12981
cfb12aff 129822004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12983
12984 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12985 the history buffer logic.
12986
6eabba74 129872004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12988
12989 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12990 (FILETYPE_INO_SYMLINK): New macros.
12991 (grub_ext2_find_file): Check if the node is a directory using the
12992 inode stat information instead of using the filetype in the
12993 dirent. Exclude the first character of an absolute symlink.
12994 (grub_ext2_dir): Mask out the filetype part of the mode member of
12995 the inode.
12996
66e19ef8 129972004-05-24 Marco Gerards <metgerards@student.han.nl>
12998
12999 Add support for UFS version 1 and 2. Add support for the minix
13000 filesystem version 1 and 2, both the variants with 14 and 30 long
13001 filenames.
f19dbdb7 13002
66e19ef8 13003 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13004 fs/minix.c.
13005 (grub_emu_SOURCES): Likewise.
13006 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13007 (ufs_mod_SOURCES): New variable.
13008 (ufs_mod_CFLAGS): Likewise.
13009 (minix_mod_SOURCES): Likewise.
13010 (minix_mod_CFLAGS): Likewise.
13011 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13012 fs/minix.c.
13013 (grubof_SOURCES): Likewise.
13014 * fs/ufs.c: New file.
13015 * fs/minix.c: New file.
13016 * include/grub/fs.h (grub_ufs_init): New prototype.
13017 (grub_ufs_fini): Likewise.
13018 (grub_minix_init): Likewise.
13019 (grub_minix_fini): Likewise.
13020 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13021 minix fs.
13022
cc2e748a 130232004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13024
13025 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13026 commands/ls.c, commands/terminal.c, commands/boot.c,
13027 commands/cmp.c and commands/cat.c.
13028 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13029
13030 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13031 "env.h"
13032
4b13b216 130332004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13034
13035 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13036 and grub_, respectively. Because the conversion is trivial and
13037 mechanical, I omit the details here. Please refer to the CVS
13038 if you need more information.
13039
6a142551 130402004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13041
13042 * include/pupa: Renamed to ...
13043 * include/grub: ... this.
13044 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13045 * util/i386/pc/grub-mkimage.c: ... this.
13046 * util/i386/pc/pupa-setup.c: Renamed to ...
13047 * util/i386/pc/grub-setup.c: ... this.
13048 * util/pupa-emu.c: Renamed to ...
13049 * util/grub-emu.c: ... this.
13050
e56cdf21 130512004-03-29 Marco Gerards <metgerards@student.han.nl>
13052
13053 Add support for the newworld apple macintosh (PPC). This has been
13054 tested on the powerbook 2000 only. It only adds support for
13055 generic ieee1275 functions, console and disk support. This should
13056 be easy to port to other architectures with support for Open
13057 Firmware.
f19dbdb7 13058
e56cdf21 13059 * configure.ac: Accept the powerpc as host_cpu. In the case of
13060 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13061 specific tests are only executed while building for the i386.
13062 Inverse test for crosscompile.
13063 * genmk.rb (Utility): Allow assembler files.
13064 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13065 * conf/powerpc-ieee1275.rmk: New file.
13066 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13067 * disk/powerpc/ieee1275/partition.c: Likewise.
13068 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13069 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13070 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13071 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13072 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13073 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13074 * include/pupa/powerpc/ieee1275/loader.h
13075 * include/pupa/powerpc/setjmp.h: Likewise.
13076 * include/pupa/powerpc/types.h: Likewise.
13077 * kern/powerpc/ieee1275/init.c: Likewise.
13078 * kern/powerpc/ieee1275/openfw.c: Likewise.
13079 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13080
13081 These files were written by Johan Rydberg
13082 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 13083
e56cdf21 13084 * boot/powerpc/ieee1275/cmain.c: New file.
13085 * boot/powerpc/ieee1275/crt0.S: Likewise.
13086 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13087 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13088
8c8cc205 130892004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13090
13091 * Makefile.in: Update copyright.
13092 * genmodsrc.sh: Likewise.
13093 * gensymlist.sh: Likewise.
13094 * term/i386/pc/vga.c: Indent correctly.
13095
13096 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13097 bugreporting address.
13098 * util/i386/pc/pupa-setup.c (usage): Likewise,
13099 (main): Call pupa_ext2_init and pupa_ext2_fini.
13100
f19dbdb7 13101 * fs/fat.c (log2): Renamed to ...
8c8cc205 13102 (fat_log2): ... this.
13103 All callers changed.
13104 * kern/misc.c (memcpy): Alias to pupa_memmove.
13105 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13106 lvalue cast.
13107 * util/console.c (pupa_ncurses_fini): Return 0.
13108
13109 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13110 Move fail label here.
13111 [__GNU__]: Don't warn when using stat.
13112 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13113 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13114 long int. Use strtol instead of strtoul.
f19dbdb7 13115
db1771cf 131162004-03-14 Marco Gerards <metgerards@student.han.nl>
13117
13118 * commands/boot.c: New file.
13119 * commands/cat.c: Likewise.
13120 * commands/cmp.c: Likewise.
13121 * commands/ls.c: Likewise.
13122 * commands/terminal.c: Likewise.
13123 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13124 (pupa_register_command): Changed interface to match the new
13125 argument parser.
13126 (pupa_command_execute): Changed (almost rewritten) so it uses
13127 pupa_split_command. Added support for setting variables using the
13128 syntax `foo=bar'.
13129 (rescue_command): Changed to work with the new argument parser.
13130 (terminal_command): Moved from here to commands/terminal.c.
13131 (set_command): New function.
13132 (unset_command): New function.
13133 (insmod_command): New function.
13134 (rmmod_command): New function.
13135 (lsmod_command): New function.
13136 (pupa_command_init): Don't initialize the command terminal
13137 anymore. Initialize the commands set, unset, insmod, rmmod and
13138 lsmod.
13139 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13140 (kernel_img_HEADERS): Add arg.h and env.h.
13141 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13142 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13143 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13144 normal/arg.c.
13145 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13146 terminal.mod.
13147 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13148 (boot_mod_SOURCES): New variable.
13149 (terminal_mod_SOURCES): Likewise.
13150 (ls_mod_SOURCES): Likewise.
13151 (cmp_mod_SOURCES): Likewise.
13152 (cat_mod_SOURCES): Likewise.
13153
13154 * normal/arg.c: New file.
13155 * kern/env.c: Likewise.
13156 * include/pupa/arg.h: Likewise.
13157 * include/pupa/env.h: Likewise.
13158 * font/manager.c (font_command): Changed to match argument parsing
13159 interface changes.
13160 (PUPA_MOD_INIT): Likewise.
13161 * hello/hello.c (pupa_cmd_hello): Likewise.
13162 (PUPA_MOD_INIT): Likewise.
13163 * include/pupa/disk.h: Include <pupa/device.h>.
13164 (pupa_print_partinfo): New prototype.
13165 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13166 (pupa_dl_get_prefix): Likewise.
13167 * include/pupa/misc.h: Include <pupa/err.h>.
13168 (pupa_isgraph): New prototype.
13169 (pupa_isdigit): Likewise.
13170 (pupa_split_cmdline): Likewise.
13171 * include/pupa/normal.h: Include <pupa/arg.h>.
13172 (pupa_command): Changed the prototype of the member `func' to
13173 match the argument parsing interface. Added member `options'.
13174 (pupa_register_command): Updated to match function.
13175 (pupa_arg_parse): New prototype.
13176 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13177 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13178 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13179 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13180 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13181 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13182 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13183 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13184 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13185 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13186 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13187 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13188 * kern/disk.c: Include <pupa/file.h>.
13189 (pupa_print_partinfo): New function.
13190 * kern/dl.c: Include <pupa/env.h>.
13191 (pupa_dl_dir): Variable removed.
13192 (pupa_dl_load): Use the environment variable `prefix' instead of
13193 the variable pupa_dl_dir.
13194 (pupa_dl_set_prefix): Function removed.
13195 (pupa_dl_get_prefix): Likewise.
13196 * kern/i386/pc/init.c: Include <pupa/env.h>.
13197 (pupa_machine_init): Use the environment variable `prefix' instead of
13198 using pupa_dl_set_prefix to set the prefix.
13199 * kern/main.c: Include <pupa/env.h>.
13200 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13201 using pupa_dl_get_prefix to get the prefix.
13202 * kern/misc.c: Include <pupa/env.h>.
13203 (pupa_isdigit): New function.
13204 (pupa_isgraph): Likewise.
13205 (pupa_ftoa): Likewise.
13206 (pupa_vsprintf): Added support for printing values of the type
13207 `double'. Make it possible to format variable output when using
13208 formatting like `%1.2%f'.
13209 (pupa_split_cmdline): New function.
13210 * kern/rescue.c: Include <pupa/env.h>.
13211 (next_word): Removed function.
13212 (pupa_rescue_cmd_prefix): Likewise.
13213 (pupa_rescue_cmd_set): New function.
13214 (pupa_rescue_cmd_unset): New function.
13215 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13216 split the command line instead of splitting it here. Added
13217 support for setting variables using the syntax `foo=bar'. Don't
13218 initialize the prefix command anymore. Initialized the set and
13219 unset commands.
13220 * normal/cmdline.c: Include <pupa/env.h>.
13221 (pupa_tab_complete): Added prototypes for print_simple_completion,
13222 print_partition_completion, add_completion, iterate_commands,
13223 iterate_dev, iterate_part and iterate_dir. Moved code to print
13224 partition information from here to kern/disk.c.
fe6b695a 13225 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 13226 * normal/main.c: Include <pupa/env.h>.
13227 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13228 instead of using pupa_dl_get_prefix to get the prefix.
13229 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13230 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13231 warning.
13232 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13233 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13234 ((unused))' to silence a gcc warning.
13235 (pupa_vga_setcolor): Likewise.
13236 (debug_command): Changed to match argument parsing
13237 interface changes.
13238 * util/pupa-emu.c: Include <pupa/env.h>.
13239 (options): Added 0's for unused fields to silence a gcc warning.
13240 (argp): Likewise.
13241 (main): Use the environment variable `prefix' instead of using
13242 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13243 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13244 and terminal.
13245
13246 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13247 * util/misc.c: Include <malloc.h>.
13248 (pupa_malloc): Rewritten so errors are correctly reported.
13249 (pupa_realloc): Likewise.
13250 (pupa_memalign): Likewise.
13251 (pupa_mm_init_region): Declare unused variables with
13252 `__attribute__ ((unused))' to silence a gcc warning.
13253 * normal/i386/setjmp.S: Remove tab at the end of the file to
13254 silence a gcc warning.
13255 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13256 variables with `__attribute__ ((unused))' to silence a gcc
13257 warning.
13258 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13259 local variable i unsigned to silence a gcc warning.
13260
13261 * kern/term.c: Include <pupa/misc.h>.
13262 (pupa_more_lines): New variable.
13263 (pupa_more): Likewise.
13264 (pupa_putcode): When the pager is active pause at the end of every
13265 screen.
13266 (pupa_set_more): New function.
13267 * include/pupa/term.h (pupa_set_more): New prototype.
13268
13269
3b1139cb 132702004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13271
13272 Now this project is GRUB 2 rather than PUPA. The location of
13273 the CVS repository was moved to GRUB's.
f19dbdb7 13274
3b1139cb 13275 * configure.ac: Use bug-grub as the reporting address.
13276 Use GRUB instead of PUPA.
13277 Change the version number to 1.90.
13278
8367695c 132792004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13280
13281 * genkernsyms.sh: Updated copyright information.
13282 * genmk.rb: Likewise.
13283 * genmodsrc.sh: Likewise.
13284 * gensymlist.sh: Likewise.
13285 * boot/i386/pc/boot.S: Likewise.
13286 * boot/i386/pc/diskboot.S: Likewise.
13287 * disk/i386/pc/biosdisk.c: Likewise.
13288 * disk/i386/pc/partition.c: Likewise.
13289 * font/manager.c: Likewise.
13290 * fs/ext2.c: Likewise.
13291 * fs/fat.c: Likewise.
13292 * include/pupa/boot.h: Likewise.
13293 * include/pupa/device.h: Likewise.
13294 * include/pupa/disk.h: Likewise.
13295 * include/pupa/dl.h: Likewise.
13296 * include/pupa/elf.h: Likewise.
13297 * include/pupa/err.h: Likewise.
13298 * include/pupa/file.h: Likewise.
13299 * include/pupa/font.h: Likewise.
13300 * include/pupa/fs.h: Likewise.
13301 * include/pupa/kernel.h: Likewise.
13302 * include/pupa/loader.h: Likewise.
13303 * include/pupa/misc.h: Likewise.
13304 * include/pupa/mm.h: Likewise.
13305 * include/pupa/net.h: Likewise.
13306 * include/pupa/normal.h: Likewise.
13307 * include/pupa/rescue.h: Likewise.
13308 * include/pupa/setjmp.h: Likewise.
13309 * include/pupa/symbol.h: Likewise.
13310 * include/pupa/term.h: Likewise.
13311 * include/pupa/types.h: Likewise.
13312 * include/pupa/i386/setjmp.h: Likewise.
13313 * include/pupa/i386/types.h: Likewise.
13314 * include/pupa/i386/pc/biosdisk.h: Likewise.
13315 * include/pupa/i386/pc/boot.h: Likewise.
13316 * include/pupa/i386/pc/console.h: Likewise.
13317 * include/pupa/i386/pc/init.h: Likewise.
13318 * include/pupa/i386/pc/kernel.h: Likewise.
13319 * include/pupa/i386/pc/linux.h: Likewise.
13320 * include/pupa/i386/pc/loader.h: Likewise.
13321 * include/pupa/i386/pc/memory.h: Likewise.
13322 * include/pupa/i386/pc/multiboot.h: Likewise.
13323 * include/pupa/i386/pc/partition.h: Likewise.
13324 * include/pupa/i386/pc/time.h: Likewise.
13325 * include/pupa/i386/pc/vga.h: Likewise.
13326 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13327 * include/pupa/util/getroot.h: Likewise.
13328 * include/pupa/util/misc.h: Likewise.
13329 * include/pupa/util/resolve.h: Likewise.
13330 * kern/device.c: Likewise.
13331 * kern/disk.c: Likewise.
13332 * kern/dl.c: Likewise.
13333 * kern/err.c: Likewise.
13334 * kern/file.c: Likewise.
13335 * kern/fs.c: Likewise.
13336 * kern/loader.c: Likewise.
13337 * kern/main.c: Likewise.
13338 * kern/misc.c: Likewise.
13339 * kern/mm.c: Likewise.
13340 * kern/rescue.c: Likewise.
13341 * kern/term.c: Likewise.
13342 * kern/i386/dl.c: Likewise.
13343 * kern/i386/pc/init.c: Likewise.
13344 * kern/i386/pc/lzo1x.S: Likewise.
13345 * kern/i386/pc/startup.S: Likewise.
13346 * loader/i386/pc/chainloader.c: Likewise.
13347 * loader/i386/pc/linux.c: Likewise.
13348 * loader/i386/pc/multiboot.c: Likewise.
13349 * normal/cmdline.c: Likewise.
13350 * normal/command.c: Likewise.
13351 * normal/main.c: Likewise.
13352 * normal/menu.c: Likewise.
13353 * normal/i386/setjmp.S: Likewise.
13354 * term/i386/pc/console.c: Likewise.
13355 * term/i386/pc/vga.c: Likewise.
13356 * util/console.c: Likewise.
13357 * util/genmoddep.c: Likewise.
13358 * util/misc.c: Likewise.
13359 * util/pupa-emu.c: Likewise.
13360 * util/resolve.c: Likewise.
13361 * util/unifont2pff.rb: Likewise.
13362 * util/i386/pc/biosdisk.c: Likewise.
13363 * util/i386/pc/getroot.c: Likewise.
13364 * util/i386/pc/pupa-mkimage.c: Likewise.
13365 * util/i386/pc/pupa-setup.c: Likewise.
13366
e6eced71 133672004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13368
13369 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13370 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13371 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13372 reading and reset it after reading.
13373 (pupa_ext2_close): Return PUPA_ERR_NONE.
13374
13375 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13376 Correct value.
13377 (struct linux_kernel_header): Add kernel_version and
13378 initrd_addr_max.
13379 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13380 pupa_file_read succeeds.
13381 (pupa_rescue_cmd_initrd): Implement.
13382
5aded270 133832003-12-03 Marco Gerards <metgerards@student.han.nl>
13384
13385 * fs/ext2.c (pupa_ext2_label): New function.
13386 (pupa_ext2_fs): Added label.
13387 * fs/fat.c (pupa_fat_label): New function.
13388 (pupa_fat_fs): Added label.
13389 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13390
13391 * kern/misc.c (pupa_strndup): New function.
13392 * include/pupa/misc.h (pupa_strndup): New prototype.
13393
13394 * include/pupa/normal.h: Include <pupa/err.h>.
13395 (pupa_set_history): New prototype.
13396 (pupa_iterate_commands): New prototype.
13397 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13398 <pupa/disk.h>, <pupa/file.h>.
13399 (hist_size): New variable.
13400 (hist_lines): Likewise.
13401 (hist_end): Likewise.
13402 (hist_used): Likewise.
13403 (pupa_set_history): New function.
13404 (pupa_history_get): Likewise.
13405 (pupa_history_add): Likewise.
13406 (pupa_history_replace): Likewise.
13407 (pupa_tab_complete): Likewise.
13408 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13409 completion shows partitionnames while completing partitions, this
13410 feature was suggested by Jeff Bailey.
13411 * normal/command.c (pupa_iterate_commands): New function.
13412 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13413 (pupa_normal_init): Initialize history buffer.
13414 (PUPA_MOD_INIT): Likewise.
13415 (pupa_normal_fini): Free the history buffer.
13416 (PUPA_MOD_FINI): Likewise.
13417
13418 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13419 key.
13420
13421 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13422 * configure.ac [i386]: Check for regparam bug.
13423 (NESTED_FUNC_ATTR) [! i386]: Defined.
13424
1f7315a3 134252003-11-17 Marco Gerards <metgerards@student.han.nl>
13426
13427 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13428 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13429 (pupa_emu_SOURCES): New variable.
13430 (pupa_emu_LDFLAGS): Likewise.
13431 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
13432 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
13433 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
13434 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13435 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13436 (pupa_jmp_buf): New typedef.
13437 (pupa_setjmp) [PUPA_UTIL]: New macro.
13438 (pupa_longjmp) [PUPA_UTIL]: Likewise.
13439 * include/pupa/term.h (struct pupa_term): New member `refresh'.
13440 (pupa_refresh): New prototype.
13441 * include/pupa/util/getroot.h: New file.
13442 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13443 it.
13444 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13445 (pupa_rescue_cmd_cat): Likewise.
13446 (pupa_rescue_cmd_ls): Likewise.
13447 (pupa_rescue_cmd_testload): Likewise.
13448 (pupa_rescue_cmd_lsmod): Likewise.
13449 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13450 * normal/menu.c (run_menu): Likewise.
13451 * kern/term.c (pupa_cls): Likewise.
13452 (pupa_refresh): New function.
13453 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13454 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13455 * util/console.c: New file.
f19dbdb7 13456
1f7315a3 13457 * util/i386/pc/getroot.c: New file.
13458 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13459 (pupa_putchar): New function.
13460 (pupa_refresh): Likewise.
13461 (xgetcwd): Function moved to ...
13462 (strip_extra_slashes): Likewise.
13463 (get_prefix): Likewise.
f19dbdb7 13464 * util/i386/pc/getroot.c: ... here.
1f7315a3 13465 (find_root_device): Function moved and renamed to...
13466 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13467 Changed all callers.
13468 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13469 and renamed to...
13470 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13471 Changed all callers.
13472 * util/misc.c (pupa_memalign): New function.
13473 (pupa_mm_init_region): Likewise.
13474 (pupa_register_exported_symbols): Likewise.
13475 (pupa_putchar): Function removed.
13476 * util/pupa-emu.c: New file.
13477
9a5c1ade 134782003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13479
13480 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13481 (_multiboot_mod_SOURCES): New variable.
13482 (_multiboot_mod_CFLAGS): Likewise.
13483 * loader/i386/pc/multiboot.c: New file.
13484 * include/pupa/i386/pc/multiboot.h: Likewise.
13485 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13486 (pupa_multiboot_real_boot): New function.
13487 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13488 (pupa_multiboot_real_boot): New prototype.
13489 (pupa_rescue_cmd_multiboot): Likewise
13490 (pupa_rescue_cmd_module): Likewise.
13491
13492 * kern/loader.c (pupa_loader_set): Continue when
13493 pupa_loader_unload_func() fails.
13494 (pupa_loader_unset): New function.
13495 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13496
13497 * kern/misc.c (pupa_stpcpy): New function.
13498 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13499
8e72a9c0 135002003-11-12 Marco Gerards <metgerards@student.han.nl>
13501
13502 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13503 for available extensions.
13504
13505 * include/pupa/i386/pc/time.h: New file.
13506 * kern/disk.c: Include <pupa/machine/time.h>.
13507 (PUPA_CACHE_TIMEOUT): New macro.
13508 (pupa_last_time): New variable.
13509 (pupa_disk_open): Flush the cache when there was a timeout.
13510 (pupa_disk_close): Reset the timer.
13511 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13512 pupa_currticks.
13513 * util/misc.c: Include <sys/times.h>
13514 (pupa_get_rtc): New function.
13515
c4adbd32 135162003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13517
13518 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13519 as blocks.
13520 (pupa_ext2_get_file_block): Use blocks member.
13521
13522 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13523 first block. Return -1 instead of pupa_errno on error.
13524
bfd30f06 135252003-10-27 Marco Gerards <metgerards@student.han.nl>
13526
13527 * README: In the pupa-mkimage example use _chain instead of chain
13528 and ext2 instead of fat.
13529 * TODO: Replace ext2fs with jfs as an example. Add an item for
13530 adding journal playback for ext2fs.
13531 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13532 (pkgdata_MODULES): Added ext2.mod.
13533 (ext2_mod_SOURCES): New variable.
13534 (ext2_mod_CFLAGS): Likewise.
13535 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13536 * include/pupa/misc.h (pupa_strncpy): New prototype.
13537 (pupa_strcat): Likewise.
13538 (pupa_strncmp): Likewise.
13539 * kern/misc.c (pupa_strcat): Enable function.
13540 (pupa_strncpy): New function.
13541 (pupa_strncmp): Likewise.
13542 * fs/ext2.c: New file.
f19dbdb7 13543
bfd30f06 13544 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13545 when the read failed before retrying.
13546 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13547 (_FILE_OFFSET_BITS): Likewise.
13548 * configure.ac: Added AC_SYS_LARGEFILE.
13549
98d15063 135502003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13551
13552 * genmk.rb (PModule#rule): Make sure to get only symbol names
13553 from the output of nm.
13554 Reported by Robert Millan <zeratul2@wanadoo.es>.
13555
18d9c7cd 135562003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13557
13558 I forgot to check in these changes for a long time. This adds
13559 incomplete support for VGA console, and this is still very
13560 buggy. Also, a lot of consideration is required for I18N,
13561 UNICODE, and VGA font issues. Therefore, assume that this is
13562 such that "better than nothing".
f19dbdb7 13563
18d9c7cd 13564 * font/manager.c: New file.
13565 * include/pupa/font.h: Likewise.
13566 * include/pupa/i386/pc/vga.h: Likewise.
13567 * term/i386/pc/vga.c: Likewise.
13568 * util/unifont2pff.rb: Likewise.
13569
13570 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13571 (pkgdata_MODULES): Added vga.mod and font.mod.
13572 (vga_mod_SOURCES): New variables.
13573 (vga_mod_CFLAGS): Likewise.
13574 (font_mod_SOURCES): Likewise.
13575 (font_mod_CFLAGS): Likewise.
13576
13577 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13578
13579 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 13580 (struct pupa_term): Added init and fini.
18d9c7cd 13581 Changed the argument of putchar to pupa_uint32_t.
13582
13583 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13584 (pupa_console_real_putchar): New prototype.
13585 (pupa_console_putchar): Removed.
13586 (pupa_console_checkkey): Exported.
13587 (pupa_console_getkey): Likewise.
13588
13589 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13590 characters.
13591
13592 * kern/term.c (pupa_term_set_current): Rewritten.
13593 (pupa_putchar): Likewise.
13594 (pupa_putcode): New function.
13595
13596 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13597 (pupa_console_real_putchar): ... this.
13598 (pupa_vga_set_mode): New function.
13599 (pupa_vga_get_font): Likewise.
13600
13601 * normal/command.c: Include pupa/term.h.
13602 (terminal_command): New function.
13603 (pupa_command_init): Register the command "terminal".
13604
13605 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13606 (DISP_UP): Likewise.
13607 (DISP_RIGHT): Likewise.
13608 (DISP_DOWN): Likewise.
13609 (DISP_HLINE): Likewise.
13610 (DISP_VLINE): Likewise.
13611 (DISP_UL): Likewise.
13612 (DISP_UR): Likewise.
13613 (DISP_LL): Likewise.
13614 (DISP_LR): Likewise.
13615
13616 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 13617
977329f5 136182003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13619
13620 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13621 FIX. Reverse the path_list.
13622
13623 * include/pupa/normal.h: Export pupa_register_command and
13624 pupa_unregister_command.
13625
13626 * hello/hello.c (pupa_cmd_hello): New module.
13627 * conf/i386-pc.rmk: Added hello.mod.
13628
1f5ab428 136292003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13630
13631 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 13632
1f5ab428 13633 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13634 (compress_kernel): New variable.
13635 (generate_image): Heavily modified to support compressing a
13636 large part of the core image.
13637
13638 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13639 leak.
13640 (pupa_util_load_image): New function.
13641
13642 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13643 (pupa_compressed_size): New variable.
13644 (codestart): Enable Gate A20 here.
13645 Decompress the compressed part of the core image.
13646 Rearrange the code to put functions and variables which are
13647 required for initialization in the non-compressed part.
13648 Include lzo1x.S.
13649
13650 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13651 here.
13652
13653 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13654
f19dbdb7 13655 * include/pupa/i386/pc/kernel.h
1f5ab428 13656 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13657 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13658 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13659 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13660 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13661
13662 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13663
13664 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13665 (Utility#rule): Likewise.
13666
13667 * configure.ac: Check if LZO is available.
13668
ce5bf700 136692003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13670
13671 * include/pupa/normal.h: New file.
13672 * include/pupa/setjmp.h: Likewise.
13673 * include/pupa/i386/setjmp.h: Likewise.
13674 * normal/cmdline.c: Likewise.
13675 * normal/command.c: Likewise.
13676 * normal/main.c: Likewise.
13677 * normal/menu.c: Likewise.
13678 * normal/i386/setjmp.S: Likewise.
f19dbdb7 13679
ce5bf700 13680 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13681 (pupa_rescue_cmd_initrd): Likewise.
13682
13683 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13684 Likewise.
13685
13686 * kern/i386/pc/startup.S (translation_table): New variable.
13687 (translate_keycode): New function.
13688 (pupa_console_getkey): Call translate_keycode.
13689
13690 * kern/rescue.c (attempt_normal_mode): New function.
13691 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13692 it failed, print a message.
13693
13694 * kern/mm.c (pupa_real_malloc): Print more information when a
13695 free magic is broken.
13696 (pupa_free): If the first free header is not free actually, set
13697 it to P.
13698
13699 * kern/main.c (pupa_load_normal_mode): Just load the module
13700 "normal".
13701 (pupa_main): Don't print the message
13702 "Entering into rescue mode..." here.
13703
13704 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13705 Declared.
13706 (pupa_rescue_cmd_initrd): Likewise.
13707 (pupa_rescue_cmd_initrd): Likewise.
13708
13709 * include/pupa/symbol.h (FUNCTION): Specify the type.
13710 (VARIABLE): Likewise.
13711
13712 * include/pupa/err.h (pupa_err_t): Added
13713 PUPA_ERR_UNKNOWN_COMMAND.
13714
13715 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13716 (pupa_dl_get_prefix): Likewise.
13717
13718 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13719 Added _chain.mod and _linux.mod instead of chain.mod and
13720 linux.mod.
13721 (chain_mod_SOURCES): Renamed to ...
13722 (_chain_mod_SOURCES): ... this.
13723 (chain_mod_CFLAGS): Renamed to ...
13724 (_chain_mod_CFLAGS): ... this.
13725 (linux_mod_SOURCES): Renamed to ...
13726 (_linux_mod_SOURCES): ... this.
13727 (linux_mod_CFLAGS): Renamed to ...
13728 (_linux_mod_CFLAGS): ... this.
13729 (normal_mod_SOURCES): New variable.
13730 (normal_mod_CFLAGS): Likewise.
13731 (normal_mod_ASFLAGS): Likewise.
13732
137332003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13734
13735 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13736 possible.
13737
fe6b695a 13738 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 13739 recursively.
13740 (pupa_dl_unref): Unrefer depending modules recursively.
13741 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13742 a module is unloaded before one depending on that module is
13743 unloaded.
13744 (pupa_dl_unload): Unload depending modules explicitly,
13745 if possible.
13746
c04da074 137472003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13748
13749 * include/pupa/i386/pc/linux.h: New file.
13750 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 13751
c04da074 13752 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13753 Removed.
13754 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13755 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13756 of PUPA_CHAINLOADER_BOOT_SECTOR.
13757
13758 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13759 (pupa_linux_prot_size): New variable.
13760 (pupa_linux_tmp_addr): Likewise.
13761 (pupa_linux_real_addr): Likewise.
13762 (pupa_linux_boot_zimage): New function.
13763 (pupa_linux_boot_bzimage): Likewise.
13764
13765 * kern/i386/pc/init.c (struct mem_region): New structure.
13766 (MAX_REGIONS): New macro.
13767 (mem_regions): New variable.
13768 (num_regions): Likewise.
13769 (pupa_os_area_addr): Likewise.
13770 (pupa_os_area_size): Likewise.
13771 (pupa_lower_mem): Likewise.
13772 (pupa_upper_mem): Likewise.
13773 (add_mem_region): New function.
13774 (compact_mem_regions): Likewise.
13775 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13776 the size of the conventional memory and that of so-called upper
13777 memory (before the first memory hole).
13778 Instead of adding each found region to free memory, use
13779 add_mem_region and add them after removing overlaps.
13780 Also, add only 1/4 of the upper memory to free memory. The rest
13781 is used for loading OS images. Maybe this is ad hoc, but this
13782 makes it much easier to relocate OS images when booting.
13783
13784 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13785 (pupa_enter_rescue_mode): Don't register initrd and module.
13786
13787 * kern/mm.c: Include pupa/dl.h.
13788
13789 * kern/main.c: Include pupa/file.h and pupa/device.h.
13790
13791 * kern/loader.c (pupa_loader_load_module_func): Removed.
13792 (pupa_loader_load_module): Likewise.
13793
13794 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13795 ``.o''.
13796
13797 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13798 (pupa_linux_tmp_addr): Likewise.
13799 (pupa_linux_real_addr): Likewise.
13800 (pupa_linux_boot_zimage): Likewise.
13801 (pupa_linux_boot_bzimage): Likewise.
13802
13803 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13804 (pupa_upper_mem): Likewise.
13805 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13806 module is too dangerous.
13807
13808 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13809 (pupa_os_area_size): Likewise.
13810 (pupa_loader_set): Remove the first argument. Loader doesn't
13811 manage modules or initrd any longer.
13812 (pupa_loader_load_module): Removed.
13813
13814 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13815 (linux_mod_SOURCES): New variable.
13816 (linux_mod_CFLAGS): Likewise.
13817
a13f9237 138182003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13819
13820 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13821 the length of a blocklist correctly.
13822
13823 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13824 Use ioctl only if the OS file is a block device.
13825 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13826 not very useful for normal files.
13827
13828 * kern/main.c (pupa_set_root_dev): New function.
13829 (pupa_load_normal_mode): Likewise.
13830 (pupa_main): Call those above.
13831
13832 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13833 pupa_uint16_t.
13834
13835 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13836
a5ffe966 138372003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13838
13839 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13840 (setup): Configure the installed partition information and the
13841 dl prefix.
13842
13843 * loader/i386/pc/chainloader.c (my_mod): New variable.
13844 (pupa_chainloader_unload): New function.
13845 (pupa_rescue_cmd_chainloader): Refer itself.
13846 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13847
13848 * kern/i386/pc/startup.S (install_partition): Removed.
13849 (version_string): Likewise.
13850 (config_file): Likewise.
13851 (pupa_install_dos_part): New variable.
13852 (pupa_install_bsd_part): Likewise.
13853 (pupa_prefix): Likewise.
13854 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13855
13856 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13857 and pupa/misc.h.
13858 (make_install_device): New function.
13859 (pupa_machine_init): Set the dl prefix.
13860
13861 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13862 (buf): Renamed to ...
13863 (linebuf): ... this.
13864 (pupa_rescue_cmd_prefix): New function.
13865 (pupa_rescue_cmd_insmod): Likewise.
13866 (pupa_rescue_cmd_rmmod): Likewise.
13867 (pupa_rescue_cmd_lsmod): Likewise.
13868 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13869 rmmod and lsmod.
13870
13871 * kern/mm.c (pupa_memalign): If failed even after invalidating
13872 disk caches, unload unneeded modules and retry.
13873
13874 * kern/misc.c (pupa_memmove): New function.
13875 (pupa_memcpy): Removed.
13876 (pupa_strcpy): New function.
13877 (pupa_itoa): Made static.
13878
13879 * kern/dl.c (pupa_dl_iterate): New function.
13880 (pupa_dl_ref): Likewise.
13881 (pupa_dl_unref): Likewise.
13882 (pupa_dl_unload): Return if succeeded or not.
13883 (pupa_dl_unload_unneeded): New function.
13884 (pupa_dl_unload_all): Likewise.
13885 (pupa_dl_init): Renamed to ...
13886 (pupa_dl_set_prefix): ... this.
13887 (pupa_dl_get_prefix): New function.
13888
13889 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13890 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13891 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13892 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13893 (pupa_install_dos_part): Declared.
13894 (pupa_install_bsd_part): Likewise.
13895 (pupa_prefix): Likewise.
13896 (pupa_boot_drive): Likewise.
13897
13898 * include/pupa/types.h: Fix a typo.
13899
13900 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13901 pupa_memmove.
13902 (pupa_memmove): Declared.
13903 (pupa_strcpy): Likewise.
13904
13905 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13906 pupa_mod_init takes one argument, its own module.
13907 (pupa_dl_unload_unneeded): Declared.
13908 (pupa_dl_unload_all): Likewise.
13909 (pupa_dl_ref): Likewise.
13910 (pupa_dl_unref): Likewise.
13911 (pupa_dl_iterate): Likewise.
13912 (pupa_dl_init): Renamed to ...
13913 (pupa_dl_set_prefix): ... this.
13914 (pupa_dl_get_prefix): Declared.
13915
13916 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 13917 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 13918 unloaded.
13919 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13920 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13921
13922 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13923 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13924
012d7999 139252003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13926
13927 * util/i386/pc/pupa-setup.c (setup): Define the internal
13928 function find_first_partition_start at the top level, because GCC
13929 3.0.x cannot compile internal functions in deeper scopes
13930 correctly.
13931 (find_root_device): Use lstat instead of stat.
13932 Don't follow symbolic links.
13933 Fix the path-constructing code.
13934
13935 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13936 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13937 by a BLKGETSIZE ioctl first, because block devices don't fill
13938 the member st_mode of the structure stat on Linux.
13939 [__linux__] (linux_find_partition): Use a temporary buffer
13940 REAL_DEV for the working space. Copy it to DEV before returning.
13941 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13942 buffer cache consistent.
13943 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13944 strncmp. The previous value was merely wrong.
13945 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13946
13947 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13948 FAT size is 12. The previous value was merely wrong.
13949
13950 * kern/main.c (pupa_main): Don't split the starting message from
13951 newlines.
13952
13953 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13954 LF, because BIOS goes crazy about character attributes in this
13955 case.
13956
1cc73a62 139572003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13958
13959 * include/i386/pc/util/biosdisk.h: New file.
13960 * util/i386/pc/biosdisk.c: Likewise.
13961 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 13962
1cc73a62 13963 * Makefile.in (INCLUDE_DISTFILES): Added
13964 include/pupa/i386/pc/util/biosdisk.h.
13965 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13966 directory util/i386/pc.
13967 (install-local): Added a rule for sbin_UTILITIES.
13968 (uninstall): Likewise.
13969
13970 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13971
13972 * util/misc.c (xrealloc): New function.
13973 (pupa_malloc): Likewise.
13974 (pupa_free): Likewise.
13975 (pupa_realloc): Likewise.
13976 (pupa_stop): Likewise.
13977 (pupa_putchar): Likewise.
13978
13979 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13980
13981 * include/pupa/util/misc.h (xrealloc): Declared.
13982
13983 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13984 macro.
13985 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13986 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13987
13988 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13989 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13990
13991 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13992 way should be implemented.
13993 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13994
13995 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13996 the size of NAME for safety.
13997 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13998 0x88.
13999
14000 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14001 (pupa_setup_SOURCES): Likewise.
14002
14003 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14004
08b70fe8 140052002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14006
14007 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14008 bunch of pushl's from pusha, because this destroys the return
14009 value.
14010
62ddcc8f 140112002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14012
14013 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14014 This means that any missing prototypes could be fatal. Also, you
14015 must take care when writing assembly code. See the comments at
14016 the beginning of startup.S, for more details.
f19dbdb7 14017
62ddcc8f 14018 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14019 compilation mechanism.
14020 (pupa_chainloader_real_boot): Likewise.
14021 (pupa_biosdisk_rw_int13_extensions): Likewise.
14022 (pupa_biosdisk_rw_standard): Likewise.
14023 (pupa_biosdisk_check_int13_extensions): Likewise.
14024 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14025 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14026 (pupa_get_memsize): Likewise.
14027 (pupa_get_mmap_entry): Likewise.
14028 (pupa_console_putchar): Likewise.
14029 (pupa_console_setcursor): Likewise.
14030 (pupa_getrtsecs): Use pushl instead of push.
14031
14032 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14033 memory instead of the stack for a mmap entry, because some
14034 BIOSes may ignore the maximum size and overflow.
14035
14036 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14037
14038 * genmk.rb (PModule#rule): Compile automatically generated
14039 sources with module-specific CFLAGS as well as other sources.
14040
9962ed99 140412002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14042
14043 * configure.ac: Check ld.
14044 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14045 respectively, before checking endianness and sizes.
14046
14047 * Makefile.in (LD): New variable.
f19dbdb7 14048
abdfc3c5 140492002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14050
14051 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14052
6a161fa9 140532002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14054
14055 * Changelog: New file.
14056