1 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
7 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11 2009-02-02 Christian Franke <franke@computer.org>
13 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
15 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
17 * INSTALL: Note that we now require at least autconf 2.59 and that LZO
20 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
22 Base on patch on bug #24154 created by Tomas Tintera
25 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
27 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
29 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
32 * normal/parser.y (script_init): Add missing semicolon.
34 2009-01-31 Colin D Bennett <colin@gibibit.com>
36 * normal/main.c: Add include to grub/menu_viewer.h.
37 (free_menu_entry_classes): Added.
38 (grub_normal_menu_addentry): Added class property handling.
39 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
40 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
42 * normal/menu_viewer.c: New file.
44 * normal/menu.c (run_menu_entry): Renamed to ...
45 (grub_menu_execute_entry): ... this and made it as global.
46 (grub_menu_run): Renamed to ...
47 (show_text_menu): ... this and made it local.
48 (show_text_menu): Adapt to new function names.
49 (grub_normal_terminal_menu_viewer): New global variable.
51 * include/grub/menu.h: New file.
53 * include/grub/menu_viewer.h: New file.
55 * include/grub/normal.h: Added include to grub/menu.h.
56 (grub_menu_entry): Moved to include/grub/menu.h.
57 (grub_menu_entry_t): Likewise.
58 (grub_menu): Likewise.
59 (grub_menu_t): Likewise.
60 (grub_normal_terminal_menu_viewer): Added.
61 (grub_menu_execute_entry): Likewise.
62 (grub_menu_run): Removed.
64 * DISTLIST: Added include/grub/menu.h.
65 Added include/grub/menu_viewer.h.
66 Added normal/menu_viewer.c.
68 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
70 * normal/execute.c (grub_script_execute_menuentry): Changed to use
71 arglist for menutitle arguments.
73 * normal/main.c (grub_normal_menu_addentry): Likewise.
75 * normal/parser.y (menuentry): Likewise.
77 * normal/script.c (grub_script_create_cmdmenu): Likewise.
79 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
80 (grub_script_create_cmdmenu): Likewise.
82 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
84 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
87 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
89 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
91 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
93 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
95 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
97 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
99 2009-01-30 Christian Franke <franke@computer.org>
101 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
104 2009-01-27 Pavel Roskin <proski@gnu.org>
106 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
108 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
110 * commands/lsmmap.c: Add include to grub/machine/memory.h.
112 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
114 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
117 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
119 * disk/scsi.c (grub_scsi_read): Fix sign problem.
121 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
123 * util/grub-mkfont.c (usage): Fix typo.
125 * util/elf/grub-mkimage.c (load_modules): Fix warning.
127 2009-01-26 Daniel Mierswa <impulze@impulze.org>
129 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
131 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
133 * kern/misc.c (grub_strcasecmp): New function.
134 (grub_strcasecmp): Use grub_size_t instead of int for length.
136 * include/grub/misc.h: Update function prototypes.
138 2009-01-26 Robert Millan <rmh@aybabtu.com>
140 * configure.ac: Fix cross-compilation check.
142 2009-01-22 Christian Franke <franke@computer.org>
144 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
145 (precision) digit string. Allow `.format2' without `format1' (width).
146 Limit input chars for `%s' output to `format2' if specified. This is
147 compatible with standard printf ().
149 2009-01-22 Christian Franke <franke@computer.org>
151 * disk/ata.c (grub_ata_wait_status): Replace by ...
152 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
153 other status bits may be invalid while BSY is asserted.
154 (grub_ata_check_ready): New function.
155 (grub_ata_cmd): Removed.
156 (grub_ata_wait_drq): New function.
157 (grub_ata_strncpy): Remove inline.
158 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
159 and error check now done by grub_ata_wait_drq ().
160 (grub_ata_pio_write): Likewise.
161 (grub_atapi_identify): Set DEV before check for !BSY. Use
162 grub_ata_wait_drq () to wait for data.
163 (grub_ata_device_initialize): Add status register check to
164 detect missing SATA slave devices. Add debug messages.
165 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
166 (grub_atapi_packet): Set DEV before check for !BSY. Replace
167 transfer loop by grub_ata_pio_write ().
168 (grub_ata_identify): Set DEV before check for !BSY. Use
169 grub_ata_wait_drq () to wait for data.
170 (grub_ata_setaddress): Set DEV before check for !BSY.
171 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
172 read/write in one loop. Fix invalid command on write. Fix incomplete
173 command on (size % batch) == 0. Add missing error check after write of
174 last block. Add debug messages.
175 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
177 2009-01-19 Christian Franke <franke@computer.org>
179 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
180 (GRUB_ATAPI_IREASON_*): Likewise.
181 (grub_ata_pio_write): Fix timeout error return.
182 (grub_atapi_identify): Add grub_ata_wait () after cmd.
183 (grub_atapi_wait_drq): New function.
184 (grub_atapi_packet): New parameter `size'.
185 Use grub_atapi_wait_drq () and direct write instead of
186 grub_ata_pio_write ().
187 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
188 reads the number of bytes requested by the device for each DRQ
190 (grub_atapi_write): Remove old implementation, return not
193 2009-01-19 Christian Franke <franke@computer.org>
195 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
196 of 512 to calculate data size.
197 (grub_scsi_read12): Likewise.
198 (grub_scsi_write10): Likewise.
199 (grub_scsi_write12): Likewise.
200 (grub_scsi_read): Adjust size according to blocksize.
201 Add checks for invalid blocksize and unaligned transfer.
203 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
205 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
207 * term/gfxterm.c (write_char): Fix background rendering for wide
210 2009-01-19 Robert Millan <rmh@aybabtu.com>
212 * config.guess: Update to latest version from config git.
213 * config.sub: Likewise.
215 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
217 * Makefile.in: Change font compilation to use new grub-mkfont instead
220 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
221 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
222 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
223 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
224 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
225 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
226 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
227 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
228 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
230 2009-01-16 Christian Franke <franke@computer.org>
232 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
233 (enum grub_ata_timeout_milliseconds): New enum.
234 (grub_ata_wait_status): Add parameter milliseconds.
235 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
236 recovery from timed-out commands.
237 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
238 return grub_errno instead of REG_ERROR.
239 (grub_ata_pio_write): Add parameter milliseconds.
240 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
241 Pass milliseconds to grub_ata_wait_status () and
242 grub_ata_pio_read ().
243 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
244 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
245 grub_ata_wait_status (). Fix IDENTIFY timeout check.
246 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
247 It is not suitable for device detection, because DEV bit is ignored,
248 the command may run too long, and not all devices set the signature
250 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
251 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
252 Fix device selection, DEV bit must be set first to address the registers
253 of the correct device.
254 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
255 grub_ata_pio_read/write ().
256 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
257 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
259 2009-01-13 Carles Pina i Estany <carles@pina.cat>
261 * util/grub-editenv.c (main): Use fseeko(), not fseek().
263 2009-01-13 Bean <bean123ch@gmail.com>
265 * util/grub-mkfont.c (write_font): forget to remove some debug code.
267 2009-01-13 Bean <bean123ch@gmail.com>
269 * Makefile.in: (enable_grub_mkfont): New variable.
270 (freetype_cflags): Likewise.
271 (freetype_libs): Likewise.
273 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
274 (grub_mkfont_SOURCES): New variable.
275 (grub_mkfont_CFLAGS): Likewise.
276 (grub_mkfont_LDFLAGS): Likewise.
278 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
279 library if `--enable-grub-mkfont' is requested.
280 (enable_grub_mkfont): New variable.
281 (freetype_cflags): Likewise.
282 (freetype_libs): Likewise.
284 * util/grub-mkfont.c: New file.
286 2009-01-12 Christian Franke <franke@computer.org>
288 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
289 mode check. Fix setting of compat_use[].
291 2009-01-10 Robert Millan <rmh@aybabtu.com>
293 Update a few copyright years which we forgot to do in 2008 (only for
294 files whose changes made in 2008 were copyright-significant)
296 * Makefile.in: Add 2008 to Copyright line.
297 * disk/ieee1275/ofdisk.c: Likewise.
298 * disk/efi/efidisk.c: Likewise.
299 * kern/dl.c: Likewise.
300 * kern/sparc64/ieee1275/init.c: Likewise.
301 * kern/mm.c: Likewise.
302 * kern/efi/mm.c: Likewise.
303 * boot/i386/pc/boot.S: Likewise.
304 * genfslist.sh: Likewise.
305 * fs/iso9660.c: Likewise.
306 * fs/hfs.c: Likewise.
307 * fs/jfs.c: Likewise.
308 * fs/minix.c: Likewise.
309 * fs/ufs.c: Likewise.
310 * gensymlist.sh.in: Likewise.
311 * genkernsyms.sh.in: Likewise.
312 * include/grub/misc.h: Likewise.
313 * include/grub/types.h: Likewise.
314 * include/grub/symbol.h: Likewise.
315 * include/grub/elf.h: Likewise.
316 * include/grub/kernel.h: Likewise.
317 * include/grub/disk.h: Likewise.
318 * include/grub/dl.h: Likewise.
319 * include/grub/i386/linux.h: Likewise.
320 * include/grub/i386/pc/biosdisk.h: Likewise.
321 * include/grub/efi/api.h: Likewise.
322 * include/grub/efi/pe32.h: Likewise.
323 * include/grub/util/misc.h: Likewise.
324 * normal/execute.c: Likewise.
325 * normal/arg.c: Likewise.
326 * normal/completion.c: Likewise.
327 * normal/lexer.c: Likewise.
328 * normal/parser.y: Likewise.
329 * normal/misc.c: Likewise.
330 * commands/i386/pc/vbeinfo.c: Likewise.
331 * commands/hexdump.c: Likewise.
332 * commands/terminal.c: Likewise.
333 * commands/ls.c: Likewise.
334 * commands/help.c: Likewise.
335 * partmap/pc.c: Likewise.
336 * loader/efi/chainloader.c: Likewise.
337 * loader/multiboot_loader.c: Likewise.
338 * loader/i386/pc/multiboot2.c: Likewise.
339 * term/efi/console.c: Likewise.
340 * term/i386/pc/serial.c: Likewise.
341 * util/lvm.c: Likewise.
342 * util/console.c: Likewise.
343 * util/i386/efi/grub-mkimage.c: Likewise.
344 * util/raid.c: Likewise.
346 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
348 * commands/videotest.c: Removed include to grub/machine/memory.h.
350 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
351 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
352 (video_mod_SOURCES): Removed.
353 (video_mod_CFLAGS): Likewise.
354 (video_mod_LDFLAGS): Likewise.
355 (gfxterm_mod_SOURCES): Likewise.
356 (gfxterm_mod_CFLAGS): Likewise.
357 (gfxterm_mod_LDFLAGS): Likewise.
358 (videotest_mod_SOURCES): Likewise.
359 (videotest_mod_CFLAGS): Likewise.
360 (videotest_mod_LDFLAGS): Likewise.
361 (bitmap_mod_SOURCES): Likewise.
362 (bitmap_mod_CFLAGS): Likewise.
363 (bitmap_mod_LDFLAGS): Likewise.
364 (tga_mod_SOURCES): Likewise.
365 (tga_mod_CFLAGS): Likewise.
366 (tga_mod_LDFLAGS): Likewise.
367 (jpeg_mod_SOURCES): Likewise.
368 (jpeg_mod_CFLAGS): Likewise.
369 (jpeg_mod_LDFLAGS): Likewise.
370 (png_mod_SOURCES): Likewise.
371 (png_mod_CFLAGS): Likewise.
372 (png_mod_LDFLAGS): Likewise.
374 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
375 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
376 (video_mod_SOURCES): Added.
377 (video_mod_CFLAGS): Likewise.
378 (video_mod_LDFLAGS): Likewise.
379 (videotest_mod_SOURCES): Likewise.
380 (videotest_mod_CFLAGS): Likewise.
381 (videotest_mod_LDFLAGS): Likewise.
382 (bitmap_mod_SOURCES): Likewise.
383 (bitmap_mod_CFLAGS): Likewise.
384 (bitmap_mod_LDFLAGS): Likewise.
385 (tga_mod_SOURCES): Likewise.
386 (tga_mod_CFLAGS): Likewise.
387 (tga_mod_LDFLAGS): Likewise.
388 (jpeg_mod_SOURCES): Likewise.
389 (jpeg_mod_CFLAGS): Likewise.
390 (jpeg_mod_LDFLAGS): Likewise.
391 (png_mod_SOURCES): Likewise.
392 (png_mod_CFLAGS): Likewise.
393 (png_mod_LDFLAGS): Likewise.
394 (gfxterm_mod_SOURCES): Likewise.
395 (gfxterm_mod_CFLAGS): Likewise.
396 (gfxterm_mod_LDFLAGS): Likewise.
398 * term/gfxterm.c: Removed include to grub/machine/memory.h,
399 grub/machine/console.h.
401 2009-01-04 Jerone Young <jerone@gmail.com>
403 Make on screen instructions clearer
405 Based on patch created by Jidanni <jidanni@jidanni.org>
407 * normal/menu.c: print clearer instructions on the screen
409 2009-01-02 Colin D Bennett <colin@gibibit.com>
413 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
414 build system and fixed gfxterm.c to work with different sized fonts.
416 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
418 * configure: Re-generated.
420 * DISTLIST: Removed font/manager.c.
422 Added font/font_cmd.c.
424 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
427 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
429 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
431 * kern/term.c: Changed users of grub_utf8_to_ucs4.
433 * normal/menu.c: Likewise.
435 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
436 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
438 * include/grub/font.h: Replaced with new file.
440 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
441 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
442 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
443 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
444 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
445 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
446 fg_red, fg_green, fg_blue, fg_alpha.
447 (grub_video_adapter): Removed blit_glyph.
448 (grub_video_blit_glyph): Removed.
450 * font/manager.c: Removed file.
452 * font/font.c: New file.
454 * font/font_cmd.c: Likewise.
456 * video/video.c (grub_video_blit_glyph): Removed.
458 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
459 (grub_video_vbe_map_rgba): Likewise.
460 (grub_video_vbe_unmap_color_int): Likewise.
461 (grub_video_vbe_blit_glyph): Removed.
462 (grub_video_vbe_adapter): Removed blit_glyph.
464 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
465 (get_pixel): Likewise.
466 (set_pixel): Likewise.
468 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
470 * term/gfxterm.c: Adapted to new font engine.
472 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
474 * term/i386/pc/vga.c: Likewise.
476 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
478 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
480 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
482 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
484 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
486 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
488 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
490 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
492 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
494 * util/grub.d/00_header.in: Changed to use new loadfont command.
496 * util/grub-mkconfig_lib.in: Changed font extension.
498 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
500 * util/getroot.c (grub_util_get_grub_dev): Add support for
501 /dev/md/dNNpNN style partitionable mdraid devices.
503 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
505 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
506 at a time limit of the PXE TFTP API correctly.
507 (grub_pxefs_close): Likewise.
509 2008-11-29 Robert Millan <rmh@aybabtu.com>
511 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
512 grub_ata_device_initialize() calls.
514 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
516 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
518 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
520 2008-11-28 Robert Millan <rmh@aybabtu.com>
522 Fix build on powerpc-ieee1275. Based on patch created by
523 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
524 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
525 `kern/ieee1275/mmap.c'.
526 * include/grub/powerpc/ieee1275/memory.h: New file.
528 Provide grub-install on coreboot.
529 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
530 (grub_install_SOURCES): New variable.
531 * util/i386/pc/grub-install.in: Add a few condition checks to make it
534 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
536 * util/grub-fstest.c (grub_term_get_current_input): Change return type
537 to `grub_term_input_t'.
538 (grub_term_get_current_output): Change return type to
539 `grub_term_output_t'.
541 2008-11-22 Robert Millan <rmh@aybabtu.com>
543 Fix breakage on coreboot due to declaration mismatch.
544 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
545 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
548 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
549 comments. Avoid copying one more byte than necessary (just in case).
551 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
552 to 0x200000 (avoids trouble with some OFW implementations, and matches
553 with the one in Yaboot).
554 Reported by Manoel Abranches
556 2008-11-20 Robert Millan <rmh@aybabtu.com>
558 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
559 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
561 * util/grub-mkconfig_lib.in (grub_warn): New function.
562 (convert_system_path_to_grub_path): Use grub_warn() when issuing
563 warnings, to obtain consistent formatting.
564 * util/grub.d/00_header.in: Likewise.
565 * util/update-grub_lib.in: Likewise.
567 * loader/i386/linux.c (allocate_pages): Fix a warning.
568 Move comment text to `#error' stanza.
570 Harmonize ieee1275's grub_available_iterate() with the generic
571 grub_machine_mmap_iterate() interface (fixes a recently-introduced
572 build problem on i386-ieee1275):
573 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
574 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
575 parameter `type'. Update all users of this function.
576 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
577 `kern/ieee1275/mmap.c'.
578 * kern/ieee1275/init.c
579 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
581 (grub_machine_mmap_iterate): ... this.
582 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
583 return type to `grub_err_t'. Update all implementations of this
585 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
588 Add `lsmmap' command (lists firmware-provided memory map):
589 * commands/lsmmap.c: New file.
590 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
591 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
593 * conf/powerpc-ieee1275.rmk: Likewise.
594 * conf/i386-coreboot.rmk: Likewise.
595 * conf/i386-ieee1275.rmk: Likewise.
597 2008-11-19 Robert Millan <rmh@aybabtu.com>
599 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
600 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
601 constraints to initrd allocation (based on code from
602 loader/i386/pc/linux.c). Without them, initrd was allocated too high
603 for Linux to find it.
605 2008-11-14 Robert Millan <rmh@aybabtu.com>
607 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
608 order to cope with duplicate slashes.
610 2008-11-14 Robert Millan <rmh@aybabtu.com>
612 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
613 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
614 don't want to mess with lower memory, because it is used in the Linux
617 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
618 an appropriate place in lower memory, between 0x10000 and 0x90000,
619 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
620 is in our heap (probably as a result of it being corrupted during
621 decompression). Add #error instance with comment to explain why this
622 loader isn't currently usable on PC/BIOS.
624 2008-11-14 Robert Millan <rmh@aybabtu.com>
626 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
627 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
629 2008-11-12 Robert Millan <rmh@aybabtu.com>
631 Make loader/i386/linux.c buildable on i386-pc (although disabled).
633 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
634 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
636 * include/grub/i386/pc/memory.h: ... to here.
638 2008-11-12 Robert Millan <rmh@aybabtu.com>
640 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
643 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
644 (grub_console_cur_color, grub_console_real_putchar)
645 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
646 (grub_console_setcolorstate, grub_console_setcolor)
647 (grub_console_getcolor): Move from here ...
648 * include/grub/i386/vga_common.h: ... to here (new file).
650 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
651 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
653 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
654 `<grub/i386/vga_common.h>'.
656 2008-11-12 Robert Millan <rmh@aybabtu.com>
658 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
659 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
660 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
662 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
663 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
665 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
666 grub_console_init() with call to grub_vga_text_init().
667 (grub_machine_fini): Replace call to
668 grub_console_fini() with call to grub_vga_text_fini() and
669 grub_at_keyboard_fini().
671 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
672 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
673 (grub_console_setcolorstate, grub_console_setcolor)
674 (grub_console_getcolor): New function prototypes.
676 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
677 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
678 (grub_vga_text_setcursor): Static-ize.
679 (grub_vga_text_term): New structure.
680 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
682 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
683 (grub_console_cur_color, grub_console_standard_color)
684 (grub_console_normal_color, grub_console_highlight_color)
685 (map_char, grub_console_putchar, grub_console_getcharwidth)
686 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
687 (grub_console_getcolor): Move from here ...
688 * term/i386/vga_common.c: ... to here (same function names).
690 2008-11-12 Robert Millan <rmh@aybabtu.com>
692 Use newly-added Multiboot support in coreboot.
694 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
695 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
697 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
698 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
699 (codestart): Store the MBI in `startup_multiboot_info' when we're
700 being loaded using Multiboot.
702 * kern/i386/coreboot/init.c (grub_machine_init): Move
703 grub_at_keyboard_init() call to beginning of function (useful for
704 debugging). Call grub_machine_mmap_init() before attempting to use
705 grub_machine_mmap_iterate().
706 (grub_lower_mem, grub_upper_mem): Move from here ...
707 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
710 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
713 2008-11-12 Robert Millan <rmh@aybabtu.com>
715 Fix a regression introduced by the at_keyboard.mod split. Because
716 some terminals are default on some platforms and non-default on
717 others, the first terminal being registered determines which is
720 * kern/term.c (grub_term_register_input): If this is the first
721 terminal being registered, set it as the current one.
722 (grub_term_register_output): Likewise.
724 * term/efi/console.c (grub_console_init): Do not call
725 grub_term_set_current_output() or grub_term_set_current_input().
726 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
727 * term/i386/pc/console.c (grub_console_init): Likewise.
728 (grub_console_fini): Do not call grub_term_set_current_input()
729 (but leave grub_term_set_current_output() to restore text mode).
731 2008-11-10 Robert Millan <rmh@aybabtu.com>
733 * util/grub.d/00_header.in: Add backward compatibility check for
734 versions of terminal.mod that don't understand `terminal_input' or
737 2008-11-09 Robert Millan <rmh@aybabtu.com>
739 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
740 `terminal_input' / `terminal_output', not `terminal'.
742 2008-11-08 Robert Millan <rmh@aybabtu.com>
744 * Makefile.in (include_DATA): Fix srcdir=. assumption.
745 (DISTCLEANFILES): Add `build_env.mk'.
747 2008-11-08 Robert Millan <rmh@aybabtu.com>
749 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
750 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
751 members. Update all users.
752 * util/console.c (grub_ncurses_term): Split in ...
753 (grub_ncurses_term_input): ... this, and ...
754 (grub_ncurses_term_output): ... this. Update all users.
755 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
757 2008-11-08 Robert Millan <rmh@aybabtu.com>
759 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
760 (PKGDATA): Add $(pkgdata_SRCDIR).
761 (pkglib_BUILDDIR): New variable.
762 (pkgdata_SRCDIR): New variable.
763 (build_env.mk): New target.
764 (include_DATA): New variable.
765 (install-local): Install $(include_DATA) files in $(includedir).
767 2008-11-07 Pavel Roskin <proski@gnu.org>
769 * gendistlist.sh: Use C locale for sorting to ensure consistent
770 output on all systems.
772 * util/grub.d/00_header.in: Remove incorrect space before
775 2008-11-07 Robert Millan <rmh@aybabtu.com>
777 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
779 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
780 * loader/multiboot_loader.c (find_multi_boot2_header): New function
781 (based on find_multi_boot1_header).
782 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
783 using find_multi_boot2_header(), and abort if neither Multiboot or
784 Multiboot headers were found.
786 2008-11-07 Robert Millan <rmh@aybabtu.com>
788 Modularize at_keyboard.mod:
790 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
791 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
792 (at_keyboard_mod_LDFLAGS): New variables.
794 Actual terminal split:
796 * include/grub/term.h (struct grub_term): Split in ...
797 (struct grub_term_input): ... this, and ...
798 (struct grub_term_output): ... this. Update all users.
799 (grub_term_set_current): Split in ...
800 (grub_term_set_current_input): ... this, and ...
801 (grub_term_set_current_output): ... this.
802 (grub_term_get_current): Split in ...
803 (grub_term_get_current_input): ... this, and ...
804 (grub_term_get_current_output): ... this.
805 (grub_term_register): Split in ...
806 (grub_term_register_input): ... this, and ...
807 (grub_term_register_output): ... this.
808 (grub_term_unregister): Split in ...
809 (grub_term_unregister_input): ... this, and ...
810 (grub_term_unregister_output): ... this.
811 (grub_term_iterate): Split in ...
812 (grub_term_iterate_input): ... this, and ...
813 (grub_term_iterate_output): ... this.
815 * kern/term.c (grub_term_list): Split in ...
816 (grub_term_list_input): ... this, and ...
817 (grub_term_list_output): ... this. Update all users.
818 (grub_cur_term): Split in ...
819 (grub_cur_term_input): ... this, and ...
820 (grub_cur_term_output): ... this. Update all users.
821 (grub_term_set_current): Split in ...
822 (grub_term_set_current_input): ... this, and ...
823 (grub_term_set_current_output): ... this.
824 (grub_term_get_current): Split in ...
825 (grub_term_get_current_input): ... this, and ...
826 (grub_term_get_current_output): ... this.
827 (grub_term_register): Split in ...
828 (grub_term_register_input): ... this, and ...
829 (grub_term_register_output): ... this.
830 (grub_term_unregister): Split in ...
831 (grub_term_unregister_input): ... this, and ...
832 (grub_term_unregister_output): ... this.
833 (grub_term_iterate): Split in ...
834 (grub_term_iterate_input): ... this, and ...
835 (grub_term_iterate_output): ... this.
837 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
838 a check for input and one for output (and only attempt to get keys
839 from user when input works).
841 * util/grub-probe.c (grub_term_get_current): Split in ...
842 (grub_term_get_current_input): ... this, and ...
843 (grub_term_get_current_output): ... this.
844 * util/grub-fstest.c: Likewise.
845 * util/i386/pc/grub-setup.c: Likewise.
846 * util/grub-editenv.c: Likewise.
848 Portability adjustments:
850 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
851 `term/i386/pc/at_keyboard.c'.
852 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
853 grub_keyboard_controller_init() (now handled by terminal .init).
854 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
855 grub_at_keyboard_init().
856 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
857 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
858 at_keyboard.mod via input terminal interface).
859 * include/grub/i386/coreboot/console.h: Convert into a stub for
860 `<grub/i386/pc/console.h>'.
862 Migrate full terminals to new API:
864 * term/efi/console.c (grub_console_term): Split into ...
865 (grub_console_term_input): ... this, and ...
866 (grub_console_term_output): ... this. Update all users.
867 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
868 (grub_ofconsole_init): Split into ...
869 (grub_ofconsole_init_input): ... this, and ...
870 (grub_ofconsole_init_output): ... this.
871 (grub_ofconsole_term): Split into ...
872 (grub_ofconsole_term_input): ... this, and ...
873 (grub_ofconsole_term_output): ... this. Update all users.
874 * term/i386/pc/serial.c (grub_serial_term): Split into ...
875 (grub_serial_term_input): ... this, and ...
876 (grub_serial_term_output): ... this. Update all users.
877 * term/i386/pc/console.c (grub_console_term): Split into ...
878 (grub_console_term_input): ... this, and ...
879 (grub_console_term_output): ... this. Update all users.
880 (grub_console_term_input): Only enable it on PC/BIOS platform.
881 (grub_console_init): Remove grub_keyboard_controller_init() call.
883 Migrate input terminals to new API:
885 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
886 `i386' and `i386/pc' to enable build on x86_64 (this driver is
887 i386-specific anyway).
888 (grub_console_checkkey): Rename to ...
889 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
891 (grub_keyboard_controller_orig): New variable.
892 (grub_console_getkey): Rename to ...
893 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
895 (grub_keyboard_controller_init): Static-ize. Save original
896 controller value so that it can be restored ...
897 (grub_keyboard_controller_fini): ... here (new function).
898 (grub_at_keyboard_term): New structure.
899 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
902 Migrate output terminals to new API:
904 * term/i386/pc/vga.c (grub_vga_term): Change type to
905 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
906 members. Update all users.
907 * term/gfxterm.c (grub_video_term): Change type to
908 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
909 members. Update all users.
910 * include/grub/i386/pc/console.h (grub_console_checkkey)
911 (grub_console_getkey): Do not export (no longer needed by gfxterm,
914 Migrate `terminal' command and userland tools to new API:
916 * commands/terminal.c (grub_cmd_terminal): Split into ...
917 (grub_cmd_terminal_input): ... this, and ...
918 (grub_cmd_terminal_output): ... this.
919 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
920 `terminal_input' and `terminal_output'.
921 * util/grub.d/00_header.in: Adjust `terminal' calls to new
922 `terminal_input' / `terminal_output' API.
923 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
924 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
925 provided ${GRUB_TERMINAL}, convert it).
927 2008-11-04 Robert Millan <rmh@aybabtu.com>
929 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
931 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
933 2008-11-03 Bean <bean123ch@gmail.com>
935 * kern/elf.c (grub_elf32_load): Revert to previous code.
936 (grub_elf64_load): Likewise.
938 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
940 2008-11-01 Robert Millan <rmh@aybabtu.com>
942 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
943 (TARGET_CPPFLAGS): Likewise.
944 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
946 2008-11-01 Carles Pina i Estany <carles@pina.cat>
948 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
950 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
952 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
953 addition of objects until the code is not going to be able to fail.
955 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
957 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
958 (add a missing NULL check, and correct them by moving the pointer
959 operations after the actual check).
961 2008-10-29 Robert Millan <rmh@aybabtu.com>
963 * util/i386/pc/grub-install.in: Handle empty string as output from
964 make_system_path_relative_to_its_root().
966 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
968 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
969 circular metadata worst case scenario. If the metadata is circular
970 then copy the wrap in place.
971 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
972 project lib/format_text/layout.h
973 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
975 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
977 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
979 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
981 * util/update-grub_lib.in: Mention filename in warning message.
983 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
985 * NEWS: Update for rename of update-grub to grub-mkconfig.
987 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
989 * util/update-grub_lib.in: Copy to ...
990 * util/grub-mkconfig_lib.in: ... this. Update all users.
991 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
992 * util/update-grub.in: Rename to ...
993 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
994 option. Add `--output' option to allow users to specify the generated
995 configuration file. Default to stdout.
996 (update_grub_dir): Rename to ...
997 (grub_mkconfig_dir): ... this.
998 (grub_cfg): Default to an empty string.
999 * conf/common.rmk (update-grub): Rename to ...
1000 (grub-mkconfig): ... this.
1001 (update-grub_lib): Copy to ...
1002 (grub-mkconfig_lib): ... this.
1003 (update-grub_SCRIPTS): Copy to ...
1004 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1005 (update-grub_DATA): Rename to ...
1006 (grub-mkconfig_DATA): ... this.
1008 2008-09-28 Robert Millan <rmh@aybabtu.com>
1010 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1011 to `modified'. Add the real `created' field.
1012 (grub_iso9660_uuid): Use `modified' rather than `created' for
1013 constructing the UUID.
1015 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
1017 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1018 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1020 2008-09-28 Bean <bean123ch@gmail.com>
1022 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1023 Thanks to Christian Franke for finding this bug.
1025 2008-09-25 Robert Millan <rmh@aybabtu.com>
1027 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1028 instances of grub_util_get_disk_name() (see previous commit).
1030 2008-09-25 Robert Millan <rmh@aybabtu.com>
1032 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1033 `util/i386/get_disk_name.c'.
1034 * conf/i386-efi.rmk: Likewise.
1035 * conf/x86_64-efi.rmk: Likewise.
1036 * conf/i386-coreboot.rmk: Likewise.
1037 * conf/i386-ieee1275.rmk: Likewise.
1038 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1039 `util/ieee1275/get_disk_name.c'.
1040 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1041 * util/ieee1275/get_disk_name.c: Remove file.
1042 * util/i386/get_disk_name.c: Remove file.
1043 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1044 "hd%d" for device.map entries, rather than using
1045 grub_util_get_disk_name().
1047 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1049 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1051 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1053 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1055 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1057 (GRUB_TERM_PPAGE): Changed to 0x4900.
1059 2008-09-24 Robert Millan <rmh@aybabtu.com>
1061 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1062 macros (they were i386-pc specific).
1063 * include/grub/sparc64/ieee1275/console.h: Likewise.
1064 * include/grub/efi/console.h: Likewise.
1066 2008-09-22 Bean <bean123ch@gmail.com>
1068 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1069 resident and in attribute list.
1071 * include/grub/ntfs.h (BMP_LEN): Removed.
1073 2008-09-22 Bean <bean123ch@gmail.com>
1075 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
1076 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1078 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1079 error occurs, as grub_disk_open will call grub_disk_close, which will
1080 call p->close (scsi).
1082 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1084 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1085 (AC_PREREQ): Bumped to 2.59.
1086 (AC_TRY_COMPILE): Replace obsolete macro with ...
1087 (AC_COMPILE_IFELSE): ... this.
1088 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1089 (AC_LINK_IFELSE): ... this.
1091 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1093 * autogen.sh: Add a call to `gendistlist.sh'.
1095 2008-09-19 Christian Franke <franke@computer.org>
1097 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1098 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1099 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1100 Export __enable_execute_stack() to modules.
1101 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1104 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1106 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1109 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1111 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
1112 #include <grub/util/hostdisk.h>.
1114 2008-09-08 Robert Millan <rmh@aybabtu.com>
1116 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1117 segments when their filesz is zero (grub_file_read() interprets
1118 zero-size as "read until EOF", which results in memory corruption).
1119 Use `lowest_segment' rather than 0 for calculating the current
1120 segment load address.
1122 2008-09-08 Robert Millan <rmh@aybabtu.com>
1124 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1125 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1126 clobbered useful information.
1128 2008-09-08 Robert Millan <rmh@aybabtu.com>
1130 * include/grub/util/biosdisk.h: Move to ...
1131 * include/grub/util/hostdisk.h: ... here. Update all users.
1132 * util/biosdisk.c: Move to ...
1133 * util/hostdisk.c: ... here. Update all users.
1135 2008-09-07 Robert Millan <rmh@aybabtu.com>
1137 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1139 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1140 and length can be stored directly in the `mbi->mmap_addr' and
1141 `mbi->mmap_length' struct fields.
1143 2008-09-07 Robert Millan <rmh@aybabtu.com>
1145 * conf/i386.rmk: New file. Provides declaration for building
1147 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1148 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1150 Include `conf/i386.mk'.
1151 * conf/i386-efi.rmk: Likewise.
1152 * conf/x86_64-efi.rmk: Likewise.
1153 * conf/i386-coreboot.rmk: Likewise.
1154 * conf/i386-ieee1275.rmk: Likewise.
1156 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1158 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1159 Adds optimization support for BGR based modes.
1161 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1162 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1163 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1164 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1165 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1166 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1167 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1168 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1169 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1170 (grub_video_i386_vbeblit_index_index): Likewise.
1171 (grub_video_i386_vbeblit_replace_directN): Added.
1172 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1173 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1174 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1175 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1176 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1177 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1178 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1179 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1180 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1181 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1182 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1183 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1184 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1186 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1187 (grub_video_i386_vbefill_R8G8B8): Likewise.
1188 (grub_video_i386_vbefill_index): Likewise.
1189 (grub_video_i386_vbefill_direct32): Added.
1190 (grub_video_i386_vbefill_direct24): Likewise.
1191 (grub_video_i386_vbefill_direct16): Likewise.
1192 (grub_video_i386_vbefill_direct8): Likewise.
1194 * include/grub/video.h (grub_video_blit_format): Removed
1195 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1196 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1197 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1198 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1199 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
1201 * video/video.c (grub_video_get_blit_format): Updated to use new
1202 blit formats. Added handling for 16 bit color modes.
1204 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
1206 (common_blitter): Updated to use new blitters.
1208 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1210 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1211 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1212 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1213 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1214 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1215 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1216 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1217 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1218 (grub_video_i386_vbeblit_index_index): Likewise.
1219 (grub_video_i386_vbeblit_replace_directN): Added.
1220 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1221 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1222 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1223 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1224 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1225 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1226 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1227 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1228 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1229 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1230 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1231 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1232 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1234 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1235 (grub_video_i386_vbefill_R8G8B8): Likewise.
1236 (grub_video_i386_vbefill_index): Likewise.
1237 (grub_video_i386_vbefill_direct32): Added.
1238 (grub_video_i386_vbefill_direct24): Likewise.
1239 (grub_video_i386_vbefill_direct16): Likewise.
1240 (grub_video_i386_vbefill_direct8): Likewise.
1242 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1245 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1248 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1251 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1254 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1256 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1259 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1261 * fs/iso9660.c (grub_iso9660_date): New structure.
1262 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1263 (grub_iso9660_uuid): New function.
1265 2008-09-05 Bean <bean123ch@gmail.com>
1267 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1269 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1270 insensitive bit for names in Win32 and Win32 & DOS namespace.
1272 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1274 * include/grub/types.h (LONG_MAX): Likewise.
1276 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1278 * util/getroot.c: Include <config.h>.
1279 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1280 add support for /dev/md/N devices and handle LVM double dash escaping.
1282 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1284 * config.guess: Update to latest version from config git.
1285 * config.sub: Likewise.
1287 2008-09-03 Robert Millan <rmh@aybabtu.com>
1289 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1290 `disk->total_sectors'.
1292 2008-09-01 Colin D Bennett <colin@gibibit.com>
1294 * include/grub/normal.h: Fixed incorrect comment for
1295 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1297 2008-09-01 Colin D Bennett <colin@gibibit.com>
1299 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1300 values with defines.
1302 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1303 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1304 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1305 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1306 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1307 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1308 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1309 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1310 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1311 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1312 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1313 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1314 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1315 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1316 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1317 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1318 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1319 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1320 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1322 2008-08-31 Robert Millan <rmh@aybabtu.com>
1324 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1326 (grub_multiboot): Fix a few warnings.
1328 2008-08-31 Robert Millan <rmh@aybabtu.com>
1330 * loader/i386/pc/multiboot.c: Update comment not to say that
1331 boot_device support is unimplemented.
1333 2008-08-31 Robert Millan <rmh@aybabtu.com>
1335 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1336 or memory map support are unimplemented.
1338 2008-08-31 Colin D Bennett <colin@gibibit.com>
1340 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1342 2008-08-31 Colin D Bennett <colin@gibibit.com>
1344 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1345 total video memory in 'vbeinfo' output; show color format details for
1348 2008-08-30 Pavel Roskin <proski@gnu.org>
1350 * util/genmoddep.c: Remove for real this time.
1351 * DISTLIST: Remove util/genmoddep.c.
1353 2008-08-30 Robert Millan <rmh@aybabtu.com>
1355 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1356 as required by Multiboot spec (it was already 4-byte aligned, but
1359 2008-08-29 Pavel Roskin <proski@gnu.org>
1361 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1362 * kern/powerpc/ieee1275/startup.S: ... this.
1363 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1364 * DISTLIST: Likewise.
1366 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1367 grub/cpu/kernel.h. Add start label for consistency with other
1368 platforms. Add grub_prefix immediately after start. Add jump
1369 to the code after grub_prefix.
1370 * include/grub/powerpc/kernel.h: Provide valid values for
1371 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1373 2008-08-29 Bean <bean123ch@gmail.com>
1375 * configure.ac: Change host_os to cygwin for mingw.
1376 (asprintf): New check for function.
1378 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1379 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1381 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
1382 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
1383 sync, sleep and grub_util_get_disk_size for mingw.
1385 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1386 to get size in mingw.
1387 (open_device): Use flag O_BINARY if it's defined.
1388 (find_root_device): Add dummy code for mingw.
1390 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1391 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1392 (get_scsi_disk_name): Return 0 for mingw.
1394 * util/hostfs.c: #include <grub/util/misc.h>.
1395 (grub_hostfs_open): Use "rb" flag to open file, use
1396 grub_util_get_disk_size to get disk size for mingw.
1398 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1399 (asprintf): New function if HAVE_ASPRINTF is not set.
1400 (sync): New function for mingw.
1402 (grub_util_get_disk_size): Likewise.
1404 2008-08-28 Pavel Roskin <proski@gnu.org>
1406 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1409 2008-08-28 Robert Millan <rmh@aybabtu.com>
1411 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1413 2008-08-28 Robert Millan <rmh@aybabtu.com>
1415 Change find_grub_drive() syntax so it doesn't prevent it from
1416 detecting NULL names as errors.
1418 * util/biosdisk.c (find_grub_drive): Move free slot search code
1420 (find_free_slot): ... to here.
1421 (read_device_map): Use find_free_slot() to search for free slots.
1423 2008-08-27 Marco Gerards <marco@gnu.org>
1425 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1426 (scsi_mod_SOURCES): New variable.
1427 (scsi_mod_CFLAGS): Likewise
1428 (scsi_mod_LDFLAGS): Likewise.
1430 * disk/scsi.c: New file.
1432 * include/grub/scsi.h: Likewise.
1434 * include/grub/scsicmd.h: Likewise.
1436 * disk/ata.c: Include <grub/scsi.h>.
1437 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1439 (grub_ata_iterate): Skip ATAPI devices.
1440 (grub_ata_open): Only handle ATAPI devices.
1441 (struct grub_atapi_read): Removed.
1442 (grub_atapi_readsector): Likewise.
1443 (grub_ata_read): No longer handle ATAPI devices.
1444 (grub_ata_write): Likewise.
1445 (grub_atapi_iterate): New function.
1446 (grub_atapi_read): Likewise.
1447 (grub_atapi_write): Likewise.
1448 (grub_atapi_open): Likewise.
1449 (grub_atapi_close): Likewise.
1450 (grub_atapi_dev): New variable.
1451 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1452 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1454 * include/grub/disk.h (enum grub_disk_dev_id): Add
1455 `GRUB_DISK_DEVICE_SCSI_ID'.
1457 2008-08-26 Robert Millan <rmh@aybabtu.com>
1459 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1460 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1463 2008-08-23 Bean <bean123ch@gmail.com>
1465 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1466 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1467 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1468 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1470 (raid5rec_mod_SOURCES): New macro.
1471 (raid5rec_mod_CFLAGS): Likewise.
1472 (raid5rec_mod_LDFLAGS): Likewise.
1473 (raid6rec_mod_SOURCES): Likewise.
1474 (raid6rec_mod_CFLAGS): Likewise.
1475 (raid6rec_mod_LDFLAGS): Likewise.
1476 (mdraid_mod_SOURCES): Likewise.
1477 (mdraid_mod_CFLAGS): Likewise.
1478 (mdraid_mod_LDFLAGS): Likewise.
1479 (dm_nv_mod_SOURCES): Likewise.
1480 (dm_nv_mod_CFLAGS): Likewise.
1481 (dm_nv_mod_LDFLAGS): Likewise.
1483 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1484 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1485 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1487 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1488 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1490 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1492 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1494 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1496 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1498 * disk/raid5_recover.c: New file.
1500 * disk/raid6_recover.c: Likewise.
1502 * disk/mdraid_linux.c: Likewise.
1504 * disk/dmraid_nvidia.c: Likewise.
1506 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1509 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1510 calculate the size of raid device.
1511 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1512 different layout of raid5.
1513 (grub_raid_scan_device): Remove code specific to mdraid.
1514 (grub_raid_list): New variable.
1515 (free_array): New function.
1516 (grub_raid_register): Likewise.
1517 (grub_raid_unregister): Likewise.
1518 (grub_raid_rescan): Likewise.
1519 (GRUB_MOD_INIT): Don't iterate device here.
1520 (GRUB_MOD_FINI): Use free_array to release resource.
1522 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1523 (grub_raid5_recover_func_t): New function variable type.
1524 (grub_raid6_recover_func_t): Likewise.
1525 (grub_raid5_recover_func): New variable.
1526 (grub_raid6_recover_func): Likewise.
1527 (grub_raid_register): New function.
1528 (grub_raid_unregister): Likewise.
1529 (grub_raid_rescan): Likewise.
1530 (grub_raid_block_xor): Likewise.
1532 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1533 (CMD_CRC): New macro.
1535 (read_file): Handle device as well as file.
1536 (cmd_crc): New function.
1537 (fstest): Handle multiple disks.
1538 (options): Remove part, raw and long, add root and diskcount.
1539 (usage): Add crc, remove -p, -r, -l, add -r and -c.
1540 (main): Find the first non option entry and ignore subsequent options,
1541 add handling for the new options, support multiple disks.
1543 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1545 2008-08-23 Bean <bean123ch@gmail.com>
1547 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1549 * genfslist.sh: Ignore kernel.mod.
1551 * genpartmaplist.sh: Likewise.
1553 2008-08-23 Robert Millan <rmh@aybabtu.com>
1555 * util/getroot.c (find_root_device): Skip anything that starts with
1556 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1558 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
1560 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1561 * util/grub.d/00_header.in: Allow the administrator to change default
1562 gfxmode via ${GRUB_GFXMODE}.
1564 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
1566 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1568 2008-08-21 Robert Millan <rmh@aybabtu.com>
1570 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1572 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1573 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1575 2008-08-20 Carles Pina i Estany <carles@pina.cat>
1577 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1578 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1580 2008-08-19 Robert Millan <rmh@aybabtu.com>
1582 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1583 (struct grub_virtual_screen): Remove `cursor_color'.
1584 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1586 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1588 2008-08-18 Robert Millan <rmh@aybabtu.com>
1590 Unify (identical) linux_normal.c files.
1591 * loader/i386/efi/linux_normal.c: Move from here ...
1592 * loader/linux_normal.c: ... to here. Update all users.
1593 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1594 * loader/i386/ieee1275/linux_normal.c: Likewise.
1596 2008-08-18 Robert Millan <rmh@aybabtu.com>
1598 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1599 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1600 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1601 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1602 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1604 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1605 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1606 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1607 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1608 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1609 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1610 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1611 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1612 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1613 portably using grub_getxy().
1614 Replace `-EFI' with `-bzImage' in boot message.
1616 2008-08-17 Robert Millan <rmh@aybabtu.com>
1618 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1620 2008-08-17 Robert Millan <rmh@aybabtu.com>
1622 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1624 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1625 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1626 (grub_machine_mmap_iterate): New function declaration.
1627 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1629 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1632 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1633 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1634 Move e820 parsing from here ...
1635 * kern/i386/pc/mmap.c: New file.
1636 (grub_machine_mmap_iterate): ... to here.
1638 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1639 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1640 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1641 (grub_available_iterate): Redeclare to return `void', and redeclare
1642 its hook to use grub_uint64_t as addr and size parameters, and rename
1644 (grub_machine_mmap_iterate): ... this. Update all users.
1646 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1647 to make it more readable. Rename to ...
1648 (grub_machine_mmap_iterate): ... this.
1650 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1651 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1652 (grub_multiboot): Allocate an extra region after the payload, and fill
1653 it with a Multiboot memory map. Adjust a.out loader to calculate size
1654 with the extra space.
1655 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1656 with the extra space.
1658 2008-08-17 Carles Pina i Estany <carles@pina.cat>
1660 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1662 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
1664 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1665 mdate-sh to the list `find' searches for.
1666 * DISTLIST: Regenerated.
1668 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
1670 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1671 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1672 genmoddep.awk, gensymlist.sh.in.
1673 (DISTDIRS): Add bus, docs, hook, lib.
1674 * DISTLIST: Regenerated.
1675 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1677 2008-08-16 Robert Millan <rmh@aybabtu.com>
1679 * disk/raid.c (grub_raid_init): Handle/report errors set by
1680 grub_device_iterate().
1681 * disk/lvm.c (grub_lvm_init): Likewise.
1683 2008-08-15 Bean <bean123ch@gmail.com>
1685 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1687 (datetime_mod_SOURCES): New macro.
1688 (datetime_mod_CFLAGS): Likewise.
1689 (datetime_mod_LDFLAGS): Likewise.
1690 (date_mod_SOURCES): Likewise.
1691 (date_mod_CFLAGS): Likewise.
1692 (date_mod_LDFLAGS): Likewise.
1693 (datehook_mod_SOURCES): Likewise.
1694 (datehook_mod_CFLAGS): Likewise.
1695 (datehook_mod_LDFLAGS): Likewise.
1697 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1699 (datetime_mod_SOURCES): New macro.
1700 (datetime_mod_CFLAGS): Likewise.
1701 (datetime_mod_LDFLAGS): Likewise.
1702 (date_mod_SOURCES): Likewise.
1703 (date_mod_CFLAGS): Likewise.
1704 (date_mod_LDFLAGS): Likewise.
1705 (datehook_mod_SOURCES): Likewise.
1706 (datehook_mod_CFLAGS): Likewise.
1707 (datehook_mod_LDFLAGS): Likewise.
1709 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1711 (datetime_mod_SOURCES): New macro.
1712 (datetime_mod_CFLAGS): Likewise.
1713 (datetime_mod_LDFLAGS): Likewise.
1714 (date_mod_SOURCES): Likewise.
1715 (date_mod_CFLAGS): Likewise.
1716 (date_mod_LDFLAGS): Likewise.
1717 (datehook_mod_SOURCES): Likewise.
1718 (datehook_mod_CFLAGS): Likewise.
1719 (datehook_mod_LDFLAGS): Likewise.
1721 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1723 (datetime_mod_SOURCES): New macro.
1724 (datetime_mod_CFLAGS): Likewise.
1725 (datetime_mod_LDFLAGS): Likewise.
1726 (date_mod_SOURCES): Likewise.
1727 (date_mod_CFLAGS): Likewise.
1728 (date_mod_LDFLAGS): Likewise.
1729 (datehook_mod_SOURCES): Likewise.
1730 (datehook_mod_CFLAGS): Likewise.
1731 (datehook_mod_LDFLAGS): Likewise.
1733 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1735 (datetime_mod_SOURCES): New macro.
1736 (datetime_mod_CFLAGS): Likewise.
1737 (datetime_mod_LDFLAGS): Likewise.
1738 (date_mod_SOURCES): Likewise.
1739 (date_mod_CFLAGS): Likewise.
1740 (date_mod_LDFLAGS): Likewise.
1741 (datehook_mod_SOURCES): Likewise.
1742 (datehook_mod_CFLAGS): Likewise.
1743 (datehook_mod_LDFLAGS): Likewise.
1745 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1747 * commands/date.c: New file.
1749 * hook/datehook.c: Likewise.
1751 * include/grub/lib/datetime.h: Likewise.
1753 * include/grub/i386/cmos.h: Likewise.
1755 * lib/datetime.c: Likewise.
1757 * lib/i386/datetime.c: Likewise.
1759 * lib/efi/datetime.c: Likewise.
1761 2008-08-14 Robert Millan <rmh@aybabtu.com>
1763 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1764 (grub_mkelfimage_SOURCES): New variable.
1765 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1767 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1768 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1769 * conf/powerpc-ieee1275.rmk: Likewise.
1770 * conf/i386-ieee1275.rmk: Likewise.
1772 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1773 * kern/i386/coreboot/init.c: Likewise.
1775 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1776 with `<grub/cpu/kernel.h>'.
1777 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1779 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1780 * kern/i386/coreboot/startup.S: Likewise.
1782 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1783 (GRUB_MOD_GAP): Remove.
1784 * include/grub/powerpc/kernel.h: New file.
1785 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1786 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1787 * include/grub/i386/kernel.h: New file.
1788 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1789 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1790 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1792 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1794 Use --directory when invoking grub_mkimage.
1796 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1797 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1798 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1799 and GRUB_KERNEL_CPU_PREFIX.
1801 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
1803 * include/grub/err.h (grub_err_printf): New function prototype.
1804 * util/misc.c (grub_err_printf): New function.
1805 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1807 * kern/err.c (grub_print_error): Use grub_err_printf.
1809 2008-08-13 Robert Millan <rmh@aybabtu.com>
1811 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1813 2008-08-13 Robert Millan <rmh@aybabtu.com>
1815 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1818 2008-08-12 Robert Millan <rmh@aybabtu.com>
1820 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1821 of the relocation code from here ...
1822 (grub_multiboot): ... to here.
1823 (forward_relocator, backward_relocator): Move from here ...
1824 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1825 (grub_multiboot_backward_relocator): ... to here.
1826 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1827 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1828 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1829 (grub_multiboot_forward_relocator_end)
1830 (grub_multiboot_backward_relocator)
1831 (grub_multiboot_backward_relocator_end): New variables.
1833 2008-08-12 Bean <bean123ch@gmail.com>
1835 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1837 2008-08-11 Robert Millan <rmh@aybabtu.com>
1839 * kern/i386/linuxbios/startup.S: Move from here ...
1840 * kern/i386/coreboot/startup.S: ... to here.
1842 * kern/i386/linuxbios/init.c: Move from here ...
1843 * kern/i386/coreboot/init.c: ... to here.
1845 * kern/i386/linuxbios/table.c: Move from here ...
1846 * kern/i386/coreboot/mmap.c: ... to here.
1848 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1850 2008-08-11 Robert Millan <rmh@aybabtu.com>
1852 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1853 errors. Leave it to the upper layer to handle them.
1855 2008-08-09 Christian Franke <franke@computer.org>
1857 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1858 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1859 Install `grub.d/10_windows' only on Cygwin.
1860 * configure.ac: Add subst of `target_os'.
1861 Check `target_os' also before setting TARGET_OBJ2ELF.
1862 Add `--enable-grub-pe2elf'.
1864 2008-08-08 Robert Millan <rmh@aybabtu.com>
1866 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1867 (grub_last_time): Change type to grub_uint64_t.
1868 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1869 (grub_disk_close): Likewise.
1871 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1872 (run_menu): Migrate code from to using grub_get_time_ms().
1874 * util/misc.c (grub_get_time_ms): New function.
1876 2008-08-08 Marco Gerards <marco@gnu.org>
1878 * disk/ata.c (grub_ata_regget): Change return type to
1880 (grub_ata_regget2): Likewise.
1881 (grub_ata_wait_status): New function.
1882 (grub_ata_wait_busy): Removed function, updated all users to use
1883 `grub_ata_wait_status'.
1884 (grub_ata_wait_drq): Likewise.
1885 (grub_ata_cmd): New function.
1886 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1888 (grub_ata_pio_write): Add error handling.
1889 (grub_atapi_identify): Likewise.
1890 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1892 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1893 handling. Actually use the detected registers. Reorder the
1894 detection logic such that it is easier to read.
1895 (grub_ata_pciinit): Do not assign the same ID to each controller.
1896 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1898 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1900 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1902 2008-08-08 Marco Gerards <marco@gnu.org>
1906 2008-08-07 Bean <bean123ch@gmail.com>
1908 * include/grub/x86_64/pci.h: New file.
1910 2008-08-07 Christian Franke <franke@computer.org>
1912 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1913 (TIMER2_GATE): Likewise.
1914 (grub_pit_wait): Add enable/disable of the timer2 gate
1915 bit of port 0x61. This fixes a possible infinite loop.
1917 2008-08-07 Bean <bean123ch@gmail.com>
1919 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1920 kern/i386/tsc.c and kern/i386/pit.c.
1922 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1925 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1928 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1930 2008-08-07 Bean <bean123ch@gmail.com>
1932 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1934 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1936 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1937 multiple inclusion. Add #include <grub/types.h>.
1939 2008-08-06 Christian Franke <franke@computer.org>
1941 * conf/common.rmk: Build and install `10_windows'.
1942 * util/grub.d/10_windows.in: New script.
1944 2008-08-06 Pavel Roskin <proski@gnu.org>
1946 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1948 2008-08-06 Robert Millan <rmh@aybabtu.com>
1950 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1951 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1953 2008-08-06 Bean <bean123ch@gmail.com>
1955 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1956 (grub_pxefs_fs_int): Remove dummy definition.
1957 (grub_pxefs_open): Use data->block_size to store the current block
1959 (grub_pxefs_read): Use block size stored in data->block_size. As the
1960 value of grub_pxe_blksize can be changed after the file is opened.
1962 2008-08-06 Bean <bean123ch@gmail.com>
1964 * fs/i386/pc/pxe.c (curr_file): new variable.
1965 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1966 require the dummy internal file system anymore.
1967 (grub_pxefs_read): Removed.
1968 (grub_pxefs_close): Likewise.
1969 (grub_pxefs_fs_int): Likewise.
1970 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1971 connection when we switch file.
1972 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1974 2008-08-06 Robert Millan <rmh@aybabtu.com>
1976 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1978 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1979 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1981 * kern/i386/halt.c: New file.
1982 * kern/i386/reboot.c: Likewise.
1983 * include/grub/i386/reboot.h: Likewise.
1984 * include/grub/i386/halt.h: Likewise.
1986 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1987 Include `<grub/cpu/halt.h>'.
1988 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1989 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1991 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1992 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1993 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1994 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1995 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1996 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1998 * include/grub/i386/at_keyboard.h: ... to here.
2000 2008-08-05 Robert Millan <rmh@aybabtu.com>
2002 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2003 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2004 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2005 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2006 `kern/generic/millisleep.c'.
2008 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2009 instead of grub_get_rtc().
2010 (grub_tsc_init): Initialize `tsc_boot_time'.
2012 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2013 (grub_machine_init): Use grub_tsc_init() rather than
2014 installing an RTC-based handler via grub_install_get_time_ms().
2016 * kern/i386/pit.c: New file.
2017 * include/grub/i386/pit.h: Likewise.
2019 2008-08-05 Bean <bean123ch@gmail.com>
2021 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2023 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2024 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2025 (pxe_mod_SOURCES): New macro.
2026 (pxe_mod_CFLAGS): Likewise.
2027 (pxe_mod_LDFLAGS): Likewise.
2028 (pxecmd_mod_SOURCES): Likewise.
2029 (pxecmd_mod_CFLAGS): Likewise.
2030 (pxecmd_mod_LDFLAGS): Likewise.
2032 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2033 (grub_pxe_call): Likewise.
2035 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2037 * commands/i386/pc/pxecmd.c: New file.
2039 * fs/i386/pc/pxe.c: Likewise.
2041 * include/grub/i386/pc/pxe.h: Likewise.
2043 2008-08-05 Bean <bean123ch@gmail.com>
2045 * util/console.c (grub_console_cur_color): New variable.
2046 (grub_console_standard_color): Likewise.
2047 (grub_console_normal_color): Likewise.
2048 (grub_console_highlight_color): Likewise.
2049 (color_map): Likewise.
2050 (use_color): Likewise.
2051 (NUM_COLORS): New macro.
2052 (grub_ncurses_setcolorstate): Handle color properly.
2053 (grub_ncurses_setcolor): Don't change color here, just remember the
2054 settings, color will be set in grub_ncurses_setcolorstate.
2055 (grub_ncurses_getcolor): New function.
2056 (grub_ncurses_init): Initialize color pairs.
2057 (grub_ncurses_term): New member grub_ncurses_getcolor.
2059 2008-08-05 Colin D Bennett <colin@gibibit.com>
2061 High resolution timer support. Implemented for x86 CPUs using TSC.
2062 Extracted generic grub_millisleep() so it's linked in only as needed.
2063 This requires a Pentium compatible CPU; if the RDTSC instruction is
2064 not supported, then it falls back on the generic grub_get_time_ms()
2065 implementation that uses the machine's RTC.
2067 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2068 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2069 `kern/generic/millisleep.c'.
2071 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2072 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2074 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2075 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2077 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2079 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2080 `kern/generic/millisleep.c'.
2082 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2084 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2086 * kern/generic/rtc_get_time_ms.c: New file.
2088 * kern/generic/millisleep.c: New file.
2090 * kern/misc.c: Don't include
2091 <kern/time.h> anymore.
2092 (grub_millisleep_generic): Removed.
2094 * commands/sleep.c (grub_interruptible_millisleep): Uses
2095 grub_get_time_ms() instead of grub_get_rtc().
2097 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2099 (grub_cpu_is_cpuid_supported): New inline function.
2100 (grub_cpu_is_tsc_supported): New inline function.
2101 (grub_tsc_init): New function prototype.
2102 (grub_tsc_get_time_ms): New function prototype.
2104 * kern/i386/tsc.c (grub_get_time_ms): New file.
2106 * include/grub/time.h: Include <grub/types.h.
2107 (grub_millisleep_generic): Removed.
2108 (grub_get_time_ms): New prototype.
2109 (grub_install_get_time_ms): New prototype.
2110 (grub_rtc_get_time_ms): New prototype.
2112 * kern/time.c (grub_get_time_ms): New function.
2113 (grub_install_get_time_ms): New function.
2115 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2116 <grub/time.h> anymore.
2117 (grub_millisleep): Removed.
2118 (grub_machine_init): Call grub_tsc_init.
2120 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2121 get_time_ms() implementation.
2123 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2124 (ieee1275_get_time_ms): New function.
2125 (grub_machine_init): Install get_time_ms() implementation.
2127 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2128 (grub_machine_init): Call grub_tsc_init().
2129 (grub_millisleep): Removed.
2131 * kern/ieee1275/init.c (grub_millisleep): Removed.
2132 (grub_machine_init): Install ieee1275_get_time_ms()
2134 (ieee1275_get_time_ms): New function.
2135 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2138 2008-08-05 Marco Gerards <marco@gnu.org>
2140 * disk/ata.c: Include <grub/pci.h>.
2141 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2142 (grub_ata_initialize): Rewritten.
2143 (grub_ata_device_initialize): New function.
2145 2008-08-04 Pavel Roskin <proski@gnu.org>
2147 * kern/main.c: Include grub/mm.h.
2149 2008-08-04 Robert Millan <rmh@aybabtu.com>
2151 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2152 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2153 corruption problem).
2155 2008-08-04 Robert Millan <rmh@aybabtu.com>
2157 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2158 warnings introduced in my last commit.
2160 2008-08-03 Robert Millan <rmh@aybabtu.com>
2162 Make PCI available on all i386 architectures.
2164 * include/grub/i386/pc/pci.h: Move from here ...
2165 * include/grub/i386/pci.h: ... to here.
2167 * include/grub/i386/pc/pci.h: Remove.
2168 * include/grub/i386/efi/pci.h: Remove.
2169 * include/grub/x86_64/efi/pci.h: Remove.
2171 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2174 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2175 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2176 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2178 * conf/i386-ieee1275.rmk: Likewise.
2180 2008-08-03 Robert Millan <rmh@aybabtu.com>
2182 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2183 (grub_console_setcursor): Make it possible to set cursor off.
2185 2008-08-03 Robert Millan <rmh@aybabtu.com>
2187 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2188 of modules instead of assuming which platform provides what.
2189 * util/update-grub.in: Likewise.
2191 2008-08-03 Robert Millan <rmh@aybabtu.com>
2193 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2194 instead of `grub_install_dos_part' to determine whether a drive needs
2195 to be prepended to prefix (`grub_install_dos_part' is not reliable,
2196 because it can be overridden when loading GRUB via Multiboot).
2198 2008-08-02 Robert Millan <rmh@aybabtu.com>
2200 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2202 2008-08-02 Robert Millan <rmh@aybabtu.com>
2204 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2205 of informational grub_dprintf() calls.
2207 2008-08-02 Robert Millan <rmh@aybabtu.com>
2209 * disk/memdisk.c (memdisk_size): Don't initialize.
2210 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2212 * include/grub/i386/pc/kernel.h
2213 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2214 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2215 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2216 (grub_arch_memdisk_size): Remove.
2218 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2219 field (was only used to transfer a constant). Add `type' field to
2220 support multiple module types.
2221 (grub_module_iterate): New function.
2223 * kern/device.c (grub_device_open): Do not hide error messages
2224 when grub_disk_open() fails. Use grub_print_error() instead.
2226 * kern/i386/pc/init.c (grub_arch_modules_addr)
2227 (grub_arch_memdisk_size): Remove functions.
2228 (grub_arch_modules_addr): Return the module address in high memory
2229 (now that it isn't copied anymore).
2231 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2232 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2233 decompression routine (grub_total_module_size already includes that
2234 now). Don't copy modules back to low memory.
2236 * kern/main.c: Include `<grub/mm.h>'.
2237 (grub_load_modules): Split out (and use) ...
2238 (grub_module_iterate): ... this function, which iterates through
2239 module objects and runs a hook.
2240 Comment out grub_mm_init_region() call, as it would cause non-ELF
2241 modules to be overwritten.
2243 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2244 the memdisk image in its own region, make it part of the module list.
2245 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2246 (main): Parse --memdisk|-m option, and pass user-provided path as
2247 parameter to generate_image().
2248 (add_segments): Pass `memdisk_path' down to load_modules().
2249 (load_modules): Embed memdisk image in module section when requested.
2250 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2251 `header.type' instead of `header.offset'.
2253 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2254 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2255 (memdisk_mod_LDFLAGS): New variables.
2256 * conf/i386-coreboot.rmk: Likewise.
2257 * conf/i386-ieee1275.rmk: Likewise.
2259 2008-08-02 Robert Millan <rmh@aybabtu.com>
2261 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2262 (backward_relocator): New variables. Used to allocate and relocate
2263 the payload, respectively.
2264 (grub_multiboot_load_elf32): Load into heap instead of requested
2265 address, install the appropriate relocator code in each bound of
2266 the payload, and set the entry point such that
2267 grub_multiboot_real_boot() will jump to one of them.
2269 * kern/i386/loader.S (grub_multiboot_payload_size)
2270 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2271 (grub_multiboot_payload_entry_offset): New variables.
2272 (grub_multiboot_real_boot): Set cpu context to what the relocator
2273 expects, and jump to the relocator instead of the payload.
2275 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2276 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2277 (grub_multiboot_payload_entry_offset): Export.
2279 2008-08-01 Bean <bean123ch@gmail.com>
2281 * normal/menu_entry.c (editor_getline): Don't return the original
2282 string as result, as it will be released by lexer once it has done
2285 2008-08-01 Robert Millan <rmh@aybabtu.com>
2287 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2288 within menuentries, not before them.
2289 util/grub.d/10_hurd.in: Likewise.
2291 2008-08-01 Bean <bean123ch@gmail.com>
2293 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2294 (bufio_mod_SOURCES): New macro.
2295 (bufio_mod_CFLAGS): Likewise.
2296 (bufio_mod_LDFLAGS): Likewise.
2298 * include/grub/bufio.h: New file.
2300 * io/bufio.c: Likewise.
2302 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2303 (grub_video_reader_png): Use grub_buffile_open to open file.
2305 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2306 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2308 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2309 (grub_video_reader_tga): Use grub_buffile_open to open file.
2311 * font/manager.c: Include <grub/bufio.h>.
2312 (add_font): Use grub_buffile_open to open file.
2314 2008-07-31 Robert Millan <rmh@aybabtu.com>
2316 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2317 ELF segments, use a macro for arbitrarily accessing any of them instead
2318 of preparing a pointer that allows access to one at a time.
2319 (grub_multiboot_load_elf64): Likewise.
2321 2008-07-31 Bean <bean123ch@gmail.com>
2323 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2324 GRUB_KERNEL_MACHINE_DATA_END.
2326 2008-07-30 Robert Millan <rmh@aybabtu.com>
2328 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2329 Increase from 0x50 to 0x60.
2330 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2331 use UUIDs to identify the root drive for them. If that's not
2333 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2334 check, for cross-disk installs.
2336 2008-07-30 Robert Millan <rmh@aybabtu.com>
2338 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2339 is non-empty, use it to set the `prefix' environment variable instead
2340 of the usual approach.
2341 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2342 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2343 environment variable instead of dummy make_install_device().
2345 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2346 (start): Insert a data section, with `grub_prefix' variable.
2347 * kern/i386/linuxbios/startup.S: Likewise.
2349 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2350 New variable reference.
2351 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2352 New macro. Defines offset of `grub_prefix' within startup.S (relative
2354 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2355 section within startup.S (relative to `start').
2356 * include/grub/i386/coreboot/kernel.h: Likewise.
2358 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2359 Overwrite grub_prefix with its contents, at the beginning of the
2361 (main): Understand -p|--prefix.
2363 2008-07-30 Robert Millan <rmh@aybabtu.com>
2365 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2367 2008-07-30 Robert Millan <rmh@aybabtu.com>
2369 * term/i386/pc/vga_text.c (grub_console_cls): Use
2370 grub_console_gotoxy() to go back to beginning of the screen.
2371 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2373 2008-07-29 Christian Franke <franke@computer.org>
2375 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2376 Add conversion of emulated mount points on Cygwin.
2378 2008-07-29 Christian Franke <franke@computer.org>
2380 * util/update-grub.in: Add a check for admin
2382 Remove old `grub.cfg.new' before creation.
2383 Add `-f' to `mv' to handle the different filesystem
2384 semantics of Windows.
2386 2008-07-29 Bean <bean123ch@gmail.com>
2388 * normal/main.c (get_line): Fix buffer overflow bug.
2390 2008-07-28 Robert Millan <rmh@aybabtu.com>
2392 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2393 (struct grub_apple_header): New struct. Describes the layout of
2395 (apple_partition_map_iterate): Check the header magic as well as the
2396 partition magic (which was already being checked).
2398 2008-07-28 Pavel Roskin <proski@gnu.org>
2400 * genmk.rb: Add a warning to the beginning of the output that
2401 it's a generated file and should not be edited.
2403 2008-07-28 Robert Millan <rmh@aybabtu.com>
2405 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2406 with the same number are found, just use issue a warning with
2407 grub_dprintf(), as this error has been reported to be non-fatal.
2409 2008-07-27 Robert Millan <rmh@aybabtu.com>
2411 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2414 2008-07-27 Bean <bean123ch@gmail.com>
2416 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2417 (grub_fat_find_dir): Ignore case when comparing filename.
2419 2008-07-27 Bean <bean123ch@gmail.com>
2421 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2422 smallino, as it's more descriptive, and i8count can be confused with
2423 the other field count.
2424 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2427 2008-07-27 Bean <bean123ch@gmail.com>
2429 * commands/crc.c: New file.
2431 * lib/crc.c: Likewise.
2433 * include/grub/lib/crc.h: Likewise.
2435 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2437 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2438 (hexdump): Move this function to ...
2440 * lib/hexdump.c: ... here.
2442 * include/grub/hexdump.h: Renamed to ...
2444 * include/grub/lib/hexdump.h: ... this.
2446 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2448 * util/grub-editenv.c: Likewise.
2450 * include/envblk.h: Renamed to ...
2452 * include/lib/envblk.h: ... this.
2454 * util/envblk.c: Renamed to ...
2456 * lib/envblk.c: ... this.
2458 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2460 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2461 (pkglib_MODULES): Add crc.mod.
2462 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2463 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2464 (crc_mod_SOURCES): New macro.
2465 (crc_mod_CFLAGS): Likewise.
2466 (crc_mod_LDFLAGS): Likewise.
2468 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2470 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2472 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2474 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2476 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2478 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
2480 * commands/help.c: Include <grub/term.h>.
2481 (TERM_WIDTH): Removed. Updated all users.
2483 2008-07-27 Pavel Roskin <proski@gnu.org>
2485 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2486 spurious warnings about a comment within a comment.
2488 2008-07-25 Robert Millan <rmh@aybabtu.com>
2490 * util/getroot.c (find_root_device): Skip devices that match
2491 /dev/dm-[0-9]. This lets the real device be found for any type of
2492 abstraction (LVM, EVMS, RAID..).
2493 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2494 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2495 device is found first, find_root_device() will now skip it.
2497 2008-07-24 Pavel Roskin <proski@gnu.org>
2499 * include/grub/types.h: Use __builtin_bswap32() and
2500 __builtin_bswap64() with gcc 4.3 and newer.
2502 2008-07-24 Christian Franke <franke@computer.org>
2504 * util/i386/pc/grub-install.in: If `--debug' is specified,
2505 pass `--verbose' to grub-setup.
2506 Abort script if make_system_path_relative_to_its_root() fails.
2508 2008-07-24 Bean <bean123ch@gmail.com>
2510 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2511 variable `target_platform' should be `platform'.
2513 2008-07-24 Bean <bean123ch@gmail.com>
2515 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
2516 (grub_png_init_fixed_block): New function.
2517 (grub_png_decode_image_data): Handle fixed huffman code compression.
2519 2008-07-24 Bean <bean123ch@gmail.com>
2521 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2522 (grub_pe2elf_SOURCES): New macro.
2523 (CLEANFILES): Add grub-pe2elf.
2525 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2526 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2527 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2528 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2529 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
2530 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
2531 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
2532 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2533 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2534 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2535 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2536 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2537 (GRUB_PE32_DT_FUNCTION): Likewise.
2538 (GRUB_PE32_REL_I386_DIR32): Likewise.
2539 (GRUB_PE32_REL_I386_REL32): Likewise.
2540 (grub_pe32_symbol): New structure.
2541 (grub_pe32_reloc): Likewise.
2543 * util/grub-pe2elf.c: New file.
2545 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2546 start symbol in non pc platform.
2548 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2550 The following patches are from Christian Franke.
2552 * include/grub/dl.h: Remove .previous, gas supports this only
2555 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2556 Remove .type, gas supports this only for ELF format.
2558 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2559 nullbytes in symbol table. This fixes an infinite loop if table is
2562 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2563 TARGET_IMG_LDFLAGS and EXEEXT.
2565 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2566 TARGET_IMG_LDFLAGS_AC.
2567 (grub_CHECK_STACK_ARG_PROBE): New function.
2569 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2571 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2573 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2574 to set TARGET_IMG_LD* accordingly.
2575 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2576 Add call to grub_CHECK_STACK_ARG_PROBE.
2577 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2579 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2581 * genmk.rb: Add EXEEXT to CLEANFILES.
2583 2008-07-23 Robert Millan <rmh@aybabtu.com>
2585 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2586 define the codes for arrows and lines used for the menu).
2587 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2590 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2591 fonts, because the latter are too slow.
2593 2008-07-21 Bean <bean123ch@gmail.com>
2595 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2596 a20. Run keyboard test last, as it will cause macbook to halt.
2598 2008-07-18 Pavel Roskin <proski@gnu.org>
2600 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2601 load foreign architecture modules correctly anyway. Keep
2602 support for loading host architecture modules, whether we
2603 compile them or not.
2605 2008-07-17 Pavel Roskin <proski@gnu.org>
2607 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2608 change target_cpu. The compiler default can mismatch target_cpu
2611 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2612 * kern/efi/efi.c: Likewise.
2614 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2615 target compiler is functional.
2616 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2619 * configure.ac: Default to efi platform for x86_64-apple. Allow
2620 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2621 adjustments from the rest, only do them if target is not
2622 explicitly given. Merge other adjustments with the final sanity
2623 check. Remove an extraneous check for supported CPU. Be
2624 specific which CPU and which platform is not supported.
2626 * configure.ac: Default to pc platform for x86_64.
2628 2008-07-17 Robert Millan <rmh@aybabtu.com>
2630 Partial LinuxBIOS -> Coreboot rename.
2632 * conf/i386-linuxbios.rmk: Renamed to ...
2633 * conf/i386-coreboot.rmk: ... this.
2634 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2635 * configure.ac: Accept "coreboot" as input platform (but maintain
2636 compatibility with "linuxbios").
2637 * include/grub/i386/linuxbios: Renamed to ...
2638 * include/grub/i386/coreboot: ... this.
2640 2008-07-17 Bean <bean123ch@gmail.com>
2642 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2643 (appleldr_mod_SOURCE): New variable.
2644 (appleldr_mod_CFLAGS): Likewise.
2645 (appleldr_mod_LDFLAGS): Likewise.
2646 (pci_mod_SOURCES): Likewise.
2647 (pci_mod_CFLAGS): Likewise.
2648 (pci_mod_LDFLAGS): Likewise.
2649 (lspci_mod_SOURCES): Likewise.
2650 (lspci_mod_CFLAGS): Likewise.
2651 (lspci_mod_LDFLAGS): Likewise.
2653 * conf/x86_64-efi.rmk: New file.
2655 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2657 (grub_efidisk_write): Likewise.
2659 * include/efi/api.h (efi_call_0): New macro.
2660 (efi_call_1): Likewise.
2661 (efi_call_2): Likewise.
2662 (efi_call_3): Likewise.
2663 (efi_call_4): Likewise.
2664 (efi_call_5): Likewise.
2665 (efi_call_6): Likewise.
2667 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2668 grub_rescue_cmd_chainloader.
2670 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2671 (grub_pe32_optional_header): Change some fields based on i386 or
2673 (GRUB_PE32_PE32_MAGIC): Likewise.
2675 * include/grub/efi/uga_draw.h: New file.
2677 * include/grub/elf.h (STN_ABS): New constant.
2678 (R_X86_64_NONE): Relocation constant for x86_64.
2679 (R_X86_64_64): Likewise.
2680 (R_X86_64_PC32): Likewise.
2681 (R_X86_64_GOT32): Likewise.
2682 (R_X86_64_PLT32): Likewise.
2683 (R_X86_64_COPY): Likewise.
2684 (R_X86_64_GLOB_DAT): Likewise.
2685 (R_X86_64_JUMP_SLOT): Likewise.
2686 (R_X86_64_RELATIVE): Likewise.
2687 (R_X86_64_GOTPCREL): Likewise.
2688 (R_X86_64_32): Likewise.
2689 (R_X86_64_32S): Likewise.
2690 (R_X86_64_16): Likewise.
2691 (R_X86_64_PC16): Likewise.
2692 (R_X86_64_8): Likewise.
2693 (R_X86_64_PC8): Likewise.
2695 * include/grub/i386/efi/pci.h: New file.
2697 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2698 Change it value based on platform.
2699 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2700 (GRUB_E820_RAM): Likewise.
2701 (GRUB_E820_RESERVED): Likewise.
2702 (GRUB_E820_ACPI): Likewise.
2703 (GRUB_E820_NVS): Likewise.
2704 (GRUB_E820_EXEC_CODE): Likewise.
2705 (GRUB_E820_MAX_ENTRY): Likewise.
2706 (grub_e820_mmap): New structure.
2707 (linux_kernel_header): Change the efi field according to different
2708 kernel version, also field from linux_kernel_header.
2710 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2712 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2713 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2714 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2715 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2716 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2717 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2718 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2719 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2720 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2721 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2723 * include/grub/x86_64/efi/kernel.h: New file.
2725 * include/grub/x86_64/efi/loader.h: Likewise.
2727 * include/grub/x86_64/efi/machine.h: Likewise.
2729 * include/grub/x86_64/efi/pci.h: Likewise.
2731 * include/grub/x86_64/efi/time.h: Likewise.
2733 * include/grub/x86_64/linux.h: Likewise.
2735 * include/grub/x86_64/setjmp.h: Likewise.
2737 * include/grub/x86_64/time.h: Likewise.
2739 * include/grub/x86_64/types.h: Likewise.
2741 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2742 GRUB_TARGET_SIZEOF_VOID_P.
2744 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2745 (grub_efi_locate_handle): Likewise.
2746 (grub_efi_open_protocol): Likewise.
2747 (grub_efi_set_text_mode): Likewise.
2748 (grub_efi_stall): Likewise.
2749 (grub_exit): Likewise.
2750 (grub_reboot): Likewise.
2751 (grub_halt): Likewise.
2752 (grub_efi_exit_boot_services): Likewise.
2753 (grub_get_rtc): Likewise.
2755 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2756 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2757 (grub_efi_allocate_pages): Wrap efi calls.
2758 (grub_efi_free_pages): Wrap efi calls.
2759 (grub_efi_get_memory_map): Wrap efi calls.
2761 * kern/x86_64/dl.c: New file.
2763 * kern/x86_64/efi/callwrap.S: Likewise.
2765 * kern/x86_64/efi/startup.S: Likewise.
2767 * loader/efi/appleloader.c: Likewise.
2769 * loader/efi/chainloader.c (cmdline): New variable.
2770 (grub_chainloader_unload): Wrap efi calls.
2771 (grub_chainloader_boot): Likewise.
2772 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2775 * loader/efi/chainloader_normal.c (chainloader_command):
2776 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2779 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2781 (grub_e820_add_region): New function.
2782 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2784 (grub_find_video_card): New function.
2785 (grub_linux_setup_video): New function.
2786 (grub_rescue_cmd_linux): Probe for video information.
2788 * normal/x86_64/setjmp.S: New file.
2790 * term/efi/console.c (map_char): New function.
2791 (grub_console_putchar): Map unicode char.
2792 (grub_console_checkkey): Wrap efi calls.
2793 (grub_console_getkey): Likewise.
2794 (grub_console_getwh): Likewise.
2795 (grub_console_gotoxy): Likewise.
2796 (grub_console_cls): Likewise.
2797 (grub_console_setcolorstate): Likewise.
2798 (grub_console_setcursor): Likewise.
2800 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2802 2008-07-16 Pavel Roskin <proski@gnu.org>
2804 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2807 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2808 pointer, not an integer. This fixes a warning and prevents
2809 precision loss on 64-bit systems.
2810 (relocate_addresses): Remove unneeded cast.
2812 2008-07-15 Pavel Roskin <proski@gnu.org>
2814 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2816 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2818 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2819 Fix comparison between signed and unsigned.
2821 * include/grub/i386/ieee1275/console.h: Declare
2822 grub_console_init() and grub_console_fini().
2824 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2825 It's empty and unused.
2827 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2828 beginning to avoid warnings with some compilers.
2830 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2831 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2833 2008-07-14 Pavel Roskin <proski@gnu.org>
2835 * kern/env.c (grub_register_variable_hook): Don't copy empty
2836 string, it leaks memory. Pass "" to grub_env_set(), it should
2837 handle constant strings.
2839 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2840 * commands/cmp.c (grub_cmd_cmp): Likewise.
2841 * kern/dl.c (grub_dl_flush_cache): Likewise.
2842 (grub_dl_load_core): Likewise.
2843 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2844 (grub_elf64_load_phdrs): Likewise.
2846 2008-07-13 Pavel Roskin <proski@gnu.org>
2848 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2849 between signed and unsigned.
2850 (LzmaEnc_Finish): Fix warning about an unused parameter.
2852 2008-07-13 Bean <bean123ch@gmail.com>
2854 * Makefile.in (enable_lzo): New rule.
2856 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2858 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2860 * boot/i386/pc/lnxboot.S: #include <config.h>.
2862 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2863 its value according to the compression algorithm used, lzo or lzma.
2865 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2866 compression algorithm according to configure macro.
2868 * kern/i386/pc/startup.S (codestart): Likewise.
2870 * kern/i386/pc/lzma_decode.S: New file.
2872 * include/grub/lib/LzFind.h: Likewise.
2874 * include/grub/lib/LzHash.h: Likewise.
2876 * include/grub/lib/LzmaDec.h: Likewise.
2878 * include/grub/lib/LzmaEnc.h: Likewise.
2880 * include/grub/lib/LzmaTypes.h: Likewise.
2882 * lib/LzFind.c: Likewise.
2884 * lib/LzmaDec.c: Likewise.
2886 * lib/LzmaEnc.c: Likewise.
2888 2008-07-13 Bean <bean123ch@gmail.com>
2890 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2891 (grub_ext4_extent_header): New structure.
2892 (grub_ext4_extent): Likewise.
2893 (grub_ext4_extent_idx): Likewise.
2894 (grub_ext4_find_leaf): New function.
2895 (grub_ext2_read_block): Handle extents.
2897 2008-07-12 Robert Millan <rmh@aybabtu.com>
2899 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2901 2008-07-11 Robert Millan <rmh@aybabtu.com>
2903 * util/grub.d/40_custom.in: New file. Example on how to add custom
2904 entries to /etc/grub.d.
2905 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2906 40_custom (implicitly, by merging all the grub.d rules).
2908 2008-07-11 Pavel Roskin <proski@gnu.org>
2910 * commands/read.c (grub_getline): Fix invalid memory access.
2911 Don't add newline to the variable value.
2913 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2914 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2915 (serial_hw_get_port): Check validity of the port number.
2916 (grub_cmd_serial): Check return value of serial_hw_get_port().
2918 2008-07-07 Pavel Roskin <proski@gnu.org>
2920 * boot/i386/pc/diskboot.S (notification_string): Replace
2921 "Loading kernel" with just "loading". This is shorter, less
2922 confusing and saves a few bytes for possible future changes.
2924 2008-07-05 Pavel Roskin <proski@gnu.org>
2926 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2927 size for ATAPI devices, they are undefined. Output sector
2928 number in decimal form.
2930 * disk/ata.c: Use named constants for status bits.
2932 2008-07-04 Pavel Roskin <proski@gnu.org>
2934 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2935 grub_addr_t before casting it to the void pointer to fix a
2936 warning. Non-addressable regions are discarded earlier.
2937 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2938 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2939 (check_signature): Don't shadow table_header.
2940 (grub_linuxbios_table_iterate): Cast numeric constants to
2941 grub_linuxbios_table_header_t.
2942 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2945 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2948 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2949 pointer, which can cause warnings. Support 64-bit addresses.
2951 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2952 of sizeof(long). This fixes PowerPC image generation on x86_64.
2954 2008-07-04 Robert Millan <rmh@aybabtu.com>
2956 This fixes a performance issue when pc & gpt partmap iterators
2957 didn't abort iteration even after our hook found what it was
2958 looking for (often causing expensive probes of non-existent drives).
2960 Some callers relied on previous buggy behaviour, since they would
2961 raise an error when their own hooks caused early abortion of its
2964 * kern/device.c (grub_device_open): Improve error message.
2965 * disk/lvm.c (grub_lvm_open): Likewise.
2966 * disk/raid.c (grub_raid_open): Likewise.
2968 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2969 when hook requests it, independently of grub_errno.
2970 (pc_partition_map_probe): Do not fail when find_func() caused
2971 early abortion of pc_partition_map_iterate().
2973 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2974 when hook requests it, independently of grub_errno.
2975 (gpt_partition_map_probe): Do not fail when find_func() caused
2976 early abortion of gpt_partition_map_iterate().
2978 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2979 when hook requests it, independently of grub_errno. Do not fail when
2980 part_map_iterate_hook() caused early abortion of p->iterate().
2982 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2983 when grub_partition_iterate() returned with non-zero.
2985 2008-07-03 Pavel Roskin <proski@gnu.org>
2987 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2988 like we do in grub_ata_pio_read().
2989 (grub_ata_readwrite): Always write individual sectors. Fix the
2990 sector count for the remainder.
2991 (grub_ata_write): Enable writing to ATA devices. Correctly
2992 report error for ATAPI devices.
2994 2008-07-02 Pavel Roskin <proski@gnu.org>
2996 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2999 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3000 for every read sector, we already increment it for the whole
3001 batch. This fixes reading more than 256 sectors at once.
3003 * util/grub-editenv.c (cmd_info): Cast argument to long
3004 explicitly. ptrdiff_t reduces to int on i386.
3006 * util/grub-editenv.c (main): Be specific which parameter is
3009 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3010 (memdisk): Make memdisk_orig_addr a pointer.
3012 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3013 for file offsets, use grub_off_t instead. Fix printf format
3016 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3017 there. Real unexpected warnings should not drown in the noise
3018 about known problems.
3020 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3021 grub_disk_addr_t for memory addresses.
3023 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3024 explicitly to fix a warning.
3026 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3028 * Makefile.in (MODULE_LDFLAGS): New variable.
3029 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3030 the linker accepts --build-id=none.
3031 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3033 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3035 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3036 those in Linux XFS code. Provide a way to access 64-bit parent
3038 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3039 the end of struct grub_xfs_dir_header.
3041 2008-07-02 Bean <bean123ch@gmail.com>
3043 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3044 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3045 and GRUB_IEEE1275_FLAG_NO_ANSI.
3047 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3048 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3049 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3051 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3052 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3054 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3055 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3057 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3058 esc sequence on non ANSI terminal.
3059 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3061 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3064 2008-07-02 Bean <bean123ch@gmail.com>
3066 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3067 (grub_editenv_SOURCES): New variable.
3068 (pkglib_MODULES): Add loadenv.mod.
3069 (loadenv_mod_SOURCES): New variable.
3070 (loadenv_mod_CFLAGS): Likewise.
3071 (loadenv_mod_LDFLAGS): Likewise.
3073 * include/grub/envblk.h: New file.
3075 * util/envblk.c: New file.
3077 * util/grub-editenv.c: New file.
3079 * commands/loadenv.c: New file.
3081 2008-07-01 Pavel Roskin <proski@gnu.org>
3083 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3084 not unsigned char. This fixes warnings and is consistent with
3087 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3089 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3091 * term/tparm.c (analyze): Always set *popcount.
3093 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3094 cast to fix a warning.
3096 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3097 cast to suppress a warning.
3099 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3100 grub_fshelp_read_file() expects.
3102 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3103 write uuid as a 32-bit value in CPU byte order, so declare and
3106 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3107 long if the format specifier expects it.
3108 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3109 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3110 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3111 long to fix a warning.
3112 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3113 grub_dprintf() arguments to fix warnings.
3115 2008-06-30 Pavel Roskin <proski@gnu.org>
3117 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3118 install_bsd_part immediately before core.img is embedded or
3119 modified on disk. This fixes core.img verification if core.img
3122 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3123 core_path to calculate the blocklist.
3124 Patch from Javier Martín <lordhabbit@gmail.com>
3126 2008-06-29 Robert Millan <rmh@aybabtu.com>
3128 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3129 block to disk block.
3130 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3131 Patch from Niels Böhm <bitbucket@arcor.de>
3133 2008-06-29 Robert Millan <rmh@aybabtu.com>
3135 * util/update-grub_lib.in (font_path): Search for fonts in
3136 /boot/grub first, which is more likely to be readable (we aren't
3137 deciding where fonts live, just looking for them).
3139 2008-06-26 Pavel Roskin <proski@gnu.org>
3141 * util/biosdisk.c (read_device_map): Don't leave dead map
3142 entries for devices failing stat() check.
3144 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3145 core_path_dev for the core.img path on the target device.
3147 2008-06-26 Robert Millan <rmh@aybabtu.com>
3149 * disk/fs_uuid.c: New file.
3150 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3151 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3152 (fs_uuid_mod_LDFLAGS): New variables.
3153 * include/grub/disk.h (grub_disk_dev_id): Add
3154 `GRUB_DISK_DEVICE_UUID_ID'.
3155 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3156 implement iterate().
3158 2008-06-26 Robert Millan <rmh@aybabtu.com>
3160 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3161 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3162 Linux image includes no initrd.
3164 2008-06-21 Javier Martín <lordhabbit@gmail.com>
3166 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3167 call to resolve the core image location that effectively appended the
3170 2008-06-21 Robert Millan <rmh@aybabtu.com>
3172 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3175 * util/grub.d/10_hurd.in: ... to here ...
3176 * util/grub.d/10_linux.in: ... and here.
3178 2008-06-19 Robert Millan <rmh@aybabtu.com>
3180 * kern/main.c (grub_main): Export `prefix' variable immediately
3181 after it has been set by grub_machine_set_prefix().
3183 2008-06-19 Robert Millan <rmh@aybabtu.com>
3185 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3186 search result when not saving to variable, not the other way around.
3187 When saving to variable, abort iteration as soon as a match is found.
3189 2008-06-19 Robert Millan <rmh@aybabtu.com>
3191 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3192 check for partition that provides /boot/grub. Its logic is flawed,
3193 as it prevents prepare_grub_to_access_device() from being called
3196 2008-06-19 Robert Millan <rmh@aybabtu.com>
3198 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3199 "insmod" command directly when abstraction modules are needed,
3200 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3201 since it had already been processed).
3203 2008-06-19 Pavel Roskin <proski@gnu.org>
3205 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3206 changed. This is needed in case GRUB_LIBDIR changes.
3207 * conf/i386-ieee1275.rmk: Likewise.
3208 * conf/i386-linuxbios.rmk: Likewise.
3209 * conf/i386-pc.rmk: Likewise.
3210 * conf/powerpc-ieee1275.rmk: Likewise.
3212 2008-06-18 Pavel Roskin <proski@gnu.org>
3214 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3215 kernel_elf_symlist.c to symlist.c for consistency with other
3216 architectures. Update all users.
3217 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3219 2008-06-18 Robert Millan <rmh@aybabtu.com>
3221 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3224 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3225 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3226 a RAID device, run setup() for all members independently on whether
3227 LVM abstraction is being used.
3228 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3229 If grub-mkimage has set `*install_dos_part == -2', don't override this
3231 Perform *install_dos_part adjustments independently on whether
3232 we're embedding or not.
3233 Clarify error message when image is too big for embedding.
3234 Remove duplicate *install_dos_part stanza.
3236 2008-06-17 Robert Millan <rmh@aybabtu.com>
3238 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3239 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3241 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3242 values in grub_ofconsole_normal_color and
3243 grub_ofconsole_highlight_color (they're not directly related to
3244 background and foreground).
3245 (grub_ofconsole_setcolorstate): Extract background and foreground
3246 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3248 2008-06-17 Robert Millan <rmh@aybabtu.com>
3250 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3251 /boot/grub for the check in last commit, not /boot (they could be
3252 different partitions).
3254 2008-06-16 Robert Millan <rmh@aybabtu.com>
3256 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3257 asked to setup access for the same partition that provides /boot,
3258 don't bother using UUIDs since our root already has the value we
3261 2008-06-16 Robert Millan <rmh@aybabtu.com>
3263 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3265 Patch from Sven Mueller <sven@debian.org>.
3267 2008-06-16 Robert Millan <rmh@aybabtu.com>
3269 * util/update-grub.in: Check for $EUID instead of $UID.
3270 Reported by Vincent Zweije.
3272 2008-06-16 Bean <bean123ch@gmail.com>
3274 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
3275 (grub_ext2_read_block): Likewise.
3276 (grub_ext2_read_inode): Likewise.
3277 (grub_ext2_mount): Likewise.
3278 (grub_ext2_close): Likewise.
3279 (grub_ext3_get_journal): Removed.
3281 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
3282 (grub_reiserfs_read_symlink): Likewise.
3283 (grub_reiserfs_mount): Likewise.
3284 (grub_reiserfs_open): Likewise.
3285 (grub_reiserfs_read): Likewise.
3286 (grub_reiserfs_close): Likewise.
3287 (grub_reiserfs_get_journal): Removed.
3289 * fs/fshelp.c (grub_fshelp_read): Removed.
3290 (grub_fshelp_map_block): Likewise.
3292 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3293 (grub_fshelp_journal): Likewise.
3294 (grub_fshelp_read): Likewise.
3295 (grub_fshelp_map_block): Likewise.
3297 2008-06-16 Pavel Roskin <proski@gnu.org>
3299 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3300 floating point anymore.
3301 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3303 2008-06-15 Pavel Roskin <proski@gnu.org>
3305 * commands/ls.c (grub_ls_list_files): Use integer calculations
3306 for human readable format, avoid floating point use.
3307 * kern/misc.c (grub_ftoa): Remove.
3308 (grub_vsprintf): Remove floating point support.
3310 2008-06-15 Robert Millan <rmh@aybabtu.com>
3312 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
3314 Reported by Max Vozeler.
3316 2008-06-15 Robert Millan <rmh@aybabtu.com>
3318 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3319 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3321 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3322 the beginning of the prefix.
3324 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3325 It is assumed that if we have a memdisk, grub-mkimage has set
3326 grub_prefix to include the "(memdisk)" drive in it.
3328 2008-06-15 Robert Millan <rmh@aybabtu.com>
3330 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3331 Initialize keyboard controller after registering the terminal, so that
3332 grub_printf() can be called from grub_keyboard_controller_init().
3334 2008-06-15 Robert Millan <rmh@aybabtu.com>
3336 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3337 extent-btree which is written as big endian on disk.
3338 Reported by Alain Greppin <al@chilibi.org>.
3340 2008-06-14 Robert Millan <rmh@aybabtu.com>
3342 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3343 * util/i386/pc/grub-install.in (modules): Likewise.
3345 2008-06-13 Pavel Roskin <proski@gnu.org>
3347 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3349 2008-06-13 Bean <bean123ch@gmail.com>
3351 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3353 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3355 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3356 to indicate sparse block.
3358 2008-06-12 Pavel Roskin <proski@gnu.org>
3360 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3361 number, grub_fshelp_read() does it for us.
3363 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3364 linear disk read with journal translation.
3365 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3366 * include/grub/fshelp.h: Declare grub_fshelp_read().
3368 2008-06-09 Pavel Roskin <proski@gnu.org>
3370 * fs/minix.c (grub_minix_mount): Handle error reading
3373 2008-06-08 Robert Millan <rmh@aybabtu.com>
3375 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3376 don't append the RAID prefix afterwards.
3377 Reported by Clint Adams.
3379 2008-06-08 Robert Millan <rmh@aybabtu.com>
3381 Based on description from Pavel:
3382 * kern/disk.c (grub_disk_check_range): Rename to ...
3383 (grub_disk_adjust_range): ... this. Add a comment explaining the
3384 tasks performed by this function.
3386 2008-06-08 Robert Millan <rmh@aybabtu.com>
3388 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3389 `num_serial' (for consistency with other variables).
3390 (struct grub_ntfs_data): Add `uuid' member.
3391 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3392 (grub_ntfs_uuid): New function.
3393 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3395 2008-06-07 Pavel Roskin <proski@gnu.org>
3397 * util/biosdisk.c (open_device): Revert last change to the
3398 function, it broke installation. The sector needs to be
3399 different dependent on which device is opened.
3401 2008-06-06 Robert Millan <rmh@aybabtu.com>
3403 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3404 rest of GRUB, and breakage doesn't happen if its value were modified.
3406 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3407 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3408 a constant (same value).
3409 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3410 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3412 2008-06-06 Robert Millan <rmh@aybabtu.com>
3414 * util/biosdisk.c (open_device): Do not modify sector offset when
3415 accessing a partition. kern/disk.c already handles this for us.
3417 2008-06-06 Robert Millan <rmh@aybabtu.com>
3419 * util/grub-emu.c (grub_machine_init): Move code in this function from
3421 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3422 segfault in case grub_printf() is called).
3424 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3425 grub_probe. Update all users not to explicitly add it again.
3426 (grub_device): New variable; contains corresponding device for grubdir.
3427 (fs_module, partmap_module, devabstraction_module): Pass
3428 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3431 2008-06-05 Robert Millan <rmh@aybabtu.com>
3433 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3434 is found, print it (same layout as with labels).
3436 2008-06-04 Robert Millan <rmh@aybabtu.com>
3438 * util/biosdisk.c (get_drive): Rename to ...
3439 (find_grub_drive): ... this. Update all users.
3441 (get_os_disk): Rename to ...
3442 (convert_system_partition_to_system_disk): ... this. Update all users.
3444 (find_drive): Rename to ...
3445 (find_system_device): ... this. Update all users.
3447 2008-06-04 Robert Millan <rmh@aybabtu.com>
3449 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3450 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3451 (make_device_map): Likewise.
3453 2008-06-01 Robert Millan <rmh@aybabtu.com>
3455 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3456 before dereferencing it.
3458 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3459 union with fat12/fat16-specific ones. Add some new fields, including
3460 `num_serial' for both versions.
3461 (struct grub_fat_data): Add `uuid' member.
3462 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3463 names. Initialize `data->uuid' using `num_serial'.
3464 (grub_fat_uuid): New function.
3465 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3467 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3468 (grub_reiserfs_uuid): New function.
3469 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3472 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3473 (grub_xfs_uuid): New function.
3474 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3476 2008-06-01 Robert Millan <rmh@aybabtu.com>
3478 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3479 code that is backward compatible with pre-uuid search command.
3481 2008-05-31 Robert Millan <rmh@aybabtu.com>
3483 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3484 floppies after everything else, to ensure floppy drive isn't accessed
3485 unnecessarily (patch from Bean).
3487 2008-05-31 Robert Millan <rmh@aybabtu.com>
3489 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3490 not print device names when we were asked to set a variable.
3492 2008-05-31 Robert Millan <rmh@aybabtu.com>
3494 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3495 using "cursor-on" and "cursor-off" commands (understood at least by
3496 the Open Firmware flavour on OLPC).
3498 2008-05-31 Michael Gorven <michael@gorven.za.net>
3500 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3501 on and off sequences.
3503 2008-05-31 Robert Millan <rmh@aybabtu.com>
3505 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3506 * util/update-grub.in: Likewise.
3508 2008-05-30 Pavel Roskin <proski@gnu.org>
3510 * util/biosdisk.c (linux_find_partition): Simplify logic and
3511 make the code more universal. Keep special processing for
3512 devfs, but use a simple rule for all other devices. If the
3513 device ends with a number, append 'p' and the partition number.
3514 Otherwise, append only the partition number.
3516 2008-05-30 Robert Millan <rmh@aybabtu.com>
3518 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3519 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3520 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3521 the `root' parameter to Linux.
3523 2008-05-30 Robert Millan <rmh@aybabtu.com>
3525 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3526 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3527 --fs_uuid with --fs-uuid.
3528 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3529 all filesystems support them).
3531 2008-05-30 Robert Millan <rmh@aybabtu.com>
3533 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
3534 grub_printf() flags, since we're printing in units of 2 bytes.
3536 2008-05-30 Robert Millan <rmh@aybabtu.com>
3538 * util/grub.d/00_header.in: Remove obsolete comment referencing
3539 convert_system_path_to_grub_path().
3540 * util/update-grub.in: Likewise.
3541 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3542 (convert_system_path_to_grub_path): Add a warning message explaining
3543 that this function is deprecated. Rely on is_path_readable_by_grub()
3544 for the readability checks.
3545 (font_path): Use is_path_readable_by_grub() for the readability
3546 check rather than convert_system_path_to_grub_path().
3548 2008-05-30 Robert Millan <rmh@aybabtu.com>
3550 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3551 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3552 converting it first.
3553 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3554 grub.cfg for access to font file, and afterwards call it again to set
3557 2008-05-30 Robert Millan <rmh@aybabtu.com>
3559 * commands/search.c (options): Add --fs_uuid option.
3560 (search_fs_uuid): New function.
3561 (grub_cmd_search): Fix --set argument passing.
3562 Use search_fs_uuid() when requested via --fs_uuid.
3563 (grub_search_init): Update help message.
3564 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3565 and redeclare it as an array of 16-bit words.
3566 (grub_ext2_uuid): New function.
3567 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3568 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3569 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3570 (GRUB_DEVICE_BOOT_UUID): New variables.
3571 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3572 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3574 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3575 just assume `root' variable has the right value.
3576 * util/grub.d/10_linux.in: Likewise.
3577 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3579 (main): Recognise `-t fs_uuid' argument.
3581 2008-05-30 Robert Millan <rmh@aybabtu.com>
3583 * util/biosdisk.c (map): Redefine structure to hold information
3584 about GRUB drive name.
3585 (get_drive): Reimplement without assuming (and verifying) BIOS-like
3587 (call_hook): Remove.
3588 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3589 member. Assume drive has partitions.
3590 (grub_util_biosdisk_open): Access device names via `.device' struct
3592 (open_device): Likewise.
3593 (find_drive): Likewise.
3594 (read_device_map): Adjust map[] usage to match the new struct
3595 definition. Don't check for duplicates (still possible, but not cheap
3597 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3598 (make_device_name): Remove assumption of BIOS-like drive names.
3600 2008-05-30 Pavel Roskin <proski@gnu.org>
3602 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3603 compiling execute.c doesn't need grub_script.tab.h anymore.
3604 (normal/command.c_DEPENDENCIES): Likewise.
3605 (normal/function.c_DEPENDENCIES): Likewise.
3606 * conf/i386-ieee1275.rmk: Likewise.
3607 * conf/i386-linuxbios.rmk: Likewise.
3608 * conf/i386-pc.rmk: Likewise.
3609 * conf/powerpc-ieee1275.rmk: Likewise.
3610 * conf/sparc64-ieee1275.rmk: Likewise.
3612 2008-05-29 Pavel Roskin <proski@gnu.org>
3614 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3615 when scanning metadata for volume group name.
3617 * include/grub/script.h: Don't include grub_script.tab.h. It's
3618 a generated file, which may only be included from the files with
3619 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3620 use union YYSTYPE, as the later allows forward declaration.
3621 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3623 2008-05-29 Robert Millan <rmh@aybabtu.com>
3625 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3626 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3627 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3628 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3631 2008-05-29 Robert Millan <rmh@aybabtu.com>
3633 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3634 control key combinations.
3636 2008-05-29 Robert Millan <rmh@aybabtu.com>
3638 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3639 * util/ieee1275/grub-install.in: ... to here.
3640 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3641 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3642 (grub_install_SOURCES): Likewise.
3644 2008-05-29 Robert Millan <rmh@aybabtu.com>
3646 * fs/affs.c: Update copyright year.
3647 * fs/ext2.c: Likewise.
3648 * fs/fshelp.c: Likewise.
3649 * fs/hfsplus.c: Likewise.
3650 * fs/ntfs.c: Likewise.
3651 * fs/xfs.c: Likewise.
3652 * include/grub/fshelp.h: Likewise.
3653 * util/grub-mkdevicemap.c: Likewise.
3655 2008-05-28 Robert Millan <rmh@aybabtu.com>
3657 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3658 might need to be fatfs to support some firmware implementations
3661 2008-05-28 Robert Millan <rmh@aybabtu.com>
3663 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3665 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3666 (make_device_map): Likewise.
3668 2008-05-20 Bean <bean123ch@gmail.com>
3670 * fs/fshelp.c (grub_fshelp_map_block): New function.
3671 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3672 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3674 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3675 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3676 (grub_fshelp_journal): New structure.
3677 (grub_fshelp_map_block): New function prototype.
3678 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3679 (grub_fshelp_map_block): Likewise.
3681 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3682 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3683 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3684 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3685 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3686 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3687 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3688 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3689 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3690 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3691 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3692 (grub_ext2_sblock): New members for journal support.
3693 (grub_ext3_journal_header): New structure.
3694 (grub_ext3_journal_revoke_header): Likewise.
3695 (grub_ext3_journal_block_tag): Likewise.
3696 (grub_ext3_journal_sblock): Likewise.
3697 (grub_fshelp_node): New members logfile and journal.
3698 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3699 grub_fshelp_map_block to get real block number.
3700 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3702 (grub_ext2_read_inode): Likewise.
3703 (grub_ext3_get_journal): New function.
3704 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3705 (grub_ext2_close): Release memory used by journal.
3707 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3708 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3709 (grub_reiserfs_transaction_header): Renamed to
3710 grub_reiserfs_description_block, replace field data with real_blocks.
3711 (grub_reiserfs_commit_block): New structure.
3712 (grub_reiserfs_data): New member journal.
3713 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3715 (grub_reiserfs_read_symlink): Likewise.
3716 (grub_reiserfs_iterate_dir): Likewise.
3717 (grub_reiserfs_open): Likewise.
3718 (grub_reiserfs_read): Likewise.
3719 (grub_reiserfs_get_journal): New function.
3720 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3721 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3722 using grub_reiserfs_get_journal.
3723 (grub_reiserfs_close): Release memory used by journal.
3725 * fs/affs.c (grub_affs_read_block): Change block type to
3726 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3728 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3730 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3732 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3734 * fs/udf.c (grub_udf_read_block): Change block type to
3735 grub_disk_addr_t. Use type cast to avoid warning.
3737 * fs/xfs.c (grub_xfs_read_block): Likewise.
3739 2008-05-16 Christian Franke <franke@computer.org>
3741 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3742 to ensure that break with ESC will always work.
3743 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3744 Remove ESC from keyboard queue.
3746 2008-05-16 Christian Franke <franke@computer.org>
3748 * util/biosdisk.c: [__CYGWIN__] Add includes.
3749 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3750 (get_os_disk): Move variable declarations to OS specific
3751 parts to avoid warning.
3752 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3753 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3754 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3756 * util/getroot.c: [__CYGWIN__] Add includes.
3757 (strip_extra_slashes): Fix "/" case.
3758 [__CYGWIN__] (get_win32_path): New function.
3759 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3760 [__CYGWIN__] (find_root_device): Disable.
3761 [__CYGWIN__] (get_bootsec_serial): New function.
3762 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3763 [__linux__] (grub_guess_root_device): Add early returns to simplify
3765 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3766 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3767 check for Linux only.
3769 2008-05-15 Bean <bean123ch@gmail.com>
3771 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3772 keyboard hang problem in apple's intel mac.
3774 2008-05-09 Robert Millan <rmh@aybabtu.com>
3776 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3778 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3779 (make_device_map): Likewise.
3780 Reported by Aurelien Jarno <aurel32@debian.org>
3782 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
3784 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3785 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3786 (make_device_map): Output entries for xvd type disks.
3788 2008-05-07 Robert Millan <rmh@aybabtu.com>
3790 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3792 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3793 (make_device_map): Likewise.
3794 Reported by Roland Dreier <rdreier@cisco.com>
3796 2008-05-07 Robert Millan <rmh@aybabtu.com>
3798 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3799 grub_strstr() call. Correct a few mistakes in failure path handling.
3801 2008-05-06 Robert Millan <rmh@aybabtu.com>
3803 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3804 Do not print a trailing slash (therefore, the root directory is an
3806 (convert_system_path_to_grub_path): Do not remove trailing slash
3807 from make_system_path_relative_to_its_root() output.
3809 * util/i386/pc/grub-install.in: Add trailing slash to output from
3810 make_system_path_relative_to_its_root().
3812 2008-05-06 Robert Millan <rmh@aybabtu.com>
3814 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3815 ensures that output lines aren't intermangled with those sent to
3816 stderr (via grub_util_info()).
3817 * util/grub-probe.c (grub_refresh): Likewise.
3818 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3820 2008-05-05 Christian Franke <franke@computer.org>
3822 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3823 Add Cygwin device names.
3824 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3825 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3826 (check_device): Return error instead of success on empty name.
3827 (make_device_map): Move label inside linux specific code to
3828 prevent compiler warning.
3830 2008-04-30 Robert Millan <rmh@aybabtu.com>
3832 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3833 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3835 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3837 2008-04-29 Robert Millan <rmh@aybabtu.com>
3839 * docs/grub.cfg: New file (example GRUB configuration).
3841 2008-04-26 Robert Millan <rmh@aybabtu.com>
3843 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3844 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3845 and `disk/ieee1275/nand.c'.
3847 2008-04-25 Bean <bean123ch@gmail.com>
3849 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3852 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3853 change the buffer size to 4096 for cdrom device.
3855 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3857 (_linux_mod_SOURCES): New variable.
3858 (_linux_mod_CFLAGS): Likewise.
3859 (_linux_mod_LDFLAGS): Likewise.
3860 (linux_mod_SOURCES): Likewise.
3861 (linux_mod_CFLAGS): Likewise.
3862 (linux_mod_LDFLAGS): Likewise.
3863 (nand_mod_SOURCES): Likewise.
3864 (nand_mod_CFLAGS): Likewise.
3865 (nand_mod_LDFLAGS): Likewise.
3867 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3868 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3869 type property. (nand device in olpc don't have this property)
3871 * include/grub/disk.h (grub_disk_dev_id): New macro
3872 GRUB_DISK_DEVICE_NAND_ID.
3874 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3876 (grub_rescue_cmd_initrd): Likewise.
3878 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3879 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3880 ofw_cif_handler and ofw_idt, adjust padding number.
3882 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3883 GRUB_MACHINE_IEEE1275 is defined.
3885 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3886 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3888 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3889 on nested function heap_init.
3890 (grub_upper_mem): New variable for i386-ieee1275.
3891 (grub_get_extended_memory): New function for i386-ieee1275.
3892 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3894 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3895 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3898 * loader/i386/ieee1275/linux.c: New file.
3900 * loader/i386/ieee1275/linux_normal.c: New file.
3902 * disk/ieee1275/nand.c: New file.
3904 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3906 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3908 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3910 2008-04-18 Robert Millan <rmh@aybabtu.com>
3912 Restructures early code path on ieee1275 to unify grub_main() as
3913 the first C function that is executed in every platform.
3915 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3916 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3918 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3919 * kern/ieee1275/cmain.c (cmain): Rename to ...
3920 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3921 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3924 2008-04-18 Robert Millan <rmh@aybabtu.com>
3926 * util/update-grub.in: Fix syntax error when setting
3927 `GRUB_PRELOAD_MODULES'.
3928 Reported by Stephane Chazelas <stephane@artesyncp.com>
3930 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3932 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3933 section into account, newer toolchains generate unique build ids
3934 * configure.ac: remove the test for --build-id=none acceptance,
3935 we want build ids to be preserved
3936 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3937 far from other sections don't cause the raw binary images grow
3940 2008-04-15 Robert Millan <rmh@aybabtu.com>
3942 * disk/lvm.c: Update copyright year.
3943 * kern/misc.c: Likewise.
3945 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3947 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3948 there is no memory left for physical volume name.
3950 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3952 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3953 volume name mapping to support bigger than 9 character names properly.
3955 2008-04-13 Robert Millan <rmh@aybabtu.com>
3957 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3958 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3960 2008-04-13 Christian Franke <franke@computer.org>
3962 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3963 to create a floppy emulation boot CD when non emulation mode
3965 Enable Joliet CD filesystem extension.
3967 2008-04-13 Robert Millan <rmh@aybabtu.com>
3969 * kern/misc.c (grub_strncat): Fix off-by-one error.
3970 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3972 * kern/env.c (grub_env_context_close): Clear current context, not
3974 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3976 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3978 2008-04-13 Robert Millan <rmh@aybabtu.com>
3980 Improve robustness when handling LVM.
3982 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3983 (and leave `*p' unmodified).
3984 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3986 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3987 iterating through it.
3988 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3990 (grub_lvm_scan_device): Check the return value (and fail gracefully
3991 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3992 Don't assume `vg->pvs != NULL' when iterating through it.
3994 2008-04-13 Robert Millan <rmh@aybabtu.com>
3996 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3997 * genmk.rb (partmap): New variable.
3998 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3999 (#{partmap}): New target rule.
4000 * genpartmaplist.sh: New file.
4001 * Makefile.in (pkglib_DATA): Add partmap.lst.
4002 (partmap.lst): New target rule.
4003 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4004 modules (including all partition maps), instead of preloading them.
4006 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4008 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4009 `linux-boot-prober' (if installed) to detect other operating
4010 systems which are installed on the computer and add them to
4012 * conf/common.rmk: Build and install 30_os-prober.
4014 2008-04-12 Robert Millan <rmh@aybabtu.com>
4016 * kern/powerpc/ieee1275/init.c: Move from here ...
4017 * kern/ieee1275/init.c: ... to here. Update all users.
4019 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4020 * kern/ieee1275/cmain.c: ... to here. Update all users.
4022 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4023 * kern/ieee1275/openfw.c: ... to here. Update all users.
4025 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4026 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4028 2008-04-10 Pavel Roskin <proski@gnu.org>
4030 * configure.ac: Always use "_cv_" in cache variables for
4031 compatibility with Autoconf 2.62.
4033 2008-04-07 Robert Millan <rmh@aybabtu.com>
4035 Revert grub/machine/init.h addition by Pavel (since it breaks on
4036 i386-ieee1275 and others):
4037 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4038 * util/powerpc/ieee1275/misc.c: Likewise.
4040 2008-04-07 Robert Millan <rmh@aybabtu.com>
4042 * util/grub-probe.c (probe): Improve error message.
4044 2008-04-07 Robert Millan <rmh@aybabtu.com>
4046 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4047 (this prevents the presence of a bogus entry from ruining the whole
4050 2008-04-06 Pavel Roskin <proski@gnu.org>
4052 * util/biosdisk.c: Include grub/util/biosdisk.h.
4053 * util/grub-fstest.c (execute_command): Make static.
4054 * util/grub-mkdevicemap.c (check_device): Likewise.
4055 * util/i386/pc/misc.c: Include grub/machine/init.h.
4056 * util/powerpc/ieee1275/misc.c: Likewise.
4057 * util/lvm.c: Include grub/util/lvm.h.
4058 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4060 * util/raid.c: Include grub/util/raid.h.
4061 (grub_util_getdiskname): Make static.
4063 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4064 grub_hostfs_fini(), as they are called from grub_init_all() and
4065 grub_fini_all() respectively. This fixes an infinite loop in
4066 grub-fstest due to double registration of hostfs.
4067 Reported by Christian Franke <Christian.Franke@t-online.de>
4069 2008-04-05 Pavel Roskin <proski@gnu.org>
4071 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4072 all 8 functions. Otherwise, probe function 0 only.
4074 2008-04-04 Pavel Roskin <proski@gnu.org>
4076 * commands/lspci.c (grub_lspci_iter): Print the bus number
4079 * commands/lspci.c (grub_pci_classes): Fix typos.
4080 (grub_lspci_iter): Don't print func twice. Print vendor ID
4081 before device ID, as it's normally done.
4083 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4084 Fix signedness warnings.
4085 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4087 * util/ieee1275/get_disk_name.c: Include config.h so that
4088 _GNU_SOURCE is defined and getline() is declared. Mark an
4089 unused argument as such. Fix a signedness warning.
4091 2008-04-02 Pavel Roskin <proski@gnu.org>
4093 * genkernsyms.sh.in: Use more robust assignments for CC and
4094 srcdir. Quote srcdir.
4095 * gensymlist.sh.in: Likewise. Assert at the compile time that
4096 the symbol table is not empty.
4098 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4099 * fs/cpio.c (grub_cpio_read): Likewise.
4101 2008-04-01 Pavel Roskin <proski@gnu.org>
4103 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4104 * disk/host.c (grub_host_open): Likewise.
4105 * disk/loopback.c (grub_loopback_open): Likewise.
4106 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4107 disk->id as in disk/host.c, not a multi-character constant.
4109 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4110 later is obsolete, potentially dangerous and sets a bad example.
4111 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4112 * util/misc.c (grub_util_get_image_size): Likewise.
4114 * disk/loopback.c (options): Improve help for "--partitions".
4116 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4117 options to align them with the short options, e.g. "echo -e".
4119 2008-03-31 Bean <bean123ch@gmail.com>
4121 * video/reader/png.c (grub_png_data): New member is_16bit and
4123 (grub_png_decode_image_header): Detect 16 bit png image.
4124 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4125 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4126 (grub_video_reader_png): Release memory occupied by image_data.
4128 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4130 (grub_nfs_mount): Skip the test for sector per cluster.
4132 * include/grub/ntfs.h (MAX_SPC): Removed.
4134 2008-03-31 Bean <bean123ch@gmail.com>
4136 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4137 (grub_probe_SOURCES): Add fs/afs.c.
4138 (grub_fstest_SOURCES): Likewise.
4139 (afs_mod_SOURCES): New variable.
4140 (afs_mod_CFLAGS): Likewise.
4141 (afs_mod_LDFLAGS): Likewise.
4143 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4144 (grub_emu_SOURCES): Likewise.
4146 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4148 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4150 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4152 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4154 * fs/afs.c: New file.
4156 2008-03-30 Pavel Roskin <proski@gnu.org>
4158 * disk/host.c: Include grub/misc.h to fix a warning.
4159 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4160 warnings about implicit declarations.
4162 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4164 * include/grub/i386/loader.h: Change declaration of
4165 grub_linux_boot() to match what grub_loader_set() expects.
4166 * util/getroot.c (grub_guess_root_device): Return const char* to
4168 * util/grub-probe.c (probe): Fix a warning about uninitialized
4169 abstraction_name variable.
4170 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4171 second argument as unused to fix a warning.
4173 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4174 missing grub_error() call.
4176 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4177 2.60 and newer uses it to define datadir.
4179 * commands/sleep.c: Fix warning about implicit declaration.
4180 * disk/memdisk.c: Likewise.
4181 * loader/aout.c: Likewise.
4182 * loader/i386/bsd_normal.c: Likewise.
4183 * util/grub-probe.c: Likewise.
4185 * commands/i386/cpuid.c (has_longmode): Make static.
4186 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4187 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4189 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4190 GDT. This is more robust, as %ds can change.
4191 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4192 calling real_to_prot().
4193 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4195 2008-03-28 Pavel Roskin <proski@gnu.org>
4197 * kern/i386/pc/startup.S: Assert that uncompressed functions
4198 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4199 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4200 code, as they push parts of the code (error handlers) beyond
4201 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4202 code as correctness and size.
4204 2008-03-28 Pavel Roskin <proski@gnu.org>
4206 * kern/i386/pc/startup.S
4207 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4208 data block address to the real mode, keep offset minimal. This
4209 works around a bug in AWARD BIOS on old Athlon systems, which
4210 makes CD detection hang.
4212 2008-03-26 Pavel Roskin <proski@gnu.org>
4214 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4216 * include/grub/normal.h: Add grub_parse_color_name_pair()
4219 2008-03-24 Bean <bean123ch@gmail.com>
4221 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4222 (cd_count): Removed.
4223 (cd_drive): New variable.
4224 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4225 (grub_biosdisk_call_hook): Likewise.
4226 (grub_biosdisk_iterate): Change cdrom detection method.
4227 (grub_biosdisk_open): Replace cd_start with cd_drive.
4228 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4229 detect cdrom device.
4231 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4233 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4234 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4235 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4236 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4237 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4238 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4239 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4240 (grub_biosdisk_cdrp): New structure.
4241 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4243 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4245 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4248 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4251 2008-03-20 Robert Millan <rmh@aybabtu.com>
4253 Remove 2 TiB limit in ata.mod.
4254 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4255 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4256 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4257 grub_uint64_t instead of grub_uint32_t.
4259 2008-03-05 Bean <bean123ch@gmail.com>
4261 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4262 (grub_multiboot): Set boot device.
4264 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4266 2008-03-02 Bean <bean123ch@gmail.com>
4268 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4271 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4273 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4276 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4279 * docs/fdl.texi: New file.
4281 * docs/mdate-sh: New file. Copied from gnulib.
4282 * docs/texinfo.tex: Likewise.
4284 * config.guess: Updated from gnulib.
4285 * install-sh: Likewise.
4287 2008-02-28 Robert Millan <rmh@aybabtu.com>
4289 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4290 (aout_mod_SOURCES): New variable.
4291 (aout_mod_CFLAGS): Likewise.
4292 (aout_mod_LDFLAGS): Likewise.
4294 * conf/i386-ieee1275.rmk: Likewise.
4296 2008-02-28 Robert Millan <rmh@aybabtu.com>
4298 * util/update-grub.in: Reorganise terminal validity check. Accept
4299 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4300 Based on suggestion by Franklin PIAT.
4302 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4304 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4306 * util/getroot.c (grub_util_check_block_device): New function that
4307 returns the given argument if it is a block device and returns NULL else.
4308 * util/grub-probe.c (argument_is_device): New variable.
4309 (probe): Promote device_name from a variable to an argument. Receive
4310 device_name from grub_util_check_block_device() if path is NULL and from
4311 grub_guess_root_device() else. Do not free() device_name anymore.
4312 (options): Introduce new parameter '-d, --device'.
4313 (main): Add description of the new parameter to the help screen.
4314 Rename path variable to argument. Set argument_is_device if the '-d'
4315 option is given. Pass argument to probe() depending on
4318 2008-02-24 Bean <bean123ch@gmail.com>
4320 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4321 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4322 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4323 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4324 (GRUB_ISO9660_VOLDESC_END): Likewise.
4325 (grub_iso9660_primary_voldesc): New member escape.
4326 (grub_iso9660_data): New member joliet.
4327 (grub_iso9660_convert_string): New function.
4328 (grub_iso9660_mount): Detect joliet extension.
4329 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4330 (grub_iso9660_iso9660_label): Likewise.
4332 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4333 (grub_setup_SOURCES): Add fs/udf.c.
4334 (grub_fstest_SOURCES): Likewise.
4335 (udf_mod_SOURCES): New variable.
4336 (udf_mod_CFLAGS): Likewise.
4337 (udf_mod_LDFLAGS): Likewise.
4339 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4340 (grub_emu_SOURCES): Likewise.
4342 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4344 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4346 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4348 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4350 * fs/udf.c: New file.
4352 2008-02-24 Robert Millan <rmh@aybabtu.com>
4354 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4355 (normal/lexer.c_DEPENDENCIES): New variables.
4356 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4357 (normal/lexer.c_DEPENDENCIES): Likewise.
4358 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4359 (normal/lexer.c_DEPENDENCIES): Likewise.
4360 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4361 (normal/lexer.c_DEPENDENCIES): Likewise.
4362 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4363 (normal/lexer.c_DEPENDENCIES): Likewise.
4364 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4365 (normal/lexer.c_DEPENDENCIES): Likewise.
4367 2008-02-23 Robert Millan <rmh@aybabtu.com>
4369 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4370 since they were intended to be in hex. This didn't break previously
4371 because of a bug in gpt_partition_map_iterate() (see below).
4373 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4374 when checking the validity of GPT header.
4375 Remove `partno', since it always provides the same information as `i'.
4377 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4379 * include/grub/efi/time.h: Fix a wrong comment.
4381 2008-02-19 Pavel Roskin <proski@gnu.org>
4383 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4386 2008-02-19 Bean <bean123ch@gmail.com>
4388 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4389 (aout_mod_SOURCES): New variable.
4390 (aout_mod_CFLAGS): Likewise.
4391 (aout_mod_LDFLAGS): Likewise.
4392 (_bsd_mod_SOURCES): New variable.
4393 (_bsd_mod_CFLAGS): Likewise.
4394 (_bsd_mod_LDFLAGS): Likewise.
4395 (bsd_mod_SOURCES): New variable.
4396 (bsd_mod_CFLAGS): Likewise.
4397 (bsd_mod_LDFLAGS): Likewise.
4399 * include/grub/aout.h: New file.
4401 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4403 * include/grub/i386/bsd.h: New file.
4405 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4408 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4409 function is called, so that it's possible to change it inside the hook.
4410 (grub_elf64_load): Likewise.
4411 (grub_elf_file): Don't close the file if elf header is not found.
4412 (grub_elf_close): Close the file if grub_elf_file fails (The new
4413 grub_elf_file won't close it).
4414 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4415 (grub_elf64_size): Likewise.
4417 * kern/i386/loader.S (grub_unix_real_boot): New function.
4419 * loader/aout.c: New file.
4421 * loader/i386/bsd.c: New file.
4423 * loader/i386/bsd_normal.c: New file.
4425 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4427 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
4428 can test other formats.
4430 2008-02-19 Robert Millan <rmh@aybabtu.com>
4432 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4433 (grub_gpt_partition_type_empty): Redefine with macro from
4434 `<grub/gpt_partition.h>'.
4435 (gpt_partition_map_iterate): Adjust partition type comparison.
4437 Export `entry' as partmap-specific `part.data' struct.
4438 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4440 * include/grub/gpt_partition.h (grub_gpt_header)
4441 (grub_gpt_partentry): ... to here (new file).
4443 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4445 (grub_gpt_partition_type_bios_boot): New const variable, defined
4446 with macro from `<grub/gpt_partition.h>'.
4448 (setup): Replace `first_start' with `embed_region', which keeps
4449 track of the embed region (and is partmap-agnostic).
4451 Replace find_first_partition_start() with find_usable_region(),
4452 which finds a usable region for embedding using partmap-specific
4453 knowledge (supports PC/MSDOS and GPT).
4455 Fix all assumptions that the embed region start at sector 1, using
4456 `embed_region.start' from now on. Similarly, use `embed_region.end'
4457 rather than `first_start' to calculate available size.
4459 In grub_util_info() message, replace "into after the MBR" with an
4460 indication of the specific sector our embed region starts at.
4462 2008-02-19 Robert Millan <rmh@aybabtu.com>
4464 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4465 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4466 `commands/reboot.c'.
4467 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4468 (halt_mod_SOURCES): Likewise.
4469 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4470 (halt_mod_SOURCES): Likewise.
4472 2008-02-17 Christian Franke <franke@computer.org>
4474 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4476 2008-02-17 Robert Millan <rmh@aybabtu.com>
4478 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4479 set `first_start' to 0 for non-PC/MSDOS partition maps.
4481 2008-02-16 Robert Millan <rmh@aybabtu.com>
4483 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4484 do not assume partition map is PC/MSDOS before performing checks that
4485 are specific to that layout.
4487 2008-02-13 Robert Millan <rmh@aybabtu.com>
4489 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4490 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4491 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4493 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4495 * configure.ac: Only a cosmetic change on the handling of
4496 -fno-stack-protector.
4498 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
4500 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4501 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4503 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4504 (halt_mod_SOURCES): New variable.
4505 (halt_mod_CFLAGS): Likewise.
4506 (halt_mod_LDFLAGS): Likewise.
4507 (reboot_mod_SOURCES): Likewise.
4508 (reboot_mod_CFLAGS): Likewise.
4509 (reboot_mod_LDFLAGS): Likewise.
4511 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4512 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4514 (halt_mod_SOURCES): Likewise.
4515 (reboot_mod_SOURCES): Likewise.
4517 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4518 commands/i386/pc/reboot.c by commands/reboot.c.
4519 (reboot_mod_SOURCES): Likewise.
4521 * commands/i386/pc/reboot.c: merge this file ...
4523 * commands/ieee1275/reboot.c: ... and this file ...
4525 * commands/reboot.c: ... to this file.
4526 Add some precompiler directive to include the correct header for
4529 * commands/ieee1275/halt.c: move this file ...
4531 * commands/halt.c: ... to here.
4532 Add some precompiler directive to include the correct header for
4535 * include/grub/efi/efi.h (grub_reboot): New function declaration.
4536 (grub_halt): Likewise.
4538 * kern/efi/efi.c (grub_reboot): New function.
4539 (grub_halt): Likewise.
4541 2008-02-12 Robert Millan <rmh@aybabtu.com>
4543 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4544 /dev (like it is done for /dev/mapper). This doesn't provide support
4545 for EVMS, but at least it is now easy to identify the problem when it
4548 2008-02-11 Robert Millan <rmh@aybabtu.com>
4550 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4551 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4552 comparing it with -1, not 0.
4554 2008-02-10 Robert Millan <rmh@aybabtu.com>
4556 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4558 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4559 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4561 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4562 `disk/lvm.c' to the end of the list.
4563 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4564 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4566 2008-02-10 Robert Millan <rmh@aybabtu.com>
4568 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4569 grub_print_error() instead. This will let user know why we're entering
4571 Based on suggestions from Sam Morris.
4573 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
4575 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4576 on remaining N args, instead of "--" arg N times.
4578 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4580 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4581 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4582 pattern for unknown glyphs.
4584 2008-02-09 Robert Millan <rmh@aybabtu.com>
4586 * configure.ac: Probe for `help2man'.
4587 * Makefile.in (builddir): New variable.
4588 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4589 or otherwise add a few flags/options to it.
4590 (install-local): For every executable utility or script that is
4591 installed, invoke $(HELP2MAN) to install a manpage based on --help
4594 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4595 that it doesn't prevent --help from working in build tree.
4597 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4598 with `bug-grub@gnu.org'.
4599 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4600 * util/update-grub.in (usage): New function.
4601 Implement proper argument check, with support for --help and --version
4602 (as well as existing -y).
4604 2008-02-09 Christian Franke <franke@computer.org>
4606 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4607 avoid overwriting previous output.
4608 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4610 2008-02-09 Robert Millan <rmh@aybabtu.com>
4612 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4615 2008-02-09 Robert Millan <rmh@aybabtu.com>
4617 * commands/sleep.c: New file.
4618 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4619 (sleep_mod_SOURCES): New variable.
4620 (sleep_mod_CFLAGS): Likewise.
4621 (sleep_mod_LDFLAGS): Likewise.
4623 2008-02-09 Robert Millan <rmh@aybabtu.com>
4625 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4626 situations in which we can deduce the RAID size and the superblock
4629 2008-02-09 Robert Millan <rmh@aybabtu.com>
4631 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4632 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4633 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4635 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4636 and return a grub_diskmemberlist_t composed of physical array members.
4637 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4639 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4641 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4642 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4643 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4645 * util/grub-probe.c (probe): Move partmap probing code from here ...
4646 (probe_partmap): ... to here.
4647 (probe): Use probe_partmap() once for the disk we're probing, and
4648 additionally, when such disk contains a memberlist() struct member,
4649 once for each disk that is contained in the structure returned by
4652 2008-02-09 Robert Millan <rmh@aybabtu.com>
4654 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4655 environment variable to 'all' in order to obtain debug output from
4657 * util/i386/pc/grub-setup.c (main): Likewise.
4659 2008-02-08 Robert Millan <rmh@aybabtu.com>
4661 * disk/raid.c (grub_raid_scan_device): Check for
4662 `array->device[sb.this_disk.number]' rather than for
4663 `array->device[sb.this_disk.number]->name', since the latter is not
4664 guaranteed to be accessible.
4666 2008-02-08 Robert Millan <rmh@aybabtu.com>
4668 * disk/raid.c: Update copyright.
4669 * fs/cpio.c: Likewise.
4670 * include/grub/raid.h: Likewise.
4671 * loader/i386/pc/multiboot.c: Likewise.
4672 * util/hostfs.c: Likewise.
4674 2008-02-08 Robert Millan <rmh@aybabtu.com>
4676 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4677 to a grub_disk_t array.
4678 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4680 (grub_raid_scan_device): Replace `device[x].name' accesses with
4681 `device[x]->name'. Simplify initialization of `array->device[x]'.
4683 2008-02-08 Robert Millan <rmh@aybabtu.com>
4685 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4686 grub_dprintf() calls.
4687 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4690 2008-02-07 Christian Franke <franke@computer.org>
4692 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4693 instead of fseek and ftell to support large files.
4694 (grub_hostfs_read): Likewise.
4696 2008-02-07 Robert Millan <rmh@aybabtu.com>
4698 Patch from Jeroen Dekkers.
4699 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4700 failure, since successfully reading all array members might not be
4703 2008-02-06 Robert Millan <rmh@aybabtu.com>
4705 * util/grub-probe.c (probe): Simplify partmap probing (with the
4706 assumption that the first word up to the underscore equals to
4709 2008-02-06 Christian Franke <franke@computer.org>
4711 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4712 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4713 last block of a cpio or tar stream.
4714 Check for "TRAILER!!!" instead of any empty data
4715 block to detect last block of a cpio stream.
4716 (grub_cpio_dir): Fix constness of variable np.
4717 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4718 cpio or tar trailer is detected. This fixes a crash
4719 on open of a non existing file.
4721 2008-02-05 Bean <bean123ch@gmail.com>
4723 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4725 (grub_multiboot_load_elf64): Likewise.
4726 (grub_multiboot): Initialize mbi structure.
4728 * util/grub-fstest.c: Don't include unused header file script.h.
4730 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4732 (grub_fstest_SOURCES): Likewise.
4734 2008-02-05 Robert Millan <rmh@aybabtu.com>
4736 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4737 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4738 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4739 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4741 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4742 (translation_table): Replace hardcoded values with macros
4743 provided by `<grub/term.h>'.
4745 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4746 (keyboard_map): Correct/add a few values, with macros provided
4748 (keyboard_map_shift): Zero values that don't differ from their
4749 `keyboard_map' equivalents.
4750 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4751 Discard the second scan code that is always sent by Caps lock.
4752 Only use `keyboard_map_shift' when it provides a non-zero value,
4753 otherwise fallback to `keyboard_map'.
4755 2008-02-04 Bean <bean123ch@gmail.com>
4757 * Makefile.in (enable_grub_fstest): New variable.
4759 * conf/common.rmk (grub_fstest_init.lst): New rule.
4760 (grub_fstest_init.h): Likewise.
4761 (grub_fstest_init.c): Likewise.
4762 (util/grub-fstest.c_DEPENDENCIES): New variable.
4763 (grub_fstest_SOURCES): Likewise.
4765 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4767 * util/grub-fstest.c: New file.
4769 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4771 Make grub-setup handle a separate root device.
4773 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4774 so that the root device can be compared with the destination
4776 When embedding the core image, if the root and destination devices
4777 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4779 When not embedding, set ROOT_DRIVE to 0xFF.
4781 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4783 Add support for having a grub directory in a different drive. This
4784 is still only the data handling part.
4786 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4787 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4788 (grub_root_drive): New variable.
4790 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4791 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4792 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4795 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4797 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4799 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4801 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4802 is bogus, because PXE booting does not specify any drive
4805 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4806 am not sure if this is really correct.
4808 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4809 is always identical to the boot drive when booting from a CD.
4811 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4813 (root_drive): New variable.
4814 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4815 (setup_sectors): Push %dx right after popping it, because %dh will
4817 (copy_buffer): Restore %dx.
4819 2008-02-03 Robert Millan <rmh@aybabtu.com>
4821 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4822 use `cdboot.img' for cdrom images.
4824 2008-02-03 Robert Millan <rmh@aybabtu.com>
4826 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4827 only setup gfxterm when `font' command has succeeded.
4829 2008-02-03 Robert Millan <rmh@aybabtu.com>
4831 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4832 (grub_rescue_cmd_multiboot_loader)
4833 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4835 2008-02-03 Pavel Roskin <proski@gnu.org>
4837 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4838 %edx and %esi from stack only after grub_gate_a20() is called.
4839 grub_gate_a20() clobbers %edx.
4841 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4843 * configure.ac (AC_INIT): Bumped to 1.96.
4845 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4846 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4847 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4848 video/readers/png.c.
4850 2008-02-03 Bean <bean123ch@gmail.com>
4852 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4853 (cdboot_img_SOURCES): New variable.
4854 (cdboot_img_ASFLAGS): New variable.
4855 (cdboot_img_LDFLAGS): New variable.
4857 * boot/i386/pc/cdboot.S: New file.
4859 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4860 (cd_count): Likewise.
4861 (grub_biosdisk_get_drive): Add support for cd device.
4862 (grub_biosdisk_call_hook): Likewise.
4863 (grub_biosdisk_iterate): Likewise.
4864 (grub_biosdisk_open): Likewise.
4865 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4866 (grub_biosdisk_rw): Support reading from cd device.
4867 (GRUB_MOD_INIT): Iterate cd devices.
4869 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4870 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4871 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4873 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4875 2008-02-02 Robert Millan <rmh@aybabtu.com>
4877 * commands/read.c: New file.
4878 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4879 (read_mod_SOURCES): New variable.
4880 (read_mod_CFLAGS): Likewise.
4881 (read_mod_LDFLAGS): Likewise.
4883 2008-02-02 Robert Millan <rmh@aybabtu.com>
4885 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4886 determining whether menu has to be displayed.
4888 2008-02-02 Marco Gerards <marco@gnu.org>
4890 * bus/pci.c: New file.
4892 * include/grub/pci.h: Likewise.
4894 * include/grub/i386/pc/pci.h: Likewise.
4896 * commands/lspci.c: Likewise.
4898 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4900 (pci_mod_SOURCES): New variable.
4901 (pci_mod_CFLAGS): Likewise.
4902 (pci_mod_LDFLAGS): Likewise.
4903 (lspci_mod_SOURCES): Likewise.
4904 (lspci_mod_CFLAGS): Likewise.
4905 (lspci_mod_LDFLAGS): Likewise.
4907 2008-02-02 Bean <bean123ch@gmail.com>
4909 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4910 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4912 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4913 (grub_xfs_btree_node): New structure.
4914 (grub_xfs_btree_root): New structure.
4915 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4916 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4917 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4918 (GRUB_XFS_EXTENT_SIZE): Likewise.
4919 (grub_xfs_read_block): Support btree format type.
4920 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4921 Use directory block as basic unit.
4923 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4925 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4926 __attribute__ ((__regparm__ (1))).
4928 2008-02-01 Robert Millan <rmh@aybabtu.com>
4930 Correct a mistake in previous commit.
4932 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4934 (normal/command.c_DEPENDENCIES): New variable.
4936 2008-02-01 Robert Millan <rmh@aybabtu.com>
4938 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4940 (normal/command.c_DEPENDENCIES): New variable.
4941 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4942 * conf/i386-ieee1275.rmk: Likewise.
4943 * conf/i386-linuxbios.rmk: Likewise.
4944 * conf/i386-pc.rmk: Likewise.
4945 * conf/sparc64-ieee1275.rmk: Likewise.
4946 * conf/powerpc-ieee1275.rmk: Likewise.
4947 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4949 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4951 2008-02-01 Robert Millan <rmh@aybabtu.com>
4953 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4954 call at beginning of function.
4956 2008-01-31 Pavel Roskin <proski@gnu.org>
4958 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4959 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4960 (grub_mkrescue_SOURCES): Likewise.
4961 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4963 2008-01-30 Robert Millan <rmh@aybabtu.com>
4965 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4966 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4967 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4968 (grub_probe_SOURCES): ... to here.
4970 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4971 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4972 * conf/i386-ieee1275.rmk: Likewise.
4973 * conf/i386-linuxbios.rmk: Likewise.
4974 * conf/powerpc-ieee1275.rmk: Likewise.
4976 2008-01-30 Tristan Gingold <gingold@free.fr>
4978 * kern/rescue.c: Silently accept empty lines.
4980 2008-01-29 Bean <bean123ch@gmail.com>
4982 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4983 (real_code_2): Code cleanup and change comment style.
4984 (move_memory): Avoid using 32-bit address mode.
4986 2008-01-29 Bean <bean123ch@gmail.com>
4988 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4989 (png_mod_SOURCES): New variable.
4990 (png_mod_CFLAGS): Likewise.
4991 (png_mod_LDFLAGS): Likewise.
4993 * video/readers/png.c: New file.
4995 2008-01-28 Robert Millan <rmh@aybabtu.com>
4997 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4998 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4999 `ifndef GRUB_MOD_GAP' hack.
5000 * util/elf/grub-mkimage.c (add_segments): Likewise.
5002 2008-01-27 Robert Millan <rmh@aybabtu.com>
5004 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5005 `GRUB_MOD_GAP' for platforms in which it's not defined.
5006 * util/elf/grub-mkimage.c (add_segments): Likewise.
5008 2008-01-27 Robert Millan <rmh@aybabtu.com>
5010 Get grub-emu to build again (including parallel builds).
5012 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5014 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5015 (normal/execute.c_DEPENDENCIES): ... this, ...
5016 (grub-emu_DEPENDENCIES): ... and this.
5018 * conf/i386-efi.rmk: Likewise.
5019 * conf/i386-linuxbios.rmk: Likewise.
5020 * conf/i386-ieee1275.rmk: Likewise.
5021 * conf/powerpc-ieee1275.rmk: Likewise.
5022 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5024 2008-01-27 Robert Millan <rmh@aybabtu.com>
5026 * NEWS: Add a few items.
5028 2008-01-27 Robert Millan <rmh@aybabtu.com>
5030 Fix parallel builds with grub-emu. Based on earlier commit for
5031 grub-probe and grub-setup.
5033 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5034 (util/grub-emu.c_DEPENDENCIES): ... this.
5035 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5036 (util/grub-emu.c_DEPENDENCIES): ... this.
5037 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5038 (util/grub-emu.c_DEPENDENCIES): ... this.
5039 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5040 (util/grub-emu.c_DEPENDENCIES): ... this.
5041 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5042 (util/grub-emu.c_DEPENDENCIES): ... this.
5044 2008-01-27 Pavel Roskin <proski@gnu.org>
5046 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5047 to create a gap between _end and the modules added to the image
5048 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5049 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5050 * util/elf/grub-mkimage.c (add_segments): Likewise.
5052 2008-01-26 Pavel Roskin <proski@gnu.org>
5054 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5055 just return an error.
5057 2008-01-26 Bean <bean123ch@gmail.com>
5059 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5060 (grub_reiserfs_get_item): Save offset of the next item.
5061 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5063 2008-01-25 Robert Millan <rmh@aybabtu.com>
5065 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5066 make all filesystem sources appear together (possibly fixing omissions
5068 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5069 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5070 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5071 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5073 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5075 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5076 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5077 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5078 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5080 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5081 (probe): Add a sanity check to make sure of our ability to read
5082 requested files when probing for filesystem type.
5084 * genmk.rb: Update copyright year (2007).
5086 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5087 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5088 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5089 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5090 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5091 : Remove function prototypes.
5093 2008-01-25 Robert Millan <rmh@aybabtu.com>
5095 Revert my previous commits (based on wrong assumption of how grub_errno
5098 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
5099 * kern/file.c (grub_file_open): Likewise.
5101 2008-01-24 Pavel Roskin <proski@gnu.org>
5103 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5104 that hang if GRUB tries to setup colors.
5105 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5106 colors for firmwares that don't support it.
5107 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5108 Recognize Open Hack'Ware, set flags to work around its
5111 2008-01-24 Robert Millan <rmh@aybabtu.com>
5113 * kern/file.c (grub_file_open): Do not account previous failures of
5114 unrelated functions when grub_errno is checked for.
5115 Reported by Oleg Strikov.
5117 2008-01-24 Bean <bean123ch@gmail.com>
5119 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5120 (grub_ufs_sblock): New member volume name.
5121 (grub_ufs_find_file): Fix string copy bug.
5122 (grub_ufs_label): Implement this function properly.
5124 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5125 (grub_hfs_iterate_records): Use the correct file number for extents
5126 and catalog file. Fix problem in next index calculation.
5127 (grub_hfs_find_node): Replace recursive function call with loop.
5128 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5130 2008-01-23 Robert Millan <rmh@aybabtu.com>
5132 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5133 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5134 (grub_multiboot2_real_boot): New function prototype.
5136 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5137 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5139 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5140 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5142 2008-01-23 Robert Millan <rmh@aybabtu.com>
5144 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5145 #ifdef'ed out grub_printf().
5147 2008-01-23 Robert Millan <rmh@aybabtu.com>
5149 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5150 grub_dprintf calls, since they make "debug=all" mode unusable.
5151 (grub_console_checkkey): Likewise.
5153 2008-01-23 Robert Millan <rmh@aybabtu.com>
5155 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5156 `term/i386/pc/at_keyboard.c'.
5157 (pkglib_MODULES): Add `serial.mod'.
5158 (serial_mod_SOURCES): New variable.
5159 (serial_mod_CFLAGS): Likewise.
5160 (serial_mod_LDFLAGS): Likewise.
5162 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5163 `<grub/powerpc/ieee1275/console.h>'.
5164 (grub_keyboard_controller_init): New function prototype.
5165 (grub_console_checkkey): Likewise.
5166 (grub_console_getkey): Likewise.
5168 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5171 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5172 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5174 2008-01-23 Robert Millan <rmh@aybabtu.com>
5176 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5177 present, "(memdisk)/boot/grub" becomes the default prefix.
5179 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5180 a memdisk tarball with all the modules. Add --overlay=DIR option that
5181 allows users to overlay additional files into the image.
5183 2008-01-23 Robert Millan <rmh@aybabtu.com>
5185 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5186 and `machine/memory.h'.
5187 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5188 (_multiboot_mod_SOURCES): New variable.
5189 (_multiboot_mod_CFLAGS): Likewise.
5190 (_multiboot_mod_LDFLAGS): Likewise.
5191 (multiboot_mod_SOURCES): Likewise.
5192 (multiboot_mod_CFLAGS): Likewise.
5193 (multiboot_mod_LDFLAGS): Likewise.
5195 * include/grub/i386/ieee1275/loader.h: New file.
5197 * include/grub/i386/ieee1275/machine.h: Likewise.
5199 * include/grub/i386/ieee1275/memory.h: Likewise.
5201 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5202 variable declaration.
5203 (grub_os_area_size): Likewise.
5205 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5206 (grub_lower_mem, grub_upper_mem): New variables.
5207 (grub_stop_floppy): New function (just to make
5208 grub_multiboot2_real_boot() happy).
5210 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5211 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5212 (grub_stop): New function.
5213 Include `"../realmode.S"' and `"../loader.S"'.
5215 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5216 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5218 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5219 rely on grub_multiboot2_real_boot() for final boot.
5221 2008-01-22 Robert Millan <rmh@aybabtu.com>
5223 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5224 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5225 device that doesn't look like an SD card.
5226 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5227 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5228 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5229 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5232 2008-01-22 Robert Millan <rmh@aybabtu.com>
5234 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5235 avoid claiming over our own code.
5237 2008-01-22 Bean <bean123ch@gmail.com>
5239 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5240 (jpeg_mod_SOURCES): New variable.
5241 (jpeg_mod_CFLAGS): Likewise.
5242 (jpeg_mod_LDFLAGS): Likewise.
5244 * video/readers/jpeg.c : New file.
5246 2008-01-22 Bean <bean123ch@gmail.com>
5248 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5249 there are no more items.
5251 2008-01-21 Robert Millan <rmh@aybabtu.com>
5253 * kern/mm.c (grub_mm_init_region): Improve debug message.
5255 2008-01-21 Robert Millan <rmh@aybabtu.com>
5257 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5258 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5260 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5262 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5263 Indicates start of upper memory.
5264 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5265 (generate_image): Abort when image size is big enough to corrupt
5268 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5269 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5270 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5271 instead of hardcoding 0xA0000.
5272 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5273 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5274 instead of hardcoding 0xA0000.
5276 2008-01-21 Robert Millan <rmh@aybabtu.com>
5278 * disk/memdisk.c (memdisk_size): New variable.
5279 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5281 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5282 image to dynamic memory.
5283 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5284 `memdisk_size'. Free memdisk block.
5286 2008-01-21 Robert Millan <rmh@aybabtu.com>
5288 Fix detection of very small filesystems (like tar).
5290 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5291 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5292 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5293 a problem with this disk).
5295 2008-01-21 Robert Millan <rmh@aybabtu.com>
5297 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5298 on grub_biosdisk_rw_standard() error.
5300 2008-01-21 Robert Millan <rmh@aybabtu.com>
5302 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5304 * kern/elf.c: Likewise.
5305 * kern/ieee1275/ieee1275.c: Likewise.
5306 * kern/powerpc/ieee1275/openfw.c: Likewise.
5307 * term/ieee1275/ofconsole.c: Likewise.
5309 2008-01-21 Robert Millan <rmh@aybabtu.com>
5311 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5313 * include/grub/kernel.h (grub_arch_memdisk_addr)
5314 (grub_arch_memdisk_size): Moved from here ...
5316 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5317 (grub_arch_memdisk_size): ... to here.
5319 2008-01-21 Robert Millan <rmh@aybabtu.com>
5321 Mostly based on bugfix from Bean.
5323 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5324 attribute with hook() parameter.
5325 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5327 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5328 attribute with hook() parameter.
5329 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5332 2008-01-21 Robert Millan <rmh@aybabtu.com>
5334 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5335 (pkglib_MODULES): Add `memdisk.mod'.
5336 (memdisk_mod_SOURCES): New variable.
5337 (memdisk_mod_CFLAGS): Likewise.
5338 (memdisk_mod_LDFLAGS): Likewise.
5340 * disk/memdisk.c: New file.
5342 * include/grub/disk.h (grub_disk_dev_id): Add
5343 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5345 * include/grub/i386/pc/kernel.h
5346 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5347 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5348 (grub_kernel_image_size): New variable declaration.
5349 (grub_total_module_size): Likewise.
5350 (grub_memdisk_image_size): Likewise.
5352 * include/grub/i386/pc/memory.h
5353 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5355 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5356 (grub_arch_memdisk_addr): New variable declaration.
5357 (grub_arch_memdisk_size): Likewise.
5359 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5360 (grub_arch_memdisk_size): Likewise.
5362 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5363 (codestart): Replace hardcoded `0x100000' with
5364 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5366 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5367 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5368 not NULL, append the contents of the file it refers to, at the end of
5369 the compressed kernel image. Initialize `grub_memdisk_image_size'
5370 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5371 (options): Add "memdisk"|'m' option.
5372 (main): Parse --memdisk|-m option, and pass user-provided path as
5373 parameter to generate_image().
5375 2008-01-20 Robert Millan <rmh@aybabtu.com>
5377 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5378 grub_dprintf() calls from here ...
5379 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5381 2008-01-20 Robert Millan <rmh@aybabtu.com>
5383 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5385 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5387 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5388 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5389 `GRUB_IEEE1275_FLAG_REAL_MODE'.
5390 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
5392 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5393 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5395 2008-01-19 Robert Millan <rmh@aybabtu.com>
5397 Get rid of confusing function (superseded by
5398 `grub_ieee1275_get_integer_property')
5399 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5401 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5403 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5404 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
5405 in native endianness from grub_ieee1275_get_integer_property().
5407 2008-01-19 Robert Millan <rmh@aybabtu.com>
5409 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5410 command after "shut-down", since implementations differ on which
5411 the command for halt is.
5413 2008-01-19 Robert Millan <rmh@aybabtu.com>
5415 * include/grub/i386/linuxbios/console.h: Add header protection.
5416 (grub_keyboard_controller_init): New function prototype.
5417 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5418 (KEYBOARD_COMMAND_READ): Likewise.
5419 (KEYBOARD_COMMAND_WRITE): Likewise.
5420 (KEYBOARD_SCANCODE_SET1): Likewise.
5421 (grub_keyboard_controller_write): New function.
5422 (grub_keyboard_controller_read): Likewise.
5423 (grub_keyboard_controller_init): Likewise.
5425 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5426 (grub_console_init): On coreboot/LinuxBIOS, call
5427 grub_keyboard_controller_init().
5429 2008-01-19 Robert Millan <rmh@aybabtu.com>
5431 PowerPC changes provided by Pavel Roskin.
5433 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5434 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5435 don't rely on cmain() doing it.
5436 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5437 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5439 2008-01-16 Robert Millan <rmh@aybabtu.com>
5441 * include/grub/i386/linuxbios/memory.h
5442 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5443 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5444 receive `table_header' as argument. Instead, probe for it in the
5445 known memory ranges where it can be present.
5446 (grub_available_iterate): Do not pass a fixed `table_header' address
5447 to grub_linuxbios_table_iterate().
5449 2008-01-15 Robert Millan <rmh@aybabtu.com>
5451 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5452 * conf/i386-ieee1275.rmk: New file.
5453 * include/grub/i386/ieee1275/console.h: Likewise.
5454 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5455 * include/grub/i386/ieee1275/kernel.h: Likewise.
5456 * include/grub/i386/ieee1275/time.h: Likewise.
5457 * kern/i386/ieee1275/init.c: Likewise.
5458 * kern/i386/ieee1275/startup.S: Likewise.
5460 2008-01-15 Robert Millan <rmh@aybabtu.com>
5462 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5463 when pointers are 32-bit (but still do set it to one when they are
5466 2008-01-15 Robert Millan <rmh@aybabtu.com>
5468 * include/grub/ieee1275/ieee1275.h
5469 (grub_ieee1275_get_integer_property): New function prototype.
5471 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5472 (grub_ieee1275_get_integer_property): New function. Wraps around
5473 grub_ieee1275_get_property() to handle endianness.
5475 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5476 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
5478 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5479 (grub_map): Likewise.
5480 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5482 2008-01-15 Bean <bean123ch@gmail.com>
5484 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5485 (grub_script_execute_cmdline): Reset grub_errno.
5487 * normal/main.c (read_config_file): Reset grub_errno.
5489 * normal/parse.y (script_init): New.
5490 (script): Move function and menuentry here.
5492 (command): Add delimiter at the end of command.
5493 (commands): Adjust to match the new command.
5494 (commandblock): Remove grub_script_lexer_record_start.
5495 (menuentry): Add grub_script_lexer_record_start, use the new commands.
5496 (if): Use the new commands.
5498 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5500 2008-01-15 Robert Millan <rmh@aybabtu.com>
5502 * normal/menu.c (run_menu): Move timeout message from here ...
5503 (print_timeout): ... to here.
5504 (run_menu): Use print_timeout() once during initial draw to print
5505 the whole message, and again in every clock tick to update only
5506 the number of seconds.
5508 2008-01-15 Robert Millan <rmh@aybabtu.com>
5510 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5511 actual size of `available' from grub_ieee1275_get_property(), and
5512 restrict parsing to that bound.
5514 2008-01-15 Christian Franke <franke@computer.org>
5516 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5517 (argp_program_version): Remove variable.
5518 (argp_program_bug_address): Likewise.
5519 (options): Convert from struct argp_option to struct option.
5520 (struct arguments): Remove.
5521 (parse_opt): Remove.
5522 (usage): New function.
5523 (main): Replace struct args members by simple variables.
5524 Replace argp_parse() by getopt_long().
5525 Add switch to evaluate options.
5526 Add missing "(...)" around root_dev in prefix string.
5528 2008-01-14 Robert Millan <rmh@aybabtu.com>
5530 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
5531 for grub_ieee1275_exit(), in order to improve portability.
5533 2008-01-14 Robert Millan <rmh@aybabtu.com>
5535 * util/grub.d/10_linux.in (prefix): Define.
5536 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
5538 2008-01-13 Pavel Roskin <proski@gnu.org>
5540 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5541 grub_errno if no errors have been detected.
5543 2008-01-12 Robert Millan <rmh@aybabtu.com>
5545 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5546 (grub_util_get_dev_abstraction): New function prototype.
5548 * util/getroot.c: Include `<grub/util/getroot.h>'
5549 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5550 (grub_util_get_dev_abstraction): ... here (new function).
5552 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5553 `PRINT_ABSTRACTION'.
5554 (probe): Probe for abstraction type when requested.
5555 (main): Understand `--target=abstraction'.
5557 * util/i386/efi/grub-install.in: Add abstraction module to core
5558 image when it is found to be necessary.
5559 * util/i386/pc/grub-install.in: Likewise.
5560 * util/powerpc/ieee1275/grub-install.in: Likewise.
5562 * util/update-grub_lib.in (font_path): Return system path without
5563 converting to GRUB path.
5564 * util/update-grub.in: Convert system path returned by font_path()
5565 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5566 abstraction module is needed for loading fonts (if any). Export
5567 that as `GRUB_PRELOAD_MODULES'.
5568 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5571 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5573 Remove some unused code from reiserfs.
5575 * fs/reiserfs.c (struct grub_reiserfs_key)
5576 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5577 (struct grub_reiserfs_node_body): Removed.
5578 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5580 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5582 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5584 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5586 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5588 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5590 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5591 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5592 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5594 2008-01-10 Robert Millan <rmh@aybabtu.com>
5596 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5597 Determines if a file is garbage left by packaging systems, etc.
5598 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5599 for processing /etc/grub.d scripts.
5600 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5601 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5602 as a condition for processing Linux images.
5604 2008-01-10 Pavel Roskin <proski@gnu.org>
5606 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5607 to compile reiserfs.c on PowerPC.
5609 2008-01-10 Robert Millan <rmh@aybabtu.com>
5611 * kern/device.c (grub_device_iterate): Do not abort device iteration
5612 when one of the devices cannot be opened.
5613 * kern/disk.c (grub_disk_open): Do not account previous failures of
5614 unrelated functions when grub_errno is checked for.
5616 2008-01-08 Robert Millan <rmh@aybabtu.com>
5618 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5619 `! grub_linux_is_bzimage', change order of address comparison to make
5620 it more intuitive, and improve "too big zImage" error message.
5622 2008-01-08 Robert Millan <rmh@aybabtu.com>
5624 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5625 `$(update-grub_DATA)'.
5626 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5629 2008-01-07 Robert Millan <rmh@aybabtu.com>
5631 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5632 which instruction is modified by grub-setup during installation
5633 (since it wasn't obvious by only looking at this file).
5635 2008-01-07 Robert Millan <rmh@aybabtu.com>
5637 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5638 listing actual TODO items.
5640 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5642 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5644 (grub_reiserfs_get_key_offset): Likewise.
5645 (grub_reiserfs_set_key_offset): Likewise.
5646 (grub_reiserfs_set_key_type): Likewise.
5647 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5649 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5650 better to remove the bitfield version completely.
5652 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5654 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5655 allocated from the heap, due to the fshelp implementation.
5656 (grub_reiserfs_dir): Free NODE, due to the same reason.
5658 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5660 Mostly from Vincent Pelletier:
5662 * fs/reiserfs.c: New file.
5664 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5665 (reiserfs_mod_SOURCES): New variable.
5666 (reiserfs_mod_CFLAGS): Likewise.
5667 (reiserfs_mod_LDFLAGS): Likewise.
5669 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5670 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5671 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5674 2008-01-06 Robert Millan <rmh@aybabtu.com>
5676 * normal/color.c: Remove `<grub/env.h>'.
5678 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5680 * include/grub/normal.h: Include <grub/env.h>.
5682 2008-01-05 Robert Millan <rmh@aybabtu.com>
5684 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5685 usage example with `(hd0,1)'.
5686 Reported by Samuel Thibault.
5688 2008-01-05 Robert Millan <rmh@aybabtu.com>
5690 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5691 (grub_linux_boot_zimage): Rename to ...
5692 (grub_linux_boot): ... this.
5693 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5694 (grub_linux_boot_zimage): Conditionalize zImage copy.
5696 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5697 (grub_linux_boot_bzimage): Remove prototype.
5698 (grub_linux_boot_zimage): Rename to ...
5699 (grub_linux_boot): ... this.
5701 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5702 (grub_linux_boot): Remove function.
5704 2008-01-05 Robert Millan <rmh@aybabtu.com>
5706 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5707 (grub_env_write_color_highlight): Likewise.
5708 (grub_wait_after_message): Likewise.
5710 * normal/color.c: New file.
5712 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5713 (normal_mod_DEPENDENCIES): Likewise.
5715 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5716 (normal_mod_DEPENDENCIES): Likewise.
5718 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5719 (normal_mod_DEPENDENCIES): Likewise.
5721 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5722 (normal_mod_DEPENDENCIES): Likewise.
5724 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5725 for waiting after a message is printed.
5726 * normal/main.c (read_config_file): Likewise.
5727 (grub_normal_init): Register grub_env_write_color_normal() and
5728 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5729 `color_highlight' variables as global.
5731 * normal/menu.c (grub_wait_after_message): New function.
5732 (grub_color_menu_normal): New variable. Replaces ...
5733 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5734 (grub_color_menu_highlight): New variable. Replaces ...
5735 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5736 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5737 `GRUB_TERM_COLOR_STANDARD'.
5738 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5739 `normal_code' and `highlight_code' to `old_color_normal' and
5740 `old_color_highlight', respectively.
5741 (grub_menu_init_page): Update colors when drawing the menu, based on
5742 `menu_color_normal' and `menu_color_highlight' variables.
5743 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5744 a message is printed.
5746 2008-01-05 Robert Millan <rmh@aybabtu.com>
5748 * kern/env.c (grub_env_context_open): Propagate hooks for global
5749 variables to new context.
5751 * kern/main.c (grub_set_root_dev): Export `root' variable.
5753 2008-01-05 Robert Millan <rmh@aybabtu.com>
5755 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5756 discs unconditionally, since udev and others have options to provide
5759 2008-01-05 Robert Millan <rmh@aybabtu.com>
5761 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5763 2008-01-04 Christian Franke <franke@computer.org>
5765 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5768 2008-01-03 Pavel Roskin <proski@gnu.org>
5770 * kern/i386/linuxbios/init.c: Put "void" to all function
5771 declarations with no arguments.
5772 * kern/powerpc/ieee1275/init.c: Likewise.
5773 * term/i386/pc/at_keyboard.c: Likewise.
5774 * term/i386/pc/vga_text.c: Likewise.
5775 * util/grub-mkdevicemap.c: Likewise.
5777 2008-01-02 Robert Millan <rmh@aybabtu.com>
5779 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5780 message when loaded image is out of bounds.
5781 (grub_multiboot_load_elf64): Likewise.
5783 2008-01-02 Pavel Roskin <proski@gnu.org>
5785 * util/grub.d/10_linux.in: Try version without ".old" when
5786 looking for initrd. It's better to use initrd from the newer
5787 kernel of the same version than no initrd at all.
5789 2008-01-01 Robert Millan <rmh@aybabtu.com>
5791 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5793 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5795 * include/grub/video.h: Added grub_video_unmap_color and
5796 grub_video_get_active_render_target.
5797 (grub_video_adapter): Added unmap_color and get_active_render_target.
5799 * video/video.c: Added grub_video_unmap_color and
5800 grub_video_get_active_render_target.
5801 (grub_video_get_info): Changed method to accept NULL pointer as an
5802 argument to allow detection of active video adapter.
5804 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5805 grub_video_vbe_unmap_color_int.
5806 Added grub_video_vbe_unmap_color and
5807 grub_video_vbe_get_active_render_target.
5808 (grub_video_vbe_adapter): Added unmap_color and
5809 get_active_render_target.
5811 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5812 with grub_video_vbe_unmap_color_int.
5814 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5815 (DEFAULT_NORMAL_COLOR): Likewise.
5816 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5817 (DEFAULT_FG_COLOR): Removed.
5818 (DEFAULT_BG_COLOR): Likewise.
5819 (DEFAULT_CURSOR_COLOR): Changed value.
5820 (grub_virtual_screen): Added standard_color_setting,
5821 normal_color_setting, highlight_color_setting and term_color.
5822 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5823 (bitmap_width): Added.
5824 (bitmap_height): Likewise.
5826 (set_term_color): Likewise.
5827 (grub_virtual_screen_setup): Changed to use new terminal coloring
5829 (grub_gfxterm_init): Added init for bitmap.
5830 (grub_gfxterm_fini): Added destroy for bitmap.
5831 (redraw_screen_rect): Updated to use background bitmap and new
5833 (scroll_up): Added optimization for case when there is no bitmap.
5834 (grub_gfxterm_cls): Fixed to use correct background color.
5835 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5837 (grub_virtual_screen_setcolor): Likewise.
5838 (grub_virtual_screen_getcolor): Added.
5839 (grub_gfxterm_background_image_cmd): Likewise.
5840 (grub_video_term): Added setcolor and getcolor.
5841 (MOD_INIT): Added registration of background_image command.
5842 (MOD_TERM): Added unregistration for background_image command.
5844 2007-12-30 Pavel Roskin <proski@gnu.org>
5846 * loader/multiboot_loader.c: Fix multiboot command
5847 unregistration. Fix all typos in the word "multiboot".
5849 2007-12-29 Pavel Roskin <proski@gnu.org>
5851 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5852 support for initrd names used in Fedora.
5854 2007-12-26 Bean <bean123ch@gmail.com>
5856 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5857 (cpio_mod_SOURCES): New variable.
5858 (cpio_mod_CFLAGS): Likewise.
5859 (cpio_mod_LDFLAGS): Likewise.
5861 * fs/cpio.c: New file.
5863 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5865 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5867 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5869 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5871 2007-12-25 Robert Millan <rmh@aybabtu.com>
5873 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5874 (grub_getcolor): New function.
5876 * kern/term.c (grub_getcolor): New function.
5877 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5878 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5879 (print_entry): Set normal and highlight colors to
5880 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5881 respectively, before printing and restore them to old
5883 (grub_menu_init_page): Likewise. Fill an additional colored space
5884 that would otherwise be left blank.
5886 * term/efi/console.c (grub_console_getcolor): New function.
5887 (struct grub_console_term.getcolor): New variable.
5888 * term/i386/pc/console.c (grub_console_getcolor): New function.
5889 (struct grub_console_term.getcolor): New variable.
5890 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5891 (struct grub_console_term.getcolor): New variable.
5893 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5894 (struct grub_console_term.setcolor): Remove variable.
5895 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5896 (struct grub_console_term.setcolor): Remove variable.
5897 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5898 (struct grub_console_term.setcolor): Remove variable.
5899 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5900 (struct grub_console_term.setcolor): Remove variable.
5902 2007-12-25 Robert Millan <rmh@aybabtu.com>
5904 * configure.ac: Search for possible unifont.hex locations, and
5905 define UNIFONT_HEX if found.
5907 * Makefile.in (UNIFONT_HEX): Define variable.
5908 (DATA): Rename to ...
5909 (PKGLIB): ... this. Update all users.
5910 (PKGDATA): New variable.
5911 (pkgdata_IMAGES): Rename to ...
5912 (pkglib_IMAGES): ... this. Update all users.
5913 (pkgdata_MODULES): Rename to ...
5914 (pkglib_MODULES): ... this. Update all users.
5915 (pkgdata_PROGRAMS): Rename to ...
5916 (pkglib_PROGRAMS): ... this. Update all users.
5917 (pkgdata_DATA): Rename to ...
5918 (pkglib_DATA): ... this. Update all users.
5919 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5920 (unicode.pff, ascii.pff): New rules.
5921 (all-local): Add `$(PKGDATA)' dependency.
5922 (install-local): Process `$(PKGDATA)'.
5924 * util/update-grub_lib.in (font_path): Search for *.pff files in
5925 a few more locations, including `${pkgdata}'.
5927 2007-12-23 Robert Millan <rmh@aybabtu.com>
5929 Patch from Bean <bean123ch@gmail.com>:
5930 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5933 2007-12-21 Bean <bean123ch@gmail.com>
5935 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5936 (ntfscomp_mod_SOURCES): New variable.
5937 (ntfscomp_mod_CFLAGS): Likewise.
5938 (ntfscomp_mod_LDFLAGS): Likewise.
5940 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5941 (grub_probe_SOURCES): Likewise.
5942 (grub_emu_SOURCES): Likewise.
5944 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5945 (grub_emu_SOURCES): Likewise.
5947 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5948 (grub_emu_SOURCES): Likewise.
5950 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5951 (grub_emu_SOURCES): Likewise.
5953 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5954 (read_run_list): Renamed to grub_ntfs_read_run_list.
5955 (decomp_nextvcn): Moved to ntfscomp.c.
5956 (decomp_getch): Likewise.
5957 (decomp_get16): Likewise.
5958 (decomp_block): Likewise.
5959 (read_block): Likewise.
5960 (read_data): Partially moved to ntfscomp.c.
5961 (fixup): Change unsigned to grub_uint16_t.
5962 (read_mft): Change unsigned long to grub_uint32_t.
5963 (read_attr): Likewise.
5964 (read_data): Likewise.
5965 (read_run_data): Likewise.
5966 (read_run_list): Likewise.
5967 (read_mft): Likewise.
5969 * fs/ntfscomp.c: New file.
5971 * include/grub/ntfs.h: New file.
5973 2007-12-16 Robert Millan <rmh@aybabtu.com>
5975 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5976 IDE disk check, since Linux is known to support 20 IDE disks.
5977 Reported by Colin Watson.
5979 2007-12-15 Bean <bean123ch@gmail.com>
5981 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5982 (lnxboot_img_SOURCES): New variable.
5983 (lnxboot_img_ASFLAGS): Likewise.
5984 (lnxboot_img_LDFLAGS): Likewise.
5986 * boot/i386/pc/lnxboot.S: New file.
5988 2007-11-24 Pavel Roskin <proski@gnu.org>
5990 * configure.ac: Test if '--build-id=none' is supported by the
5991 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5992 objcopy to generate incorrect binary files (binutils
5993 2.17.50.0.18-1 as shipped by Fedora 8).
5994 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5995 linking, so that build ID doesn't break the test.
5997 2007-11-24 Pavel Roskin <proski@gnu.org>
5999 * include/grub/i386/time.h: use "void" in the argument list
6001 * include/grub/powerpc/time.h: Likewise.
6002 * include/grub/sparc64/time.h: Likewise.
6004 2007-11-18 Christian Franke <franke@computer.org>
6006 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6007 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6008 This fixes the problem that function keys did not work in grub-emu.
6010 2007-11-18 Christian Franke <franke@computer.org>
6012 * disk/host.c (grub_host_open): Remove attribute unused from
6013 name parameter. Add check for "host". This fixes the problem
6014 that grub-emu does not find partitions.
6016 2007-11-18 Christian Franke <franke@computer.org>
6018 * util/hostfs.c (is_dir): New function.
6019 (grub_hostfs_dir): Handle missing dirent.d_type case.
6020 (grub_hostfs_read): Add missing fseek().
6021 (grub_hostfs_label): Clear label pointer. This fixes a crash
6022 of grub-emu on "ls (host)".
6024 2007-11-18 Christian Franke <franke@computer.org>
6026 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6027 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6028 to 64 bit boundary by default.
6030 2007-11-18 Bean <bean123ch@gmail.com>
6032 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6033 (hexdump_mod_SOURCES): New variable.
6034 (hexdump_mod_CFLAGS): Likewise.
6035 (hexdump_mod_LDFLAGS): Likewise.
6037 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6039 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6041 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6043 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6045 * include/grub/hexdump.h: New file.
6047 * commands/hexdump.c: New file.
6049 2007-11-10 Robert Millan <rmh@aybabtu.com>
6051 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6052 in grub_outb() calls.
6053 (beep_on): Likewise.
6055 2007-11-10 Christian Franke <franke@computer.org>
6057 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6058 (grub_menu_run): Likewise.
6060 2007-11-10 Robert Millan <rmh@aybabtu.com>
6062 * include/grub/i386/efi/machine.h: New file.
6063 * include/grub/i386/linuxbios/machine.h: Likewise.
6064 * include/grub/i386/pc/machine.h: Likewise.
6065 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6066 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6068 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6069 (serial_hw_io_addr): New variable.
6070 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6071 instead of `(unsigned short *) 0x400'.
6073 2007-11-10 Bean <bean123ch@gmail.com>
6075 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6077 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6079 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6080 (vga_mod_SOURCES): Added.
6081 (vga_mod_CFLAGS): Likewise.
6082 (vga_mod_LDFLAGS): Likewise.
6084 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6086 (set_map_mask): Likewise.
6087 (set_read_map): Likewise.
6088 (set_read_address): Likewise.
6089 (vga_font): Removed variable.
6090 (get_vga_glyph): Removed function.
6091 (invalidate_char): Likewise.
6092 (write_char): Changed to use grub_font_get_glyph() for font
6094 (grub_vga_putchar): Likewise.
6095 (grub_vga_getcharwidth): Likewise.
6097 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6099 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6101 (pxeboot_img_LDFLAGS): Likewise.
6102 (diskboot_img_LDFLAGS): Likewise.
6103 (kernel_img_LDFLAGS): Likewise.
6105 2007-11-06 Robert Millan <rmh@aybabtu.com>
6107 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6108 in grub_outb() calls.
6109 (serial_hw_init): Likewise.
6111 2007-11-05 Robert Millan <rmh@aybabtu.com>
6113 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6114 spaces. Skip non-regular files.
6116 2007-11-05 Robert Millan <rmh@aybabtu.com>
6118 * kern/disk.c (grub_disk_firmware_fini)
6119 (grub_disk_firmware_is_tainted): New variables.
6121 * include/grub/disk.h (grub_disk_firmware_fini)
6122 (grub_disk_firmware_is_tainted): Likewise.
6124 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6125 (grub_disk_biosdisk_fini): ... to here.
6126 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6127 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6128 is set. Register grub_disk_biosdisk_fini() in
6129 `grub_disk_firmware_fini'.
6131 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6132 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6133 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6134 to finish existing firmware disk interface.
6136 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6137 (ata_mod_SOURCES): New variable.
6138 (ata_mod_CFLAGS): Likewise.
6139 (ata_mod_LDFLAGS): Likewise.
6141 2007-11-05 Robert Millan <rmh@aybabtu.com>
6143 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6144 (grub_ata_wait): Reimplement using grub_millisleep().
6146 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6147 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6149 2007-11-03 Marco Gerards <marco@gnu.org>
6151 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6152 (CRTC_ADDR_PORT): New macro.
6153 (CRTC_DATA_PORT): Likewise.
6154 (CRTC_CURSOR): Likewise.
6155 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6156 (CRTC_CURSOR_ADDR_LOW): Likewise.
6157 (update_cursor): New function.
6158 (grub_console_real_putchar): Call `update_cursor'.
6159 (grub_console_gotoxy): Likewise.
6160 (grub_console_cls): Set the default color when clearing the
6162 (grub_console_setcursor): Implemented.
6164 2007-11-03 Marco Gerards <marco@gnu.org>
6166 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6168 (grub_ata_pio_write): Likewise.
6170 (grub_atapi_identify): Wait after issuing an ATA command.
6171 (grub_atapi_packet): Likewise.
6172 (grub_ata_identify): Likewise.
6173 (grub_ata_readwrite): Likewise.
6175 2007-11-03 Marco Gerards <marco@gnu.org>
6177 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6178 (grub_ata_pio_write): Likewise.
6179 (grub_ata_readwrite): Use `grub_error', instead of
6180 returning `grub_errno'.
6182 2007-11-03 Marco Gerards <marco@gnu.org>
6184 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6185 grub_ata_pio_write once for every single sector, instead of for
6188 2007-10-31 Robert Millan <rmh@aybabtu.com>
6190 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6192 * conf/i386-linuxbios.rmk: New file.
6194 * kern/i386/pc/hardware.c: Likewise.
6195 * term/i386/pc/at_keyboard.c: Likewise.
6196 * term/i386/pc/vga_text.c: Likewise.
6198 * include/grub/i386/linuxbios/boot.h: Likewise.
6199 * include/grub/i386/linuxbios/console.h: Likewise.
6200 * include/grub/i386/linuxbios/init.h: Likewise.
6201 * include/grub/i386/linuxbios/kernel.h: Likewise.
6202 * include/grub/i386/linuxbios/loader.h: Likewise.
6203 * include/grub/i386/linuxbios/memory.h: Likewise.
6204 * include/grub/i386/linuxbios/serial.h: Likewise.
6205 * include/grub/i386/linuxbios/time.h: Likewise.
6207 * kern/i386/linuxbios/init.c: Likewise.
6208 * kern/i386/linuxbios/startup.S: Likewise.
6209 * kern/i386/linuxbios/table.c: Likewise.
6211 2007-10-31 Marco Gerards <marco@gnu.org>
6213 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6214 (ata_mod_SOURCES): New variable.
6215 (ata_mod_CFLAGS): Likewise.
6216 (ata_mod_LDFLAGS): Likewise.
6218 * disk/ata.c: New file.
6220 * include/grub/disk.h (grub_disk_dev_id): Add
6221 `GRUB_DISK_DEV_ATA_ID'.
6223 2007-10-31 Robert Millan <rmh@aybabtu.com>
6225 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6226 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6228 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6229 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6231 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6234 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6236 2007-10-27 Robert Millan <rmh@aybabtu.com>
6238 * include/grub/types.h (ULONG_MAX): Define macro.
6240 2007-10-22 Robert Millan <rmh@aybabtu.com>
6242 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6244 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6246 2007-10-22 Robert Millan <rmh@aybabtu.com>
6248 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6249 (pkgdata_MODULES): Add `biosdisk.mod'.
6250 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6253 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6254 (grub_biosdisk_init): Replace with ...
6255 (GRUB_MOD_INIT(biosdisk)): ... this.
6256 (grub_biosdisk_fini): Replace with ...
6257 (GRUB_MOD_FINI(biosdisk)): ... this.
6259 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6260 (grub_machine_init): Remove call to grub_biosdisk_init().
6261 (grub_machine_fini): Remove call to grub_machine_fini().
6263 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6265 2007-10-22 Robert Millan <rmh@aybabtu.com>
6267 * include/grub/time.h: New file.
6268 * include/grub/i386/time.h: Likewise.
6269 * include/grub/powerpc/time.h: Likewise.
6270 * include/grub/sparc64/time.h: Likewise.
6272 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6274 (KERNEL_MACHINE_TIME_HEADER): ... this.
6275 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6277 (KERNEL_MACHINE_TIME_HEADER): ... this.
6278 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6280 (KERNEL_MACHINE_TIME_HEADER): ... this.
6282 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6283 (grub_millisleep): New function.
6284 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6285 (grub_millisleep): New function.
6286 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6287 Remove `grub/machine/time.h' include.
6288 (grub_millisleep): New function.
6289 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6290 Remove `grub/machine/time.h' include.
6291 (grub_millisleep): New function.
6293 * include/grub/misc.h (grub_div_roundup): New function.
6295 * kern/misc.c: Include `<grub/time.h>'.
6296 (grub_millisleep_generic): New function.
6298 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6300 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6302 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6303 `machine/time.h'. Add `time.h'.
6304 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6306 2007-10-21 Robert Millan <rmh@aybabtu.com>
6308 * include/grub/misc.h (grub_max): New function.
6310 2007-10-21 Robert Millan <rmh@aybabtu.com>
6312 * util/misc.c (grub_util_info): Call fflush() before returning.
6314 2007-10-20 Robert Millan <rmh@aybabtu.com>
6316 * genmk.rb (Image): Copy `extra_flags' from here ...
6317 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6319 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6320 to `argc' and `args' arguments.
6322 2007-10-17 Robert Millan <rmh@aybabtu.com>
6324 * kern/i386/loader.S: New file.
6326 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6327 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6328 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6329 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6330 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6331 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6332 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6333 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6334 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6335 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6336 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6337 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6338 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6339 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6341 * kern/i386/realmode.S: New file.
6343 * kern/i386/pc/startup.S (protstack): Moved from here ...
6344 * kern/i386/realmode.S (protstack)... to here.
6345 * kern/i386/pc/startup.S (gdt): Moved from here ...
6346 * kern/i386/realmode.S (gdt)... to here.
6347 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6348 * kern/i386/realmode.S (prot_to_real)... to here.
6350 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6351 `kern/i386/realmode.S'.
6353 2007-10-17 Robert Millan <rmh@aybabtu.com>
6355 * include/grub/i386/loader.h: New file.
6357 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6358 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6359 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6360 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6361 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6362 * include/grub/i386/loader.h (grub_linux_prot_size)
6363 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6364 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6365 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6366 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6368 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6370 2007-10-15 Robert Millan <rmh@aybabtu.com>
6372 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6373 filesystem when dev->disk is unset.
6374 Do probe for filesystem even when dev->disk->has_partitions is set.
6375 In case a filesystem is found, always report it.
6376 In case it isn't, if dev->disk->has_partitions is set, report that
6377 a partition table was found instead of reporting that no filesystem
6378 could be identified.
6380 2007-10-12 Robert Millan <rmh@aybabtu.com>
6382 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6383 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6385 * include/grub/types.h (grub_host_to_target16): New macro.
6386 (grub_host_to_target32): Likewise.
6387 (grub_host_to_target64): Likewise.
6388 (grub_target_to_host16): Likewise.
6389 (grub_target_to_host32): Likewise.
6390 (grub_target_to_host64): Likewise.
6392 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6394 (GRUB_MOD_ALIGN): ...this. Update all users.
6396 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6397 grub_host_to_target32.
6398 Replace grub_be_to_cpu32 with grub_target_to_host32.
6399 (load_modules): Likewise.
6400 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6401 Replace grub_be_to_cpu32 with grub_target_to_host32.
6402 Replace grub_cpu_to_be16 with grub_host_to_target16.
6403 Replace grub_cpu_to_be32 grub_host_to_target32.
6405 2007-10-12 Robert Millan <rmh@aybabtu.com>
6407 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6408 * util/elf/grub-mkimage.c: ... here.
6410 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6411 `util/powerpc/ieee1275/grub-mkimage.c'.
6413 2007-10-07 Robert Millan <rmh@aybabtu.com>
6415 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6416 and make it easier to figure out.
6417 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6418 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6419 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6420 leave us with less than HEAP_MIN_SIZE total heap.
6421 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
6423 2007-10-03 Robert Millan <rmh@aybabtu.com>
6425 * include/grub/i386/io.h: New file.
6426 * commands/i386/pc/play.c (inb): Removed.
6428 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6430 * term/i386/pc/serial.c (inb): Removed.
6432 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6434 * term/i386/pc/vga.c (inb): Removed.
6436 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6439 2007-10-02 Robert Millan <rmh@aybabtu.com>
6441 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6442 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6443 Reported by Marcin Kurek.
6445 2007-09-07 Robert Millan <rmh@aybabtu.com>
6447 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6448 SmartFirmware version updates (as released by Sven Luther), and avoid
6449 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6450 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6453 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6456 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6457 when merging two regions.
6459 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6461 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6462 * normal/completion.c (grub_normal_do_completion): Likewise.
6463 Reported by Hitoshi Ozeki.
6465 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6467 Do not use devices at boot in chainloading.
6469 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6470 (boot_part_addr): Likewise.
6471 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6472 with BOOT_DRIVE and BOOT_PART_ADDR.
6473 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6474 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6476 2007-08-29 Robert Millan <rmh@aybabtu.com>
6478 Patch from Simon Peter <dn.tlp@gmx.net>:
6479 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6480 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6481 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6482 util/i386/pc/grub-setup.c_DEPENDENCIES.
6483 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6484 util/grub-probe.c_DEPENDENCIES.
6485 * conf/powerpc-ieee1275.rmk: Likewise.
6487 2007-08-28 Robert Millan <rmh@aybabtu.com>
6489 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6490 to tell grub-mkdevicemap how to name devices.
6491 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6494 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6495 util/i386/get_disk_name.c.
6496 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6497 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6498 util/ieee1275/get_disk_name.c.
6500 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6502 * DISTLIST: Add util/i386/get_disk_name.c and
6503 util/ieee1275/get_disk_name.c.
6505 * util/grub-mkdevicemap.c: Replace device naming logic with
6506 grub_util_get_disk_name() calls.
6508 2007-08-20 Robert Millan <rmh@aybabtu.com>
6510 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6511 (so that it works for both plural and singular quantities).
6513 2007-08-05 Robert Millan <rmh@aybabtu.com>
6515 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6516 so that [xz] isn't taken into account when determining order.
6518 2007-08-02 Marco Gerards <marco@gnu.org>
6520 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6521 `include/multiboot2.h', `include/grub/elfload.h',
6522 `include/multiboot.h', `include/grub/multiboot.h',
6523 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6524 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6525 `kern/elf.c', `loader/multiboot_loader.c',
6526 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6527 `loader/i386/pc/multiboot2.c',
6528 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6529 `util/i386/pc/grub-mkrescue.in'. Remove
6530 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
6531 `include/grub/i386/pc/util/biosdisk.h' and
6532 `include/grub/powerpc/ieee1275/multiboot.h'.
6534 2007-08-02 Bean <bean123ch@gmail.com>
6536 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6537 (ntfs_mod_SOURCES): New variable.
6538 (ntfs_mod_CFLAGS): Likewise.
6539 (ntfs_mod_LDFLAGS): Likewise.
6541 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6542 (grub_probe_SOURCES): Likewise.
6543 (grub_emu_SOURCES): Likewise.
6545 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6546 (grub_emu_SOURCES): Likewise.
6548 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6549 (grub_emu_SOURCES): Likewise.
6551 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6553 * fs/ntfs.c: New file.
6555 2007-08-02 Bean <bean123ch@gmail.com>
6557 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6559 * file.h (grub_file): Likewise.
6561 * fshelp.h (grub_fshelp_read_file): Likewise.
6563 * util/i386/pc/grub-setup.c (setup): Likewise.
6564 (save_first_sector): Likewise.
6565 (save_blocklists): Likewise.
6567 * fs/affs.c (grub_affs_read_file): Likewise.
6569 * fs/ext2.c (grub_ext2_read_file): Likewise.
6571 * fs/fat.c (grub_fat_read_data): Likewise.
6573 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6575 * fs/hfs.c (grub_hfs_read_file): Likewise.
6577 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6579 * fs/jfs.c (grub_jfs_read_file): Likewise.
6581 * fs/minix.c (grub_minix_read_file): Likewise.
6583 * fs/sfs.c (grub_sfs_read_file): Likewise.
6585 * fs/ufs.c (grub_ufs_read_file): Likewise.
6587 * fs/xfs.c (grub_xfs_read_file): Likewise.
6589 * command/blocklist.c (read_blocklist): Likewise.
6590 (print_blocklist): Likewise.
6592 2007-08-02 Marco Gerards <marco@gnu.org>
6594 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6597 * disk/host.c: New file.
6599 * util/hostfs.c: Likewise.
6601 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6602 return `GRUB_ERR_BAD_FS'.
6603 * fs/sfs.c (grub_sfs_mount): Likewise.
6604 * fs/xfs.c (grub_xfs_mount): Likewise.
6606 * include/grub/disk.h (enum grub_disk_dev_id): Add
6607 `GRUB_DISK_DEVICE_HOST_ID'.
6609 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6611 2007-07-24 Jerone Young <jerone@gmail.com>
6613 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6614 modules for compilation.
6615 * conf/powerpc-ieee1275.rmk: Likewise.
6617 * include/multiboot.h: Move multiboot definitions to one file. Rename
6618 many definitions to not get grub specific.
6619 * include/multiboot2.h: Create header with multiboot 2 definitions.
6620 * include/grub/multiboot.h: Header for grub specific function
6621 prototypes and definitions.
6622 * include/grub/multiboot2.h: Likewise.
6623 * include/grub/multiboot_loader.h: Likewise.
6624 * include/grub/i386/pc/multiboot.h: Removed.
6625 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6627 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6628 and 2 to allow for one multiboot and module commands.
6629 * loader/multiboot2.c: Add multiboot2 functionality.
6630 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6631 and definition names.
6632 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6634 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6635 ieee1275 specific multiboot2 code.
6637 * kern/i386/pc/startup.S: Change headers and definition names for
6638 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6640 2007-07-22 Robert Millan <rmh@aybabtu.com>
6642 * geninitheader.sh: Process file specified in first parameter rather
6643 than hardcoding grub_modules_init.lst.
6644 * geninit.sh: Likewise. Also, construct header name dynamically rather
6645 than hardcoding grub_modules_init.h.
6647 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6648 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6649 grub_probe_init.[ch] and grub_setup_init.[ch].
6651 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6652 grub_modules_init.h with grub_emu_init.h.
6653 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6654 grub_probe_init.[ch] files.
6655 * conf/i386-efi.rmk: Likewise.
6656 * conf/i386-pc.rmk: Likewise.
6657 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6658 grub_setup_init.[ch] files.
6660 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6661 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6662 to initialize modules rather than a list of hardcoded functions.
6663 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6664 grub_init_all() to initialize modules rather than a list of hardcoded
6667 2007-07-22 Robert Millan <rmh@aybabtu.com>
6669 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6670 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6672 2007-07-22 Robert Millan <rmh@aybabtu.com>
6674 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6675 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6676 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6677 flag when running on SmartFirmware.
6678 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6679 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6682 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6683 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6684 rather than decreasing it.
6686 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6687 there's not enough space to do it, fail in the same way as when it
6688 can't be done because there are no partitions.
6690 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6691 when nvsetenv failed.
6693 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6695 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6696 because this rule is automatically generated.
6697 (grub-mkrescue): Removed for the same reason as above.
6699 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6701 Migrate to GNU General Public License Version 3.
6703 * COPYING: Replaced with the plain text version of GPLv3.
6705 * config.guess: Updated from gnulib.
6706 * config.sub: Likewise.
6708 * geninit.sh: Output a GPLv3 copyright notice.
6709 * geninitheader.sh: Likewise.
6710 * genmodsrc.sh: Likewise.
6711 * gensymlist.sh.in: Likewise.
6713 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6714 * boot/i386/pc/diskboot.S: Likewise.
6715 * boot/i386/pc/pxeboot.S: Likewise.
6716 * commands/blocklist.c: Likewise.
6717 * commands/boot.c: Likewise.
6718 * commands/cat.c: Likewise.
6719 * commands/cmp.c: Likewise.
6720 * commands/configfile.c: Likewise.
6721 * commands/echo.c: Likewise.
6722 * commands/help.c: Likewise.
6723 * commands/ls.c: Likewise.
6724 * commands/search.c: Likewise.
6725 * commands/terminal.c: Likewise.
6726 * commands/test.c: Likewise.
6727 * commands/videotest.c: Likewise.
6728 * commands/i386/cpuid.c: Likewise.
6729 * commands/i386/pc/halt.c: Likewise.
6730 * commands/i386/pc/play.c: Likewise.
6731 * commands/i386/pc/reboot.c: Likewise.
6732 * commands/i386/pc/vbeinfo.c: Likewise.
6733 * commands/i386/pc/vbetest.c: Likewise.
6734 * commands/ieee1275/halt.c: Likewise.
6735 * commands/ieee1275/reboot.c: Likewise.
6736 * commands/ieee1275/suspend.c: Likewise.
6737 * disk/loopback.c: Likewise.
6738 * disk/lvm.c: Likewise.
6739 * disk/raid.c: Likewise.
6740 * disk/efi/efidisk.c: Likewise.
6741 * disk/i386/pc/biosdisk.c: Likewise.
6742 * disk/ieee1275/ofdisk.c: Likewise.
6743 * font/manager.c: Likewise.
6744 * fs/affs.c: Likewise.
6745 * fs/ext2.c: Likewise.
6746 * fs/fat.c: Likewise.
6747 * fs/fshelp.c: Likewise.
6748 * fs/hfs.c: Likewise.
6749 * fs/hfsplus.c: Likewise.
6750 * fs/iso9660.c: Likewise.
6751 * fs/jfs.c: Likewise.
6752 * fs/minix.c: Likewise.
6753 * fs/sfs.c: Likewise.
6754 * fs/ufs.c: Likewise.
6755 * fs/xfs.c: Likewise.
6756 * hello/hello.c: Likewise.
6757 * include/grub/acorn_filecore.h: Likewise.
6758 * include/grub/arg.h: Likewise.
6759 * include/grub/bitmap.h: Likewise.
6760 * include/grub/boot.h: Likewise.
6761 * include/grub/cache.h: Likewise.
6762 * include/grub/device.h: Likewise.
6763 * include/grub/disk.h: Likewise.
6764 * include/grub/dl.h: Likewise.
6765 * include/grub/elfload.h: Likewise.
6766 * include/grub/env.h: Likewise.
6767 * include/grub/err.h: Likewise.
6768 * include/grub/file.h: Likewise.
6769 * include/grub/font.h: Likewise.
6770 * include/grub/fs.h: Likewise.
6771 * include/grub/fshelp.h: Likewise.
6772 * include/grub/gzio.h: Likewise.
6773 * include/grub/hfs.h: Likewise.
6774 * include/grub/kernel.h: Likewise.
6775 * include/grub/loader.h: Likewise.
6776 * include/grub/lvm.h: Likewise.
6777 * include/grub/misc.h: Likewise.
6778 * include/grub/mm.h: Likewise.
6779 * include/grub/net.h: Likewise.
6780 * include/grub/normal.h: Likewise.
6781 * include/grub/parser.h: Likewise.
6782 * include/grub/partition.h: Likewise.
6783 * include/grub/pc_partition.h: Likewise.
6784 * include/grub/raid.h: Likewise.
6785 * include/grub/rescue.h: Likewise.
6786 * include/grub/script.h: Likewise.
6787 * include/grub/setjmp.h: Likewise.
6788 * include/grub/symbol.h: Likewise.
6789 * include/grub/term.h: Likewise.
6790 * include/grub/terminfo.h: Likewise.
6791 * include/grub/tparm.h: Likewise.
6792 * include/grub/types.h: Likewise.
6793 * include/grub/video.h: Likewise.
6794 * include/grub/efi/api.h: Likewise.
6795 * include/grub/efi/chainloader.h: Likewise.
6796 * include/grub/efi/console.h: Likewise.
6797 * include/grub/efi/console_control.h: Likewise.
6798 * include/grub/efi/disk.h: Likewise.
6799 * include/grub/efi/efi.h: Likewise.
6800 * include/grub/efi/pe32.h: Likewise.
6801 * include/grub/efi/time.h: Likewise.
6802 * include/grub/i386/linux.h: Likewise.
6803 * include/grub/i386/setjmp.h: Likewise.
6804 * include/grub/i386/types.h: Likewise.
6805 * include/grub/i386/efi/kernel.h: Likewise.
6806 * include/grub/i386/efi/loader.h: Likewise.
6807 * include/grub/i386/efi/time.h: Likewise.
6808 * include/grub/i386/pc/biosdisk.h: Likewise.
6809 * include/grub/i386/pc/boot.h: Likewise.
6810 * include/grub/i386/pc/chainloader.h: Likewise.
6811 * include/grub/i386/pc/console.h: Likewise.
6812 * include/grub/i386/pc/init.h: Likewise.
6813 * include/grub/i386/pc/kernel.h: Likewise.
6814 * include/grub/i386/pc/loader.h: Likewise.
6815 * include/grub/i386/pc/memory.h: Likewise.
6816 * include/grub/i386/pc/multiboot.h: Likewise.
6817 * include/grub/i386/pc/serial.h: Likewise.
6818 * include/grub/i386/pc/time.h: Likewise.
6819 * include/grub/i386/pc/vbe.h: Likewise.
6820 * include/grub/i386/pc/vbeblit.h: Likewise.
6821 * include/grub/i386/pc/vbefill.h: Likewise.
6822 * include/grub/i386/pc/vbeutil.h: Likewise.
6823 * include/grub/i386/pc/vga.h: Likewise.
6824 * include/grub/ieee1275/ieee1275.h: Likewise.
6825 * include/grub/ieee1275/ofdisk.h: Likewise.
6826 * include/grub/powerpc/libgcc.h: Likewise.
6827 * include/grub/powerpc/setjmp.h: Likewise.
6828 * include/grub/powerpc/types.h: Likewise.
6829 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6830 * include/grub/powerpc/ieee1275/console.h: Likewise.
6831 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6832 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6833 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6834 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6835 * include/grub/powerpc/ieee1275/time.h: Likewise.
6836 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6837 * include/grub/sparc64/libgcc.h: Likewise.
6838 * include/grub/sparc64/setjmp.h: Likewise.
6839 * include/grub/sparc64/types.h: Likewise.
6840 * include/grub/sparc64/ieee1275/console.h: Likewise.
6841 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6842 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6843 * include/grub/sparc64/ieee1275/time.h: Likewise.
6844 * include/grub/util/biosdisk.h: Likewise.
6845 * include/grub/util/getroot.h: Likewise.
6846 * include/grub/util/lvm.h: Likewise.
6847 * include/grub/util/misc.h: Likewise.
6848 * include/grub/util/raid.h: Likewise.
6849 * include/grub/util/resolve.h: Likewise.
6850 * io/gzio.c: Likewise.
6851 * kern/device.c: Likewise.
6852 * kern/disk.c: Likewise.
6853 * kern/dl.c: Likewise.
6854 * kern/elf.c: Likewise.
6855 * kern/env.c: Likewise.
6856 * kern/err.c: Likewise.
6857 * kern/file.c: Likewise.
6858 * kern/fs.c: Likewise.
6859 * kern/loader.c: Likewise.
6860 * kern/main.c: Likewise.
6861 * kern/misc.c: Likewise.
6862 * kern/mm.c: Likewise.
6863 * kern/parser.c: Likewise.
6864 * kern/partition.c: Likewise.
6865 * kern/rescue.c: Likewise.
6866 * kern/term.c: Likewise.
6867 * kern/efi/efi.c: Likewise.
6868 * kern/efi/init.c: Likewise.
6869 * kern/efi/mm.c: Likewise.
6870 * kern/i386/dl.c: Likewise.
6871 * kern/i386/efi/init.c: Likewise.
6872 * kern/i386/efi/startup.S: Likewise.
6873 * kern/i386/pc/init.c: Likewise.
6874 * kern/i386/pc/lzo1x.S: Likewise.
6875 * kern/i386/pc/startup.S: Likewise.
6876 * kern/ieee1275/ieee1275.c: Likewise.
6877 * kern/powerpc/cache.S: Likewise.
6878 * kern/powerpc/dl.c: Likewise.
6879 * kern/powerpc/ieee1275/cmain.c: Likewise.
6880 * kern/powerpc/ieee1275/crt0.S: Likewise.
6881 * kern/powerpc/ieee1275/init.c: Likewise.
6882 * kern/powerpc/ieee1275/openfw.c: Likewise.
6883 * kern/sparc64/cache.S: Likewise.
6884 * kern/sparc64/dl.c: Likewise.
6885 * kern/sparc64/ieee1275/init.c: Likewise.
6886 * kern/sparc64/ieee1275/openfw.c: Likewise.
6887 * loader/efi/chainloader.c: Likewise.
6888 * loader/efi/chainloader_normal.c: Likewise.
6889 * loader/i386/efi/linux.c: Likewise.
6890 * loader/i386/efi/linux_normal.c: Likewise.
6891 * loader/i386/pc/chainloader.c: Likewise.
6892 * loader/i386/pc/chainloader_normal.c: Likewise.
6893 * loader/i386/pc/linux.c: Likewise.
6894 * loader/i386/pc/linux_normal.c: Likewise.
6895 * loader/i386/pc/multiboot.c: Likewise.
6896 * loader/i386/pc/multiboot_normal.c: Likewise.
6897 * loader/powerpc/ieee1275/linux.c: Likewise.
6898 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6899 * normal/arg.c: Likewise.
6900 * normal/cmdline.c: Likewise.
6901 * normal/command.c: Likewise.
6902 * normal/completion.c: Likewise.
6903 * normal/execute.c: Likewise.
6904 * normal/function.c: Likewise.
6905 * normal/lexer.c: Likewise.
6906 * normal/main.c: Likewise.
6907 * normal/menu.c: Likewise.
6908 * normal/menu_entry.c: Likewise.
6909 * normal/misc.c: Likewise.
6910 * normal/parser.y: Likewise.
6911 * normal/script.c: Likewise.
6912 * normal/i386/setjmp.S: Likewise.
6913 * normal/powerpc/setjmp.S: Likewise.
6914 * normal/sparc64/setjmp.S: Likewise.
6915 * partmap/acorn.c: Likewise.
6916 * partmap/amiga.c: Likewise.
6917 * partmap/apple.c: Likewise.
6918 * partmap/gpt.c: Likewise.
6919 * partmap/pc.c: Likewise.
6920 * partmap/sun.c: Likewise.
6921 * term/gfxterm.c: Likewise.
6922 * term/terminfo.c: Likewise.
6923 * term/efi/console.c: Likewise.
6924 * term/i386/pc/console.c: Likewise.
6925 * term/i386/pc/serial.c: Likewise.
6926 * term/i386/pc/vesafb.c: Likewise.
6927 * term/i386/pc/vga.c: Likewise.
6928 * term/ieee1275/ofconsole.c: Likewise.
6929 * util/biosdisk.c: Likewise.
6930 * util/console.c: Likewise.
6931 * util/genmoddep.c: Likewise.
6932 * util/getroot.c: Likewise.
6933 * util/grub-emu.c: Likewise.
6934 * util/grub-mkdevicemap.c: Likewise.
6935 * util/grub-probe.c: Likewise.
6936 * util/lvm.c: Likewise.
6937 * util/misc.c: Likewise.
6938 * util/raid.c: Likewise.
6939 * util/resolve.c: Likewise.
6940 * util/update-grub.in: Likewise.
6941 * util/update-grub_lib.in: Likewise.
6942 * util/grub.d/00_header.in: Likewise.
6943 * util/grub.d/10_hurd.in: Likewise.
6944 * util/grub.d/10_linux.in: Likewise.
6945 * util/i386/efi/grub-install.in: Likewise.
6946 * util/i386/efi/grub-mkimage.c: Likewise.
6947 * util/i386/pc/grub-install.in: Likewise.
6948 * util/i386/pc/grub-mkimage.c: Likewise.
6949 * util/i386/pc/grub-mkrescue.in: Likewise.
6950 * util/i386/pc/grub-setup.c: Likewise.
6951 * util/i386/pc/misc.c: Likewise.
6952 * util/powerpc/ieee1275/grub-install.in: Likewise.
6953 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6954 * util/powerpc/ieee1275/misc.c: Likewise.
6955 * video/bitmap.c: Likewise.
6956 * video/video.c: Likewise.
6957 * video/i386/pc/vbe.c: Likewise.
6958 * video/i386/pc/vbeblit.c: Likewise.
6959 * video/i386/pc/vbefill.c: Likewise.
6960 * video/i386/pc/vbeutil.c: Likewise.
6961 * video/readers/tga.c: Likewise.
6963 2007-07-02 Robert Millan <rmh@aybabtu.com>
6965 * conf/i386-efi.rmk: Replace obsolete reference to
6966 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6967 with util/getroot.c.
6968 * conf/powerpc-ieee1275.rmk: Likewise.
6969 * conf/sparc64-ieee1275.rmk: Likewise.
6971 * util/grub-emu.c (main): Fix unchecked pointer handling.
6973 2007-07-02 Robert Millan <rmh@aybabtu.com>
6975 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6976 invocation to fail, in order to support partition-less media.
6978 * util/i386/pc/grub-install.in: Likewise.
6980 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6981 which fs or partmap modules are needed (akin to its sister scripts).
6983 Also use grub-probe to get rid of unportable /proc/mounts check.
6985 Print the same informational message that the other scripts do, before
6988 2007-06-23 Robert Millan <rmh@aybabtu.com>
6990 * util/update-grub_lib.in (font_path): New function. Determine whether
6991 a font file can be found and, if so, echo the GRUB path to it.
6993 * util/update-grub.in: Handle multiple terminals depending on user
6994 input, platform availability and font file presence. Propagate
6995 variables of our findings to /etc/grub.d/ children.
6997 * util/grub.d/00_header.in: Handle multiple terminals, based on
6998 environment setup by update-grub.
7000 2007-06-23 Robert Millan <rmh@aybabtu.com>
7002 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
7004 2007-06-21 Robert Millan <rmh@aybabtu.com>
7006 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7007 indicate end of data section in kernel image.
7008 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7009 GRUB_KERNEL_MACHINE_DATA_END.
7011 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7013 * kern/i386/efi/startup.S: Likewise.
7015 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7016 during image generation. Implement --prefix option to override this
7018 * util/i386/efi/grub-mkimage.c: Likewise.
7020 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7021 code to make path relative to its root into a separate function.
7023 * util/i386/pc/grub-install.in: Use newly provided
7024 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7025 pass the result to grub-install --prefix.
7027 2007-06-13 Robert Millan <rmh@aybabtu.com>
7029 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7031 * util/grub-emu.c: Use above definitions from misc.h instead of
7033 * util/grub-mkdevicemap.c: Likewise.
7034 * util/i386/pc/grub-setup.c: Likewise.
7035 * util/grub-probe.c: Likewise.
7036 (probe): Abort with grub_util_error() when either
7037 grub_guess_root_device or grub_util_get_grub_dev fails.
7039 2007-06-12 Robert Millan <rmh@aybabtu.com>
7041 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7043 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7045 * util/grub-probe.c (probe): Likewise for "drive_name".
7047 2007-06-11 Robert Millan <rmh@aybabtu.com>
7049 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7050 not just the cdrom one.
7052 2007-06-11 Robert Millan <rmh@aybabtu.com>
7054 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7055 Add --pkglibdir=DIR option to override pkglibdir.
7056 Mention --image-type=TYPE in help output.
7057 Fix --grub-mkimage (it was a no-op).
7058 Abort gracefully when no parameter is given.
7060 2007-06-11 Robert Millan <rmh@aybabtu.com>
7062 * util/i386/pc/grub-mkrescue.in: New file.
7063 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7064 * Makefile.in: Handle bin_SCRIPTS.
7066 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7068 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7069 list of video modes.
7071 2007-06-06 Robert Millan <rmh@aybabtu.com>
7073 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7074 file doesn't exist, or if it is in a filesystem grub can't read.
7076 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7077 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7078 header comment to fit in 80 columns when the variables are resolved.
7080 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7081 could be identified by update-grub. Remove redundant check for
7082 unifont.pff existence (since convert_system_path_to_grub_path now
7085 2007-06-04 Robert Millan <rmh@aybabtu.com>
7087 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7089 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7091 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7093 2007-06-04 Robert Millan <rmh@aybabtu.com>
7095 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7097 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7098 grub_apple_partition_map_fini.
7101 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7102 to access >2 TiB disks).
7104 Print disk->total_sectors with %llu instead of %lu, since this
7105 variable is always 64-bit (prevents wrong disk size from being displayed
7106 on either >2 TiB disk or big-endian CPU).
7108 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7109 into a generic case that supports all (sane) partition maps.
7111 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7114 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7115 and grub_apple_partition_map_fini() after that.
7117 2007-06-01 Robert Millan <rmh@aybabtu.com>
7119 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7121 * util/grub.d/00_header.in: Only enable gfxterm when
7122 convert_system_path_to_grub_path() succeeds.
7124 2007-05-20 Robert Millan <rmh@aybabtu.com>
7126 * util/update-grub_lib.in: New file.
7127 * DISTLIST: Add update-grub_lib.in.
7128 * conf/common.rmk: Generate update-grub_lib and install it in
7130 * Makefile.in: Add install routine for $(lib_DATA).
7132 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7133 function provided by update-grub_lib to support arbitrary paths of
7135 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7136 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7138 2007-05-19 Robert Millan <rmh@aybabtu.com>
7140 * commands/i386/cpuid.c: New module.
7142 * conf/i386-efi.rmk: Enable cpuid.mod.
7143 * conf/i386-pc.rmk: Likewise.
7145 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7147 * kern/disk.c (grub_disk_read): Check return value of
7150 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7152 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7154 * disk/raid.c (grub_raid_open): Likewise.
7156 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7158 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7159 stack instead of on the heap.
7161 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7162 before doing a read on it.
7164 * configure.ac: Only use -fno-stack-protector for the target
7167 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7169 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7170 __attribute_ ((unused)) to mode_type argument.
7172 * util/getroot.c (grub_guess_root_device): Fix #endif.
7174 * kern/misc.c (memcmp): Fix prototype.
7176 * include/grub/partition.h [GRUB_UTIL]
7177 (grub_gpt_partition_map_init): Add prototype.
7178 (grub_gpt_partition_map_fini): Likewise.
7180 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7183 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7184 (grub_fat_read_data): Likewise.
7185 (grub_fat_find_dir): Likewise.
7187 * font/manager.c (find_glyph): Make table a const.
7188 (grub_font_get_glyph): Remove bitmap from if statement.
7190 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7192 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7193 code, first search for device in /dev/mapper, then in /dev.
7194 (grub_util_get_grub_dev): New function.
7195 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7197 * util/grub-probe.c (probe): Remove check for RAID, call
7198 grub_util_get_grub_dev() instead of
7199 grub_util_biosdisk_get_grub_dev().
7200 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7201 grub_util_biosdisk_get_grub_dev().
7202 * util/i386/pc/grub-setup.c (main): Likewise.
7204 2007-05-16 Robert Millan <rmh@aybabtu.com>
7206 * DISTLIST: Update for the latest changes.
7207 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7208 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7209 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7210 grub/util/biosdisk.h.
7211 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7212 grub/util/biosdisk.h.
7214 2007-05-16 Robert Millan <rmh@aybabtu.com>
7216 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7218 2007-05-16 Robert Millan <rmh@aybabtu.com>
7220 * util/i386/efi/grub-install.in: New.
7221 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7222 newly added grub-install.
7223 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7225 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7226 grub/util/biosdisk.h.
7227 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7228 grub/util/biosdisk.h.
7230 2007-05-16 Robert Millan <rmh@aybabtu.com>
7232 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7233 * include/grub/util/biosdisk.h: ... here.
7234 * util/i386/pc/biosdisk.c: Moved to ...
7235 * util/biosdisk.c: ... here.
7236 * util/i386/pc/getroot.c: Moved to ...
7237 * util/getroot.c: ... here.
7238 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7239 * util/grub-mkdevicemap.c: ... here.
7240 * util/i386/pc/grub-probe.c: Moved to ...
7241 * util/grub-probe.c: ... here.
7243 2007-05-15 Robert Millan <rmh@aybabtu.com>
7245 * util/update-grub.in: Remove duplicated line in grub.cfg header
7248 2007-05-13 Robert Millan <rmh@aybabtu.com>
7250 * util/update-grub.in: Fix a few assumptions about the devices holding
7251 /, /boot and /boot/grub being the same.
7252 * util/grub.d/00_header.in: Likewise.
7253 * util/grub.d/10_hurd.in: Likewise.
7254 * util/grub.d/10_linux.in: Likewise.
7256 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7257 patterns. Use that to define the `.old' suffix as older than `'.
7259 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7261 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7262 the grub.cfg header message.
7264 2007-05-11 Robert Millan <rmh@aybabtu.com>
7266 * util/update-grub.in: Create device.map if it doesn't already exist,
7267 before attempting to run grub-probe.
7268 Check for grub-probe and grub-mkdevicemap with the same code
7269 grub-install is using.
7272 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7274 * Makefile.in: Add the datarootdir autoconf variable.
7276 2007-05-09 Robert Millan <rmh@aybabtu.com>
7278 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
7279 fail gracefully if dev->disk->partition == NULL.
7281 2007-05-07 Robert Millan <rmh@aybabtu.com>
7283 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7284 determine partition map module.
7285 * util/i386/pc/grub-install.in: Use this feature to decide which
7286 partition module to load, instead of hardcoding pc and gpt.
7288 2007-05-07 Robert Millan <rmh@aybabtu.com>
7290 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7291 source directory differs from build directory.
7293 2007-05-05 Robert Millan <rmh@aybabtu.com>
7295 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7298 2007-05-05 Robert Millan <rmh@aybabtu.com>
7300 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7302 2007-05-05 Robert Millan <rmh@aybabtu.com>
7304 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7305 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7307 2007-05-05 Robert Millan <rmh@aybabtu.com>
7309 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7310 (grub_probe_SOURCES): Likewise.
7311 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7312 GPT and initialize dos_part and bsd_part accordingly.
7313 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7315 (main): Activate gpt module for use during partition identification,
7316 and deactivate it afterwards.
7317 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7318 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7319 partition identification, and deactivate it afterwards.
7321 2007-05-05 Robert Millan <rmh@aybabtu.com>
7323 * term/i386/pc/console.c (grub_console_fini): Call
7324 grub_term_set_current() before grub_term_unregister().
7326 2007-05-04 Robert Millan <rmh@aybabtu.com>
7328 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7329 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7330 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7331 and update-grub_DATA.
7332 * conf/common.rmk: Build and install update-grub components.
7333 * conf/common.mk: Regenerate.
7334 * util/update-grub.in: New. Core of update-grub.
7335 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7336 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7337 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7338 * util/grub.d/README: New. Document grub.d directory layout.
7340 2007-05-01 Robert Millan <rmh@aybabtu.com>
7342 * util/grub-emu.c: Move initialization functions
7343 grub_util_biosdisk_init() and grub_init_all() before
7344 grub_util_biosdisk_get_grub_dev(), which relies on them.
7346 2007-04-19 Robert Millan <rmh@aybabtu.com>
7348 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7351 2007-04-18 Jerone Young <jerone@gmail.com>
7353 * kernel/elf.c: Add missing parenthesis for conditional statement
7356 2007-04-10 Jerone Young <jerone@gmail.com>
7358 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7359 continue on and look for device node with real device name.
7361 2007-04-10 Jerone Young <jerone@gmail.com>
7363 * configure.ac: Add argument for autoconf to use transformation
7365 * Makefile.in: Add autoconf package transformation code.
7366 * util/i386/pc/grub-install.in: Likewise.
7367 * util/powerpc/ieee1275/grub-install.in: Likewise.
7369 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7371 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7372 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7373 (EXT2_REVISION): Likewise.
7374 (EXT2_INODE_SIZE): Likewise.
7375 (struct grub_ext2_block_group): Added a missing member
7377 (grub_ext2_read_inode): Divide by the inode size in a superblock
7378 instead of 128 to obtain INODES_PER_BLOCK.
7379 Use the macro EXT2_INODE_SIZE instead of directly using
7382 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7384 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7385 superblock instead of the structure size to compute an
7386 offset. This fixes the problem that GRUB could not read a
7387 filesystem when inode size is different from 128-byte.
7389 2007-03-05 Marco Gerards <marco@gnu.org>
7391 * normal/main.c (read_config_file): When "menu" is not set, create
7394 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7396 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7397 (HEAP_LIMIT): New macro.
7398 (grub_claim_heap): Claim memory up to `heaplimit'.
7400 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7402 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7403 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7405 (grub_arch_modules_addr): Return address after `_end'.
7406 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7407 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7408 (add_segments): Calculate `_end' from phdr size and location.
7409 (ALIGN_UP): Moved to ...
7410 * include/grub/misc.h: here.
7411 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7413 (GRUB_IEEE1275_MODULE_BASE): Removed.
7415 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7417 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7420 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7422 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7424 (grub_elf64_load_hook_t): Likewise.
7425 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7428 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7430 * kern/mm.c: Update copyright.
7431 (grub_mm_debug): Correct syntax error.
7432 (grub_mm_dump_free): New function.
7433 (grub_debug_free): Call `grub_free'.
7434 * include/grub/mm.h: Update copyright.
7435 (grub_mm_dump_free): Add declaration.
7437 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7439 * include/grub/ieee1275/ieee1275.h: Update copyright.
7440 * kern/powerpc/ieee1275/init.c: Likewise.
7441 * kern/powerpc/ieee1275/openfw.c: Likewise.
7443 * loader/powerpc/ieee1275/linux.c: Likewise.
7444 * include/grub/elfload.h: Likewise.
7445 * kern/elf.c: Likewise.
7446 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7448 (grub_elf64_load): Likewise.
7449 (grub_elf32_load_segment): Move to a nested function.
7450 (grub_elf64_load_segment): Likewise.
7452 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7454 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7456 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7457 (grub_heap_len): Likewise.
7458 (HEAP_SIZE): New macro.
7459 (grub_claim_heap): New function.
7460 (grub_machine_init): Don't claim heap directly. Call
7462 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7463 (grub_available_iterate): New function.
7465 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7467 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7468 * configure.ac: Use it for testing the HOST and TARGET compilers.
7470 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7472 * Makefile.in (enable_grub_emu): New variable.
7473 * configure.ac (--enable-grub-emu): New option.
7474 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7475 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7476 * conf/i386-pc.rmk: Likewise.
7477 * conf/powerpc-ieee1275.rmk: Likewise.
7478 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7480 2006-12-12 Marco Gerards <marco@gnu.org>
7482 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7484 * kern/env.c (grub_env_unset): Don't free the member `value' when
7485 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7488 * normal/main.c (current_menu): Removed.
7489 (free_menu): Unset the `menu' environment variable.
7490 (grub_normal_menu_addentry): Make use of the environment variable
7491 `menu', instead of using the global `current_menu'. Allocate
7492 memory for the sourcecode of this entry.
7493 (read_config_file): New argument `nested', changed all callers.
7494 Only in the case of a new context, initialize a new menu. Set the
7495 `menu' environment variable.
7496 (grub_normal_execute): Don't set and unset the environment
7497 variable `menu' here anymore. Only free the menu when leaving the
7500 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7503 2006-12-11 Marco Gerards <marco@gnu.org>
7505 * normal/menu_entry.c (run): Fix off by one bug so the last line
7506 is executed. Move the loader check to outside the loop.
7508 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7510 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7512 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7514 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7515 the number of sectors. Reported by Andrey Shuvikov
7516 <mr_hyro@yahoo.com>.
7518 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7520 * kern/disk.c (grub_disk_read): When there is a read error, always
7521 try to read only the necessary data.
7523 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7525 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7527 [GRUB_UTIL] (grub_raid_fini): Likewise.
7528 [GRUB_UTIL] (grub_lvm_init): Likewise.
7529 [GRUB_UTIL] (grub_lvm_fini): Likewise.
7530 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
7531 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
7532 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7533 and grub_raid_fini().
7535 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7537 * include/grub/types.h (__unused): Rename to UNUSED.
7538 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7539 (grub_elf64_size): Likewise.
7541 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7543 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7544 grub_error_push and grub_error_pop in the error-handling path.
7545 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7548 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7550 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7551 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7552 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7553 (kernel_elf_SOURCES): Likewise.
7554 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7555 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7556 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7557 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7558 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7559 (elf_mod_SOURCES): New variable.
7560 (elf_mod_CFLAGS): Likewise.
7561 (elf_mod_LDFLAGS): Likewise.
7562 * include/grub/types.h (__unused): New macro.
7563 * include/grub/elfload.h: New file.
7564 * kern/elf.c: Likewise.
7565 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7566 (ELF32_LOADMASK): New macro.
7567 (ELF64_LOADMASK): Likewise.
7569 (grub_linux_load32): New function.
7570 (grub_linux_load64): Likewise.
7571 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7572 Use grub_elf_t instead of grub_file_t.
7574 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7576 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7577 `catch_result' to struct set_color_args.
7579 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7581 * normal/menu.c: Include grub/script.h.
7582 * normal/menu_entry.c: Likewise.
7583 * include/grub/normal.h: Do not include grub/script.h.
7585 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7587 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7589 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7591 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7593 (grub_disk_close): Print debug messages when closing a disk.
7594 (grub_disk_read): Print debug messages when disk read fails.
7595 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7597 * kern/partition.c: Include misc.h.
7598 (grub_partition_iterate): Print debug messages when detecting
7601 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7603 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7605 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7607 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7609 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7610 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7612 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7614 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7615 instead of sizeof(lv). Patch by Michael Guntsche.
7617 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7619 * disk/lvm.c: Rename VGS to VG_LIST.
7620 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7621 (grub_lvm_open): Likewise.
7622 Thanks to Michael Guntsche for finding this bug.
7624 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7626 * configure.ac (AC_INIT): Bumped to 1.95.
7628 2006-10-14 Robert Millan <rmh@aybabtu.com>
7630 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7631 with "/dev/.static/dev/md".
7633 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7635 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7636 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7637 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7638 DRIVE_NAME are always freed.
7640 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7641 DOS_PART, as a DOS partition is counted from one instead of zero
7642 now. Reported by Robert Millan.
7644 2006-10-14 Robert Millan <rmh@aybabtu.com>
7646 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7647 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7648 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7649 string returned by grub_guess_root_device.
7650 * util/i386/pc/grub-setup.c: Likewise.
7651 * util/i386/pc/grub-probefs.c: Likewise.
7653 * util/i386/pc/grub-probefs.c: Rename to ...
7654 * util/i386/pc/grub-probe.c: ... this.
7655 * DISTLIST: Remove grub-probefs, add grub-probe.
7656 * conf/i386-efi.rmk: Likewise.
7657 * conf/i386-pc.rmk: Likewise.
7658 * util/i386/pc/grub-install.in: Likewise.
7660 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7661 choose which information we want to print.
7663 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7665 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7666 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7667 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7668 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7669 video/readers/tga.c and video/i386/pc/vbeutil.c.
7671 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7673 Added support for RAID and LVM.
7675 * disk/lvm.c: New file.
7676 * disk/raid.c: Likewise.
7677 * include/grub/lvm.h: Likewise.
7678 * include/grub/raid.h: Likewise.
7679 * include/grub/util/lvm.h: Likewise.
7680 * include/grub/util/raid.h: Likewise.
7681 * util/lvm.c: Likewise.
7682 * util/raid.c: Likewise.
7684 * include/grub/disk.h (grub_disk_dev_id): Add
7685 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7686 (grub_disk_get_size): New prototype.
7687 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7688 returns a partition.
7689 (grub_disk_get_size): New function.
7691 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7692 verbatim if grub_install_dos_part is -2.
7694 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7697 * util/i386/pc/grub-setup.c (setup): New argument
7698 MUST_EMBED. Force embedding of GRUB when the argument is
7699 true. Close FILE before returning.
7700 (main): Add support for RAID and LVM.
7702 * conf/common.rmk: Add RAID and LVM modules.
7703 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7705 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7707 * kern/misc.c (grub_strstr): New function.
7708 * include/grub/misc.h (grub_strstr): New prototype.
7710 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7712 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7714 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7716 * kern/misc.c (grub_strtoull): Guess the base only if not
7719 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7721 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7724 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7726 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7728 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7729 Remove `flags' argument. All callers changed.
7730 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7731 (IEEE1275_IHANDLE_INVALID): New variable.
7732 (IEEE1275_CELL_INVALID): New variable.
7733 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7734 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7735 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7736 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7737 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7738 codes from Open Firmware. All callers updated.
7739 (grub_ieee1275_next_property): Directly return Open Firmware return
7741 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7742 Standardize error checking from `grub_ieee1275_get_property'.
7743 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7744 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7746 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7748 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7749 `instance_to_package_args' to `instance_to_path_args'.
7751 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7752 `grub_ieee1275_chosen'.
7754 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7755 `grub_ieee1275_interpret'.
7757 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7759 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7761 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7763 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7764 (__cmpdi): Likewise.
7766 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7767 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7770 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7772 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7773 to type `grub_ssize_t'.
7774 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7776 2006-09-22 Marco Gerards <marco@gnu.org>
7778 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7781 2006-09-22 Marco Gerards <marco@gnu.org>
7783 * commands/echo.c: New file.
7785 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7787 * conf/common.rmk (echo_mod_SOURCES): New variable.
7788 (echo_mod_CFLAGS): Likewise.
7789 (echo_mod_LDFLAGS): Likewise.
7791 2006-09-22 Marco Gerards <marco@gnu.org>
7793 * normal/main.c (get_line): Malloc memory instead of using
7794 preallocated memory. Removed the arguments `cmdline' and
7795 `max_len'. Updated all callers.
7797 2006-09-22 Marco Gerards <marco@gnu.org>
7799 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7800 (normal_mod_DEPENDENCIES): Likewise.
7802 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7803 (normal_mod_DEPENDENCIES): Likewise.
7805 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7807 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
7809 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7811 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7812 (normal_mod_DEPENDENCIES): Likewise.
7813 * conf/i386-pc.mk: Regenerate.
7814 * conf/i386-efi.mk: Likewise
7815 * conf/common.mk: Likewise.
7816 * conf/powerpc-ieee1275.mk: Likewise.
7817 * conf/sparc64-ieee1275.mk: Likewise.
7819 2006-09-22 Robert Millan <rmh@aybabtu.com>
7821 Sync with i386 version.
7822 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7823 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7825 2006-09-21 Robert Millan <rmh@aybabtu.com>
7827 Import from GRUB Legacy (lib/device.c):
7828 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7829 (init_device_map) [__linux__]: Add support for I2O devices.
7831 2006-09-14 Marco Gerards <marco@gnu.org>
7833 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7836 2006-09-14 Robert Millan <rmh@aybabtu.com>
7838 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7841 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7843 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7844 before adding it to device.map.
7846 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
7848 * genmk.rb: Let GCC generate dependencies the first time it
7849 compiles a file; using the -MD option.
7850 * conf/common.mk: Regenerate.
7851 * conf/i386-pc.mk: Likewise.
7852 * conf/i386-efi.mk: Likewise.
7853 * conf/powerpc-ieee1275.mk: Likewise.
7854 * conf/sparc64-ieee1275.mk: Likewise.
7856 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7858 Move the prototypes of grub_setjmp and grub_longjmp to
7859 cpu/setjmp.h, so that each architecture may specify different
7862 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7863 (grub_longjmp): Likewise.
7864 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7865 (grub_longjmp): Likewise.
7866 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7867 (grub_longjmp): Likewise.
7869 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7870 [!GRUB_UTIL] (grub_longjmp): Removed.
7872 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7874 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7875 "color!" method does not return any value.
7877 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7879 * include/grub/bitmap.h: New file.
7881 * include/grub/i386/pc/vbeutil.h: Likewise.
7883 * video/bitmap.c: Likewise.
7885 * video/readers/tga.c: Likewise.
7887 * video/i386/pc/vbeutil.c: Likewise.
7889 * commands/videotest.c: Code cleanup and updated to reflect to new
7892 * term/gfxterm.c: Likewise.
7894 * video/video.c: Likewise.
7896 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7897 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7898 (bitmap_mod_SOURCES): New entry.
7899 (bitmap_mod_CFLAGS): Likewise.
7900 (bitmap_mod_LDFLAGS): Likewise.
7901 (tga_mod_SOURCES): Likewise.
7902 (tga_mod_CFLAGS): Likewise.
7903 (tga_mod_LDFLAGS): Likewise.
7905 * include/grub/video.h (grub_video_blit_operators): New enum type.
7906 (grub_video_render_target): Changed as forward declaration and moved
7907 actual definition to be video driver specific.
7908 (grub_video_adapter.blit_bitmap): Added blitting operator.
7909 (grub_video_adapter.blit_render_target): Likewise.
7910 (grub_video_blit_bitmap): Likewise.
7911 (grub_video_blit_render_target): Likewise.
7913 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7914 driver specific render target definition.
7915 (grub_video_vbe_map_rgba): Added driver internal helper.
7916 (grub_video_vbe_unmap_color): Updated to use
7917 grub_video_i386_vbeblit_info.
7918 (grub_video_vbe_get_video_ptr): Likewise.
7920 * include/grub/i386/pc/vbeblit.h
7921 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7922 grub_video_i386_vbeblit_info.
7923 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7924 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7925 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7926 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7927 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7928 (grub_video_i386_vbeblit_index_index): Likewise.
7929 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7930 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7931 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7932 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7934 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7937 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7938 include/grub/i386/pc/vbeblit.h.
7940 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7941 Updated to use grub_video_i386_vbeblit_info.
7942 (grub_video_i386_vbefill_R8G8B8): Likewise.
7943 (grub_video_i386_vbefill_index): Likewise.
7944 (grub_video_i386_vbefill): Added generic filler.
7946 * video/i386/pc/vbefill.c: Updated to reflect changes on
7947 include/grub/i386/pc/vbefill.h.
7949 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7950 grub_video_i386_vbeblit_info.
7951 (grub_video_vbe_unmap_color): Likewise.
7952 (grub_video_vbe_blit_glyph): Likewise.
7953 (grub_video_vbe_scroll): Likewise.
7954 (grub_video_vbe_draw_pixel): Removed function.
7955 (grub_video_vbe_get_pixel): Likewise.
7956 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7957 updated code to use it.
7958 (common_blitter): Added common blitter for render target and bitmap.
7959 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7960 (grub_video_vbe_blit_render_target): Likewise.
7962 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
7964 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7965 is in text mode if there is no console control protocol instance
7968 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7970 * include/grub/video.h: Code cleanup.
7972 * include/grub/i386/pc/vbe.h: Likewise.
7974 * video/i386/pc/vbe.c: Likewise.
7976 * video/i386/pc/vbeblit.c: Likewise.
7978 * video/i386/pc/vbefill.c: Likewise.
7980 * video/video.c: Likewise. Also added more comments.
7982 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7984 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7985 (struct grub_biosdisk_dap): Likewise.
7987 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7988 linkage settings for all functions.
7990 2006-07-12 Marco Gerards <marco@gnu.org>
7992 * configure.ac (--enable-mm-debug): Fix typo.
7994 * genkernsyms.sh.in: Use proper quoting for `CC'.
7996 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7998 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7999 (normal_mod_ASFLAGS): Remove "-m32".
8001 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8003 * util/misc.c: Include config.h.
8004 [!HAVE_MEMALIGN]: Do not include malloc.h.
8005 (grub_memalign): Use posix_memalign, if present. Then, use
8006 memalign, if present. Otherwise, emit an error.
8008 * util/grub-emu.c: Do not include malloc.h.
8010 * include/grub/util/misc.h: Include unistd.h. This is required for
8011 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8012 D. Eades III <hde@foobar-qux.org>.
8014 * configure.ac (AC_GNU_SOURCE): Added.
8015 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8018 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8020 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8021 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8023 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8025 * include/grub/types.h (grub_host_addr_t): Rename to
8027 (grub_host_off_t): Rename to grub_target_off_t.
8028 (grub_host_size_t): Rename to grub_target_size_t.
8029 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8030 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8032 * include/grub/kernel.h (struct grub_module_header): Change type
8033 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8034 (grub_module_info): Likewise.
8036 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8038 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8039 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8040 Velazquez <jesus.velazquez@gmail.com>.
8042 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8044 Count partitions from 1 instead of 0 in the string representation
8045 of partitions. Still use 0-based internally.
8047 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8048 (sun_partition_map_iterate): Use grub_partition_t instead of
8049 struct grub_partition *. Cast DESC->START_CYLINDER to
8050 grub_uint64_t after converting the endian.
8051 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8052 (sun_partition_map_get_name): Add 1 to P->INDEX.
8054 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8056 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8058 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8059 zero instead of one.
8060 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8061 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8063 * partmap/apple.c (apple_partition_map_iterate): Change the type
8065 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8066 (apple_partition_map_get_name): Add 1 into P->INDEX.
8068 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8070 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8071 calculate the offset of a partition.
8072 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8073 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8075 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8076 SECTOR to grub_disk_addr_t.
8077 (acorn_partition_map_iterate): Likewise.
8078 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8079 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8081 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8083 * kern/i386/pc/init.c (make_install_device): Add 1 into
8084 GRUB_INSTALL_DOS_PART.
8086 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8089 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8091 Clean up the code to support 64-bit addressing in disks and
8092 files. This change is not enough for filesystems yet.
8094 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8095 type of "start" to grub_uint64_t.
8096 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8097 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8098 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8101 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8102 to grub_disk_addr_t.
8104 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8107 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8109 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8112 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8114 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8116 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8118 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8119 to grub_off_t, to detect an error from grub_file_seek.
8120 (grub_multiboot_load_elf32): Likewise.
8122 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8123 maximum unsigned long value when an overflow is detected.
8124 (grub_strtoull): New function.
8125 (grub_divmod64): Likewise.
8126 (grub_lltoa): use grub_divmod64.
8128 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8130 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8131 the pointer to next character. Use grub_strtoull instead of
8133 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8134 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8137 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
8138 return value is signed.
8139 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8140 test if OFFSET is less than zero, as OFFSET is unsigned now.
8142 * kern/disk.c (struct grub_disk_cache): Change the type of
8143 "sector" to grub_disk_addr_t.
8144 (grub_disk_cache_get_index): Change the type of SECTOR to
8145 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8146 unsigned after shifting.
8147 (grub_disk_cache_invalidate): Change the type of SECTOR to
8149 (grub_disk_cache_unlock): Likewise.
8150 (grub_disk_cache_store): Likewise.
8151 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8152 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8153 grub_disk_addr_t and grub_uint64_t, respectively.
8154 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8155 body, as the value of OFFSET is tweaked by
8156 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8157 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8159 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8160 body, as the value of OFFSET is tweaked by
8161 grub_disk_check_range. Change the types of LEN and N to
8164 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8165 and "saved_offset" to grub_off_t.
8166 (test_header): Cast BUF to char *.
8167 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8169 (grub_gzio_read): Change the types of OFFSET and SIZE to
8170 grub_off_t and grub_size_t, respectively.
8172 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8174 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8175 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8176 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8177 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8178 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8180 * include/grub/types.h (grub_off_t): Unconditionally set to
8182 (grub_disk_addr_t): Changed to grub_uint64_t.
8184 * include/grub/partition.h (struct grub_partition): Change the
8185 types of "start", "len" and "offset" to grub_disk_addr_t,
8186 grub_uint64_t and grub_disk_addr_t, respectively.
8187 (grub_partition_get_start): Return grub_disk_addr_t.
8188 (grub_partition_get_len): Return grub_uint64_t.
8190 * include/grub/misc.h (grub_strtoull): New prototype.
8191 (grub_divmod64): Likewise.
8193 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8194 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8195 grub_off_t, respectively.
8196 All callers and references changed.
8198 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8199 grub_size_t in "read".
8200 All callers and references changed.
8202 * include/grub/file.h (struct grub_file): Change the types of
8203 "offset" and "size" to grub_off_t and grub_off_t,
8204 respectively. Change the type of SECTOR to grub_disk_addr_t in
8206 (grub_file_read): Change the type of LEN to grub_size_t.
8207 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8209 (grub_file_size): Return grub_off_t.
8210 (grub_file_tell): Likewise.
8211 All callers and references changed.
8213 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8214 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8216 (struct grub_disk): Change the type of "total_sectors" to
8217 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
8219 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8220 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8221 (grub_disk_write): Likewise.
8222 All callers and references changed.
8224 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8225 char * for grub_strncmp to silence gcc.
8226 (grub_iso9660_mount): Likewise.
8227 (grub_iso9660_mount): Likewise.
8228 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8230 (grub_iso9660_iterate_dir): Likewise.
8231 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8233 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8234 LEN to grub_disk_addr_t and grub_size_t, respectively.
8236 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8238 * fs/jfs.c (grub_jfs_read_file): Likewise.
8240 * fs/minix.c (grub_jfs_read_file): Likewise.
8242 * fs/sfs.c (grub_jfs_read_file): Likewise.
8244 * fs/ufs.c (grub_jfs_read_file): Likewise.
8246 * fs/xfs.c (grub_jfs_read_file): Likewise.
8248 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8249 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8252 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8253 BLKNR to -1 instead of returning GRUB_ERRNO.
8254 (grub_ext2_read_file): Change the types of SECTOR and
8255 LEN to grub_disk_addr_t and grub_size_t, respectively.
8257 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8258 LEN to grub_disk_addr_t and grub_size_t, respectively.
8260 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8263 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8264 string. Do not cast SECTOR explicitly.
8266 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8267 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8268 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8269 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8270 over 2TB and LBA mode is not supported, raise an error.
8271 (get_safe_sectors): New function.
8272 (grub_biosdisk_read): Use get_safe_sectors.
8273 (grub_biosdisk_write): Likewise.
8275 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8276 (grub_efidisk_write): Likewise.
8278 * disk/loopback.c (delete_loopback): Cosmetic changes.
8279 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8281 (grub_loopback_open): Likewise.
8282 (grub_loopback_read): Likewise. Also, change the type of POS to
8283 grub_off_t, and fix the usage of grub_memset.
8285 * commands/i386/pc/play.c: Include grub/machine/time.h.
8287 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8290 * commands/configfile.c: Include grub/env.h.
8292 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8293 GRUB_ERRNO directly instead. Change the type of POS to
8294 grub_off_t. Follow the coding standard.
8296 * commands/blocklist.c: Include grub/partition.h.
8297 (grub_cmd_blocklist): Return an error if the underlying device is
8298 not a disk. Take the starting sector of a partition into account,
8299 if a partition is used.
8301 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8303 (lba_mode): Support 64-bit addresses.
8304 (chs_mode): Likewise.
8305 (copy_buffer): Adapted to the new offsets of a length field and a
8307 (blocklist_default_start): Allocate 64-bit space.
8309 * boot/i386/pc/boot.S (force_lba): Removed.
8310 (boot_drive): Moved to under KERNEL_SECTOR.
8311 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
8313 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8315 (lba_mode): Refactored to support a 64-bit address. More size
8317 (setup_sectors): Likewise.
8319 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8321 * DISTLIST: Added include/grub/i386/linux.h. Removed
8322 include/grub/i386/pc/linux.h
8324 * configure.ac (AC_INIT): Bumped to 1.94.
8326 * config.guess: Updated from gnulib.
8327 * config.sub: Likewise.
8328 * install-sh: Likewise.
8329 * mkinstalldirs: Likewise.
8331 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8333 * conf/common.rmk (grub_modules_init.lst): Depended on
8334 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8337 * genmk.rb (PModule::rule): Reverted the previous change.
8339 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8341 * conf/common.rmk (grub_modules_init.lst): Depends on
8342 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8343 that the target does not exist before producing.
8344 (grub_modules_init.h): Remove the target before generating.
8345 (grub_emu_init.c): Likewise.
8347 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8349 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8351 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8352 for the target-specific tests. Make sure that we also have the
8353 up-to-date target variables for those tests.
8355 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8357 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8358 (PModule::rule): Likewise.
8360 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8362 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8363 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8364 target-specific flags should be prefixed.
8365 (PModule::rule): Likewise.
8367 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8369 * configure.ac (CMP): Check if cmp is available explicitly.
8371 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8373 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8374 (target_cpu): New variable.
8375 (pkglibdir): Use target_cpu instead of host_cpu.
8377 * util/i386/pc/grub-install.in (host_cpu): Removed.
8378 (target_cpu): New variable.
8379 (pkglibdir): Use target_cpu instead of host_cpu.
8381 * util/genmoddep.c: Removed.
8383 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8384 instead of GRUB_HOST_SIZEOF_VOID_P.
8385 * kern/dl.c: Likewise.
8387 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8389 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8390 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8391 (GRUB_TARGET_SIZEOF_LONG): ... this.
8392 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8393 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8394 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8396 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8397 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8398 (GRUB_TARGET_SIZEOF_LONG): ... this.
8399 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8400 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8401 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8403 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8404 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8405 (GRUB_TARGET_SIZEOF_LONG): ... this.
8406 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8407 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8409 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8410 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8411 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8412 instead of GRUB_HOST_SIZEOF_LONG.
8413 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8414 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8415 GRUB_CPU_WORDS_BIGENDIAN.
8416 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8417 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8420 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8421 (genmoddep_SOURCES): Likewise.
8422 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8423 (genmoddep_SOURCES): Likewise.
8424 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8425 (genmoddep_SOURCES): Likewise.
8426 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8428 (genmoddep_SOURCES): Likewise.
8430 * genmoddep.awk: New file.
8432 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8433 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8434 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8435 (PModule::rule): Likewise.
8436 (Program::rule): Likewise.
8437 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8438 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8441 * configure.ac: Rewritten intensively to use host and target
8442 instead of build and host, respectively.
8444 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8445 (host_cpu): Removed.
8446 (target_cpu): New variable.
8447 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8448 (BUILD_CC): Removed.
8449 (BUILD_CFLAGS): Likewise.
8450 (BUILD_CPPFLAGS): Likewise.
8451 (TARGET_CC): New variable.
8452 (TARGET_CFLAGS): Likewise.
8453 (TARGET_CPPFLAGS): Likewise.
8454 (TARGET_LDFLAGS): Likewise.
8456 (include): Use target_cpu instead of host_cpu.
8457 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
8459 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8461 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8463 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8464 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8465 field 'false' to 'exec_on_false'.
8466 (grub_script_create_cmdif): Renamed argument names to reflect above
8469 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8471 * normal/script.c (grub_script_create_cmdif): Likewise.
8473 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8475 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8477 (grub_hfsplus_btree_recptr): Likewise.
8478 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8479 FILEBLOCK both to pass a block number and store next block
8481 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8482 overflow file correctly. Specify errors appropriately, because
8483 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8484 grub_hfsplus_btree_recptr to get the pointer to a found key.
8485 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8488 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8490 (_linux_mod_SOURCES): New variable.
8491 (_linux_mod_CFLAGS): Likewise.
8492 (_linux_mod_LDFLAGS): Likewise.
8493 (linux_mod_SOURCES): Likewise.
8494 (linux_mod_CFLAGS): Likewise.
8495 (linux_mod_LDFLAGS): Likewise.
8497 * DISTLIST: Added loader/i386/efi/linux.c,
8498 loader/i386/efi/linux_normal.c and
8499 include/grub/i386/efi/loader.h.
8501 * loader/i386/efi/linux.c: New file.
8502 * loader/i386/efi/linux_normal.c: Likewise.
8503 * include/grub/i386/efi/loader.h: Likewise.
8505 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8507 * commands/blocklist.c: New file.
8509 * DISTLIST: Added commands/blocklist.c.
8511 * term/efi/console.c (grub_console_highlight_color): Use a lighter
8512 color for the background, and a darker color for the foreground.
8513 (grub_console_checkkey): Return READ_KEY.
8514 (grub_console_cls): Set the background to
8515 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8517 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8519 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8520 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8522 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8525 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8526 BG. The spec is wrong again.
8528 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8530 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
8532 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8533 commands/blocklist.c.
8534 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8536 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8537 (blocklist_mod_SOURCES): New variable.
8538 (blocklist_mod_CFLAGS): Likewise.
8539 (blocklist_mod_LDFLAGS): Likewise.
8541 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8543 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8545 (lba_mode): Use %eax more intensively to reduce the code size.
8547 2006-05-20 Marco Gerards <marco@gnu.org>
8549 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8551 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8553 (script): Accept leading newlines.
8554 (newlines): New rule to describe 0 or more newlines.
8555 (commands): Accept `command' with trailing newline. Fixed the
8556 order in which arguments were passed to `grub_script_add_cmd'.
8557 Accept commands separated by newlines.
8558 (function): Changed to accept newlines.
8559 (menuentry) Rewritten.
8561 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8562 front of the list, instead of to the end.
8564 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8566 * util/i386/pc/grub-install.in (bindir): New variable.
8567 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8568 Shaver <lbgwjl@gmail.com>.
8570 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8572 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8573 grub/machine/linux.h
8574 * loader/i386/pc/linux.c: Likewise.
8576 * include/grub/i386/pc/linux.h: Moved to ...
8577 * include/grub/i386/linux.h: ... here.
8579 * include/grub/i386/linux.h (struct linux_kernel_params): New
8582 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8584 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8586 (grub_video_vbe_blit_glyph): Likewise.
8587 (grub_video_vbe_blit_bitmap): Likewise.
8588 (grub_video_vbe_blit_render_target): Likewise.
8590 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8592 * configure.ac (--with-platform): Properly quote the square
8595 2006-05-08 Marco Gerards <marco@gnu.org>
8597 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8599 (kernel_elf_HEADERS): ...to this. Updated all users.
8600 (grubof_symlist.c): Renamed from this...
8601 (kernel_elf_symlist.c): ...to this. Updated all users.
8602 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8603 (grubof_SOURCES): Renamed from this...
8604 (kernel_elf_SOURCES): ...to this.
8605 (grubof_HEADERS): Renamed from this...
8606 (kernel_elf_HEADERS): ...to this.
8607 (grubof_CFLAGS): Renamed from this...
8608 (kernel_elf_CFLAGS): ...to this.
8609 (grubof_ASFLAGS): Renamed from this...
8610 (kernel_elf_ASFLAGS): ...to this.
8611 (grubof_LDFLAGS): Renamed from this...
8612 (kernel_elf_LDFLAGS): ...to this.
8614 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8616 (kernel_elf_HEADERS): ...to this. Updated all users.
8617 (grubof_symlist.c): Renamed from this...
8618 (kernel_elf_symlist.c): ...to this. Updated all users.
8619 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8620 (grubof_SOURCES): Renamed from this...
8621 (kernel_elf_SOURCES): ...to this.
8622 (grubof_HEADERS): Renamed from this...
8623 (kernel_elf_HEADERS): ...to this.
8624 (grubof_CFLAGS): Renamed from this...
8625 (kernel_elf_CFLAGS): ...to this.
8626 (grubof_ASFLAGS): Renamed from this...
8627 (kernel_elf_ASFLAGS): ...to this.
8628 (grubof_LDFLAGS): Renamed from this...
8629 (kernel_elf_LDFLAGS): ...to this.
8631 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8632 `kernel.elf' instead of `grubof'.
8634 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8636 Add --with-platform to configure. Use pkglibdir instead of
8637 pkgdatadir. This is reported by Roger Leigh.
8639 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8640 (host_vendor): Likewise.
8641 (host_os): Likewise.
8642 (pkgdatadir): Likewise.
8643 (platform): New variable.
8644 (pkglibdir): Likewise.
8645 Use PKGLIBDIR instead of PKGDATADIR.
8647 * util/i386/pc/grub-install.in (datadir): Removed.
8648 (host_vendor): Likewise.
8649 (host_os): Likewise.
8650 (pkgdatadir): Likewise.
8651 (platform): New variable.
8652 (pkglibdir): Likewise.
8653 Use PKGLIBDIR instead of PKGDATADIR.
8655 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8656 instead of GRUB_DATADIR.
8658 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8660 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8663 * configure.ac (--with-platform): New option.
8664 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8666 * Makefile.in: Include a makefile based on PLATFORM instead of
8668 (pkgdatadir): Not appended by the machine type.
8669 (pkglibdir): Appended by the machine type.
8670 (host_vendor): Removed.
8671 (platform): New variable.
8672 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8673 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8674 (uninstall): Likewise.
8676 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8678 Use the environment context in the menu. Remove the commands
8679 "default" and "timeout", and use variables instead.
8681 * normal/menu.c: Include grub/env.h.
8682 (print_entry): Cast TITLE to silence gcc.
8683 (get_timeout): New function.
8684 (set_timeout): Likewise.
8685 (get_entry_number): Likewise.
8686 (run_menu): Use a default entry, a fallback entry and a timeout
8687 in the environment variables "default", "fallback" and
8688 "timeout". Also, tweak the default entry if it is not within the
8689 current menu entries.
8690 (grub_menu_run): Use a fallback entry in the environment variable
8693 * normal/main.c (read_config_file): Do not initialize
8694 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8696 (grub_normal_execute): Use a data slot to store the menu.
8698 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8699 fallback_entry and timeout.
8700 (struct grub_menu_list): Removed.
8701 (grub_menu_list_t): Likewise.
8702 (struct grub_context): Likewise.
8703 (grub_context_t): Likewise.
8704 (grub_context_get): Likewise.
8705 (grub_context_get_current_menu): Likewise.
8706 (grub_context_push_menu): Likewise.
8707 (grub_context_pop_menu): Likewise.
8708 (grub_default_init): Likewise.
8709 (grub_default_fini): Likewise.
8710 (grub_timeout_init): Likewise.
8711 (grub_timeout_fini): Likewise.
8713 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8715 (normal_mod_SOURCES): Removed normal/context.c.
8717 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8718 commands/default.c, commands/timeout.c and normal/context.c.
8719 (normal_mod_SOURCES): Removed normal/context.c.
8721 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8722 commands/timeout.c and normal/context.c.
8723 (normal_mod_SOURCES): Removed normal/context.c.
8725 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8726 commands/default.c, commands/timeout.c and normal/context.c.
8727 (normal_mod_SOURCES): Removed normal/context.c.
8729 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8731 (default_mod_SOURCES): Removed.
8732 (default_mod_CFLAGS): Likewise.
8733 (default_mod_LDFLAGS): Likewise.
8734 (timeout_mod_SOURCES): Removed.
8735 (timeout_mod_CFLAGS): Likewise.
8736 (timeout_mod_LDFLAGS): Likewise.
8738 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8741 * commands/default.c: Removed.
8742 * commands/timeout.c: Likewise.
8743 * normal/context.c: Likewise.
8745 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8747 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8749 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8751 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8752 "next" to "prev" for readability.
8753 (struct grub_env_sorted_var): New struct.
8754 (grub_env_context): Renamed to ...
8755 (initial_context): ... this.
8756 (grub_env_var_context): Renamed to ...
8757 (current_context): ... this.
8758 (grub_env_find): Look only at CURRENT_CONTEXT.
8759 (grub_env_context_open): Rewritten to copy exported variables from
8761 (grub_env_context_close): Rewritten according to the new
8762 scheme. Also, add an assertion to prevent the initial context from
8764 (grub_env_insert): Removed the code for the sorted list.
8765 (grub_env_remove): Likewise.
8766 (grub_env_export): Simply mark the variable with
8767 GRUB_ENV_VAR_GLOBAL.
8768 (grub_env_set): A cosmetic change for naming consistency.
8769 (grub_env_get): Likewise.
8770 (grub_env_unset): Likewise.
8771 (grub_env_iterate): Rewritten to sort variables within this
8773 (grub_register_variable_hook): Fixed for naming consistency. Call
8774 grub_env_find again, only if NAME is not found at the first time.
8775 (mangle_data_slot_name): New function.
8776 (grub_env_set_data_slot): Likewise.
8777 (grub_env_get_data_slot): Likewise.
8778 (grub_env_unset_data_slot): Likewise.
8780 * include/grub/env.h (grub_env_var_type): New enum.
8781 (GRUB_ENV_VAR_LOCAL): New constant.
8782 (GRUB_ENV_VAR_GLOBAL): Likewise.
8783 (GRUB_ENV_VAR_DATA): Likewise.
8784 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8786 (grub_env_set): Replace VAR with NAME for consistency.
8787 (grub_register_variable_hook): Likewise.
8788 (grub_env_export): Specify the name of the argument.
8789 (grub_env_set_data_slot): New prototype.
8790 (grub_env_get_data_slot): Likewise.
8791 (grub_env_unset_data_slot): Likewise.
8793 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8795 Extend the loader so that GRUB can accept a loader which comes
8796 back to GRUB when a loaded image exits. Also, this change adds
8797 support for a chainloader on EFI.
8799 * term/efi/console.c: Include grub/misc.h.
8800 (grub_console_checkkey): Display a scan code on the top for
8801 debugging. This will be removed once the EFI port gets stable.
8802 Correct the scan code mapping.
8804 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8805 allocate memory from larger regions, in order to reduce the number
8806 of allocated regions. Otherwise, the MacOSX loader panics.
8807 (filter_memory_map): Avoid less than 1MB for compatibility with
8809 (add_memory_regions): Allocate from the tail of a region, if
8810 possible, to avoid allocating a region near to 1MB, for the MacOSX
8813 * kern/efi/init.c (grub_efi_set_prefix): Specify
8814 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8816 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8817 argument IMAGE_HANDLE and specify it to get a loaded image.
8818 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8819 grub_efi_get_loaded_image.
8820 (grub_efi_get_filename): Divide the length by the size of
8822 (grub_efi_get_device_path): New function.
8823 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8824 the length by the size of grub_efi_char16_t for a file path device
8827 * kern/loader.c (grub_loader_noreturn): New variable.
8828 (grub_loader_set): Accept a new argument NORETURN. Set
8829 GRUB_LOADER_NORETURN to NORETURN.
8830 All callers changed.
8831 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8834 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8836 (grub_efi_get_loaded_image): Take an argument to specify an image
8839 * include/grub/loader.h (grub_loader_set): Added one more argument
8842 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8843 instead of grub_efi_open_protocol.
8844 (grub_efidisk_get_device_name): Likewise.
8845 (grub_efidisk_close): Print a newline.
8846 (grub_efidisk_get_device_handle): Fixed to use
8847 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8848 GRUB_EFI_DEVICE_PATH_TYPE.
8850 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8851 * kern/efi/efi.c (device_path_guid): ... here.
8853 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8855 (kernel_mod_HEADERS): Added efi/disk.h.
8856 (_chain_mod_SOURCES): New variable.
8857 (_chain_mod_CFLAGS): Likewise.
8858 (_chain_mod_LDFLAGS): Likewise.
8859 (chain_mod_SOURCES): Likewise.
8860 (chain_mod_CFLAGS): Likewise.
8861 (chain_mod_LDFLAGS): Likewise.
8863 * DISTLIST: Added include/grub/efi/chainloader.h,
8864 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8866 * include/grub/efi/chainloader.h: New file.
8867 * loader/efi/chainloader.c: Likewise.
8868 * loader/efi/chainloader_normal.c: Likewise.
8870 2006-04-30 Marco Gerards <marco@gnu.org>
8872 * commands/configfile.c (grub_cmd_source): New function.
8873 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8874 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8876 2006-04-30 Marco Gerards <marco@gnu.org>
8878 * normal/execute.c (grub_script_execute_cmd): Change the return
8879 type to `grub_err_t'. Correctly return the error.
8880 (grub_script_execute_cmdline): In case a command line is not a
8881 command or a function, try to interpret it as an assignment.
8883 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8885 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8886 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8887 skip a node whose name is obviously invalid as UTF-16,
8888 i.e. contains a NUL character. Stop the iteration when the last
8889 directory entry is found. Instead of using the return value of
8890 grub_hfsplus_btree_iterate_node, store the value in RET and use
8891 it, because the iterator can be stopped by the last directory
8894 2006-04-30 Marco Gerards <marco@gnu.org>
8896 * include/grub/env.h (grub_env_export): New prototype. Reported
8897 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8899 2006-04-30 Marco Gerards <marco@gnu.org>
8901 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8902 size of the extents in a catalog file record.
8904 2006-04-29 Marco Gerards <marco@gnu.org>
8906 * commands/configfile.c (grub_cmd_configfile): Execute the
8907 configfile within its own context.
8909 * include/grub/env.h (grub_env_context_open): New prototype.
8910 (grub_env_context_close): Likewise.
8912 * kern/env.c (grub_env): Removed.
8913 (grub_env_sorted): Likewise.
8914 (grub_env_context): New variable.
8915 (grub_env_var_context): Likewise.
8916 (grub_env_find): Search both the active context and the global
8918 (grub_env_context_open): New function.
8919 (grub_env_context_close): Likewise.
8920 (grub_env_insert): Likewise.
8921 (grub_env_remove): Likewise.
8922 (grub_env_export): Likewise.
8923 (grub_env_set): Changed to use helper functions to avoid code
8925 (grub_env_iterate): Rewritten so both the current context and the
8926 global context are being used.
8928 * normal/command.c (export_command): New function.
8929 (grub_command_init): Register the `export' function.
8931 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8933 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8934 explicitly to suppress gcc's warnings.
8935 * fs/fat.c (grub_fat_find_dir): Likewise.
8936 (grub_fat_label): Likewise.
8937 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8938 (grub_xfs_mount): Likewise.
8939 (grub_xfs_label): Likewise.
8940 * fs/affs.c (grub_affs_mount): Likewise.
8941 (grub_affs_label): Likewise.
8942 (grub_affs_iterate_dir): Likewise.
8943 * fs/sfs.c (grub_sfs_mount): Likewise.
8944 (grub_sfs_iterate_dir): Likewise.
8945 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8946 * fs/hfs.c (grub_hfs_mount): Likewise.
8947 (grub_hfs_cmp_catkeys): Likewise.
8948 (grub_hfs_find_dir): Likewise.
8949 (grub_hfs_dir): Likewise.
8950 (grub_hfs_label): Likewise.
8951 * fs/jfs.c (grub_jfs_mount): Likewise.
8952 (grub_jfs_opendir): Likewise.
8953 (grub_jfs_getent): Likewise.
8954 (grub_jfs_lookup_symlink): Likewise.
8955 (grub_jfs_label): Likewise.
8956 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8957 (grub_hfsplus_iterate_dir): Likewise.
8958 (grub_hfsplus_btree_iterate_node): Made static.
8960 * util/grub-emu.c (prefix): New variable.
8961 (grub_machine_set_prefix): New function.
8962 (main): Do not set the environment variable "prefix" here. Only
8963 set PREFIX, which is used later by grub_machine_set_prefix.
8965 * include/grub/video.h: Do not include grub/symbol.h.
8966 (grub_video_register): Not exported. This symbol is not defined in
8968 (grub_video_unregister): Likewise.
8969 (grub_video_iterate): Likewise.
8970 (grub_video_setup): Likewise.
8971 (grub_video_restore): Likewise.
8972 (grub_video_get_info): Likewise.
8973 (grub_video_get_blit_format): Likewise.
8974 (grub_video_set_palette): Likewise.
8975 (grub_video_get_palette): Likewise.
8976 (grub_video_set_viewport): Likewise.
8977 (grub_video_get_viewport): Likewise.
8978 (grub_video_map_color): Likewise.
8979 (grub_video_map_rgb): Likewise.
8980 (grub_video_map_rgba): Likewise.
8981 (grub_video_fill_rect): Likewise.
8982 (grub_video_blit_glyph): Likewise.
8983 (grub_video_blit_bitmap): Likewise.
8984 (grub_video_blit_render_target): Likewise.
8985 (grub_video_scroll): Likewise.
8986 (grub_video_swap_buffers): Likewise.
8987 (grub_video_create_render_target): Likewise.
8988 (grub_video_delete_render_target): Likewise.
8989 (grub_video_set_active_render_target): Likewise.
8991 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8993 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8995 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8996 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8997 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8998 instead of $(srcdir)/genkernsyms.sh.
9000 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9001 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9002 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9003 instead of $(srcdir)/genkernsyms.sh.
9005 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9006 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9007 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9008 instead of $(srcdir)/genkernsyms.sh.
9010 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9011 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9012 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9013 instead of $(srcdir)/genkernsyms.sh.
9015 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9018 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9020 (gensymlist.sh): New target.
9021 (genkernsyms.sh): Likewise.
9023 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9024 genkernsyms.sh.in and gensymlist.sh.in.
9026 * genkernsyms.sh: Removed.
9027 * gensymlist.sh: Likewise.
9029 * genkernsyms.sh.in: New file.
9030 * gensymlist.sh.in: Likewise.
9032 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9034 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9035 clobber "prefix", since we may have already set it manually.
9037 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9039 * kern/misc.c (abort): New alias for grub_abort.
9041 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9043 A new machine-specific function "grub_machine_set_prefix" is
9044 defined. This is called after loading modules, so that a prefix
9045 initialization can use modules. Also, this change adds an
9046 intensive debugging feature for the memory manager via the
9047 configure option "--enable-mm-debug".
9049 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9052 * kern/sparc64/ieee1275/init.c (abort): Removed.
9053 (grub_stop): Likewise.
9054 (grub_exit): New function.
9055 (grub_set_prefix): Renamed to ...
9056 (grub_machine_set_prefix): ... this.
9057 (grub_machine_init): Do not call grub_set_prefix.
9059 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9060 (grub_machine_set_prefix): ... this.
9061 (grub_machine_init): Do not call grub_set_prefix.
9063 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9064 (grub_machine_init): Do not set the prefix here.
9066 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9068 * kern/efi/init.c: Include grub/mm.h.
9069 (grub_efi_set_prefix): New function.
9071 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9072 (grub_efi_get_filename): New function.
9073 (grub_print_device_path): Renamed to ...
9074 (grub_efi_print_device_path): ... this.
9076 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9077 [MM_DEBUG] (grub_realloc): Likewise.
9078 [MM_DEBUG] (grub_free): Likewise.
9079 [MM_DEBUG] (grub_memalign): Likewise.
9080 [MM_DEBUG] (grub_mm_debug): New variable.
9081 [MM_DEBUG] (grub_debug_malloc): New function.
9082 [MM_DEBUG] (grub_debug_free): New function.
9083 [MM_DEBUG] (grub_debug_realloc): New function.
9084 [MM_DEBUG] (grub_debug_memalign): New function.
9086 * kern/misc.c (grub_abort): Print a newline to distinguish
9089 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9090 grub_set_root_dev after loading modules. This is necessary when
9091 setting a prefix depends on modules.
9093 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9094 (grub_efi_print_device_path): ... this.
9095 (grub_efi_get_filename): New prototype.
9096 (grub_efi_set_prefix): Likewise.
9098 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9100 (grub_efidisk_get_device_handle): New prototype.
9101 (grub_efidisk_get_device_name): Likewise.
9103 * include/grub/mm.h: Include config.h.
9104 (MM_DEBUG): Removed.
9105 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9106 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9107 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9108 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9109 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9110 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9111 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9112 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9113 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9115 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9117 * disk/efi/efidisk.c: Include grub/partition.h.
9118 (iterate_child_devices): New function.
9119 (add_device): First, compare only last device path nodes, so that
9120 devices are sorted by the types.
9121 (grub_efidisk_get_device_handle): New function.
9122 (grub_efidisk_get_device_name): Likewise.
9124 * configure.ac (--enable-mm-debug): New option to enable the
9125 memory manager debugging feature. This makes the binary much
9126 bigger, so is disabled by default.
9128 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9130 Use grub_abort instead of grub_stop, and grub_exit must be
9131 define in each architecture now. Also, this change adds support
9134 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9135 (grub_getkey): New function.
9136 (grub_term_get_current): Likewise.
9138 * util/i386/pc/grub-setup.c: Include grub/term.h.
9139 (grub_getkey): New function.
9140 (grub_term_get_current): Likewise.
9142 * util/misc.c (grub_stop): Renamed to ...
9143 (grub_exit): ... this.
9145 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9146 (grub_exit): ... this.
9147 (grub_machine_init): Use grub_abort instead of abort.
9148 (grub_stop): Removed.
9150 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9153 * kern/i386/pc/startup.S (grub_exit): New function.
9154 (cold_reboot): New label.
9156 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9157 (grub_efi_init): Call grub_efidisk_init.
9158 (grub_efi_fini): Call grub_efidisk_fini.
9160 * kern/efi/efi.c: Include grub/mm.h.
9161 (grub_efi_console_control_guid): Renamed to ...
9162 (console_control_guid): ... this.
9163 (grub_efi_loaded_image_guid): Renamed to ...
9164 (loaded_image_guid): ... this.
9165 (grub_efi_locate_handle): New function.
9166 (grub_efi_open_protocol): Likewise.
9167 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9168 GRUB_EFI_CONSOLE_CONTROL_GUID.
9169 (grub_efi_exit): Removed.
9170 (grub_stop): Likewise.
9171 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9172 (grub_exit): New function.
9173 (grub_print_device_path): Likewise.
9175 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9176 (grub_enter_rescue_mode): Register "exit".
9178 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9179 (grub_abort): New function.
9181 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9183 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9185 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9187 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9188 (grub_print_device_path): New prototype.
9189 (grub_efi_locate_handle): Likewise.
9190 (grub_efi_open_protocol): Likewise.
9192 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9193 * disk/efi/efidisk.c: Likewise.
9195 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9197 * include/grub/efi/console_control.h
9198 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9200 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9201 last 8 bytes as an array.
9202 (GRUB_EFI_DISK_IO_GUID): New macro.
9203 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9204 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9205 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9207 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9208 (struct grub_efi_device_path): Rename the member "sub_type" to
9210 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9211 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9212 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9213 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9214 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9215 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9216 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9217 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9218 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9219 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9220 (struct grub_efi_pci_device_path): New structure.
9221 (grub_efi_pci_device_path_t): New type.
9222 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9223 (struct grub_efi_pccard_device_path): New structure.
9224 (grub_efi_pccard_device_path_t): New type.
9225 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9226 (struct grub_efi_memory_mapped_device_path): New structure.
9227 (grub_efi_memory_mapped_device_path_t): New type.
9228 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9229 (struct grub_efi_vendor_device_path): New structure.
9230 (grub_efi_vendor_device_path_t): New type.
9231 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9232 (struct grub_efi_controller_device_path): New structure.
9233 (grub_efi_controller_device_path_t): New type.
9234 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9235 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9236 (struct grub_efi_acpi_device_path): New structure.
9237 (grub_efi_acpi_device_path_t): New type.
9238 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9239 (struct grub_efi_expanded_acpi_device_path): New structure.
9240 (grub_efi_expanded_acpi_device_path_t): New type.
9241 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9242 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9243 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9244 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9245 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9246 (struct grub_efi_atapi_device_path): New structure.
9247 (grub_efi_atapi_device_path_t): New type.
9248 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9249 (struct grub_efi_fibre_channel_device_path): New structure.
9250 (grub_efi_fibre_channel_device_path_t): New type.
9251 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9252 (struct grub_efi_1394_device_path): New structure.
9253 (grub_efi_1394_device_path_t): New type.
9254 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9255 (struct grub_efi_usb_device_path): New structure.
9256 (grub_efi_usb_device_path_t): New type.
9257 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9258 (struct grub_efi_usb_class_device_path): New structure.
9259 (grub_efi_usb_class_device_path_t): New type.
9260 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9261 (struct grub_efi_i2o_device_path): New structure.
9262 (grub_efi_i2o_device_path_t): New type.
9263 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9264 (struct grub_efi_mac_address_device_path): New structure.
9265 (grub_efi_mac_address_device_path_t): New type.
9266 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9267 (struct grub_efi_ipv4_device_path): New structure.
9268 (grub_efi_ipv4_device_path_t): New type.
9269 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9270 (struct grub_efi_ipv6_device_path): New structure.
9271 (grub_efi_ipv6_device_path_t): New type.
9272 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9273 (struct grub_efi_infiniband_device_path): New structure.
9274 (grub_efi_infiniband_device_path_t): New type.
9275 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9276 (struct grub_efi_uart_device_path): New structure.
9277 (grub_efi_uart_device_path_t): New type.
9278 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9279 (struct grub_efi_vendor_messaging_device_path): New structure.
9280 (grub_efi_vendor_messaging_device_path_t): New type.
9281 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9282 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9283 (struct grub_efi_hard_drive_device_path): New structure.
9284 (grub_efi_hard_drive_device_path_t): New type.
9285 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9286 (struct grub_efi_cdrom_device_path): New structure.
9287 (grub_efi_cdrom_device_path_t): New type.
9288 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9289 (struct grub_efi_vendor_media_device_path): New structure.
9290 (grub_efi_vendor_media_device_path_t): New type.
9291 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9292 (struct grub_efi_file_path_device_path): New structure.
9293 (grub_efi_file_path_device_path_t): New type.
9294 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9295 (struct grub_efi_protocol_device_path): New structure.
9296 (grub_efi_protocol_device_path_t): New type.
9297 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9298 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9299 (struct grub_efi_bios_device_path): New structure.
9300 (grub_efi_bios_device_path_t): New type.
9301 (struct grub_efi_disk_io): New structure.
9302 (grub_efi_disk_io_t): New type.
9303 (struct grub_efi_block_io_media): New structure.
9304 (grub_efi_block_io_media_t): New type.
9305 (struct grub_efi_block_io): New structure.
9306 (grub_efi_block_io_t): New type.
9308 * include/grub/misc.h (grub_stop): Removed.
9309 (grub_exit): New prototype.
9310 (grub_abort): Likewise.
9312 * include/grub/disk.h (enum grub_disk_dev_id): Added
9313 GRUB_DISK_DEVICE_EFIDISK_ID.
9315 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9317 (kernel_syms.lst): Remove the target if an error occurs.
9319 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9321 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9322 as it was simply too buggy.
9324 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9326 * kern/misc.c (grub_lltoa): New function.
9327 (grub_vsprintf): Added support for the long long suffix,
9330 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9332 * Makefile.in (LDFLAGS): Add variable.
9333 (LD): Remove variable.
9334 * configure.ac: Add -m32 to LDFLAGS.
9335 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9336 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9337 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9338 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9339 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9341 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9342 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9343 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9345 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9347 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9348 length for unknown glyph.
9350 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9352 Add support for pre-loaded modules into the EFI port.
9354 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9355 completely. Accept one more argument DIR. The caller has changed.
9357 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9359 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9360 (grub_efi_loaded_image_guid): New variable.
9361 (grub_efi_get_loaded_image): New function.
9362 (grub_arch_modules_addr): Likewise.
9364 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9367 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9368 (struct grub_efi_loaded_image): New structure.
9369 (grub_efi_loaded_image_t): New type.
9371 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9373 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9374 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9375 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9377 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9379 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9381 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9383 * DISTLIST: Added include/grub/efi/console.h,
9384 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9385 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9387 * include/grub/efi/console.h: New file.
9388 * include/grub/efi/time.h: Likewise.
9389 * include/grub/i386/efi/kernel.h: Likewise.
9390 * kern/efi/init.c: Likewise.
9391 * kern/efi/mm.c: Likewise.
9392 * term/efi/console.c: Likewise.
9394 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9395 (grub_stop): Removed.
9396 (grub_get_rtc): Likewise.
9397 (grub_machine_init): Simply call grub_efi_init.
9398 (grub_machine_fini): Call grub_efi_fini.
9400 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9401 (grub_efi_output_string): Removed.
9402 (grub_efi_stall): New function.
9403 (grub_stop): Likewise.
9404 (grub_get_rtc): Likewise.
9406 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9407 (grub_efi_stall): New prototype.
9408 (grub_efi_allocate_pages): Likewise.
9409 (grub_efi_free_pages): Likewise.
9410 (grub_efi_get_memory_map): Likewise.
9411 (grub_efi_mm_init): Likewise.
9412 (grub_efi_mm_fini): Likewise.
9413 (grub_efi_init): Likewise.
9414 (grub_efi_fini): Likewise.
9416 * include/grub/i386/efi/time.h: Do not include
9417 grub/symbol.h. Include grub/efi/time.h.
9418 (GRUB_TICKS_PER_SECOND): Removed.
9419 (grub_get_rtc): Likewise.
9421 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9422 Added padding. The EFI spec is buggy.
9423 (GRUB_EFI_BLACK): New macro.
9424 (GRUB_EFI_BLUE): Likewise.
9425 (GRUB_EFI_GREEN): Likewise.
9426 (GRUB_EFI_CYAN): Likewise.
9427 (GRUB_EFI_RED): Likewise.
9428 (GRUB_EFI_MAGENTA): Likewise.
9429 (GRUB_EFI_BROWN): Likewise.
9430 (GRUB_EFI_LIGHTGRAY): Likewise.
9431 (GRUB_EFI_BRIGHT): Likewise.
9432 (GRUB_EFI_DARKGRAY): Likewise.
9433 (GRUB_EFI_LIGHTBLUE): Likewise.
9434 (GRUB_EFI_LIGHTGREEN): Likewise.
9435 (GRUB_EFI_LIGHTCYAN): Likewise.
9436 (GRUB_EFI_LIGHTRED): Likewise.
9437 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9438 (GRUB_EFI_YELLOW): Likewise.
9439 (GRUB_EFI_WHITE): Likewise.
9440 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9441 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9442 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9443 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9444 (GRUB_EFI_BACKGROUND_RED): Likewise.
9445 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9446 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9447 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9448 (GRUB_EFI_TEXT_ATTR): Likewise.
9450 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9451 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9452 (kernel_mod_HEADERS): Added efi/time.h.
9454 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9456 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9457 include/grub/efi/api.h, include/grub/efi/console_control.h,
9458 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9459 include/grub/i386/efi/time.h, kern/efi/efi.c,
9460 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9461 and util/i386/efi/grub-mkimage.c.
9463 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9465 * genmk.rb (PModule#rule): Do not export symbols if
9466 #{prefix}_EXPORTS is set to "no".
9468 * conf/i386-efi.mk: New file.
9469 * conf/i386-efi.rmk: Likewise.
9470 * include/grub/efi/api.h: Likewise.
9471 * include/grub/efi/console_control.h: Likewise.
9472 * include/grub/efi/efi.h: Likewise.
9473 * include/grub/efi/pe32.h: Likewise.
9474 * include/grub/i386/efi/time.h: Likewise.
9475 * kern/efi/efi.c: Likewise.
9476 * kern/i386/efi/init.c: Likewise.
9477 * kern/i386/efi/startup.S: Likewise.
9478 * util/i386/efi/grub-mkimage.c: Likewise.
9480 2006-04-17 Marco Gerards <marco@gnu.org>
9482 * include/grub/script.h: Include <grub/parser.h> and
9483 "grub_script.tab.h".
9484 (struct grub_lexer_param): New struct.
9485 (struct grub_parser_param): Likewise.
9486 (grub_script_create_arglist): Pass the state in an argument.
9487 (grub_script_add_arglist): Likewise.
9488 (grub_script_create_cmdline): Likewise.
9489 (grub_script_create_cmdblock): Likewise.
9490 (grub_script_create_cmdif): Likewise.
9491 (grub_script_create_cmdmenu): Likewise.
9492 (grub_script_add_cmd): Likewise.
9493 (grub_script_arg_add): Likewise.
9494 (grub_script_lexer_ref): Likewise.
9495 (grub_script_lexer_deref): Likewise.
9496 (grub_script_lexer_record_start): Likewise.
9497 (grub_script_lexer_record_stop): Likewise.
9498 (grub_script_mem_record): Likewise.
9499 (grub_script_mem_record_stop): Likewise.
9500 (grub_script_malloc): Likewise.
9501 (grub_script_yylex): Likewise.
9502 (grub_script_yyparse): Likewise.
9503 (grub_script_yyerror): Likewise.
9504 (grub_script_yylex): Likewise.
9505 (grub_script_lexer_init): Return the state.
9507 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9508 (grub_script_lexer_done): Likewise.
9509 (grub_script_lexer_getline): Likewise.
9510 (grub_script_lexer_refs): Likewise.
9512 (newscript): Likewise.
9514 (recording): Likewise.
9515 (recordpos): Likewise.
9516 (recordlen): Likewise.
9517 (grub_script_lexer_init): Return the state instead of setting
9519 (grub_script_lexer_ref): Use the newly added argument for state
9521 (grub_script_lexer_deref): Likewise.
9522 (grub_script_lexer_record_start): Likewise.
9523 (grub_script_lexer_record_stop): Likewise.
9524 (recordchar): Likewise.
9525 (nextchar): Likewise.
9526 (grub_script_yylex2): Likewise.
9527 (grub_script_yylex): Likewise.
9528 (grub_script_yyerror): Likewise.
9530 * normal/parser.y (func_mem): Removed variable.
9531 (menu_entry): Likewise.
9533 (%lex-param): New parser option.
9534 (%parse-param): Likewise.
9535 (script): Always return the AST.
9536 (argument): Pass the state around.
9537 (arguments): Likewise.
9538 (grubcmd): Likewise.
9539 (commands): Likewise.
9540 (function): Likewise.
9541 (menuentry): Likewise.
9542 (if_statement): Likewise.
9545 * normal/script.c (grub_script_memused): Removed variable.
9546 (grub_script_parsed): Likewise.
9547 (grub_script_malloc): Added a state argument. Use that instead of
9549 (grub_script_mem_record): Likewise.
9550 (grub_script_mem_record_stop): Likewise.
9551 (grub_script_arg_add): Likewise.
9552 (grub_script_add_arglist): Likewise.
9553 (grub_script_create_cmdline): Likewise.
9554 (grub_script_create_cmdif): Likewise.
9555 (grub_script_create_cmdmenu): Likewise.
9556 (grub_script_add_cmd): Likewise.
9557 (grub_script_parse): Setup the state before calling the parser.
9559 2006-04-16 Marco Gerards <marco@gnu.org>
9561 * normal/command.c (grub_command_init): Remove the title command.
9563 * normal/lexer.c (grub_script_yylex): Renamed from this...
9564 (grub_script_yylex2): ... to this.
9565 (grub_script_yylex): New function. Temporary
9566 introduced to filter some tokens.
9567 (grub_script_yyerror): Print a newline.
9569 * normal/main.c (read_config_file): Output information about the
9570 lines that contain errors. Wait for a key after all lines have
9571 been processed. Don't return an empty menu.
9573 * normal/parser.y (func_mem): Don't initialize.
9574 (menu_entry): Likewise.
9575 (err): New variable.
9576 (script): Don't return anything when an error was encountered.
9577 (ws, returns): Removed rules.
9578 (argument): Disabled concatenated variable support.
9579 (arguments): Remove explicit separators.
9580 (grubcmd): Likewise.
9581 (function): Likewise.
9582 (menuentry): Likewise.
9584 (commands): Likewise. Add error handling.
9586 * normal/script.c (grub_script_create_cmdline): If
9587 `grub_script_parsed' is 0, assume the parser encountered an error.
9589 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9591 * configure.ac: Add support for EFI. Fix the typo
9592 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9594 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9596 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9597 foreign multibyte characters should be shown correctly.
9599 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9601 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9603 (read_config_file): Made it to close file before returning.
9605 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9607 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9608 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9609 video/i386/pc/vbefill.c.
9611 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9612 video/i386/pc/vbefill.c.
9614 * include/grub/video.h (grub_video_blit_format): New enum.
9615 (grub_video_mode_info): Added new member blit_format.
9616 (grub_video_get_blit_format): New function prototype.
9618 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9620 (grub_video_vbe_map_rgb): Likewise.
9621 (grub_video_vbe_unmap_color): Likewise.
9623 * include/grub/i386/pc/vbeblit.h: New file.
9625 * include/grub/i386/pc/vbefill.h: New file.
9627 * video/video.c (grub_video_get_blit_format): New function.
9628 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9629 (grub_video_vbe_map_rgb): Likewise.
9630 (grub_video_vbe_unmap_color): Likewise.
9632 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9634 (grub_video_vbe_blit_render_target): Changed to use more optimized
9636 (grub_video_vbe_setup): Added detection for optimized settings.
9637 (grub_video_vbe_create_render_target): Likewise.
9639 * video/i386/pc/vbeblit.c: New file.
9641 * video/i386/pc/vbefill.c: New file.
9643 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9645 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9648 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9649 parsing to support both hex and dec ranges. If filename was missing
9650 show usage information.
9652 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9654 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9655 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9657 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9658 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9659 (video_mod_SOURCES): Added.
9660 (video_mod_CFLAGS): Likewise.
9661 (video_mod_LDFLAGS): Likewise.
9662 (gfxterm_mod_SOURCES): Likewise.
9663 (gfxterm_mod_CFLAGS): Likewise.
9664 (gfxterm_mod_LDFLAGS): Likewise.
9665 (videotest_mod_SOURCES): Likewise.
9666 (videotest_mod_CFLAGS): Likewise.
9667 (videotest_mod_LDFLAGS): Likewise.
9668 (vesafb_mod_SOURCES): Removed.
9669 (vesafb_mod_CFLAGS): Likewise.
9670 (vesafb_mod_LDFLAGS): Likewise.
9671 (vga_mod_SOURCES): Likewise.
9672 (vga_mod_CFLAGS): Likewise.
9673 (vga_mod_LDFLAGS): Likewise.
9675 * commands/videotest.c: New file.
9677 * font/manager.c (fill_with_default_glyph): Modified to use
9679 (grub_font_get_glyph): Likewise.
9680 (fontmanager): Renamed from this...
9681 (font_manager): ... to this.
9683 * include/grub/font.h (grub_font_glyph): Added new structure.
9684 (grub_font_get_glyph): Modified to use grub_font_glyph.
9686 * include/grub/misc.h (grub_abs): Added as inline function.
9688 * include/grub/video.h: New file.
9690 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9691 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9692 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9693 (grub_vbe_get_controller_info): Renamed from this...
9694 (grub_vbe_bios_get_controller_info): ... to this.
9695 (grub_vbe_get_mode_info): Renamed from this...
9696 (grub_vbe_bios_get_mode_info): ... to this.
9697 (grub_vbe_set_mode): Renamed from this...
9698 (grub_vbe_bios_set_mode): ... to this.
9699 (grub_vbe_get_mode): Renamed from this...
9700 (grub_vbe_bios_get_mode): ... to this.
9701 (grub_vbe_set_memory_window): Renamed from this...
9702 (grub_vbe_bios_set_memory_window): ... to this.
9703 (grub_vbe_get_memory_window): Renamed from this...
9704 (grub_vbe_bios_get_memory_window): ... to this.
9705 (grub_vbe_set_scanline_length): Renamed from this...
9706 (grub_vbe_set_scanline_length): ... to this.
9707 (grub_vbe_get_scanline_length): Renamed from this...
9708 (grub_vbe_bios_get_scanline_length): ... to this.
9709 (grub_vbe_set_display_start): Renamed from this...
9710 (grub_vbe_bios_set_display_start): ... to this.
9711 (grub_vbe_get_display_start): Renamed from this...
9712 (grub_vbe_bios_get_display_start): ... to this.
9713 (grub_vbe_set_palette_data): Renamed from this...
9714 (grub_vbe_bios_set_palette_data): ... to this.
9715 (grub_vbe_set_pixel_rgb): Removed.
9716 (grub_vbe_set_pixel_index): Likewise.
9718 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9720 (grub_vbe_bios_get_controller_info): ... to this.
9721 (grub_vbe_get_mode_info): Renamed from this...
9722 (grub_vbe_bios_get_mode_info): ... to this.
9723 (grub_vbe_set_mode): Renamed from this...
9724 (grub_vbe_bios_set_mode): ... to this.
9725 (grub_vbe_get_mode): Renamed from this...
9726 (grub_vbe_bios_get_mode): ... to this.
9727 (grub_vbe_set_memory_window): Renamed from this...
9728 (grub_vbe_bios_set_memory_window): ... to this.
9729 (grub_vbe_get_memory_window): Renamed from this...
9730 (grub_vbe_bios_get_memory_window): ... to this.
9731 (grub_vbe_set_scanline_length): Renamed from this...
9732 (grub_vbe_set_scanline_length): ... to this.
9733 (grub_vbe_get_scanline_length): Renamed from this...
9734 (grub_vbe_bios_get_scanline_length): ... to this.
9735 (grub_vbe_set_display_start): Renamed from this...
9736 (grub_vbe_bios_set_display_start): ... to this.
9737 (grub_vbe_get_display_start): Renamed from this...
9738 (grub_vbe_bios_get_display_start): ... to this.
9739 (grub_vbe_set_palette_data): Renamed from this...
9740 (grub_vbe_bios_set_palette_data): ... to this.
9741 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9742 getting corrupted after calling it. Added more pushes and pops.
9743 (grub_vbe_bios_set_mode): Likewise.
9744 (grub_vbe_bios_get_mode): Likewise.
9745 (grub_vbe_bios_get_memory_window): Likewise.
9746 (grub_vbe_bios_set_scanline_length): Likewise.
9747 (grub_vbe_bios_get_scanline_length): Likewise.
9748 (grub_vbe_bios_get_display_start): Likewise.
9749 (grub_vbe_bios_set_palette_data): Likewise.
9751 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9752 (cl_insert): Likewise.
9753 (cl_delete): Likewise.
9755 * term/gfxterm.c: New file.
9757 * term/i386/pc/vesafb.c: Removed file.
9759 * video/video.c: New file.
9761 * video/i386/pc/vbe.c (real2pm): Added new function.
9762 (grub_video_vbe_draw_pixel): Likewise.
9763 (grub_video_vbe_get_video_ptr): Likewise.
9764 (grub_video_vbe_get_pixel): Likewise
9765 (grub_video_vbe_init): Likewise.
9766 (grub_video_vbe_fini): Likewise.
9767 (grub_video_vbe_setup): Likewise.
9768 (grub_video_vbe_get_info): Likewise.
9769 (grub_video_vbe_set_palette): Likewise.
9770 (grub_video_vbe_get_palette): Likewise.
9771 (grub_video_vbe_set_viewport): Likewise.
9772 (grub_video_vbe_get_viewport): Likewise.
9773 (grub_video_vbe_map_color): Likewise.
9774 (grub_video_vbe_map_rgb): Likewise.
9775 (grub_video_vbe_map_rgba): Likewise.
9776 (grub_video_vbe_unmap_color): Likewise.
9777 (grub_video_vbe_fill_rect): Likewise.
9778 (grub_video_vbe_blit_glyph): Likewise.
9779 (grub_video_vbe_blit_bitmap): Likewise.
9780 (grub_video_vbe_blit_render_target): Likewise.
9781 (grub_video_vbe_scroll): Likewise.
9782 (grub_video_vbe_swap_buffers): Likewise.
9783 (grub_video_vbe_create_render_target): Likewise.
9784 (grub_video_vbe_delete_render_target): Likewise.
9785 (grub_video_vbe_set_active_render_target): Likewise.
9786 (grub_vbe_set_pixel_rgb): Remove function.
9787 (grub_vbe_set_pixel_index): Likewise.
9788 (index_color_mode): Remove static variable.
9789 (active_mode): Likewise.
9790 (framebuffer): Likewise.
9791 (bytes_per_scan_line): Likewise.
9792 (grub_video_vbe_adapter): Added new static variable.
9793 (framebuffer): Likewise.
9794 (render_target): Likewise.
9795 (initial_mode): Likewise.
9796 (mode_in_use): Likewise.
9797 (mode_list): Likewise.
9799 2006-03-10 Marco Gerards <marco@gnu.org>
9801 * configure.ac (AC_INIT): Bumped to 1.93.
9803 * DISTLIST: Added `include/grub/hfs.h'.
9805 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9807 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9808 18H, which might help the BIOS falling back to next boot media.
9810 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9812 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9813 Poe Chen <poe.poechen@gmail.com>.
9815 2006-01-17 Marco Gerards <marco@gnu.org>
9817 * include/grub/normal.h: Include <grub/script.h>.
9818 (grub_command_list): Removed struct.
9819 (grub_command_list_t): Removed type.
9820 (grub_menu_entry): Remove members `num' and `command_list'. Add
9821 members `commands' and `sourcecode'.
9822 * include/grub/script.h: Add inclusion guards.
9823 (grub_script_cmd_menuentry): New struct.
9824 (grub_script_execute_menuentry): New prototype.
9825 (grub_script_lexer_record_start): Likewise.
9826 (grub_script_lexer_record_stop): Likewise.
9827 * normal/execute.c (grub_script_execute_menuentry): New function.
9828 * normal/lexer.c (record, recording, recordpos, recordlen): New
9830 (grub_script_lexer_record_start): New function.
9831 (grub_script_lexer_record_stop): Likewise.
9832 (recordchar): Likewise.
9833 (nextchar): Likewise.
9834 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9835 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9836 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9837 (current_menu): New variable.
9838 (free_menu): Mainly rewritten.
9839 (grub_normal_menu_addentry): New function.
9840 (read_config_file): Rewritten.
9841 * normal/menu.c (run_menu_entry): Mainly rewritten.
9842 * normal/menu_entry.c (make_screen): Rewritten the code to insert
9844 (run): Mainly rewritten.
9845 * normal/parser.y (menu_entry): New variable.
9846 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9847 (menuentry): New rule.
9848 (command): Add `menuentry'.
9849 (if_statement): Allow additional returns before `fi'.
9850 * normal/script.c (grub_script_create_cmdmenu): New function.
9852 2006-01-03 Marco Gerards <marco@gnu.org>
9854 * INSTALL: GNU Bison is required.
9855 * configure.ac: Rewritten the test to detect Bison.
9856 * Makefile.in (YACC): New variable. Reported by Xun Sun
9857 <xun.sun.cn@gmail.com>.
9859 2006-01-03 Marco Gerards <marco@gnu.org>
9861 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9862 the HFS+ filesystem to filesystem blocks.
9863 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9864 GCC warning is silenced.
9866 2006-01-03 Marco Gerards <marco@gnu.org>
9868 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9869 read from disk from big endian to host byte order.
9871 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9873 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9875 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9876 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9877 embedded HFS+ filesystem.
9878 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9879 (grub_hfs_sblock): Move from here...
9880 * include/grub/hfs.h: To here... New file.
9881 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9883 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9885 (grub_hfsplus_volheader): Change type of member `magic' to
9887 (grub_hfsplus_data): Add new member `embedded_offset'.
9888 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9890 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9891 Calculate the offset.
9893 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9895 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9897 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9899 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9901 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9902 ENV->NAME is NULL after allocating ENV->VALUE.
9904 2005-12-25 Marco Gerards <marco@gnu.org>
9906 * kern/env.c (grub_env_set): Rewritten the error handling code.
9908 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9910 * geninit.sh: Made more robust, and more portable.
9912 2005-12-25 Marco Gerards <marco@gnu.org>
9914 Add support for Apple HFS+ filesystems.
9916 * fs/hfsplus.c: New file.
9918 * DISTLIST: Added `fs/hfsplus.c'.
9920 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9921 (hfsplus_mod_SOURCES): New variable.
9922 (hfsplus_mod_CFLAGS): Likewise.
9923 (hfsplus_mod_LDFLAGS): Likewise.
9924 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9925 (grub_setup_SOURCES): Likewise.
9926 (grub_mkdevicemap_SOURCES): Likewise.
9927 (grub_emu_SOURCES): Likewise.
9928 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9930 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9932 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9934 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9936 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9937 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9938 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9939 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9940 normal/lexer.c, normal/parser.y, normal/script.c, and
9942 Removed kern/sparc64/cache.c.
9944 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9945 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9948 * configure.ac (AC_INIT): Bumped to 1.92.
9950 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9952 * kern/err.c (grub_error_push): Added new function to support error
9954 (grub_error_pop): Likewise.
9955 (grub_error_stack_items): New local variable to support error stacks.
9956 (grub_error_stack_pos): Likewise.
9957 (grub_error_stack_assert): Likewise.
9958 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9960 (grub_print_error): Added support to print errors from error stack.
9962 * include/grub/err.h (grub_error_push): Added function prototype.
9963 (grub_error_pop): Likewise.
9965 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9967 * configure.ac: Accept `powerpc64' as host_cpu.
9968 (amd64): Rename to `biarch32'.
9970 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9971 non-cacheline-aligned addresses.
9973 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9974 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9975 if `size' is non-zero.
9977 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
9979 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9980 and `cd' to make sure the filename is not prefixed with a
9982 (pkgdata_MODULES): Add `gpt.mod'.
9983 (gpt_mod_SOURCES): New variable.
9984 (gpt_mod_CFLAGS): Likewise.
9985 (gpt_mod_LDFLAGS): Likewise.
9987 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9989 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9992 * partmap/gpt.c: New file.
9994 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9995 GPT partition map is detected.
9997 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9999 * commands/i386/pc/play.c: New file.
10000 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10001 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10004 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
10006 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10007 ((unused))' to silence gcc warning.
10009 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10011 * configure.ac: Correct `AC_PROG_YACC' test.
10013 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10015 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10016 check before installing files.
10018 2005-11-22 Mike Small <smallm@panix.com>
10020 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10021 number regex so multidigit numbers are recognized correctly.
10023 2005-11-22 Mike Small <smallm@panix.com>
10025 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10026 debugging message before attempting to claim memory.
10027 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10028 multiple addresses in case of failure.
10030 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10032 * term/tparm.c (get_space): Remove empty `if' statement.
10034 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10036 * kern/parser.c (check_varstate): Rename `state' to 's'.
10038 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10040 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10041 variable definitions to the beginning of each function. Sort stack
10043 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10044 `buf' argument to `char *'.
10046 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10048 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10049 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10050 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10051 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10052 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10053 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10054 configfile.mod, search.mod, gzio.mod and test.mod.
10055 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10056 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10057 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10058 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10059 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10060 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10061 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10062 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10063 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10064 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10065 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10066 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10067 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10068 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10069 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10070 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10071 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10072 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10073 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10074 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10075 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10076 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10077 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10079 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10081 (pkgdata_MODULES): Add test.mod.
10083 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10085 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10086 appending to variables with "+=".
10087 (PModule): Use full pathname to generate *.lst filenames.
10089 * Makefile.in: Fixed list rules moved from genmk.rb.
10090 (.DELETE_ON_ERROR): New special target.
10091 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10093 * conf/i386-pc.rmk: Include conf/common.mk.
10094 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10095 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10096 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10097 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10098 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10099 configfile.mod, search.mod, gzio.mod and test.mod.
10100 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10101 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10102 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10103 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10104 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10105 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10106 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10107 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10108 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10109 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10110 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10111 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10112 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10113 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10114 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10115 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10116 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10117 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10118 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10119 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10120 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10121 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10122 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10124 * conf/common.rmk: ... to here. New file.
10126 * conf/common.mk: New file.
10128 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10130 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10131 (grub_script.tab.c): ... here.
10133 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10134 (grub_script.tab.c): ... here.
10136 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10137 (grub_script.tab.c): ... here.
10139 * normal/command.c (grub_command_find): Fixed a memory leak of
10140 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10142 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10144 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10145 "@" which marks the start of a comment on ARM.
10146 (VARIABLE): Likewise.
10148 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10150 Add support for Linux/ADFS partition tables.
10152 * partmap/acorn.c: New file.
10154 * include/grub/acorn_filecore.h: Likewise.
10156 * DISTLIST: Added `partmap/acorn.c' and
10157 `include/grub/acorn_filecore.h'.
10159 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10161 (pkgdata_MODULES): Add `acorn.mod'.
10162 (acorn_mod_SOURCES): New variable.
10163 (acorn_mod_CFLAGS): Likewise.
10165 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10167 (pkgdata_MODULES): Add `acorn.mod'.
10168 (acorn_mod_SOURCES): New variable.
10169 (acorn_mod_CFLAGS): Likewise.
10171 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10172 (pkgdata_MODULES): Add `acorn.mod'.
10173 (acorn_mod_SOURCES): New variable.
10174 (acorn_mod_CFLAGS): Likewise.
10175 (acorn_mod_LDFLAGS): Likewise.
10177 * include/types.h (grub_disk_addr_t): New typedef.
10179 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
10181 * geninit.sh: New file.
10183 * geninitheader.sh: Likewise.
10185 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10186 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10187 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10188 * commands/configfile.c (grub_configfile_init)
10189 (grub_configfile_fini): Likewise.
10190 * commands/default.c (grub_default_init, grub_default_fini):
10192 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10193 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10194 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10195 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10197 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10198 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10200 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
10201 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
10203 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10205 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
10207 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10208 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10209 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10210 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10211 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10212 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10213 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10214 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10215 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10216 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10217 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10218 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10219 * partmap/amiga.c (grub_amiga_partition_map_init)
10220 (grub_amiga_partition_map_fini): Likewise.
10221 * partmap/apple.c (grub_apple_partition_map_init)
10222 (grub_apple_partition_map_fini): Likewise.
10223 * partmap/pc.c (grub_pc_partition_map_init)
10224 (grub_pc_partition_map_fini): Likewise.
10225 * partmap/sun.c (grub_sun_partition_map_init,
10226 grub_sun_partition_map_fini): Likewise.
10227 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10230 * util/grub-emu.c: Include <grub_modules_init.h>.
10231 (main): Don't initialize and de-initialize any modules directly,
10232 use `grub_init_all' and `grub_fini_all' instead.
10234 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10235 `grub_vesafb_mod_init'.
10236 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10238 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10239 `grub_vga_mod_init'. Updated all users.
10240 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
10242 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10243 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10246 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10247 Generate a function to initialize the module in utilities.
10248 Updated all callers.
10249 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10250 initialize the module in utilities. Updated all callers.
10252 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10254 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10255 escape sequence and a literal ^L to clear the screen.
10257 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10258 when returning from Open Firmware.
10260 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10262 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10263 (grub_ofconsole_height): Likewise.
10264 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10265 manually insert a '\n'.
10266 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10267 `grub_ofconsole_height'. Return early if these are already set.
10269 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10271 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10272 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10273 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10274 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10275 and `normal/script.c'.
10276 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10277 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10278 (test_mod_SOURCES): New variable.
10279 (test_mod_CFLAGS): Likewise.
10280 (test_mod_LDFLAGS): Likewise.
10281 (pkgdata_MODULES): Add `test.mod'.
10282 (grub_script.tab.c): New rule.
10283 (grub_script.tab.h): Likewise.
10285 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
10287 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10288 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10289 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10290 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10291 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10292 (test_mod_SOURCES): New variable.
10293 (test_mod_CFLAGS): Likewise.
10294 (pkgdata_MODULES): Add `test.mod'.
10295 (grub_script.tab.c): New rule.
10296 (grub_script.tab.h): Likewise.
10298 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
10300 Add initial scripting support.
10302 * commands/test.c: New file.
10303 * include/grub/script.h: Likewise.
10304 * normal/execute.c: Likewise.
10305 * normal/function.c: Likewise.
10306 * normal/lexer.c: Likewise.
10307 * normal/parser.y: Likewise.
10308 * normal/script.c: Likewise.
10310 * configure.ac: Add `AC_PROG_YACC' test.
10312 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10313 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10314 `normal/function.c' and `normal/script.c'.
10315 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10316 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10317 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10319 (pkgdata_MODULES): Add `test.mod'.
10320 (grub_script.tab.c): New rule.
10321 (grub_script.tab.h): Likewise.
10323 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10325 * include/grub/normal.h (grub_test_init): New prototype.
10326 (grub_test_fini): Likewise.
10328 * normal/command.c: Include <grub/script.h>.
10329 (grub_command_execute): Rewritten.
10331 * util/grub-emu.c (main): Call `grub_test_init' and
10334 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10336 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10338 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10339 there are no pending characters.
10341 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10343 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10344 `grub_strndup' to drop device arguments. Replace unnecessary
10345 `grub_strndup' with `grub_strdup'.
10347 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10349 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10350 `debug' environment variable has been set.
10352 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
10354 * Makefile.in (install-local): Use $(DATA).
10355 (uninstall): Likewise.
10356 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10357 (sbin_UTILITIES): ... to here.
10358 (sbin_SCRIPTS): New variable.
10359 (grub_install_SOURCES): New variable.
10360 * util/powerpc/ieee1275/grub-install.in: New file.
10361 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10363 (add_segments): Call `grub_util_get_path'.
10365 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10367 From Timothy Baldwin:
10368 * commands/ls.c (grub_ls_list_files): Close FILE with
10370 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10372 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
10374 * include/grub/parser.h: New file.
10376 * kern/parser.c: Likewise.
10378 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10379 (grub_setup_SOURCES): Likewise.
10380 (grub_probefs_SOURCES): Likewise.
10381 (grub_emu_SOURCES): Likewise.
10382 (kernel_img_HEADERS): Add `parser.h'.
10384 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10385 (grub_emu_SOURCES): Add `kern/parser.c'.
10386 (grubof_SOURCES): Likewise.
10388 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10389 (grubof_SOURCES): Add `kern/parser.c'.
10391 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10393 * kern/misc.c (grub_split_cmdline): Removed function.
10395 * kern/rescue.c: Include <grub/parser.h>.
10396 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10397 of `grub_split_cmdline'.
10399 * normal/command.c: Include <grub/parser.h>.
10400 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10401 of `grub_split_cmdline'.
10403 * normal/completion.c: Include <grub/parser.h>.
10404 (cmdline_state): New variable.
10405 (iterate_dir): End the filename with a quote depending on the
10406 command line state.
10407 (get_state): new function.
10408 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10409 split the arguments and determine the current argument. When the
10410 argument string is not quoted, escape all spaces.
10412 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10414 * normal/sparc64/setjmp.S: New file.
10416 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10418 * include/grub/sparc64/libgcc.h: New file.
10419 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10420 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10421 normal/sparc64/setjmp.c.
10423 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10425 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10426 * kern/sparc64/cache.S: New file.
10427 * kern/sparc64/cache.c: Removed.
10428 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10429 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10431 (COMMON_LDFLAGS): Add -melf64_sparc.
10432 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10433 (grubof_SOURCES): Use cache.S instead of cache.c.
10434 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10435 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10436 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10438 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10439 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10440 (linux_mod_CFLAGS): Commented out.
10441 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10442 out because module isn't built.
10443 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10444 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10445 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10446 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10447 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10448 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10449 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10450 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10451 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10452 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10453 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10454 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10455 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10456 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10458 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10460 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10461 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10462 longer, because HFS should not be used on PC.
10464 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10466 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10467 consistently within the loop.
10469 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
10471 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10472 directory can not be read.
10474 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10476 * configure.ac (AC_INIT): Increase the version number to 1.91.
10478 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10479 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10480 term/i386/pc/serial.c.
10482 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10484 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10485 file size must be permitted.
10487 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10488 between %ah and %al.
10490 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10492 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10494 Call the hook with a NUL-terminated filename.
10495 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10498 * kern/term.c (cursor_state): New variable.
10499 (grub_term_set_current): Reset the cursor state on a new
10501 (grub_setcursor): Rewritten to use CURSOR_STATE.
10502 (grub_getcursor): New function.
10504 * include/grub/term.h (grub_getcursor): New prototype.
10506 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10507 integers on ARM. Reported by Timothy Baldwin
10508 <T.E.Baldwin99@members.leeds.ac.uk>.
10510 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
10512 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10514 (grub_sfs_dir): Likewise.
10516 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
10518 Add support for the SFS filesystem.
10520 * fs/sfs.c: New file.
10522 * DISTLIST: Added `fs/sfs.c'.
10524 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10525 (grub_probefs_SOURCES): Likewise.
10526 (grub_emu_SOURCES): Likewise.
10527 (pkgdata_MODULES): Add `sfs.mod'.
10528 (sfs_mod_SOURCES): New variable.
10529 (sfs_mod_CFLAGS): Likewise.
10530 (sfs_mod_LDFLAGS): Likewise.
10532 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10533 (pkgdata_MODULES): Add `sfs.mod'.
10534 (sfs_mod_SOURCES): New variable.
10535 (sfs_mod_CFLAGS): Likewise.
10537 * util/grub-emu.c (main): Call `grub_sfs_init' and
10540 * include/grub/fs.h (grub_sfs_init): New prototype.
10541 (grub_sfs_fini): Likewise.
10543 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
10545 Add support for the AFFS filesystem.
10547 * fs/affs.c: New file.
10549 * DISTLIST: Added `fs/affs.c'.
10551 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10552 (grub_probefs_SOURCES): Likewise.
10553 (grub_emu_SOURCES): Likewise.
10554 (pkgdata_MODULES): Add `affs.mod'.
10555 (affs_mod_SOURCES): New variable.
10556 (affs_mod_CFLAGS): Likewise.
10557 (affs_mod_LDFLAGS): Likewise.
10559 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10560 (pkgdata_MODULES): Add `affs.mod'.
10561 (affs_mod_SOURCES): New variable.
10562 (affs_mod_CFLAGS): Likewise.
10564 * util/grub-emu.c (main): Call `grub_affs_init' and
10567 * include/grub/fs.h (grub_affs_init): New prototype.
10568 (grub_affs_fini): Likewise.
10570 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10572 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10574 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10576 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10579 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10582 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10583 (COMMON_LDFLAGS): New variable.
10584 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10585 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10586 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10587 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10588 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10589 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10590 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10591 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10592 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10593 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10594 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10595 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10596 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10597 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10598 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10600 (normal_mod_ASFLAGS): Add `-m32'.
10602 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10603 (grub_host_size_t, grub_host_ssize_t): New types.
10604 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10605 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10606 `GRUB_HOST_SIZEOF_VOID_P'.
10608 * include/grub/kernel.h (struct grub_module_header): Type of
10609 member offset changed to `grub_host_off_t'. Type of member size
10610 changed to `grub_host_size_t'.
10611 (struct grub_module_info): Type of member offset changed to
10612 `grub_host_off_t'. Type of member size changed to
10613 `grub_host_size_t'.
10615 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10617 Make GRUB's kernel compliant to Multiboot Specification.
10619 * kern/i386/pc/startup.S (multiboot_header): New label.
10620 (multiboot_entry): Likewise.
10621 (multiboot_trampoline): Likewise.
10623 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10624 Increased to 0x4A0.
10626 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10627 put parentheses after a question mark.
10628 [!GRUB_UTIL] (my_mod): New variable.
10630 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10632 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
10634 Adds support for the XFS filesystem. Btrees are not supported
10637 * fs/xfs.c: New file.
10639 * DISTLIST: Added `fs/xfs.c'.
10641 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10642 (grub_probefs_SOURCES): Likewise.
10643 (grub_emu_SOURCES): Likewise.
10644 (pkgdata_MODULES): Add `xfs.mod'.
10645 (xfs_mod_SOURCES): New variable.
10646 (xfs_mod_CFLAGS): Likewise.
10648 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10649 (pkgdata_MODULES): Add `xfs.mod'.
10650 (xfs_mod_SOURCES): New variable.
10651 (xfs_mod_CFLAGS): Likewise.
10653 * util/grub-emu.c (main): Call `grub_xfs_init' and
10656 * include/grub/fs.h (grub_xfs_init): New prototype.
10657 (grub_xfs_fini): Likewise.
10660 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10662 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10663 color modes, allow greater than 16 colors to be configured as
10666 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10668 * normal/completion.c (complete_arguments): Add the qualifier
10669 const into OPTIONS.
10671 From Omniflux <omniflux+lists@omniflux.com>:
10672 * include/grub/terminfo.h: New file.
10673 * include/grub/tparm.h: Likewise.
10674 * include/grub/i386/pc/serial.h: Likewise.
10675 * term/terminfo.c: Likewise.
10676 * term/tparm.c: Likewise.
10677 * term/i386/pc/serial.c: Likewise.
10678 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10680 (terminfo_mod_SOURCES): New variable.
10681 (terminfo_mod_CFLAGS): Likewise.
10682 (serial_mod_SOURCES): Likewise.
10683 (serial_mod_CFLAGS): Likewise.
10685 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10687 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10688 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10689 and kern/powerpc/ieee1275/cmain.c, respectively.
10691 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10692 * kern/powerpc/ieee1275/crt0.S: ... here.
10694 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10695 * kern/powerpc/ieee1275/cmain.c: ... here.
10697 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10698 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10699 instead of boot/powerpc/ieee1275/crt0.S and
10700 boot/powerpc/ieee1275/cmain.c, respectively.
10702 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10703 sectors. It was not used anyway.
10705 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10707 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10708 `unused parameter' warning.
10710 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10712 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10714 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10717 2005-08-28 Marco Gerards <metgerards@student.han.nl>
10719 * include/grub/normal.h (enum grub_completion_type): Added
10720 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10722 * normal/cmdline.c (print_completion): Handle
10723 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10724 * normal/menu_entry.c (store_completion): Likewise.
10726 * normal/completion.c (complete_arguments): New function.
10727 (grub_normal_do_completion): Call `complete_arguments' when the
10728 current words start with a dash.
10730 2005-08-27 Marco Gerards <metgerards@student.han.nl>
10732 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10733 `gzio.mod' instead of `io.mod').
10735 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10737 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10738 (DISTDIRS): Added io and video.
10739 Rewrite the search routine to make an output consistently.
10741 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10742 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10743 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10744 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10745 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10746 util/powerpc/ieee1275/misc.c.
10748 * include/grub/gzio.h: New file.
10749 * io/gzio.c: Likewise.
10751 * kern/file.c (grub_file_close): Call grub_device_close only if
10752 FILE->DEVICE is not NULL.
10754 * include/grub/mm.h [!NULL] (NULL): New macro.
10756 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10758 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10759 (pkgdata_MODULES): Added gzio.mod.
10760 (gzio_mod_SOURCES): New variable.
10761 (gzio_mod_CFLAGS): Likewise.
10763 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10764 (pkgdata_MODULES): Added gzio.mod.
10765 (gzio_mod_SOURCES): New variable.
10766 (gzio_mod_CFLAGS): Likewise.
10768 * commands/cat.c: Include grub/gzio.h.
10769 (grub_cmd_cat): Use grub_gzfile_open instead of
10772 * commands/cmp.c: Include grub/gzio.h.
10773 (grub_cmd_cmp): Use grub_gzfile_open instead of
10776 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10777 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10779 (grub_rescue_cmd_module): Likewise.
10781 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10783 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10784 kern/sparc64/ieee1275/init.c because it contains _start.
10785 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10787 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10789 * configure.ac: Add support for sparc64 host with ieee1275
10791 * configure: Generated from configure.ac.
10792 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10794 (grub_ofdisk_read): Likewise.
10795 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10796 pointers as (void *) to remove a warning.
10797 (grub_ofdisk_close): Likewise.
10798 (grub_ofdisk_read): Likewise.
10799 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10800 returns, so make it return void to remove a warning.
10801 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10802 Corresponding prototype change.
10803 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10804 values, and cast the pointers as (void *) to remove a warning.
10805 (grub_mm_dump): Likewise.
10806 * conf/sparc64-ieee1275.mk: New file.
10807 * conf/sparc64-ieee1275.rmk: Likewise.
10808 * include/grub/sparc64/setjmp.h: Likewise.
10809 * include/grub/sparc64/types.h: Likewise.
10810 * include/grub/sparc64/ieee1275/console.h: Likewise.
10811 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10812 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10813 * include/grub/sparc64/ieee1275/time.h: Likewise.
10814 * kern/sparc64/cache.c: Likewise.
10815 * kern/sparc64/dl.c: Likewise.
10816 * kern/sparc64/ieee1275/init.c: Likewise.
10817 * kern/sparc64/ieee1275/openfw.c: Likewise.
10819 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10821 * util/console.c (grub_ncurses_putchar): If C is greater than
10822 0x7f, set C to a question mark.
10823 (grub_ncurses_getcharwidth): New function.
10824 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10827 * normal/menu.c (print_entry): Made aware of Unicode. First,
10828 convert TITLE to UCS-4, and predict the cursor position by
10831 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10833 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10835 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10837 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10838 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10841 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10842 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10843 grub_strcpy and grub_strlen. Take it into account that a space
10844 character is inserted as a delimiter.
10846 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10848 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10849 invalid magic in the error.
10851 * commands/search.c: New file.
10853 * util/grub-emu.c (main): Call grub_search_init and
10856 * kern/rescue.c (grub_rescue_print_disks): Removed.
10857 (grub_rescue_print_devices): New function.
10858 (grub_rescue_cmd_ls): Use grub_device_iterate with
10859 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10860 grub_rescue_print_disks.
10862 * kern/partition.c (grub_partition_iterate): Return the result of
10863 PARTMAP->ITERATE instead of GRUB_ERRNO.
10865 * kern/device.c: Include grub/partition.h.
10866 (grub_device_iterate): New function.
10868 * include/grub/partition.h (grub_partition_iterate): Return int
10869 instead of grub_err_t.
10871 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10873 [GRUB_UTIL] (grub_search_fini): Likewise.
10875 * include/grub/device.h (grub_device_iterate): New prototype.
10877 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10879 (pkgdata_MODULES): Added search.mod.
10880 (search_mod_SOURCES): New variable.
10881 (search_mod_CFLAGS): Likewise.
10883 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10884 (pkgdata_MODULES): Added search.mod.
10885 (search_mod_SOURCES): New variable.
10886 (search_mod_CFLAGS): Likewise.
10888 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10889 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10890 All callers changed.
10892 * DISTLIST: Added commands/search.c.
10894 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10896 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10898 (grub_getcharwidth): New function.
10900 * kern/misc.c (grub_utf8_to_ucs4): New function.
10902 * include/grub/term.h (struct grub_term): Added a new member
10904 (grub_getcharwidth): New prototype.
10906 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10908 * term/i386/pc/console.c (map_char): New function. Segregated from
10909 grub_console_putchar.
10910 (grub_console_putchar): Use map_char.
10911 (grub_console_getcharwidth): New function.
10912 (grub_console_term): Specified grub_console_getcharwidth as
10915 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10916 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10918 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10920 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10921 on grub_strtoul completely.
10922 (write_char): Declare local variables in the beginning of the
10924 (grub_vesafb_getcharwidth): New function.
10925 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10928 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10930 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10931 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10932 commands/i386/pc/vbetest.c.
10934 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10935 call grub_vbe_get_controller_info again, because the returned
10936 information is volatile.
10937 (grub_vbe_set_video_mode): Mostly rewritten.
10938 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10939 grub_vbe_status_t correctly.
10940 (grub_vbe_get_video_mode_info): Likewise.
10941 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10942 several if statements.
10944 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10945 * commands/i386/pc/vbeinfo.c: ... this.
10947 * commands/i386/pc/vbe_test.c: Renamed to ...
10948 * commands/i386/pc/vbetest.c: ... this.
10950 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10952 (grub_cmd_vbeinfo): ... this. Save video modes before
10953 iterating. Skip a video mode, if it is not available, not enough
10954 information is given or it is monochrome. Show the memory
10955 model. Leave the interpretation of MODEVAR to grub_strtoul
10957 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10958 (GRUB_MOD_FINI): Likewise.
10960 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10961 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10962 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10963 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10964 grub_strtoul completely.
10965 (real2pm): Removed.
10966 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10967 (GRUB_MOD_FINI): Likewise.
10969 * normal/misc.c: Include grub/mm.h.
10971 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10972 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10973 (vbe_list_modes_mod_SOURCES): Removed.
10974 (vbe_list_modes_mod_CFLAGS): Likewise.
10975 (vbe_test_mod_SOURCES): Likewise.
10976 (vbe_test_mod_CFLAGS): Likewise.
10977 (vbeinfo_mod_SOURCES): New variable.
10978 (vbeinfo_mod_CFLAGS): Likewise.
10979 (vbetest_mod_SOURCES): Likewise.
10980 (vbetest_mod_CFLAGS): Likewise.
10982 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10984 * normal/misc.c: New file.
10986 * DISTLIST: Added normal/misc.c.
10988 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10989 DISK to HOOK. Call HOOK with DISK.
10990 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10991 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10992 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10994 * normal/menu_entry.c (struct screen): Added a new member
10995 "completion_shown".
10996 (completion_buffer): New global variable.
10997 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10998 (store_completion): New function.
10999 (complete): Likewise.
11000 (clear_completions): Likewise.
11001 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11002 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11003 a tab, call complete.
11005 * normal/completion.c (disk_dev): Removed.
11006 (print_simple_completion): Likewise.
11007 (print_partition_completion): Likewise.
11008 (print_func): New global variable.
11009 (add_completion): Do not take the arguments WHAT or PRINT any
11010 longer. Added a new argument TYPE. Instead of printing directly,
11011 call PRINT_FUNC if not NULL.
11012 All callers changed.
11013 (complete_device): Use a local variable DEV instead of
11014 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11015 (grub_normal_do_completion): Take a new argument HOOK. Do not
11016 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11017 empty string, return NULL instead.
11018 All callers changed.
11020 * normal/cmdline.c (print_completion): New function.
11022 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11024 All callers changed.
11026 * kern/disk.c (grub_print_partinfo): Removed.
11028 * include/grub/partition.h (struct grub_partition_map): Add a new
11029 argument DISK into HOOK of ITERATE.
11030 (grub_partition_iterate): Add a new argument DISK to HOOK.
11032 * include/grub/normal.h (enum grub_completion_type): New enum.
11033 (grub_completion_type_t): New type.
11034 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11035 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11036 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11037 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11038 (grub_normal_do_completion): Added a new argument HOOK.
11039 (grub_normal_print_device_info): New prototype.
11041 * include/grub/disk.h (grub_print_partinfo): Removed.
11043 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11044 (normal_mod_SOURCES): Likewise.
11045 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11046 (normal_mod_SOURCES): Likewise.
11048 * commands/ls.c (grub_ls_list_disks): Use
11049 grub_normal_print_device_info instead of grub_print_partinfo. Free
11051 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11052 duplicating the code.
11054 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11056 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
11057 follow GCS more precisely.
11058 * commands/i386/pc/vbe_test.c: Likewise.
11059 * include/grub/i386/pc/vbe.h: Likewise.
11060 * term/i386/pc/vesafb.c: Likewise.
11061 * video/i386/pc/vbe.c: Likewise.
11063 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11065 * DISTLIST: Added term/i386/pc/vesafb.c
11066 DISTLIST: Added video/i386/pc/vbe.c
11067 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11068 DISTLIST: Added commands/i386/pc/vbe_test.c.
11069 * commands/i386/pc/vbe_list_modes.c: New file.
11070 * commands/i386/pc/vbe_test.c: Likewise.
11071 * term/i386/pc/vesafb.c: Likewise.
11072 * video/i386/pc/vbe.c: Likewise.
11073 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11074 (grub_vbe_probe) Added prototype.
11075 (grub_vbe_set_video_mode) Likewise.
11076 (grub_vbe_get_video_mode) Likewise.
11077 (grub_vbe_get_video_mode_info) Likewise.
11078 (grub_vbe_set_pixel_rgb) Likewise.
11079 (grub_vbe_set_pixel_index) Likewise.
11080 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11081 (pkgdata_MODULES): Added vesafb.mod.
11082 (pkgdata_MODULES): Added vbe_list_modes.mod.
11083 (pkgdata_MODULES): Added vbe_test.mod.
11084 (vbe_mod_SOURCES): Added.
11085 (vbe_mod_CFLAGS): Likewise.
11086 (vesafb_mod_SOURCES): Likewise.
11087 (vesafb_mod_CFLAGS): Likewise.
11088 (vbe_list_modes_mod_SOURCES): Likewise.
11089 (vbe_list_modes_mod_CFLAGS): Likewise.
11090 (vbe_test_mod_SOURCES): Likewise.
11091 (vbe_test_mod_CFLAGS): Likewise.
11093 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11095 * normal/command.c (grub_command_execute): If INTERACTIVE is
11096 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11097 CMDLINE. Disable the pager if INTERACTIVE is true.
11098 All callers are changed.
11100 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11101 before reading a config file.
11102 * normal/main.c (read_config_file): Even if a command is not
11103 found, register it if it is within an entry.
11105 * util/grub-emu.c: Include sys/types.h and unistd.h.
11106 (options): Added --hold.
11107 (struct arguments): Added a new member "hold".
11108 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11110 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11111 cleared by a debugger, if it is not zero.
11113 * include/grub/normal.h (grub_command_execute): Add an argument
11116 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11118 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11120 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11122 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11123 program with another one, because the old one didn't detect a bug
11124 in gcc-3.4. Always use regparm 2, because the new test is still
11125 not enough for gcc-4.0. Someone must investigate a simple test
11126 case which detects a bug in gcc-4.0.
11128 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11130 * DISTLIST: Added normal/completion.c.
11132 * normal/completion.c: New file.
11134 * term/i386/pc/console.c (grub_console_getwh): New function.
11135 (grub_console_term): Assign grub_console_getwh to getwh.
11137 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11138 function is defined in normal/completion.c as
11139 grub_normal_do_completion.
11140 (grub_cmdline_get): Use grub_normal_do_completion instead of
11143 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11144 returns non-zero, otherwise return 0.
11145 (grub_partition_iterate): First, probe the partition map. Then,
11146 call ITERATE only for this partition map.
11148 * kern/misc.c (grub_strncmp): Rewritten.
11150 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11151 returns non-zero. Otherwise return 0.
11153 * include/grub/partition.h (grub_partition_map_iterate): Return
11154 int instead of void.
11156 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11158 * include/grub/misc.h (grub_strncmp): Change the type of N to
11161 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11164 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
11165 unsigned explicitly before comparing it with I.
11167 * kern/main.c (grub_env_write_root): Add the attribute unused into
11170 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11171 normal/completion.c.
11172 (normal_mod_SOURCES): Likewise.
11173 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11174 (normal_mod_SOURCES): Likewise.
11176 * normal/command.c (grub_iterate_commands): If ITERATE returns
11177 non-zero, return one immediately.
11179 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11181 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11182 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11184 (grub_vbe_get_controller_info): New function.
11185 (grub_vbe_get_mode_info): Likewise.
11186 (grub_vbe_set_mode): Likewise.
11187 (grub_vbe_get_mode): Likewise.
11188 (grub_vbe_set_memory_window): Likewise.
11189 (grub_vbe_get_memory_window): Likewise.
11190 (grub_vbe_set_scanline_length): Likewise.
11191 (grub_vbe_get_scanline_length): Likewise.
11192 (grub_vbe_set_display_start): Likewise.
11193 (grub_vbe_get_display_start): Likewise.
11194 (grub_vbe_set_palette_data): Likewise.
11195 * include/grub/i386/pc/vbe.h: New file.
11197 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11199 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11200 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11201 * DISTLIST: Likewise.
11202 * kern/ieee1275/of.c: Moved to ...
11203 * kern/ieee1275/ieee1275.c: ... here.
11205 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11207 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11208 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11209 Pass 0 as `end' parameter to grub_strtoul().
11211 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11213 * include/grub/powerpc/ieee1275/console.h: Do not include
11214 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11216 (grub_console_cur_color): Remove i386-specific prototype.
11217 (grub_console_real_putchar): Likewise.
11218 (grub_console_checkkey): Likewise.
11219 (grub_console_getkey): Likewise.
11220 (grub_console_getxy): Likewise.
11221 (grub_console_gotoxy): Likewise.
11222 (grub_console_cls): Likewise.
11223 (grub_console_setcursor): Likewise.
11224 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11225 Include <grub/machine/console.h>.
11226 * term/ieee1275/ofconsole.c: Likewise.
11228 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11230 * Makefile.in (LIBLZO): New variable.
11232 * configure.ac: Check for LZO version 2.
11234 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11235 lzo/lzo1x.h instead of lzo1x.h.
11237 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11240 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11241 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11243 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11244 copying the data from PARTITION to P.
11246 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11248 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11249 negative, unload the module.
11251 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11252 map is "pc_partition_map" but not "pc".
11253 (usage): Fix the description. The options are --boot-image and
11254 --core-image but not --boot-file or --core-file.
11255 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11256 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11259 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11260 --core-file. Specify INSTALL_DEVICE as an argument.
11262 * util/console.c: Include config.h.
11263 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11264 [HAVE_NCURSES_H]: Include ncurses.h.
11265 [HAVE_CURSES_H]: Include curses.h.
11266 [!A_NORMAL] (A_NORMAL): Defined as zero.
11267 [!A_STANDOUT] (A_STANDOUT): Likewise.
11269 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11271 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11273 * configure.ac: Check for curses libraries and headers.
11275 * Makefile.in (LIBCURSES): New variable.
11277 * genmk.rb (Script::rule): Set the executable bits.
11279 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11280 name of the PC partition map is "pc_partition_map" but not "pc".
11282 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11284 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11285 (modules): Likewise.
11286 (usage): Added descriptions for --modules and --grub-probefs.
11287 Handle --modules and --grub-probefs. Save the arguments in MODULES
11288 and GRUB_PROBEFS, respectively.
11289 Auto-detect a filesystem module against GRUBDIR. If the result is
11290 empty and modules are not specified explicitly, abort the
11291 installation. Add the result to MODULES.
11293 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11294 disk/powerpc/ieee1275/ofdisk.c,
11295 include/grub/powerpc/ieee1275/init.h and
11296 term/powerpc/ieee1275/ofconsole.c.
11297 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11298 term/ieee1275/ofconsole.c.
11300 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11302 * COPYING: Upgraded to the latest version. Only the address of the
11303 FSF office has changed.
11305 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11307 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11308 kern/ieee1275.c with kern/ieee1275/of.c.
11310 * kern/ieee1275.c: Moved to ...
11311 * kern/ieee1275/of.c: ... here.
11313 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11315 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
11318 * config.guess: Updated to the latest version from gnulib.
11319 * config.sub: Likewise.
11320 * install.sh: Likewise.
11321 * mkinstalldirs: Likewise.
11323 * include/grub/console.h: Removed. This file is arch-specific. Do
11324 not put this in include/grub.
11326 * include/grub/i386/pc/console.h: Resurrected.
11328 * util/console.c: Include grub/machine/console.h instead of
11330 * util/grub-emu.c: Likewise.
11332 2005-08-04 Marco Gerards <metgerards@student.han.nl>
11334 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11337 From Vincent Pelletier <subdino2004@yahoo.fr>
11338 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11339 Redefined to use grub_getwh.
11340 (grub_term): New member named getwh.
11341 (grub_getwh): New prototype.
11342 * kern/term.c (grub_getwh): New function.
11343 * term/i386/pc/console.c (grub_console_getwh): New function.
11344 (grub_console_term): New member `getwh'.
11345 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11346 (grub_vga_term): New member `getwh'.
11347 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
11349 (grub_ofconsole_getw): New function.
11350 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11351 (grub_ofconsole_term): New field named getwh and new initial
11354 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11356 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11357 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11358 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11359 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11360 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11361 of <grub/machine/ieee1275.h>.
11362 * commands/ieee1275/reboot.c: Likewise.
11363 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11364 * kern/ieee1275.c: ... to here. All users updated. Change all
11365 parameter structs to use new type `grub_ieee1275_cell_t'.
11366 * term/powerpc/ieee1275/ofconsole.c: Move ...
11367 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11368 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11369 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11370 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11372 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11373 Remove unused prototypes. All users updated.
11374 * include/grub/powerpc/ieee1275/console.h: Removed.
11375 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11376 `grub_ieee1275_cell_t'.
11377 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11378 Cast comparisons with -1 to the correct type.
11379 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11380 type to match `grub_ieee1275_entry_fn'.
11382 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11384 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11386 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11387 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11389 (grub_probefs_SOURCES): New variable.
11391 * util/i386/pc/grub-probefs.c: New file.
11393 * util/i386/pc/grub-setup.c (main): Call
11394 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11395 grub_hfs_init and grub_jfs_init to initialize the system. Call
11396 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11397 grub_pc_partition_map_fini to finish the system.
11399 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11401 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11403 (grub_multiboot_load_elf32): Likewise.
11404 (grub_multiboot_is_elf64): Likewise.
11405 (grub_multiboot_load_elf64): Likewise.
11406 (grub_multiboot_load_elf): Likewise.
11407 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11408 an ELF32 or ELF64 file.
11409 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11411 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11412 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11413 NULL before calling FS->LABEL.
11414 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11415 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11416 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11417 before calling FS->LABEL.
11419 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11421 * util/i386/pc/grub-install.in (datadir): New variable.
11423 (pkgdatadir): New variable.
11424 (pkglibdir): Removed.
11426 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11428 * DISTLIST: Added util/i386/pc/grub-install.in.
11430 * util/i386/pc/grub-install.in: New file.
11432 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11433 (grub_install_SOURCES): Likewise.
11435 * genmk.rb: Added support for scripts.
11436 (Script): New class.
11437 (scripts): New variable.
11439 * Makefile.in (install-local): Install sbin_SCRIPTS by
11441 (uninstall): Remove sbin_SCRIPTS.
11443 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11444 device, try to get a GRUB device by
11445 grub_util_biosdisk_get_grub_dev.
11448 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11449 description for --device-map.
11451 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11453 Change the semantics of variable hooks. They now return strings
11454 instead of error values.
11456 * util/i386/pc/grub-setup.c: Include grub/env.h.
11457 (setup): Use grub_device_set_root instead of grub_env_set.
11459 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11460 grub_env_get instead of grub_device_set_root and
11461 grub_device_get_root, respectively.
11463 * kern/main.c (grub_env_write_root): New function.
11464 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11465 grub_env_set instead of grub_device_set_root.
11467 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11469 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11470 rather than calling ENV->WRITE_HOOK afterwards.
11471 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11472 passing a pointer of a pointer.
11473 (grub_register_variable_hook): Change the types of "read_hook" and
11474 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11476 Allocate the default empty string on the heap, because this string
11477 may be freed later.
11479 * kern/device.c: Include grub/env.h.
11480 (grub_device_set_root): Removed.
11481 (grub_device_get_root): Likewise.
11482 (grub_device_open): Use grub_env_get instead of
11483 grub_device_get_root.
11485 * include/grub/env.h (grub_env_read_hook_t): New type.
11486 (grub_env_write_hook_t): Likewise.
11487 (grub_env_var): Change the types of "read_hook" and "write_hook"
11488 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11489 (grub_register_variable_hook): Likewise.
11491 * include/grub/device.h (grub_device_set_root): Removed.
11492 (grub_device_set_root): Likewise.
11494 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11495 make sure that DIRNAME terminates with '/', so that
11496 grub_fat_find_dir will fail if PATH is not a directory.
11498 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11500 Use the qualifier auto for print_files and print_files_long.
11501 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11503 Put a newline only if there is no error.
11504 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11507 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11509 * kern/partition.c (grub_partition_probe): Initialize PART to
11510 NULL. Otherwise, when no partition map is registered, this returns
11513 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11515 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11516 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11519 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11521 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11522 information on each device, if it does not have partitions. Print
11523 "Device" instead of "Disk", because this function is not specific
11526 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11527 static to ensure that it is put on the memory rather than a
11530 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11532 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11533 (grub_cat_init): Likewise.
11534 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11535 (options): Likewise.
11536 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11537 (grub_configfile_init): Likewise.
11538 * font/manager.c (GRUB_MOD_INIT): Likewise.
11539 * commands/help.c (GRUB_MOD_INIT): Likewise.
11540 (grub_help_init): Likewise.
11541 * normal/command.c (grub_command_init): Likewise.
11542 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11543 * disk/loopback.c (grub_loop_init): Likewise.
11544 (GRUB_MOD_INIT): Likewise.
11545 * commands/ls.c (grub_ls_init): Likewise.
11546 (GRUB_MOD_INIT): Likewise.
11547 (options): Likewise.
11548 * commands/boot.c (grub_boot_init): Likewise.
11549 (GRUB_MOD_INIT): Likewise.
11550 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11551 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11552 (GRUB_MOD_INIT): Likewise.
11553 * commands/cmp.c (grub_cmp_init): Likewise.
11554 (GRUB_MOD_INIT): Likewise.
11556 * normal/arg.c: Use <> instead of "" to include header files.
11557 (SHORT_ARG_HELP): New macro.
11558 (SHORT_ARG_USAGE): Likewise.
11559 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11560 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11562 (find_short): Check if C is 'h' or 'u' explicitly.
11563 (grub_arg_show_help): Use space characters instead of tabs. Treat
11564 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11565 are shown with --help and --usage only if they are not used for
11566 the command itself.
11567 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11570 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11571 const into "longarg". Change the type of "shortarg" to int.
11573 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11575 * boot/i386/pc/boot.S (boot_drive_check): New label.
11577 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11580 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11581 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11583 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11585 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11586 When turning off Gate A20, skip the check and return immediately,
11587 because this is not fatal usually.
11589 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11591 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11592 be 0x7C00 instead of 0x8000.
11594 * boot/i386/pc/pxeboot.S: Rewritten.
11596 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11598 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11601 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11603 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11604 robustness. This routine now supports a BIOS call and System
11605 Control Port A to modify the gate A20.
11607 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11608 Increased to 0x440.
11610 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11612 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11613 device path and resulting ihandle.
11614 (grub_ofdisk_close): dprintf the ihandle being closed.
11615 (grub_ofdisk_read): dprintf function parameters.
11616 * kern/mm.c (grub_mm_init_region): Likewise.
11617 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11618 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11619 size, and boot arguments.
11620 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11621 before loading into memory.
11622 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11623 before loading into memory.
11625 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11627 * kern/mm.c: Added much documentation.
11628 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11629 8, set to 5 instead of 8.
11631 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11633 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11635 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11636 (grub_mkdevicemap_SOURCES): New variable.
11638 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11639 lib/device.c of GRUB Legacy.
11641 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11643 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11644 instead of PATH is NULL.
11646 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11648 * commands/cmp.c (BUFFER_SIZE): New macro.
11649 (grub_cmd_cmp): Close the right file at the right time. Compare
11650 only data just read. Don't report files of different size as
11651 identical. Dynamically allocate buffers. Move variable
11652 declarations at the beginning of function.
11654 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
11656 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11659 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11661 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11662 when backspace is pressed at beginning of line.
11664 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
11666 * DISTLIST: Added genfslist.sh.
11668 * normal/main.c (fs_module_list): New variable.
11669 (autoload_fs_module): New function.
11670 (read_fs_list): Likewise.
11671 (grub_normal_execute): Call read_fs_list.
11673 * kern/fs.c (grub_fs_autoload_hook): New variable.
11674 (grub_fs_probe): Added support for auto-loading.
11676 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11677 (grub_fs_module_list_t): New type.
11679 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11680 (grub_fs_autoload_hook): New prototype.
11682 * genfslist.sh: New file.
11684 * genmk.rb: Added a rule to generate a filesystem list.
11686 2005-06-30 Marco Gerards <metgerards@student.han.nl>
11688 * configure.ac: Fix the test for cross-compiling.
11690 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11691 define GRUB_UTIL anymore.
11693 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11694 so this function works on other systems than just big endian.
11695 (load_modules): Likewise.
11696 (add_segments): Likewise.
11698 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11700 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11701 contains `l' modifier, get a long from va_arg().
11703 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11705 * kern/mm.c (grub_free): If the next free block which is being
11706 merged is the first free block, set the first block to the block
11708 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11710 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11712 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11713 `grub_ieee1275_chosen'.
11715 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11717 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11718 (grub_ieee1275_chosen): New variable.
11719 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11721 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11722 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11723 Rename first argument to `phandle' for consistency.
11724 (grub_ieee1275_get_property_length): Likewise.
11725 (grub_ieee1275_next_property): Likewise. Change type of first argument
11726 to grub_ieee1275_phandle_t.
11727 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11728 Move export next to declaration.
11729 (grub_ieee1275_chosen): New variable.
11730 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11731 Correct cosmetic typo.
11732 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11733 `grub_ieee1275_chosen'.
11734 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11735 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11736 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11737 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11738 `grub_ieee1275_chosen'.
11740 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11742 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11744 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11745 /chosen/bootargs as "variable=value" pairs.
11747 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11749 * include/grub/misc.h (grub_dprintf): New macro.
11750 (grub_real_dprintf): New prototype.
11751 (grub_strword): Likewise.
11752 (grub_iswordseparator): Likewise.
11753 * kern/misc.c (grub_real_dprintf): New function.
11754 (grub_strword): Likewise.
11755 (grub_iswordseparator): Likewise.
11757 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11759 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11760 (roundup): Remove macro.
11761 (grub_ieee1275_flags): Make static.
11762 (grub_ieee1275_realmode): Remove.
11763 (grub_ieee1275_test_flag): New function.
11764 (grub_ieee1275_set_flag): Likewise.
11765 (find_options): Rename to `grub_ieee1275_find_options'; update
11766 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11767 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11768 (cmain): New prototype.
11769 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11770 `grub_ieee1275_flags' directly.
11771 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11772 machine/biosdisk.h.
11773 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11774 Don't include grub/machine/init.h.
11775 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11776 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11778 (grub_ieee1275_realmode): Likewise.
11779 (grub_ieee1275_flag): New enum.
11780 (grub_ieee1275_test_flag): New prototype.
11781 (grub_ieee1275_set_flag): New prototype.
11782 * include/grub/powerpc/ieee1275/init.h: Remove file.
11783 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11784 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11785 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11786 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11788 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11789 `grub_ieee1275_test_flag'.
11790 (grub_ieee1275_encode_devname): Likewise.
11792 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11794 * include/grub/powerpc/ieee1275/ieee1275.h
11795 (grub_ieee1275_encode_devname): New prototype.
11796 (grub_ieee1275_get_filename): Likewise.
11797 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11799 (grub_set_prefix): Likewise.
11800 (grub_machine_init): Call grub_set_prefix.
11801 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11802 (grub_parse_type): New enum.
11803 (grub_ieee1275_get_devargs): New function.
11804 (grub_ieee1275_get_devname): Likewise.
11805 (grub_ieee1275_parse_args): Likewise.
11806 (grub_ieee1275_get_filename): Likewise.
11807 (grub_ieee1275_encode_devname): Likewise.
11809 2005-03-30 Marco Gerards <metgerards@student.han.nl>
11811 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11812 `grub_loader_unset'.
11814 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11816 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11817 instead of grub_ieee1275_interpret.
11818 (grub_halt_init): New function.
11819 (grub_halt_fini): Likewise.
11820 (GRUB_MOD_INIT): Correct message grammar.
11821 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11822 instead of grub_ieee1275_interpret.
11823 (grub_reboot_init): New function.
11824 (grub_reboot_fini): Likewise.
11825 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11826 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11827 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11828 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11829 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11831 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11833 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11835 (grub_halt): Likewise.
11836 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11837 (cmain): Remove __attribute__((unused)).
11838 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11839 (grub_heap_len): Likewise.
11840 (grub_machine_fini): New function.
11841 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11842 (grub_halt): Likewise.
11843 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11845 * util/powerpc/ieee1275/misc.c: New file.
11847 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11849 * DISTLIST: New file.
11850 * gendistlist.sh: Likewise.
11852 * Makefile.in (COMMON_DISTFILES): Removed.
11853 (BOOT_DISTFILES): Likewise.
11854 (CONF_DISTFILES): Likewise.
11855 (DISK_DISTFILES): Likewise.
11856 (FS_DISTFILES): Likewise.
11857 (INCLUDE_DISTFILES): Likewise.
11858 (KERN_DISTFILES): Likewise.
11859 (LOADER_DISTFILES): Likewise.
11860 (TERM_DISTFILES): Likewise.
11861 (UTIL_DISTFILES): Likewise.
11862 (DISTFILES): Likewise.
11863 (uninstall): Uninstall files in $(pkgdata_DATA).
11864 (DISTLIST): New target.
11865 (distdir): Use the contents of the file DISTLIST to get a list of
11868 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11870 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11871 descriptor. This is ported from GRUB Legacy.
11873 * gencmdlist.sh: Added an extra semicolon to make it work with
11874 old sed versions. Reported by Robert Bihlmeyer
11875 <robbe@orcus.priv.at>.
11877 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
11879 Automatic loading of commands is supported.
11881 * normal/main.c (read_command_list): New function.
11882 (grub_normal_execute): Call read_command_list.
11884 * normal/command.c (grub_register_command): Return zero or CMD.
11885 Allocate CMD->NAME from the heap.
11886 Initialize CMD->MODULE_NAME to zero.
11887 Find the same name as well. If the same command is found and it is
11888 a dummy command, overwrite members. If it is not a dummy command,
11890 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11891 (grub_command_find): If a dummy command is found, load a module
11892 and retry to find a command only once.
11894 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11895 make sure that each command is loaded.
11897 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11899 (struct grub_command): Remove const from the member `name'.
11900 Add a new member `module_name'.
11901 (grub_register_command): Return grub_command_t.
11903 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11904 sure that each command is loaded.
11906 * genmk.rb (PModule::rule): Specify a module name without the
11907 suffix ".mod" to gencmdlist.sh.
11909 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11911 * gencmdlist.sh: New file.
11913 * genmk.rb (PModule::rule): Generate a rule for a command list.
11915 Generate command.lst from $(COMMANDFILES).
11917 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11918 (DATA): Added $(pkgdata_DATA).
11919 (install-local): Install files in $(pkgdata_DATA).
11921 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11923 * term/i386/pc/vga.c (debug_command): Removed.
11924 (GRUB_MOD_INIT): Do not register the command "debug".
11926 From Hollis Blanchard:
11927 * commands/configfile.c: New file.
11928 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11929 commands/configfile.c.
11930 (pkgdata_MODULES): Added configfile.mod.
11931 (configfile_mod_SOURCES): New variable.
11932 (configfile_mod_CFLAGS): Likewise.
11933 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11934 commands/configfile.c.
11935 (pkgdata_MODULES): Added configfile.mod.
11936 (configfile_mod_SOURCES): New variable.
11937 (configfile_mod_CFLAGS): Likewise.
11938 * util/grub-emu.c (main): Call grub_configfile_init and
11939 grub_configfile_fini.
11940 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11942 [GRUB_UTIL] (grub_configfile_fini): Likewise.
11944 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11946 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11949 * commands/help.c (grub_cmd_help): Do not print newlines after
11950 the last command in print_command_help.
11952 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11954 * commands/default.h: New file.
11955 * commands/timeout.h: Likewise.
11956 * normal/context.c: Likewise.
11958 * util/misc.c: Do not include sys/times.h.
11959 Include sys/time.h and grub/machine/time.h.
11960 (grub_get_rtc): Rewritten with gettimeofday.
11962 * util/grub-emu.c (main): Call grub_default_init and
11963 grub_timeout_init before grub_normal_init, and call
11964 grub_timeout_fini and grub_default_fini after grub_main.
11966 * util/console.c (grub_ncurses_checkkey): Return the read
11969 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11972 * normal/main.c (read_config_file): Push MENU. If this fails,
11973 print an error and wait for a user input.
11974 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11975 If a menu is empty or an error occurs, pop MENU.
11976 (grub_normal_execute): Pop and free MENU after grub_menu_run
11979 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11981 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11983 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11985 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11987 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11990 * include/grub/normal.h (struct grub_menu_list): New struct.
11991 (grub_menu_list_t): New type.
11992 (struct grub_context): New struct.
11993 (grub_context_t): New type.
11994 (grub_register_command): Got rid of EXPORT_FUNC.
11995 (grub_unregister_command): Likewise.
11996 (grub_context_get): New prototype.
11997 (grub_context_get_current_menu): Likewise.
11998 (grub_context_push_menu): Likewise.
11999 (grub_context_pop_menu): Likewise.
12000 [GRUB_UTIL] (grub_default_init): Likewise.
12001 [GRUB_UTIL] (grub_default_fini): Likewise.
12002 [GRUB_UTIL] (grub_timeout_init): Likewise.
12003 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12005 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12006 commands/timeout.c and normal/context.c.
12007 (pkgdata_MODULES): Added default.mod and timeout.mod.
12008 (normal_mod_SOURCES): Added normal/context.c.
12009 (default_mod_SOURCES): New variable.
12010 (default_mod_CFLAGS): Likewise.
12011 (timeout_mod_SOURCES): Likewise.
12012 (timeout_mod_CFLAGS): Likewise.
12013 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12015 (pkgdata_MODULES): Added default.mod and timeout.mod.
12016 (normal_mod_SOURCES): Added normal/context.c.
12017 (default_mod_SOURCES): New variable.
12018 (default_mod_CFLAGS): Likewise.
12019 (timeout_mod_SOURCES): Likewise.
12020 (timeout_mod_CFLAGS): Likewise.
12022 * Makefile.in (all-local): Added $(MKFILES).
12024 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12026 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12027 (grub_emu_SOURCES): Likewise.
12028 (pkgdata_MODULES): Add `sun.mod'.
12029 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12030 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12032 (pkgdata_MODULES): Add `sun.mod'.
12033 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12034 * include/grub/partition.h (grub_sun_partition_map_init): New
12036 (grub_sun_partition_map_fini): Likewise.
12037 * partmap/sun.c: New file.
12038 * util/grub-emu.c (main): Initialize and de-initialize the sun
12039 partitionmap support.
12041 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12043 This implements an Emacs-like menu entry editor.
12045 * normal/menu_entry.c: New file.
12047 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12048 characters to ASCII.
12049 (saved_char): New variable.
12050 (grub_ncurses_checkkey): Rewritten completely.
12051 (grub_ncurses_getkey): Likewise.
12052 (grub_ncurses_init): Call raw instead of cbreak.
12054 * normal/menu.c (print_entry): Do not put a space.
12055 (init_page): Renamed to ...
12056 (grub_menu_init_page): ... this. All callers changed.
12057 (edit_menu_entry): Removed.
12058 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12060 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12062 * kern/misc.c (grub_vprintf): Call grub_refresh.
12064 * normal/menu.c (DISP_LEFT): Renamed to ...
12065 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12066 * normal/menu.c (DISP_UP): Renamed to ...
12067 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12068 * normal/menu.c (DISP_RIGHT): Renamed to ...
12069 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12070 * normal/menu.c (DISP_DOWN): Renamed to ...
12071 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12072 * normal/menu.c (DISP_HLINE): Renamed to ...
12073 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12074 * normal/menu.c (DISP_VLINE): Renamed to ...
12075 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12076 * normal/menu.c (DISP_UL): Renamed to ...
12077 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12078 * normal/menu.c (DISP_UR): Renamed to ...
12079 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12080 * normal/menu.c (DISP_LL): Renamed to ...
12081 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12082 * normal/menu.c (DISP_LR): Renamed to ...
12083 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12084 * normal/menu.c (TERM_WIDTH): Renamed to ...
12085 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12086 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12087 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12088 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12089 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12090 * normal/menu.c (TERM_MARGIN): Renamed to ...
12091 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12092 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12093 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12094 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12095 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12096 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12097 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12098 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12099 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12100 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12101 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12102 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12103 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12104 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12105 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12106 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12107 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12108 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12109 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12110 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12111 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12112 All callers changed.
12114 * include/grub/normal.h: New prototype.
12116 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12117 normal/menu_entry.c.
12118 (normal_mod_SOURCES): Likewise.
12119 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12120 (normal_mod_SOURCES): Likewise.
12122 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12124 * include/grub/normal.h (grub_halt_init): New prototype.
12125 (grub_halt_fini): Likewise.
12126 (grub_reboot_init): Likewise.
12127 (grub_reboot_fini): Likewise.
12129 * util/grub-emu.c: Include signal.h.
12130 (main_env): New global variable.
12131 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12133 (grub_machine_fini): New function.
12134 (main): Call grub_halt_init and grub_reboot_init before
12135 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12136 Call setjmp with MAIN_ENV to go back afterwards.
12137 Call grub_machine_fini right before return.
12139 * include/grub/util/misc.h: Include setjmp.h.
12140 (main_env): New prototype.
12142 * include/grub/kernel.h (grub_machine_fini): New prototype.
12143 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12144 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12146 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12147 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12148 * term/i386/pc/console.c (grub_console_fini): Likewise.
12150 * util/i386/pc/misc.c: New file.
12152 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12153 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12154 commands/i386/pc/reboot.c.
12156 2005-02-14 Guillem Jover <guillem@hadrons.org>
12158 * include/grub/dl.h (grub_dl_check_header): New prototype.
12159 (grub_arch_dl_check_header): Change return type to grub_err_t,
12160 remove size parameter and export function. Update all callers.
12161 * kern/dl.c (grub_dl_check_header): New function.
12162 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12163 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12164 are inside the core.
12165 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12166 independent ELF header checks.
12167 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12168 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12169 `grub_dl_check_header' instead of explicit checks. Check for the
12171 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12172 `grub_dl_check_header' instead of explicit checks. Remove arch
12173 specific ELF header checks.
12175 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12178 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12180 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12181 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12183 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12185 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
12186 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
12187 (part_map_iterate): Clear `grub_errno' and return 0 if
12188 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
12189 * partmap/amiga.c (amiga_partition_map_iterate): Return
12190 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12191 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12193 2005-02-01 Guillem Jover <guillem@hadrons.org>
12195 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12198 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12200 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12202 (grub_rescue_cmd_linux): New prototype.
12203 (grub_rescue_cmd_initrd): Likewise.
12204 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12206 (grub_linux_release_mem): Release the memory for the initrd.
12207 (grub_load_linux): Renamed from this...
12208 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12209 Changed `entry' not to be static. Loop over memory regions to
12210 find another one when the default fails.
12211 (grub_rescue_cmd_initrd): New function.
12212 (grub_linux_init): Remove function.
12213 (grub_linux_fini): Likewise.
12214 (GRUB_MOD_INIT): Register `initrd'.
12215 (GRUB_MOD_FINI): Unregister `initrd'.
12216 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12218 (grub_linux_normal_fini): Likewise.
12219 (GRUB_MOD_INIT): Register `initrd'.
12220 (GRUB_MOD_FINI): Unregister `initrd'.
12222 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12224 * commands/help.c: New file.
12225 * normal/arg.c (show_help): Renamed to...
12226 (grub_arg_show_help): ... this.
12227 * commands/i386/pc/halt.c: New file.
12228 * commands/i386/pc/reboot.c: Likewise.
12229 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12230 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12231 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12232 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12234 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12236 (pkgdata_MODULES): Add `help.mod'.
12237 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12238 * grub/i386/pc/init.h (grub_reboot): New prototype.
12239 (grub_halt): Likewise.
12240 * include/grub/normal.h (grub_arg_show_help): New prototype.
12241 (grub_help_init): Likewise.
12242 (grub_help_fini): Likewise.
12243 * util/grub-emu.c (main): Initialize and deinitialize the help
12246 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12248 * normal/command.c (grub_command_init): Fixed the description of
12249 the `set' and `unset' commands.
12251 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12253 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12255 * commands/ieee1275/halt.c: New file.
12256 * commands/ieee1275/reboot.c: Likewise.
12257 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12258 `__attribute__ ((unused))'. Some GCS related fixed.
12259 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12260 (grub_suspend_fini): Likewise.
12261 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12263 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12264 (halt_mod_CFLAGS): New variables.
12265 * include/grub/powerpc/ieee1275/ieee1275.h
12266 (grub_ieee1275_interpret): New prototype.
12268 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12270 * include/grub/misc.h (memmove): New prototype.
12271 (memcpy): Likewise.
12273 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12275 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12276 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12278 2005-01-22 Marco Gerards <metgerards@student.han.nl>
12280 * kern/misc.c (grub_strndup): Function rewritten.
12282 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12284 * normal/menu.c (TERM_WIDTH): Macro redefined.
12285 (TERM_TOP_BORDER_Y): Likewise.
12286 (draw_border): Replaced while-loop by a for-loop. Make the number
12287 of lines consistent with the number of lines displayed in
12288 print_entries. Added a margin below the rectangle.
12289 (print_entry): Make the entry fit in the rectangle.
12290 (print_entries): Display the scroll arrows next to the right
12293 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12295 * fs/minix.c (grub_minix_find_file): Reserve more space for
12296 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12297 `grub_strncpy' to copy `path' into it.
12299 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12301 Add the loopback device, a device via which files can be accessed
12304 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12305 (pkgdata_MODULES): Add loopback.mod.
12306 (loopback_mod_SOURCES): New variable.
12307 (loopback_mod_CFLAGS): Likewise.
12308 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12310 (pkgdata_MODULES): Add loopback.mod.
12311 (loopback_mod_SOURCES): New variable.
12312 (loopback_mod_CFLAGS): Likewise.
12313 * disk/loopback.c: new file.
12314 * include/grub/normal.h (grub_loop_init): New prototype.
12315 (grub_loop_fini): New prototype.
12316 * util/grub-emu.c (main): Initialize and de-initialize loopback
12318 * include/grub/disk.h (grub_disk_dev_id): Add
12319 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12321 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12323 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12325 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12326 (suspend_mod_SOURCES): New variable.
12327 (suspend_mod_CFLAGS): Likewise.
12328 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12330 * commands/ieee1275/suspend.c: New file.
12332 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12334 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
12335 ((unused))' to `__attribute__ ((used))'.
12336 (GRUB_MOD_FINI): Likewise.
12337 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12338 * genmk.rb (PModule): Assign space to common symbols when linking
12341 2005-01-20 Marco Gerards <metgerards@student.han.nl>
12343 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12344 `unsigned' arguments to `grub_size_t'.
12345 (grub_malloc): Likewise.
12346 (grub_realloc): Likewise.
12347 (grub_memalign): Likewise.
12348 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12349 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12350 * util/misc.c (grub_malloc): Likewise.
12351 (grub_realloc): Likewise.
12352 * kern/mm.c (get_header_from_pointer): Change the casts to
12353 `unsigned' into a cast to `grub_size_t'.
12355 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12356 point to `currnode' when `currnode' is changed.
12358 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12359 Schottelius <nico-linux@schottelius.org>.
12361 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12363 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12364 (note_path): Remove variable.
12365 (GRUB_IEEE1275_NOTE_NAME): New macro.
12366 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12367 (grub_ieee1275_note_hdr): New structure.
12368 (grub_ieee1275_note_desc): Likewise.
12369 (grub_ieee1275_note): Likewise.
12370 (load_note): Remove `dir' argument. All callers updated. Remove
12371 `note_img' and `path'. Do not load a file from `note_path'.
12372 Initialize a struct grub_ieee1275_note and write that to `out'.
12373 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12375 2005-01-05 Marco Gerards <metgerards@student.han.nl>
12377 * util/misc.c (grub_util_read_image): Revert last change. It
12378 called `grub_util_read_at', which seeks from the beginning of the
12381 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12383 * TODO: Add note about endianness in grub-mkimage.
12384 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12386 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12387 (grub_mkimage_SOURCES): New target.
12388 * include/grub/kernel.h (grub_start_addr): Remove variable.
12389 (grub_end_addr): Likewise.
12390 (grub_total_module_size): Likewise.
12391 (grub_kernel_image_size): Likewise.
12392 (GRUB_MODULE_MAGIC): New constant.
12393 (grub_module_info): New structure.
12394 (grub_arch_modules_addr): New prototype.
12395 (grub_get_end_addr): Remove prototype.
12396 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12397 * include/grub/powerpc/ieee1275/kernel.h: New file.
12398 * include/grub/util/misc.h (grub_util_get_fp_size): New
12400 (grub_util_read_at): Likewise.
12401 (grub_util_write_image_at): Likewise.
12402 * kern/main.c (grub_get_end_addr): Remove function.
12403 (grub_load_modules): Call grub_arch_modules_addr instead of using
12404 grub_end_addr. Look for a grub_module_info struct in memory. Use
12405 the grub_module_info fields instead of calling grub_get_end_addr
12406 as loop conditions. Move grub_add_unused_region code here.
12407 (grub_add_unused_region): Remove function.
12408 * kern/i386/pc/init.c: Include grub/cache.h.
12409 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12410 one call to add_mem_region.
12411 (grub_arch_modules_addr): New function.
12412 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12413 (grub_total_module_size): Likewise.
12414 Include grub/machine/kernel.h.
12415 (grub_arch_modules_addr): New function.
12416 * util/grub-emu.c (grub_end_addr): Remove variable.
12417 (grub_total_module_size): Likewise.
12418 (grub_arch_modules_addr): New function.
12419 * util/misc.c: Include unistd.h.
12420 (grub_util_get_fp_size): New function.
12421 (grub_util_read_at): Likewise.
12422 (grub_util_write_image_at): Likewise.
12423 (grub_util_read_image): Call grub_util_read_at.
12424 (grub_util_write_image): Call grub_util_write_image_at.
12425 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12426 additional memory in kernel_img for a struct grub_module_info.
12427 Fill in that grub_module_info.
12428 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12430 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12432 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12434 * include/grub/powerpc/ieee1275/ieee1275.h
12435 (grub_ieee1275_milliseconds): New prototype.
12436 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12438 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12439 grub_ieee1275_milliseconds.
12441 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12443 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12445 (find_options): New function.
12446 (cmain): Call find_options.
12447 * include/grub/powerpc/ieee1275/ieee1275.h
12448 (grub_ieee1275_realmode): New extern variable.
12449 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12450 grub_map if grub_ieee1275_realmode is false.
12452 2004-12-29 Marco Gerards <metgerards@student.han.nl>
12454 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12455 lines are inserted and make it work like readline. Reported by
12456 Vincent Pelletier <subdino2004@yahoo.fr>.
12458 2004-12-28 Marco Gerards <metgerards@student.han.nl>
12460 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12462 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12463 `kern/powerpc/cache.S'.
12465 2004-12-27 Marco Gerards <metgerards@student.han.nl>
12467 * genmk.rb: Handle the `Program' class in the main loop. Written
12468 by Johan Rydberg <jrydberg@gnu.org>.
12469 (Program): New class.
12470 (programs): New variable.
12471 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12472 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12473 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12474 (help_arch): Function removed.
12475 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12476 `powerpc/libgcc.h' and `loader.h'.
12477 (pkgdata_PROGRAMS): New variable.
12478 (sbin_UTILITIES): Variable removed.
12479 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12480 (grubof_SOURCES): Variable re-defined so it only includes the
12481 core functionality.
12482 (grubof_CFLAGS): Remove `-DGRUBOF'.
12483 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12484 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12485 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12486 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12487 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12488 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12489 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12490 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12491 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12492 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12493 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12494 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12495 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12496 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12497 (pc_mod_CFLAGS): New variables.
12498 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12499 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12500 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12501 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12503 * include/grub/i386/pc/init.h (grub_os_area_addr)
12504 (rub_os_area_size): ... to here.
12505 * include/grub/powerpc/ieee1275/ieee1275.h
12506 (grub_ieee1275_entry_fn): Export symbol.
12507 * include/grub/powerpc/ieee1275/init.h: New file.
12508 * include/grub/powerpc/libgcc.h: Likewise.
12509 * include/grub/cache.h: Likewise.
12510 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12511 <hollis@penguinppc.org>.
12512 * kern/dl.c: Include <grub/cache.h>.
12513 (grub_dl_flush_cache): New function.
12514 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12516 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12517 (grub_console_init): Removed prototypes.
12518 (grub_machine_init): Don't initialize the modules anymore.
12519 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12521 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12522 Macro undef removed.
12523 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12524 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12525 relocation `R_PPC_REL32'. Return an error when the relocation is
12527 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12528 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12529 * util/misc.c (grub_arch_sync_caches): Likewise.
12531 2004-12-19 Marco Gerards <metgerards@student.han.nl>
12533 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12534 `symlist.c', add `grubof_symlist.c'.
12535 (symlist.c): Variable removed.
12536 (grubof_HEADERS): Variable added.
12537 (grubof_symlist.c): New target.
12538 (kernel_syms.lst): Use `grubof_HEADERS' instead of
12539 `kernel_img_HEADERS'.
12540 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12541 * kern/powerpc/dl.c: New file.
12542 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12544 (grub_arch_dl_relocate_symbols): Likewise.
12545 (grub_register_exported_symbols): Likewise.
12547 2004-12-13 Marco Gerards <metgerards@student.han.nl>
12549 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12550 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12551 to fail instead. Reported by Vincent Pelletier
12552 <subdino2004@yahoo.fr>.
12554 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12555 it is not allocated. Reported by Vincent Pelletier
12556 <subdino2004@yahoo.fr>.
12558 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12559 output so the output looks better.
12561 2004-12-04 Marco Gerards <metgerards@student.han.nl>
12563 Modulize the partition map support and add support for the amiga
12566 * commands/ls.c: Include <grub/partition.h> instead of
12567 <grub/machine/partition.h>.
12568 * kern/disk.c: Likewise.
12569 * kern/rescue.c: Likewise.
12570 * loader/i386/pc/chainloader.c: Likewise.
12571 * normal/cmdline.c: Likewise.
12572 * kern/powerpc/ieee1275/init.c: Likewise.
12573 (grub_machine_init): Call `grub_pc_partition_map_init',
12574 `grub_amiga_partition_map_init' and
12575 `grub_apple_partition_map_init'.
12576 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12577 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12578 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12579 `partition.h' and `pc_partition.h'.
12580 (grub_setup_SOURCES): Remove
12581 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12582 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12583 (grub_emu_SOURCES): Likewise.
12584 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12585 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12586 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12587 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12588 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12589 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12590 (grubof_SOURCES): Likewise.
12591 * disk/i386/pc/partition.c: File removed.
12592 * disk/powerpc/ieee1275/partition.c: Likewise.
12593 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12594 * include/grub/i386/pc/partition.h: Likewise.
12595 * kern/partition.c: New file.
12596 * partmap/amiga.c: Likewise.
12597 * partmap/apple.c: Likewise.
12598 * partmap/pc.c: Likewise.
12599 * include/grub/partition.h: Likewise..
12600 * include/grub/pc_partition.h: Likewise.
12601 * util/grub-emu.c: Include <grub/partition.h> instead of
12602 <grub/machine/partition.h>.
12603 (main): Call `grub_pc_partition_map_init',
12604 `grub_amiga_partition_map_init' and
12605 `grub_apple_partition_map_init' and deinitialize afterwards.
12606 * util/i386/pc/biosdisk.c: Include `#include
12607 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12608 `<grub/machine/partition.h>'.
12609 * util/i386/pc/grub-setup.c: Likewise.
12610 * util/i386/pc/biosdisk.c: Likewise.
12611 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12612 partition information in case of a PC partition.
12613 * util/i386/pc/grub-setup.c: Include `#include
12614 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12615 `<grub/machine/partition.h>'.
12616 (setup): Only access the PC specific partition information in case
12619 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
12621 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12622 (grub_longjmp): Likewise.
12623 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12625 * normal/powerpc/setjmp.S: New file.
12626 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12627 `normal/powerpc/setjmp.S'.
12628 (grubof_CFLAGS): Add `-DGRUBOF'.
12629 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12630 [GRUB_UTIL && !GRUBOF].
12632 2004-11-16 Marco Gerards <metgerards@student.han.nl>
12634 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12635 property named `name'. Correctly handle the error returned by
12636 `grub_ieee1275_finddevice' if a device can not be opened.
12638 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12640 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12641 `actual' for negativity.
12642 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12645 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12647 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12648 (PAGE_OFFSET): New macro.
12649 (CRTC_ADDR_PORT): Likewise.
12650 (CRTC_DATA_PORT): Likewise.
12651 (START_ADDR_HIGH_REGISTER): Likewise.
12652 (START_ADDR_LOW_REGISTER): Likewise.
12653 (GRAPHICS_ADDR_PORT): Likewise.
12654 (GRAPHICS_DATA_PORT): Likewise.
12655 (READ_MAP_REGISTER): Likewise.
12656 (INPUT_STATUS1_REGISTER): Likewise.
12657 (INPUT_STATUS1_VERTR_BIT): Likewise.
12658 (page): New variable.
12659 (wait_vretrace): New function.
12660 (set_read_map): Likewise.
12661 (set_start_address): Likewise.
12662 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12664 (check_vga_mem): Take the page into account.
12665 (write_char): Likewise.
12666 (write_cursor): Likewise.
12667 (scroll_up): Likewise. Copy the page to the page that is not
12668 shown and switch between both pages.
12669 (grub_vga_putchar): Fix off by one error.
12670 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12673 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12675 Add support for iso9660 (including rockridge).
12677 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12678 (iso9660_mod_SOURCES): New variable.
12679 (iso9660_mod_CFLAGS): Likewise.
12680 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12681 * include/grub/fs.h (grub_iso9660_init): New prototype.
12682 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12683 * fs/iso9660.c: New file.
12685 * include/grub/misc.h (grub_strncat): New prototype.
12686 * kern/misc.c (grub_strncat): New function.
12688 * fs/hfs.c (grub_hfs_mount): Translate the error
12689 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12690 * fs/jfs.c (grub_jfs_mount): Likewise.
12691 * fs/ufs.c (grub_ufs_mount): Likewise.
12693 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12695 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12696 which initialized BAT registers.
12697 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12698 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12700 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12701 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12703 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12704 (grub_mapclaim): Likewise.
12705 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12706 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12709 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12711 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12712 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12713 -ffreestanding and -msoft-float.
12715 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12717 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12718 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12719 set in grub_ieee1275_flags.
12721 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12723 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12725 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12726 grub_console_init first.
12727 Change the memory range used for grub_ieee1275_claim and
12728 grub_mm_init_region.
12729 Print an error message if the claim fails.
12730 Include <grub/misc.h>.
12732 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12734 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12735 Call grub_children_iterate for device nodes of type `scsi',
12737 (grub_ofdisk_open): Remove manual device alias resolution.
12738 Fix memory leak when device cannot be opened.
12739 * include/grub/powerpc/ieee1275/ieee1275.h
12740 (grub_children_iterate): New prototype.
12741 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12743 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12744 Return -1 if args.size was -1.
12746 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12748 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12749 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12750 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12751 Open Firmware's memory for it; claim memory from _start to _end.
12752 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12753 (_end): New extern.
12754 (_start): Zero BSS from __bss_start to _end.
12755 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12757 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12759 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12761 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12762 -1 if args.base was -1.
12764 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12766 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12767 escape sequence instead of a literal ^L. Also call
12768 grub_ofconsole_gotoxy.
12770 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12772 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12773 void * arguments to grub_addr_t. All callers updated. Also make
12774 the `result' argument optional.
12775 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12776 All callers updated.
12778 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12780 * commands/ls.c (grub_ls_list_files): Use the string following the
12781 initial ')', if present, as the filesystem path.
12782 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12784 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12786 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12788 Make the source code of the menu interface more readable.
12790 * normal/menu.c: Include grub/mm.h.
12791 (TERM_WIDTH): New macro.
12792 (TERM_HEIGHT): Likewise.
12793 (TERM_INFO_HEIGHT): Likewise.
12794 (TERM_MARGIN): Likewise.
12795 (TERM_SCROLL_WIDTH): Likewise.
12796 (TERM_TOP_BORDER_Y): Likewise.
12797 (TERM_LEFT_BORDER_X): Likewise.
12798 (TERM_BORDER_WIDTH): Likewise.
12799 (TERM_MESSAGE_HEIGHT): Likewise.
12800 (TERM_BORDER_HEIGHT): Likewise.
12801 (TERM_NUM_ENTRIES): Likewise.
12802 (TERM_FIRST_ENTRY_Y): Likewise.
12803 (TERM_ENTRY_WIDTH): Likewise.
12804 (TERM_CURSOR_X): Likewise.
12805 (draw_border): Use macros instead of magic numbers.
12806 (print_entry): Likewise.
12807 (print_entries): Likewise.
12808 (run_menu): Likewise. Also, handle the key 'e'.
12809 (run_menu_entry): Ignore empty command lines.
12810 (print_message): Added a new argument EDIT. If EDIT is true,
12811 print a different message.
12812 (init_page): Likewise.
12813 (edit_menu_entry): New function. Not implemented yet.
12815 2004-09-17 Marco Gerards <metgerards@student.han.nl>
12817 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12818 can be loaded from normal mode.
12820 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12822 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12823 (multiboot_mod_CFLAGS): New variables.
12824 * loader/i386/pc/linux_normal.c: New file.
12825 * loader/i386/pc/multiboot_normal.c: Likewise.
12827 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12828 attribute `unused'.
12830 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12831 `fdiro' to read the mode information from instead of `diro'.
12833 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12834 looking up a symlink.
12836 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12838 * normal/command.c (grub_command_execute): Don't parse the
12839 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12840 flags of the command.
12842 * normal/menu.c (grub_menu_run): Fix typo.
12844 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12846 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12848 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12849 `y + 1' instead of `y - 1'.
12851 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12853 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12855 From Hollis Blanchard <hollis@penguinppc.org>:
12856 * kern/misc.c (memmove): New alias for grub_memmove.
12857 (memcmp): New alias for grub_memcmp.
12858 (memset): New alias for grub_memset.
12859 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12860 Change "int handle" to "grub_ieee1275_phandle_t handle".
12861 * include/grub/powerpc/ieee1275/ieee1275.h
12862 (grub_ieee1275_get_property): Likewise.
12864 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12866 Added normal mode command `chainloader' as module chain.mod, which
12867 depends on normal.mod and _chain.mod.
12869 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12870 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12871 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12873 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12874 but arguments parsing moved to ...
12875 (grub_chainloader_cmd): ... here. New function.
12876 * include/grub/i386/pc/chainloader.h: New file.
12877 * loader/i386/pc/chainloader_normal.c: Likewise.
12879 2004-09-11 Marco Gerards <metgerards@student.han.nl>
12881 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12882 (grub_mkimage_LDFLAGS): Likewise.
12883 (grub_emu_SOURCES): Likewise.
12884 (kernel_img_HEADERS): Added fshelp.h.
12885 * fs/ext2.c: Include <grub/fshelp.h>.
12886 (FILETYPE_REG): New macro.
12887 (FILETYPE_INO_REG): Likewise.
12888 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12890 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12892 (grub_fshelp_node): New struct.
12893 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12895 (grub_ext2_get_file_block): Removed function.
12896 (grub_ext2_read_block): New function.
12897 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12898 This function was written.
12899 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12900 (grub_ext2_find_file): Removed function.
12901 (grub_ext2_read_symlink): New function.
12902 (grub_ext2_iterate_dir): Likewise.
12903 (grub_ext2_open): Rewritten.
12904 (grub_ext2_dir): Rewritten.
12905 * include/grub/fshelp.h: New file.
12906 * fs/fshelp.c: Likewise.
12908 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12910 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12911 (print_message): Add a missing newline.
12912 (run_menu): Added timeout support.
12913 (run_menu_entry): New local function.
12914 (grub_menu_run): Added support for booting.
12916 * kern/loader.c (grub_loader_is_loaded): New function.
12918 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12919 (grub_get_rtc): Exported.
12921 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12922 (grub_get_rtc): Exported.
12924 * include/grub/normal.h (struct grub_command_list): Remove
12925 constant from the member `command'.
12927 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12929 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12931 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12933 2004-08-28 Marco Gerards <metgerards@student.han.nl>
12935 Add support for the JFS filesystem.
12937 * fs/jfs.c: New file.
12938 * include/grub/fs.h (grub_jfs_init): New prototype.
12939 (grub_jfs_fini): New prototype.
12940 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12941 (grub_emu_SOURCES): Likewise.
12942 (pkgdata_MODULES): Add jfs.mod.
12943 (jfs_mod_SOURCES): New variable.
12944 (jfs_mod_CFLAGS): Likewise.
12945 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12946 (grubof_SOURCES): Likewise.
12947 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12949 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12950 endian to the host endian.
12951 (grub_fat_utf16_to_utf8): Move function from there...
12952 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
12953 the endianness of the source string anymore.
12954 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12956 2004-08-24 Marco Gerards <metgerards@student.han.nl>
12958 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12959 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12960 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12961 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12963 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12964 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12965 for `node_found' and `it_dir'.
12966 (grub_hfs_dir): Add prototype for `dir_hook'.
12968 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12969 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12970 and `indir32' to silence a gcc warning.
12972 * include/grub/fs.h (grub_hfs_init): New prototype.
12973 (grub_hfs_fini): Likewise.
12976 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12978 Each disk device has its own id now. This is useful to make use
12979 of multiple disk devices.
12981 * include/grub/disk.h (grub_disk_dev_id): New enum.
12982 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12983 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12985 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12986 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12988 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12989 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12991 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12992 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12994 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12995 "id" which is used by the cache manager.
12997 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13000 2004-08-18 Marco Gerards <metgerards@student.han.nl>
13002 * fs/hfs.c: New file.
13003 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13004 (grub_emu_SOURCES): Likewise.
13005 (pkgdata_MODULES): Add hfs.mod.
13006 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13007 (grubof_SOURCES): Likewise.
13008 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13010 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13011 * kern/misc.c (grub_strncasecmp): Add function.
13013 2004-08-14 Marco Gerards <metgerards@student.han.nl>
13015 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13018 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13019 (grub_ext2_dir): In case the directory entry type is unknown, read
13022 2004-08-02 Peter Bruin <pjbruin@dds.nl>
13024 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13025 grub_load_linux instead of grub_rescue_cmd_linux as second
13026 argument of grub_rescue_register_command.
13028 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13030 2004-07-27 Marco Gerards <metgerards@student.han.nl>
13032 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13034 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13035 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13036 `loader/powerpc/ieee1275/linux.c',
13037 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13038 * include/grub/powerpc/ieee1275/ieee1275.h
13039 (grub_ieee1275_release): New prototype.
13040 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13041 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13042 normal, boot, linux and linux_normal.
13043 * loader/powerpc/ieee1275/linux.c: New file.
13044 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13046 2004-07-12 Marco Gerards <metgerards@student.han.nl>
13048 * normal/arg.c (grub_arg_parse): Correct error handling after
13049 reallocating the argumentlist (check if `argl' is not null instead
13050 of checking if `args' is not null).
13051 * kern/mm.c (grub_realloc): Return the same pointer when using the
13052 same region, instead of returning the header address.
13054 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13056 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13057 one block instead of two when looking for the initial partition.
13058 (grub_partition_probe): Initialize the local variable `p' with 0.
13059 Use base 10 for the grub_strtoul call.
13060 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13061 need for one local variable.
13062 (grub_strtoul): Don't add the new value to `num', instead of that
13065 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13067 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13068 (pxeboot_img_SOURCES): New variable.
13069 (pxeboot_img_ASFLAGS): Likewise.
13070 (pxeboot_img_LDFLAGS): Likewise.
13071 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13072 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13073 <lode_leroy@hotmail.com>.
13075 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13077 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13078 there was no input.
13080 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13082 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13083 the history buffer logic.
13085 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13087 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13088 (FILETYPE_INO_SYMLINK): New macros.
13089 (grub_ext2_find_file): Check if the node is a directory using the
13090 inode stat information instead of using the filetype in the
13091 dirent. Exclude the first character of an absolute symlink.
13092 (grub_ext2_dir): Mask out the filetype part of the mode member of
13095 2004-05-24 Marco Gerards <metgerards@student.han.nl>
13097 Add support for UFS version 1 and 2. Add support for the minix
13098 filesystem version 1 and 2, both the variants with 14 and 30 long
13101 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13103 (grub_emu_SOURCES): Likewise.
13104 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13105 (ufs_mod_SOURCES): New variable.
13106 (ufs_mod_CFLAGS): Likewise.
13107 (minix_mod_SOURCES): Likewise.
13108 (minix_mod_CFLAGS): Likewise.
13109 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13111 (grubof_SOURCES): Likewise.
13112 * fs/ufs.c: New file.
13113 * fs/minix.c: New file.
13114 * include/grub/fs.h (grub_ufs_init): New prototype.
13115 (grub_ufs_fini): Likewise.
13116 (grub_minix_init): Likewise.
13117 (grub_minix_fini): Likewise.
13118 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13121 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13123 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13124 commands/ls.c, commands/terminal.c, commands/boot.c,
13125 commands/cmp.c and commands/cat.c.
13126 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13128 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13131 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13133 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13134 and grub_, respectively. Because the conversion is trivial and
13135 mechanical, I omit the details here. Please refer to the CVS
13136 if you need more information.
13138 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13140 * include/pupa: Renamed to ...
13141 * include/grub: ... this.
13142 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13143 * util/i386/pc/grub-mkimage.c: ... this.
13144 * util/i386/pc/pupa-setup.c: Renamed to ...
13145 * util/i386/pc/grub-setup.c: ... this.
13146 * util/pupa-emu.c: Renamed to ...
13147 * util/grub-emu.c: ... this.
13149 2004-03-29 Marco Gerards <metgerards@student.han.nl>
13151 Add support for the newworld apple macintosh (PPC). This has been
13152 tested on the powerbook 2000 only. It only adds support for
13153 generic ieee1275 functions, console and disk support. This should
13154 be easy to port to other architectures with support for Open
13157 * configure.ac: Accept the powerpc as host_cpu. In the case of
13158 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13159 specific tests are only executed while building for the i386.
13160 Inverse test for crosscompile.
13161 * genmk.rb (Utility): Allow assembler files.
13162 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13163 * conf/powerpc-ieee1275.rmk: New file.
13164 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13165 * disk/powerpc/ieee1275/partition.c: Likewise.
13166 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13167 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13168 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13169 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13170 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13171 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13172 * include/pupa/powerpc/ieee1275/loader.h
13173 * include/pupa/powerpc/setjmp.h: Likewise.
13174 * include/pupa/powerpc/types.h: Likewise.
13175 * kern/powerpc/ieee1275/init.c: Likewise.
13176 * kern/powerpc/ieee1275/openfw.c: Likewise.
13177 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13179 These files were written by Johan Rydberg
13180 (jrydberg@night.trouble.net) and I only modified them slightly.
13182 * boot/powerpc/ieee1275/cmain.c: New file.
13183 * boot/powerpc/ieee1275/crt0.S: Likewise.
13184 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13185 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13187 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13189 * Makefile.in: Update copyright.
13190 * genmodsrc.sh: Likewise.
13191 * gensymlist.sh: Likewise.
13192 * term/i386/pc/vga.c: Indent correctly.
13194 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13195 bugreporting address.
13196 * util/i386/pc/pupa-setup.c (usage): Likewise,
13197 (main): Call pupa_ext2_init and pupa_ext2_fini.
13199 * fs/fat.c (log2): Renamed to ...
13200 (fat_log2): ... this.
13201 All callers changed.
13202 * kern/misc.c (memcpy): Alias to pupa_memmove.
13203 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13205 * util/console.c (pupa_ncurses_fini): Return 0.
13207 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13208 Move fail label here.
13209 [__GNU__]: Don't warn when using stat.
13210 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13211 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13212 long int. Use strtol instead of strtoul.
13214 2004-03-14 Marco Gerards <metgerards@student.han.nl>
13216 * commands/boot.c: New file.
13217 * commands/cat.c: Likewise.
13218 * commands/cmp.c: Likewise.
13219 * commands/ls.c: Likewise.
13220 * commands/terminal.c: Likewise.
13221 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13222 (pupa_register_command): Changed interface to match the new
13224 (pupa_command_execute): Changed (almost rewritten) so it uses
13225 pupa_split_command. Added support for setting variables using the
13227 (rescue_command): Changed to work with the new argument parser.
13228 (terminal_command): Moved from here to commands/terminal.c.
13229 (set_command): New function.
13230 (unset_command): New function.
13231 (insmod_command): New function.
13232 (rmmod_command): New function.
13233 (lsmod_command): New function.
13234 (pupa_command_init): Don't initialize the command terminal
13235 anymore. Initialize the commands set, unset, insmod, rmmod and
13237 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13238 (kernel_img_HEADERS): Add arg.h and env.h.
13239 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13240 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13241 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13243 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13245 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13246 (boot_mod_SOURCES): New variable.
13247 (terminal_mod_SOURCES): Likewise.
13248 (ls_mod_SOURCES): Likewise.
13249 (cmp_mod_SOURCES): Likewise.
13250 (cat_mod_SOURCES): Likewise.
13252 * normal/arg.c: New file.
13253 * kern/env.c: Likewise.
13254 * include/pupa/arg.h: Likewise.
13255 * include/pupa/env.h: Likewise.
13256 * font/manager.c (font_command): Changed to match argument parsing
13258 (PUPA_MOD_INIT): Likewise.
13259 * hello/hello.c (pupa_cmd_hello): Likewise.
13260 (PUPA_MOD_INIT): Likewise.
13261 * include/pupa/disk.h: Include <pupa/device.h>.
13262 (pupa_print_partinfo): New prototype.
13263 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13264 (pupa_dl_get_prefix): Likewise.
13265 * include/pupa/misc.h: Include <pupa/err.h>.
13266 (pupa_isgraph): New prototype.
13267 (pupa_isdigit): Likewise.
13268 (pupa_split_cmdline): Likewise.
13269 * include/pupa/normal.h: Include <pupa/arg.h>.
13270 (pupa_command): Changed the prototype of the member `func' to
13271 match the argument parsing interface. Added member `options'.
13272 (pupa_register_command): Updated to match function.
13273 (pupa_arg_parse): New prototype.
13274 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13275 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13276 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13277 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13278 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13279 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13280 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13281 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13282 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13283 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13284 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13285 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13286 * kern/disk.c: Include <pupa/file.h>.
13287 (pupa_print_partinfo): New function.
13288 * kern/dl.c: Include <pupa/env.h>.
13289 (pupa_dl_dir): Variable removed.
13290 (pupa_dl_load): Use the environment variable `prefix' instead of
13291 the variable pupa_dl_dir.
13292 (pupa_dl_set_prefix): Function removed.
13293 (pupa_dl_get_prefix): Likewise.
13294 * kern/i386/pc/init.c: Include <pupa/env.h>.
13295 (pupa_machine_init): Use the environment variable `prefix' instead of
13296 using pupa_dl_set_prefix to set the prefix.
13297 * kern/main.c: Include <pupa/env.h>.
13298 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13299 using pupa_dl_get_prefix to get the prefix.
13300 * kern/misc.c: Include <pupa/env.h>.
13301 (pupa_isdigit): New function.
13302 (pupa_isgraph): Likewise.
13303 (pupa_ftoa): Likewise.
13304 (pupa_vsprintf): Added support for printing values of the type
13305 `double'. Make it possible to format variable output when using
13306 formatting like `%1.2%f'.
13307 (pupa_split_cmdline): New function.
13308 * kern/rescue.c: Include <pupa/env.h>.
13309 (next_word): Removed function.
13310 (pupa_rescue_cmd_prefix): Likewise.
13311 (pupa_rescue_cmd_set): New function.
13312 (pupa_rescue_cmd_unset): New function.
13313 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13314 split the command line instead of splitting it here. Added
13315 support for setting variables using the syntax `foo=bar'. Don't
13316 initialize the prefix command anymore. Initialized the set and
13318 * normal/cmdline.c: Include <pupa/env.h>.
13319 (pupa_tab_complete): Added prototypes for print_simple_completion,
13320 print_partition_completion, add_completion, iterate_commands,
13321 iterate_dev, iterate_part and iterate_dir. Moved code to print
13322 partition information from here to kern/disk.c.
13323 (pupa_cmdline_run): Don't check if the function exists anymore.
13324 * normal/main.c: Include <pupa/env.h>.
13325 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13326 instead of using pupa_dl_get_prefix to get the prefix.
13327 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13328 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13330 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13331 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13332 ((unused))' to silence a gcc warning.
13333 (pupa_vga_setcolor): Likewise.
13334 (debug_command): Changed to match argument parsing
13336 * util/pupa-emu.c: Include <pupa/env.h>.
13337 (options): Added 0's for unused fields to silence a gcc warning.
13339 (main): Use the environment variable `prefix' instead of using
13340 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13341 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13344 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13345 * util/misc.c: Include <malloc.h>.
13346 (pupa_malloc): Rewritten so errors are correctly reported.
13347 (pupa_realloc): Likewise.
13348 (pupa_memalign): Likewise.
13349 (pupa_mm_init_region): Declare unused variables with
13350 `__attribute__ ((unused))' to silence a gcc warning.
13351 * normal/i386/setjmp.S: Remove tab at the end of the file to
13352 silence a gcc warning.
13353 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13354 variables with `__attribute__ ((unused))' to silence a gcc
13356 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13357 local variable i unsigned to silence a gcc warning.
13359 * kern/term.c: Include <pupa/misc.h>.
13360 (pupa_more_lines): New variable.
13361 (pupa_more): Likewise.
13362 (pupa_putcode): When the pager is active pause at the end of every
13364 (pupa_set_more): New function.
13365 * include/pupa/term.h (pupa_set_more): New prototype.
13368 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13370 Now this project is GRUB 2 rather than PUPA. The location of
13371 the CVS repository was moved to GRUB's.
13373 * configure.ac: Use bug-grub as the reporting address.
13374 Use GRUB instead of PUPA.
13375 Change the version number to 1.90.
13377 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13379 * genkernsyms.sh: Updated copyright information.
13380 * genmk.rb: Likewise.
13381 * genmodsrc.sh: Likewise.
13382 * gensymlist.sh: Likewise.
13383 * boot/i386/pc/boot.S: Likewise.
13384 * boot/i386/pc/diskboot.S: Likewise.
13385 * disk/i386/pc/biosdisk.c: Likewise.
13386 * disk/i386/pc/partition.c: Likewise.
13387 * font/manager.c: Likewise.
13388 * fs/ext2.c: Likewise.
13389 * fs/fat.c: Likewise.
13390 * include/pupa/boot.h: Likewise.
13391 * include/pupa/device.h: Likewise.
13392 * include/pupa/disk.h: Likewise.
13393 * include/pupa/dl.h: Likewise.
13394 * include/pupa/elf.h: Likewise.
13395 * include/pupa/err.h: Likewise.
13396 * include/pupa/file.h: Likewise.
13397 * include/pupa/font.h: Likewise.
13398 * include/pupa/fs.h: Likewise.
13399 * include/pupa/kernel.h: Likewise.
13400 * include/pupa/loader.h: Likewise.
13401 * include/pupa/misc.h: Likewise.
13402 * include/pupa/mm.h: Likewise.
13403 * include/pupa/net.h: Likewise.
13404 * include/pupa/normal.h: Likewise.
13405 * include/pupa/rescue.h: Likewise.
13406 * include/pupa/setjmp.h: Likewise.
13407 * include/pupa/symbol.h: Likewise.
13408 * include/pupa/term.h: Likewise.
13409 * include/pupa/types.h: Likewise.
13410 * include/pupa/i386/setjmp.h: Likewise.
13411 * include/pupa/i386/types.h: Likewise.
13412 * include/pupa/i386/pc/biosdisk.h: Likewise.
13413 * include/pupa/i386/pc/boot.h: Likewise.
13414 * include/pupa/i386/pc/console.h: Likewise.
13415 * include/pupa/i386/pc/init.h: Likewise.
13416 * include/pupa/i386/pc/kernel.h: Likewise.
13417 * include/pupa/i386/pc/linux.h: Likewise.
13418 * include/pupa/i386/pc/loader.h: Likewise.
13419 * include/pupa/i386/pc/memory.h: Likewise.
13420 * include/pupa/i386/pc/multiboot.h: Likewise.
13421 * include/pupa/i386/pc/partition.h: Likewise.
13422 * include/pupa/i386/pc/time.h: Likewise.
13423 * include/pupa/i386/pc/vga.h: Likewise.
13424 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13425 * include/pupa/util/getroot.h: Likewise.
13426 * include/pupa/util/misc.h: Likewise.
13427 * include/pupa/util/resolve.h: Likewise.
13428 * kern/device.c: Likewise.
13429 * kern/disk.c: Likewise.
13430 * kern/dl.c: Likewise.
13431 * kern/err.c: Likewise.
13432 * kern/file.c: Likewise.
13433 * kern/fs.c: Likewise.
13434 * kern/loader.c: Likewise.
13435 * kern/main.c: Likewise.
13436 * kern/misc.c: Likewise.
13437 * kern/mm.c: Likewise.
13438 * kern/rescue.c: Likewise.
13439 * kern/term.c: Likewise.
13440 * kern/i386/dl.c: Likewise.
13441 * kern/i386/pc/init.c: Likewise.
13442 * kern/i386/pc/lzo1x.S: Likewise.
13443 * kern/i386/pc/startup.S: Likewise.
13444 * loader/i386/pc/chainloader.c: Likewise.
13445 * loader/i386/pc/linux.c: Likewise.
13446 * loader/i386/pc/multiboot.c: Likewise.
13447 * normal/cmdline.c: Likewise.
13448 * normal/command.c: Likewise.
13449 * normal/main.c: Likewise.
13450 * normal/menu.c: Likewise.
13451 * normal/i386/setjmp.S: Likewise.
13452 * term/i386/pc/console.c: Likewise.
13453 * term/i386/pc/vga.c: Likewise.
13454 * util/console.c: Likewise.
13455 * util/genmoddep.c: Likewise.
13456 * util/misc.c: Likewise.
13457 * util/pupa-emu.c: Likewise.
13458 * util/resolve.c: Likewise.
13459 * util/unifont2pff.rb: Likewise.
13460 * util/i386/pc/biosdisk.c: Likewise.
13461 * util/i386/pc/getroot.c: Likewise.
13462 * util/i386/pc/pupa-mkimage.c: Likewise.
13463 * util/i386/pc/pupa-setup.c: Likewise.
13465 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13467 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13468 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13469 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13470 reading and reset it after reading.
13471 (pupa_ext2_close): Return PUPA_ERR_NONE.
13473 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13475 (struct linux_kernel_header): Add kernel_version and
13477 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13478 pupa_file_read succeeds.
13479 (pupa_rescue_cmd_initrd): Implement.
13481 2003-12-03 Marco Gerards <metgerards@student.han.nl>
13483 * fs/ext2.c (pupa_ext2_label): New function.
13484 (pupa_ext2_fs): Added label.
13485 * fs/fat.c (pupa_fat_label): New function.
13486 (pupa_fat_fs): Added label.
13487 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13489 * kern/misc.c (pupa_strndup): New function.
13490 * include/pupa/misc.h (pupa_strndup): New prototype.
13492 * include/pupa/normal.h: Include <pupa/err.h>.
13493 (pupa_set_history): New prototype.
13494 (pupa_iterate_commands): New prototype.
13495 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13496 <pupa/disk.h>, <pupa/file.h>.
13497 (hist_size): New variable.
13498 (hist_lines): Likewise.
13499 (hist_end): Likewise.
13500 (hist_used): Likewise.
13501 (pupa_set_history): New function.
13502 (pupa_history_get): Likewise.
13503 (pupa_history_add): Likewise.
13504 (pupa_history_replace): Likewise.
13505 (pupa_tab_complete): Likewise.
13506 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13507 completion shows partitionnames while completing partitions, this
13508 feature was suggested by Jeff Bailey.
13509 * normal/command.c (pupa_iterate_commands): New function.
13510 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13511 (pupa_normal_init): Initialize history buffer.
13512 (PUPA_MOD_INIT): Likewise.
13513 (pupa_normal_fini): Free the history buffer.
13514 (PUPA_MOD_FINI): Likewise.
13516 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13519 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13520 * configure.ac [i386]: Check for regparam bug.
13521 (NESTED_FUNC_ATTR) [! i386]: Defined.
13523 2003-11-17 Marco Gerards <metgerards@student.han.nl>
13525 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13526 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13527 (pupa_emu_SOURCES): New variable.
13528 (pupa_emu_LDFLAGS): Likewise.
13529 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
13530 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
13531 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
13532 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13533 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13534 (pupa_jmp_buf): New typedef.
13535 (pupa_setjmp) [PUPA_UTIL]: New macro.
13536 (pupa_longjmp) [PUPA_UTIL]: Likewise.
13537 * include/pupa/term.h (struct pupa_term): New member `refresh'.
13538 (pupa_refresh): New prototype.
13539 * include/pupa/util/getroot.h: New file.
13540 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13542 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13543 (pupa_rescue_cmd_cat): Likewise.
13544 (pupa_rescue_cmd_ls): Likewise.
13545 (pupa_rescue_cmd_testload): Likewise.
13546 (pupa_rescue_cmd_lsmod): Likewise.
13547 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13548 * normal/menu.c (run_menu): Likewise.
13549 * kern/term.c (pupa_cls): Likewise.
13550 (pupa_refresh): New function.
13551 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13552 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13553 * util/console.c: New file.
13555 * util/i386/pc/getroot.c: New file.
13556 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13557 (pupa_putchar): New function.
13558 (pupa_refresh): Likewise.
13559 (xgetcwd): Function moved to ...
13560 (strip_extra_slashes): Likewise.
13561 (get_prefix): Likewise.
13562 * util/i386/pc/getroot.c: ... here.
13563 (find_root_device): Function moved and renamed to...
13564 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13565 Changed all callers.
13566 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13568 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13569 Changed all callers.
13570 * util/misc.c (pupa_memalign): New function.
13571 (pupa_mm_init_region): Likewise.
13572 (pupa_register_exported_symbols): Likewise.
13573 (pupa_putchar): Function removed.
13574 * util/pupa-emu.c: New file.
13576 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13578 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13579 (_multiboot_mod_SOURCES): New variable.
13580 (_multiboot_mod_CFLAGS): Likewise.
13581 * loader/i386/pc/multiboot.c: New file.
13582 * include/pupa/i386/pc/multiboot.h: Likewise.
13583 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13584 (pupa_multiboot_real_boot): New function.
13585 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13586 (pupa_multiboot_real_boot): New prototype.
13587 (pupa_rescue_cmd_multiboot): Likewise
13588 (pupa_rescue_cmd_module): Likewise.
13590 * kern/loader.c (pupa_loader_set): Continue when
13591 pupa_loader_unload_func() fails.
13592 (pupa_loader_unset): New function.
13593 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13595 * kern/misc.c (pupa_stpcpy): New function.
13596 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13598 2003-11-12 Marco Gerards <metgerards@student.han.nl>
13600 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13601 for available extensions.
13603 * include/pupa/i386/pc/time.h: New file.
13604 * kern/disk.c: Include <pupa/machine/time.h>.
13605 (PUPA_CACHE_TIMEOUT): New macro.
13606 (pupa_last_time): New variable.
13607 (pupa_disk_open): Flush the cache when there was a timeout.
13608 (pupa_disk_close): Reset the timer.
13609 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13611 * util/misc.c: Include <sys/times.h>
13612 (pupa_get_rtc): New function.
13614 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13616 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13618 (pupa_ext2_get_file_block): Use blocks member.
13620 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13621 first block. Return -1 instead of pupa_errno on error.
13623 2003-10-27 Marco Gerards <metgerards@student.han.nl>
13625 * README: In the pupa-mkimage example use _chain instead of chain
13626 and ext2 instead of fat.
13627 * TODO: Replace ext2fs with jfs as an example. Add an item for
13628 adding journal playback for ext2fs.
13629 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13630 (pkgdata_MODULES): Added ext2.mod.
13631 (ext2_mod_SOURCES): New variable.
13632 (ext2_mod_CFLAGS): Likewise.
13633 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13634 * include/pupa/misc.h (pupa_strncpy): New prototype.
13635 (pupa_strcat): Likewise.
13636 (pupa_strncmp): Likewise.
13637 * kern/misc.c (pupa_strcat): Enable function.
13638 (pupa_strncpy): New function.
13639 (pupa_strncmp): Likewise.
13640 * fs/ext2.c: New file.
13642 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13643 when the read failed before retrying.
13644 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13645 (_FILE_OFFSET_BITS): Likewise.
13646 * configure.ac: Added AC_SYS_LARGEFILE.
13648 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13650 * genmk.rb (PModule#rule): Make sure to get only symbol names
13651 from the output of nm.
13652 Reported by Robert Millan <zeratul2@wanadoo.es>.
13654 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13656 I forgot to check in these changes for a long time. This adds
13657 incomplete support for VGA console, and this is still very
13658 buggy. Also, a lot of consideration is required for I18N,
13659 UNICODE, and VGA font issues. Therefore, assume that this is
13660 such that "better than nothing".
13662 * font/manager.c: New file.
13663 * include/pupa/font.h: Likewise.
13664 * include/pupa/i386/pc/vga.h: Likewise.
13665 * term/i386/pc/vga.c: Likewise.
13666 * util/unifont2pff.rb: Likewise.
13668 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13669 (pkgdata_MODULES): Added vga.mod and font.mod.
13670 (vga_mod_SOURCES): New variables.
13671 (vga_mod_CFLAGS): Likewise.
13672 (font_mod_SOURCES): Likewise.
13673 (font_mod_CFLAGS): Likewise.
13675 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13677 * include/pupa/term.h: Include pupa/err.h.
13678 (struct pupa_term): Added init and fini.
13679 Changed the argument of putchar to pupa_uint32_t.
13681 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13682 (pupa_console_real_putchar): New prototype.
13683 (pupa_console_putchar): Removed.
13684 (pupa_console_checkkey): Exported.
13685 (pupa_console_getkey): Likewise.
13687 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13690 * kern/term.c (pupa_term_set_current): Rewritten.
13691 (pupa_putchar): Likewise.
13692 (pupa_putcode): New function.
13694 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13695 (pupa_console_real_putchar): ... this.
13696 (pupa_vga_set_mode): New function.
13697 (pupa_vga_get_font): Likewise.
13699 * normal/command.c: Include pupa/term.h.
13700 (terminal_command): New function.
13701 (pupa_command_init): Register the command "terminal".
13703 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13704 (DISP_UP): Likewise.
13705 (DISP_RIGHT): Likewise.
13706 (DISP_DOWN): Likewise.
13707 (DISP_HLINE): Likewise.
13708 (DISP_VLINE): Likewise.
13709 (DISP_UL): Likewise.
13710 (DISP_UR): Likewise.
13711 (DISP_LL): Likewise.
13712 (DISP_LR): Likewise.
13714 * term/i386/pc/console.c (pupa_console_putchar): New function.
13716 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13718 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13719 FIX. Reverse the path_list.
13721 * include/pupa/normal.h: Export pupa_register_command and
13722 pupa_unregister_command.
13724 * hello/hello.c (pupa_cmd_hello): New module.
13725 * conf/i386-pc.rmk: Added hello.mod.
13727 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13729 * kern/i386/pc/lzo1x.S: New file.
13731 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13732 (compress_kernel): New variable.
13733 (generate_image): Heavily modified to support compressing a
13734 large part of the core image.
13736 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13738 (pupa_util_load_image): New function.
13740 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13741 (pupa_compressed_size): New variable.
13742 (codestart): Enable Gate A20 here.
13743 Decompress the compressed part of the core image.
13744 Rearrange the code to put functions and variables which are
13745 required for initialization in the non-compressed part.
13748 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13751 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13753 * include/pupa/i386/pc/kernel.h
13754 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13755 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13756 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13757 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13758 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13760 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13762 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13763 (Utility#rule): Likewise.
13765 * configure.ac: Check if LZO is available.
13767 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13769 * include/pupa/normal.h: New file.
13770 * include/pupa/setjmp.h: Likewise.
13771 * include/pupa/i386/setjmp.h: Likewise.
13772 * normal/cmdline.c: Likewise.
13773 * normal/command.c: Likewise.
13774 * normal/main.c: Likewise.
13775 * normal/menu.c: Likewise.
13776 * normal/i386/setjmp.S: Likewise.
13778 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13779 (pupa_rescue_cmd_initrd): Likewise.
13781 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13784 * kern/i386/pc/startup.S (translation_table): New variable.
13785 (translate_keycode): New function.
13786 (pupa_console_getkey): Call translate_keycode.
13788 * kern/rescue.c (attempt_normal_mode): New function.
13789 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13790 it failed, print a message.
13792 * kern/mm.c (pupa_real_malloc): Print more information when a
13793 free magic is broken.
13794 (pupa_free): If the first free header is not free actually, set
13797 * kern/main.c (pupa_load_normal_mode): Just load the module
13799 (pupa_main): Don't print the message
13800 "Entering into rescue mode..." here.
13802 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13804 (pupa_rescue_cmd_initrd): Likewise.
13805 (pupa_rescue_cmd_initrd): Likewise.
13807 * include/pupa/symbol.h (FUNCTION): Specify the type.
13808 (VARIABLE): Likewise.
13810 * include/pupa/err.h (pupa_err_t): Added
13811 PUPA_ERR_UNKNOWN_COMMAND.
13813 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13814 (pupa_dl_get_prefix): Likewise.
13816 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13817 Added _chain.mod and _linux.mod instead of chain.mod and
13819 (chain_mod_SOURCES): Renamed to ...
13820 (_chain_mod_SOURCES): ... this.
13821 (chain_mod_CFLAGS): Renamed to ...
13822 (_chain_mod_CFLAGS): ... this.
13823 (linux_mod_SOURCES): Renamed to ...
13824 (_linux_mod_SOURCES): ... this.
13825 (linux_mod_CFLAGS): Renamed to ...
13826 (_linux_mod_CFLAGS): ... this.
13827 (normal_mod_SOURCES): New variable.
13828 (normal_mod_CFLAGS): Likewise.
13829 (normal_mod_ASFLAGS): Likewise.
13831 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13833 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13836 * kern/dl.c (pupa_dl_ref): Refer depending modules
13838 (pupa_dl_unref): Unrefer depending modules recursively.
13839 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13840 a module is unloaded before one depending on that module is
13842 (pupa_dl_unload): Unload depending modules explicitly,
13845 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13847 * include/pupa/i386/pc/linux.h: New file.
13848 * loader/i386/pc/linux.c: Likewise.
13850 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13852 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13853 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13854 of PUPA_CHAINLOADER_BOOT_SECTOR.
13856 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13857 (pupa_linux_prot_size): New variable.
13858 (pupa_linux_tmp_addr): Likewise.
13859 (pupa_linux_real_addr): Likewise.
13860 (pupa_linux_boot_zimage): New function.
13861 (pupa_linux_boot_bzimage): Likewise.
13863 * kern/i386/pc/init.c (struct mem_region): New structure.
13864 (MAX_REGIONS): New macro.
13865 (mem_regions): New variable.
13866 (num_regions): Likewise.
13867 (pupa_os_area_addr): Likewise.
13868 (pupa_os_area_size): Likewise.
13869 (pupa_lower_mem): Likewise.
13870 (pupa_upper_mem): Likewise.
13871 (add_mem_region): New function.
13872 (compact_mem_regions): Likewise.
13873 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13874 the size of the conventional memory and that of so-called upper
13875 memory (before the first memory hole).
13876 Instead of adding each found region to free memory, use
13877 add_mem_region and add them after removing overlaps.
13878 Also, add only 1/4 of the upper memory to free memory. The rest
13879 is used for loading OS images. Maybe this is ad hoc, but this
13880 makes it much easier to relocate OS images when booting.
13882 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13883 (pupa_enter_rescue_mode): Don't register initrd and module.
13885 * kern/mm.c: Include pupa/dl.h.
13887 * kern/main.c: Include pupa/file.h and pupa/device.h.
13889 * kern/loader.c (pupa_loader_load_module_func): Removed.
13890 (pupa_loader_load_module): Likewise.
13892 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13895 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13896 (pupa_linux_tmp_addr): Likewise.
13897 (pupa_linux_real_addr): Likewise.
13898 (pupa_linux_boot_zimage): Likewise.
13899 (pupa_linux_boot_bzimage): Likewise.
13901 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13902 (pupa_upper_mem): Likewise.
13903 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13904 module is too dangerous.
13906 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13907 (pupa_os_area_size): Likewise.
13908 (pupa_loader_set): Remove the first argument. Loader doesn't
13909 manage modules or initrd any longer.
13910 (pupa_loader_load_module): Removed.
13912 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13913 (linux_mod_SOURCES): New variable.
13914 (linux_mod_CFLAGS): Likewise.
13916 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13918 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13919 the length of a blocklist correctly.
13921 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13922 Use ioctl only if the OS file is a block device.
13923 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13924 not very useful for normal files.
13926 * kern/main.c (pupa_set_root_dev): New function.
13927 (pupa_load_normal_mode): Likewise.
13928 (pupa_main): Call those above.
13930 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13933 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13935 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13937 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13938 (setup): Configure the installed partition information and the
13941 * loader/i386/pc/chainloader.c (my_mod): New variable.
13942 (pupa_chainloader_unload): New function.
13943 (pupa_rescue_cmd_chainloader): Refer itself.
13944 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13946 * kern/i386/pc/startup.S (install_partition): Removed.
13947 (version_string): Likewise.
13948 (config_file): Likewise.
13949 (pupa_install_dos_part): New variable.
13950 (pupa_install_bsd_part): Likewise.
13951 (pupa_prefix): Likewise.
13952 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13954 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13956 (make_install_device): New function.
13957 (pupa_machine_init): Set the dl prefix.
13959 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13960 (buf): Renamed to ...
13961 (linebuf): ... this.
13962 (pupa_rescue_cmd_prefix): New function.
13963 (pupa_rescue_cmd_insmod): Likewise.
13964 (pupa_rescue_cmd_rmmod): Likewise.
13965 (pupa_rescue_cmd_lsmod): Likewise.
13966 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13969 * kern/mm.c (pupa_memalign): If failed even after invalidating
13970 disk caches, unload unneeded modules and retry.
13972 * kern/misc.c (pupa_memmove): New function.
13973 (pupa_memcpy): Removed.
13974 (pupa_strcpy): New function.
13975 (pupa_itoa): Made static.
13977 * kern/dl.c (pupa_dl_iterate): New function.
13978 (pupa_dl_ref): Likewise.
13979 (pupa_dl_unref): Likewise.
13980 (pupa_dl_unload): Return if succeeded or not.
13981 (pupa_dl_unload_unneeded): New function.
13982 (pupa_dl_unload_all): Likewise.
13983 (pupa_dl_init): Renamed to ...
13984 (pupa_dl_set_prefix): ... this.
13985 (pupa_dl_get_prefix): New function.
13987 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13988 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13989 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13990 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13991 (pupa_install_dos_part): Declared.
13992 (pupa_install_bsd_part): Likewise.
13993 (pupa_prefix): Likewise.
13994 (pupa_boot_drive): Likewise.
13996 * include/pupa/types.h: Fix a typo.
13998 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14000 (pupa_memmove): Declared.
14001 (pupa_strcpy): Likewise.
14003 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14004 pupa_mod_init takes one argument, its own module.
14005 (pupa_dl_unload_unneeded): Declared.
14006 (pupa_dl_unload_all): Likewise.
14007 (pupa_dl_ref): Likewise.
14008 (pupa_dl_unref): Likewise.
14009 (pupa_dl_iterate): Likewise.
14010 (pupa_dl_init): Renamed to ...
14011 (pupa_dl_set_prefix): ... this.
14012 (pupa_dl_get_prefix): Declared.
14014 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
14015 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
14017 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14018 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14020 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14021 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14023 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14025 * util/i386/pc/pupa-setup.c (setup): Define the internal
14026 function find_first_partition_start at the top level, because GCC
14027 3.0.x cannot compile internal functions in deeper scopes
14029 (find_root_device): Use lstat instead of stat.
14030 Don't follow symbolic links.
14031 Fix the path-constructing code.
14033 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14034 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14035 by a BLKGETSIZE ioctl first, because block devices don't fill
14036 the member st_mode of the structure stat on Linux.
14037 [__linux__] (linux_find_partition): Use a temporary buffer
14038 REAL_DEV for the working space. Copy it to DEV before returning.
14039 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14040 buffer cache consistent.
14041 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14042 strncmp. The previous value was merely wrong.
14043 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14045 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14046 FAT size is 12. The previous value was merely wrong.
14048 * kern/main.c (pupa_main): Don't split the starting message from
14051 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14052 LF, because BIOS goes crazy about character attributes in this
14055 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14057 * include/i386/pc/util/biosdisk.h: New file.
14058 * util/i386/pc/biosdisk.c: Likewise.
14059 * util/i386/pc/pupa-setup.c: Likewise.
14061 * Makefile.in (INCLUDE_DISTFILES): Added
14062 include/pupa/i386/pc/util/biosdisk.h.
14063 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14064 directory util/i386/pc.
14065 (install-local): Added a rule for sbin_UTILITIES.
14066 (uninstall): Likewise.
14068 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14070 * util/misc.c (xrealloc): New function.
14071 (pupa_malloc): Likewise.
14072 (pupa_free): Likewise.
14073 (pupa_realloc): Likewise.
14074 (pupa_stop): Likewise.
14075 (pupa_putchar): Likewise.
14077 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14079 * include/pupa/util/misc.h (xrealloc): Declared.
14081 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14083 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14084 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14086 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14087 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14089 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14090 way should be implemented.
14091 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14093 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14094 the size of NAME for safety.
14095 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14098 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14099 (pupa_setup_SOURCES): Likewise.
14101 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14103 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14105 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14106 bunch of pushl's from pusha, because this destroys the return
14109 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14111 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14112 This means that any missing prototypes could be fatal. Also, you
14113 must take care when writing assembly code. See the comments at
14114 the beginning of startup.S, for more details.
14116 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14117 compilation mechanism.
14118 (pupa_chainloader_real_boot): Likewise.
14119 (pupa_biosdisk_rw_int13_extensions): Likewise.
14120 (pupa_biosdisk_rw_standard): Likewise.
14121 (pupa_biosdisk_check_int13_extensions): Likewise.
14122 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14123 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14124 (pupa_get_memsize): Likewise.
14125 (pupa_get_mmap_entry): Likewise.
14126 (pupa_console_putchar): Likewise.
14127 (pupa_console_setcursor): Likewise.
14128 (pupa_getrtsecs): Use pushl instead of push.
14130 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14131 memory instead of the stack for a mmap entry, because some
14132 BIOSes may ignore the maximum size and overflow.
14134 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14136 * genmk.rb (PModule#rule): Compile automatically generated
14137 sources with module-specific CFLAGS as well as other sources.
14139 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14141 * configure.ac: Check ld.
14142 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14143 respectively, before checking endianness and sizes.
14145 * Makefile.in (LD): New variable.
14147 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14149 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14151 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14153 * Changelog: New file.