1 2009-02-07 Michael Scherer <misc@mandriva.org>
3 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5 2009-02-07 Robert Millan <rmh@aybabtu.com>
7 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
8 position of `disk/lvm.c' to ensure grub_init_all() always picks it
11 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
13 Fixes problem when running vbetest command as reported by
14 Vladimir Serbinenko <phcoder@gmail.com>.
16 * (grub_vbe_set_video_mode): Fixed problem with text modes.
18 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
20 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
21 /dev/md/NpN style mdraid devices.
23 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
25 * util/unifont2pff.rb: Remove.
27 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
29 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
32 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
34 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
35 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
36 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
37 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
38 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
39 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
40 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
42 2009-02-02 Christian Franke <franke@computer.org>
44 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
46 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
48 * INSTALL: Note that we now require at least autoconf 2.59 and
51 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
53 Base on patch on bug #24154 created by Tomas Tintera
56 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
58 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
60 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
63 * normal/parser.y (script_init): Add missing semicolon.
65 2009-01-31 Colin D Bennett <colin@gibibit.com>
67 * normal/main.c: Add include to grub/menu_viewer.h.
68 (free_menu_entry_classes): Added.
69 (grub_normal_menu_addentry): Added class property handling.
70 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
71 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
73 * normal/menu_viewer.c: New file.
75 * normal/menu.c (run_menu_entry): Renamed to ...
76 (grub_menu_execute_entry): ... this and made it as global.
77 (grub_menu_run): Renamed to ...
78 (show_text_menu): ... this and made it local.
79 (show_text_menu): Adapt to new function names.
80 (grub_normal_terminal_menu_viewer): New global variable.
82 * include/grub/menu.h: New file.
84 * include/grub/menu_viewer.h: New file.
86 * include/grub/normal.h: Added include to grub/menu.h.
87 (grub_menu_entry): Moved to include/grub/menu.h.
88 (grub_menu_entry_t): Likewise.
89 (grub_menu): Likewise.
90 (grub_menu_t): Likewise.
91 (grub_normal_terminal_menu_viewer): Added.
92 (grub_menu_execute_entry): Likewise.
93 (grub_menu_run): Removed.
95 * DISTLIST: Added include/grub/menu.h.
96 Added include/grub/menu_viewer.h.
97 Added normal/menu_viewer.c.
99 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
101 * normal/execute.c (grub_script_execute_menuentry): Changed to use
102 arglist for menutitle arguments.
104 * normal/main.c (grub_normal_menu_addentry): Likewise.
106 * normal/parser.y (menuentry): Likewise.
108 * normal/script.c (grub_script_create_cmdmenu): Likewise.
110 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
111 (grub_script_create_cmdmenu): Likewise.
113 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
115 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
118 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
120 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
122 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
124 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
126 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
128 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
130 2009-01-30 Christian Franke <franke@computer.org>
132 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
135 2009-01-27 Pavel Roskin <proski@gnu.org>
137 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
139 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
141 * commands/lsmmap.c: Add include to grub/machine/memory.h.
143 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
145 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
148 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
150 * disk/scsi.c (grub_scsi_read): Fix sign problem.
152 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
154 * util/grub-mkfont.c (usage): Fix typo.
156 * util/elf/grub-mkimage.c (load_modules): Fix warning.
158 2009-01-26 Daniel Mierswa <impulze@impulze.org>
160 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
162 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
164 * kern/misc.c (grub_strcasecmp): New function.
165 (grub_strcasecmp): Use grub_size_t instead of int for length.
167 * include/grub/misc.h: Update function prototypes.
169 2009-01-26 Robert Millan <rmh@aybabtu.com>
171 * configure.ac: Fix cross-compilation check.
173 2009-01-22 Christian Franke <franke@computer.org>
175 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
176 (precision) digit string. Allow `.format2' without `format1' (width).
177 Limit input chars for `%s' output to `format2' if specified. This is
178 compatible with standard printf ().
180 2009-01-22 Christian Franke <franke@computer.org>
182 * disk/ata.c (grub_ata_wait_status): Replace by ...
183 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
184 other status bits may be invalid while BSY is asserted.
185 (grub_ata_check_ready): New function.
186 (grub_ata_cmd): Removed.
187 (grub_ata_wait_drq): New function.
188 (grub_ata_strncpy): Remove inline.
189 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
190 and error check now done by grub_ata_wait_drq ().
191 (grub_ata_pio_write): Likewise.
192 (grub_atapi_identify): Set DEV before check for !BSY. Use
193 grub_ata_wait_drq () to wait for data.
194 (grub_ata_device_initialize): Add status register check to
195 detect missing SATA slave devices. Add debug messages.
196 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
197 (grub_atapi_packet): Set DEV before check for !BSY. Replace
198 transfer loop by grub_ata_pio_write ().
199 (grub_ata_identify): Set DEV before check for !BSY. Use
200 grub_ata_wait_drq () to wait for data.
201 (grub_ata_setaddress): Set DEV before check for !BSY.
202 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
203 read/write in one loop. Fix invalid command on write. Fix incomplete
204 command on (size % batch) == 0. Add missing error check after write of
205 last block. Add debug messages.
206 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
208 2009-01-19 Christian Franke <franke@computer.org>
210 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
211 (GRUB_ATAPI_IREASON_*): Likewise.
212 (grub_ata_pio_write): Fix timeout error return.
213 (grub_atapi_identify): Add grub_ata_wait () after cmd.
214 (grub_atapi_wait_drq): New function.
215 (grub_atapi_packet): New parameter `size'.
216 Use grub_atapi_wait_drq () and direct write instead of
217 grub_ata_pio_write ().
218 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
219 reads the number of bytes requested by the device for each DRQ
221 (grub_atapi_write): Remove old implementation, return not
224 2009-01-19 Christian Franke <franke@computer.org>
226 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
227 of 512 to calculate data size.
228 (grub_scsi_read12): Likewise.
229 (grub_scsi_write10): Likewise.
230 (grub_scsi_write12): Likewise.
231 (grub_scsi_read): Adjust size according to blocksize.
232 Add checks for invalid blocksize and unaligned transfer.
234 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
236 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
238 * term/gfxterm.c (write_char): Fix background rendering for wide
241 2009-01-19 Robert Millan <rmh@aybabtu.com>
243 * config.guess: Update to latest version from config git.
244 * config.sub: Likewise.
246 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
248 * Makefile.in: Change font compilation to use new grub-mkfont instead
251 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
252 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
253 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
254 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
255 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
256 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
257 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
258 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
259 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
261 2009-01-16 Christian Franke <franke@computer.org>
263 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
264 (enum grub_ata_timeout_milliseconds): New enum.
265 (grub_ata_wait_status): Add parameter milliseconds.
266 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
267 recovery from timed-out commands.
268 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
269 return grub_errno instead of REG_ERROR.
270 (grub_ata_pio_write): Add parameter milliseconds.
271 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
272 Pass milliseconds to grub_ata_wait_status () and
273 grub_ata_pio_read ().
274 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
275 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
276 grub_ata_wait_status (). Fix IDENTIFY timeout check.
277 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
278 It is not suitable for device detection, because DEV bit is ignored,
279 the command may run too long, and not all devices set the signature
281 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
282 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
283 Fix device selection, DEV bit must be set first to address the registers
284 of the correct device.
285 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
286 grub_ata_pio_read/write ().
287 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
288 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
290 2009-01-13 Carles Pina i Estany <carles@pina.cat>
292 * util/grub-editenv.c (main): Use fseeko(), not fseek().
294 2009-01-13 Bean <bean123ch@gmail.com>
296 * util/grub-mkfont.c (write_font): forget to remove some debug code.
298 2009-01-13 Bean <bean123ch@gmail.com>
300 * Makefile.in: (enable_grub_mkfont): New variable.
301 (freetype_cflags): Likewise.
302 (freetype_libs): Likewise.
304 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
305 (grub_mkfont_SOURCES): New variable.
306 (grub_mkfont_CFLAGS): Likewise.
307 (grub_mkfont_LDFLAGS): Likewise.
309 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
310 library if `--enable-grub-mkfont' is requested.
311 (enable_grub_mkfont): New variable.
312 (freetype_cflags): Likewise.
313 (freetype_libs): Likewise.
315 * util/grub-mkfont.c: New file.
317 2009-01-12 Christian Franke <franke@computer.org>
319 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
320 mode check. Fix setting of compat_use[].
322 2009-01-10 Robert Millan <rmh@aybabtu.com>
324 Update a few copyright years which we forgot to do in 2008 (only for
325 files whose changes made in 2008 were copyright-significant)
327 * Makefile.in: Add 2008 to Copyright line.
328 * disk/ieee1275/ofdisk.c: Likewise.
329 * disk/efi/efidisk.c: Likewise.
330 * kern/dl.c: Likewise.
331 * kern/sparc64/ieee1275/init.c: Likewise.
332 * kern/mm.c: Likewise.
333 * kern/efi/mm.c: Likewise.
334 * boot/i386/pc/boot.S: Likewise.
335 * genfslist.sh: Likewise.
336 * fs/iso9660.c: Likewise.
337 * fs/hfs.c: Likewise.
338 * fs/jfs.c: Likewise.
339 * fs/minix.c: Likewise.
340 * fs/ufs.c: Likewise.
341 * gensymlist.sh.in: Likewise.
342 * genkernsyms.sh.in: Likewise.
343 * include/grub/misc.h: Likewise.
344 * include/grub/types.h: Likewise.
345 * include/grub/symbol.h: Likewise.
346 * include/grub/elf.h: Likewise.
347 * include/grub/kernel.h: Likewise.
348 * include/grub/disk.h: Likewise.
349 * include/grub/dl.h: Likewise.
350 * include/grub/i386/linux.h: Likewise.
351 * include/grub/i386/pc/biosdisk.h: Likewise.
352 * include/grub/efi/api.h: Likewise.
353 * include/grub/efi/pe32.h: Likewise.
354 * include/grub/util/misc.h: Likewise.
355 * normal/execute.c: Likewise.
356 * normal/arg.c: Likewise.
357 * normal/completion.c: Likewise.
358 * normal/lexer.c: Likewise.
359 * normal/parser.y: Likewise.
360 * normal/misc.c: Likewise.
361 * commands/i386/pc/vbeinfo.c: Likewise.
362 * commands/hexdump.c: Likewise.
363 * commands/terminal.c: Likewise.
364 * commands/ls.c: Likewise.
365 * commands/help.c: Likewise.
366 * partmap/pc.c: Likewise.
367 * loader/efi/chainloader.c: Likewise.
368 * loader/multiboot_loader.c: Likewise.
369 * loader/i386/pc/multiboot2.c: Likewise.
370 * term/efi/console.c: Likewise.
371 * term/i386/pc/serial.c: Likewise.
372 * util/lvm.c: Likewise.
373 * util/console.c: Likewise.
374 * util/i386/efi/grub-mkimage.c: Likewise.
375 * util/raid.c: Likewise.
377 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
379 * commands/videotest.c: Removed include to grub/machine/memory.h.
381 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
382 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
383 (video_mod_SOURCES): Removed.
384 (video_mod_CFLAGS): Likewise.
385 (video_mod_LDFLAGS): Likewise.
386 (gfxterm_mod_SOURCES): Likewise.
387 (gfxterm_mod_CFLAGS): Likewise.
388 (gfxterm_mod_LDFLAGS): Likewise.
389 (videotest_mod_SOURCES): Likewise.
390 (videotest_mod_CFLAGS): Likewise.
391 (videotest_mod_LDFLAGS): Likewise.
392 (bitmap_mod_SOURCES): Likewise.
393 (bitmap_mod_CFLAGS): Likewise.
394 (bitmap_mod_LDFLAGS): Likewise.
395 (tga_mod_SOURCES): Likewise.
396 (tga_mod_CFLAGS): Likewise.
397 (tga_mod_LDFLAGS): Likewise.
398 (jpeg_mod_SOURCES): Likewise.
399 (jpeg_mod_CFLAGS): Likewise.
400 (jpeg_mod_LDFLAGS): Likewise.
401 (png_mod_SOURCES): Likewise.
402 (png_mod_CFLAGS): Likewise.
403 (png_mod_LDFLAGS): Likewise.
405 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
406 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
407 (video_mod_SOURCES): Added.
408 (video_mod_CFLAGS): Likewise.
409 (video_mod_LDFLAGS): Likewise.
410 (videotest_mod_SOURCES): Likewise.
411 (videotest_mod_CFLAGS): Likewise.
412 (videotest_mod_LDFLAGS): Likewise.
413 (bitmap_mod_SOURCES): Likewise.
414 (bitmap_mod_CFLAGS): Likewise.
415 (bitmap_mod_LDFLAGS): Likewise.
416 (tga_mod_SOURCES): Likewise.
417 (tga_mod_CFLAGS): Likewise.
418 (tga_mod_LDFLAGS): Likewise.
419 (jpeg_mod_SOURCES): Likewise.
420 (jpeg_mod_CFLAGS): Likewise.
421 (jpeg_mod_LDFLAGS): Likewise.
422 (png_mod_SOURCES): Likewise.
423 (png_mod_CFLAGS): Likewise.
424 (png_mod_LDFLAGS): Likewise.
425 (gfxterm_mod_SOURCES): Likewise.
426 (gfxterm_mod_CFLAGS): Likewise.
427 (gfxterm_mod_LDFLAGS): Likewise.
429 * term/gfxterm.c: Removed include to grub/machine/memory.h,
430 grub/machine/console.h.
432 2009-01-04 Jerone Young <jerone@gmail.com>
434 Make on screen instructions clearer
436 Based on patch created by Jidanni <jidanni@jidanni.org>
438 * normal/menu.c: print clearer instructions on the screen
440 2009-01-02 Colin D Bennett <colin@gibibit.com>
444 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
445 build system and fixed gfxterm.c to work with different sized fonts.
447 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
449 * configure: Re-generated.
451 * DISTLIST: Removed font/manager.c.
453 Added font/font_cmd.c.
455 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
458 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
460 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
462 * kern/term.c: Changed users of grub_utf8_to_ucs4.
464 * normal/menu.c: Likewise.
466 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
467 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
469 * include/grub/font.h: Replaced with new file.
471 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
472 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
473 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
474 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
475 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
476 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
477 fg_red, fg_green, fg_blue, fg_alpha.
478 (grub_video_adapter): Removed blit_glyph.
479 (grub_video_blit_glyph): Removed.
481 * font/manager.c: Removed file.
483 * font/font.c: New file.
485 * font/font_cmd.c: Likewise.
487 * video/video.c (grub_video_blit_glyph): Removed.
489 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
490 (grub_video_vbe_map_rgba): Likewise.
491 (grub_video_vbe_unmap_color_int): Likewise.
492 (grub_video_vbe_blit_glyph): Removed.
493 (grub_video_vbe_adapter): Removed blit_glyph.
495 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
496 (get_pixel): Likewise.
497 (set_pixel): Likewise.
499 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
501 * term/gfxterm.c: Adapted to new font engine.
503 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
505 * term/i386/pc/vga.c: Likewise.
507 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
509 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
511 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
513 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
515 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
517 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
519 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
521 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
523 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
525 * util/grub.d/00_header.in: Changed to use new loadfont command.
527 * util/grub-mkconfig_lib.in: Changed font extension.
529 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
531 * util/getroot.c (grub_util_get_grub_dev): Add support for
532 /dev/md/dNNpNN style partitionable mdraid devices.
534 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
536 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
537 at a time limit of the PXE TFTP API correctly.
538 (grub_pxefs_close): Likewise.
540 2008-11-29 Robert Millan <rmh@aybabtu.com>
542 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
543 grub_ata_device_initialize() calls.
545 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
547 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
549 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
551 2008-11-28 Robert Millan <rmh@aybabtu.com>
553 Fix build on powerpc-ieee1275. Based on patch created by
554 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
555 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
556 `kern/ieee1275/mmap.c'.
557 * include/grub/powerpc/ieee1275/memory.h: New file.
559 Provide grub-install on coreboot.
560 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
561 (grub_install_SOURCES): New variable.
562 * util/i386/pc/grub-install.in: Add a few condition checks to make it
565 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
567 * util/grub-fstest.c (grub_term_get_current_input): Change return type
568 to `grub_term_input_t'.
569 (grub_term_get_current_output): Change return type to
570 `grub_term_output_t'.
572 2008-11-22 Robert Millan <rmh@aybabtu.com>
574 Fix breakage on coreboot due to declaration mismatch.
575 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
576 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
579 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
580 comments. Avoid copying one more byte than necessary (just in case).
582 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
583 to 0x200000 (avoids trouble with some OFW implementations, and matches
584 with the one in Yaboot).
585 Reported by Manoel Abranches
587 2008-11-20 Robert Millan <rmh@aybabtu.com>
589 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
590 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
592 * util/grub-mkconfig_lib.in (grub_warn): New function.
593 (convert_system_path_to_grub_path): Use grub_warn() when issuing
594 warnings, to obtain consistent formatting.
595 * util/grub.d/00_header.in: Likewise.
596 * util/update-grub_lib.in: Likewise.
598 * loader/i386/linux.c (allocate_pages): Fix a warning.
599 Move comment text to `#error' stanza.
601 Harmonize ieee1275's grub_available_iterate() with the generic
602 grub_machine_mmap_iterate() interface (fixes a recently-introduced
603 build problem on i386-ieee1275):
604 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
605 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
606 parameter `type'. Update all users of this function.
607 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
608 `kern/ieee1275/mmap.c'.
609 * kern/ieee1275/init.c
610 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
612 (grub_machine_mmap_iterate): ... this.
613 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
614 return type to `grub_err_t'. Update all implementations of this
616 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
619 Add `lsmmap' command (lists firmware-provided memory map):
620 * commands/lsmmap.c: New file.
621 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
622 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
624 * conf/powerpc-ieee1275.rmk: Likewise.
625 * conf/i386-coreboot.rmk: Likewise.
626 * conf/i386-ieee1275.rmk: Likewise.
628 2008-11-19 Robert Millan <rmh@aybabtu.com>
630 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
631 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
632 constraints to initrd allocation (based on code from
633 loader/i386/pc/linux.c). Without them, initrd was allocated too high
634 for Linux to find it.
636 2008-11-14 Robert Millan <rmh@aybabtu.com>
638 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
639 order to cope with duplicate slashes.
641 2008-11-14 Robert Millan <rmh@aybabtu.com>
643 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
644 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
645 don't want to mess with lower memory, because it is used in the Linux
648 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
649 an appropriate place in lower memory, between 0x10000 and 0x90000,
650 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
651 is in our heap (probably as a result of it being corrupted during
652 decompression). Add #error instance with comment to explain why this
653 loader isn't currently usable on PC/BIOS.
655 2008-11-14 Robert Millan <rmh@aybabtu.com>
657 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
658 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
660 2008-11-12 Robert Millan <rmh@aybabtu.com>
662 Make loader/i386/linux.c buildable on i386-pc (although disabled).
664 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
665 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
667 * include/grub/i386/pc/memory.h: ... to here.
669 2008-11-12 Robert Millan <rmh@aybabtu.com>
671 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
674 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
675 (grub_console_cur_color, grub_console_real_putchar)
676 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
677 (grub_console_setcolorstate, grub_console_setcolor)
678 (grub_console_getcolor): Move from here ...
679 * include/grub/i386/vga_common.h: ... to here (new file).
681 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
682 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
684 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
685 `<grub/i386/vga_common.h>'.
687 2008-11-12 Robert Millan <rmh@aybabtu.com>
689 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
690 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
691 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
693 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
694 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
696 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
697 grub_console_init() with call to grub_vga_text_init().
698 (grub_machine_fini): Replace call to
699 grub_console_fini() with call to grub_vga_text_fini() and
700 grub_at_keyboard_fini().
702 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
703 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
704 (grub_console_setcolorstate, grub_console_setcolor)
705 (grub_console_getcolor): New function prototypes.
707 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
708 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
709 (grub_vga_text_setcursor): Static-ize.
710 (grub_vga_text_term): New structure.
711 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
713 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
714 (grub_console_cur_color, grub_console_standard_color)
715 (grub_console_normal_color, grub_console_highlight_color)
716 (map_char, grub_console_putchar, grub_console_getcharwidth)
717 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
718 (grub_console_getcolor): Move from here ...
719 * term/i386/vga_common.c: ... to here (same function names).
721 2008-11-12 Robert Millan <rmh@aybabtu.com>
723 Use newly-added Multiboot support in coreboot.
725 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
726 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
728 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
729 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
730 (codestart): Store the MBI in `startup_multiboot_info' when we're
731 being loaded using Multiboot.
733 * kern/i386/coreboot/init.c (grub_machine_init): Move
734 grub_at_keyboard_init() call to beginning of function (useful for
735 debugging). Call grub_machine_mmap_init() before attempting to use
736 grub_machine_mmap_iterate().
737 (grub_lower_mem, grub_upper_mem): Move from here ...
738 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
741 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
744 2008-11-12 Robert Millan <rmh@aybabtu.com>
746 Fix a regression introduced by the at_keyboard.mod split. Because
747 some terminals are default on some platforms and non-default on
748 others, the first terminal being registered determines which is
751 * kern/term.c (grub_term_register_input): If this is the first
752 terminal being registered, set it as the current one.
753 (grub_term_register_output): Likewise.
755 * term/efi/console.c (grub_console_init): Do not call
756 grub_term_set_current_output() or grub_term_set_current_input().
757 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
758 * term/i386/pc/console.c (grub_console_init): Likewise.
759 (grub_console_fini): Do not call grub_term_set_current_input()
760 (but leave grub_term_set_current_output() to restore text mode).
762 2008-11-10 Robert Millan <rmh@aybabtu.com>
764 * util/grub.d/00_header.in: Add backward compatibility check for
765 versions of terminal.mod that don't understand `terminal_input' or
768 2008-11-09 Robert Millan <rmh@aybabtu.com>
770 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
771 `terminal_input' / `terminal_output', not `terminal'.
773 2008-11-08 Robert Millan <rmh@aybabtu.com>
775 * Makefile.in (include_DATA): Fix srcdir=. assumption.
776 (DISTCLEANFILES): Add `build_env.mk'.
778 2008-11-08 Robert Millan <rmh@aybabtu.com>
780 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
781 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
782 members. Update all users.
783 * util/console.c (grub_ncurses_term): Split in ...
784 (grub_ncurses_term_input): ... this, and ...
785 (grub_ncurses_term_output): ... this. Update all users.
786 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
788 2008-11-08 Robert Millan <rmh@aybabtu.com>
790 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
791 (PKGDATA): Add $(pkgdata_SRCDIR).
792 (pkglib_BUILDDIR): New variable.
793 (pkgdata_SRCDIR): New variable.
794 (build_env.mk): New target.
795 (include_DATA): New variable.
796 (install-local): Install $(include_DATA) files in $(includedir).
798 2008-11-07 Pavel Roskin <proski@gnu.org>
800 * gendistlist.sh: Use C locale for sorting to ensure consistent
801 output on all systems.
803 * util/grub.d/00_header.in: Remove incorrect space before
806 2008-11-07 Robert Millan <rmh@aybabtu.com>
808 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
810 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
811 * loader/multiboot_loader.c (find_multi_boot2_header): New function
812 (based on find_multi_boot1_header).
813 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
814 using find_multi_boot2_header(), and abort if neither Multiboot or
815 Multiboot headers were found.
817 2008-11-07 Robert Millan <rmh@aybabtu.com>
819 Modularize at_keyboard.mod:
821 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
822 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
823 (at_keyboard_mod_LDFLAGS): New variables.
825 Actual terminal split:
827 * include/grub/term.h (struct grub_term): Split in ...
828 (struct grub_term_input): ... this, and ...
829 (struct grub_term_output): ... this. Update all users.
830 (grub_term_set_current): Split in ...
831 (grub_term_set_current_input): ... this, and ...
832 (grub_term_set_current_output): ... this.
833 (grub_term_get_current): Split in ...
834 (grub_term_get_current_input): ... this, and ...
835 (grub_term_get_current_output): ... this.
836 (grub_term_register): Split in ...
837 (grub_term_register_input): ... this, and ...
838 (grub_term_register_output): ... this.
839 (grub_term_unregister): Split in ...
840 (grub_term_unregister_input): ... this, and ...
841 (grub_term_unregister_output): ... this.
842 (grub_term_iterate): Split in ...
843 (grub_term_iterate_input): ... this, and ...
844 (grub_term_iterate_output): ... this.
846 * kern/term.c (grub_term_list): Split in ...
847 (grub_term_list_input): ... this, and ...
848 (grub_term_list_output): ... this. Update all users.
849 (grub_cur_term): Split in ...
850 (grub_cur_term_input): ... this, and ...
851 (grub_cur_term_output): ... this. Update all users.
852 (grub_term_set_current): Split in ...
853 (grub_term_set_current_input): ... this, and ...
854 (grub_term_set_current_output): ... this.
855 (grub_term_get_current): Split in ...
856 (grub_term_get_current_input): ... this, and ...
857 (grub_term_get_current_output): ... this.
858 (grub_term_register): Split in ...
859 (grub_term_register_input): ... this, and ...
860 (grub_term_register_output): ... this.
861 (grub_term_unregister): Split in ...
862 (grub_term_unregister_input): ... this, and ...
863 (grub_term_unregister_output): ... this.
864 (grub_term_iterate): Split in ...
865 (grub_term_iterate_input): ... this, and ...
866 (grub_term_iterate_output): ... this.
868 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
869 a check for input and one for output (and only attempt to get keys
870 from user when input works).
872 * util/grub-probe.c (grub_term_get_current): Split in ...
873 (grub_term_get_current_input): ... this, and ...
874 (grub_term_get_current_output): ... this.
875 * util/grub-fstest.c: Likewise.
876 * util/i386/pc/grub-setup.c: Likewise.
877 * util/grub-editenv.c: Likewise.
879 Portability adjustments:
881 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
882 `term/i386/pc/at_keyboard.c'.
883 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
884 grub_keyboard_controller_init() (now handled by terminal .init).
885 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
886 grub_at_keyboard_init().
887 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
888 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
889 at_keyboard.mod via input terminal interface).
890 * include/grub/i386/coreboot/console.h: Convert into a stub for
891 `<grub/i386/pc/console.h>'.
893 Migrate full terminals to new API:
895 * term/efi/console.c (grub_console_term): Split into ...
896 (grub_console_term_input): ... this, and ...
897 (grub_console_term_output): ... this. Update all users.
898 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
899 (grub_ofconsole_init): Split into ...
900 (grub_ofconsole_init_input): ... this, and ...
901 (grub_ofconsole_init_output): ... this.
902 (grub_ofconsole_term): Split into ...
903 (grub_ofconsole_term_input): ... this, and ...
904 (grub_ofconsole_term_output): ... this. Update all users.
905 * term/i386/pc/serial.c (grub_serial_term): Split into ...
906 (grub_serial_term_input): ... this, and ...
907 (grub_serial_term_output): ... this. Update all users.
908 * term/i386/pc/console.c (grub_console_term): Split into ...
909 (grub_console_term_input): ... this, and ...
910 (grub_console_term_output): ... this. Update all users.
911 (grub_console_term_input): Only enable it on PC/BIOS platform.
912 (grub_console_init): Remove grub_keyboard_controller_init() call.
914 Migrate input terminals to new API:
916 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
917 `i386' and `i386/pc' to enable build on x86_64 (this driver is
918 i386-specific anyway).
919 (grub_console_checkkey): Rename to ...
920 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
922 (grub_keyboard_controller_orig): New variable.
923 (grub_console_getkey): Rename to ...
924 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
926 (grub_keyboard_controller_init): Static-ize. Save original
927 controller value so that it can be restored ...
928 (grub_keyboard_controller_fini): ... here (new function).
929 (grub_at_keyboard_term): New structure.
930 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
933 Migrate output terminals to new API:
935 * term/i386/pc/vga.c (grub_vga_term): Change type to
936 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
937 members. Update all users.
938 * term/gfxterm.c (grub_video_term): Change type to
939 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
940 members. Update all users.
941 * include/grub/i386/pc/console.h (grub_console_checkkey)
942 (grub_console_getkey): Do not export (no longer needed by gfxterm,
945 Migrate `terminal' command and userland tools to new API:
947 * commands/terminal.c (grub_cmd_terminal): Split into ...
948 (grub_cmd_terminal_input): ... this, and ...
949 (grub_cmd_terminal_output): ... this.
950 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
951 `terminal_input' and `terminal_output'.
952 * util/grub.d/00_header.in: Adjust `terminal' calls to new
953 `terminal_input' / `terminal_output' API.
954 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
955 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
956 provided ${GRUB_TERMINAL}, convert it).
958 2008-11-04 Robert Millan <rmh@aybabtu.com>
960 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
962 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
964 2008-11-03 Bean <bean123ch@gmail.com>
966 * kern/elf.c (grub_elf32_load): Revert to previous code.
967 (grub_elf64_load): Likewise.
969 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
971 2008-11-01 Robert Millan <rmh@aybabtu.com>
973 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
974 (TARGET_CPPFLAGS): Likewise.
975 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
977 2008-11-01 Carles Pina i Estany <carles@pina.cat>
979 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
981 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
983 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
984 addition of objects until the code is not going to be able to fail.
986 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
988 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
989 (add a missing NULL check, and correct them by moving the pointer
990 operations after the actual check).
992 2008-10-29 Robert Millan <rmh@aybabtu.com>
994 * util/i386/pc/grub-install.in: Handle empty string as output from
995 make_system_path_relative_to_its_root().
997 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
999 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1000 circular metadata worst case scenario. If the metadata is circular
1001 then copy the wrap in place.
1002 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1003 project lib/format_text/layout.h
1004 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1006 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
1008 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
1010 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
1012 * util/update-grub_lib.in: Mention filename in warning message.
1014 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
1016 * NEWS: Update for rename of update-grub to grub-mkconfig.
1018 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
1020 * util/update-grub_lib.in: Copy to ...
1021 * util/grub-mkconfig_lib.in: ... this. Update all users.
1022 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
1023 * util/update-grub.in: Rename to ...
1024 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1025 option. Add `--output' option to allow users to specify the generated
1026 configuration file. Default to stdout.
1027 (update_grub_dir): Rename to ...
1028 (grub_mkconfig_dir): ... this.
1029 (grub_cfg): Default to an empty string.
1030 * conf/common.rmk (update-grub): Rename to ...
1031 (grub-mkconfig): ... this.
1032 (update-grub_lib): Copy to ...
1033 (grub-mkconfig_lib): ... this.
1034 (update-grub_SCRIPTS): Copy to ...
1035 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1036 (update-grub_DATA): Rename to ...
1037 (grub-mkconfig_DATA): ... this.
1039 2008-09-28 Robert Millan <rmh@aybabtu.com>
1041 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1042 to `modified'. Add the real `created' field.
1043 (grub_iso9660_uuid): Use `modified' rather than `created' for
1044 constructing the UUID.
1046 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
1048 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1049 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1051 2008-09-28 Bean <bean123ch@gmail.com>
1053 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1054 Thanks to Christian Franke for finding this bug.
1056 2008-09-25 Robert Millan <rmh@aybabtu.com>
1058 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1059 instances of grub_util_get_disk_name() (see previous commit).
1061 2008-09-25 Robert Millan <rmh@aybabtu.com>
1063 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1064 `util/i386/get_disk_name.c'.
1065 * conf/i386-efi.rmk: Likewise.
1066 * conf/x86_64-efi.rmk: Likewise.
1067 * conf/i386-coreboot.rmk: Likewise.
1068 * conf/i386-ieee1275.rmk: Likewise.
1069 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1070 `util/ieee1275/get_disk_name.c'.
1071 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1072 * util/ieee1275/get_disk_name.c: Remove file.
1073 * util/i386/get_disk_name.c: Remove file.
1074 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1075 "hd%d" for device.map entries, rather than using
1076 grub_util_get_disk_name().
1078 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1080 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1082 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1084 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1086 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1088 (GRUB_TERM_PPAGE): Changed to 0x4900.
1090 2008-09-24 Robert Millan <rmh@aybabtu.com>
1092 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1093 macros (they were i386-pc specific).
1094 * include/grub/sparc64/ieee1275/console.h: Likewise.
1095 * include/grub/efi/console.h: Likewise.
1097 2008-09-22 Bean <bean123ch@gmail.com>
1099 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1100 resident and in attribute list.
1102 * include/grub/ntfs.h (BMP_LEN): Removed.
1104 2008-09-22 Bean <bean123ch@gmail.com>
1106 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
1107 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1109 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1110 error occurs, as grub_disk_open will call grub_disk_close, which will
1111 call p->close (scsi).
1113 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1115 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1116 (AC_PREREQ): Bumped to 2.59.
1117 (AC_TRY_COMPILE): Replace obsolete macro with ...
1118 (AC_COMPILE_IFELSE): ... this.
1119 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1120 (AC_LINK_IFELSE): ... this.
1122 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1124 * autogen.sh: Add a call to `gendistlist.sh'.
1126 2008-09-19 Christian Franke <franke@computer.org>
1128 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1129 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1130 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1131 Export __enable_execute_stack() to modules.
1132 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1135 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1137 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1140 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1142 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
1143 #include <grub/util/hostdisk.h>.
1145 2008-09-08 Robert Millan <rmh@aybabtu.com>
1147 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1148 segments when their filesz is zero (grub_file_read() interprets
1149 zero-size as "read until EOF", which results in memory corruption).
1150 Use `lowest_segment' rather than 0 for calculating the current
1151 segment load address.
1153 2008-09-08 Robert Millan <rmh@aybabtu.com>
1155 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1156 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1157 clobbered useful information.
1159 2008-09-08 Robert Millan <rmh@aybabtu.com>
1161 * include/grub/util/biosdisk.h: Move to ...
1162 * include/grub/util/hostdisk.h: ... here. Update all users.
1163 * util/biosdisk.c: Move to ...
1164 * util/hostdisk.c: ... here. Update all users.
1166 2008-09-07 Robert Millan <rmh@aybabtu.com>
1168 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1170 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1171 and length can be stored directly in the `mbi->mmap_addr' and
1172 `mbi->mmap_length' struct fields.
1174 2008-09-07 Robert Millan <rmh@aybabtu.com>
1176 * conf/i386.rmk: New file. Provides declaration for building
1178 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1179 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1181 Include `conf/i386.mk'.
1182 * conf/i386-efi.rmk: Likewise.
1183 * conf/x86_64-efi.rmk: Likewise.
1184 * conf/i386-coreboot.rmk: Likewise.
1185 * conf/i386-ieee1275.rmk: Likewise.
1187 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1189 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1190 Adds optimization support for BGR based modes.
1192 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1193 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1194 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1195 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1196 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1197 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1198 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1199 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1200 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1201 (grub_video_i386_vbeblit_index_index): Likewise.
1202 (grub_video_i386_vbeblit_replace_directN): Added.
1203 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1204 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1205 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1206 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1207 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1208 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1209 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1210 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1211 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1212 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1213 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1214 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1215 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1217 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1218 (grub_video_i386_vbefill_R8G8B8): Likewise.
1219 (grub_video_i386_vbefill_index): Likewise.
1220 (grub_video_i386_vbefill_direct32): Added.
1221 (grub_video_i386_vbefill_direct24): Likewise.
1222 (grub_video_i386_vbefill_direct16): Likewise.
1223 (grub_video_i386_vbefill_direct8): Likewise.
1225 * include/grub/video.h (grub_video_blit_format): Removed
1226 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1227 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1228 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1229 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1230 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
1232 * video/video.c (grub_video_get_blit_format): Updated to use new
1233 blit formats. Added handling for 16 bit color modes.
1235 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
1237 (common_blitter): Updated to use new blitters.
1239 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1241 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1242 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1243 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1244 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1245 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1246 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1247 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1248 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1249 (grub_video_i386_vbeblit_index_index): Likewise.
1250 (grub_video_i386_vbeblit_replace_directN): Added.
1251 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1252 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1253 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1254 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1255 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1256 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1257 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1258 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1259 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1260 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1261 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1262 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1263 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1265 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1266 (grub_video_i386_vbefill_R8G8B8): Likewise.
1267 (grub_video_i386_vbefill_index): Likewise.
1268 (grub_video_i386_vbefill_direct32): Added.
1269 (grub_video_i386_vbefill_direct24): Likewise.
1270 (grub_video_i386_vbefill_direct16): Likewise.
1271 (grub_video_i386_vbefill_direct8): Likewise.
1273 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1276 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1279 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1282 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1285 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1287 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1290 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1292 * fs/iso9660.c (grub_iso9660_date): New structure.
1293 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1294 (grub_iso9660_uuid): New function.
1296 2008-09-05 Bean <bean123ch@gmail.com>
1298 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1300 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1301 insensitive bit for names in Win32 and Win32 & DOS namespace.
1303 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1305 * include/grub/types.h (LONG_MAX): Likewise.
1307 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1309 * util/getroot.c: Include <config.h>.
1310 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1311 add support for /dev/md/N devices and handle LVM double dash escaping.
1313 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1315 * config.guess: Update to latest version from config git.
1316 * config.sub: Likewise.
1318 2008-09-03 Robert Millan <rmh@aybabtu.com>
1320 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1321 `disk->total_sectors'.
1323 2008-09-01 Colin D Bennett <colin@gibibit.com>
1325 * include/grub/normal.h: Fixed incorrect comment for
1326 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1328 2008-09-01 Colin D Bennett <colin@gibibit.com>
1330 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1331 values with defines.
1333 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1334 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1335 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1336 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1337 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1338 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1339 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1340 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1341 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1342 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1343 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1344 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1345 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1346 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1347 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1348 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1349 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1350 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1351 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1353 2008-08-31 Robert Millan <rmh@aybabtu.com>
1355 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1357 (grub_multiboot): Fix a few warnings.
1359 2008-08-31 Robert Millan <rmh@aybabtu.com>
1361 * loader/i386/pc/multiboot.c: Update comment not to say that
1362 boot_device support is unimplemented.
1364 2008-08-31 Robert Millan <rmh@aybabtu.com>
1366 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1367 or memory map support are unimplemented.
1369 2008-08-31 Colin D Bennett <colin@gibibit.com>
1371 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1373 2008-08-31 Colin D Bennett <colin@gibibit.com>
1375 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1376 total video memory in 'vbeinfo' output; show color format details for
1379 2008-08-30 Pavel Roskin <proski@gnu.org>
1381 * util/genmoddep.c: Remove for real this time.
1382 * DISTLIST: Remove util/genmoddep.c.
1384 2008-08-30 Robert Millan <rmh@aybabtu.com>
1386 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1387 as required by Multiboot spec (it was already 4-byte aligned, but
1390 2008-08-29 Pavel Roskin <proski@gnu.org>
1392 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1393 * kern/powerpc/ieee1275/startup.S: ... this.
1394 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1395 * DISTLIST: Likewise.
1397 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1398 grub/cpu/kernel.h. Add start label for consistency with other
1399 platforms. Add grub_prefix immediately after start. Add jump
1400 to the code after grub_prefix.
1401 * include/grub/powerpc/kernel.h: Provide valid values for
1402 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1404 2008-08-29 Bean <bean123ch@gmail.com>
1406 * configure.ac: Change host_os to cygwin for mingw.
1407 (asprintf): New check for function.
1409 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1410 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1412 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
1413 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
1414 sync, sleep and grub_util_get_disk_size for mingw.
1416 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1417 to get size in mingw.
1418 (open_device): Use flag O_BINARY if it's defined.
1419 (find_root_device): Add dummy code for mingw.
1421 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1422 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1423 (get_scsi_disk_name): Return 0 for mingw.
1425 * util/hostfs.c: #include <grub/util/misc.h>.
1426 (grub_hostfs_open): Use "rb" flag to open file, use
1427 grub_util_get_disk_size to get disk size for mingw.
1429 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1430 (asprintf): New function if HAVE_ASPRINTF is not set.
1431 (sync): New function for mingw.
1433 (grub_util_get_disk_size): Likewise.
1435 2008-08-28 Pavel Roskin <proski@gnu.org>
1437 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1440 2008-08-28 Robert Millan <rmh@aybabtu.com>
1442 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1444 2008-08-28 Robert Millan <rmh@aybabtu.com>
1446 Change find_grub_drive() syntax so it doesn't prevent it from
1447 detecting NULL names as errors.
1449 * util/biosdisk.c (find_grub_drive): Move free slot search code
1451 (find_free_slot): ... to here.
1452 (read_device_map): Use find_free_slot() to search for free slots.
1454 2008-08-27 Marco Gerards <marco@gnu.org>
1456 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1457 (scsi_mod_SOURCES): New variable.
1458 (scsi_mod_CFLAGS): Likewise
1459 (scsi_mod_LDFLAGS): Likewise.
1461 * disk/scsi.c: New file.
1463 * include/grub/scsi.h: Likewise.
1465 * include/grub/scsicmd.h: Likewise.
1467 * disk/ata.c: Include <grub/scsi.h>.
1468 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1470 (grub_ata_iterate): Skip ATAPI devices.
1471 (grub_ata_open): Only handle ATAPI devices.
1472 (struct grub_atapi_read): Removed.
1473 (grub_atapi_readsector): Likewise.
1474 (grub_ata_read): No longer handle ATAPI devices.
1475 (grub_ata_write): Likewise.
1476 (grub_atapi_iterate): New function.
1477 (grub_atapi_read): Likewise.
1478 (grub_atapi_write): Likewise.
1479 (grub_atapi_open): Likewise.
1480 (grub_atapi_close): Likewise.
1481 (grub_atapi_dev): New variable.
1482 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1483 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1485 * include/grub/disk.h (enum grub_disk_dev_id): Add
1486 `GRUB_DISK_DEVICE_SCSI_ID'.
1488 2008-08-26 Robert Millan <rmh@aybabtu.com>
1490 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1491 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1494 2008-08-23 Bean <bean123ch@gmail.com>
1496 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1497 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1498 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1499 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1501 (raid5rec_mod_SOURCES): New macro.
1502 (raid5rec_mod_CFLAGS): Likewise.
1503 (raid5rec_mod_LDFLAGS): Likewise.
1504 (raid6rec_mod_SOURCES): Likewise.
1505 (raid6rec_mod_CFLAGS): Likewise.
1506 (raid6rec_mod_LDFLAGS): Likewise.
1507 (mdraid_mod_SOURCES): Likewise.
1508 (mdraid_mod_CFLAGS): Likewise.
1509 (mdraid_mod_LDFLAGS): Likewise.
1510 (dm_nv_mod_SOURCES): Likewise.
1511 (dm_nv_mod_CFLAGS): Likewise.
1512 (dm_nv_mod_LDFLAGS): Likewise.
1514 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1515 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1516 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1518 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1519 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1521 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1523 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1525 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1527 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1529 * disk/raid5_recover.c: New file.
1531 * disk/raid6_recover.c: Likewise.
1533 * disk/mdraid_linux.c: Likewise.
1535 * disk/dmraid_nvidia.c: Likewise.
1537 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1540 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1541 calculate the size of raid device.
1542 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1543 different layout of raid5.
1544 (grub_raid_scan_device): Remove code specific to mdraid.
1545 (grub_raid_list): New variable.
1546 (free_array): New function.
1547 (grub_raid_register): Likewise.
1548 (grub_raid_unregister): Likewise.
1549 (grub_raid_rescan): Likewise.
1550 (GRUB_MOD_INIT): Don't iterate device here.
1551 (GRUB_MOD_FINI): Use free_array to release resource.
1553 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1554 (grub_raid5_recover_func_t): New function variable type.
1555 (grub_raid6_recover_func_t): Likewise.
1556 (grub_raid5_recover_func): New variable.
1557 (grub_raid6_recover_func): Likewise.
1558 (grub_raid_register): New function.
1559 (grub_raid_unregister): Likewise.
1560 (grub_raid_rescan): Likewise.
1561 (grub_raid_block_xor): Likewise.
1563 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1564 (CMD_CRC): New macro.
1566 (read_file): Handle device as well as file.
1567 (cmd_crc): New function.
1568 (fstest): Handle multiple disks.
1569 (options): Remove part, raw and long, add root and diskcount.
1570 (usage): Add crc, remove -p, -r, -l, add -r and -c.
1571 (main): Find the first non option entry and ignore subsequent options,
1572 add handling for the new options, support multiple disks.
1574 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1576 2008-08-23 Bean <bean123ch@gmail.com>
1578 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1580 * genfslist.sh: Ignore kernel.mod.
1582 * genpartmaplist.sh: Likewise.
1584 2008-08-23 Robert Millan <rmh@aybabtu.com>
1586 * util/getroot.c (find_root_device): Skip anything that starts with
1587 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1589 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
1591 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1592 * util/grub.d/00_header.in: Allow the administrator to change default
1593 gfxmode via ${GRUB_GFXMODE}.
1595 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
1597 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1599 2008-08-21 Robert Millan <rmh@aybabtu.com>
1601 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1603 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1604 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1606 2008-08-20 Carles Pina i Estany <carles@pina.cat>
1608 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1609 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1611 2008-08-19 Robert Millan <rmh@aybabtu.com>
1613 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1614 (struct grub_virtual_screen): Remove `cursor_color'.
1615 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1617 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1619 2008-08-18 Robert Millan <rmh@aybabtu.com>
1621 Unify (identical) linux_normal.c files.
1622 * loader/i386/efi/linux_normal.c: Move from here ...
1623 * loader/linux_normal.c: ... to here. Update all users.
1624 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1625 * loader/i386/ieee1275/linux_normal.c: Likewise.
1627 2008-08-18 Robert Millan <rmh@aybabtu.com>
1629 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1630 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1631 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1632 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1633 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1635 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1636 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1637 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1638 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1639 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1640 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1641 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1642 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1643 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1644 portably using grub_getxy().
1645 Replace `-EFI' with `-bzImage' in boot message.
1647 2008-08-17 Robert Millan <rmh@aybabtu.com>
1649 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1651 2008-08-17 Robert Millan <rmh@aybabtu.com>
1653 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1655 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1656 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1657 (grub_machine_mmap_iterate): New function declaration.
1658 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1660 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1663 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1664 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1665 Move e820 parsing from here ...
1666 * kern/i386/pc/mmap.c: New file.
1667 (grub_machine_mmap_iterate): ... to here.
1669 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1670 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1671 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1672 (grub_available_iterate): Redeclare to return `void', and redeclare
1673 its hook to use grub_uint64_t as addr and size parameters, and rename
1675 (grub_machine_mmap_iterate): ... this. Update all users.
1677 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1678 to make it more readable. Rename to ...
1679 (grub_machine_mmap_iterate): ... this.
1681 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1682 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1683 (grub_multiboot): Allocate an extra region after the payload, and fill
1684 it with a Multiboot memory map. Adjust a.out loader to calculate size
1685 with the extra space.
1686 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1687 with the extra space.
1689 2008-08-17 Carles Pina i Estany <carles@pina.cat>
1691 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1693 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
1695 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1696 mdate-sh to the list `find' searches for.
1697 * DISTLIST: Regenerated.
1699 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
1701 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1702 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1703 genmoddep.awk, gensymlist.sh.in.
1704 (DISTDIRS): Add bus, docs, hook, lib.
1705 * DISTLIST: Regenerated.
1706 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1708 2008-08-16 Robert Millan <rmh@aybabtu.com>
1710 * disk/raid.c (grub_raid_init): Handle/report errors set by
1711 grub_device_iterate().
1712 * disk/lvm.c (grub_lvm_init): Likewise.
1714 2008-08-15 Bean <bean123ch@gmail.com>
1716 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1718 (datetime_mod_SOURCES): New macro.
1719 (datetime_mod_CFLAGS): Likewise.
1720 (datetime_mod_LDFLAGS): Likewise.
1721 (date_mod_SOURCES): Likewise.
1722 (date_mod_CFLAGS): Likewise.
1723 (date_mod_LDFLAGS): Likewise.
1724 (datehook_mod_SOURCES): Likewise.
1725 (datehook_mod_CFLAGS): Likewise.
1726 (datehook_mod_LDFLAGS): Likewise.
1728 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1730 (datetime_mod_SOURCES): New macro.
1731 (datetime_mod_CFLAGS): Likewise.
1732 (datetime_mod_LDFLAGS): Likewise.
1733 (date_mod_SOURCES): Likewise.
1734 (date_mod_CFLAGS): Likewise.
1735 (date_mod_LDFLAGS): Likewise.
1736 (datehook_mod_SOURCES): Likewise.
1737 (datehook_mod_CFLAGS): Likewise.
1738 (datehook_mod_LDFLAGS): Likewise.
1740 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1742 (datetime_mod_SOURCES): New macro.
1743 (datetime_mod_CFLAGS): Likewise.
1744 (datetime_mod_LDFLAGS): Likewise.
1745 (date_mod_SOURCES): Likewise.
1746 (date_mod_CFLAGS): Likewise.
1747 (date_mod_LDFLAGS): Likewise.
1748 (datehook_mod_SOURCES): Likewise.
1749 (datehook_mod_CFLAGS): Likewise.
1750 (datehook_mod_LDFLAGS): Likewise.
1752 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1754 (datetime_mod_SOURCES): New macro.
1755 (datetime_mod_CFLAGS): Likewise.
1756 (datetime_mod_LDFLAGS): Likewise.
1757 (date_mod_SOURCES): Likewise.
1758 (date_mod_CFLAGS): Likewise.
1759 (date_mod_LDFLAGS): Likewise.
1760 (datehook_mod_SOURCES): Likewise.
1761 (datehook_mod_CFLAGS): Likewise.
1762 (datehook_mod_LDFLAGS): Likewise.
1764 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1766 (datetime_mod_SOURCES): New macro.
1767 (datetime_mod_CFLAGS): Likewise.
1768 (datetime_mod_LDFLAGS): Likewise.
1769 (date_mod_SOURCES): Likewise.
1770 (date_mod_CFLAGS): Likewise.
1771 (date_mod_LDFLAGS): Likewise.
1772 (datehook_mod_SOURCES): Likewise.
1773 (datehook_mod_CFLAGS): Likewise.
1774 (datehook_mod_LDFLAGS): Likewise.
1776 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1778 * commands/date.c: New file.
1780 * hook/datehook.c: Likewise.
1782 * include/grub/lib/datetime.h: Likewise.
1784 * include/grub/i386/cmos.h: Likewise.
1786 * lib/datetime.c: Likewise.
1788 * lib/i386/datetime.c: Likewise.
1790 * lib/efi/datetime.c: Likewise.
1792 2008-08-14 Robert Millan <rmh@aybabtu.com>
1794 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1795 (grub_mkelfimage_SOURCES): New variable.
1796 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1798 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1799 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1800 * conf/powerpc-ieee1275.rmk: Likewise.
1801 * conf/i386-ieee1275.rmk: Likewise.
1803 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1804 * kern/i386/coreboot/init.c: Likewise.
1806 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1807 with `<grub/cpu/kernel.h>'.
1808 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1810 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1811 * kern/i386/coreboot/startup.S: Likewise.
1813 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1814 (GRUB_MOD_GAP): Remove.
1815 * include/grub/powerpc/kernel.h: New file.
1816 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1817 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1818 * include/grub/i386/kernel.h: New file.
1819 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1820 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1821 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1823 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1825 Use --directory when invoking grub_mkimage.
1827 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1828 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1829 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1830 and GRUB_KERNEL_CPU_PREFIX.
1832 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
1834 * include/grub/err.h (grub_err_printf): New function prototype.
1835 * util/misc.c (grub_err_printf): New function.
1836 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1838 * kern/err.c (grub_print_error): Use grub_err_printf.
1840 2008-08-13 Robert Millan <rmh@aybabtu.com>
1842 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1844 2008-08-13 Robert Millan <rmh@aybabtu.com>
1846 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1849 2008-08-12 Robert Millan <rmh@aybabtu.com>
1851 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1852 of the relocation code from here ...
1853 (grub_multiboot): ... to here.
1854 (forward_relocator, backward_relocator): Move from here ...
1855 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1856 (grub_multiboot_backward_relocator): ... to here.
1857 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1858 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1859 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1860 (grub_multiboot_forward_relocator_end)
1861 (grub_multiboot_backward_relocator)
1862 (grub_multiboot_backward_relocator_end): New variables.
1864 2008-08-12 Bean <bean123ch@gmail.com>
1866 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1868 2008-08-11 Robert Millan <rmh@aybabtu.com>
1870 * kern/i386/linuxbios/startup.S: Move from here ...
1871 * kern/i386/coreboot/startup.S: ... to here.
1873 * kern/i386/linuxbios/init.c: Move from here ...
1874 * kern/i386/coreboot/init.c: ... to here.
1876 * kern/i386/linuxbios/table.c: Move from here ...
1877 * kern/i386/coreboot/mmap.c: ... to here.
1879 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1881 2008-08-11 Robert Millan <rmh@aybabtu.com>
1883 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1884 errors. Leave it to the upper layer to handle them.
1886 2008-08-09 Christian Franke <franke@computer.org>
1888 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1889 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1890 Install `grub.d/10_windows' only on Cygwin.
1891 * configure.ac: Add subst of `target_os'.
1892 Check `target_os' also before setting TARGET_OBJ2ELF.
1893 Add `--enable-grub-pe2elf'.
1895 2008-08-08 Robert Millan <rmh@aybabtu.com>
1897 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1898 (grub_last_time): Change type to grub_uint64_t.
1899 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1900 (grub_disk_close): Likewise.
1902 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1903 (run_menu): Migrate code from to using grub_get_time_ms().
1905 * util/misc.c (grub_get_time_ms): New function.
1907 2008-08-08 Marco Gerards <marco@gnu.org>
1909 * disk/ata.c (grub_ata_regget): Change return type to
1911 (grub_ata_regget2): Likewise.
1912 (grub_ata_wait_status): New function.
1913 (grub_ata_wait_busy): Removed function, updated all users to use
1914 `grub_ata_wait_status'.
1915 (grub_ata_wait_drq): Likewise.
1916 (grub_ata_cmd): New function.
1917 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1919 (grub_ata_pio_write): Add error handling.
1920 (grub_atapi_identify): Likewise.
1921 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1923 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1924 handling. Actually use the detected registers. Reorder the
1925 detection logic such that it is easier to read.
1926 (grub_ata_pciinit): Do not assign the same ID to each controller.
1927 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1929 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1931 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1933 2008-08-08 Marco Gerards <marco@gnu.org>
1937 2008-08-07 Bean <bean123ch@gmail.com>
1939 * include/grub/x86_64/pci.h: New file.
1941 2008-08-07 Christian Franke <franke@computer.org>
1943 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1944 (TIMER2_GATE): Likewise.
1945 (grub_pit_wait): Add enable/disable of the timer2 gate
1946 bit of port 0x61. This fixes a possible infinite loop.
1948 2008-08-07 Bean <bean123ch@gmail.com>
1950 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1951 kern/i386/tsc.c and kern/i386/pit.c.
1953 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1956 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1959 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1961 2008-08-07 Bean <bean123ch@gmail.com>
1963 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1965 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1967 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1968 multiple inclusion. Add #include <grub/types.h>.
1970 2008-08-06 Christian Franke <franke@computer.org>
1972 * conf/common.rmk: Build and install `10_windows'.
1973 * util/grub.d/10_windows.in: New script.
1975 2008-08-06 Pavel Roskin <proski@gnu.org>
1977 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1979 2008-08-06 Robert Millan <rmh@aybabtu.com>
1981 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1982 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1984 2008-08-06 Bean <bean123ch@gmail.com>
1986 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1987 (grub_pxefs_fs_int): Remove dummy definition.
1988 (grub_pxefs_open): Use data->block_size to store the current block
1990 (grub_pxefs_read): Use block size stored in data->block_size. As the
1991 value of grub_pxe_blksize can be changed after the file is opened.
1993 2008-08-06 Bean <bean123ch@gmail.com>
1995 * fs/i386/pc/pxe.c (curr_file): new variable.
1996 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1997 require the dummy internal file system anymore.
1998 (grub_pxefs_read): Removed.
1999 (grub_pxefs_close): Likewise.
2000 (grub_pxefs_fs_int): Likewise.
2001 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2002 connection when we switch file.
2003 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2005 2008-08-06 Robert Millan <rmh@aybabtu.com>
2007 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2009 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2010 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2012 * kern/i386/halt.c: New file.
2013 * kern/i386/reboot.c: Likewise.
2014 * include/grub/i386/reboot.h: Likewise.
2015 * include/grub/i386/halt.h: Likewise.
2017 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2018 Include `<grub/cpu/halt.h>'.
2019 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2020 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2022 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2023 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2024 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2025 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2026 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2027 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2029 * include/grub/i386/at_keyboard.h: ... to here.
2031 2008-08-05 Robert Millan <rmh@aybabtu.com>
2033 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2034 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2035 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2036 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2037 `kern/generic/millisleep.c'.
2039 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2040 instead of grub_get_rtc().
2041 (grub_tsc_init): Initialize `tsc_boot_time'.
2043 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2044 (grub_machine_init): Use grub_tsc_init() rather than
2045 installing an RTC-based handler via grub_install_get_time_ms().
2047 * kern/i386/pit.c: New file.
2048 * include/grub/i386/pit.h: Likewise.
2050 2008-08-05 Bean <bean123ch@gmail.com>
2052 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2054 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2055 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2056 (pxe_mod_SOURCES): New macro.
2057 (pxe_mod_CFLAGS): Likewise.
2058 (pxe_mod_LDFLAGS): Likewise.
2059 (pxecmd_mod_SOURCES): Likewise.
2060 (pxecmd_mod_CFLAGS): Likewise.
2061 (pxecmd_mod_LDFLAGS): Likewise.
2063 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2064 (grub_pxe_call): Likewise.
2066 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2068 * commands/i386/pc/pxecmd.c: New file.
2070 * fs/i386/pc/pxe.c: Likewise.
2072 * include/grub/i386/pc/pxe.h: Likewise.
2074 2008-08-05 Bean <bean123ch@gmail.com>
2076 * util/console.c (grub_console_cur_color): New variable.
2077 (grub_console_standard_color): Likewise.
2078 (grub_console_normal_color): Likewise.
2079 (grub_console_highlight_color): Likewise.
2080 (color_map): Likewise.
2081 (use_color): Likewise.
2082 (NUM_COLORS): New macro.
2083 (grub_ncurses_setcolorstate): Handle color properly.
2084 (grub_ncurses_setcolor): Don't change color here, just remember the
2085 settings, color will be set in grub_ncurses_setcolorstate.
2086 (grub_ncurses_getcolor): New function.
2087 (grub_ncurses_init): Initialize color pairs.
2088 (grub_ncurses_term): New member grub_ncurses_getcolor.
2090 2008-08-05 Colin D Bennett <colin@gibibit.com>
2092 High resolution timer support. Implemented for x86 CPUs using TSC.
2093 Extracted generic grub_millisleep() so it's linked in only as needed.
2094 This requires a Pentium compatible CPU; if the RDTSC instruction is
2095 not supported, then it falls back on the generic grub_get_time_ms()
2096 implementation that uses the machine's RTC.
2098 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2099 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2100 `kern/generic/millisleep.c'.
2102 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2103 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2105 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2106 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2108 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2110 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2111 `kern/generic/millisleep.c'.
2113 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2115 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2117 * kern/generic/rtc_get_time_ms.c: New file.
2119 * kern/generic/millisleep.c: New file.
2121 * kern/misc.c: Don't include
2122 <kern/time.h> anymore.
2123 (grub_millisleep_generic): Removed.
2125 * commands/sleep.c (grub_interruptible_millisleep): Uses
2126 grub_get_time_ms() instead of grub_get_rtc().
2128 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2130 (grub_cpu_is_cpuid_supported): New inline function.
2131 (grub_cpu_is_tsc_supported): New inline function.
2132 (grub_tsc_init): New function prototype.
2133 (grub_tsc_get_time_ms): New function prototype.
2135 * kern/i386/tsc.c (grub_get_time_ms): New file.
2137 * include/grub/time.h: Include <grub/types.h.
2138 (grub_millisleep_generic): Removed.
2139 (grub_get_time_ms): New prototype.
2140 (grub_install_get_time_ms): New prototype.
2141 (grub_rtc_get_time_ms): New prototype.
2143 * kern/time.c (grub_get_time_ms): New function.
2144 (grub_install_get_time_ms): New function.
2146 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2147 <grub/time.h> anymore.
2148 (grub_millisleep): Removed.
2149 (grub_machine_init): Call grub_tsc_init.
2151 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2152 get_time_ms() implementation.
2154 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2155 (ieee1275_get_time_ms): New function.
2156 (grub_machine_init): Install get_time_ms() implementation.
2158 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2159 (grub_machine_init): Call grub_tsc_init().
2160 (grub_millisleep): Removed.
2162 * kern/ieee1275/init.c (grub_millisleep): Removed.
2163 (grub_machine_init): Install ieee1275_get_time_ms()
2165 (ieee1275_get_time_ms): New function.
2166 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2169 2008-08-05 Marco Gerards <marco@gnu.org>
2171 * disk/ata.c: Include <grub/pci.h>.
2172 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2173 (grub_ata_initialize): Rewritten.
2174 (grub_ata_device_initialize): New function.
2176 2008-08-04 Pavel Roskin <proski@gnu.org>
2178 * kern/main.c: Include grub/mm.h.
2180 2008-08-04 Robert Millan <rmh@aybabtu.com>
2182 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2183 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2184 corruption problem).
2186 2008-08-04 Robert Millan <rmh@aybabtu.com>
2188 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2189 warnings introduced in my last commit.
2191 2008-08-03 Robert Millan <rmh@aybabtu.com>
2193 Make PCI available on all i386 architectures.
2195 * include/grub/i386/pc/pci.h: Move from here ...
2196 * include/grub/i386/pci.h: ... to here.
2198 * include/grub/i386/pc/pci.h: Remove.
2199 * include/grub/i386/efi/pci.h: Remove.
2200 * include/grub/x86_64/efi/pci.h: Remove.
2202 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2205 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2206 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2207 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2209 * conf/i386-ieee1275.rmk: Likewise.
2211 2008-08-03 Robert Millan <rmh@aybabtu.com>
2213 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2214 (grub_console_setcursor): Make it possible to set cursor off.
2216 2008-08-03 Robert Millan <rmh@aybabtu.com>
2218 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2219 of modules instead of assuming which platform provides what.
2220 * util/update-grub.in: Likewise.
2222 2008-08-03 Robert Millan <rmh@aybabtu.com>
2224 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2225 instead of `grub_install_dos_part' to determine whether a drive needs
2226 to be prepended to prefix (`grub_install_dos_part' is not reliable,
2227 because it can be overridden when loading GRUB via Multiboot).
2229 2008-08-02 Robert Millan <rmh@aybabtu.com>
2231 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2233 2008-08-02 Robert Millan <rmh@aybabtu.com>
2235 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2236 of informational grub_dprintf() calls.
2238 2008-08-02 Robert Millan <rmh@aybabtu.com>
2240 * disk/memdisk.c (memdisk_size): Don't initialize.
2241 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2243 * include/grub/i386/pc/kernel.h
2244 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2245 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2246 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2247 (grub_arch_memdisk_size): Remove.
2249 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2250 field (was only used to transfer a constant). Add `type' field to
2251 support multiple module types.
2252 (grub_module_iterate): New function.
2254 * kern/device.c (grub_device_open): Do not hide error messages
2255 when grub_disk_open() fails. Use grub_print_error() instead.
2257 * kern/i386/pc/init.c (grub_arch_modules_addr)
2258 (grub_arch_memdisk_size): Remove functions.
2259 (grub_arch_modules_addr): Return the module address in high memory
2260 (now that it isn't copied anymore).
2262 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2263 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2264 decompression routine (grub_total_module_size already includes that
2265 now). Don't copy modules back to low memory.
2267 * kern/main.c: Include `<grub/mm.h>'.
2268 (grub_load_modules): Split out (and use) ...
2269 (grub_module_iterate): ... this function, which iterates through
2270 module objects and runs a hook.
2271 Comment out grub_mm_init_region() call, as it would cause non-ELF
2272 modules to be overwritten.
2274 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2275 the memdisk image in its own region, make it part of the module list.
2276 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2277 (main): Parse --memdisk|-m option, and pass user-provided path as
2278 parameter to generate_image().
2279 (add_segments): Pass `memdisk_path' down to load_modules().
2280 (load_modules): Embed memdisk image in module section when requested.
2281 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2282 `header.type' instead of `header.offset'.
2284 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2285 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2286 (memdisk_mod_LDFLAGS): New variables.
2287 * conf/i386-coreboot.rmk: Likewise.
2288 * conf/i386-ieee1275.rmk: Likewise.
2290 2008-08-02 Robert Millan <rmh@aybabtu.com>
2292 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2293 (backward_relocator): New variables. Used to allocate and relocate
2294 the payload, respectively.
2295 (grub_multiboot_load_elf32): Load into heap instead of requested
2296 address, install the appropriate relocator code in each bound of
2297 the payload, and set the entry point such that
2298 grub_multiboot_real_boot() will jump to one of them.
2300 * kern/i386/loader.S (grub_multiboot_payload_size)
2301 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2302 (grub_multiboot_payload_entry_offset): New variables.
2303 (grub_multiboot_real_boot): Set cpu context to what the relocator
2304 expects, and jump to the relocator instead of the payload.
2306 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2307 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2308 (grub_multiboot_payload_entry_offset): Export.
2310 2008-08-01 Bean <bean123ch@gmail.com>
2312 * normal/menu_entry.c (editor_getline): Don't return the original
2313 string as result, as it will be released by lexer once it has done
2316 2008-08-01 Robert Millan <rmh@aybabtu.com>
2318 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2319 within menuentries, not before them.
2320 util/grub.d/10_hurd.in: Likewise.
2322 2008-08-01 Bean <bean123ch@gmail.com>
2324 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2325 (bufio_mod_SOURCES): New macro.
2326 (bufio_mod_CFLAGS): Likewise.
2327 (bufio_mod_LDFLAGS): Likewise.
2329 * include/grub/bufio.h: New file.
2331 * io/bufio.c: Likewise.
2333 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2334 (grub_video_reader_png): Use grub_buffile_open to open file.
2336 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2337 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2339 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2340 (grub_video_reader_tga): Use grub_buffile_open to open file.
2342 * font/manager.c: Include <grub/bufio.h>.
2343 (add_font): Use grub_buffile_open to open file.
2345 2008-07-31 Robert Millan <rmh@aybabtu.com>
2347 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2348 ELF segments, use a macro for arbitrarily accessing any of them instead
2349 of preparing a pointer that allows access to one at a time.
2350 (grub_multiboot_load_elf64): Likewise.
2352 2008-07-31 Bean <bean123ch@gmail.com>
2354 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2355 GRUB_KERNEL_MACHINE_DATA_END.
2357 2008-07-30 Robert Millan <rmh@aybabtu.com>
2359 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2360 Increase from 0x50 to 0x60.
2361 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2362 use UUIDs to identify the root drive for them. If that's not
2364 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2365 check, for cross-disk installs.
2367 2008-07-30 Robert Millan <rmh@aybabtu.com>
2369 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2370 is non-empty, use it to set the `prefix' environment variable instead
2371 of the usual approach.
2372 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2373 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2374 environment variable instead of dummy make_install_device().
2376 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2377 (start): Insert a data section, with `grub_prefix' variable.
2378 * kern/i386/linuxbios/startup.S: Likewise.
2380 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2381 New variable reference.
2382 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2383 New macro. Defines offset of `grub_prefix' within startup.S (relative
2385 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2386 section within startup.S (relative to `start').
2387 * include/grub/i386/coreboot/kernel.h: Likewise.
2389 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2390 Overwrite grub_prefix with its contents, at the beginning of the
2392 (main): Understand -p|--prefix.
2394 2008-07-30 Robert Millan <rmh@aybabtu.com>
2396 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2398 2008-07-30 Robert Millan <rmh@aybabtu.com>
2400 * term/i386/pc/vga_text.c (grub_console_cls): Use
2401 grub_console_gotoxy() to go back to beginning of the screen.
2402 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2404 2008-07-29 Christian Franke <franke@computer.org>
2406 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2407 Add conversion of emulated mount points on Cygwin.
2409 2008-07-29 Christian Franke <franke@computer.org>
2411 * util/update-grub.in: Add a check for admin
2413 Remove old `grub.cfg.new' before creation.
2414 Add `-f' to `mv' to handle the different filesystem
2415 semantics of Windows.
2417 2008-07-29 Bean <bean123ch@gmail.com>
2419 * normal/main.c (get_line): Fix buffer overflow bug.
2421 2008-07-28 Robert Millan <rmh@aybabtu.com>
2423 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2424 (struct grub_apple_header): New struct. Describes the layout of
2426 (apple_partition_map_iterate): Check the header magic as well as the
2427 partition magic (which was already being checked).
2429 2008-07-28 Pavel Roskin <proski@gnu.org>
2431 * genmk.rb: Add a warning to the beginning of the output that
2432 it's a generated file and should not be edited.
2434 2008-07-28 Robert Millan <rmh@aybabtu.com>
2436 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2437 with the same number are found, just use issue a warning with
2438 grub_dprintf(), as this error has been reported to be non-fatal.
2440 2008-07-27 Robert Millan <rmh@aybabtu.com>
2442 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2445 2008-07-27 Bean <bean123ch@gmail.com>
2447 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2448 (grub_fat_find_dir): Ignore case when comparing filename.
2450 2008-07-27 Bean <bean123ch@gmail.com>
2452 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2453 smallino, as it's more descriptive, and i8count can be confused with
2454 the other field count.
2455 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2458 2008-07-27 Bean <bean123ch@gmail.com>
2460 * commands/crc.c: New file.
2462 * lib/crc.c: Likewise.
2464 * include/grub/lib/crc.h: Likewise.
2466 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2468 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2469 (hexdump): Move this function to ...
2471 * lib/hexdump.c: ... here.
2473 * include/grub/hexdump.h: Renamed to ...
2475 * include/grub/lib/hexdump.h: ... this.
2477 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2479 * util/grub-editenv.c: Likewise.
2481 * include/envblk.h: Renamed to ...
2483 * include/lib/envblk.h: ... this.
2485 * util/envblk.c: Renamed to ...
2487 * lib/envblk.c: ... this.
2489 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2491 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2492 (pkglib_MODULES): Add crc.mod.
2493 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2494 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2495 (crc_mod_SOURCES): New macro.
2496 (crc_mod_CFLAGS): Likewise.
2497 (crc_mod_LDFLAGS): Likewise.
2499 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2501 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2503 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2505 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2507 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2509 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
2511 * commands/help.c: Include <grub/term.h>.
2512 (TERM_WIDTH): Removed. Updated all users.
2514 2008-07-27 Pavel Roskin <proski@gnu.org>
2516 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2517 spurious warnings about a comment within a comment.
2519 2008-07-25 Robert Millan <rmh@aybabtu.com>
2521 * util/getroot.c (find_root_device): Skip devices that match
2522 /dev/dm-[0-9]. This lets the real device be found for any type of
2523 abstraction (LVM, EVMS, RAID..).
2524 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2525 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2526 device is found first, find_root_device() will now skip it.
2528 2008-07-24 Pavel Roskin <proski@gnu.org>
2530 * include/grub/types.h: Use __builtin_bswap32() and
2531 __builtin_bswap64() with gcc 4.3 and newer.
2533 2008-07-24 Christian Franke <franke@computer.org>
2535 * util/i386/pc/grub-install.in: If `--debug' is specified,
2536 pass `--verbose' to grub-setup.
2537 Abort script if make_system_path_relative_to_its_root() fails.
2539 2008-07-24 Bean <bean123ch@gmail.com>
2541 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2542 variable `target_platform' should be `platform'.
2544 2008-07-24 Bean <bean123ch@gmail.com>
2546 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
2547 (grub_png_init_fixed_block): New function.
2548 (grub_png_decode_image_data): Handle fixed huffman code compression.
2550 2008-07-24 Bean <bean123ch@gmail.com>
2552 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2553 (grub_pe2elf_SOURCES): New macro.
2554 (CLEANFILES): Add grub-pe2elf.
2556 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2557 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2558 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2559 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2560 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
2561 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
2562 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
2563 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2564 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2565 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2566 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2567 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2568 (GRUB_PE32_DT_FUNCTION): Likewise.
2569 (GRUB_PE32_REL_I386_DIR32): Likewise.
2570 (GRUB_PE32_REL_I386_REL32): Likewise.
2571 (grub_pe32_symbol): New structure.
2572 (grub_pe32_reloc): Likewise.
2574 * util/grub-pe2elf.c: New file.
2576 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2577 start symbol in non pc platform.
2579 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2581 The following patches are from Christian Franke.
2583 * include/grub/dl.h: Remove .previous, gas supports this only
2586 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2587 Remove .type, gas supports this only for ELF format.
2589 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2590 nullbytes in symbol table. This fixes an infinite loop if table is
2593 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2594 TARGET_IMG_LDFLAGS and EXEEXT.
2596 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2597 TARGET_IMG_LDFLAGS_AC.
2598 (grub_CHECK_STACK_ARG_PROBE): New function.
2600 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2602 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2604 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2605 to set TARGET_IMG_LD* accordingly.
2606 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2607 Add call to grub_CHECK_STACK_ARG_PROBE.
2608 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2610 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2612 * genmk.rb: Add EXEEXT to CLEANFILES.
2614 2008-07-23 Robert Millan <rmh@aybabtu.com>
2616 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2617 define the codes for arrows and lines used for the menu).
2618 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2621 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2622 fonts, because the latter are too slow.
2624 2008-07-21 Bean <bean123ch@gmail.com>
2626 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2627 a20. Run keyboard test last, as it will cause macbook to halt.
2629 2008-07-18 Pavel Roskin <proski@gnu.org>
2631 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2632 load foreign architecture modules correctly anyway. Keep
2633 support for loading host architecture modules, whether we
2634 compile them or not.
2636 2008-07-17 Pavel Roskin <proski@gnu.org>
2638 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2639 change target_cpu. The compiler default can mismatch target_cpu
2642 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2643 * kern/efi/efi.c: Likewise.
2645 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2646 target compiler is functional.
2647 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2650 * configure.ac: Default to efi platform for x86_64-apple. Allow
2651 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2652 adjustments from the rest, only do them if target is not
2653 explicitly given. Merge other adjustments with the final sanity
2654 check. Remove an extraneous check for supported CPU. Be
2655 specific which CPU and which platform is not supported.
2657 * configure.ac: Default to pc platform for x86_64.
2659 2008-07-17 Robert Millan <rmh@aybabtu.com>
2661 Partial LinuxBIOS -> Coreboot rename.
2663 * conf/i386-linuxbios.rmk: Renamed to ...
2664 * conf/i386-coreboot.rmk: ... this.
2665 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2666 * configure.ac: Accept "coreboot" as input platform (but maintain
2667 compatibility with "linuxbios").
2668 * include/grub/i386/linuxbios: Renamed to ...
2669 * include/grub/i386/coreboot: ... this.
2671 2008-07-17 Bean <bean123ch@gmail.com>
2673 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2674 (appleldr_mod_SOURCE): New variable.
2675 (appleldr_mod_CFLAGS): Likewise.
2676 (appleldr_mod_LDFLAGS): Likewise.
2677 (pci_mod_SOURCES): Likewise.
2678 (pci_mod_CFLAGS): Likewise.
2679 (pci_mod_LDFLAGS): Likewise.
2680 (lspci_mod_SOURCES): Likewise.
2681 (lspci_mod_CFLAGS): Likewise.
2682 (lspci_mod_LDFLAGS): Likewise.
2684 * conf/x86_64-efi.rmk: New file.
2686 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2688 (grub_efidisk_write): Likewise.
2690 * include/efi/api.h (efi_call_0): New macro.
2691 (efi_call_1): Likewise.
2692 (efi_call_2): Likewise.
2693 (efi_call_3): Likewise.
2694 (efi_call_4): Likewise.
2695 (efi_call_5): Likewise.
2696 (efi_call_6): Likewise.
2698 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2699 grub_rescue_cmd_chainloader.
2701 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2702 (grub_pe32_optional_header): Change some fields based on i386 or
2704 (GRUB_PE32_PE32_MAGIC): Likewise.
2706 * include/grub/efi/uga_draw.h: New file.
2708 * include/grub/elf.h (STN_ABS): New constant.
2709 (R_X86_64_NONE): Relocation constant for x86_64.
2710 (R_X86_64_64): Likewise.
2711 (R_X86_64_PC32): Likewise.
2712 (R_X86_64_GOT32): Likewise.
2713 (R_X86_64_PLT32): Likewise.
2714 (R_X86_64_COPY): Likewise.
2715 (R_X86_64_GLOB_DAT): Likewise.
2716 (R_X86_64_JUMP_SLOT): Likewise.
2717 (R_X86_64_RELATIVE): Likewise.
2718 (R_X86_64_GOTPCREL): Likewise.
2719 (R_X86_64_32): Likewise.
2720 (R_X86_64_32S): Likewise.
2721 (R_X86_64_16): Likewise.
2722 (R_X86_64_PC16): Likewise.
2723 (R_X86_64_8): Likewise.
2724 (R_X86_64_PC8): Likewise.
2726 * include/grub/i386/efi/pci.h: New file.
2728 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2729 Change it value based on platform.
2730 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2731 (GRUB_E820_RAM): Likewise.
2732 (GRUB_E820_RESERVED): Likewise.
2733 (GRUB_E820_ACPI): Likewise.
2734 (GRUB_E820_NVS): Likewise.
2735 (GRUB_E820_EXEC_CODE): Likewise.
2736 (GRUB_E820_MAX_ENTRY): Likewise.
2737 (grub_e820_mmap): New structure.
2738 (linux_kernel_header): Change the efi field according to different
2739 kernel version, also field from linux_kernel_header.
2741 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2743 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2744 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2745 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2746 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2747 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2748 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2749 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2750 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2751 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2752 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2754 * include/grub/x86_64/efi/kernel.h: New file.
2756 * include/grub/x86_64/efi/loader.h: Likewise.
2758 * include/grub/x86_64/efi/machine.h: Likewise.
2760 * include/grub/x86_64/efi/pci.h: Likewise.
2762 * include/grub/x86_64/efi/time.h: Likewise.
2764 * include/grub/x86_64/linux.h: Likewise.
2766 * include/grub/x86_64/setjmp.h: Likewise.
2768 * include/grub/x86_64/time.h: Likewise.
2770 * include/grub/x86_64/types.h: Likewise.
2772 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2773 GRUB_TARGET_SIZEOF_VOID_P.
2775 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2776 (grub_efi_locate_handle): Likewise.
2777 (grub_efi_open_protocol): Likewise.
2778 (grub_efi_set_text_mode): Likewise.
2779 (grub_efi_stall): Likewise.
2780 (grub_exit): Likewise.
2781 (grub_reboot): Likewise.
2782 (grub_halt): Likewise.
2783 (grub_efi_exit_boot_services): Likewise.
2784 (grub_get_rtc): Likewise.
2786 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2787 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2788 (grub_efi_allocate_pages): Wrap efi calls.
2789 (grub_efi_free_pages): Wrap efi calls.
2790 (grub_efi_get_memory_map): Wrap efi calls.
2792 * kern/x86_64/dl.c: New file.
2794 * kern/x86_64/efi/callwrap.S: Likewise.
2796 * kern/x86_64/efi/startup.S: Likewise.
2798 * loader/efi/appleloader.c: Likewise.
2800 * loader/efi/chainloader.c (cmdline): New variable.
2801 (grub_chainloader_unload): Wrap efi calls.
2802 (grub_chainloader_boot): Likewise.
2803 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2806 * loader/efi/chainloader_normal.c (chainloader_command):
2807 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2810 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2812 (grub_e820_add_region): New function.
2813 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2815 (grub_find_video_card): New function.
2816 (grub_linux_setup_video): New function.
2817 (grub_rescue_cmd_linux): Probe for video information.
2819 * normal/x86_64/setjmp.S: New file.
2821 * term/efi/console.c (map_char): New function.
2822 (grub_console_putchar): Map unicode char.
2823 (grub_console_checkkey): Wrap efi calls.
2824 (grub_console_getkey): Likewise.
2825 (grub_console_getwh): Likewise.
2826 (grub_console_gotoxy): Likewise.
2827 (grub_console_cls): Likewise.
2828 (grub_console_setcolorstate): Likewise.
2829 (grub_console_setcursor): Likewise.
2831 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2833 2008-07-16 Pavel Roskin <proski@gnu.org>
2835 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2838 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2839 pointer, not an integer. This fixes a warning and prevents
2840 precision loss on 64-bit systems.
2841 (relocate_addresses): Remove unneeded cast.
2843 2008-07-15 Pavel Roskin <proski@gnu.org>
2845 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2847 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2849 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2850 Fix comparison between signed and unsigned.
2852 * include/grub/i386/ieee1275/console.h: Declare
2853 grub_console_init() and grub_console_fini().
2855 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2856 It's empty and unused.
2858 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2859 beginning to avoid warnings with some compilers.
2861 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2862 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2864 2008-07-14 Pavel Roskin <proski@gnu.org>
2866 * kern/env.c (grub_register_variable_hook): Don't copy empty
2867 string, it leaks memory. Pass "" to grub_env_set(), it should
2868 handle constant strings.
2870 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2871 * commands/cmp.c (grub_cmd_cmp): Likewise.
2872 * kern/dl.c (grub_dl_flush_cache): Likewise.
2873 (grub_dl_load_core): Likewise.
2874 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2875 (grub_elf64_load_phdrs): Likewise.
2877 2008-07-13 Pavel Roskin <proski@gnu.org>
2879 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2880 between signed and unsigned.
2881 (LzmaEnc_Finish): Fix warning about an unused parameter.
2883 2008-07-13 Bean <bean123ch@gmail.com>
2885 * Makefile.in (enable_lzo): New rule.
2887 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2889 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2891 * boot/i386/pc/lnxboot.S: #include <config.h>.
2893 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2894 its value according to the compression algorithm used, lzo or lzma.
2896 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2897 compression algorithm according to configure macro.
2899 * kern/i386/pc/startup.S (codestart): Likewise.
2901 * kern/i386/pc/lzma_decode.S: New file.
2903 * include/grub/lib/LzFind.h: Likewise.
2905 * include/grub/lib/LzHash.h: Likewise.
2907 * include/grub/lib/LzmaDec.h: Likewise.
2909 * include/grub/lib/LzmaEnc.h: Likewise.
2911 * include/grub/lib/LzmaTypes.h: Likewise.
2913 * lib/LzFind.c: Likewise.
2915 * lib/LzmaDec.c: Likewise.
2917 * lib/LzmaEnc.c: Likewise.
2919 2008-07-13 Bean <bean123ch@gmail.com>
2921 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2922 (grub_ext4_extent_header): New structure.
2923 (grub_ext4_extent): Likewise.
2924 (grub_ext4_extent_idx): Likewise.
2925 (grub_ext4_find_leaf): New function.
2926 (grub_ext2_read_block): Handle extents.
2928 2008-07-12 Robert Millan <rmh@aybabtu.com>
2930 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2932 2008-07-11 Robert Millan <rmh@aybabtu.com>
2934 * util/grub.d/40_custom.in: New file. Example on how to add custom
2935 entries to /etc/grub.d.
2936 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2937 40_custom (implicitly, by merging all the grub.d rules).
2939 2008-07-11 Pavel Roskin <proski@gnu.org>
2941 * commands/read.c (grub_getline): Fix invalid memory access.
2942 Don't add newline to the variable value.
2944 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2945 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2946 (serial_hw_get_port): Check validity of the port number.
2947 (grub_cmd_serial): Check return value of serial_hw_get_port().
2949 2008-07-07 Pavel Roskin <proski@gnu.org>
2951 * boot/i386/pc/diskboot.S (notification_string): Replace
2952 "Loading kernel" with just "loading". This is shorter, less
2953 confusing and saves a few bytes for possible future changes.
2955 2008-07-05 Pavel Roskin <proski@gnu.org>
2957 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2958 size for ATAPI devices, they are undefined. Output sector
2959 number in decimal form.
2961 * disk/ata.c: Use named constants for status bits.
2963 2008-07-04 Pavel Roskin <proski@gnu.org>
2965 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2966 grub_addr_t before casting it to the void pointer to fix a
2967 warning. Non-addressable regions are discarded earlier.
2968 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2969 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2970 (check_signature): Don't shadow table_header.
2971 (grub_linuxbios_table_iterate): Cast numeric constants to
2972 grub_linuxbios_table_header_t.
2973 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2976 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2979 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2980 pointer, which can cause warnings. Support 64-bit addresses.
2982 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2983 of sizeof(long). This fixes PowerPC image generation on x86_64.
2985 2008-07-04 Robert Millan <rmh@aybabtu.com>
2987 This fixes a performance issue when pc & gpt partmap iterators
2988 didn't abort iteration even after our hook found what it was
2989 looking for (often causing expensive probes of non-existent drives).
2991 Some callers relied on previous buggy behaviour, since they would
2992 raise an error when their own hooks caused early abortion of its
2995 * kern/device.c (grub_device_open): Improve error message.
2996 * disk/lvm.c (grub_lvm_open): Likewise.
2997 * disk/raid.c (grub_raid_open): Likewise.
2999 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3000 when hook requests it, independently of grub_errno.
3001 (pc_partition_map_probe): Do not fail when find_func() caused
3002 early abortion of pc_partition_map_iterate().
3004 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3005 when hook requests it, independently of grub_errno.
3006 (gpt_partition_map_probe): Do not fail when find_func() caused
3007 early abortion of gpt_partition_map_iterate().
3009 * kern/partition.c (grub_partition_iterate): Abort parent iteration
3010 when hook requests it, independently of grub_errno. Do not fail when
3011 part_map_iterate_hook() caused early abortion of p->iterate().
3013 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3014 when grub_partition_iterate() returned with non-zero.
3016 2008-07-03 Pavel Roskin <proski@gnu.org>
3018 * disk/ata.c (grub_ata_pio_write): Check status before writing,
3019 like we do in grub_ata_pio_read().
3020 (grub_ata_readwrite): Always write individual sectors. Fix the
3021 sector count for the remainder.
3022 (grub_ata_write): Enable writing to ATA devices. Correctly
3023 report error for ATAPI devices.
3025 2008-07-02 Pavel Roskin <proski@gnu.org>
3027 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3030 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3031 for every read sector, we already increment it for the whole
3032 batch. This fixes reading more than 256 sectors at once.
3034 * util/grub-editenv.c (cmd_info): Cast argument to long
3035 explicitly. ptrdiff_t reduces to int on i386.
3037 * util/grub-editenv.c (main): Be specific which parameter is
3040 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3041 (memdisk): Make memdisk_orig_addr a pointer.
3043 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3044 for file offsets, use grub_off_t instead. Fix printf format
3047 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3048 there. Real unexpected warnings should not drown in the noise
3049 about known problems.
3051 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3052 grub_disk_addr_t for memory addresses.
3054 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3055 explicitly to fix a warning.
3057 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3059 * Makefile.in (MODULE_LDFLAGS): New variable.
3060 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3061 the linker accepts --build-id=none.
3062 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3064 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3066 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3067 those in Linux XFS code. Provide a way to access 64-bit parent
3069 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3070 the end of struct grub_xfs_dir_header.
3072 2008-07-02 Bean <bean123ch@gmail.com>
3074 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3075 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3076 and GRUB_IEEE1275_FLAG_NO_ANSI.
3078 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3079 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3080 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3082 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3083 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3085 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3086 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3088 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3089 esc sequence on non ANSI terminal.
3090 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3092 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3095 2008-07-02 Bean <bean123ch@gmail.com>
3097 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3098 (grub_editenv_SOURCES): New variable.
3099 (pkglib_MODULES): Add loadenv.mod.
3100 (loadenv_mod_SOURCES): New variable.
3101 (loadenv_mod_CFLAGS): Likewise.
3102 (loadenv_mod_LDFLAGS): Likewise.
3104 * include/grub/envblk.h: New file.
3106 * util/envblk.c: New file.
3108 * util/grub-editenv.c: New file.
3110 * commands/loadenv.c: New file.
3112 2008-07-01 Pavel Roskin <proski@gnu.org>
3114 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3115 not unsigned char. This fixes warnings and is consistent with
3118 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3120 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3122 * term/tparm.c (analyze): Always set *popcount.
3124 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3125 cast to fix a warning.
3127 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3128 cast to suppress a warning.
3130 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3131 grub_fshelp_read_file() expects.
3133 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3134 write uuid as a 32-bit value in CPU byte order, so declare and
3137 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3138 long if the format specifier expects it.
3139 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3140 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3141 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3142 long to fix a warning.
3143 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3144 grub_dprintf() arguments to fix warnings.
3146 2008-06-30 Pavel Roskin <proski@gnu.org>
3148 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3149 install_bsd_part immediately before core.img is embedded or
3150 modified on disk. This fixes core.img verification if core.img
3153 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3154 core_path to calculate the blocklist.
3155 Patch from Javier Martín <lordhabbit@gmail.com>
3157 2008-06-29 Robert Millan <rmh@aybabtu.com>
3159 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3160 block to disk block.
3161 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3162 Patch from Niels Böhm <bitbucket@arcor.de>
3164 2008-06-29 Robert Millan <rmh@aybabtu.com>
3166 * util/update-grub_lib.in (font_path): Search for fonts in
3167 /boot/grub first, which is more likely to be readable (we aren't
3168 deciding where fonts live, just looking for them).
3170 2008-06-26 Pavel Roskin <proski@gnu.org>
3172 * util/biosdisk.c (read_device_map): Don't leave dead map
3173 entries for devices failing stat() check.
3175 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3176 core_path_dev for the core.img path on the target device.
3178 2008-06-26 Robert Millan <rmh@aybabtu.com>
3180 * disk/fs_uuid.c: New file.
3181 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3182 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3183 (fs_uuid_mod_LDFLAGS): New variables.
3184 * include/grub/disk.h (grub_disk_dev_id): Add
3185 `GRUB_DISK_DEVICE_UUID_ID'.
3186 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3187 implement iterate().
3189 2008-06-26 Robert Millan <rmh@aybabtu.com>
3191 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3192 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3193 Linux image includes no initrd.
3195 2008-06-21 Javier Martín <lordhabbit@gmail.com>
3197 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3198 call to resolve the core image location that effectively appended the
3201 2008-06-21 Robert Millan <rmh@aybabtu.com>
3203 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3206 * util/grub.d/10_hurd.in: ... to here ...
3207 * util/grub.d/10_linux.in: ... and here.
3209 2008-06-19 Robert Millan <rmh@aybabtu.com>
3211 * kern/main.c (grub_main): Export `prefix' variable immediately
3212 after it has been set by grub_machine_set_prefix().
3214 2008-06-19 Robert Millan <rmh@aybabtu.com>
3216 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3217 search result when not saving to variable, not the other way around.
3218 When saving to variable, abort iteration as soon as a match is found.
3220 2008-06-19 Robert Millan <rmh@aybabtu.com>
3222 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3223 check for partition that provides /boot/grub. Its logic is flawed,
3224 as it prevents prepare_grub_to_access_device() from being called
3227 2008-06-19 Robert Millan <rmh@aybabtu.com>
3229 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3230 "insmod" command directly when abstraction modules are needed,
3231 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3232 since it had already been processed).
3234 2008-06-19 Pavel Roskin <proski@gnu.org>
3236 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3237 changed. This is needed in case GRUB_LIBDIR changes.
3238 * conf/i386-ieee1275.rmk: Likewise.
3239 * conf/i386-linuxbios.rmk: Likewise.
3240 * conf/i386-pc.rmk: Likewise.
3241 * conf/powerpc-ieee1275.rmk: Likewise.
3243 2008-06-18 Pavel Roskin <proski@gnu.org>
3245 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3246 kernel_elf_symlist.c to symlist.c for consistency with other
3247 architectures. Update all users.
3248 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3250 2008-06-18 Robert Millan <rmh@aybabtu.com>
3252 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3255 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3256 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3257 a RAID device, run setup() for all members independently on whether
3258 LVM abstraction is being used.
3259 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3260 If grub-mkimage has set `*install_dos_part == -2', don't override this
3262 Perform *install_dos_part adjustments independently on whether
3263 we're embedding or not.
3264 Clarify error message when image is too big for embedding.
3265 Remove duplicate *install_dos_part stanza.
3267 2008-06-17 Robert Millan <rmh@aybabtu.com>
3269 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3270 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3272 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3273 values in grub_ofconsole_normal_color and
3274 grub_ofconsole_highlight_color (they're not directly related to
3275 background and foreground).
3276 (grub_ofconsole_setcolorstate): Extract background and foreground
3277 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3279 2008-06-17 Robert Millan <rmh@aybabtu.com>
3281 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3282 /boot/grub for the check in last commit, not /boot (they could be
3283 different partitions).
3285 2008-06-16 Robert Millan <rmh@aybabtu.com>
3287 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3288 asked to setup access for the same partition that provides /boot,
3289 don't bother using UUIDs since our root already has the value we
3292 2008-06-16 Robert Millan <rmh@aybabtu.com>
3294 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3296 Patch from Sven Mueller <sven@debian.org>.
3298 2008-06-16 Robert Millan <rmh@aybabtu.com>
3300 * util/update-grub.in: Check for $EUID instead of $UID.
3301 Reported by Vincent Zweije.
3303 2008-06-16 Bean <bean123ch@gmail.com>
3305 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
3306 (grub_ext2_read_block): Likewise.
3307 (grub_ext2_read_inode): Likewise.
3308 (grub_ext2_mount): Likewise.
3309 (grub_ext2_close): Likewise.
3310 (grub_ext3_get_journal): Removed.
3312 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
3313 (grub_reiserfs_read_symlink): Likewise.
3314 (grub_reiserfs_mount): Likewise.
3315 (grub_reiserfs_open): Likewise.
3316 (grub_reiserfs_read): Likewise.
3317 (grub_reiserfs_close): Likewise.
3318 (grub_reiserfs_get_journal): Removed.
3320 * fs/fshelp.c (grub_fshelp_read): Removed.
3321 (grub_fshelp_map_block): Likewise.
3323 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3324 (grub_fshelp_journal): Likewise.
3325 (grub_fshelp_read): Likewise.
3326 (grub_fshelp_map_block): Likewise.
3328 2008-06-16 Pavel Roskin <proski@gnu.org>
3330 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3331 floating point anymore.
3332 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3334 2008-06-15 Pavel Roskin <proski@gnu.org>
3336 * commands/ls.c (grub_ls_list_files): Use integer calculations
3337 for human readable format, avoid floating point use.
3338 * kern/misc.c (grub_ftoa): Remove.
3339 (grub_vsprintf): Remove floating point support.
3341 2008-06-15 Robert Millan <rmh@aybabtu.com>
3343 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
3345 Reported by Max Vozeler.
3347 2008-06-15 Robert Millan <rmh@aybabtu.com>
3349 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3350 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3352 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3353 the beginning of the prefix.
3355 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3356 It is assumed that if we have a memdisk, grub-mkimage has set
3357 grub_prefix to include the "(memdisk)" drive in it.
3359 2008-06-15 Robert Millan <rmh@aybabtu.com>
3361 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3362 Initialize keyboard controller after registering the terminal, so that
3363 grub_printf() can be called from grub_keyboard_controller_init().
3365 2008-06-15 Robert Millan <rmh@aybabtu.com>
3367 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3368 extent-btree which is written as big endian on disk.
3369 Reported by Alain Greppin <al@chilibi.org>.
3371 2008-06-14 Robert Millan <rmh@aybabtu.com>
3373 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3374 * util/i386/pc/grub-install.in (modules): Likewise.
3376 2008-06-13 Pavel Roskin <proski@gnu.org>
3378 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3380 2008-06-13 Bean <bean123ch@gmail.com>
3382 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3384 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3386 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3387 to indicate sparse block.
3389 2008-06-12 Pavel Roskin <proski@gnu.org>
3391 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3392 number, grub_fshelp_read() does it for us.
3394 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3395 linear disk read with journal translation.
3396 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3397 * include/grub/fshelp.h: Declare grub_fshelp_read().
3399 2008-06-09 Pavel Roskin <proski@gnu.org>
3401 * fs/minix.c (grub_minix_mount): Handle error reading
3404 2008-06-08 Robert Millan <rmh@aybabtu.com>
3406 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3407 don't append the RAID prefix afterwards.
3408 Reported by Clint Adams.
3410 2008-06-08 Robert Millan <rmh@aybabtu.com>
3412 Based on description from Pavel:
3413 * kern/disk.c (grub_disk_check_range): Rename to ...
3414 (grub_disk_adjust_range): ... this. Add a comment explaining the
3415 tasks performed by this function.
3417 2008-06-08 Robert Millan <rmh@aybabtu.com>
3419 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3420 `num_serial' (for consistency with other variables).
3421 (struct grub_ntfs_data): Add `uuid' member.
3422 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3423 (grub_ntfs_uuid): New function.
3424 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3426 2008-06-07 Pavel Roskin <proski@gnu.org>
3428 * util/biosdisk.c (open_device): Revert last change to the
3429 function, it broke installation. The sector needs to be
3430 different dependent on which device is opened.
3432 2008-06-06 Robert Millan <rmh@aybabtu.com>
3434 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3435 rest of GRUB, and breakage doesn't happen if its value were modified.
3437 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3438 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3439 a constant (same value).
3440 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3441 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3443 2008-06-06 Robert Millan <rmh@aybabtu.com>
3445 * util/biosdisk.c (open_device): Do not modify sector offset when
3446 accessing a partition. kern/disk.c already handles this for us.
3448 2008-06-06 Robert Millan <rmh@aybabtu.com>
3450 * util/grub-emu.c (grub_machine_init): Move code in this function from
3452 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3453 segfault in case grub_printf() is called).
3455 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3456 grub_probe. Update all users not to explicitly add it again.
3457 (grub_device): New variable; contains corresponding device for grubdir.
3458 (fs_module, partmap_module, devabstraction_module): Pass
3459 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3462 2008-06-05 Robert Millan <rmh@aybabtu.com>
3464 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3465 is found, print it (same layout as with labels).
3467 2008-06-04 Robert Millan <rmh@aybabtu.com>
3469 * util/biosdisk.c (get_drive): Rename to ...
3470 (find_grub_drive): ... this. Update all users.
3472 (get_os_disk): Rename to ...
3473 (convert_system_partition_to_system_disk): ... this. Update all users.
3475 (find_drive): Rename to ...
3476 (find_system_device): ... this. Update all users.
3478 2008-06-04 Robert Millan <rmh@aybabtu.com>
3480 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3481 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3482 (make_device_map): Likewise.
3484 2008-06-01 Robert Millan <rmh@aybabtu.com>
3486 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3487 before dereferencing it.
3489 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3490 union with fat12/fat16-specific ones. Add some new fields, including
3491 `num_serial' for both versions.
3492 (struct grub_fat_data): Add `uuid' member.
3493 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3494 names. Initialize `data->uuid' using `num_serial'.
3495 (grub_fat_uuid): New function.
3496 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3498 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3499 (grub_reiserfs_uuid): New function.
3500 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3503 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3504 (grub_xfs_uuid): New function.
3505 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3507 2008-06-01 Robert Millan <rmh@aybabtu.com>
3509 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3510 code that is backward compatible with pre-uuid search command.
3512 2008-05-31 Robert Millan <rmh@aybabtu.com>
3514 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3515 floppies after everything else, to ensure floppy drive isn't accessed
3516 unnecessarily (patch from Bean).
3518 2008-05-31 Robert Millan <rmh@aybabtu.com>
3520 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3521 not print device names when we were asked to set a variable.
3523 2008-05-31 Robert Millan <rmh@aybabtu.com>
3525 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3526 using "cursor-on" and "cursor-off" commands (understood at least by
3527 the Open Firmware flavour on OLPC).
3529 2008-05-31 Michael Gorven <michael@gorven.za.net>
3531 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3532 on and off sequences.
3534 2008-05-31 Robert Millan <rmh@aybabtu.com>
3536 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3537 * util/update-grub.in: Likewise.
3539 2008-05-30 Pavel Roskin <proski@gnu.org>
3541 * util/biosdisk.c (linux_find_partition): Simplify logic and
3542 make the code more universal. Keep special processing for
3543 devfs, but use a simple rule for all other devices. If the
3544 device ends with a number, append 'p' and the partition number.
3545 Otherwise, append only the partition number.
3547 2008-05-30 Robert Millan <rmh@aybabtu.com>
3549 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3550 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3551 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3552 the `root' parameter to Linux.
3554 2008-05-30 Robert Millan <rmh@aybabtu.com>
3556 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3557 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3558 --fs_uuid with --fs-uuid.
3559 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3560 all filesystems support them).
3562 2008-05-30 Robert Millan <rmh@aybabtu.com>
3564 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
3565 grub_printf() flags, since we're printing in units of 2 bytes.
3567 2008-05-30 Robert Millan <rmh@aybabtu.com>
3569 * util/grub.d/00_header.in: Remove obsolete comment referencing
3570 convert_system_path_to_grub_path().
3571 * util/update-grub.in: Likewise.
3572 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3573 (convert_system_path_to_grub_path): Add a warning message explaining
3574 that this function is deprecated. Rely on is_path_readable_by_grub()
3575 for the readability checks.
3576 (font_path): Use is_path_readable_by_grub() for the readability
3577 check rather than convert_system_path_to_grub_path().
3579 2008-05-30 Robert Millan <rmh@aybabtu.com>
3581 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3582 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3583 converting it first.
3584 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3585 grub.cfg for access to font file, and afterwards call it again to set
3588 2008-05-30 Robert Millan <rmh@aybabtu.com>
3590 * commands/search.c (options): Add --fs_uuid option.
3591 (search_fs_uuid): New function.
3592 (grub_cmd_search): Fix --set argument passing.
3593 Use search_fs_uuid() when requested via --fs_uuid.
3594 (grub_search_init): Update help message.
3595 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3596 and redeclare it as an array of 16-bit words.
3597 (grub_ext2_uuid): New function.
3598 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3599 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3600 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3601 (GRUB_DEVICE_BOOT_UUID): New variables.
3602 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3603 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3605 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3606 just assume `root' variable has the right value.
3607 * util/grub.d/10_linux.in: Likewise.
3608 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3610 (main): Recognise `-t fs_uuid' argument.
3612 2008-05-30 Robert Millan <rmh@aybabtu.com>
3614 * util/biosdisk.c (map): Redefine structure to hold information
3615 about GRUB drive name.
3616 (get_drive): Reimplement without assuming (and verifying) BIOS-like
3618 (call_hook): Remove.
3619 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3620 member. Assume drive has partitions.
3621 (grub_util_biosdisk_open): Access device names via `.device' struct
3623 (open_device): Likewise.
3624 (find_drive): Likewise.
3625 (read_device_map): Adjust map[] usage to match the new struct
3626 definition. Don't check for duplicates (still possible, but not cheap
3628 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3629 (make_device_name): Remove assumption of BIOS-like drive names.
3631 2008-05-30 Pavel Roskin <proski@gnu.org>
3633 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3634 compiling execute.c doesn't need grub_script.tab.h anymore.
3635 (normal/command.c_DEPENDENCIES): Likewise.
3636 (normal/function.c_DEPENDENCIES): Likewise.
3637 * conf/i386-ieee1275.rmk: Likewise.
3638 * conf/i386-linuxbios.rmk: Likewise.
3639 * conf/i386-pc.rmk: Likewise.
3640 * conf/powerpc-ieee1275.rmk: Likewise.
3641 * conf/sparc64-ieee1275.rmk: Likewise.
3643 2008-05-29 Pavel Roskin <proski@gnu.org>
3645 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3646 when scanning metadata for volume group name.
3648 * include/grub/script.h: Don't include grub_script.tab.h. It's
3649 a generated file, which may only be included from the files with
3650 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3651 use union YYSTYPE, as the later allows forward declaration.
3652 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3654 2008-05-29 Robert Millan <rmh@aybabtu.com>
3656 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3657 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3658 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3659 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3662 2008-05-29 Robert Millan <rmh@aybabtu.com>
3664 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3665 control key combinations.
3667 2008-05-29 Robert Millan <rmh@aybabtu.com>
3669 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3670 * util/ieee1275/grub-install.in: ... to here.
3671 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3672 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3673 (grub_install_SOURCES): Likewise.
3675 2008-05-29 Robert Millan <rmh@aybabtu.com>
3677 * fs/affs.c: Update copyright year.
3678 * fs/ext2.c: Likewise.
3679 * fs/fshelp.c: Likewise.
3680 * fs/hfsplus.c: Likewise.
3681 * fs/ntfs.c: Likewise.
3682 * fs/xfs.c: Likewise.
3683 * include/grub/fshelp.h: Likewise.
3684 * util/grub-mkdevicemap.c: Likewise.
3686 2008-05-28 Robert Millan <rmh@aybabtu.com>
3688 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3689 might need to be fatfs to support some firmware implementations
3692 2008-05-28 Robert Millan <rmh@aybabtu.com>
3694 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3696 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3697 (make_device_map): Likewise.
3699 2008-05-20 Bean <bean123ch@gmail.com>
3701 * fs/fshelp.c (grub_fshelp_map_block): New function.
3702 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3703 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3705 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3706 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3707 (grub_fshelp_journal): New structure.
3708 (grub_fshelp_map_block): New function prototype.
3709 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3710 (grub_fshelp_map_block): Likewise.
3712 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3713 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3714 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3715 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3716 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3717 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3718 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3719 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3720 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3721 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3722 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3723 (grub_ext2_sblock): New members for journal support.
3724 (grub_ext3_journal_header): New structure.
3725 (grub_ext3_journal_revoke_header): Likewise.
3726 (grub_ext3_journal_block_tag): Likewise.
3727 (grub_ext3_journal_sblock): Likewise.
3728 (grub_fshelp_node): New members logfile and journal.
3729 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3730 grub_fshelp_map_block to get real block number.
3731 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3733 (grub_ext2_read_inode): Likewise.
3734 (grub_ext3_get_journal): New function.
3735 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3736 (grub_ext2_close): Release memory used by journal.
3738 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3739 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3740 (grub_reiserfs_transaction_header): Renamed to
3741 grub_reiserfs_description_block, replace field data with real_blocks.
3742 (grub_reiserfs_commit_block): New structure.
3743 (grub_reiserfs_data): New member journal.
3744 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3746 (grub_reiserfs_read_symlink): Likewise.
3747 (grub_reiserfs_iterate_dir): Likewise.
3748 (grub_reiserfs_open): Likewise.
3749 (grub_reiserfs_read): Likewise.
3750 (grub_reiserfs_get_journal): New function.
3751 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3752 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3753 using grub_reiserfs_get_journal.
3754 (grub_reiserfs_close): Release memory used by journal.
3756 * fs/affs.c (grub_affs_read_block): Change block type to
3757 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3759 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3761 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3763 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3765 * fs/udf.c (grub_udf_read_block): Change block type to
3766 grub_disk_addr_t. Use type cast to avoid warning.
3768 * fs/xfs.c (grub_xfs_read_block): Likewise.
3770 2008-05-16 Christian Franke <franke@computer.org>
3772 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3773 to ensure that break with ESC will always work.
3774 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3775 Remove ESC from keyboard queue.
3777 2008-05-16 Christian Franke <franke@computer.org>
3779 * util/biosdisk.c: [__CYGWIN__] Add includes.
3780 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3781 (get_os_disk): Move variable declarations to OS specific
3782 parts to avoid warning.
3783 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3784 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3785 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3787 * util/getroot.c: [__CYGWIN__] Add includes.
3788 (strip_extra_slashes): Fix "/" case.
3789 [__CYGWIN__] (get_win32_path): New function.
3790 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3791 [__CYGWIN__] (find_root_device): Disable.
3792 [__CYGWIN__] (get_bootsec_serial): New function.
3793 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3794 [__linux__] (grub_guess_root_device): Add early returns to simplify
3796 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3797 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3798 check for Linux only.
3800 2008-05-15 Bean <bean123ch@gmail.com>
3802 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3803 keyboard hang problem in apple's intel mac.
3805 2008-05-09 Robert Millan <rmh@aybabtu.com>
3807 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3809 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3810 (make_device_map): Likewise.
3811 Reported by Aurelien Jarno <aurel32@debian.org>
3813 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
3815 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3816 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3817 (make_device_map): Output entries for xvd type disks.
3819 2008-05-07 Robert Millan <rmh@aybabtu.com>
3821 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3823 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3824 (make_device_map): Likewise.
3825 Reported by Roland Dreier <rdreier@cisco.com>
3827 2008-05-07 Robert Millan <rmh@aybabtu.com>
3829 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3830 grub_strstr() call. Correct a few mistakes in failure path handling.
3832 2008-05-06 Robert Millan <rmh@aybabtu.com>
3834 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3835 Do not print a trailing slash (therefore, the root directory is an
3837 (convert_system_path_to_grub_path): Do not remove trailing slash
3838 from make_system_path_relative_to_its_root() output.
3840 * util/i386/pc/grub-install.in: Add trailing slash to output from
3841 make_system_path_relative_to_its_root().
3843 2008-05-06 Robert Millan <rmh@aybabtu.com>
3845 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3846 ensures that output lines aren't intermangled with those sent to
3847 stderr (via grub_util_info()).
3848 * util/grub-probe.c (grub_refresh): Likewise.
3849 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3851 2008-05-05 Christian Franke <franke@computer.org>
3853 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3854 Add Cygwin device names.
3855 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3856 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3857 (check_device): Return error instead of success on empty name.
3858 (make_device_map): Move label inside linux specific code to
3859 prevent compiler warning.
3861 2008-04-30 Robert Millan <rmh@aybabtu.com>
3863 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3864 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3866 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3868 2008-04-29 Robert Millan <rmh@aybabtu.com>
3870 * docs/grub.cfg: New file (example GRUB configuration).
3872 2008-04-26 Robert Millan <rmh@aybabtu.com>
3874 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3875 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3876 and `disk/ieee1275/nand.c'.
3878 2008-04-25 Bean <bean123ch@gmail.com>
3880 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3883 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3884 change the buffer size to 4096 for cdrom device.
3886 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3888 (_linux_mod_SOURCES): New variable.
3889 (_linux_mod_CFLAGS): Likewise.
3890 (_linux_mod_LDFLAGS): Likewise.
3891 (linux_mod_SOURCES): Likewise.
3892 (linux_mod_CFLAGS): Likewise.
3893 (linux_mod_LDFLAGS): Likewise.
3894 (nand_mod_SOURCES): Likewise.
3895 (nand_mod_CFLAGS): Likewise.
3896 (nand_mod_LDFLAGS): Likewise.
3898 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3899 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3900 type property. (nand device in olpc don't have this property)
3902 * include/grub/disk.h (grub_disk_dev_id): New macro
3903 GRUB_DISK_DEVICE_NAND_ID.
3905 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3907 (grub_rescue_cmd_initrd): Likewise.
3909 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3910 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3911 ofw_cif_handler and ofw_idt, adjust padding number.
3913 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3914 GRUB_MACHINE_IEEE1275 is defined.
3916 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3917 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3919 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3920 on nested function heap_init.
3921 (grub_upper_mem): New variable for i386-ieee1275.
3922 (grub_get_extended_memory): New function for i386-ieee1275.
3923 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3925 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3926 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3929 * loader/i386/ieee1275/linux.c: New file.
3931 * loader/i386/ieee1275/linux_normal.c: New file.
3933 * disk/ieee1275/nand.c: New file.
3935 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3937 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3939 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3941 2008-04-18 Robert Millan <rmh@aybabtu.com>
3943 Restructures early code path on ieee1275 to unify grub_main() as
3944 the first C function that is executed in every platform.
3946 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3947 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3949 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3950 * kern/ieee1275/cmain.c (cmain): Rename to ...
3951 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3952 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3955 2008-04-18 Robert Millan <rmh@aybabtu.com>
3957 * util/update-grub.in: Fix syntax error when setting
3958 `GRUB_PRELOAD_MODULES'.
3959 Reported by Stephane Chazelas <stephane@artesyncp.com>
3961 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3963 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3964 section into account, newer toolchains generate unique build ids
3965 * configure.ac: remove the test for --build-id=none acceptance,
3966 we want build ids to be preserved
3967 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3968 far from other sections don't cause the raw binary images grow
3971 2008-04-15 Robert Millan <rmh@aybabtu.com>
3973 * disk/lvm.c: Update copyright year.
3974 * kern/misc.c: Likewise.
3976 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3978 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3979 there is no memory left for physical volume name.
3981 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3983 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3984 volume name mapping to support bigger than 9 character names properly.
3986 2008-04-13 Robert Millan <rmh@aybabtu.com>
3988 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3989 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3991 2008-04-13 Christian Franke <franke@computer.org>
3993 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3994 to create a floppy emulation boot CD when non emulation mode
3996 Enable Joliet CD filesystem extension.
3998 2008-04-13 Robert Millan <rmh@aybabtu.com>
4000 * kern/misc.c (grub_strncat): Fix off-by-one error.
4001 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4003 * kern/env.c (grub_env_context_close): Clear current context, not
4005 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4007 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4009 2008-04-13 Robert Millan <rmh@aybabtu.com>
4011 Improve robustness when handling LVM.
4013 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
4014 (and leave `*p' unmodified).
4015 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4017 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4018 iterating through it.
4019 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4021 (grub_lvm_scan_device): Check the return value (and fail gracefully
4022 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4023 Don't assume `vg->pvs != NULL' when iterating through it.
4025 2008-04-13 Robert Millan <rmh@aybabtu.com>
4027 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4028 * genmk.rb (partmap): New variable.
4029 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4030 (#{partmap}): New target rule.
4031 * genpartmaplist.sh: New file.
4032 * Makefile.in (pkglib_DATA): Add partmap.lst.
4033 (partmap.lst): New target rule.
4034 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4035 modules (including all partition maps), instead of preloading them.
4037 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4039 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4040 `linux-boot-prober' (if installed) to detect other operating
4041 systems which are installed on the computer and add them to
4043 * conf/common.rmk: Build and install 30_os-prober.
4045 2008-04-12 Robert Millan <rmh@aybabtu.com>
4047 * kern/powerpc/ieee1275/init.c: Move from here ...
4048 * kern/ieee1275/init.c: ... to here. Update all users.
4050 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4051 * kern/ieee1275/cmain.c: ... to here. Update all users.
4053 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4054 * kern/ieee1275/openfw.c: ... to here. Update all users.
4056 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4057 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4059 2008-04-10 Pavel Roskin <proski@gnu.org>
4061 * configure.ac: Always use "_cv_" in cache variables for
4062 compatibility with Autoconf 2.62.
4064 2008-04-07 Robert Millan <rmh@aybabtu.com>
4066 Revert grub/machine/init.h addition by Pavel (since it breaks on
4067 i386-ieee1275 and others):
4068 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4069 * util/powerpc/ieee1275/misc.c: Likewise.
4071 2008-04-07 Robert Millan <rmh@aybabtu.com>
4073 * util/grub-probe.c (probe): Improve error message.
4075 2008-04-07 Robert Millan <rmh@aybabtu.com>
4077 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4078 (this prevents the presence of a bogus entry from ruining the whole
4081 2008-04-06 Pavel Roskin <proski@gnu.org>
4083 * util/biosdisk.c: Include grub/util/biosdisk.h.
4084 * util/grub-fstest.c (execute_command): Make static.
4085 * util/grub-mkdevicemap.c (check_device): Likewise.
4086 * util/i386/pc/misc.c: Include grub/machine/init.h.
4087 * util/powerpc/ieee1275/misc.c: Likewise.
4088 * util/lvm.c: Include grub/util/lvm.h.
4089 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4091 * util/raid.c: Include grub/util/raid.h.
4092 (grub_util_getdiskname): Make static.
4094 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4095 grub_hostfs_fini(), as they are called from grub_init_all() and
4096 grub_fini_all() respectively. This fixes an infinite loop in
4097 grub-fstest due to double registration of hostfs.
4098 Reported by Christian Franke <Christian.Franke@t-online.de>
4100 2008-04-05 Pavel Roskin <proski@gnu.org>
4102 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4103 all 8 functions. Otherwise, probe function 0 only.
4105 2008-04-04 Pavel Roskin <proski@gnu.org>
4107 * commands/lspci.c (grub_lspci_iter): Print the bus number
4110 * commands/lspci.c (grub_pci_classes): Fix typos.
4111 (grub_lspci_iter): Don't print func twice. Print vendor ID
4112 before device ID, as it's normally done.
4114 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4115 Fix signedness warnings.
4116 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4118 * util/ieee1275/get_disk_name.c: Include config.h so that
4119 _GNU_SOURCE is defined and getline() is declared. Mark an
4120 unused argument as such. Fix a signedness warning.
4122 2008-04-02 Pavel Roskin <proski@gnu.org>
4124 * genkernsyms.sh.in: Use more robust assignments for CC and
4125 srcdir. Quote srcdir.
4126 * gensymlist.sh.in: Likewise. Assert at the compile time that
4127 the symbol table is not empty.
4129 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4130 * fs/cpio.c (grub_cpio_read): Likewise.
4132 2008-04-01 Pavel Roskin <proski@gnu.org>
4134 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4135 * disk/host.c (grub_host_open): Likewise.
4136 * disk/loopback.c (grub_loopback_open): Likewise.
4137 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4138 disk->id as in disk/host.c, not a multi-character constant.
4140 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4141 later is obsolete, potentially dangerous and sets a bad example.
4142 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4143 * util/misc.c (grub_util_get_image_size): Likewise.
4145 * disk/loopback.c (options): Improve help for "--partitions".
4147 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4148 options to align them with the short options, e.g. "echo -e".
4150 2008-03-31 Bean <bean123ch@gmail.com>
4152 * video/reader/png.c (grub_png_data): New member is_16bit and
4154 (grub_png_decode_image_header): Detect 16 bit png image.
4155 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4156 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4157 (grub_video_reader_png): Release memory occupied by image_data.
4159 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4161 (grub_nfs_mount): Skip the test for sector per cluster.
4163 * include/grub/ntfs.h (MAX_SPC): Removed.
4165 2008-03-31 Bean <bean123ch@gmail.com>
4167 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4168 (grub_probe_SOURCES): Add fs/afs.c.
4169 (grub_fstest_SOURCES): Likewise.
4170 (afs_mod_SOURCES): New variable.
4171 (afs_mod_CFLAGS): Likewise.
4172 (afs_mod_LDFLAGS): Likewise.
4174 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4175 (grub_emu_SOURCES): Likewise.
4177 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4179 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4181 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4183 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4185 * fs/afs.c: New file.
4187 2008-03-30 Pavel Roskin <proski@gnu.org>
4189 * disk/host.c: Include grub/misc.h to fix a warning.
4190 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4191 warnings about implicit declarations.
4193 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4195 * include/grub/i386/loader.h: Change declaration of
4196 grub_linux_boot() to match what grub_loader_set() expects.
4197 * util/getroot.c (grub_guess_root_device): Return const char* to
4199 * util/grub-probe.c (probe): Fix a warning about uninitialized
4200 abstraction_name variable.
4201 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4202 second argument as unused to fix a warning.
4204 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4205 missing grub_error() call.
4207 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4208 2.60 and newer uses it to define datadir.
4210 * commands/sleep.c: Fix warning about implicit declaration.
4211 * disk/memdisk.c: Likewise.
4212 * loader/aout.c: Likewise.
4213 * loader/i386/bsd_normal.c: Likewise.
4214 * util/grub-probe.c: Likewise.
4216 * commands/i386/cpuid.c (has_longmode): Make static.
4217 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4218 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4220 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4221 GDT. This is more robust, as %ds can change.
4222 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4223 calling real_to_prot().
4224 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4226 2008-03-28 Pavel Roskin <proski@gnu.org>
4228 * kern/i386/pc/startup.S: Assert that uncompressed functions
4229 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4230 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4231 code, as they push parts of the code (error handlers) beyond
4232 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4233 code as correctness and size.
4235 2008-03-28 Pavel Roskin <proski@gnu.org>
4237 * kern/i386/pc/startup.S
4238 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4239 data block address to the real mode, keep offset minimal. This
4240 works around a bug in AWARD BIOS on old Athlon systems, which
4241 makes CD detection hang.
4243 2008-03-26 Pavel Roskin <proski@gnu.org>
4245 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4247 * include/grub/normal.h: Add grub_parse_color_name_pair()
4250 2008-03-24 Bean <bean123ch@gmail.com>
4252 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4253 (cd_count): Removed.
4254 (cd_drive): New variable.
4255 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4256 (grub_biosdisk_call_hook): Likewise.
4257 (grub_biosdisk_iterate): Change cdrom detection method.
4258 (grub_biosdisk_open): Replace cd_start with cd_drive.
4259 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4260 detect cdrom device.
4262 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4264 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4265 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4266 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4267 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4268 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4269 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4270 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4271 (grub_biosdisk_cdrp): New structure.
4272 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4274 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4276 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4279 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4282 2008-03-20 Robert Millan <rmh@aybabtu.com>
4284 Remove 2 TiB limit in ata.mod.
4285 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4286 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4287 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4288 grub_uint64_t instead of grub_uint32_t.
4290 2008-03-05 Bean <bean123ch@gmail.com>
4292 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4293 (grub_multiboot): Set boot device.
4295 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4297 2008-03-02 Bean <bean123ch@gmail.com>
4299 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4302 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4304 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4307 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4310 * docs/fdl.texi: New file.
4312 * docs/mdate-sh: New file. Copied from gnulib.
4313 * docs/texinfo.tex: Likewise.
4315 * config.guess: Updated from gnulib.
4316 * install-sh: Likewise.
4318 2008-02-28 Robert Millan <rmh@aybabtu.com>
4320 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4321 (aout_mod_SOURCES): New variable.
4322 (aout_mod_CFLAGS): Likewise.
4323 (aout_mod_LDFLAGS): Likewise.
4325 * conf/i386-ieee1275.rmk: Likewise.
4327 2008-02-28 Robert Millan <rmh@aybabtu.com>
4329 * util/update-grub.in: Reorganise terminal validity check. Accept
4330 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4331 Based on suggestion by Franklin PIAT.
4333 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4335 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4337 * util/getroot.c (grub_util_check_block_device): New function that
4338 returns the given argument if it is a block device and returns NULL else.
4339 * util/grub-probe.c (argument_is_device): New variable.
4340 (probe): Promote device_name from a variable to an argument. Receive
4341 device_name from grub_util_check_block_device() if path is NULL and from
4342 grub_guess_root_device() else. Do not free() device_name anymore.
4343 (options): Introduce new parameter '-d, --device'.
4344 (main): Add description of the new parameter to the help screen.
4345 Rename path variable to argument. Set argument_is_device if the '-d'
4346 option is given. Pass argument to probe() depending on
4349 2008-02-24 Bean <bean123ch@gmail.com>
4351 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4352 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4353 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4354 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4355 (GRUB_ISO9660_VOLDESC_END): Likewise.
4356 (grub_iso9660_primary_voldesc): New member escape.
4357 (grub_iso9660_data): New member joliet.
4358 (grub_iso9660_convert_string): New function.
4359 (grub_iso9660_mount): Detect joliet extension.
4360 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4361 (grub_iso9660_iso9660_label): Likewise.
4363 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4364 (grub_setup_SOURCES): Add fs/udf.c.
4365 (grub_fstest_SOURCES): Likewise.
4366 (udf_mod_SOURCES): New variable.
4367 (udf_mod_CFLAGS): Likewise.
4368 (udf_mod_LDFLAGS): Likewise.
4370 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4371 (grub_emu_SOURCES): Likewise.
4373 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4375 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4377 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4379 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4381 * fs/udf.c: New file.
4383 2008-02-24 Robert Millan <rmh@aybabtu.com>
4385 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4386 (normal/lexer.c_DEPENDENCIES): New variables.
4387 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4388 (normal/lexer.c_DEPENDENCIES): Likewise.
4389 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4390 (normal/lexer.c_DEPENDENCIES): Likewise.
4391 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4392 (normal/lexer.c_DEPENDENCIES): Likewise.
4393 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4394 (normal/lexer.c_DEPENDENCIES): Likewise.
4395 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4396 (normal/lexer.c_DEPENDENCIES): Likewise.
4398 2008-02-23 Robert Millan <rmh@aybabtu.com>
4400 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4401 since they were intended to be in hex. This didn't break previously
4402 because of a bug in gpt_partition_map_iterate() (see below).
4404 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4405 when checking the validity of GPT header.
4406 Remove `partno', since it always provides the same information as `i'.
4408 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4410 * include/grub/efi/time.h: Fix a wrong comment.
4412 2008-02-19 Pavel Roskin <proski@gnu.org>
4414 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4417 2008-02-19 Bean <bean123ch@gmail.com>
4419 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4420 (aout_mod_SOURCES): New variable.
4421 (aout_mod_CFLAGS): Likewise.
4422 (aout_mod_LDFLAGS): Likewise.
4423 (_bsd_mod_SOURCES): New variable.
4424 (_bsd_mod_CFLAGS): Likewise.
4425 (_bsd_mod_LDFLAGS): Likewise.
4426 (bsd_mod_SOURCES): New variable.
4427 (bsd_mod_CFLAGS): Likewise.
4428 (bsd_mod_LDFLAGS): Likewise.
4430 * include/grub/aout.h: New file.
4432 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4434 * include/grub/i386/bsd.h: New file.
4436 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4439 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4440 function is called, so that it's possible to change it inside the hook.
4441 (grub_elf64_load): Likewise.
4442 (grub_elf_file): Don't close the file if elf header is not found.
4443 (grub_elf_close): Close the file if grub_elf_file fails (The new
4444 grub_elf_file won't close it).
4445 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4446 (grub_elf64_size): Likewise.
4448 * kern/i386/loader.S (grub_unix_real_boot): New function.
4450 * loader/aout.c: New file.
4452 * loader/i386/bsd.c: New file.
4454 * loader/i386/bsd_normal.c: New file.
4456 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4458 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
4459 can test other formats.
4461 2008-02-19 Robert Millan <rmh@aybabtu.com>
4463 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4464 (grub_gpt_partition_type_empty): Redefine with macro from
4465 `<grub/gpt_partition.h>'.
4466 (gpt_partition_map_iterate): Adjust partition type comparison.
4468 Export `entry' as partmap-specific `part.data' struct.
4469 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4471 * include/grub/gpt_partition.h (grub_gpt_header)
4472 (grub_gpt_partentry): ... to here (new file).
4474 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4476 (grub_gpt_partition_type_bios_boot): New const variable, defined
4477 with macro from `<grub/gpt_partition.h>'.
4479 (setup): Replace `first_start' with `embed_region', which keeps
4480 track of the embed region (and is partmap-agnostic).
4482 Replace find_first_partition_start() with find_usable_region(),
4483 which finds a usable region for embedding using partmap-specific
4484 knowledge (supports PC/MSDOS and GPT).
4486 Fix all assumptions that the embed region start at sector 1, using
4487 `embed_region.start' from now on. Similarly, use `embed_region.end'
4488 rather than `first_start' to calculate available size.
4490 In grub_util_info() message, replace "into after the MBR" with an
4491 indication of the specific sector our embed region starts at.
4493 2008-02-19 Robert Millan <rmh@aybabtu.com>
4495 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4496 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4497 `commands/reboot.c'.
4498 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4499 (halt_mod_SOURCES): Likewise.
4500 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4501 (halt_mod_SOURCES): Likewise.
4503 2008-02-17 Christian Franke <franke@computer.org>
4505 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4507 2008-02-17 Robert Millan <rmh@aybabtu.com>
4509 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4510 set `first_start' to 0 for non-PC/MSDOS partition maps.
4512 2008-02-16 Robert Millan <rmh@aybabtu.com>
4514 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4515 do not assume partition map is PC/MSDOS before performing checks that
4516 are specific to that layout.
4518 2008-02-13 Robert Millan <rmh@aybabtu.com>
4520 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4521 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4522 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4524 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4526 * configure.ac: Only a cosmetic change on the handling of
4527 -fno-stack-protector.
4529 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
4531 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4532 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4534 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4535 (halt_mod_SOURCES): New variable.
4536 (halt_mod_CFLAGS): Likewise.
4537 (halt_mod_LDFLAGS): Likewise.
4538 (reboot_mod_SOURCES): Likewise.
4539 (reboot_mod_CFLAGS): Likewise.
4540 (reboot_mod_LDFLAGS): Likewise.
4542 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4543 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4545 (halt_mod_SOURCES): Likewise.
4546 (reboot_mod_SOURCES): Likewise.
4548 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4549 commands/i386/pc/reboot.c by commands/reboot.c.
4550 (reboot_mod_SOURCES): Likewise.
4552 * commands/i386/pc/reboot.c: merge this file ...
4554 * commands/ieee1275/reboot.c: ... and this file ...
4556 * commands/reboot.c: ... to this file.
4557 Add some precompiler directive to include the correct header for
4560 * commands/ieee1275/halt.c: move this file ...
4562 * commands/halt.c: ... to here.
4563 Add some precompiler directive to include the correct header for
4566 * include/grub/efi/efi.h (grub_reboot): New function declaration.
4567 (grub_halt): Likewise.
4569 * kern/efi/efi.c (grub_reboot): New function.
4570 (grub_halt): Likewise.
4572 2008-02-12 Robert Millan <rmh@aybabtu.com>
4574 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4575 /dev (like it is done for /dev/mapper). This doesn't provide support
4576 for EVMS, but at least it is now easy to identify the problem when it
4579 2008-02-11 Robert Millan <rmh@aybabtu.com>
4581 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4582 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4583 comparing it with -1, not 0.
4585 2008-02-10 Robert Millan <rmh@aybabtu.com>
4587 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4589 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4590 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4592 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4593 `disk/lvm.c' to the end of the list.
4594 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4595 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4597 2008-02-10 Robert Millan <rmh@aybabtu.com>
4599 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4600 grub_print_error() instead. This will let user know why we're entering
4602 Based on suggestions from Sam Morris.
4604 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
4606 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4607 on remaining N args, instead of "--" arg N times.
4609 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4611 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4612 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4613 pattern for unknown glyphs.
4615 2008-02-09 Robert Millan <rmh@aybabtu.com>
4617 * configure.ac: Probe for `help2man'.
4618 * Makefile.in (builddir): New variable.
4619 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4620 or otherwise add a few flags/options to it.
4621 (install-local): For every executable utility or script that is
4622 installed, invoke $(HELP2MAN) to install a manpage based on --help
4625 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4626 that it doesn't prevent --help from working in build tree.
4628 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4629 with `bug-grub@gnu.org'.
4630 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4631 * util/update-grub.in (usage): New function.
4632 Implement proper argument check, with support for --help and --version
4633 (as well as existing -y).
4635 2008-02-09 Christian Franke <franke@computer.org>
4637 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4638 avoid overwriting previous output.
4639 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4641 2008-02-09 Robert Millan <rmh@aybabtu.com>
4643 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4646 2008-02-09 Robert Millan <rmh@aybabtu.com>
4648 * commands/sleep.c: New file.
4649 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4650 (sleep_mod_SOURCES): New variable.
4651 (sleep_mod_CFLAGS): Likewise.
4652 (sleep_mod_LDFLAGS): Likewise.
4654 2008-02-09 Robert Millan <rmh@aybabtu.com>
4656 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4657 situations in which we can deduce the RAID size and the superblock
4660 2008-02-09 Robert Millan <rmh@aybabtu.com>
4662 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4663 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4664 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4666 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4667 and return a grub_diskmemberlist_t composed of physical array members.
4668 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4670 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4672 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4673 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4674 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4676 * util/grub-probe.c (probe): Move partmap probing code from here ...
4677 (probe_partmap): ... to here.
4678 (probe): Use probe_partmap() once for the disk we're probing, and
4679 additionally, when such disk contains a memberlist() struct member,
4680 once for each disk that is contained in the structure returned by
4683 2008-02-09 Robert Millan <rmh@aybabtu.com>
4685 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4686 environment variable to 'all' in order to obtain debug output from
4688 * util/i386/pc/grub-setup.c (main): Likewise.
4690 2008-02-08 Robert Millan <rmh@aybabtu.com>
4692 * disk/raid.c (grub_raid_scan_device): Check for
4693 `array->device[sb.this_disk.number]' rather than for
4694 `array->device[sb.this_disk.number]->name', since the latter is not
4695 guaranteed to be accessible.
4697 2008-02-08 Robert Millan <rmh@aybabtu.com>
4699 * disk/raid.c: Update copyright.
4700 * fs/cpio.c: Likewise.
4701 * include/grub/raid.h: Likewise.
4702 * loader/i386/pc/multiboot.c: Likewise.
4703 * util/hostfs.c: Likewise.
4705 2008-02-08 Robert Millan <rmh@aybabtu.com>
4707 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4708 to a grub_disk_t array.
4709 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4711 (grub_raid_scan_device): Replace `device[x].name' accesses with
4712 `device[x]->name'. Simplify initialization of `array->device[x]'.
4714 2008-02-08 Robert Millan <rmh@aybabtu.com>
4716 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4717 grub_dprintf() calls.
4718 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4721 2008-02-07 Christian Franke <franke@computer.org>
4723 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4724 instead of fseek and ftell to support large files.
4725 (grub_hostfs_read): Likewise.
4727 2008-02-07 Robert Millan <rmh@aybabtu.com>
4729 Patch from Jeroen Dekkers.
4730 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4731 failure, since successfully reading all array members might not be
4734 2008-02-06 Robert Millan <rmh@aybabtu.com>
4736 * util/grub-probe.c (probe): Simplify partmap probing (with the
4737 assumption that the first word up to the underscore equals to
4740 2008-02-06 Christian Franke <franke@computer.org>
4742 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4743 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4744 last block of a cpio or tar stream.
4745 Check for "TRAILER!!!" instead of any empty data
4746 block to detect last block of a cpio stream.
4747 (grub_cpio_dir): Fix constness of variable np.
4748 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4749 cpio or tar trailer is detected. This fixes a crash
4750 on open of a non existing file.
4752 2008-02-05 Bean <bean123ch@gmail.com>
4754 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4756 (grub_multiboot_load_elf64): Likewise.
4757 (grub_multiboot): Initialize mbi structure.
4759 * util/grub-fstest.c: Don't include unused header file script.h.
4761 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4763 (grub_fstest_SOURCES): Likewise.
4765 2008-02-05 Robert Millan <rmh@aybabtu.com>
4767 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4768 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4769 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4770 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4772 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4773 (translation_table): Replace hardcoded values with macros
4774 provided by `<grub/term.h>'.
4776 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4777 (keyboard_map): Correct/add a few values, with macros provided
4779 (keyboard_map_shift): Zero values that don't differ from their
4780 `keyboard_map' equivalents.
4781 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4782 Discard the second scan code that is always sent by Caps lock.
4783 Only use `keyboard_map_shift' when it provides a non-zero value,
4784 otherwise fallback to `keyboard_map'.
4786 2008-02-04 Bean <bean123ch@gmail.com>
4788 * Makefile.in (enable_grub_fstest): New variable.
4790 * conf/common.rmk (grub_fstest_init.lst): New rule.
4791 (grub_fstest_init.h): Likewise.
4792 (grub_fstest_init.c): Likewise.
4793 (util/grub-fstest.c_DEPENDENCIES): New variable.
4794 (grub_fstest_SOURCES): Likewise.
4796 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4798 * util/grub-fstest.c: New file.
4800 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4802 Make grub-setup handle a separate root device.
4804 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4805 so that the root device can be compared with the destination
4807 When embedding the core image, if the root and destination devices
4808 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4810 When not embedding, set ROOT_DRIVE to 0xFF.
4812 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4814 Add support for having a grub directory in a different drive. This
4815 is still only the data handling part.
4817 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4818 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4819 (grub_root_drive): New variable.
4821 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4822 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4823 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4826 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4828 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4830 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4832 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4833 is bogus, because PXE booting does not specify any drive
4836 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4837 am not sure if this is really correct.
4839 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4840 is always identical to the boot drive when booting from a CD.
4842 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4844 (root_drive): New variable.
4845 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4846 (setup_sectors): Push %dx right after popping it, because %dh will
4848 (copy_buffer): Restore %dx.
4850 2008-02-03 Robert Millan <rmh@aybabtu.com>
4852 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4853 use `cdboot.img' for cdrom images.
4855 2008-02-03 Robert Millan <rmh@aybabtu.com>
4857 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4858 only setup gfxterm when `font' command has succeeded.
4860 2008-02-03 Robert Millan <rmh@aybabtu.com>
4862 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4863 (grub_rescue_cmd_multiboot_loader)
4864 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4866 2008-02-03 Pavel Roskin <proski@gnu.org>
4868 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4869 %edx and %esi from stack only after grub_gate_a20() is called.
4870 grub_gate_a20() clobbers %edx.
4872 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4874 * configure.ac (AC_INIT): Bumped to 1.96.
4876 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4877 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4878 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4879 video/readers/png.c.
4881 2008-02-03 Bean <bean123ch@gmail.com>
4883 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4884 (cdboot_img_SOURCES): New variable.
4885 (cdboot_img_ASFLAGS): New variable.
4886 (cdboot_img_LDFLAGS): New variable.
4888 * boot/i386/pc/cdboot.S: New file.
4890 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4891 (cd_count): Likewise.
4892 (grub_biosdisk_get_drive): Add support for cd device.
4893 (grub_biosdisk_call_hook): Likewise.
4894 (grub_biosdisk_iterate): Likewise.
4895 (grub_biosdisk_open): Likewise.
4896 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4897 (grub_biosdisk_rw): Support reading from cd device.
4898 (GRUB_MOD_INIT): Iterate cd devices.
4900 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4901 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4902 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4904 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4906 2008-02-02 Robert Millan <rmh@aybabtu.com>
4908 * commands/read.c: New file.
4909 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4910 (read_mod_SOURCES): New variable.
4911 (read_mod_CFLAGS): Likewise.
4912 (read_mod_LDFLAGS): Likewise.
4914 2008-02-02 Robert Millan <rmh@aybabtu.com>
4916 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4917 determining whether menu has to be displayed.
4919 2008-02-02 Marco Gerards <marco@gnu.org>
4921 * bus/pci.c: New file.
4923 * include/grub/pci.h: Likewise.
4925 * include/grub/i386/pc/pci.h: Likewise.
4927 * commands/lspci.c: Likewise.
4929 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4931 (pci_mod_SOURCES): New variable.
4932 (pci_mod_CFLAGS): Likewise.
4933 (pci_mod_LDFLAGS): Likewise.
4934 (lspci_mod_SOURCES): Likewise.
4935 (lspci_mod_CFLAGS): Likewise.
4936 (lspci_mod_LDFLAGS): Likewise.
4938 2008-02-02 Bean <bean123ch@gmail.com>
4940 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4941 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4943 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4944 (grub_xfs_btree_node): New structure.
4945 (grub_xfs_btree_root): New structure.
4946 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4947 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4948 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4949 (GRUB_XFS_EXTENT_SIZE): Likewise.
4950 (grub_xfs_read_block): Support btree format type.
4951 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4952 Use directory block as basic unit.
4954 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4956 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4957 __attribute__ ((__regparm__ (1))).
4959 2008-02-01 Robert Millan <rmh@aybabtu.com>
4961 Correct a mistake in previous commit.
4963 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4965 (normal/command.c_DEPENDENCIES): New variable.
4967 2008-02-01 Robert Millan <rmh@aybabtu.com>
4969 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4971 (normal/command.c_DEPENDENCIES): New variable.
4972 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4973 * conf/i386-ieee1275.rmk: Likewise.
4974 * conf/i386-linuxbios.rmk: Likewise.
4975 * conf/i386-pc.rmk: Likewise.
4976 * conf/sparc64-ieee1275.rmk: Likewise.
4977 * conf/powerpc-ieee1275.rmk: Likewise.
4978 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4980 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4982 2008-02-01 Robert Millan <rmh@aybabtu.com>
4984 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4985 call at beginning of function.
4987 2008-01-31 Pavel Roskin <proski@gnu.org>
4989 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4990 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4991 (grub_mkrescue_SOURCES): Likewise.
4992 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4994 2008-01-30 Robert Millan <rmh@aybabtu.com>
4996 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4997 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4998 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4999 (grub_probe_SOURCES): ... to here.
5001 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5002 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5003 * conf/i386-ieee1275.rmk: Likewise.
5004 * conf/i386-linuxbios.rmk: Likewise.
5005 * conf/powerpc-ieee1275.rmk: Likewise.
5007 2008-01-30 Tristan Gingold <gingold@free.fr>
5009 * kern/rescue.c: Silently accept empty lines.
5011 2008-01-29 Bean <bean123ch@gmail.com>
5013 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5014 (real_code_2): Code cleanup and change comment style.
5015 (move_memory): Avoid using 32-bit address mode.
5017 2008-01-29 Bean <bean123ch@gmail.com>
5019 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5020 (png_mod_SOURCES): New variable.
5021 (png_mod_CFLAGS): Likewise.
5022 (png_mod_LDFLAGS): Likewise.
5024 * video/readers/png.c: New file.
5026 2008-01-28 Robert Millan <rmh@aybabtu.com>
5028 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5029 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5030 `ifndef GRUB_MOD_GAP' hack.
5031 * util/elf/grub-mkimage.c (add_segments): Likewise.
5033 2008-01-27 Robert Millan <rmh@aybabtu.com>
5035 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5036 `GRUB_MOD_GAP' for platforms in which it's not defined.
5037 * util/elf/grub-mkimage.c (add_segments): Likewise.
5039 2008-01-27 Robert Millan <rmh@aybabtu.com>
5041 Get grub-emu to build again (including parallel builds).
5043 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5045 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5046 (normal/execute.c_DEPENDENCIES): ... this, ...
5047 (grub-emu_DEPENDENCIES): ... and this.
5049 * conf/i386-efi.rmk: Likewise.
5050 * conf/i386-linuxbios.rmk: Likewise.
5051 * conf/i386-ieee1275.rmk: Likewise.
5052 * conf/powerpc-ieee1275.rmk: Likewise.
5053 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5055 2008-01-27 Robert Millan <rmh@aybabtu.com>
5057 * NEWS: Add a few items.
5059 2008-01-27 Robert Millan <rmh@aybabtu.com>
5061 Fix parallel builds with grub-emu. Based on earlier commit for
5062 grub-probe and grub-setup.
5064 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5065 (util/grub-emu.c_DEPENDENCIES): ... this.
5066 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5067 (util/grub-emu.c_DEPENDENCIES): ... this.
5068 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5069 (util/grub-emu.c_DEPENDENCIES): ... this.
5070 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5071 (util/grub-emu.c_DEPENDENCIES): ... this.
5072 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5073 (util/grub-emu.c_DEPENDENCIES): ... this.
5075 2008-01-27 Pavel Roskin <proski@gnu.org>
5077 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5078 to create a gap between _end and the modules added to the image
5079 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5080 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5081 * util/elf/grub-mkimage.c (add_segments): Likewise.
5083 2008-01-26 Pavel Roskin <proski@gnu.org>
5085 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5086 just return an error.
5088 2008-01-26 Bean <bean123ch@gmail.com>
5090 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5091 (grub_reiserfs_get_item): Save offset of the next item.
5092 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5094 2008-01-25 Robert Millan <rmh@aybabtu.com>
5096 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5097 make all filesystem sources appear together (possibly fixing omissions
5099 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5100 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5101 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5102 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5104 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5106 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5107 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5108 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5109 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5111 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5112 (probe): Add a sanity check to make sure of our ability to read
5113 requested files when probing for filesystem type.
5115 * genmk.rb: Update copyright year (2007).
5117 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5118 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5119 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5120 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5121 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5122 : Remove function prototypes.
5124 2008-01-25 Robert Millan <rmh@aybabtu.com>
5126 Revert my previous commits (based on wrong assumption of how grub_errno
5129 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
5130 * kern/file.c (grub_file_open): Likewise.
5132 2008-01-24 Pavel Roskin <proski@gnu.org>
5134 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5135 that hang if GRUB tries to setup colors.
5136 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5137 colors for firmwares that don't support it.
5138 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5139 Recognize Open Hack'Ware, set flags to work around its
5142 2008-01-24 Robert Millan <rmh@aybabtu.com>
5144 * kern/file.c (grub_file_open): Do not account previous failures of
5145 unrelated functions when grub_errno is checked for.
5146 Reported by Oleg Strikov.
5148 2008-01-24 Bean <bean123ch@gmail.com>
5150 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5151 (grub_ufs_sblock): New member volume name.
5152 (grub_ufs_find_file): Fix string copy bug.
5153 (grub_ufs_label): Implement this function properly.
5155 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5156 (grub_hfs_iterate_records): Use the correct file number for extents
5157 and catalog file. Fix problem in next index calculation.
5158 (grub_hfs_find_node): Replace recursive function call with loop.
5159 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5161 2008-01-23 Robert Millan <rmh@aybabtu.com>
5163 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5164 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5165 (grub_multiboot2_real_boot): New function prototype.
5167 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5168 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5170 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5171 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5173 2008-01-23 Robert Millan <rmh@aybabtu.com>
5175 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5176 #ifdef'ed out grub_printf().
5178 2008-01-23 Robert Millan <rmh@aybabtu.com>
5180 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5181 grub_dprintf calls, since they make "debug=all" mode unusable.
5182 (grub_console_checkkey): Likewise.
5184 2008-01-23 Robert Millan <rmh@aybabtu.com>
5186 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5187 `term/i386/pc/at_keyboard.c'.
5188 (pkglib_MODULES): Add `serial.mod'.
5189 (serial_mod_SOURCES): New variable.
5190 (serial_mod_CFLAGS): Likewise.
5191 (serial_mod_LDFLAGS): Likewise.
5193 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5194 `<grub/powerpc/ieee1275/console.h>'.
5195 (grub_keyboard_controller_init): New function prototype.
5196 (grub_console_checkkey): Likewise.
5197 (grub_console_getkey): Likewise.
5199 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5202 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5203 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5205 2008-01-23 Robert Millan <rmh@aybabtu.com>
5207 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5208 present, "(memdisk)/boot/grub" becomes the default prefix.
5210 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5211 a memdisk tarball with all the modules. Add --overlay=DIR option that
5212 allows users to overlay additional files into the image.
5214 2008-01-23 Robert Millan <rmh@aybabtu.com>
5216 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5217 and `machine/memory.h'.
5218 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5219 (_multiboot_mod_SOURCES): New variable.
5220 (_multiboot_mod_CFLAGS): Likewise.
5221 (_multiboot_mod_LDFLAGS): Likewise.
5222 (multiboot_mod_SOURCES): Likewise.
5223 (multiboot_mod_CFLAGS): Likewise.
5224 (multiboot_mod_LDFLAGS): Likewise.
5226 * include/grub/i386/ieee1275/loader.h: New file.
5228 * include/grub/i386/ieee1275/machine.h: Likewise.
5230 * include/grub/i386/ieee1275/memory.h: Likewise.
5232 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5233 variable declaration.
5234 (grub_os_area_size): Likewise.
5236 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5237 (grub_lower_mem, grub_upper_mem): New variables.
5238 (grub_stop_floppy): New function (just to make
5239 grub_multiboot2_real_boot() happy).
5241 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5242 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5243 (grub_stop): New function.
5244 Include `"../realmode.S"' and `"../loader.S"'.
5246 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5247 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5249 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5250 rely on grub_multiboot2_real_boot() for final boot.
5252 2008-01-22 Robert Millan <rmh@aybabtu.com>
5254 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5255 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5256 device that doesn't look like an SD card.
5257 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5258 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5259 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5260 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5263 2008-01-22 Robert Millan <rmh@aybabtu.com>
5265 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5266 avoid claiming over our own code.
5268 2008-01-22 Bean <bean123ch@gmail.com>
5270 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5271 (jpeg_mod_SOURCES): New variable.
5272 (jpeg_mod_CFLAGS): Likewise.
5273 (jpeg_mod_LDFLAGS): Likewise.
5275 * video/readers/jpeg.c : New file.
5277 2008-01-22 Bean <bean123ch@gmail.com>
5279 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5280 there are no more items.
5282 2008-01-21 Robert Millan <rmh@aybabtu.com>
5284 * kern/mm.c (grub_mm_init_region): Improve debug message.
5286 2008-01-21 Robert Millan <rmh@aybabtu.com>
5288 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5289 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5291 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5293 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5294 Indicates start of upper memory.
5295 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5296 (generate_image): Abort when image size is big enough to corrupt
5299 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5300 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5301 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5302 instead of hardcoding 0xA0000.
5303 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5304 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5305 instead of hardcoding 0xA0000.
5307 2008-01-21 Robert Millan <rmh@aybabtu.com>
5309 * disk/memdisk.c (memdisk_size): New variable.
5310 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5312 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5313 image to dynamic memory.
5314 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5315 `memdisk_size'. Free memdisk block.
5317 2008-01-21 Robert Millan <rmh@aybabtu.com>
5319 Fix detection of very small filesystems (like tar).
5321 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5322 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5323 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5324 a problem with this disk).
5326 2008-01-21 Robert Millan <rmh@aybabtu.com>
5328 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5329 on grub_biosdisk_rw_standard() error.
5331 2008-01-21 Robert Millan <rmh@aybabtu.com>
5333 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5335 * kern/elf.c: Likewise.
5336 * kern/ieee1275/ieee1275.c: Likewise.
5337 * kern/powerpc/ieee1275/openfw.c: Likewise.
5338 * term/ieee1275/ofconsole.c: Likewise.
5340 2008-01-21 Robert Millan <rmh@aybabtu.com>
5342 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5344 * include/grub/kernel.h (grub_arch_memdisk_addr)
5345 (grub_arch_memdisk_size): Moved from here ...
5347 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5348 (grub_arch_memdisk_size): ... to here.
5350 2008-01-21 Robert Millan <rmh@aybabtu.com>
5352 Mostly based on bugfix from Bean.
5354 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5355 attribute with hook() parameter.
5356 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5358 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5359 attribute with hook() parameter.
5360 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5363 2008-01-21 Robert Millan <rmh@aybabtu.com>
5365 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5366 (pkglib_MODULES): Add `memdisk.mod'.
5367 (memdisk_mod_SOURCES): New variable.
5368 (memdisk_mod_CFLAGS): Likewise.
5369 (memdisk_mod_LDFLAGS): Likewise.
5371 * disk/memdisk.c: New file.
5373 * include/grub/disk.h (grub_disk_dev_id): Add
5374 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5376 * include/grub/i386/pc/kernel.h
5377 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5378 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5379 (grub_kernel_image_size): New variable declaration.
5380 (grub_total_module_size): Likewise.
5381 (grub_memdisk_image_size): Likewise.
5383 * include/grub/i386/pc/memory.h
5384 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5386 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5387 (grub_arch_memdisk_addr): New variable declaration.
5388 (grub_arch_memdisk_size): Likewise.
5390 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5391 (grub_arch_memdisk_size): Likewise.
5393 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5394 (codestart): Replace hardcoded `0x100000' with
5395 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5397 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5398 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5399 not NULL, append the contents of the file it refers to, at the end of
5400 the compressed kernel image. Initialize `grub_memdisk_image_size'
5401 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5402 (options): Add "memdisk"|'m' option.
5403 (main): Parse --memdisk|-m option, and pass user-provided path as
5404 parameter to generate_image().
5406 2008-01-20 Robert Millan <rmh@aybabtu.com>
5408 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5409 grub_dprintf() calls from here ...
5410 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5412 2008-01-20 Robert Millan <rmh@aybabtu.com>
5414 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5416 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5418 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5419 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5420 `GRUB_IEEE1275_FLAG_REAL_MODE'.
5421 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
5423 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5424 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5426 2008-01-19 Robert Millan <rmh@aybabtu.com>
5428 Get rid of confusing function (superseded by
5429 `grub_ieee1275_get_integer_property')
5430 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5432 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5434 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5435 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
5436 in native endianness from grub_ieee1275_get_integer_property().
5438 2008-01-19 Robert Millan <rmh@aybabtu.com>
5440 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5441 command after "shut-down", since implementations differ on which
5442 the command for halt is.
5444 2008-01-19 Robert Millan <rmh@aybabtu.com>
5446 * include/grub/i386/linuxbios/console.h: Add header protection.
5447 (grub_keyboard_controller_init): New function prototype.
5448 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5449 (KEYBOARD_COMMAND_READ): Likewise.
5450 (KEYBOARD_COMMAND_WRITE): Likewise.
5451 (KEYBOARD_SCANCODE_SET1): Likewise.
5452 (grub_keyboard_controller_write): New function.
5453 (grub_keyboard_controller_read): Likewise.
5454 (grub_keyboard_controller_init): Likewise.
5456 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5457 (grub_console_init): On coreboot/LinuxBIOS, call
5458 grub_keyboard_controller_init().
5460 2008-01-19 Robert Millan <rmh@aybabtu.com>
5462 PowerPC changes provided by Pavel Roskin.
5464 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5465 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5466 don't rely on cmain() doing it.
5467 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5468 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5470 2008-01-16 Robert Millan <rmh@aybabtu.com>
5472 * include/grub/i386/linuxbios/memory.h
5473 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5474 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5475 receive `table_header' as argument. Instead, probe for it in the
5476 known memory ranges where it can be present.
5477 (grub_available_iterate): Do not pass a fixed `table_header' address
5478 to grub_linuxbios_table_iterate().
5480 2008-01-15 Robert Millan <rmh@aybabtu.com>
5482 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5483 * conf/i386-ieee1275.rmk: New file.
5484 * include/grub/i386/ieee1275/console.h: Likewise.
5485 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5486 * include/grub/i386/ieee1275/kernel.h: Likewise.
5487 * include/grub/i386/ieee1275/time.h: Likewise.
5488 * kern/i386/ieee1275/init.c: Likewise.
5489 * kern/i386/ieee1275/startup.S: Likewise.
5491 2008-01-15 Robert Millan <rmh@aybabtu.com>
5493 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5494 when pointers are 32-bit (but still do set it to one when they are
5497 2008-01-15 Robert Millan <rmh@aybabtu.com>
5499 * include/grub/ieee1275/ieee1275.h
5500 (grub_ieee1275_get_integer_property): New function prototype.
5502 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5503 (grub_ieee1275_get_integer_property): New function. Wraps around
5504 grub_ieee1275_get_property() to handle endianness.
5506 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5507 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
5509 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5510 (grub_map): Likewise.
5511 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5513 2008-01-15 Bean <bean123ch@gmail.com>
5515 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5516 (grub_script_execute_cmdline): Reset grub_errno.
5518 * normal/main.c (read_config_file): Reset grub_errno.
5520 * normal/parse.y (script_init): New.
5521 (script): Move function and menuentry here.
5523 (command): Add delimiter at the end of command.
5524 (commands): Adjust to match the new command.
5525 (commandblock): Remove grub_script_lexer_record_start.
5526 (menuentry): Add grub_script_lexer_record_start, use the new commands.
5527 (if): Use the new commands.
5529 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5531 2008-01-15 Robert Millan <rmh@aybabtu.com>
5533 * normal/menu.c (run_menu): Move timeout message from here ...
5534 (print_timeout): ... to here.
5535 (run_menu): Use print_timeout() once during initial draw to print
5536 the whole message, and again in every clock tick to update only
5537 the number of seconds.
5539 2008-01-15 Robert Millan <rmh@aybabtu.com>
5541 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5542 actual size of `available' from grub_ieee1275_get_property(), and
5543 restrict parsing to that bound.
5545 2008-01-15 Christian Franke <franke@computer.org>
5547 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5548 (argp_program_version): Remove variable.
5549 (argp_program_bug_address): Likewise.
5550 (options): Convert from struct argp_option to struct option.
5551 (struct arguments): Remove.
5552 (parse_opt): Remove.
5553 (usage): New function.
5554 (main): Replace struct args members by simple variables.
5555 Replace argp_parse() by getopt_long().
5556 Add switch to evaluate options.
5557 Add missing "(...)" around root_dev in prefix string.
5559 2008-01-14 Robert Millan <rmh@aybabtu.com>
5561 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
5562 for grub_ieee1275_exit(), in order to improve portability.
5564 2008-01-14 Robert Millan <rmh@aybabtu.com>
5566 * util/grub.d/10_linux.in (prefix): Define.
5567 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
5569 2008-01-13 Pavel Roskin <proski@gnu.org>
5571 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5572 grub_errno if no errors have been detected.
5574 2008-01-12 Robert Millan <rmh@aybabtu.com>
5576 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5577 (grub_util_get_dev_abstraction): New function prototype.
5579 * util/getroot.c: Include `<grub/util/getroot.h>'
5580 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5581 (grub_util_get_dev_abstraction): ... here (new function).
5583 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5584 `PRINT_ABSTRACTION'.
5585 (probe): Probe for abstraction type when requested.
5586 (main): Understand `--target=abstraction'.
5588 * util/i386/efi/grub-install.in: Add abstraction module to core
5589 image when it is found to be necessary.
5590 * util/i386/pc/grub-install.in: Likewise.
5591 * util/powerpc/ieee1275/grub-install.in: Likewise.
5593 * util/update-grub_lib.in (font_path): Return system path without
5594 converting to GRUB path.
5595 * util/update-grub.in: Convert system path returned by font_path()
5596 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5597 abstraction module is needed for loading fonts (if any). Export
5598 that as `GRUB_PRELOAD_MODULES'.
5599 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5602 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5604 Remove some unused code from reiserfs.
5606 * fs/reiserfs.c (struct grub_reiserfs_key)
5607 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5608 (struct grub_reiserfs_node_body): Removed.
5609 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5611 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5613 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5615 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5617 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5619 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5621 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5622 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5623 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5625 2008-01-10 Robert Millan <rmh@aybabtu.com>
5627 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5628 Determines if a file is garbage left by packaging systems, etc.
5629 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5630 for processing /etc/grub.d scripts.
5631 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5632 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5633 as a condition for processing Linux images.
5635 2008-01-10 Pavel Roskin <proski@gnu.org>
5637 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5638 to compile reiserfs.c on PowerPC.
5640 2008-01-10 Robert Millan <rmh@aybabtu.com>
5642 * kern/device.c (grub_device_iterate): Do not abort device iteration
5643 when one of the devices cannot be opened.
5644 * kern/disk.c (grub_disk_open): Do not account previous failures of
5645 unrelated functions when grub_errno is checked for.
5647 2008-01-08 Robert Millan <rmh@aybabtu.com>
5649 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5650 `! grub_linux_is_bzimage', change order of address comparison to make
5651 it more intuitive, and improve "too big zImage" error message.
5653 2008-01-08 Robert Millan <rmh@aybabtu.com>
5655 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5656 `$(update-grub_DATA)'.
5657 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5660 2008-01-07 Robert Millan <rmh@aybabtu.com>
5662 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5663 which instruction is modified by grub-setup during installation
5664 (since it wasn't obvious by only looking at this file).
5666 2008-01-07 Robert Millan <rmh@aybabtu.com>
5668 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5669 listing actual TODO items.
5671 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5673 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5675 (grub_reiserfs_get_key_offset): Likewise.
5676 (grub_reiserfs_set_key_offset): Likewise.
5677 (grub_reiserfs_set_key_type): Likewise.
5678 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5680 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5681 better to remove the bitfield version completely.
5683 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5685 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5686 allocated from the heap, due to the fshelp implementation.
5687 (grub_reiserfs_dir): Free NODE, due to the same reason.
5689 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5691 Mostly from Vincent Pelletier:
5693 * fs/reiserfs.c: New file.
5695 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5696 (reiserfs_mod_SOURCES): New variable.
5697 (reiserfs_mod_CFLAGS): Likewise.
5698 (reiserfs_mod_LDFLAGS): Likewise.
5700 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5701 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5702 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5705 2008-01-06 Robert Millan <rmh@aybabtu.com>
5707 * normal/color.c: Remove `<grub/env.h>'.
5709 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5711 * include/grub/normal.h: Include <grub/env.h>.
5713 2008-01-05 Robert Millan <rmh@aybabtu.com>
5715 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5716 usage example with `(hd0,1)'.
5717 Reported by Samuel Thibault.
5719 2008-01-05 Robert Millan <rmh@aybabtu.com>
5721 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5722 (grub_linux_boot_zimage): Rename to ...
5723 (grub_linux_boot): ... this.
5724 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5725 (grub_linux_boot_zimage): Conditionalize zImage copy.
5727 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5728 (grub_linux_boot_bzimage): Remove prototype.
5729 (grub_linux_boot_zimage): Rename to ...
5730 (grub_linux_boot): ... this.
5732 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5733 (grub_linux_boot): Remove function.
5735 2008-01-05 Robert Millan <rmh@aybabtu.com>
5737 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5738 (grub_env_write_color_highlight): Likewise.
5739 (grub_wait_after_message): Likewise.
5741 * normal/color.c: New file.
5743 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5744 (normal_mod_DEPENDENCIES): Likewise.
5746 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5747 (normal_mod_DEPENDENCIES): Likewise.
5749 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5750 (normal_mod_DEPENDENCIES): Likewise.
5752 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5753 (normal_mod_DEPENDENCIES): Likewise.
5755 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5756 for waiting after a message is printed.
5757 * normal/main.c (read_config_file): Likewise.
5758 (grub_normal_init): Register grub_env_write_color_normal() and
5759 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5760 `color_highlight' variables as global.
5762 * normal/menu.c (grub_wait_after_message): New function.
5763 (grub_color_menu_normal): New variable. Replaces ...
5764 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5765 (grub_color_menu_highlight): New variable. Replaces ...
5766 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5767 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5768 `GRUB_TERM_COLOR_STANDARD'.
5769 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5770 `normal_code' and `highlight_code' to `old_color_normal' and
5771 `old_color_highlight', respectively.
5772 (grub_menu_init_page): Update colors when drawing the menu, based on
5773 `menu_color_normal' and `menu_color_highlight' variables.
5774 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5775 a message is printed.
5777 2008-01-05 Robert Millan <rmh@aybabtu.com>
5779 * kern/env.c (grub_env_context_open): Propagate hooks for global
5780 variables to new context.
5782 * kern/main.c (grub_set_root_dev): Export `root' variable.
5784 2008-01-05 Robert Millan <rmh@aybabtu.com>
5786 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5787 discs unconditionally, since udev and others have options to provide
5790 2008-01-05 Robert Millan <rmh@aybabtu.com>
5792 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5794 2008-01-04 Christian Franke <franke@computer.org>
5796 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5799 2008-01-03 Pavel Roskin <proski@gnu.org>
5801 * kern/i386/linuxbios/init.c: Put "void" to all function
5802 declarations with no arguments.
5803 * kern/powerpc/ieee1275/init.c: Likewise.
5804 * term/i386/pc/at_keyboard.c: Likewise.
5805 * term/i386/pc/vga_text.c: Likewise.
5806 * util/grub-mkdevicemap.c: Likewise.
5808 2008-01-02 Robert Millan <rmh@aybabtu.com>
5810 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5811 message when loaded image is out of bounds.
5812 (grub_multiboot_load_elf64): Likewise.
5814 2008-01-02 Pavel Roskin <proski@gnu.org>
5816 * util/grub.d/10_linux.in: Try version without ".old" when
5817 looking for initrd. It's better to use initrd from the newer
5818 kernel of the same version than no initrd at all.
5820 2008-01-01 Robert Millan <rmh@aybabtu.com>
5822 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5824 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5826 * include/grub/video.h: Added grub_video_unmap_color and
5827 grub_video_get_active_render_target.
5828 (grub_video_adapter): Added unmap_color and get_active_render_target.
5830 * video/video.c: Added grub_video_unmap_color and
5831 grub_video_get_active_render_target.
5832 (grub_video_get_info): Changed method to accept NULL pointer as an
5833 argument to allow detection of active video adapter.
5835 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5836 grub_video_vbe_unmap_color_int.
5837 Added grub_video_vbe_unmap_color and
5838 grub_video_vbe_get_active_render_target.
5839 (grub_video_vbe_adapter): Added unmap_color and
5840 get_active_render_target.
5842 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5843 with grub_video_vbe_unmap_color_int.
5845 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5846 (DEFAULT_NORMAL_COLOR): Likewise.
5847 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5848 (DEFAULT_FG_COLOR): Removed.
5849 (DEFAULT_BG_COLOR): Likewise.
5850 (DEFAULT_CURSOR_COLOR): Changed value.
5851 (grub_virtual_screen): Added standard_color_setting,
5852 normal_color_setting, highlight_color_setting and term_color.
5853 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5854 (bitmap_width): Added.
5855 (bitmap_height): Likewise.
5857 (set_term_color): Likewise.
5858 (grub_virtual_screen_setup): Changed to use new terminal coloring
5860 (grub_gfxterm_init): Added init for bitmap.
5861 (grub_gfxterm_fini): Added destroy for bitmap.
5862 (redraw_screen_rect): Updated to use background bitmap and new
5864 (scroll_up): Added optimization for case when there is no bitmap.
5865 (grub_gfxterm_cls): Fixed to use correct background color.
5866 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5868 (grub_virtual_screen_setcolor): Likewise.
5869 (grub_virtual_screen_getcolor): Added.
5870 (grub_gfxterm_background_image_cmd): Likewise.
5871 (grub_video_term): Added setcolor and getcolor.
5872 (MOD_INIT): Added registration of background_image command.
5873 (MOD_TERM): Added unregistration for background_image command.
5875 2007-12-30 Pavel Roskin <proski@gnu.org>
5877 * loader/multiboot_loader.c: Fix multiboot command
5878 unregistration. Fix all typos in the word "multiboot".
5880 2007-12-29 Pavel Roskin <proski@gnu.org>
5882 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5883 support for initrd names used in Fedora.
5885 2007-12-26 Bean <bean123ch@gmail.com>
5887 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5888 (cpio_mod_SOURCES): New variable.
5889 (cpio_mod_CFLAGS): Likewise.
5890 (cpio_mod_LDFLAGS): Likewise.
5892 * fs/cpio.c: New file.
5894 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5896 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5898 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5900 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5902 2007-12-25 Robert Millan <rmh@aybabtu.com>
5904 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5905 (grub_getcolor): New function.
5907 * kern/term.c (grub_getcolor): New function.
5908 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5909 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5910 (print_entry): Set normal and highlight colors to
5911 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5912 respectively, before printing and restore them to old
5914 (grub_menu_init_page): Likewise. Fill an additional colored space
5915 that would otherwise be left blank.
5917 * term/efi/console.c (grub_console_getcolor): New function.
5918 (struct grub_console_term.getcolor): New variable.
5919 * term/i386/pc/console.c (grub_console_getcolor): New function.
5920 (struct grub_console_term.getcolor): New variable.
5921 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5922 (struct grub_console_term.getcolor): New variable.
5924 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5925 (struct grub_console_term.setcolor): Remove variable.
5926 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5927 (struct grub_console_term.setcolor): Remove variable.
5928 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5929 (struct grub_console_term.setcolor): Remove variable.
5930 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5931 (struct grub_console_term.setcolor): Remove variable.
5933 2007-12-25 Robert Millan <rmh@aybabtu.com>
5935 * configure.ac: Search for possible unifont.hex locations, and
5936 define UNIFONT_HEX if found.
5938 * Makefile.in (UNIFONT_HEX): Define variable.
5939 (DATA): Rename to ...
5940 (PKGLIB): ... this. Update all users.
5941 (PKGDATA): New variable.
5942 (pkgdata_IMAGES): Rename to ...
5943 (pkglib_IMAGES): ... this. Update all users.
5944 (pkgdata_MODULES): Rename to ...
5945 (pkglib_MODULES): ... this. Update all users.
5946 (pkgdata_PROGRAMS): Rename to ...
5947 (pkglib_PROGRAMS): ... this. Update all users.
5948 (pkgdata_DATA): Rename to ...
5949 (pkglib_DATA): ... this. Update all users.
5950 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5951 (unicode.pff, ascii.pff): New rules.
5952 (all-local): Add `$(PKGDATA)' dependency.
5953 (install-local): Process `$(PKGDATA)'.
5955 * util/update-grub_lib.in (font_path): Search for *.pff files in
5956 a few more locations, including `${pkgdata}'.
5958 2007-12-23 Robert Millan <rmh@aybabtu.com>
5960 Patch from Bean <bean123ch@gmail.com>:
5961 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5964 2007-12-21 Bean <bean123ch@gmail.com>
5966 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5967 (ntfscomp_mod_SOURCES): New variable.
5968 (ntfscomp_mod_CFLAGS): Likewise.
5969 (ntfscomp_mod_LDFLAGS): Likewise.
5971 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5972 (grub_probe_SOURCES): Likewise.
5973 (grub_emu_SOURCES): Likewise.
5975 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5976 (grub_emu_SOURCES): Likewise.
5978 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5979 (grub_emu_SOURCES): Likewise.
5981 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5982 (grub_emu_SOURCES): Likewise.
5984 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5985 (read_run_list): Renamed to grub_ntfs_read_run_list.
5986 (decomp_nextvcn): Moved to ntfscomp.c.
5987 (decomp_getch): Likewise.
5988 (decomp_get16): Likewise.
5989 (decomp_block): Likewise.
5990 (read_block): Likewise.
5991 (read_data): Partially moved to ntfscomp.c.
5992 (fixup): Change unsigned to grub_uint16_t.
5993 (read_mft): Change unsigned long to grub_uint32_t.
5994 (read_attr): Likewise.
5995 (read_data): Likewise.
5996 (read_run_data): Likewise.
5997 (read_run_list): Likewise.
5998 (read_mft): Likewise.
6000 * fs/ntfscomp.c: New file.
6002 * include/grub/ntfs.h: New file.
6004 2007-12-16 Robert Millan <rmh@aybabtu.com>
6006 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6007 IDE disk check, since Linux is known to support 20 IDE disks.
6008 Reported by Colin Watson.
6010 2007-12-15 Bean <bean123ch@gmail.com>
6012 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6013 (lnxboot_img_SOURCES): New variable.
6014 (lnxboot_img_ASFLAGS): Likewise.
6015 (lnxboot_img_LDFLAGS): Likewise.
6017 * boot/i386/pc/lnxboot.S: New file.
6019 2007-11-24 Pavel Roskin <proski@gnu.org>
6021 * configure.ac: Test if '--build-id=none' is supported by the
6022 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6023 objcopy to generate incorrect binary files (binutils
6024 2.17.50.0.18-1 as shipped by Fedora 8).
6025 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6026 linking, so that build ID doesn't break the test.
6028 2007-11-24 Pavel Roskin <proski@gnu.org>
6030 * include/grub/i386/time.h: use "void" in the argument list
6032 * include/grub/powerpc/time.h: Likewise.
6033 * include/grub/sparc64/time.h: Likewise.
6035 2007-11-18 Christian Franke <franke@computer.org>
6037 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6038 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6039 This fixes the problem that function keys did not work in grub-emu.
6041 2007-11-18 Christian Franke <franke@computer.org>
6043 * disk/host.c (grub_host_open): Remove attribute unused from
6044 name parameter. Add check for "host". This fixes the problem
6045 that grub-emu does not find partitions.
6047 2007-11-18 Christian Franke <franke@computer.org>
6049 * util/hostfs.c (is_dir): New function.
6050 (grub_hostfs_dir): Handle missing dirent.d_type case.
6051 (grub_hostfs_read): Add missing fseek().
6052 (grub_hostfs_label): Clear label pointer. This fixes a crash
6053 of grub-emu on "ls (host)".
6055 2007-11-18 Christian Franke <franke@computer.org>
6057 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6058 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6059 to 64 bit boundary by default.
6061 2007-11-18 Bean <bean123ch@gmail.com>
6063 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6064 (hexdump_mod_SOURCES): New variable.
6065 (hexdump_mod_CFLAGS): Likewise.
6066 (hexdump_mod_LDFLAGS): Likewise.
6068 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6070 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6072 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6074 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6076 * include/grub/hexdump.h: New file.
6078 * commands/hexdump.c: New file.
6080 2007-11-10 Robert Millan <rmh@aybabtu.com>
6082 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6083 in grub_outb() calls.
6084 (beep_on): Likewise.
6086 2007-11-10 Christian Franke <franke@computer.org>
6088 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6089 (grub_menu_run): Likewise.
6091 2007-11-10 Robert Millan <rmh@aybabtu.com>
6093 * include/grub/i386/efi/machine.h: New file.
6094 * include/grub/i386/linuxbios/machine.h: Likewise.
6095 * include/grub/i386/pc/machine.h: Likewise.
6096 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6097 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6099 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6100 (serial_hw_io_addr): New variable.
6101 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6102 instead of `(unsigned short *) 0x400'.
6104 2007-11-10 Bean <bean123ch@gmail.com>
6106 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6108 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6110 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6111 (vga_mod_SOURCES): Added.
6112 (vga_mod_CFLAGS): Likewise.
6113 (vga_mod_LDFLAGS): Likewise.
6115 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6117 (set_map_mask): Likewise.
6118 (set_read_map): Likewise.
6119 (set_read_address): Likewise.
6120 (vga_font): Removed variable.
6121 (get_vga_glyph): Removed function.
6122 (invalidate_char): Likewise.
6123 (write_char): Changed to use grub_font_get_glyph() for font
6125 (grub_vga_putchar): Likewise.
6126 (grub_vga_getcharwidth): Likewise.
6128 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6130 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6132 (pxeboot_img_LDFLAGS): Likewise.
6133 (diskboot_img_LDFLAGS): Likewise.
6134 (kernel_img_LDFLAGS): Likewise.
6136 2007-11-06 Robert Millan <rmh@aybabtu.com>
6138 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6139 in grub_outb() calls.
6140 (serial_hw_init): Likewise.
6142 2007-11-05 Robert Millan <rmh@aybabtu.com>
6144 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6145 spaces. Skip non-regular files.
6147 2007-11-05 Robert Millan <rmh@aybabtu.com>
6149 * kern/disk.c (grub_disk_firmware_fini)
6150 (grub_disk_firmware_is_tainted): New variables.
6152 * include/grub/disk.h (grub_disk_firmware_fini)
6153 (grub_disk_firmware_is_tainted): Likewise.
6155 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6156 (grub_disk_biosdisk_fini): ... to here.
6157 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6158 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6159 is set. Register grub_disk_biosdisk_fini() in
6160 `grub_disk_firmware_fini'.
6162 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6163 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6164 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6165 to finish existing firmware disk interface.
6167 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6168 (ata_mod_SOURCES): New variable.
6169 (ata_mod_CFLAGS): Likewise.
6170 (ata_mod_LDFLAGS): Likewise.
6172 2007-11-05 Robert Millan <rmh@aybabtu.com>
6174 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6175 (grub_ata_wait): Reimplement using grub_millisleep().
6177 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6178 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6180 2007-11-03 Marco Gerards <marco@gnu.org>
6182 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6183 (CRTC_ADDR_PORT): New macro.
6184 (CRTC_DATA_PORT): Likewise.
6185 (CRTC_CURSOR): Likewise.
6186 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6187 (CRTC_CURSOR_ADDR_LOW): Likewise.
6188 (update_cursor): New function.
6189 (grub_console_real_putchar): Call `update_cursor'.
6190 (grub_console_gotoxy): Likewise.
6191 (grub_console_cls): Set the default color when clearing the
6193 (grub_console_setcursor): Implemented.
6195 2007-11-03 Marco Gerards <marco@gnu.org>
6197 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6199 (grub_ata_pio_write): Likewise.
6201 (grub_atapi_identify): Wait after issuing an ATA command.
6202 (grub_atapi_packet): Likewise.
6203 (grub_ata_identify): Likewise.
6204 (grub_ata_readwrite): Likewise.
6206 2007-11-03 Marco Gerards <marco@gnu.org>
6208 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6209 (grub_ata_pio_write): Likewise.
6210 (grub_ata_readwrite): Use `grub_error', instead of
6211 returning `grub_errno'.
6213 2007-11-03 Marco Gerards <marco@gnu.org>
6215 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6216 grub_ata_pio_write once for every single sector, instead of for
6219 2007-10-31 Robert Millan <rmh@aybabtu.com>
6221 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6223 * conf/i386-linuxbios.rmk: New file.
6225 * kern/i386/pc/hardware.c: Likewise.
6226 * term/i386/pc/at_keyboard.c: Likewise.
6227 * term/i386/pc/vga_text.c: Likewise.
6229 * include/grub/i386/linuxbios/boot.h: Likewise.
6230 * include/grub/i386/linuxbios/console.h: Likewise.
6231 * include/grub/i386/linuxbios/init.h: Likewise.
6232 * include/grub/i386/linuxbios/kernel.h: Likewise.
6233 * include/grub/i386/linuxbios/loader.h: Likewise.
6234 * include/grub/i386/linuxbios/memory.h: Likewise.
6235 * include/grub/i386/linuxbios/serial.h: Likewise.
6236 * include/grub/i386/linuxbios/time.h: Likewise.
6238 * kern/i386/linuxbios/init.c: Likewise.
6239 * kern/i386/linuxbios/startup.S: Likewise.
6240 * kern/i386/linuxbios/table.c: Likewise.
6242 2007-10-31 Marco Gerards <marco@gnu.org>
6244 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6245 (ata_mod_SOURCES): New variable.
6246 (ata_mod_CFLAGS): Likewise.
6247 (ata_mod_LDFLAGS): Likewise.
6249 * disk/ata.c: New file.
6251 * include/grub/disk.h (grub_disk_dev_id): Add
6252 `GRUB_DISK_DEV_ATA_ID'.
6254 2007-10-31 Robert Millan <rmh@aybabtu.com>
6256 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6257 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6259 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6260 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6262 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6265 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6267 2007-10-27 Robert Millan <rmh@aybabtu.com>
6269 * include/grub/types.h (ULONG_MAX): Define macro.
6271 2007-10-22 Robert Millan <rmh@aybabtu.com>
6273 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6275 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6277 2007-10-22 Robert Millan <rmh@aybabtu.com>
6279 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6280 (pkgdata_MODULES): Add `biosdisk.mod'.
6281 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6284 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6285 (grub_biosdisk_init): Replace with ...
6286 (GRUB_MOD_INIT(biosdisk)): ... this.
6287 (grub_biosdisk_fini): Replace with ...
6288 (GRUB_MOD_FINI(biosdisk)): ... this.
6290 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6291 (grub_machine_init): Remove call to grub_biosdisk_init().
6292 (grub_machine_fini): Remove call to grub_machine_fini().
6294 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6296 2007-10-22 Robert Millan <rmh@aybabtu.com>
6298 * include/grub/time.h: New file.
6299 * include/grub/i386/time.h: Likewise.
6300 * include/grub/powerpc/time.h: Likewise.
6301 * include/grub/sparc64/time.h: Likewise.
6303 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6305 (KERNEL_MACHINE_TIME_HEADER): ... this.
6306 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6308 (KERNEL_MACHINE_TIME_HEADER): ... this.
6309 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6311 (KERNEL_MACHINE_TIME_HEADER): ... this.
6313 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6314 (grub_millisleep): New function.
6315 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6316 (grub_millisleep): New function.
6317 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6318 Remove `grub/machine/time.h' include.
6319 (grub_millisleep): New function.
6320 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6321 Remove `grub/machine/time.h' include.
6322 (grub_millisleep): New function.
6324 * include/grub/misc.h (grub_div_roundup): New function.
6326 * kern/misc.c: Include `<grub/time.h>'.
6327 (grub_millisleep_generic): New function.
6329 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6331 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6333 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6334 `machine/time.h'. Add `time.h'.
6335 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6337 2007-10-21 Robert Millan <rmh@aybabtu.com>
6339 * include/grub/misc.h (grub_max): New function.
6341 2007-10-21 Robert Millan <rmh@aybabtu.com>
6343 * util/misc.c (grub_util_info): Call fflush() before returning.
6345 2007-10-20 Robert Millan <rmh@aybabtu.com>
6347 * genmk.rb (Image): Copy `extra_flags' from here ...
6348 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6350 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6351 to `argc' and `args' arguments.
6353 2007-10-17 Robert Millan <rmh@aybabtu.com>
6355 * kern/i386/loader.S: New file.
6357 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6358 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6359 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6360 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6361 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6362 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6363 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6364 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6365 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6366 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6367 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6368 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6369 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6370 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6372 * kern/i386/realmode.S: New file.
6374 * kern/i386/pc/startup.S (protstack): Moved from here ...
6375 * kern/i386/realmode.S (protstack)... to here.
6376 * kern/i386/pc/startup.S (gdt): Moved from here ...
6377 * kern/i386/realmode.S (gdt)... to here.
6378 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6379 * kern/i386/realmode.S (prot_to_real)... to here.
6381 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6382 `kern/i386/realmode.S'.
6384 2007-10-17 Robert Millan <rmh@aybabtu.com>
6386 * include/grub/i386/loader.h: New file.
6388 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6389 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6390 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6391 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6392 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6393 * include/grub/i386/loader.h (grub_linux_prot_size)
6394 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6395 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6396 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6397 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6399 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6401 2007-10-15 Robert Millan <rmh@aybabtu.com>
6403 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6404 filesystem when dev->disk is unset.
6405 Do probe for filesystem even when dev->disk->has_partitions is set.
6406 In case a filesystem is found, always report it.
6407 In case it isn't, if dev->disk->has_partitions is set, report that
6408 a partition table was found instead of reporting that no filesystem
6409 could be identified.
6411 2007-10-12 Robert Millan <rmh@aybabtu.com>
6413 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6414 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6416 * include/grub/types.h (grub_host_to_target16): New macro.
6417 (grub_host_to_target32): Likewise.
6418 (grub_host_to_target64): Likewise.
6419 (grub_target_to_host16): Likewise.
6420 (grub_target_to_host32): Likewise.
6421 (grub_target_to_host64): Likewise.
6423 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6425 (GRUB_MOD_ALIGN): ...this. Update all users.
6427 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6428 grub_host_to_target32.
6429 Replace grub_be_to_cpu32 with grub_target_to_host32.
6430 (load_modules): Likewise.
6431 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6432 Replace grub_be_to_cpu32 with grub_target_to_host32.
6433 Replace grub_cpu_to_be16 with grub_host_to_target16.
6434 Replace grub_cpu_to_be32 grub_host_to_target32.
6436 2007-10-12 Robert Millan <rmh@aybabtu.com>
6438 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6439 * util/elf/grub-mkimage.c: ... here.
6441 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6442 `util/powerpc/ieee1275/grub-mkimage.c'.
6444 2007-10-07 Robert Millan <rmh@aybabtu.com>
6446 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6447 and make it easier to figure out.
6448 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6449 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6450 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6451 leave us with less than HEAP_MIN_SIZE total heap.
6452 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
6454 2007-10-03 Robert Millan <rmh@aybabtu.com>
6456 * include/grub/i386/io.h: New file.
6457 * commands/i386/pc/play.c (inb): Removed.
6459 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6461 * term/i386/pc/serial.c (inb): Removed.
6463 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6465 * term/i386/pc/vga.c (inb): Removed.
6467 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6470 2007-10-02 Robert Millan <rmh@aybabtu.com>
6472 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6473 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6474 Reported by Marcin Kurek.
6476 2007-09-07 Robert Millan <rmh@aybabtu.com>
6478 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6479 SmartFirmware version updates (as released by Sven Luther), and avoid
6480 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6481 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6484 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6487 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6488 when merging two regions.
6490 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6492 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6493 * normal/completion.c (grub_normal_do_completion): Likewise.
6494 Reported by Hitoshi Ozeki.
6496 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6498 Do not use devices at boot in chainloading.
6500 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6501 (boot_part_addr): Likewise.
6502 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6503 with BOOT_DRIVE and BOOT_PART_ADDR.
6504 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6505 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6507 2007-08-29 Robert Millan <rmh@aybabtu.com>
6509 Patch from Simon Peter <dn.tlp@gmx.net>:
6510 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6511 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6512 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6513 util/i386/pc/grub-setup.c_DEPENDENCIES.
6514 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6515 util/grub-probe.c_DEPENDENCIES.
6516 * conf/powerpc-ieee1275.rmk: Likewise.
6518 2007-08-28 Robert Millan <rmh@aybabtu.com>
6520 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6521 to tell grub-mkdevicemap how to name devices.
6522 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6525 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6526 util/i386/get_disk_name.c.
6527 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6528 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6529 util/ieee1275/get_disk_name.c.
6531 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6533 * DISTLIST: Add util/i386/get_disk_name.c and
6534 util/ieee1275/get_disk_name.c.
6536 * util/grub-mkdevicemap.c: Replace device naming logic with
6537 grub_util_get_disk_name() calls.
6539 2007-08-20 Robert Millan <rmh@aybabtu.com>
6541 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6542 (so that it works for both plural and singular quantities).
6544 2007-08-05 Robert Millan <rmh@aybabtu.com>
6546 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6547 so that [xz] isn't taken into account when determining order.
6549 2007-08-02 Marco Gerards <marco@gnu.org>
6551 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6552 `include/multiboot2.h', `include/grub/elfload.h',
6553 `include/multiboot.h', `include/grub/multiboot.h',
6554 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6555 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6556 `kern/elf.c', `loader/multiboot_loader.c',
6557 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6558 `loader/i386/pc/multiboot2.c',
6559 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6560 `util/i386/pc/grub-mkrescue.in'. Remove
6561 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
6562 `include/grub/i386/pc/util/biosdisk.h' and
6563 `include/grub/powerpc/ieee1275/multiboot.h'.
6565 2007-08-02 Bean <bean123ch@gmail.com>
6567 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6568 (ntfs_mod_SOURCES): New variable.
6569 (ntfs_mod_CFLAGS): Likewise.
6570 (ntfs_mod_LDFLAGS): Likewise.
6572 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6573 (grub_probe_SOURCES): Likewise.
6574 (grub_emu_SOURCES): Likewise.
6576 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6577 (grub_emu_SOURCES): Likewise.
6579 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6580 (grub_emu_SOURCES): Likewise.
6582 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6584 * fs/ntfs.c: New file.
6586 2007-08-02 Bean <bean123ch@gmail.com>
6588 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6590 * file.h (grub_file): Likewise.
6592 * fshelp.h (grub_fshelp_read_file): Likewise.
6594 * util/i386/pc/grub-setup.c (setup): Likewise.
6595 (save_first_sector): Likewise.
6596 (save_blocklists): Likewise.
6598 * fs/affs.c (grub_affs_read_file): Likewise.
6600 * fs/ext2.c (grub_ext2_read_file): Likewise.
6602 * fs/fat.c (grub_fat_read_data): Likewise.
6604 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6606 * fs/hfs.c (grub_hfs_read_file): Likewise.
6608 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6610 * fs/jfs.c (grub_jfs_read_file): Likewise.
6612 * fs/minix.c (grub_minix_read_file): Likewise.
6614 * fs/sfs.c (grub_sfs_read_file): Likewise.
6616 * fs/ufs.c (grub_ufs_read_file): Likewise.
6618 * fs/xfs.c (grub_xfs_read_file): Likewise.
6620 * command/blocklist.c (read_blocklist): Likewise.
6621 (print_blocklist): Likewise.
6623 2007-08-02 Marco Gerards <marco@gnu.org>
6625 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6628 * disk/host.c: New file.
6630 * util/hostfs.c: Likewise.
6632 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6633 return `GRUB_ERR_BAD_FS'.
6634 * fs/sfs.c (grub_sfs_mount): Likewise.
6635 * fs/xfs.c (grub_xfs_mount): Likewise.
6637 * include/grub/disk.h (enum grub_disk_dev_id): Add
6638 `GRUB_DISK_DEVICE_HOST_ID'.
6640 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6642 2007-07-24 Jerone Young <jerone@gmail.com>
6644 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6645 modules for compilation.
6646 * conf/powerpc-ieee1275.rmk: Likewise.
6648 * include/multiboot.h: Move multiboot definitions to one file. Rename
6649 many definitions to not get grub specific.
6650 * include/multiboot2.h: Create header with multiboot 2 definitions.
6651 * include/grub/multiboot.h: Header for grub specific function
6652 prototypes and definitions.
6653 * include/grub/multiboot2.h: Likewise.
6654 * include/grub/multiboot_loader.h: Likewise.
6655 * include/grub/i386/pc/multiboot.h: Removed.
6656 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6658 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6659 and 2 to allow for one multiboot and module commands.
6660 * loader/multiboot2.c: Add multiboot2 functionality.
6661 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6662 and definition names.
6663 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6665 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6666 ieee1275 specific multiboot2 code.
6668 * kern/i386/pc/startup.S: Change headers and definition names for
6669 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6671 2007-07-22 Robert Millan <rmh@aybabtu.com>
6673 * geninitheader.sh: Process file specified in first parameter rather
6674 than hardcoding grub_modules_init.lst.
6675 * geninit.sh: Likewise. Also, construct header name dynamically rather
6676 than hardcoding grub_modules_init.h.
6678 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6679 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6680 grub_probe_init.[ch] and grub_setup_init.[ch].
6682 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6683 grub_modules_init.h with grub_emu_init.h.
6684 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6685 grub_probe_init.[ch] files.
6686 * conf/i386-efi.rmk: Likewise.
6687 * conf/i386-pc.rmk: Likewise.
6688 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6689 grub_setup_init.[ch] files.
6691 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6692 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6693 to initialize modules rather than a list of hardcoded functions.
6694 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6695 grub_init_all() to initialize modules rather than a list of hardcoded
6698 2007-07-22 Robert Millan <rmh@aybabtu.com>
6700 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6701 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6703 2007-07-22 Robert Millan <rmh@aybabtu.com>
6705 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6706 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6707 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6708 flag when running on SmartFirmware.
6709 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6710 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6713 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6714 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6715 rather than decreasing it.
6717 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6718 there's not enough space to do it, fail in the same way as when it
6719 can't be done because there are no partitions.
6721 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6722 when nvsetenv failed.
6724 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6726 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6727 because this rule is automatically generated.
6728 (grub-mkrescue): Removed for the same reason as above.
6730 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6732 Migrate to GNU General Public License Version 3.
6734 * COPYING: Replaced with the plain text version of GPLv3.
6736 * config.guess: Updated from gnulib.
6737 * config.sub: Likewise.
6739 * geninit.sh: Output a GPLv3 copyright notice.
6740 * geninitheader.sh: Likewise.
6741 * genmodsrc.sh: Likewise.
6742 * gensymlist.sh.in: Likewise.
6744 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6745 * boot/i386/pc/diskboot.S: Likewise.
6746 * boot/i386/pc/pxeboot.S: Likewise.
6747 * commands/blocklist.c: Likewise.
6748 * commands/boot.c: Likewise.
6749 * commands/cat.c: Likewise.
6750 * commands/cmp.c: Likewise.
6751 * commands/configfile.c: Likewise.
6752 * commands/echo.c: Likewise.
6753 * commands/help.c: Likewise.
6754 * commands/ls.c: Likewise.
6755 * commands/search.c: Likewise.
6756 * commands/terminal.c: Likewise.
6757 * commands/test.c: Likewise.
6758 * commands/videotest.c: Likewise.
6759 * commands/i386/cpuid.c: Likewise.
6760 * commands/i386/pc/halt.c: Likewise.
6761 * commands/i386/pc/play.c: Likewise.
6762 * commands/i386/pc/reboot.c: Likewise.
6763 * commands/i386/pc/vbeinfo.c: Likewise.
6764 * commands/i386/pc/vbetest.c: Likewise.
6765 * commands/ieee1275/halt.c: Likewise.
6766 * commands/ieee1275/reboot.c: Likewise.
6767 * commands/ieee1275/suspend.c: Likewise.
6768 * disk/loopback.c: Likewise.
6769 * disk/lvm.c: Likewise.
6770 * disk/raid.c: Likewise.
6771 * disk/efi/efidisk.c: Likewise.
6772 * disk/i386/pc/biosdisk.c: Likewise.
6773 * disk/ieee1275/ofdisk.c: Likewise.
6774 * font/manager.c: Likewise.
6775 * fs/affs.c: Likewise.
6776 * fs/ext2.c: Likewise.
6777 * fs/fat.c: Likewise.
6778 * fs/fshelp.c: Likewise.
6779 * fs/hfs.c: Likewise.
6780 * fs/hfsplus.c: Likewise.
6781 * fs/iso9660.c: Likewise.
6782 * fs/jfs.c: Likewise.
6783 * fs/minix.c: Likewise.
6784 * fs/sfs.c: Likewise.
6785 * fs/ufs.c: Likewise.
6786 * fs/xfs.c: Likewise.
6787 * hello/hello.c: Likewise.
6788 * include/grub/acorn_filecore.h: Likewise.
6789 * include/grub/arg.h: Likewise.
6790 * include/grub/bitmap.h: Likewise.
6791 * include/grub/boot.h: Likewise.
6792 * include/grub/cache.h: Likewise.
6793 * include/grub/device.h: Likewise.
6794 * include/grub/disk.h: Likewise.
6795 * include/grub/dl.h: Likewise.
6796 * include/grub/elfload.h: Likewise.
6797 * include/grub/env.h: Likewise.
6798 * include/grub/err.h: Likewise.
6799 * include/grub/file.h: Likewise.
6800 * include/grub/font.h: Likewise.
6801 * include/grub/fs.h: Likewise.
6802 * include/grub/fshelp.h: Likewise.
6803 * include/grub/gzio.h: Likewise.
6804 * include/grub/hfs.h: Likewise.
6805 * include/grub/kernel.h: Likewise.
6806 * include/grub/loader.h: Likewise.
6807 * include/grub/lvm.h: Likewise.
6808 * include/grub/misc.h: Likewise.
6809 * include/grub/mm.h: Likewise.
6810 * include/grub/net.h: Likewise.
6811 * include/grub/normal.h: Likewise.
6812 * include/grub/parser.h: Likewise.
6813 * include/grub/partition.h: Likewise.
6814 * include/grub/pc_partition.h: Likewise.
6815 * include/grub/raid.h: Likewise.
6816 * include/grub/rescue.h: Likewise.
6817 * include/grub/script.h: Likewise.
6818 * include/grub/setjmp.h: Likewise.
6819 * include/grub/symbol.h: Likewise.
6820 * include/grub/term.h: Likewise.
6821 * include/grub/terminfo.h: Likewise.
6822 * include/grub/tparm.h: Likewise.
6823 * include/grub/types.h: Likewise.
6824 * include/grub/video.h: Likewise.
6825 * include/grub/efi/api.h: Likewise.
6826 * include/grub/efi/chainloader.h: Likewise.
6827 * include/grub/efi/console.h: Likewise.
6828 * include/grub/efi/console_control.h: Likewise.
6829 * include/grub/efi/disk.h: Likewise.
6830 * include/grub/efi/efi.h: Likewise.
6831 * include/grub/efi/pe32.h: Likewise.
6832 * include/grub/efi/time.h: Likewise.
6833 * include/grub/i386/linux.h: Likewise.
6834 * include/grub/i386/setjmp.h: Likewise.
6835 * include/grub/i386/types.h: Likewise.
6836 * include/grub/i386/efi/kernel.h: Likewise.
6837 * include/grub/i386/efi/loader.h: Likewise.
6838 * include/grub/i386/efi/time.h: Likewise.
6839 * include/grub/i386/pc/biosdisk.h: Likewise.
6840 * include/grub/i386/pc/boot.h: Likewise.
6841 * include/grub/i386/pc/chainloader.h: Likewise.
6842 * include/grub/i386/pc/console.h: Likewise.
6843 * include/grub/i386/pc/init.h: Likewise.
6844 * include/grub/i386/pc/kernel.h: Likewise.
6845 * include/grub/i386/pc/loader.h: Likewise.
6846 * include/grub/i386/pc/memory.h: Likewise.
6847 * include/grub/i386/pc/multiboot.h: Likewise.
6848 * include/grub/i386/pc/serial.h: Likewise.
6849 * include/grub/i386/pc/time.h: Likewise.
6850 * include/grub/i386/pc/vbe.h: Likewise.
6851 * include/grub/i386/pc/vbeblit.h: Likewise.
6852 * include/grub/i386/pc/vbefill.h: Likewise.
6853 * include/grub/i386/pc/vbeutil.h: Likewise.
6854 * include/grub/i386/pc/vga.h: Likewise.
6855 * include/grub/ieee1275/ieee1275.h: Likewise.
6856 * include/grub/ieee1275/ofdisk.h: Likewise.
6857 * include/grub/powerpc/libgcc.h: Likewise.
6858 * include/grub/powerpc/setjmp.h: Likewise.
6859 * include/grub/powerpc/types.h: Likewise.
6860 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6861 * include/grub/powerpc/ieee1275/console.h: Likewise.
6862 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6863 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6864 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6865 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6866 * include/grub/powerpc/ieee1275/time.h: Likewise.
6867 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6868 * include/grub/sparc64/libgcc.h: Likewise.
6869 * include/grub/sparc64/setjmp.h: Likewise.
6870 * include/grub/sparc64/types.h: Likewise.
6871 * include/grub/sparc64/ieee1275/console.h: Likewise.
6872 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6873 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6874 * include/grub/sparc64/ieee1275/time.h: Likewise.
6875 * include/grub/util/biosdisk.h: Likewise.
6876 * include/grub/util/getroot.h: Likewise.
6877 * include/grub/util/lvm.h: Likewise.
6878 * include/grub/util/misc.h: Likewise.
6879 * include/grub/util/raid.h: Likewise.
6880 * include/grub/util/resolve.h: Likewise.
6881 * io/gzio.c: Likewise.
6882 * kern/device.c: Likewise.
6883 * kern/disk.c: Likewise.
6884 * kern/dl.c: Likewise.
6885 * kern/elf.c: Likewise.
6886 * kern/env.c: Likewise.
6887 * kern/err.c: Likewise.
6888 * kern/file.c: Likewise.
6889 * kern/fs.c: Likewise.
6890 * kern/loader.c: Likewise.
6891 * kern/main.c: Likewise.
6892 * kern/misc.c: Likewise.
6893 * kern/mm.c: Likewise.
6894 * kern/parser.c: Likewise.
6895 * kern/partition.c: Likewise.
6896 * kern/rescue.c: Likewise.
6897 * kern/term.c: Likewise.
6898 * kern/efi/efi.c: Likewise.
6899 * kern/efi/init.c: Likewise.
6900 * kern/efi/mm.c: Likewise.
6901 * kern/i386/dl.c: Likewise.
6902 * kern/i386/efi/init.c: Likewise.
6903 * kern/i386/efi/startup.S: Likewise.
6904 * kern/i386/pc/init.c: Likewise.
6905 * kern/i386/pc/lzo1x.S: Likewise.
6906 * kern/i386/pc/startup.S: Likewise.
6907 * kern/ieee1275/ieee1275.c: Likewise.
6908 * kern/powerpc/cache.S: Likewise.
6909 * kern/powerpc/dl.c: Likewise.
6910 * kern/powerpc/ieee1275/cmain.c: Likewise.
6911 * kern/powerpc/ieee1275/crt0.S: Likewise.
6912 * kern/powerpc/ieee1275/init.c: Likewise.
6913 * kern/powerpc/ieee1275/openfw.c: Likewise.
6914 * kern/sparc64/cache.S: Likewise.
6915 * kern/sparc64/dl.c: Likewise.
6916 * kern/sparc64/ieee1275/init.c: Likewise.
6917 * kern/sparc64/ieee1275/openfw.c: Likewise.
6918 * loader/efi/chainloader.c: Likewise.
6919 * loader/efi/chainloader_normal.c: Likewise.
6920 * loader/i386/efi/linux.c: Likewise.
6921 * loader/i386/efi/linux_normal.c: Likewise.
6922 * loader/i386/pc/chainloader.c: Likewise.
6923 * loader/i386/pc/chainloader_normal.c: Likewise.
6924 * loader/i386/pc/linux.c: Likewise.
6925 * loader/i386/pc/linux_normal.c: Likewise.
6926 * loader/i386/pc/multiboot.c: Likewise.
6927 * loader/i386/pc/multiboot_normal.c: Likewise.
6928 * loader/powerpc/ieee1275/linux.c: Likewise.
6929 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6930 * normal/arg.c: Likewise.
6931 * normal/cmdline.c: Likewise.
6932 * normal/command.c: Likewise.
6933 * normal/completion.c: Likewise.
6934 * normal/execute.c: Likewise.
6935 * normal/function.c: Likewise.
6936 * normal/lexer.c: Likewise.
6937 * normal/main.c: Likewise.
6938 * normal/menu.c: Likewise.
6939 * normal/menu_entry.c: Likewise.
6940 * normal/misc.c: Likewise.
6941 * normal/parser.y: Likewise.
6942 * normal/script.c: Likewise.
6943 * normal/i386/setjmp.S: Likewise.
6944 * normal/powerpc/setjmp.S: Likewise.
6945 * normal/sparc64/setjmp.S: Likewise.
6946 * partmap/acorn.c: Likewise.
6947 * partmap/amiga.c: Likewise.
6948 * partmap/apple.c: Likewise.
6949 * partmap/gpt.c: Likewise.
6950 * partmap/pc.c: Likewise.
6951 * partmap/sun.c: Likewise.
6952 * term/gfxterm.c: Likewise.
6953 * term/terminfo.c: Likewise.
6954 * term/efi/console.c: Likewise.
6955 * term/i386/pc/console.c: Likewise.
6956 * term/i386/pc/serial.c: Likewise.
6957 * term/i386/pc/vesafb.c: Likewise.
6958 * term/i386/pc/vga.c: Likewise.
6959 * term/ieee1275/ofconsole.c: Likewise.
6960 * util/biosdisk.c: Likewise.
6961 * util/console.c: Likewise.
6962 * util/genmoddep.c: Likewise.
6963 * util/getroot.c: Likewise.
6964 * util/grub-emu.c: Likewise.
6965 * util/grub-mkdevicemap.c: Likewise.
6966 * util/grub-probe.c: Likewise.
6967 * util/lvm.c: Likewise.
6968 * util/misc.c: Likewise.
6969 * util/raid.c: Likewise.
6970 * util/resolve.c: Likewise.
6971 * util/update-grub.in: Likewise.
6972 * util/update-grub_lib.in: Likewise.
6973 * util/grub.d/00_header.in: Likewise.
6974 * util/grub.d/10_hurd.in: Likewise.
6975 * util/grub.d/10_linux.in: Likewise.
6976 * util/i386/efi/grub-install.in: Likewise.
6977 * util/i386/efi/grub-mkimage.c: Likewise.
6978 * util/i386/pc/grub-install.in: Likewise.
6979 * util/i386/pc/grub-mkimage.c: Likewise.
6980 * util/i386/pc/grub-mkrescue.in: Likewise.
6981 * util/i386/pc/grub-setup.c: Likewise.
6982 * util/i386/pc/misc.c: Likewise.
6983 * util/powerpc/ieee1275/grub-install.in: Likewise.
6984 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6985 * util/powerpc/ieee1275/misc.c: Likewise.
6986 * video/bitmap.c: Likewise.
6987 * video/video.c: Likewise.
6988 * video/i386/pc/vbe.c: Likewise.
6989 * video/i386/pc/vbeblit.c: Likewise.
6990 * video/i386/pc/vbefill.c: Likewise.
6991 * video/i386/pc/vbeutil.c: Likewise.
6992 * video/readers/tga.c: Likewise.
6994 2007-07-02 Robert Millan <rmh@aybabtu.com>
6996 * conf/i386-efi.rmk: Replace obsolete reference to
6997 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6998 with util/getroot.c.
6999 * conf/powerpc-ieee1275.rmk: Likewise.
7000 * conf/sparc64-ieee1275.rmk: Likewise.
7002 * util/grub-emu.c (main): Fix unchecked pointer handling.
7004 2007-07-02 Robert Millan <rmh@aybabtu.com>
7006 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7007 invocation to fail, in order to support partition-less media.
7009 * util/i386/pc/grub-install.in: Likewise.
7011 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7012 which fs or partmap modules are needed (akin to its sister scripts).
7014 Also use grub-probe to get rid of unportable /proc/mounts check.
7016 Print the same informational message that the other scripts do, before
7019 2007-06-23 Robert Millan <rmh@aybabtu.com>
7021 * util/update-grub_lib.in (font_path): New function. Determine whether
7022 a font file can be found and, if so, echo the GRUB path to it.
7024 * util/update-grub.in: Handle multiple terminals depending on user
7025 input, platform availability and font file presence. Propagate
7026 variables of our findings to /etc/grub.d/ children.
7028 * util/grub.d/00_header.in: Handle multiple terminals, based on
7029 environment setup by update-grub.
7031 2007-06-23 Robert Millan <rmh@aybabtu.com>
7033 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
7035 2007-06-21 Robert Millan <rmh@aybabtu.com>
7037 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7038 indicate end of data section in kernel image.
7039 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7040 GRUB_KERNEL_MACHINE_DATA_END.
7042 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7044 * kern/i386/efi/startup.S: Likewise.
7046 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7047 during image generation. Implement --prefix option to override this
7049 * util/i386/efi/grub-mkimage.c: Likewise.
7051 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7052 code to make path relative to its root into a separate function.
7054 * util/i386/pc/grub-install.in: Use newly provided
7055 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7056 pass the result to grub-install --prefix.
7058 2007-06-13 Robert Millan <rmh@aybabtu.com>
7060 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7062 * util/grub-emu.c: Use above definitions from misc.h instead of
7064 * util/grub-mkdevicemap.c: Likewise.
7065 * util/i386/pc/grub-setup.c: Likewise.
7066 * util/grub-probe.c: Likewise.
7067 (probe): Abort with grub_util_error() when either
7068 grub_guess_root_device or grub_util_get_grub_dev fails.
7070 2007-06-12 Robert Millan <rmh@aybabtu.com>
7072 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7074 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7076 * util/grub-probe.c (probe): Likewise for "drive_name".
7078 2007-06-11 Robert Millan <rmh@aybabtu.com>
7080 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7081 not just the cdrom one.
7083 2007-06-11 Robert Millan <rmh@aybabtu.com>
7085 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7086 Add --pkglibdir=DIR option to override pkglibdir.
7087 Mention --image-type=TYPE in help output.
7088 Fix --grub-mkimage (it was a no-op).
7089 Abort gracefully when no parameter is given.
7091 2007-06-11 Robert Millan <rmh@aybabtu.com>
7093 * util/i386/pc/grub-mkrescue.in: New file.
7094 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7095 * Makefile.in: Handle bin_SCRIPTS.
7097 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7099 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7100 list of video modes.
7102 2007-06-06 Robert Millan <rmh@aybabtu.com>
7104 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7105 file doesn't exist, or if it is in a filesystem grub can't read.
7107 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7108 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7109 header comment to fit in 80 columns when the variables are resolved.
7111 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7112 could be identified by update-grub. Remove redundant check for
7113 unifont.pff existence (since convert_system_path_to_grub_path now
7116 2007-06-04 Robert Millan <rmh@aybabtu.com>
7118 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7120 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7122 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7124 2007-06-04 Robert Millan <rmh@aybabtu.com>
7126 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7128 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7129 grub_apple_partition_map_fini.
7132 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7133 to access >2 TiB disks).
7135 Print disk->total_sectors with %llu instead of %lu, since this
7136 variable is always 64-bit (prevents wrong disk size from being displayed
7137 on either >2 TiB disk or big-endian CPU).
7139 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7140 into a generic case that supports all (sane) partition maps.
7142 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7145 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7146 and grub_apple_partition_map_fini() after that.
7148 2007-06-01 Robert Millan <rmh@aybabtu.com>
7150 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7152 * util/grub.d/00_header.in: Only enable gfxterm when
7153 convert_system_path_to_grub_path() succeeds.
7155 2007-05-20 Robert Millan <rmh@aybabtu.com>
7157 * util/update-grub_lib.in: New file.
7158 * DISTLIST: Add update-grub_lib.in.
7159 * conf/common.rmk: Generate update-grub_lib and install it in
7161 * Makefile.in: Add install routine for $(lib_DATA).
7163 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7164 function provided by update-grub_lib to support arbitrary paths of
7166 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7167 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7169 2007-05-19 Robert Millan <rmh@aybabtu.com>
7171 * commands/i386/cpuid.c: New module.
7173 * conf/i386-efi.rmk: Enable cpuid.mod.
7174 * conf/i386-pc.rmk: Likewise.
7176 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7178 * kern/disk.c (grub_disk_read): Check return value of
7181 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7183 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7185 * disk/raid.c (grub_raid_open): Likewise.
7187 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7189 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7190 stack instead of on the heap.
7192 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7193 before doing a read on it.
7195 * configure.ac: Only use -fno-stack-protector for the target
7198 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7200 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7201 __attribute_ ((unused)) to mode_type argument.
7203 * util/getroot.c (grub_guess_root_device): Fix #endif.
7205 * kern/misc.c (memcmp): Fix prototype.
7207 * include/grub/partition.h [GRUB_UTIL]
7208 (grub_gpt_partition_map_init): Add prototype.
7209 (grub_gpt_partition_map_fini): Likewise.
7211 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7214 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7215 (grub_fat_read_data): Likewise.
7216 (grub_fat_find_dir): Likewise.
7218 * font/manager.c (find_glyph): Make table a const.
7219 (grub_font_get_glyph): Remove bitmap from if statement.
7221 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7223 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7224 code, first search for device in /dev/mapper, then in /dev.
7225 (grub_util_get_grub_dev): New function.
7226 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7228 * util/grub-probe.c (probe): Remove check for RAID, call
7229 grub_util_get_grub_dev() instead of
7230 grub_util_biosdisk_get_grub_dev().
7231 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7232 grub_util_biosdisk_get_grub_dev().
7233 * util/i386/pc/grub-setup.c (main): Likewise.
7235 2007-05-16 Robert Millan <rmh@aybabtu.com>
7237 * DISTLIST: Update for the latest changes.
7238 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7239 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7240 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7241 grub/util/biosdisk.h.
7242 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7243 grub/util/biosdisk.h.
7245 2007-05-16 Robert Millan <rmh@aybabtu.com>
7247 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7249 2007-05-16 Robert Millan <rmh@aybabtu.com>
7251 * util/i386/efi/grub-install.in: New.
7252 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7253 newly added grub-install.
7254 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7256 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7257 grub/util/biosdisk.h.
7258 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7259 grub/util/biosdisk.h.
7261 2007-05-16 Robert Millan <rmh@aybabtu.com>
7263 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7264 * include/grub/util/biosdisk.h: ... here.
7265 * util/i386/pc/biosdisk.c: Moved to ...
7266 * util/biosdisk.c: ... here.
7267 * util/i386/pc/getroot.c: Moved to ...
7268 * util/getroot.c: ... here.
7269 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7270 * util/grub-mkdevicemap.c: ... here.
7271 * util/i386/pc/grub-probe.c: Moved to ...
7272 * util/grub-probe.c: ... here.
7274 2007-05-15 Robert Millan <rmh@aybabtu.com>
7276 * util/update-grub.in: Remove duplicated line in grub.cfg header
7279 2007-05-13 Robert Millan <rmh@aybabtu.com>
7281 * util/update-grub.in: Fix a few assumptions about the devices holding
7282 /, /boot and /boot/grub being the same.
7283 * util/grub.d/00_header.in: Likewise.
7284 * util/grub.d/10_hurd.in: Likewise.
7285 * util/grub.d/10_linux.in: Likewise.
7287 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7288 patterns. Use that to define the `.old' suffix as older than `'.
7290 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7292 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7293 the grub.cfg header message.
7295 2007-05-11 Robert Millan <rmh@aybabtu.com>
7297 * util/update-grub.in: Create device.map if it doesn't already exist,
7298 before attempting to run grub-probe.
7299 Check for grub-probe and grub-mkdevicemap with the same code
7300 grub-install is using.
7303 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7305 * Makefile.in: Add the datarootdir autoconf variable.
7307 2007-05-09 Robert Millan <rmh@aybabtu.com>
7309 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
7310 fail gracefully if dev->disk->partition == NULL.
7312 2007-05-07 Robert Millan <rmh@aybabtu.com>
7314 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7315 determine partition map module.
7316 * util/i386/pc/grub-install.in: Use this feature to decide which
7317 partition module to load, instead of hardcoding pc and gpt.
7319 2007-05-07 Robert Millan <rmh@aybabtu.com>
7321 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7322 source directory differs from build directory.
7324 2007-05-05 Robert Millan <rmh@aybabtu.com>
7326 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7329 2007-05-05 Robert Millan <rmh@aybabtu.com>
7331 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7333 2007-05-05 Robert Millan <rmh@aybabtu.com>
7335 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7336 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7338 2007-05-05 Robert Millan <rmh@aybabtu.com>
7340 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7341 (grub_probe_SOURCES): Likewise.
7342 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7343 GPT and initialize dos_part and bsd_part accordingly.
7344 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7346 (main): Activate gpt module for use during partition identification,
7347 and deactivate it afterwards.
7348 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7349 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7350 partition identification, and deactivate it afterwards.
7352 2007-05-05 Robert Millan <rmh@aybabtu.com>
7354 * term/i386/pc/console.c (grub_console_fini): Call
7355 grub_term_set_current() before grub_term_unregister().
7357 2007-05-04 Robert Millan <rmh@aybabtu.com>
7359 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7360 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7361 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7362 and update-grub_DATA.
7363 * conf/common.rmk: Build and install update-grub components.
7364 * conf/common.mk: Regenerate.
7365 * util/update-grub.in: New. Core of update-grub.
7366 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7367 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7368 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7369 * util/grub.d/README: New. Document grub.d directory layout.
7371 2007-05-01 Robert Millan <rmh@aybabtu.com>
7373 * util/grub-emu.c: Move initialization functions
7374 grub_util_biosdisk_init() and grub_init_all() before
7375 grub_util_biosdisk_get_grub_dev(), which relies on them.
7377 2007-04-19 Robert Millan <rmh@aybabtu.com>
7379 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7382 2007-04-18 Jerone Young <jerone@gmail.com>
7384 * kernel/elf.c: Add missing parenthesis for conditional statement
7387 2007-04-10 Jerone Young <jerone@gmail.com>
7389 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7390 continue on and look for device node with real device name.
7392 2007-04-10 Jerone Young <jerone@gmail.com>
7394 * configure.ac: Add argument for autoconf to use transformation
7396 * Makefile.in: Add autoconf package transformation code.
7397 * util/i386/pc/grub-install.in: Likewise.
7398 * util/powerpc/ieee1275/grub-install.in: Likewise.
7400 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7402 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7403 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7404 (EXT2_REVISION): Likewise.
7405 (EXT2_INODE_SIZE): Likewise.
7406 (struct grub_ext2_block_group): Added a missing member
7408 (grub_ext2_read_inode): Divide by the inode size in a superblock
7409 instead of 128 to obtain INODES_PER_BLOCK.
7410 Use the macro EXT2_INODE_SIZE instead of directly using
7413 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7415 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7416 superblock instead of the structure size to compute an
7417 offset. This fixes the problem that GRUB could not read a
7418 filesystem when inode size is different from 128-byte.
7420 2007-03-05 Marco Gerards <marco@gnu.org>
7422 * normal/main.c (read_config_file): When "menu" is not set, create
7425 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7427 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7428 (HEAP_LIMIT): New macro.
7429 (grub_claim_heap): Claim memory up to `heaplimit'.
7431 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7433 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7434 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7436 (grub_arch_modules_addr): Return address after `_end'.
7437 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7438 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7439 (add_segments): Calculate `_end' from phdr size and location.
7440 (ALIGN_UP): Moved to ...
7441 * include/grub/misc.h: here.
7442 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7444 (GRUB_IEEE1275_MODULE_BASE): Removed.
7446 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7448 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7451 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7453 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7455 (grub_elf64_load_hook_t): Likewise.
7456 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7459 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7461 * kern/mm.c: Update copyright.
7462 (grub_mm_debug): Correct syntax error.
7463 (grub_mm_dump_free): New function.
7464 (grub_debug_free): Call `grub_free'.
7465 * include/grub/mm.h: Update copyright.
7466 (grub_mm_dump_free): Add declaration.
7468 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7470 * include/grub/ieee1275/ieee1275.h: Update copyright.
7471 * kern/powerpc/ieee1275/init.c: Likewise.
7472 * kern/powerpc/ieee1275/openfw.c: Likewise.
7474 * loader/powerpc/ieee1275/linux.c: Likewise.
7475 * include/grub/elfload.h: Likewise.
7476 * kern/elf.c: Likewise.
7477 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7479 (grub_elf64_load): Likewise.
7480 (grub_elf32_load_segment): Move to a nested function.
7481 (grub_elf64_load_segment): Likewise.
7483 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7485 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7487 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7488 (grub_heap_len): Likewise.
7489 (HEAP_SIZE): New macro.
7490 (grub_claim_heap): New function.
7491 (grub_machine_init): Don't claim heap directly. Call
7493 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7494 (grub_available_iterate): New function.
7496 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7498 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7499 * configure.ac: Use it for testing the HOST and TARGET compilers.
7501 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7503 * Makefile.in (enable_grub_emu): New variable.
7504 * configure.ac (--enable-grub-emu): New option.
7505 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7506 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7507 * conf/i386-pc.rmk: Likewise.
7508 * conf/powerpc-ieee1275.rmk: Likewise.
7509 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7511 2006-12-12 Marco Gerards <marco@gnu.org>
7513 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7515 * kern/env.c (grub_env_unset): Don't free the member `value' when
7516 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7519 * normal/main.c (current_menu): Removed.
7520 (free_menu): Unset the `menu' environment variable.
7521 (grub_normal_menu_addentry): Make use of the environment variable
7522 `menu', instead of using the global `current_menu'. Allocate
7523 memory for the sourcecode of this entry.
7524 (read_config_file): New argument `nested', changed all callers.
7525 Only in the case of a new context, initialize a new menu. Set the
7526 `menu' environment variable.
7527 (grub_normal_execute): Don't set and unset the environment
7528 variable `menu' here anymore. Only free the menu when leaving the
7531 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7534 2006-12-11 Marco Gerards <marco@gnu.org>
7536 * normal/menu_entry.c (run): Fix off by one bug so the last line
7537 is executed. Move the loader check to outside the loop.
7539 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7541 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7543 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7545 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7546 the number of sectors. Reported by Andrey Shuvikov
7547 <mr_hyro@yahoo.com>.
7549 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7551 * kern/disk.c (grub_disk_read): When there is a read error, always
7552 try to read only the necessary data.
7554 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7556 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7558 [GRUB_UTIL] (grub_raid_fini): Likewise.
7559 [GRUB_UTIL] (grub_lvm_init): Likewise.
7560 [GRUB_UTIL] (grub_lvm_fini): Likewise.
7561 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
7562 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
7563 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7564 and grub_raid_fini().
7566 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7568 * include/grub/types.h (__unused): Rename to UNUSED.
7569 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7570 (grub_elf64_size): Likewise.
7572 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7574 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7575 grub_error_push and grub_error_pop in the error-handling path.
7576 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7579 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7581 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7582 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7583 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7584 (kernel_elf_SOURCES): Likewise.
7585 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7586 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7587 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7588 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7589 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7590 (elf_mod_SOURCES): New variable.
7591 (elf_mod_CFLAGS): Likewise.
7592 (elf_mod_LDFLAGS): Likewise.
7593 * include/grub/types.h (__unused): New macro.
7594 * include/grub/elfload.h: New file.
7595 * kern/elf.c: Likewise.
7596 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7597 (ELF32_LOADMASK): New macro.
7598 (ELF64_LOADMASK): Likewise.
7600 (grub_linux_load32): New function.
7601 (grub_linux_load64): Likewise.
7602 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7603 Use grub_elf_t instead of grub_file_t.
7605 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7607 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7608 `catch_result' to struct set_color_args.
7610 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7612 * normal/menu.c: Include grub/script.h.
7613 * normal/menu_entry.c: Likewise.
7614 * include/grub/normal.h: Do not include grub/script.h.
7616 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7618 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7620 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7622 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7624 (grub_disk_close): Print debug messages when closing a disk.
7625 (grub_disk_read): Print debug messages when disk read fails.
7626 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7628 * kern/partition.c: Include misc.h.
7629 (grub_partition_iterate): Print debug messages when detecting
7632 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7634 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7636 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7638 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7640 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7641 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7643 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7645 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7646 instead of sizeof(lv). Patch by Michael Guntsche.
7648 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7650 * disk/lvm.c: Rename VGS to VG_LIST.
7651 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7652 (grub_lvm_open): Likewise.
7653 Thanks to Michael Guntsche for finding this bug.
7655 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7657 * configure.ac (AC_INIT): Bumped to 1.95.
7659 2006-10-14 Robert Millan <rmh@aybabtu.com>
7661 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7662 with "/dev/.static/dev/md".
7664 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7666 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7667 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7668 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7669 DRIVE_NAME are always freed.
7671 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7672 DOS_PART, as a DOS partition is counted from one instead of zero
7673 now. Reported by Robert Millan.
7675 2006-10-14 Robert Millan <rmh@aybabtu.com>
7677 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7678 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7679 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7680 string returned by grub_guess_root_device.
7681 * util/i386/pc/grub-setup.c: Likewise.
7682 * util/i386/pc/grub-probefs.c: Likewise.
7684 * util/i386/pc/grub-probefs.c: Rename to ...
7685 * util/i386/pc/grub-probe.c: ... this.
7686 * DISTLIST: Remove grub-probefs, add grub-probe.
7687 * conf/i386-efi.rmk: Likewise.
7688 * conf/i386-pc.rmk: Likewise.
7689 * util/i386/pc/grub-install.in: Likewise.
7691 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7692 choose which information we want to print.
7694 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7696 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7697 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7698 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7699 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7700 video/readers/tga.c and video/i386/pc/vbeutil.c.
7702 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7704 Added support for RAID and LVM.
7706 * disk/lvm.c: New file.
7707 * disk/raid.c: Likewise.
7708 * include/grub/lvm.h: Likewise.
7709 * include/grub/raid.h: Likewise.
7710 * include/grub/util/lvm.h: Likewise.
7711 * include/grub/util/raid.h: Likewise.
7712 * util/lvm.c: Likewise.
7713 * util/raid.c: Likewise.
7715 * include/grub/disk.h (grub_disk_dev_id): Add
7716 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7717 (grub_disk_get_size): New prototype.
7718 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7719 returns a partition.
7720 (grub_disk_get_size): New function.
7722 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7723 verbatim if grub_install_dos_part is -2.
7725 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7728 * util/i386/pc/grub-setup.c (setup): New argument
7729 MUST_EMBED. Force embedding of GRUB when the argument is
7730 true. Close FILE before returning.
7731 (main): Add support for RAID and LVM.
7733 * conf/common.rmk: Add RAID and LVM modules.
7734 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7736 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7738 * kern/misc.c (grub_strstr): New function.
7739 * include/grub/misc.h (grub_strstr): New prototype.
7741 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7743 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7745 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7747 * kern/misc.c (grub_strtoull): Guess the base only if not
7750 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7752 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7755 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7757 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7759 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7760 Remove `flags' argument. All callers changed.
7761 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7762 (IEEE1275_IHANDLE_INVALID): New variable.
7763 (IEEE1275_CELL_INVALID): New variable.
7764 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7765 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7766 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7767 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7768 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7769 codes from Open Firmware. All callers updated.
7770 (grub_ieee1275_next_property): Directly return Open Firmware return
7772 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7773 Standardize error checking from `grub_ieee1275_get_property'.
7774 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7775 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7777 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7779 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7780 `instance_to_package_args' to `instance_to_path_args'.
7782 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7783 `grub_ieee1275_chosen'.
7785 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7786 `grub_ieee1275_interpret'.
7788 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7790 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7792 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7794 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7795 (__cmpdi): Likewise.
7797 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7798 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7801 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7803 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7804 to type `grub_ssize_t'.
7805 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7807 2006-09-22 Marco Gerards <marco@gnu.org>
7809 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7812 2006-09-22 Marco Gerards <marco@gnu.org>
7814 * commands/echo.c: New file.
7816 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7818 * conf/common.rmk (echo_mod_SOURCES): New variable.
7819 (echo_mod_CFLAGS): Likewise.
7820 (echo_mod_LDFLAGS): Likewise.
7822 2006-09-22 Marco Gerards <marco@gnu.org>
7824 * normal/main.c (get_line): Malloc memory instead of using
7825 preallocated memory. Removed the arguments `cmdline' and
7826 `max_len'. Updated all callers.
7828 2006-09-22 Marco Gerards <marco@gnu.org>
7830 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7831 (normal_mod_DEPENDENCIES): Likewise.
7833 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7834 (normal_mod_DEPENDENCIES): Likewise.
7836 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7838 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
7840 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7842 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7843 (normal_mod_DEPENDENCIES): Likewise.
7844 * conf/i386-pc.mk: Regenerate.
7845 * conf/i386-efi.mk: Likewise
7846 * conf/common.mk: Likewise.
7847 * conf/powerpc-ieee1275.mk: Likewise.
7848 * conf/sparc64-ieee1275.mk: Likewise.
7850 2006-09-22 Robert Millan <rmh@aybabtu.com>
7852 Sync with i386 version.
7853 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7854 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7856 2006-09-21 Robert Millan <rmh@aybabtu.com>
7858 Import from GRUB Legacy (lib/device.c):
7859 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7860 (init_device_map) [__linux__]: Add support for I2O devices.
7862 2006-09-14 Marco Gerards <marco@gnu.org>
7864 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7867 2006-09-14 Robert Millan <rmh@aybabtu.com>
7869 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7872 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7874 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7875 before adding it to device.map.
7877 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
7879 * genmk.rb: Let GCC generate dependencies the first time it
7880 compiles a file; using the -MD option.
7881 * conf/common.mk: Regenerate.
7882 * conf/i386-pc.mk: Likewise.
7883 * conf/i386-efi.mk: Likewise.
7884 * conf/powerpc-ieee1275.mk: Likewise.
7885 * conf/sparc64-ieee1275.mk: Likewise.
7887 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7889 Move the prototypes of grub_setjmp and grub_longjmp to
7890 cpu/setjmp.h, so that each architecture may specify different
7893 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7894 (grub_longjmp): Likewise.
7895 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7896 (grub_longjmp): Likewise.
7897 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7898 (grub_longjmp): Likewise.
7900 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7901 [!GRUB_UTIL] (grub_longjmp): Removed.
7903 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7905 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7906 "color!" method does not return any value.
7908 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7910 * include/grub/bitmap.h: New file.
7912 * include/grub/i386/pc/vbeutil.h: Likewise.
7914 * video/bitmap.c: Likewise.
7916 * video/readers/tga.c: Likewise.
7918 * video/i386/pc/vbeutil.c: Likewise.
7920 * commands/videotest.c: Code cleanup and updated to reflect to new
7923 * term/gfxterm.c: Likewise.
7925 * video/video.c: Likewise.
7927 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7928 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7929 (bitmap_mod_SOURCES): New entry.
7930 (bitmap_mod_CFLAGS): Likewise.
7931 (bitmap_mod_LDFLAGS): Likewise.
7932 (tga_mod_SOURCES): Likewise.
7933 (tga_mod_CFLAGS): Likewise.
7934 (tga_mod_LDFLAGS): Likewise.
7936 * include/grub/video.h (grub_video_blit_operators): New enum type.
7937 (grub_video_render_target): Changed as forward declaration and moved
7938 actual definition to be video driver specific.
7939 (grub_video_adapter.blit_bitmap): Added blitting operator.
7940 (grub_video_adapter.blit_render_target): Likewise.
7941 (grub_video_blit_bitmap): Likewise.
7942 (grub_video_blit_render_target): Likewise.
7944 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7945 driver specific render target definition.
7946 (grub_video_vbe_map_rgba): Added driver internal helper.
7947 (grub_video_vbe_unmap_color): Updated to use
7948 grub_video_i386_vbeblit_info.
7949 (grub_video_vbe_get_video_ptr): Likewise.
7951 * include/grub/i386/pc/vbeblit.h
7952 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7953 grub_video_i386_vbeblit_info.
7954 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7955 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7956 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7957 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7958 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7959 (grub_video_i386_vbeblit_index_index): Likewise.
7960 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7961 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7962 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7963 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7965 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7968 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7969 include/grub/i386/pc/vbeblit.h.
7971 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7972 Updated to use grub_video_i386_vbeblit_info.
7973 (grub_video_i386_vbefill_R8G8B8): Likewise.
7974 (grub_video_i386_vbefill_index): Likewise.
7975 (grub_video_i386_vbefill): Added generic filler.
7977 * video/i386/pc/vbefill.c: Updated to reflect changes on
7978 include/grub/i386/pc/vbefill.h.
7980 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7981 grub_video_i386_vbeblit_info.
7982 (grub_video_vbe_unmap_color): Likewise.
7983 (grub_video_vbe_blit_glyph): Likewise.
7984 (grub_video_vbe_scroll): Likewise.
7985 (grub_video_vbe_draw_pixel): Removed function.
7986 (grub_video_vbe_get_pixel): Likewise.
7987 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7988 updated code to use it.
7989 (common_blitter): Added common blitter for render target and bitmap.
7990 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7991 (grub_video_vbe_blit_render_target): Likewise.
7993 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
7995 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7996 is in text mode if there is no console control protocol instance
7999 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8001 * include/grub/video.h: Code cleanup.
8003 * include/grub/i386/pc/vbe.h: Likewise.
8005 * video/i386/pc/vbe.c: Likewise.
8007 * video/i386/pc/vbeblit.c: Likewise.
8009 * video/i386/pc/vbefill.c: Likewise.
8011 * video/video.c: Likewise. Also added more comments.
8013 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8015 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8016 (struct grub_biosdisk_dap): Likewise.
8018 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
8019 linkage settings for all functions.
8021 2006-07-12 Marco Gerards <marco@gnu.org>
8023 * configure.ac (--enable-mm-debug): Fix typo.
8025 * genkernsyms.sh.in: Use proper quoting for `CC'.
8027 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8029 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8030 (normal_mod_ASFLAGS): Remove "-m32".
8032 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8034 * util/misc.c: Include config.h.
8035 [!HAVE_MEMALIGN]: Do not include malloc.h.
8036 (grub_memalign): Use posix_memalign, if present. Then, use
8037 memalign, if present. Otherwise, emit an error.
8039 * util/grub-emu.c: Do not include malloc.h.
8041 * include/grub/util/misc.h: Include unistd.h. This is required for
8042 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8043 D. Eades III <hde@foobar-qux.org>.
8045 * configure.ac (AC_GNU_SOURCE): Added.
8046 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8049 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8051 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8052 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8054 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8056 * include/grub/types.h (grub_host_addr_t): Rename to
8058 (grub_host_off_t): Rename to grub_target_off_t.
8059 (grub_host_size_t): Rename to grub_target_size_t.
8060 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8061 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8063 * include/grub/kernel.h (struct grub_module_header): Change type
8064 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8065 (grub_module_info): Likewise.
8067 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8069 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8070 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8071 Velazquez <jesus.velazquez@gmail.com>.
8073 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8075 Count partitions from 1 instead of 0 in the string representation
8076 of partitions. Still use 0-based internally.
8078 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8079 (sun_partition_map_iterate): Use grub_partition_t instead of
8080 struct grub_partition *. Cast DESC->START_CYLINDER to
8081 grub_uint64_t after converting the endian.
8082 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8083 (sun_partition_map_get_name): Add 1 to P->INDEX.
8085 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8087 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8089 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8090 zero instead of one.
8091 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8092 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8094 * partmap/apple.c (apple_partition_map_iterate): Change the type
8096 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8097 (apple_partition_map_get_name): Add 1 into P->INDEX.
8099 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8101 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8102 calculate the offset of a partition.
8103 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8104 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8106 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8107 SECTOR to grub_disk_addr_t.
8108 (acorn_partition_map_iterate): Likewise.
8109 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8110 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8112 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8114 * kern/i386/pc/init.c (make_install_device): Add 1 into
8115 GRUB_INSTALL_DOS_PART.
8117 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8120 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8122 Clean up the code to support 64-bit addressing in disks and
8123 files. This change is not enough for filesystems yet.
8125 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8126 type of "start" to grub_uint64_t.
8127 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8128 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8129 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8132 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8133 to grub_disk_addr_t.
8135 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8138 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8140 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8143 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8145 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8147 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8149 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8150 to grub_off_t, to detect an error from grub_file_seek.
8151 (grub_multiboot_load_elf32): Likewise.
8153 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8154 maximum unsigned long value when an overflow is detected.
8155 (grub_strtoull): New function.
8156 (grub_divmod64): Likewise.
8157 (grub_lltoa): use grub_divmod64.
8159 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8161 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8162 the pointer to next character. Use grub_strtoull instead of
8164 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8165 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8168 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
8169 return value is signed.
8170 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8171 test if OFFSET is less than zero, as OFFSET is unsigned now.
8173 * kern/disk.c (struct grub_disk_cache): Change the type of
8174 "sector" to grub_disk_addr_t.
8175 (grub_disk_cache_get_index): Change the type of SECTOR to
8176 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8177 unsigned after shifting.
8178 (grub_disk_cache_invalidate): Change the type of SECTOR to
8180 (grub_disk_cache_unlock): Likewise.
8181 (grub_disk_cache_store): Likewise.
8182 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8183 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8184 grub_disk_addr_t and grub_uint64_t, respectively.
8185 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8186 body, as the value of OFFSET is tweaked by
8187 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8188 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8190 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8191 body, as the value of OFFSET is tweaked by
8192 grub_disk_check_range. Change the types of LEN and N to
8195 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8196 and "saved_offset" to grub_off_t.
8197 (test_header): Cast BUF to char *.
8198 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8200 (grub_gzio_read): Change the types of OFFSET and SIZE to
8201 grub_off_t and grub_size_t, respectively.
8203 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8205 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8206 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8207 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8208 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8209 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8211 * include/grub/types.h (grub_off_t): Unconditionally set to
8213 (grub_disk_addr_t): Changed to grub_uint64_t.
8215 * include/grub/partition.h (struct grub_partition): Change the
8216 types of "start", "len" and "offset" to grub_disk_addr_t,
8217 grub_uint64_t and grub_disk_addr_t, respectively.
8218 (grub_partition_get_start): Return grub_disk_addr_t.
8219 (grub_partition_get_len): Return grub_uint64_t.
8221 * include/grub/misc.h (grub_strtoull): New prototype.
8222 (grub_divmod64): Likewise.
8224 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8225 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8226 grub_off_t, respectively.
8227 All callers and references changed.
8229 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8230 grub_size_t in "read".
8231 All callers and references changed.
8233 * include/grub/file.h (struct grub_file): Change the types of
8234 "offset" and "size" to grub_off_t and grub_off_t,
8235 respectively. Change the type of SECTOR to grub_disk_addr_t in
8237 (grub_file_read): Change the type of LEN to grub_size_t.
8238 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8240 (grub_file_size): Return grub_off_t.
8241 (grub_file_tell): Likewise.
8242 All callers and references changed.
8244 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8245 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8247 (struct grub_disk): Change the type of "total_sectors" to
8248 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
8250 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8251 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8252 (grub_disk_write): Likewise.
8253 All callers and references changed.
8255 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8256 char * for grub_strncmp to silence gcc.
8257 (grub_iso9660_mount): Likewise.
8258 (grub_iso9660_mount): Likewise.
8259 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8261 (grub_iso9660_iterate_dir): Likewise.
8262 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8264 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8265 LEN to grub_disk_addr_t and grub_size_t, respectively.
8267 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8269 * fs/jfs.c (grub_jfs_read_file): Likewise.
8271 * fs/minix.c (grub_jfs_read_file): Likewise.
8273 * fs/sfs.c (grub_jfs_read_file): Likewise.
8275 * fs/ufs.c (grub_jfs_read_file): Likewise.
8277 * fs/xfs.c (grub_jfs_read_file): Likewise.
8279 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8280 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8283 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8284 BLKNR to -1 instead of returning GRUB_ERRNO.
8285 (grub_ext2_read_file): Change the types of SECTOR and
8286 LEN to grub_disk_addr_t and grub_size_t, respectively.
8288 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8289 LEN to grub_disk_addr_t and grub_size_t, respectively.
8291 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8294 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8295 string. Do not cast SECTOR explicitly.
8297 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8298 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8299 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8300 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8301 over 2TB and LBA mode is not supported, raise an error.
8302 (get_safe_sectors): New function.
8303 (grub_biosdisk_read): Use get_safe_sectors.
8304 (grub_biosdisk_write): Likewise.
8306 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8307 (grub_efidisk_write): Likewise.
8309 * disk/loopback.c (delete_loopback): Cosmetic changes.
8310 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8312 (grub_loopback_open): Likewise.
8313 (grub_loopback_read): Likewise. Also, change the type of POS to
8314 grub_off_t, and fix the usage of grub_memset.
8316 * commands/i386/pc/play.c: Include grub/machine/time.h.
8318 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8321 * commands/configfile.c: Include grub/env.h.
8323 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8324 GRUB_ERRNO directly instead. Change the type of POS to
8325 grub_off_t. Follow the coding standard.
8327 * commands/blocklist.c: Include grub/partition.h.
8328 (grub_cmd_blocklist): Return an error if the underlying device is
8329 not a disk. Take the starting sector of a partition into account,
8330 if a partition is used.
8332 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8334 (lba_mode): Support 64-bit addresses.
8335 (chs_mode): Likewise.
8336 (copy_buffer): Adapted to the new offsets of a length field and a
8338 (blocklist_default_start): Allocate 64-bit space.
8340 * boot/i386/pc/boot.S (force_lba): Removed.
8341 (boot_drive): Moved to under KERNEL_SECTOR.
8342 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
8344 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8346 (lba_mode): Refactored to support a 64-bit address. More size
8348 (setup_sectors): Likewise.
8350 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8352 * DISTLIST: Added include/grub/i386/linux.h. Removed
8353 include/grub/i386/pc/linux.h
8355 * configure.ac (AC_INIT): Bumped to 1.94.
8357 * config.guess: Updated from gnulib.
8358 * config.sub: Likewise.
8359 * install-sh: Likewise.
8360 * mkinstalldirs: Likewise.
8362 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8364 * conf/common.rmk (grub_modules_init.lst): Depended on
8365 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8368 * genmk.rb (PModule::rule): Reverted the previous change.
8370 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8372 * conf/common.rmk (grub_modules_init.lst): Depends on
8373 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8374 that the target does not exist before producing.
8375 (grub_modules_init.h): Remove the target before generating.
8376 (grub_emu_init.c): Likewise.
8378 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8380 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8382 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8383 for the target-specific tests. Make sure that we also have the
8384 up-to-date target variables for those tests.
8386 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8388 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8389 (PModule::rule): Likewise.
8391 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8393 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8394 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8395 target-specific flags should be prefixed.
8396 (PModule::rule): Likewise.
8398 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8400 * configure.ac (CMP): Check if cmp is available explicitly.
8402 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8404 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8405 (target_cpu): New variable.
8406 (pkglibdir): Use target_cpu instead of host_cpu.
8408 * util/i386/pc/grub-install.in (host_cpu): Removed.
8409 (target_cpu): New variable.
8410 (pkglibdir): Use target_cpu instead of host_cpu.
8412 * util/genmoddep.c: Removed.
8414 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8415 instead of GRUB_HOST_SIZEOF_VOID_P.
8416 * kern/dl.c: Likewise.
8418 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8420 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8421 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8422 (GRUB_TARGET_SIZEOF_LONG): ... this.
8423 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8424 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8425 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8427 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8428 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8429 (GRUB_TARGET_SIZEOF_LONG): ... this.
8430 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8431 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8432 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8434 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8435 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8436 (GRUB_TARGET_SIZEOF_LONG): ... this.
8437 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8438 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8440 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8441 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8442 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8443 instead of GRUB_HOST_SIZEOF_LONG.
8444 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8445 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8446 GRUB_CPU_WORDS_BIGENDIAN.
8447 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8448 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8451 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8452 (genmoddep_SOURCES): Likewise.
8453 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8454 (genmoddep_SOURCES): Likewise.
8455 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8456 (genmoddep_SOURCES): Likewise.
8457 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8459 (genmoddep_SOURCES): Likewise.
8461 * genmoddep.awk: New file.
8463 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8464 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8465 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8466 (PModule::rule): Likewise.
8467 (Program::rule): Likewise.
8468 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8469 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8472 * configure.ac: Rewritten intensively to use host and target
8473 instead of build and host, respectively.
8475 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8476 (host_cpu): Removed.
8477 (target_cpu): New variable.
8478 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8479 (BUILD_CC): Removed.
8480 (BUILD_CFLAGS): Likewise.
8481 (BUILD_CPPFLAGS): Likewise.
8482 (TARGET_CC): New variable.
8483 (TARGET_CFLAGS): Likewise.
8484 (TARGET_CPPFLAGS): Likewise.
8485 (TARGET_LDFLAGS): Likewise.
8487 (include): Use target_cpu instead of host_cpu.
8488 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
8490 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8492 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8494 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8495 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8496 field 'false' to 'exec_on_false'.
8497 (grub_script_create_cmdif): Renamed argument names to reflect above
8500 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8502 * normal/script.c (grub_script_create_cmdif): Likewise.
8504 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8506 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8508 (grub_hfsplus_btree_recptr): Likewise.
8509 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8510 FILEBLOCK both to pass a block number and store next block
8512 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8513 overflow file correctly. Specify errors appropriately, because
8514 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8515 grub_hfsplus_btree_recptr to get the pointer to a found key.
8516 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8519 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8521 (_linux_mod_SOURCES): New variable.
8522 (_linux_mod_CFLAGS): Likewise.
8523 (_linux_mod_LDFLAGS): Likewise.
8524 (linux_mod_SOURCES): Likewise.
8525 (linux_mod_CFLAGS): Likewise.
8526 (linux_mod_LDFLAGS): Likewise.
8528 * DISTLIST: Added loader/i386/efi/linux.c,
8529 loader/i386/efi/linux_normal.c and
8530 include/grub/i386/efi/loader.h.
8532 * loader/i386/efi/linux.c: New file.
8533 * loader/i386/efi/linux_normal.c: Likewise.
8534 * include/grub/i386/efi/loader.h: Likewise.
8536 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8538 * commands/blocklist.c: New file.
8540 * DISTLIST: Added commands/blocklist.c.
8542 * term/efi/console.c (grub_console_highlight_color): Use a lighter
8543 color for the background, and a darker color for the foreground.
8544 (grub_console_checkkey): Return READ_KEY.
8545 (grub_console_cls): Set the background to
8546 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8548 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8550 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8551 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8553 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8556 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8557 BG. The spec is wrong again.
8559 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8561 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
8563 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8564 commands/blocklist.c.
8565 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8567 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8568 (blocklist_mod_SOURCES): New variable.
8569 (blocklist_mod_CFLAGS): Likewise.
8570 (blocklist_mod_LDFLAGS): Likewise.
8572 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8574 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8576 (lba_mode): Use %eax more intensively to reduce the code size.
8578 2006-05-20 Marco Gerards <marco@gnu.org>
8580 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8582 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8584 (script): Accept leading newlines.
8585 (newlines): New rule to describe 0 or more newlines.
8586 (commands): Accept `command' with trailing newline. Fixed the
8587 order in which arguments were passed to `grub_script_add_cmd'.
8588 Accept commands separated by newlines.
8589 (function): Changed to accept newlines.
8590 (menuentry) Rewritten.
8592 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8593 front of the list, instead of to the end.
8595 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8597 * util/i386/pc/grub-install.in (bindir): New variable.
8598 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8599 Shaver <lbgwjl@gmail.com>.
8601 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8603 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8604 grub/machine/linux.h
8605 * loader/i386/pc/linux.c: Likewise.
8607 * include/grub/i386/pc/linux.h: Moved to ...
8608 * include/grub/i386/linux.h: ... here.
8610 * include/grub/i386/linux.h (struct linux_kernel_params): New
8613 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8615 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8617 (grub_video_vbe_blit_glyph): Likewise.
8618 (grub_video_vbe_blit_bitmap): Likewise.
8619 (grub_video_vbe_blit_render_target): Likewise.
8621 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8623 * configure.ac (--with-platform): Properly quote the square
8626 2006-05-08 Marco Gerards <marco@gnu.org>
8628 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8630 (kernel_elf_HEADERS): ...to this. Updated all users.
8631 (grubof_symlist.c): Renamed from this...
8632 (kernel_elf_symlist.c): ...to this. Updated all users.
8633 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8634 (grubof_SOURCES): Renamed from this...
8635 (kernel_elf_SOURCES): ...to this.
8636 (grubof_HEADERS): Renamed from this...
8637 (kernel_elf_HEADERS): ...to this.
8638 (grubof_CFLAGS): Renamed from this...
8639 (kernel_elf_CFLAGS): ...to this.
8640 (grubof_ASFLAGS): Renamed from this...
8641 (kernel_elf_ASFLAGS): ...to this.
8642 (grubof_LDFLAGS): Renamed from this...
8643 (kernel_elf_LDFLAGS): ...to this.
8645 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8647 (kernel_elf_HEADERS): ...to this. Updated all users.
8648 (grubof_symlist.c): Renamed from this...
8649 (kernel_elf_symlist.c): ...to this. Updated all users.
8650 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8651 (grubof_SOURCES): Renamed from this...
8652 (kernel_elf_SOURCES): ...to this.
8653 (grubof_HEADERS): Renamed from this...
8654 (kernel_elf_HEADERS): ...to this.
8655 (grubof_CFLAGS): Renamed from this...
8656 (kernel_elf_CFLAGS): ...to this.
8657 (grubof_ASFLAGS): Renamed from this...
8658 (kernel_elf_ASFLAGS): ...to this.
8659 (grubof_LDFLAGS): Renamed from this...
8660 (kernel_elf_LDFLAGS): ...to this.
8662 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8663 `kernel.elf' instead of `grubof'.
8665 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8667 Add --with-platform to configure. Use pkglibdir instead of
8668 pkgdatadir. This is reported by Roger Leigh.
8670 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8671 (host_vendor): Likewise.
8672 (host_os): Likewise.
8673 (pkgdatadir): Likewise.
8674 (platform): New variable.
8675 (pkglibdir): Likewise.
8676 Use PKGLIBDIR instead of PKGDATADIR.
8678 * util/i386/pc/grub-install.in (datadir): Removed.
8679 (host_vendor): Likewise.
8680 (host_os): Likewise.
8681 (pkgdatadir): Likewise.
8682 (platform): New variable.
8683 (pkglibdir): Likewise.
8684 Use PKGLIBDIR instead of PKGDATADIR.
8686 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8687 instead of GRUB_DATADIR.
8689 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8691 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8694 * configure.ac (--with-platform): New option.
8695 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8697 * Makefile.in: Include a makefile based on PLATFORM instead of
8699 (pkgdatadir): Not appended by the machine type.
8700 (pkglibdir): Appended by the machine type.
8701 (host_vendor): Removed.
8702 (platform): New variable.
8703 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8704 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8705 (uninstall): Likewise.
8707 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8709 Use the environment context in the menu. Remove the commands
8710 "default" and "timeout", and use variables instead.
8712 * normal/menu.c: Include grub/env.h.
8713 (print_entry): Cast TITLE to silence gcc.
8714 (get_timeout): New function.
8715 (set_timeout): Likewise.
8716 (get_entry_number): Likewise.
8717 (run_menu): Use a default entry, a fallback entry and a timeout
8718 in the environment variables "default", "fallback" and
8719 "timeout". Also, tweak the default entry if it is not within the
8720 current menu entries.
8721 (grub_menu_run): Use a fallback entry in the environment variable
8724 * normal/main.c (read_config_file): Do not initialize
8725 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8727 (grub_normal_execute): Use a data slot to store the menu.
8729 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8730 fallback_entry and timeout.
8731 (struct grub_menu_list): Removed.
8732 (grub_menu_list_t): Likewise.
8733 (struct grub_context): Likewise.
8734 (grub_context_t): Likewise.
8735 (grub_context_get): Likewise.
8736 (grub_context_get_current_menu): Likewise.
8737 (grub_context_push_menu): Likewise.
8738 (grub_context_pop_menu): Likewise.
8739 (grub_default_init): Likewise.
8740 (grub_default_fini): Likewise.
8741 (grub_timeout_init): Likewise.
8742 (grub_timeout_fini): Likewise.
8744 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8746 (normal_mod_SOURCES): Removed normal/context.c.
8748 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8749 commands/default.c, commands/timeout.c and normal/context.c.
8750 (normal_mod_SOURCES): Removed normal/context.c.
8752 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8753 commands/timeout.c and normal/context.c.
8754 (normal_mod_SOURCES): Removed normal/context.c.
8756 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8757 commands/default.c, commands/timeout.c and normal/context.c.
8758 (normal_mod_SOURCES): Removed normal/context.c.
8760 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8762 (default_mod_SOURCES): Removed.
8763 (default_mod_CFLAGS): Likewise.
8764 (default_mod_LDFLAGS): Likewise.
8765 (timeout_mod_SOURCES): Removed.
8766 (timeout_mod_CFLAGS): Likewise.
8767 (timeout_mod_LDFLAGS): Likewise.
8769 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8772 * commands/default.c: Removed.
8773 * commands/timeout.c: Likewise.
8774 * normal/context.c: Likewise.
8776 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8778 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8780 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8782 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8783 "next" to "prev" for readability.
8784 (struct grub_env_sorted_var): New struct.
8785 (grub_env_context): Renamed to ...
8786 (initial_context): ... this.
8787 (grub_env_var_context): Renamed to ...
8788 (current_context): ... this.
8789 (grub_env_find): Look only at CURRENT_CONTEXT.
8790 (grub_env_context_open): Rewritten to copy exported variables from
8792 (grub_env_context_close): Rewritten according to the new
8793 scheme. Also, add an assertion to prevent the initial context from
8795 (grub_env_insert): Removed the code for the sorted list.
8796 (grub_env_remove): Likewise.
8797 (grub_env_export): Simply mark the variable with
8798 GRUB_ENV_VAR_GLOBAL.
8799 (grub_env_set): A cosmetic change for naming consistency.
8800 (grub_env_get): Likewise.
8801 (grub_env_unset): Likewise.
8802 (grub_env_iterate): Rewritten to sort variables within this
8804 (grub_register_variable_hook): Fixed for naming consistency. Call
8805 grub_env_find again, only if NAME is not found at the first time.
8806 (mangle_data_slot_name): New function.
8807 (grub_env_set_data_slot): Likewise.
8808 (grub_env_get_data_slot): Likewise.
8809 (grub_env_unset_data_slot): Likewise.
8811 * include/grub/env.h (grub_env_var_type): New enum.
8812 (GRUB_ENV_VAR_LOCAL): New constant.
8813 (GRUB_ENV_VAR_GLOBAL): Likewise.
8814 (GRUB_ENV_VAR_DATA): Likewise.
8815 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8817 (grub_env_set): Replace VAR with NAME for consistency.
8818 (grub_register_variable_hook): Likewise.
8819 (grub_env_export): Specify the name of the argument.
8820 (grub_env_set_data_slot): New prototype.
8821 (grub_env_get_data_slot): Likewise.
8822 (grub_env_unset_data_slot): Likewise.
8824 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8826 Extend the loader so that GRUB can accept a loader which comes
8827 back to GRUB when a loaded image exits. Also, this change adds
8828 support for a chainloader on EFI.
8830 * term/efi/console.c: Include grub/misc.h.
8831 (grub_console_checkkey): Display a scan code on the top for
8832 debugging. This will be removed once the EFI port gets stable.
8833 Correct the scan code mapping.
8835 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8836 allocate memory from larger regions, in order to reduce the number
8837 of allocated regions. Otherwise, the MacOSX loader panics.
8838 (filter_memory_map): Avoid less than 1MB for compatibility with
8840 (add_memory_regions): Allocate from the tail of a region, if
8841 possible, to avoid allocating a region near to 1MB, for the MacOSX
8844 * kern/efi/init.c (grub_efi_set_prefix): Specify
8845 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8847 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8848 argument IMAGE_HANDLE and specify it to get a loaded image.
8849 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8850 grub_efi_get_loaded_image.
8851 (grub_efi_get_filename): Divide the length by the size of
8853 (grub_efi_get_device_path): New function.
8854 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8855 the length by the size of grub_efi_char16_t for a file path device
8858 * kern/loader.c (grub_loader_noreturn): New variable.
8859 (grub_loader_set): Accept a new argument NORETURN. Set
8860 GRUB_LOADER_NORETURN to NORETURN.
8861 All callers changed.
8862 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8865 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8867 (grub_efi_get_loaded_image): Take an argument to specify an image
8870 * include/grub/loader.h (grub_loader_set): Added one more argument
8873 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8874 instead of grub_efi_open_protocol.
8875 (grub_efidisk_get_device_name): Likewise.
8876 (grub_efidisk_close): Print a newline.
8877 (grub_efidisk_get_device_handle): Fixed to use
8878 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8879 GRUB_EFI_DEVICE_PATH_TYPE.
8881 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8882 * kern/efi/efi.c (device_path_guid): ... here.
8884 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8886 (kernel_mod_HEADERS): Added efi/disk.h.
8887 (_chain_mod_SOURCES): New variable.
8888 (_chain_mod_CFLAGS): Likewise.
8889 (_chain_mod_LDFLAGS): Likewise.
8890 (chain_mod_SOURCES): Likewise.
8891 (chain_mod_CFLAGS): Likewise.
8892 (chain_mod_LDFLAGS): Likewise.
8894 * DISTLIST: Added include/grub/efi/chainloader.h,
8895 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8897 * include/grub/efi/chainloader.h: New file.
8898 * loader/efi/chainloader.c: Likewise.
8899 * loader/efi/chainloader_normal.c: Likewise.
8901 2006-04-30 Marco Gerards <marco@gnu.org>
8903 * commands/configfile.c (grub_cmd_source): New function.
8904 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8905 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8907 2006-04-30 Marco Gerards <marco@gnu.org>
8909 * normal/execute.c (grub_script_execute_cmd): Change the return
8910 type to `grub_err_t'. Correctly return the error.
8911 (grub_script_execute_cmdline): In case a command line is not a
8912 command or a function, try to interpret it as an assignment.
8914 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8916 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8917 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8918 skip a node whose name is obviously invalid as UTF-16,
8919 i.e. contains a NUL character. Stop the iteration when the last
8920 directory entry is found. Instead of using the return value of
8921 grub_hfsplus_btree_iterate_node, store the value in RET and use
8922 it, because the iterator can be stopped by the last directory
8925 2006-04-30 Marco Gerards <marco@gnu.org>
8927 * include/grub/env.h (grub_env_export): New prototype. Reported
8928 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8930 2006-04-30 Marco Gerards <marco@gnu.org>
8932 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8933 size of the extents in a catalog file record.
8935 2006-04-29 Marco Gerards <marco@gnu.org>
8937 * commands/configfile.c (grub_cmd_configfile): Execute the
8938 configfile within its own context.
8940 * include/grub/env.h (grub_env_context_open): New prototype.
8941 (grub_env_context_close): Likewise.
8943 * kern/env.c (grub_env): Removed.
8944 (grub_env_sorted): Likewise.
8945 (grub_env_context): New variable.
8946 (grub_env_var_context): Likewise.
8947 (grub_env_find): Search both the active context and the global
8949 (grub_env_context_open): New function.
8950 (grub_env_context_close): Likewise.
8951 (grub_env_insert): Likewise.
8952 (grub_env_remove): Likewise.
8953 (grub_env_export): Likewise.
8954 (grub_env_set): Changed to use helper functions to avoid code
8956 (grub_env_iterate): Rewritten so both the current context and the
8957 global context are being used.
8959 * normal/command.c (export_command): New function.
8960 (grub_command_init): Register the `export' function.
8962 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8964 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8965 explicitly to suppress gcc's warnings.
8966 * fs/fat.c (grub_fat_find_dir): Likewise.
8967 (grub_fat_label): Likewise.
8968 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8969 (grub_xfs_mount): Likewise.
8970 (grub_xfs_label): Likewise.
8971 * fs/affs.c (grub_affs_mount): Likewise.
8972 (grub_affs_label): Likewise.
8973 (grub_affs_iterate_dir): Likewise.
8974 * fs/sfs.c (grub_sfs_mount): Likewise.
8975 (grub_sfs_iterate_dir): Likewise.
8976 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8977 * fs/hfs.c (grub_hfs_mount): Likewise.
8978 (grub_hfs_cmp_catkeys): Likewise.
8979 (grub_hfs_find_dir): Likewise.
8980 (grub_hfs_dir): Likewise.
8981 (grub_hfs_label): Likewise.
8982 * fs/jfs.c (grub_jfs_mount): Likewise.
8983 (grub_jfs_opendir): Likewise.
8984 (grub_jfs_getent): Likewise.
8985 (grub_jfs_lookup_symlink): Likewise.
8986 (grub_jfs_label): Likewise.
8987 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8988 (grub_hfsplus_iterate_dir): Likewise.
8989 (grub_hfsplus_btree_iterate_node): Made static.
8991 * util/grub-emu.c (prefix): New variable.
8992 (grub_machine_set_prefix): New function.
8993 (main): Do not set the environment variable "prefix" here. Only
8994 set PREFIX, which is used later by grub_machine_set_prefix.
8996 * include/grub/video.h: Do not include grub/symbol.h.
8997 (grub_video_register): Not exported. This symbol is not defined in
8999 (grub_video_unregister): Likewise.
9000 (grub_video_iterate): Likewise.
9001 (grub_video_setup): Likewise.
9002 (grub_video_restore): Likewise.
9003 (grub_video_get_info): Likewise.
9004 (grub_video_get_blit_format): Likewise.
9005 (grub_video_set_palette): Likewise.
9006 (grub_video_get_palette): Likewise.
9007 (grub_video_set_viewport): Likewise.
9008 (grub_video_get_viewport): Likewise.
9009 (grub_video_map_color): Likewise.
9010 (grub_video_map_rgb): Likewise.
9011 (grub_video_map_rgba): Likewise.
9012 (grub_video_fill_rect): Likewise.
9013 (grub_video_blit_glyph): Likewise.
9014 (grub_video_blit_bitmap): Likewise.
9015 (grub_video_blit_render_target): Likewise.
9016 (grub_video_scroll): Likewise.
9017 (grub_video_swap_buffers): Likewise.
9018 (grub_video_create_render_target): Likewise.
9019 (grub_video_delete_render_target): Likewise.
9020 (grub_video_set_active_render_target): Likewise.
9022 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9024 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9026 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9027 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9028 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9029 instead of $(srcdir)/genkernsyms.sh.
9031 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9032 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9033 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9034 instead of $(srcdir)/genkernsyms.sh.
9036 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9037 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9038 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9039 instead of $(srcdir)/genkernsyms.sh.
9041 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9042 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9043 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9044 instead of $(srcdir)/genkernsyms.sh.
9046 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9049 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9051 (gensymlist.sh): New target.
9052 (genkernsyms.sh): Likewise.
9054 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9055 genkernsyms.sh.in and gensymlist.sh.in.
9057 * genkernsyms.sh: Removed.
9058 * gensymlist.sh: Likewise.
9060 * genkernsyms.sh.in: New file.
9061 * gensymlist.sh.in: Likewise.
9063 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9065 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9066 clobber "prefix", since we may have already set it manually.
9068 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9070 * kern/misc.c (abort): New alias for grub_abort.
9072 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9074 A new machine-specific function "grub_machine_set_prefix" is
9075 defined. This is called after loading modules, so that a prefix
9076 initialization can use modules. Also, this change adds an
9077 intensive debugging feature for the memory manager via the
9078 configure option "--enable-mm-debug".
9080 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9083 * kern/sparc64/ieee1275/init.c (abort): Removed.
9084 (grub_stop): Likewise.
9085 (grub_exit): New function.
9086 (grub_set_prefix): Renamed to ...
9087 (grub_machine_set_prefix): ... this.
9088 (grub_machine_init): Do not call grub_set_prefix.
9090 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9091 (grub_machine_set_prefix): ... this.
9092 (grub_machine_init): Do not call grub_set_prefix.
9094 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9095 (grub_machine_init): Do not set the prefix here.
9097 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9099 * kern/efi/init.c: Include grub/mm.h.
9100 (grub_efi_set_prefix): New function.
9102 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9103 (grub_efi_get_filename): New function.
9104 (grub_print_device_path): Renamed to ...
9105 (grub_efi_print_device_path): ... this.
9107 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9108 [MM_DEBUG] (grub_realloc): Likewise.
9109 [MM_DEBUG] (grub_free): Likewise.
9110 [MM_DEBUG] (grub_memalign): Likewise.
9111 [MM_DEBUG] (grub_mm_debug): New variable.
9112 [MM_DEBUG] (grub_debug_malloc): New function.
9113 [MM_DEBUG] (grub_debug_free): New function.
9114 [MM_DEBUG] (grub_debug_realloc): New function.
9115 [MM_DEBUG] (grub_debug_memalign): New function.
9117 * kern/misc.c (grub_abort): Print a newline to distinguish
9120 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9121 grub_set_root_dev after loading modules. This is necessary when
9122 setting a prefix depends on modules.
9124 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9125 (grub_efi_print_device_path): ... this.
9126 (grub_efi_get_filename): New prototype.
9127 (grub_efi_set_prefix): Likewise.
9129 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9131 (grub_efidisk_get_device_handle): New prototype.
9132 (grub_efidisk_get_device_name): Likewise.
9134 * include/grub/mm.h: Include config.h.
9135 (MM_DEBUG): Removed.
9136 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9137 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9138 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9139 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9140 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9141 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9142 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9143 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9144 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9146 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9148 * disk/efi/efidisk.c: Include grub/partition.h.
9149 (iterate_child_devices): New function.
9150 (add_device): First, compare only last device path nodes, so that
9151 devices are sorted by the types.
9152 (grub_efidisk_get_device_handle): New function.
9153 (grub_efidisk_get_device_name): Likewise.
9155 * configure.ac (--enable-mm-debug): New option to enable the
9156 memory manager debugging feature. This makes the binary much
9157 bigger, so is disabled by default.
9159 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9161 Use grub_abort instead of grub_stop, and grub_exit must be
9162 define in each architecture now. Also, this change adds support
9165 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9166 (grub_getkey): New function.
9167 (grub_term_get_current): Likewise.
9169 * util/i386/pc/grub-setup.c: Include grub/term.h.
9170 (grub_getkey): New function.
9171 (grub_term_get_current): Likewise.
9173 * util/misc.c (grub_stop): Renamed to ...
9174 (grub_exit): ... this.
9176 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9177 (grub_exit): ... this.
9178 (grub_machine_init): Use grub_abort instead of abort.
9179 (grub_stop): Removed.
9181 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9184 * kern/i386/pc/startup.S (grub_exit): New function.
9185 (cold_reboot): New label.
9187 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9188 (grub_efi_init): Call grub_efidisk_init.
9189 (grub_efi_fini): Call grub_efidisk_fini.
9191 * kern/efi/efi.c: Include grub/mm.h.
9192 (grub_efi_console_control_guid): Renamed to ...
9193 (console_control_guid): ... this.
9194 (grub_efi_loaded_image_guid): Renamed to ...
9195 (loaded_image_guid): ... this.
9196 (grub_efi_locate_handle): New function.
9197 (grub_efi_open_protocol): Likewise.
9198 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9199 GRUB_EFI_CONSOLE_CONTROL_GUID.
9200 (grub_efi_exit): Removed.
9201 (grub_stop): Likewise.
9202 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9203 (grub_exit): New function.
9204 (grub_print_device_path): Likewise.
9206 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9207 (grub_enter_rescue_mode): Register "exit".
9209 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9210 (grub_abort): New function.
9212 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9214 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9216 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9218 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9219 (grub_print_device_path): New prototype.
9220 (grub_efi_locate_handle): Likewise.
9221 (grub_efi_open_protocol): Likewise.
9223 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9224 * disk/efi/efidisk.c: Likewise.
9226 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9228 * include/grub/efi/console_control.h
9229 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9231 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9232 last 8 bytes as an array.
9233 (GRUB_EFI_DISK_IO_GUID): New macro.
9234 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9235 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9236 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9238 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9239 (struct grub_efi_device_path): Rename the member "sub_type" to
9241 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9242 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9243 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9244 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9245 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9246 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9247 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9248 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9249 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9250 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9251 (struct grub_efi_pci_device_path): New structure.
9252 (grub_efi_pci_device_path_t): New type.
9253 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9254 (struct grub_efi_pccard_device_path): New structure.
9255 (grub_efi_pccard_device_path_t): New type.
9256 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9257 (struct grub_efi_memory_mapped_device_path): New structure.
9258 (grub_efi_memory_mapped_device_path_t): New type.
9259 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9260 (struct grub_efi_vendor_device_path): New structure.
9261 (grub_efi_vendor_device_path_t): New type.
9262 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9263 (struct grub_efi_controller_device_path): New structure.
9264 (grub_efi_controller_device_path_t): New type.
9265 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9266 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9267 (struct grub_efi_acpi_device_path): New structure.
9268 (grub_efi_acpi_device_path_t): New type.
9269 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9270 (struct grub_efi_expanded_acpi_device_path): New structure.
9271 (grub_efi_expanded_acpi_device_path_t): New type.
9272 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9273 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9274 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9275 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9276 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9277 (struct grub_efi_atapi_device_path): New structure.
9278 (grub_efi_atapi_device_path_t): New type.
9279 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9280 (struct grub_efi_fibre_channel_device_path): New structure.
9281 (grub_efi_fibre_channel_device_path_t): New type.
9282 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9283 (struct grub_efi_1394_device_path): New structure.
9284 (grub_efi_1394_device_path_t): New type.
9285 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9286 (struct grub_efi_usb_device_path): New structure.
9287 (grub_efi_usb_device_path_t): New type.
9288 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9289 (struct grub_efi_usb_class_device_path): New structure.
9290 (grub_efi_usb_class_device_path_t): New type.
9291 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9292 (struct grub_efi_i2o_device_path): New structure.
9293 (grub_efi_i2o_device_path_t): New type.
9294 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9295 (struct grub_efi_mac_address_device_path): New structure.
9296 (grub_efi_mac_address_device_path_t): New type.
9297 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9298 (struct grub_efi_ipv4_device_path): New structure.
9299 (grub_efi_ipv4_device_path_t): New type.
9300 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9301 (struct grub_efi_ipv6_device_path): New structure.
9302 (grub_efi_ipv6_device_path_t): New type.
9303 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9304 (struct grub_efi_infiniband_device_path): New structure.
9305 (grub_efi_infiniband_device_path_t): New type.
9306 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9307 (struct grub_efi_uart_device_path): New structure.
9308 (grub_efi_uart_device_path_t): New type.
9309 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9310 (struct grub_efi_vendor_messaging_device_path): New structure.
9311 (grub_efi_vendor_messaging_device_path_t): New type.
9312 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9313 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9314 (struct grub_efi_hard_drive_device_path): New structure.
9315 (grub_efi_hard_drive_device_path_t): New type.
9316 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9317 (struct grub_efi_cdrom_device_path): New structure.
9318 (grub_efi_cdrom_device_path_t): New type.
9319 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9320 (struct grub_efi_vendor_media_device_path): New structure.
9321 (grub_efi_vendor_media_device_path_t): New type.
9322 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9323 (struct grub_efi_file_path_device_path): New structure.
9324 (grub_efi_file_path_device_path_t): New type.
9325 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9326 (struct grub_efi_protocol_device_path): New structure.
9327 (grub_efi_protocol_device_path_t): New type.
9328 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9329 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9330 (struct grub_efi_bios_device_path): New structure.
9331 (grub_efi_bios_device_path_t): New type.
9332 (struct grub_efi_disk_io): New structure.
9333 (grub_efi_disk_io_t): New type.
9334 (struct grub_efi_block_io_media): New structure.
9335 (grub_efi_block_io_media_t): New type.
9336 (struct grub_efi_block_io): New structure.
9337 (grub_efi_block_io_t): New type.
9339 * include/grub/misc.h (grub_stop): Removed.
9340 (grub_exit): New prototype.
9341 (grub_abort): Likewise.
9343 * include/grub/disk.h (enum grub_disk_dev_id): Added
9344 GRUB_DISK_DEVICE_EFIDISK_ID.
9346 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9348 (kernel_syms.lst): Remove the target if an error occurs.
9350 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9352 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9353 as it was simply too buggy.
9355 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9357 * kern/misc.c (grub_lltoa): New function.
9358 (grub_vsprintf): Added support for the long long suffix,
9361 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9363 * Makefile.in (LDFLAGS): Add variable.
9364 (LD): Remove variable.
9365 * configure.ac: Add -m32 to LDFLAGS.
9366 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9367 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9368 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9369 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9370 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9372 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9373 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9374 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9376 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9378 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9379 length for unknown glyph.
9381 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9383 Add support for pre-loaded modules into the EFI port.
9385 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9386 completely. Accept one more argument DIR. The caller has changed.
9388 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9390 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9391 (grub_efi_loaded_image_guid): New variable.
9392 (grub_efi_get_loaded_image): New function.
9393 (grub_arch_modules_addr): Likewise.
9395 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9398 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9399 (struct grub_efi_loaded_image): New structure.
9400 (grub_efi_loaded_image_t): New type.
9402 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9404 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9405 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9406 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9408 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9410 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9412 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9414 * DISTLIST: Added include/grub/efi/console.h,
9415 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9416 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9418 * include/grub/efi/console.h: New file.
9419 * include/grub/efi/time.h: Likewise.
9420 * include/grub/i386/efi/kernel.h: Likewise.
9421 * kern/efi/init.c: Likewise.
9422 * kern/efi/mm.c: Likewise.
9423 * term/efi/console.c: Likewise.
9425 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9426 (grub_stop): Removed.
9427 (grub_get_rtc): Likewise.
9428 (grub_machine_init): Simply call grub_efi_init.
9429 (grub_machine_fini): Call grub_efi_fini.
9431 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9432 (grub_efi_output_string): Removed.
9433 (grub_efi_stall): New function.
9434 (grub_stop): Likewise.
9435 (grub_get_rtc): Likewise.
9437 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9438 (grub_efi_stall): New prototype.
9439 (grub_efi_allocate_pages): Likewise.
9440 (grub_efi_free_pages): Likewise.
9441 (grub_efi_get_memory_map): Likewise.
9442 (grub_efi_mm_init): Likewise.
9443 (grub_efi_mm_fini): Likewise.
9444 (grub_efi_init): Likewise.
9445 (grub_efi_fini): Likewise.
9447 * include/grub/i386/efi/time.h: Do not include
9448 grub/symbol.h. Include grub/efi/time.h.
9449 (GRUB_TICKS_PER_SECOND): Removed.
9450 (grub_get_rtc): Likewise.
9452 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9453 Added padding. The EFI spec is buggy.
9454 (GRUB_EFI_BLACK): New macro.
9455 (GRUB_EFI_BLUE): Likewise.
9456 (GRUB_EFI_GREEN): Likewise.
9457 (GRUB_EFI_CYAN): Likewise.
9458 (GRUB_EFI_RED): Likewise.
9459 (GRUB_EFI_MAGENTA): Likewise.
9460 (GRUB_EFI_BROWN): Likewise.
9461 (GRUB_EFI_LIGHTGRAY): Likewise.
9462 (GRUB_EFI_BRIGHT): Likewise.
9463 (GRUB_EFI_DARKGRAY): Likewise.
9464 (GRUB_EFI_LIGHTBLUE): Likewise.
9465 (GRUB_EFI_LIGHTGREEN): Likewise.
9466 (GRUB_EFI_LIGHTCYAN): Likewise.
9467 (GRUB_EFI_LIGHTRED): Likewise.
9468 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9469 (GRUB_EFI_YELLOW): Likewise.
9470 (GRUB_EFI_WHITE): Likewise.
9471 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9472 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9473 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9474 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9475 (GRUB_EFI_BACKGROUND_RED): Likewise.
9476 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9477 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9478 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9479 (GRUB_EFI_TEXT_ATTR): Likewise.
9481 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9482 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9483 (kernel_mod_HEADERS): Added efi/time.h.
9485 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9487 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9488 include/grub/efi/api.h, include/grub/efi/console_control.h,
9489 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9490 include/grub/i386/efi/time.h, kern/efi/efi.c,
9491 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9492 and util/i386/efi/grub-mkimage.c.
9494 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9496 * genmk.rb (PModule#rule): Do not export symbols if
9497 #{prefix}_EXPORTS is set to "no".
9499 * conf/i386-efi.mk: New file.
9500 * conf/i386-efi.rmk: Likewise.
9501 * include/grub/efi/api.h: Likewise.
9502 * include/grub/efi/console_control.h: Likewise.
9503 * include/grub/efi/efi.h: Likewise.
9504 * include/grub/efi/pe32.h: Likewise.
9505 * include/grub/i386/efi/time.h: Likewise.
9506 * kern/efi/efi.c: Likewise.
9507 * kern/i386/efi/init.c: Likewise.
9508 * kern/i386/efi/startup.S: Likewise.
9509 * util/i386/efi/grub-mkimage.c: Likewise.
9511 2006-04-17 Marco Gerards <marco@gnu.org>
9513 * include/grub/script.h: Include <grub/parser.h> and
9514 "grub_script.tab.h".
9515 (struct grub_lexer_param): New struct.
9516 (struct grub_parser_param): Likewise.
9517 (grub_script_create_arglist): Pass the state in an argument.
9518 (grub_script_add_arglist): Likewise.
9519 (grub_script_create_cmdline): Likewise.
9520 (grub_script_create_cmdblock): Likewise.
9521 (grub_script_create_cmdif): Likewise.
9522 (grub_script_create_cmdmenu): Likewise.
9523 (grub_script_add_cmd): Likewise.
9524 (grub_script_arg_add): Likewise.
9525 (grub_script_lexer_ref): Likewise.
9526 (grub_script_lexer_deref): Likewise.
9527 (grub_script_lexer_record_start): Likewise.
9528 (grub_script_lexer_record_stop): Likewise.
9529 (grub_script_mem_record): Likewise.
9530 (grub_script_mem_record_stop): Likewise.
9531 (grub_script_malloc): Likewise.
9532 (grub_script_yylex): Likewise.
9533 (grub_script_yyparse): Likewise.
9534 (grub_script_yyerror): Likewise.
9535 (grub_script_yylex): Likewise.
9536 (grub_script_lexer_init): Return the state.
9538 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9539 (grub_script_lexer_done): Likewise.
9540 (grub_script_lexer_getline): Likewise.
9541 (grub_script_lexer_refs): Likewise.
9543 (newscript): Likewise.
9545 (recording): Likewise.
9546 (recordpos): Likewise.
9547 (recordlen): Likewise.
9548 (grub_script_lexer_init): Return the state instead of setting
9550 (grub_script_lexer_ref): Use the newly added argument for state
9552 (grub_script_lexer_deref): Likewise.
9553 (grub_script_lexer_record_start): Likewise.
9554 (grub_script_lexer_record_stop): Likewise.
9555 (recordchar): Likewise.
9556 (nextchar): Likewise.
9557 (grub_script_yylex2): Likewise.
9558 (grub_script_yylex): Likewise.
9559 (grub_script_yyerror): Likewise.
9561 * normal/parser.y (func_mem): Removed variable.
9562 (menu_entry): Likewise.
9564 (%lex-param): New parser option.
9565 (%parse-param): Likewise.
9566 (script): Always return the AST.
9567 (argument): Pass the state around.
9568 (arguments): Likewise.
9569 (grubcmd): Likewise.
9570 (commands): Likewise.
9571 (function): Likewise.
9572 (menuentry): Likewise.
9573 (if_statement): Likewise.
9576 * normal/script.c (grub_script_memused): Removed variable.
9577 (grub_script_parsed): Likewise.
9578 (grub_script_malloc): Added a state argument. Use that instead of
9580 (grub_script_mem_record): Likewise.
9581 (grub_script_mem_record_stop): Likewise.
9582 (grub_script_arg_add): Likewise.
9583 (grub_script_add_arglist): Likewise.
9584 (grub_script_create_cmdline): Likewise.
9585 (grub_script_create_cmdif): Likewise.
9586 (grub_script_create_cmdmenu): Likewise.
9587 (grub_script_add_cmd): Likewise.
9588 (grub_script_parse): Setup the state before calling the parser.
9590 2006-04-16 Marco Gerards <marco@gnu.org>
9592 * normal/command.c (grub_command_init): Remove the title command.
9594 * normal/lexer.c (grub_script_yylex): Renamed from this...
9595 (grub_script_yylex2): ... to this.
9596 (grub_script_yylex): New function. Temporary
9597 introduced to filter some tokens.
9598 (grub_script_yyerror): Print a newline.
9600 * normal/main.c (read_config_file): Output information about the
9601 lines that contain errors. Wait for a key after all lines have
9602 been processed. Don't return an empty menu.
9604 * normal/parser.y (func_mem): Don't initialize.
9605 (menu_entry): Likewise.
9606 (err): New variable.
9607 (script): Don't return anything when an error was encountered.
9608 (ws, returns): Removed rules.
9609 (argument): Disabled concatenated variable support.
9610 (arguments): Remove explicit separators.
9611 (grubcmd): Likewise.
9612 (function): Likewise.
9613 (menuentry): Likewise.
9615 (commands): Likewise. Add error handling.
9617 * normal/script.c (grub_script_create_cmdline): If
9618 `grub_script_parsed' is 0, assume the parser encountered an error.
9620 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9622 * configure.ac: Add support for EFI. Fix the typo
9623 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9625 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9627 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9628 foreign multibyte characters should be shown correctly.
9630 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9632 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9634 (read_config_file): Made it to close file before returning.
9636 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9638 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9639 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9640 video/i386/pc/vbefill.c.
9642 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9643 video/i386/pc/vbefill.c.
9645 * include/grub/video.h (grub_video_blit_format): New enum.
9646 (grub_video_mode_info): Added new member blit_format.
9647 (grub_video_get_blit_format): New function prototype.
9649 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9651 (grub_video_vbe_map_rgb): Likewise.
9652 (grub_video_vbe_unmap_color): Likewise.
9654 * include/grub/i386/pc/vbeblit.h: New file.
9656 * include/grub/i386/pc/vbefill.h: New file.
9658 * video/video.c (grub_video_get_blit_format): New function.
9659 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9660 (grub_video_vbe_map_rgb): Likewise.
9661 (grub_video_vbe_unmap_color): Likewise.
9663 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9665 (grub_video_vbe_blit_render_target): Changed to use more optimized
9667 (grub_video_vbe_setup): Added detection for optimized settings.
9668 (grub_video_vbe_create_render_target): Likewise.
9670 * video/i386/pc/vbeblit.c: New file.
9672 * video/i386/pc/vbefill.c: New file.
9674 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9676 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9679 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9680 parsing to support both hex and dec ranges. If filename was missing
9681 show usage information.
9683 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9685 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9686 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9688 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9689 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9690 (video_mod_SOURCES): Added.
9691 (video_mod_CFLAGS): Likewise.
9692 (video_mod_LDFLAGS): Likewise.
9693 (gfxterm_mod_SOURCES): Likewise.
9694 (gfxterm_mod_CFLAGS): Likewise.
9695 (gfxterm_mod_LDFLAGS): Likewise.
9696 (videotest_mod_SOURCES): Likewise.
9697 (videotest_mod_CFLAGS): Likewise.
9698 (videotest_mod_LDFLAGS): Likewise.
9699 (vesafb_mod_SOURCES): Removed.
9700 (vesafb_mod_CFLAGS): Likewise.
9701 (vesafb_mod_LDFLAGS): Likewise.
9702 (vga_mod_SOURCES): Likewise.
9703 (vga_mod_CFLAGS): Likewise.
9704 (vga_mod_LDFLAGS): Likewise.
9706 * commands/videotest.c: New file.
9708 * font/manager.c (fill_with_default_glyph): Modified to use
9710 (grub_font_get_glyph): Likewise.
9711 (fontmanager): Renamed from this...
9712 (font_manager): ... to this.
9714 * include/grub/font.h (grub_font_glyph): Added new structure.
9715 (grub_font_get_glyph): Modified to use grub_font_glyph.
9717 * include/grub/misc.h (grub_abs): Added as inline function.
9719 * include/grub/video.h: New file.
9721 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9722 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9723 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9724 (grub_vbe_get_controller_info): Renamed from this...
9725 (grub_vbe_bios_get_controller_info): ... to this.
9726 (grub_vbe_get_mode_info): Renamed from this...
9727 (grub_vbe_bios_get_mode_info): ... to this.
9728 (grub_vbe_set_mode): Renamed from this...
9729 (grub_vbe_bios_set_mode): ... to this.
9730 (grub_vbe_get_mode): Renamed from this...
9731 (grub_vbe_bios_get_mode): ... to this.
9732 (grub_vbe_set_memory_window): Renamed from this...
9733 (grub_vbe_bios_set_memory_window): ... to this.
9734 (grub_vbe_get_memory_window): Renamed from this...
9735 (grub_vbe_bios_get_memory_window): ... to this.
9736 (grub_vbe_set_scanline_length): Renamed from this...
9737 (grub_vbe_set_scanline_length): ... to this.
9738 (grub_vbe_get_scanline_length): Renamed from this...
9739 (grub_vbe_bios_get_scanline_length): ... to this.
9740 (grub_vbe_set_display_start): Renamed from this...
9741 (grub_vbe_bios_set_display_start): ... to this.
9742 (grub_vbe_get_display_start): Renamed from this...
9743 (grub_vbe_bios_get_display_start): ... to this.
9744 (grub_vbe_set_palette_data): Renamed from this...
9745 (grub_vbe_bios_set_palette_data): ... to this.
9746 (grub_vbe_set_pixel_rgb): Removed.
9747 (grub_vbe_set_pixel_index): Likewise.
9749 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9751 (grub_vbe_bios_get_controller_info): ... to this.
9752 (grub_vbe_get_mode_info): Renamed from this...
9753 (grub_vbe_bios_get_mode_info): ... to this.
9754 (grub_vbe_set_mode): Renamed from this...
9755 (grub_vbe_bios_set_mode): ... to this.
9756 (grub_vbe_get_mode): Renamed from this...
9757 (grub_vbe_bios_get_mode): ... to this.
9758 (grub_vbe_set_memory_window): Renamed from this...
9759 (grub_vbe_bios_set_memory_window): ... to this.
9760 (grub_vbe_get_memory_window): Renamed from this...
9761 (grub_vbe_bios_get_memory_window): ... to this.
9762 (grub_vbe_set_scanline_length): Renamed from this...
9763 (grub_vbe_set_scanline_length): ... to this.
9764 (grub_vbe_get_scanline_length): Renamed from this...
9765 (grub_vbe_bios_get_scanline_length): ... to this.
9766 (grub_vbe_set_display_start): Renamed from this...
9767 (grub_vbe_bios_set_display_start): ... to this.
9768 (grub_vbe_get_display_start): Renamed from this...
9769 (grub_vbe_bios_get_display_start): ... to this.
9770 (grub_vbe_set_palette_data): Renamed from this...
9771 (grub_vbe_bios_set_palette_data): ... to this.
9772 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9773 getting corrupted after calling it. Added more pushes and pops.
9774 (grub_vbe_bios_set_mode): Likewise.
9775 (grub_vbe_bios_get_mode): Likewise.
9776 (grub_vbe_bios_get_memory_window): Likewise.
9777 (grub_vbe_bios_set_scanline_length): Likewise.
9778 (grub_vbe_bios_get_scanline_length): Likewise.
9779 (grub_vbe_bios_get_display_start): Likewise.
9780 (grub_vbe_bios_set_palette_data): Likewise.
9782 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9783 (cl_insert): Likewise.
9784 (cl_delete): Likewise.
9786 * term/gfxterm.c: New file.
9788 * term/i386/pc/vesafb.c: Removed file.
9790 * video/video.c: New file.
9792 * video/i386/pc/vbe.c (real2pm): Added new function.
9793 (grub_video_vbe_draw_pixel): Likewise.
9794 (grub_video_vbe_get_video_ptr): Likewise.
9795 (grub_video_vbe_get_pixel): Likewise
9796 (grub_video_vbe_init): Likewise.
9797 (grub_video_vbe_fini): Likewise.
9798 (grub_video_vbe_setup): Likewise.
9799 (grub_video_vbe_get_info): Likewise.
9800 (grub_video_vbe_set_palette): Likewise.
9801 (grub_video_vbe_get_palette): Likewise.
9802 (grub_video_vbe_set_viewport): Likewise.
9803 (grub_video_vbe_get_viewport): Likewise.
9804 (grub_video_vbe_map_color): Likewise.
9805 (grub_video_vbe_map_rgb): Likewise.
9806 (grub_video_vbe_map_rgba): Likewise.
9807 (grub_video_vbe_unmap_color): Likewise.
9808 (grub_video_vbe_fill_rect): Likewise.
9809 (grub_video_vbe_blit_glyph): Likewise.
9810 (grub_video_vbe_blit_bitmap): Likewise.
9811 (grub_video_vbe_blit_render_target): Likewise.
9812 (grub_video_vbe_scroll): Likewise.
9813 (grub_video_vbe_swap_buffers): Likewise.
9814 (grub_video_vbe_create_render_target): Likewise.
9815 (grub_video_vbe_delete_render_target): Likewise.
9816 (grub_video_vbe_set_active_render_target): Likewise.
9817 (grub_vbe_set_pixel_rgb): Remove function.
9818 (grub_vbe_set_pixel_index): Likewise.
9819 (index_color_mode): Remove static variable.
9820 (active_mode): Likewise.
9821 (framebuffer): Likewise.
9822 (bytes_per_scan_line): Likewise.
9823 (grub_video_vbe_adapter): Added new static variable.
9824 (framebuffer): Likewise.
9825 (render_target): Likewise.
9826 (initial_mode): Likewise.
9827 (mode_in_use): Likewise.
9828 (mode_list): Likewise.
9830 2006-03-10 Marco Gerards <marco@gnu.org>
9832 * configure.ac (AC_INIT): Bumped to 1.93.
9834 * DISTLIST: Added `include/grub/hfs.h'.
9836 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9838 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9839 18H, which might help the BIOS falling back to next boot media.
9841 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9843 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9844 Poe Chen <poe.poechen@gmail.com>.
9846 2006-01-17 Marco Gerards <marco@gnu.org>
9848 * include/grub/normal.h: Include <grub/script.h>.
9849 (grub_command_list): Removed struct.
9850 (grub_command_list_t): Removed type.
9851 (grub_menu_entry): Remove members `num' and `command_list'. Add
9852 members `commands' and `sourcecode'.
9853 * include/grub/script.h: Add inclusion guards.
9854 (grub_script_cmd_menuentry): New struct.
9855 (grub_script_execute_menuentry): New prototype.
9856 (grub_script_lexer_record_start): Likewise.
9857 (grub_script_lexer_record_stop): Likewise.
9858 * normal/execute.c (grub_script_execute_menuentry): New function.
9859 * normal/lexer.c (record, recording, recordpos, recordlen): New
9861 (grub_script_lexer_record_start): New function.
9862 (grub_script_lexer_record_stop): Likewise.
9863 (recordchar): Likewise.
9864 (nextchar): Likewise.
9865 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9866 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9867 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9868 (current_menu): New variable.
9869 (free_menu): Mainly rewritten.
9870 (grub_normal_menu_addentry): New function.
9871 (read_config_file): Rewritten.
9872 * normal/menu.c (run_menu_entry): Mainly rewritten.
9873 * normal/menu_entry.c (make_screen): Rewritten the code to insert
9875 (run): Mainly rewritten.
9876 * normal/parser.y (menu_entry): New variable.
9877 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9878 (menuentry): New rule.
9879 (command): Add `menuentry'.
9880 (if_statement): Allow additional returns before `fi'.
9881 * normal/script.c (grub_script_create_cmdmenu): New function.
9883 2006-01-03 Marco Gerards <marco@gnu.org>
9885 * INSTALL: GNU Bison is required.
9886 * configure.ac: Rewritten the test to detect Bison.
9887 * Makefile.in (YACC): New variable. Reported by Xun Sun
9888 <xun.sun.cn@gmail.com>.
9890 2006-01-03 Marco Gerards <marco@gnu.org>
9892 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9893 the HFS+ filesystem to filesystem blocks.
9894 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9895 GCC warning is silenced.
9897 2006-01-03 Marco Gerards <marco@gnu.org>
9899 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9900 read from disk from big endian to host byte order.
9902 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9904 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9906 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9907 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9908 embedded HFS+ filesystem.
9909 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9910 (grub_hfs_sblock): Move from here...
9911 * include/grub/hfs.h: To here... New file.
9912 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9914 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9916 (grub_hfsplus_volheader): Change type of member `magic' to
9918 (grub_hfsplus_data): Add new member `embedded_offset'.
9919 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9921 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9922 Calculate the offset.
9924 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9926 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9928 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9930 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9932 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9933 ENV->NAME is NULL after allocating ENV->VALUE.
9935 2005-12-25 Marco Gerards <marco@gnu.org>
9937 * kern/env.c (grub_env_set): Rewritten the error handling code.
9939 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9941 * geninit.sh: Made more robust, and more portable.
9943 2005-12-25 Marco Gerards <marco@gnu.org>
9945 Add support for Apple HFS+ filesystems.
9947 * fs/hfsplus.c: New file.
9949 * DISTLIST: Added `fs/hfsplus.c'.
9951 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9952 (hfsplus_mod_SOURCES): New variable.
9953 (hfsplus_mod_CFLAGS): Likewise.
9954 (hfsplus_mod_LDFLAGS): Likewise.
9955 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9956 (grub_setup_SOURCES): Likewise.
9957 (grub_mkdevicemap_SOURCES): Likewise.
9958 (grub_emu_SOURCES): Likewise.
9959 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9961 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9963 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9965 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9967 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9968 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9969 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9970 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9971 normal/lexer.c, normal/parser.y, normal/script.c, and
9973 Removed kern/sparc64/cache.c.
9975 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9976 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9979 * configure.ac (AC_INIT): Bumped to 1.92.
9981 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9983 * kern/err.c (grub_error_push): Added new function to support error
9985 (grub_error_pop): Likewise.
9986 (grub_error_stack_items): New local variable to support error stacks.
9987 (grub_error_stack_pos): Likewise.
9988 (grub_error_stack_assert): Likewise.
9989 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9991 (grub_print_error): Added support to print errors from error stack.
9993 * include/grub/err.h (grub_error_push): Added function prototype.
9994 (grub_error_pop): Likewise.
9996 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9998 * configure.ac: Accept `powerpc64' as host_cpu.
9999 (amd64): Rename to `biarch32'.
10001 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10002 non-cacheline-aligned addresses.
10004 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10005 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
10006 if `size' is non-zero.
10008 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
10010 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10011 and `cd' to make sure the filename is not prefixed with a
10013 (pkgdata_MODULES): Add `gpt.mod'.
10014 (gpt_mod_SOURCES): New variable.
10015 (gpt_mod_CFLAGS): Likewise.
10016 (gpt_mod_LDFLAGS): Likewise.
10018 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10020 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10023 * partmap/gpt.c: New file.
10025 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10026 GPT partition map is detected.
10028 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10030 * commands/i386/pc/play.c: New file.
10031 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10032 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10035 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
10037 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10038 ((unused))' to silence gcc warning.
10040 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10042 * configure.ac: Correct `AC_PROG_YACC' test.
10044 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10046 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10047 check before installing files.
10049 2005-11-22 Mike Small <smallm@panix.com>
10051 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10052 number regex so multidigit numbers are recognized correctly.
10054 2005-11-22 Mike Small <smallm@panix.com>
10056 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10057 debugging message before attempting to claim memory.
10058 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10059 multiple addresses in case of failure.
10061 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10063 * term/tparm.c (get_space): Remove empty `if' statement.
10065 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10067 * kern/parser.c (check_varstate): Rename `state' to 's'.
10069 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10071 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10072 variable definitions to the beginning of each function. Sort stack
10074 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10075 `buf' argument to `char *'.
10077 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10079 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10080 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10081 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10082 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10083 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10084 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10085 configfile.mod, search.mod, gzio.mod and test.mod.
10086 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10087 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10088 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10089 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10090 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10091 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10092 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10093 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10094 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10095 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10096 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10097 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10098 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10099 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10100 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10101 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10102 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10103 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10104 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10105 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10106 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10107 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10108 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10110 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10112 (pkgdata_MODULES): Add test.mod.
10114 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10116 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10117 appending to variables with "+=".
10118 (PModule): Use full pathname to generate *.lst filenames.
10120 * Makefile.in: Fixed list rules moved from genmk.rb.
10121 (.DELETE_ON_ERROR): New special target.
10122 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10124 * conf/i386-pc.rmk: Include conf/common.mk.
10125 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10126 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10127 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10128 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10129 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10130 configfile.mod, search.mod, gzio.mod and test.mod.
10131 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10132 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10133 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10134 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10135 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10136 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10137 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10138 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10139 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10140 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10141 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10142 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10143 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10144 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10145 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10146 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10147 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10148 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10149 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10150 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10151 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10152 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10153 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10155 * conf/common.rmk: ... to here. New file.
10157 * conf/common.mk: New file.
10159 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10161 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10162 (grub_script.tab.c): ... here.
10164 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10165 (grub_script.tab.c): ... here.
10167 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10168 (grub_script.tab.c): ... here.
10170 * normal/command.c (grub_command_find): Fixed a memory leak of
10171 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10173 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10175 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10176 "@" which marks the start of a comment on ARM.
10177 (VARIABLE): Likewise.
10179 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10181 Add support for Linux/ADFS partition tables.
10183 * partmap/acorn.c: New file.
10185 * include/grub/acorn_filecore.h: Likewise.
10187 * DISTLIST: Added `partmap/acorn.c' and
10188 `include/grub/acorn_filecore.h'.
10190 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10192 (pkgdata_MODULES): Add `acorn.mod'.
10193 (acorn_mod_SOURCES): New variable.
10194 (acorn_mod_CFLAGS): Likewise.
10196 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10198 (pkgdata_MODULES): Add `acorn.mod'.
10199 (acorn_mod_SOURCES): New variable.
10200 (acorn_mod_CFLAGS): Likewise.
10202 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10203 (pkgdata_MODULES): Add `acorn.mod'.
10204 (acorn_mod_SOURCES): New variable.
10205 (acorn_mod_CFLAGS): Likewise.
10206 (acorn_mod_LDFLAGS): Likewise.
10208 * include/types.h (grub_disk_addr_t): New typedef.
10210 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
10212 * geninit.sh: New file.
10214 * geninitheader.sh: Likewise.
10216 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10217 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10218 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10219 * commands/configfile.c (grub_configfile_init)
10220 (grub_configfile_fini): Likewise.
10221 * commands/default.c (grub_default_init, grub_default_fini):
10223 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10224 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10225 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10226 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10228 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10229 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10231 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
10232 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
10234 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10236 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
10238 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10239 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10240 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10241 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10242 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10243 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10244 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10245 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10246 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10247 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10248 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10249 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10250 * partmap/amiga.c (grub_amiga_partition_map_init)
10251 (grub_amiga_partition_map_fini): Likewise.
10252 * partmap/apple.c (grub_apple_partition_map_init)
10253 (grub_apple_partition_map_fini): Likewise.
10254 * partmap/pc.c (grub_pc_partition_map_init)
10255 (grub_pc_partition_map_fini): Likewise.
10256 * partmap/sun.c (grub_sun_partition_map_init,
10257 grub_sun_partition_map_fini): Likewise.
10258 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10261 * util/grub-emu.c: Include <grub_modules_init.h>.
10262 (main): Don't initialize and de-initialize any modules directly,
10263 use `grub_init_all' and `grub_fini_all' instead.
10265 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10266 `grub_vesafb_mod_init'.
10267 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10269 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10270 `grub_vga_mod_init'. Updated all users.
10271 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
10273 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10274 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10277 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10278 Generate a function to initialize the module in utilities.
10279 Updated all callers.
10280 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10281 initialize the module in utilities. Updated all callers.
10283 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10285 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10286 escape sequence and a literal ^L to clear the screen.
10288 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10289 when returning from Open Firmware.
10291 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10293 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10294 (grub_ofconsole_height): Likewise.
10295 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10296 manually insert a '\n'.
10297 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10298 `grub_ofconsole_height'. Return early if these are already set.
10300 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10302 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10303 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10304 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10305 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10306 and `normal/script.c'.
10307 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10308 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10309 (test_mod_SOURCES): New variable.
10310 (test_mod_CFLAGS): Likewise.
10311 (test_mod_LDFLAGS): Likewise.
10312 (pkgdata_MODULES): Add `test.mod'.
10313 (grub_script.tab.c): New rule.
10314 (grub_script.tab.h): Likewise.
10316 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
10318 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10319 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10320 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10321 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10322 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10323 (test_mod_SOURCES): New variable.
10324 (test_mod_CFLAGS): Likewise.
10325 (pkgdata_MODULES): Add `test.mod'.
10326 (grub_script.tab.c): New rule.
10327 (grub_script.tab.h): Likewise.
10329 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
10331 Add initial scripting support.
10333 * commands/test.c: New file.
10334 * include/grub/script.h: Likewise.
10335 * normal/execute.c: Likewise.
10336 * normal/function.c: Likewise.
10337 * normal/lexer.c: Likewise.
10338 * normal/parser.y: Likewise.
10339 * normal/script.c: Likewise.
10341 * configure.ac: Add `AC_PROG_YACC' test.
10343 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10344 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10345 `normal/function.c' and `normal/script.c'.
10346 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10347 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10348 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10350 (pkgdata_MODULES): Add `test.mod'.
10351 (grub_script.tab.c): New rule.
10352 (grub_script.tab.h): Likewise.
10354 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10356 * include/grub/normal.h (grub_test_init): New prototype.
10357 (grub_test_fini): Likewise.
10359 * normal/command.c: Include <grub/script.h>.
10360 (grub_command_execute): Rewritten.
10362 * util/grub-emu.c (main): Call `grub_test_init' and
10365 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10367 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10369 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10370 there are no pending characters.
10372 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10374 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10375 `grub_strndup' to drop device arguments. Replace unnecessary
10376 `grub_strndup' with `grub_strdup'.
10378 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10380 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10381 `debug' environment variable has been set.
10383 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
10385 * Makefile.in (install-local): Use $(DATA).
10386 (uninstall): Likewise.
10387 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10388 (sbin_UTILITIES): ... to here.
10389 (sbin_SCRIPTS): New variable.
10390 (grub_install_SOURCES): New variable.
10391 * util/powerpc/ieee1275/grub-install.in: New file.
10392 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10394 (add_segments): Call `grub_util_get_path'.
10396 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10398 From Timothy Baldwin:
10399 * commands/ls.c (grub_ls_list_files): Close FILE with
10401 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10403 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
10405 * include/grub/parser.h: New file.
10407 * kern/parser.c: Likewise.
10409 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10410 (grub_setup_SOURCES): Likewise.
10411 (grub_probefs_SOURCES): Likewise.
10412 (grub_emu_SOURCES): Likewise.
10413 (kernel_img_HEADERS): Add `parser.h'.
10415 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10416 (grub_emu_SOURCES): Add `kern/parser.c'.
10417 (grubof_SOURCES): Likewise.
10419 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10420 (grubof_SOURCES): Add `kern/parser.c'.
10422 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10424 * kern/misc.c (grub_split_cmdline): Removed function.
10426 * kern/rescue.c: Include <grub/parser.h>.
10427 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10428 of `grub_split_cmdline'.
10430 * normal/command.c: Include <grub/parser.h>.
10431 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10432 of `grub_split_cmdline'.
10434 * normal/completion.c: Include <grub/parser.h>.
10435 (cmdline_state): New variable.
10436 (iterate_dir): End the filename with a quote depending on the
10437 command line state.
10438 (get_state): new function.
10439 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10440 split the arguments and determine the current argument. When the
10441 argument string is not quoted, escape all spaces.
10443 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10445 * normal/sparc64/setjmp.S: New file.
10447 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10449 * include/grub/sparc64/libgcc.h: New file.
10450 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10451 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10452 normal/sparc64/setjmp.c.
10454 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10456 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10457 * kern/sparc64/cache.S: New file.
10458 * kern/sparc64/cache.c: Removed.
10459 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10460 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10462 (COMMON_LDFLAGS): Add -melf64_sparc.
10463 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10464 (grubof_SOURCES): Use cache.S instead of cache.c.
10465 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10466 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10467 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10469 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10470 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10471 (linux_mod_CFLAGS): Commented out.
10472 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10473 out because module isn't built.
10474 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10475 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10476 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10477 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10478 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10479 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10480 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10481 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10482 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10483 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10484 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10485 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10486 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10487 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10489 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10491 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10492 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10493 longer, because HFS should not be used on PC.
10495 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10497 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10498 consistently within the loop.
10500 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
10502 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10503 directory can not be read.
10505 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10507 * configure.ac (AC_INIT): Increase the version number to 1.91.
10509 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10510 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10511 term/i386/pc/serial.c.
10513 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10515 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10516 file size must be permitted.
10518 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10519 between %ah and %al.
10521 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10523 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10525 Call the hook with a NUL-terminated filename.
10526 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10529 * kern/term.c (cursor_state): New variable.
10530 (grub_term_set_current): Reset the cursor state on a new
10532 (grub_setcursor): Rewritten to use CURSOR_STATE.
10533 (grub_getcursor): New function.
10535 * include/grub/term.h (grub_getcursor): New prototype.
10537 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10538 integers on ARM. Reported by Timothy Baldwin
10539 <T.E.Baldwin99@members.leeds.ac.uk>.
10541 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
10543 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10545 (grub_sfs_dir): Likewise.
10547 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
10549 Add support for the SFS filesystem.
10551 * fs/sfs.c: New file.
10553 * DISTLIST: Added `fs/sfs.c'.
10555 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10556 (grub_probefs_SOURCES): Likewise.
10557 (grub_emu_SOURCES): Likewise.
10558 (pkgdata_MODULES): Add `sfs.mod'.
10559 (sfs_mod_SOURCES): New variable.
10560 (sfs_mod_CFLAGS): Likewise.
10561 (sfs_mod_LDFLAGS): Likewise.
10563 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10564 (pkgdata_MODULES): Add `sfs.mod'.
10565 (sfs_mod_SOURCES): New variable.
10566 (sfs_mod_CFLAGS): Likewise.
10568 * util/grub-emu.c (main): Call `grub_sfs_init' and
10571 * include/grub/fs.h (grub_sfs_init): New prototype.
10572 (grub_sfs_fini): Likewise.
10574 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
10576 Add support for the AFFS filesystem.
10578 * fs/affs.c: New file.
10580 * DISTLIST: Added `fs/affs.c'.
10582 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10583 (grub_probefs_SOURCES): Likewise.
10584 (grub_emu_SOURCES): Likewise.
10585 (pkgdata_MODULES): Add `affs.mod'.
10586 (affs_mod_SOURCES): New variable.
10587 (affs_mod_CFLAGS): Likewise.
10588 (affs_mod_LDFLAGS): Likewise.
10590 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10591 (pkgdata_MODULES): Add `affs.mod'.
10592 (affs_mod_SOURCES): New variable.
10593 (affs_mod_CFLAGS): Likewise.
10595 * util/grub-emu.c (main): Call `grub_affs_init' and
10598 * include/grub/fs.h (grub_affs_init): New prototype.
10599 (grub_affs_fini): Likewise.
10601 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10603 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10605 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10607 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10610 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10613 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10614 (COMMON_LDFLAGS): New variable.
10615 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10616 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10617 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10618 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10619 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10620 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10621 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10622 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10623 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10624 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10625 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10626 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10627 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10628 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10629 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10631 (normal_mod_ASFLAGS): Add `-m32'.
10633 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10634 (grub_host_size_t, grub_host_ssize_t): New types.
10635 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10636 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10637 `GRUB_HOST_SIZEOF_VOID_P'.
10639 * include/grub/kernel.h (struct grub_module_header): Type of
10640 member offset changed to `grub_host_off_t'. Type of member size
10641 changed to `grub_host_size_t'.
10642 (struct grub_module_info): Type of member offset changed to
10643 `grub_host_off_t'. Type of member size changed to
10644 `grub_host_size_t'.
10646 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10648 Make GRUB's kernel compliant to Multiboot Specification.
10650 * kern/i386/pc/startup.S (multiboot_header): New label.
10651 (multiboot_entry): Likewise.
10652 (multiboot_trampoline): Likewise.
10654 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10655 Increased to 0x4A0.
10657 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10658 put parentheses after a question mark.
10659 [!GRUB_UTIL] (my_mod): New variable.
10661 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10663 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
10665 Adds support for the XFS filesystem. Btrees are not supported
10668 * fs/xfs.c: New file.
10670 * DISTLIST: Added `fs/xfs.c'.
10672 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10673 (grub_probefs_SOURCES): Likewise.
10674 (grub_emu_SOURCES): Likewise.
10675 (pkgdata_MODULES): Add `xfs.mod'.
10676 (xfs_mod_SOURCES): New variable.
10677 (xfs_mod_CFLAGS): Likewise.
10679 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10680 (pkgdata_MODULES): Add `xfs.mod'.
10681 (xfs_mod_SOURCES): New variable.
10682 (xfs_mod_CFLAGS): Likewise.
10684 * util/grub-emu.c (main): Call `grub_xfs_init' and
10687 * include/grub/fs.h (grub_xfs_init): New prototype.
10688 (grub_xfs_fini): Likewise.
10691 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10693 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10694 color modes, allow greater than 16 colors to be configured as
10697 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10699 * normal/completion.c (complete_arguments): Add the qualifier
10700 const into OPTIONS.
10702 From Omniflux <omniflux+lists@omniflux.com>:
10703 * include/grub/terminfo.h: New file.
10704 * include/grub/tparm.h: Likewise.
10705 * include/grub/i386/pc/serial.h: Likewise.
10706 * term/terminfo.c: Likewise.
10707 * term/tparm.c: Likewise.
10708 * term/i386/pc/serial.c: Likewise.
10709 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10711 (terminfo_mod_SOURCES): New variable.
10712 (terminfo_mod_CFLAGS): Likewise.
10713 (serial_mod_SOURCES): Likewise.
10714 (serial_mod_CFLAGS): Likewise.
10716 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10718 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10719 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10720 and kern/powerpc/ieee1275/cmain.c, respectively.
10722 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10723 * kern/powerpc/ieee1275/crt0.S: ... here.
10725 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10726 * kern/powerpc/ieee1275/cmain.c: ... here.
10728 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10729 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10730 instead of boot/powerpc/ieee1275/crt0.S and
10731 boot/powerpc/ieee1275/cmain.c, respectively.
10733 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10734 sectors. It was not used anyway.
10736 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10738 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10739 `unused parameter' warning.
10741 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10743 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10745 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10748 2005-08-28 Marco Gerards <metgerards@student.han.nl>
10750 * include/grub/normal.h (enum grub_completion_type): Added
10751 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10753 * normal/cmdline.c (print_completion): Handle
10754 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10755 * normal/menu_entry.c (store_completion): Likewise.
10757 * normal/completion.c (complete_arguments): New function.
10758 (grub_normal_do_completion): Call `complete_arguments' when the
10759 current words start with a dash.
10761 2005-08-27 Marco Gerards <metgerards@student.han.nl>
10763 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10764 `gzio.mod' instead of `io.mod').
10766 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10768 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10769 (DISTDIRS): Added io and video.
10770 Rewrite the search routine to make an output consistently.
10772 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10773 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10774 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10775 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10776 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10777 util/powerpc/ieee1275/misc.c.
10779 * include/grub/gzio.h: New file.
10780 * io/gzio.c: Likewise.
10782 * kern/file.c (grub_file_close): Call grub_device_close only if
10783 FILE->DEVICE is not NULL.
10785 * include/grub/mm.h [!NULL] (NULL): New macro.
10787 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10789 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10790 (pkgdata_MODULES): Added gzio.mod.
10791 (gzio_mod_SOURCES): New variable.
10792 (gzio_mod_CFLAGS): Likewise.
10794 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10795 (pkgdata_MODULES): Added gzio.mod.
10796 (gzio_mod_SOURCES): New variable.
10797 (gzio_mod_CFLAGS): Likewise.
10799 * commands/cat.c: Include grub/gzio.h.
10800 (grub_cmd_cat): Use grub_gzfile_open instead of
10803 * commands/cmp.c: Include grub/gzio.h.
10804 (grub_cmd_cmp): Use grub_gzfile_open instead of
10807 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10808 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10810 (grub_rescue_cmd_module): Likewise.
10812 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10814 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10815 kern/sparc64/ieee1275/init.c because it contains _start.
10816 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10818 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10820 * configure.ac: Add support for sparc64 host with ieee1275
10822 * configure: Generated from configure.ac.
10823 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10825 (grub_ofdisk_read): Likewise.
10826 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10827 pointers as (void *) to remove a warning.
10828 (grub_ofdisk_close): Likewise.
10829 (grub_ofdisk_read): Likewise.
10830 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10831 returns, so make it return void to remove a warning.
10832 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10833 Corresponding prototype change.
10834 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10835 values, and cast the pointers as (void *) to remove a warning.
10836 (grub_mm_dump): Likewise.
10837 * conf/sparc64-ieee1275.mk: New file.
10838 * conf/sparc64-ieee1275.rmk: Likewise.
10839 * include/grub/sparc64/setjmp.h: Likewise.
10840 * include/grub/sparc64/types.h: Likewise.
10841 * include/grub/sparc64/ieee1275/console.h: Likewise.
10842 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10843 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10844 * include/grub/sparc64/ieee1275/time.h: Likewise.
10845 * kern/sparc64/cache.c: Likewise.
10846 * kern/sparc64/dl.c: Likewise.
10847 * kern/sparc64/ieee1275/init.c: Likewise.
10848 * kern/sparc64/ieee1275/openfw.c: Likewise.
10850 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10852 * util/console.c (grub_ncurses_putchar): If C is greater than
10853 0x7f, set C to a question mark.
10854 (grub_ncurses_getcharwidth): New function.
10855 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10858 * normal/menu.c (print_entry): Made aware of Unicode. First,
10859 convert TITLE to UCS-4, and predict the cursor position by
10862 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10864 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10866 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10868 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10869 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10872 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10873 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10874 grub_strcpy and grub_strlen. Take it into account that a space
10875 character is inserted as a delimiter.
10877 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10879 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10880 invalid magic in the error.
10882 * commands/search.c: New file.
10884 * util/grub-emu.c (main): Call grub_search_init and
10887 * kern/rescue.c (grub_rescue_print_disks): Removed.
10888 (grub_rescue_print_devices): New function.
10889 (grub_rescue_cmd_ls): Use grub_device_iterate with
10890 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10891 grub_rescue_print_disks.
10893 * kern/partition.c (grub_partition_iterate): Return the result of
10894 PARTMAP->ITERATE instead of GRUB_ERRNO.
10896 * kern/device.c: Include grub/partition.h.
10897 (grub_device_iterate): New function.
10899 * include/grub/partition.h (grub_partition_iterate): Return int
10900 instead of grub_err_t.
10902 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10904 [GRUB_UTIL] (grub_search_fini): Likewise.
10906 * include/grub/device.h (grub_device_iterate): New prototype.
10908 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10910 (pkgdata_MODULES): Added search.mod.
10911 (search_mod_SOURCES): New variable.
10912 (search_mod_CFLAGS): Likewise.
10914 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10915 (pkgdata_MODULES): Added search.mod.
10916 (search_mod_SOURCES): New variable.
10917 (search_mod_CFLAGS): Likewise.
10919 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10920 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10921 All callers changed.
10923 * DISTLIST: Added commands/search.c.
10925 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10927 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10929 (grub_getcharwidth): New function.
10931 * kern/misc.c (grub_utf8_to_ucs4): New function.
10933 * include/grub/term.h (struct grub_term): Added a new member
10935 (grub_getcharwidth): New prototype.
10937 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10939 * term/i386/pc/console.c (map_char): New function. Segregated from
10940 grub_console_putchar.
10941 (grub_console_putchar): Use map_char.
10942 (grub_console_getcharwidth): New function.
10943 (grub_console_term): Specified grub_console_getcharwidth as
10946 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10947 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10949 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10951 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10952 on grub_strtoul completely.
10953 (write_char): Declare local variables in the beginning of the
10955 (grub_vesafb_getcharwidth): New function.
10956 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10959 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10961 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10962 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10963 commands/i386/pc/vbetest.c.
10965 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10966 call grub_vbe_get_controller_info again, because the returned
10967 information is volatile.
10968 (grub_vbe_set_video_mode): Mostly rewritten.
10969 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10970 grub_vbe_status_t correctly.
10971 (grub_vbe_get_video_mode_info): Likewise.
10972 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10973 several if statements.
10975 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10976 * commands/i386/pc/vbeinfo.c: ... this.
10978 * commands/i386/pc/vbe_test.c: Renamed to ...
10979 * commands/i386/pc/vbetest.c: ... this.
10981 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10983 (grub_cmd_vbeinfo): ... this. Save video modes before
10984 iterating. Skip a video mode, if it is not available, not enough
10985 information is given or it is monochrome. Show the memory
10986 model. Leave the interpretation of MODEVAR to grub_strtoul
10988 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10989 (GRUB_MOD_FINI): Likewise.
10991 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10992 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10993 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10994 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10995 grub_strtoul completely.
10996 (real2pm): Removed.
10997 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10998 (GRUB_MOD_FINI): Likewise.
11000 * normal/misc.c: Include grub/mm.h.
11002 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11003 vbe_list_modes with vbetest.mod and vbeinfo.mod.
11004 (vbe_list_modes_mod_SOURCES): Removed.
11005 (vbe_list_modes_mod_CFLAGS): Likewise.
11006 (vbe_test_mod_SOURCES): Likewise.
11007 (vbe_test_mod_CFLAGS): Likewise.
11008 (vbeinfo_mod_SOURCES): New variable.
11009 (vbeinfo_mod_CFLAGS): Likewise.
11010 (vbetest_mod_SOURCES): Likewise.
11011 (vbetest_mod_CFLAGS): Likewise.
11013 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
11015 * normal/misc.c: New file.
11017 * DISTLIST: Added normal/misc.c.
11019 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11020 DISK to HOOK. Call HOOK with DISK.
11021 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11022 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11023 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11025 * normal/menu_entry.c (struct screen): Added a new member
11026 "completion_shown".
11027 (completion_buffer): New global variable.
11028 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11029 (store_completion): New function.
11030 (complete): Likewise.
11031 (clear_completions): Likewise.
11032 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11033 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11034 a tab, call complete.
11036 * normal/completion.c (disk_dev): Removed.
11037 (print_simple_completion): Likewise.
11038 (print_partition_completion): Likewise.
11039 (print_func): New global variable.
11040 (add_completion): Do not take the arguments WHAT or PRINT any
11041 longer. Added a new argument TYPE. Instead of printing directly,
11042 call PRINT_FUNC if not NULL.
11043 All callers changed.
11044 (complete_device): Use a local variable DEV instead of
11045 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11046 (grub_normal_do_completion): Take a new argument HOOK. Do not
11047 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11048 empty string, return NULL instead.
11049 All callers changed.
11051 * normal/cmdline.c (print_completion): New function.
11053 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11055 All callers changed.
11057 * kern/disk.c (grub_print_partinfo): Removed.
11059 * include/grub/partition.h (struct grub_partition_map): Add a new
11060 argument DISK into HOOK of ITERATE.
11061 (grub_partition_iterate): Add a new argument DISK to HOOK.
11063 * include/grub/normal.h (enum grub_completion_type): New enum.
11064 (grub_completion_type_t): New type.
11065 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11066 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11067 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11068 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11069 (grub_normal_do_completion): Added a new argument HOOK.
11070 (grub_normal_print_device_info): New prototype.
11072 * include/grub/disk.h (grub_print_partinfo): Removed.
11074 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11075 (normal_mod_SOURCES): Likewise.
11076 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11077 (normal_mod_SOURCES): Likewise.
11079 * commands/ls.c (grub_ls_list_disks): Use
11080 grub_normal_print_device_info instead of grub_print_partinfo. Free
11082 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11083 duplicating the code.
11085 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11087 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
11088 follow GCS more precisely.
11089 * commands/i386/pc/vbe_test.c: Likewise.
11090 * include/grub/i386/pc/vbe.h: Likewise.
11091 * term/i386/pc/vesafb.c: Likewise.
11092 * video/i386/pc/vbe.c: Likewise.
11094 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11096 * DISTLIST: Added term/i386/pc/vesafb.c
11097 DISTLIST: Added video/i386/pc/vbe.c
11098 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11099 DISTLIST: Added commands/i386/pc/vbe_test.c.
11100 * commands/i386/pc/vbe_list_modes.c: New file.
11101 * commands/i386/pc/vbe_test.c: Likewise.
11102 * term/i386/pc/vesafb.c: Likewise.
11103 * video/i386/pc/vbe.c: Likewise.
11104 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11105 (grub_vbe_probe) Added prototype.
11106 (grub_vbe_set_video_mode) Likewise.
11107 (grub_vbe_get_video_mode) Likewise.
11108 (grub_vbe_get_video_mode_info) Likewise.
11109 (grub_vbe_set_pixel_rgb) Likewise.
11110 (grub_vbe_set_pixel_index) Likewise.
11111 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11112 (pkgdata_MODULES): Added vesafb.mod.
11113 (pkgdata_MODULES): Added vbe_list_modes.mod.
11114 (pkgdata_MODULES): Added vbe_test.mod.
11115 (vbe_mod_SOURCES): Added.
11116 (vbe_mod_CFLAGS): Likewise.
11117 (vesafb_mod_SOURCES): Likewise.
11118 (vesafb_mod_CFLAGS): Likewise.
11119 (vbe_list_modes_mod_SOURCES): Likewise.
11120 (vbe_list_modes_mod_CFLAGS): Likewise.
11121 (vbe_test_mod_SOURCES): Likewise.
11122 (vbe_test_mod_CFLAGS): Likewise.
11124 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11126 * normal/command.c (grub_command_execute): If INTERACTIVE is
11127 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11128 CMDLINE. Disable the pager if INTERACTIVE is true.
11129 All callers are changed.
11131 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11132 before reading a config file.
11133 * normal/main.c (read_config_file): Even if a command is not
11134 found, register it if it is within an entry.
11136 * util/grub-emu.c: Include sys/types.h and unistd.h.
11137 (options): Added --hold.
11138 (struct arguments): Added a new member "hold".
11139 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11141 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11142 cleared by a debugger, if it is not zero.
11144 * include/grub/normal.h (grub_command_execute): Add an argument
11147 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11149 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11151 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11153 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11154 program with another one, because the old one didn't detect a bug
11155 in gcc-3.4. Always use regparm 2, because the new test is still
11156 not enough for gcc-4.0. Someone must investigate a simple test
11157 case which detects a bug in gcc-4.0.
11159 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11161 * DISTLIST: Added normal/completion.c.
11163 * normal/completion.c: New file.
11165 * term/i386/pc/console.c (grub_console_getwh): New function.
11166 (grub_console_term): Assign grub_console_getwh to getwh.
11168 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11169 function is defined in normal/completion.c as
11170 grub_normal_do_completion.
11171 (grub_cmdline_get): Use grub_normal_do_completion instead of
11174 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11175 returns non-zero, otherwise return 0.
11176 (grub_partition_iterate): First, probe the partition map. Then,
11177 call ITERATE only for this partition map.
11179 * kern/misc.c (grub_strncmp): Rewritten.
11181 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11182 returns non-zero. Otherwise return 0.
11184 * include/grub/partition.h (grub_partition_map_iterate): Return
11185 int instead of void.
11187 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11189 * include/grub/misc.h (grub_strncmp): Change the type of N to
11192 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11195 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
11196 unsigned explicitly before comparing it with I.
11198 * kern/main.c (grub_env_write_root): Add the attribute unused into
11201 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11202 normal/completion.c.
11203 (normal_mod_SOURCES): Likewise.
11204 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11205 (normal_mod_SOURCES): Likewise.
11207 * normal/command.c (grub_iterate_commands): If ITERATE returns
11208 non-zero, return one immediately.
11210 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11212 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11213 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11215 (grub_vbe_get_controller_info): New function.
11216 (grub_vbe_get_mode_info): Likewise.
11217 (grub_vbe_set_mode): Likewise.
11218 (grub_vbe_get_mode): Likewise.
11219 (grub_vbe_set_memory_window): Likewise.
11220 (grub_vbe_get_memory_window): Likewise.
11221 (grub_vbe_set_scanline_length): Likewise.
11222 (grub_vbe_get_scanline_length): Likewise.
11223 (grub_vbe_set_display_start): Likewise.
11224 (grub_vbe_get_display_start): Likewise.
11225 (grub_vbe_set_palette_data): Likewise.
11226 * include/grub/i386/pc/vbe.h: New file.
11228 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11230 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11231 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11232 * DISTLIST: Likewise.
11233 * kern/ieee1275/of.c: Moved to ...
11234 * kern/ieee1275/ieee1275.c: ... here.
11236 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11238 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11239 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11240 Pass 0 as `end' parameter to grub_strtoul().
11242 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11244 * include/grub/powerpc/ieee1275/console.h: Do not include
11245 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11247 (grub_console_cur_color): Remove i386-specific prototype.
11248 (grub_console_real_putchar): Likewise.
11249 (grub_console_checkkey): Likewise.
11250 (grub_console_getkey): Likewise.
11251 (grub_console_getxy): Likewise.
11252 (grub_console_gotoxy): Likewise.
11253 (grub_console_cls): Likewise.
11254 (grub_console_setcursor): Likewise.
11255 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11256 Include <grub/machine/console.h>.
11257 * term/ieee1275/ofconsole.c: Likewise.
11259 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11261 * Makefile.in (LIBLZO): New variable.
11263 * configure.ac: Check for LZO version 2.
11265 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11266 lzo/lzo1x.h instead of lzo1x.h.
11268 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11271 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11272 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11274 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11275 copying the data from PARTITION to P.
11277 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11279 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11280 negative, unload the module.
11282 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11283 map is "pc_partition_map" but not "pc".
11284 (usage): Fix the description. The options are --boot-image and
11285 --core-image but not --boot-file or --core-file.
11286 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11287 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11290 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11291 --core-file. Specify INSTALL_DEVICE as an argument.
11293 * util/console.c: Include config.h.
11294 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11295 [HAVE_NCURSES_H]: Include ncurses.h.
11296 [HAVE_CURSES_H]: Include curses.h.
11297 [!A_NORMAL] (A_NORMAL): Defined as zero.
11298 [!A_STANDOUT] (A_STANDOUT): Likewise.
11300 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11302 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11304 * configure.ac: Check for curses libraries and headers.
11306 * Makefile.in (LIBCURSES): New variable.
11308 * genmk.rb (Script::rule): Set the executable bits.
11310 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11311 name of the PC partition map is "pc_partition_map" but not "pc".
11313 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11315 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11316 (modules): Likewise.
11317 (usage): Added descriptions for --modules and --grub-probefs.
11318 Handle --modules and --grub-probefs. Save the arguments in MODULES
11319 and GRUB_PROBEFS, respectively.
11320 Auto-detect a filesystem module against GRUBDIR. If the result is
11321 empty and modules are not specified explicitly, abort the
11322 installation. Add the result to MODULES.
11324 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11325 disk/powerpc/ieee1275/ofdisk.c,
11326 include/grub/powerpc/ieee1275/init.h and
11327 term/powerpc/ieee1275/ofconsole.c.
11328 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11329 term/ieee1275/ofconsole.c.
11331 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11333 * COPYING: Upgraded to the latest version. Only the address of the
11334 FSF office has changed.
11336 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11338 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11339 kern/ieee1275.c with kern/ieee1275/of.c.
11341 * kern/ieee1275.c: Moved to ...
11342 * kern/ieee1275/of.c: ... here.
11344 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11346 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
11349 * config.guess: Updated to the latest version from gnulib.
11350 * config.sub: Likewise.
11351 * install.sh: Likewise.
11352 * mkinstalldirs: Likewise.
11354 * include/grub/console.h: Removed. This file is arch-specific. Do
11355 not put this in include/grub.
11357 * include/grub/i386/pc/console.h: Resurrected.
11359 * util/console.c: Include grub/machine/console.h instead of
11361 * util/grub-emu.c: Likewise.
11363 2005-08-04 Marco Gerards <metgerards@student.han.nl>
11365 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11368 From Vincent Pelletier <subdino2004@yahoo.fr>
11369 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11370 Redefined to use grub_getwh.
11371 (grub_term): New member named getwh.
11372 (grub_getwh): New prototype.
11373 * kern/term.c (grub_getwh): New function.
11374 * term/i386/pc/console.c (grub_console_getwh): New function.
11375 (grub_console_term): New member `getwh'.
11376 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11377 (grub_vga_term): New member `getwh'.
11378 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
11380 (grub_ofconsole_getw): New function.
11381 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11382 (grub_ofconsole_term): New field named getwh and new initial
11385 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11387 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11388 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11389 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11390 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11391 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11392 of <grub/machine/ieee1275.h>.
11393 * commands/ieee1275/reboot.c: Likewise.
11394 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11395 * kern/ieee1275.c: ... to here. All users updated. Change all
11396 parameter structs to use new type `grub_ieee1275_cell_t'.
11397 * term/powerpc/ieee1275/ofconsole.c: Move ...
11398 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11399 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11400 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11401 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11403 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11404 Remove unused prototypes. All users updated.
11405 * include/grub/powerpc/ieee1275/console.h: Removed.
11406 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11407 `grub_ieee1275_cell_t'.
11408 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11409 Cast comparisons with -1 to the correct type.
11410 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11411 type to match `grub_ieee1275_entry_fn'.
11413 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11415 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11417 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11418 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11420 (grub_probefs_SOURCES): New variable.
11422 * util/i386/pc/grub-probefs.c: New file.
11424 * util/i386/pc/grub-setup.c (main): Call
11425 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11426 grub_hfs_init and grub_jfs_init to initialize the system. Call
11427 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11428 grub_pc_partition_map_fini to finish the system.
11430 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11432 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11434 (grub_multiboot_load_elf32): Likewise.
11435 (grub_multiboot_is_elf64): Likewise.
11436 (grub_multiboot_load_elf64): Likewise.
11437 (grub_multiboot_load_elf): Likewise.
11438 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11439 an ELF32 or ELF64 file.
11440 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11442 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11443 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11444 NULL before calling FS->LABEL.
11445 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11446 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11447 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11448 before calling FS->LABEL.
11450 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11452 * util/i386/pc/grub-install.in (datadir): New variable.
11454 (pkgdatadir): New variable.
11455 (pkglibdir): Removed.
11457 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11459 * DISTLIST: Added util/i386/pc/grub-install.in.
11461 * util/i386/pc/grub-install.in: New file.
11463 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11464 (grub_install_SOURCES): Likewise.
11466 * genmk.rb: Added support for scripts.
11467 (Script): New class.
11468 (scripts): New variable.
11470 * Makefile.in (install-local): Install sbin_SCRIPTS by
11472 (uninstall): Remove sbin_SCRIPTS.
11474 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11475 device, try to get a GRUB device by
11476 grub_util_biosdisk_get_grub_dev.
11479 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11480 description for --device-map.
11482 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11484 Change the semantics of variable hooks. They now return strings
11485 instead of error values.
11487 * util/i386/pc/grub-setup.c: Include grub/env.h.
11488 (setup): Use grub_device_set_root instead of grub_env_set.
11490 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11491 grub_env_get instead of grub_device_set_root and
11492 grub_device_get_root, respectively.
11494 * kern/main.c (grub_env_write_root): New function.
11495 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11496 grub_env_set instead of grub_device_set_root.
11498 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11500 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11501 rather than calling ENV->WRITE_HOOK afterwards.
11502 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11503 passing a pointer of a pointer.
11504 (grub_register_variable_hook): Change the types of "read_hook" and
11505 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11507 Allocate the default empty string on the heap, because this string
11508 may be freed later.
11510 * kern/device.c: Include grub/env.h.
11511 (grub_device_set_root): Removed.
11512 (grub_device_get_root): Likewise.
11513 (grub_device_open): Use grub_env_get instead of
11514 grub_device_get_root.
11516 * include/grub/env.h (grub_env_read_hook_t): New type.
11517 (grub_env_write_hook_t): Likewise.
11518 (grub_env_var): Change the types of "read_hook" and "write_hook"
11519 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11520 (grub_register_variable_hook): Likewise.
11522 * include/grub/device.h (grub_device_set_root): Removed.
11523 (grub_device_set_root): Likewise.
11525 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11526 make sure that DIRNAME terminates with '/', so that
11527 grub_fat_find_dir will fail if PATH is not a directory.
11529 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11531 Use the qualifier auto for print_files and print_files_long.
11532 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11534 Put a newline only if there is no error.
11535 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11538 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11540 * kern/partition.c (grub_partition_probe): Initialize PART to
11541 NULL. Otherwise, when no partition map is registered, this returns
11544 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11546 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11547 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11550 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11552 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11553 information on each device, if it does not have partitions. Print
11554 "Device" instead of "Disk", because this function is not specific
11557 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11558 static to ensure that it is put on the memory rather than a
11561 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11563 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11564 (grub_cat_init): Likewise.
11565 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11566 (options): Likewise.
11567 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11568 (grub_configfile_init): Likewise.
11569 * font/manager.c (GRUB_MOD_INIT): Likewise.
11570 * commands/help.c (GRUB_MOD_INIT): Likewise.
11571 (grub_help_init): Likewise.
11572 * normal/command.c (grub_command_init): Likewise.
11573 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11574 * disk/loopback.c (grub_loop_init): Likewise.
11575 (GRUB_MOD_INIT): Likewise.
11576 * commands/ls.c (grub_ls_init): Likewise.
11577 (GRUB_MOD_INIT): Likewise.
11578 (options): Likewise.
11579 * commands/boot.c (grub_boot_init): Likewise.
11580 (GRUB_MOD_INIT): Likewise.
11581 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11582 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11583 (GRUB_MOD_INIT): Likewise.
11584 * commands/cmp.c (grub_cmp_init): Likewise.
11585 (GRUB_MOD_INIT): Likewise.
11587 * normal/arg.c: Use <> instead of "" to include header files.
11588 (SHORT_ARG_HELP): New macro.
11589 (SHORT_ARG_USAGE): Likewise.
11590 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11591 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11593 (find_short): Check if C is 'h' or 'u' explicitly.
11594 (grub_arg_show_help): Use space characters instead of tabs. Treat
11595 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11596 are shown with --help and --usage only if they are not used for
11597 the command itself.
11598 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11601 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11602 const into "longarg". Change the type of "shortarg" to int.
11604 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11606 * boot/i386/pc/boot.S (boot_drive_check): New label.
11608 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11611 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11612 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11614 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11616 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11617 When turning off Gate A20, skip the check and return immediately,
11618 because this is not fatal usually.
11620 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11622 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11623 be 0x7C00 instead of 0x8000.
11625 * boot/i386/pc/pxeboot.S: Rewritten.
11627 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11629 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11632 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11634 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11635 robustness. This routine now supports a BIOS call and System
11636 Control Port A to modify the gate A20.
11638 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11639 Increased to 0x440.
11641 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11643 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11644 device path and resulting ihandle.
11645 (grub_ofdisk_close): dprintf the ihandle being closed.
11646 (grub_ofdisk_read): dprintf function parameters.
11647 * kern/mm.c (grub_mm_init_region): Likewise.
11648 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11649 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11650 size, and boot arguments.
11651 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11652 before loading into memory.
11653 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11654 before loading into memory.
11656 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11658 * kern/mm.c: Added much documentation.
11659 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11660 8, set to 5 instead of 8.
11662 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11664 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11666 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11667 (grub_mkdevicemap_SOURCES): New variable.
11669 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11670 lib/device.c of GRUB Legacy.
11672 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11674 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11675 instead of PATH is NULL.
11677 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11679 * commands/cmp.c (BUFFER_SIZE): New macro.
11680 (grub_cmd_cmp): Close the right file at the right time. Compare
11681 only data just read. Don't report files of different size as
11682 identical. Dynamically allocate buffers. Move variable
11683 declarations at the beginning of function.
11685 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
11687 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11690 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11692 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11693 when backspace is pressed at beginning of line.
11695 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
11697 * DISTLIST: Added genfslist.sh.
11699 * normal/main.c (fs_module_list): New variable.
11700 (autoload_fs_module): New function.
11701 (read_fs_list): Likewise.
11702 (grub_normal_execute): Call read_fs_list.
11704 * kern/fs.c (grub_fs_autoload_hook): New variable.
11705 (grub_fs_probe): Added support for auto-loading.
11707 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11708 (grub_fs_module_list_t): New type.
11710 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11711 (grub_fs_autoload_hook): New prototype.
11713 * genfslist.sh: New file.
11715 * genmk.rb: Added a rule to generate a filesystem list.
11717 2005-06-30 Marco Gerards <metgerards@student.han.nl>
11719 * configure.ac: Fix the test for cross-compiling.
11721 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11722 define GRUB_UTIL anymore.
11724 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11725 so this function works on other systems than just big endian.
11726 (load_modules): Likewise.
11727 (add_segments): Likewise.
11729 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11731 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11732 contains `l' modifier, get a long from va_arg().
11734 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11736 * kern/mm.c (grub_free): If the next free block which is being
11737 merged is the first free block, set the first block to the block
11739 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11741 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11743 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11744 `grub_ieee1275_chosen'.
11746 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11748 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11749 (grub_ieee1275_chosen): New variable.
11750 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11752 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11753 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11754 Rename first argument to `phandle' for consistency.
11755 (grub_ieee1275_get_property_length): Likewise.
11756 (grub_ieee1275_next_property): Likewise. Change type of first argument
11757 to grub_ieee1275_phandle_t.
11758 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11759 Move export next to declaration.
11760 (grub_ieee1275_chosen): New variable.
11761 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11762 Correct cosmetic typo.
11763 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11764 `grub_ieee1275_chosen'.
11765 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11766 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11767 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11768 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11769 `grub_ieee1275_chosen'.
11771 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11773 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11775 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11776 /chosen/bootargs as "variable=value" pairs.
11778 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11780 * include/grub/misc.h (grub_dprintf): New macro.
11781 (grub_real_dprintf): New prototype.
11782 (grub_strword): Likewise.
11783 (grub_iswordseparator): Likewise.
11784 * kern/misc.c (grub_real_dprintf): New function.
11785 (grub_strword): Likewise.
11786 (grub_iswordseparator): Likewise.
11788 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11790 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11791 (roundup): Remove macro.
11792 (grub_ieee1275_flags): Make static.
11793 (grub_ieee1275_realmode): Remove.
11794 (grub_ieee1275_test_flag): New function.
11795 (grub_ieee1275_set_flag): Likewise.
11796 (find_options): Rename to `grub_ieee1275_find_options'; update
11797 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11798 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11799 (cmain): New prototype.
11800 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11801 `grub_ieee1275_flags' directly.
11802 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11803 machine/biosdisk.h.
11804 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11805 Don't include grub/machine/init.h.
11806 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11807 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11809 (grub_ieee1275_realmode): Likewise.
11810 (grub_ieee1275_flag): New enum.
11811 (grub_ieee1275_test_flag): New prototype.
11812 (grub_ieee1275_set_flag): New prototype.
11813 * include/grub/powerpc/ieee1275/init.h: Remove file.
11814 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11815 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11816 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11817 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11819 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11820 `grub_ieee1275_test_flag'.
11821 (grub_ieee1275_encode_devname): Likewise.
11823 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11825 * include/grub/powerpc/ieee1275/ieee1275.h
11826 (grub_ieee1275_encode_devname): New prototype.
11827 (grub_ieee1275_get_filename): Likewise.
11828 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11830 (grub_set_prefix): Likewise.
11831 (grub_machine_init): Call grub_set_prefix.
11832 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11833 (grub_parse_type): New enum.
11834 (grub_ieee1275_get_devargs): New function.
11835 (grub_ieee1275_get_devname): Likewise.
11836 (grub_ieee1275_parse_args): Likewise.
11837 (grub_ieee1275_get_filename): Likewise.
11838 (grub_ieee1275_encode_devname): Likewise.
11840 2005-03-30 Marco Gerards <metgerards@student.han.nl>
11842 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11843 `grub_loader_unset'.
11845 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11847 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11848 instead of grub_ieee1275_interpret.
11849 (grub_halt_init): New function.
11850 (grub_halt_fini): Likewise.
11851 (GRUB_MOD_INIT): Correct message grammar.
11852 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11853 instead of grub_ieee1275_interpret.
11854 (grub_reboot_init): New function.
11855 (grub_reboot_fini): Likewise.
11856 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11857 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11858 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11859 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11860 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11862 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11864 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11866 (grub_halt): Likewise.
11867 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11868 (cmain): Remove __attribute__((unused)).
11869 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11870 (grub_heap_len): Likewise.
11871 (grub_machine_fini): New function.
11872 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11873 (grub_halt): Likewise.
11874 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11876 * util/powerpc/ieee1275/misc.c: New file.
11878 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11880 * DISTLIST: New file.
11881 * gendistlist.sh: Likewise.
11883 * Makefile.in (COMMON_DISTFILES): Removed.
11884 (BOOT_DISTFILES): Likewise.
11885 (CONF_DISTFILES): Likewise.
11886 (DISK_DISTFILES): Likewise.
11887 (FS_DISTFILES): Likewise.
11888 (INCLUDE_DISTFILES): Likewise.
11889 (KERN_DISTFILES): Likewise.
11890 (LOADER_DISTFILES): Likewise.
11891 (TERM_DISTFILES): Likewise.
11892 (UTIL_DISTFILES): Likewise.
11893 (DISTFILES): Likewise.
11894 (uninstall): Uninstall files in $(pkgdata_DATA).
11895 (DISTLIST): New target.
11896 (distdir): Use the contents of the file DISTLIST to get a list of
11899 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11901 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11902 descriptor. This is ported from GRUB Legacy.
11904 * gencmdlist.sh: Added an extra semicolon to make it work with
11905 old sed versions. Reported by Robert Bihlmeyer
11906 <robbe@orcus.priv.at>.
11908 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
11910 Automatic loading of commands is supported.
11912 * normal/main.c (read_command_list): New function.
11913 (grub_normal_execute): Call read_command_list.
11915 * normal/command.c (grub_register_command): Return zero or CMD.
11916 Allocate CMD->NAME from the heap.
11917 Initialize CMD->MODULE_NAME to zero.
11918 Find the same name as well. If the same command is found and it is
11919 a dummy command, overwrite members. If it is not a dummy command,
11921 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11922 (grub_command_find): If a dummy command is found, load a module
11923 and retry to find a command only once.
11925 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11926 make sure that each command is loaded.
11928 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11930 (struct grub_command): Remove const from the member `name'.
11931 Add a new member `module_name'.
11932 (grub_register_command): Return grub_command_t.
11934 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11935 sure that each command is loaded.
11937 * genmk.rb (PModule::rule): Specify a module name without the
11938 suffix ".mod" to gencmdlist.sh.
11940 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11942 * gencmdlist.sh: New file.
11944 * genmk.rb (PModule::rule): Generate a rule for a command list.
11946 Generate command.lst from $(COMMANDFILES).
11948 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11949 (DATA): Added $(pkgdata_DATA).
11950 (install-local): Install files in $(pkgdata_DATA).
11952 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11954 * term/i386/pc/vga.c (debug_command): Removed.
11955 (GRUB_MOD_INIT): Do not register the command "debug".
11957 From Hollis Blanchard:
11958 * commands/configfile.c: New file.
11959 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11960 commands/configfile.c.
11961 (pkgdata_MODULES): Added configfile.mod.
11962 (configfile_mod_SOURCES): New variable.
11963 (configfile_mod_CFLAGS): Likewise.
11964 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11965 commands/configfile.c.
11966 (pkgdata_MODULES): Added configfile.mod.
11967 (configfile_mod_SOURCES): New variable.
11968 (configfile_mod_CFLAGS): Likewise.
11969 * util/grub-emu.c (main): Call grub_configfile_init and
11970 grub_configfile_fini.
11971 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11973 [GRUB_UTIL] (grub_configfile_fini): Likewise.
11975 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11977 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11980 * commands/help.c (grub_cmd_help): Do not print newlines after
11981 the last command in print_command_help.
11983 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11985 * commands/default.h: New file.
11986 * commands/timeout.h: Likewise.
11987 * normal/context.c: Likewise.
11989 * util/misc.c: Do not include sys/times.h.
11990 Include sys/time.h and grub/machine/time.h.
11991 (grub_get_rtc): Rewritten with gettimeofday.
11993 * util/grub-emu.c (main): Call grub_default_init and
11994 grub_timeout_init before grub_normal_init, and call
11995 grub_timeout_fini and grub_default_fini after grub_main.
11997 * util/console.c (grub_ncurses_checkkey): Return the read
12000 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12003 * normal/main.c (read_config_file): Push MENU. If this fails,
12004 print an error and wait for a user input.
12005 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12006 If a menu is empty or an error occurs, pop MENU.
12007 (grub_normal_execute): Pop and free MENU after grub_menu_run
12010 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12012 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12014 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12016 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12018 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12021 * include/grub/normal.h (struct grub_menu_list): New struct.
12022 (grub_menu_list_t): New type.
12023 (struct grub_context): New struct.
12024 (grub_context_t): New type.
12025 (grub_register_command): Got rid of EXPORT_FUNC.
12026 (grub_unregister_command): Likewise.
12027 (grub_context_get): New prototype.
12028 (grub_context_get_current_menu): Likewise.
12029 (grub_context_push_menu): Likewise.
12030 (grub_context_pop_menu): Likewise.
12031 [GRUB_UTIL] (grub_default_init): Likewise.
12032 [GRUB_UTIL] (grub_default_fini): Likewise.
12033 [GRUB_UTIL] (grub_timeout_init): Likewise.
12034 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12036 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12037 commands/timeout.c and normal/context.c.
12038 (pkgdata_MODULES): Added default.mod and timeout.mod.
12039 (normal_mod_SOURCES): Added normal/context.c.
12040 (default_mod_SOURCES): New variable.
12041 (default_mod_CFLAGS): Likewise.
12042 (timeout_mod_SOURCES): Likewise.
12043 (timeout_mod_CFLAGS): Likewise.
12044 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12046 (pkgdata_MODULES): Added default.mod and timeout.mod.
12047 (normal_mod_SOURCES): Added normal/context.c.
12048 (default_mod_SOURCES): New variable.
12049 (default_mod_CFLAGS): Likewise.
12050 (timeout_mod_SOURCES): Likewise.
12051 (timeout_mod_CFLAGS): Likewise.
12053 * Makefile.in (all-local): Added $(MKFILES).
12055 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12057 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12058 (grub_emu_SOURCES): Likewise.
12059 (pkgdata_MODULES): Add `sun.mod'.
12060 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12061 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12063 (pkgdata_MODULES): Add `sun.mod'.
12064 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12065 * include/grub/partition.h (grub_sun_partition_map_init): New
12067 (grub_sun_partition_map_fini): Likewise.
12068 * partmap/sun.c: New file.
12069 * util/grub-emu.c (main): Initialize and de-initialize the sun
12070 partitionmap support.
12072 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12074 This implements an Emacs-like menu entry editor.
12076 * normal/menu_entry.c: New file.
12078 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12079 characters to ASCII.
12080 (saved_char): New variable.
12081 (grub_ncurses_checkkey): Rewritten completely.
12082 (grub_ncurses_getkey): Likewise.
12083 (grub_ncurses_init): Call raw instead of cbreak.
12085 * normal/menu.c (print_entry): Do not put a space.
12086 (init_page): Renamed to ...
12087 (grub_menu_init_page): ... this. All callers changed.
12088 (edit_menu_entry): Removed.
12089 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12091 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12093 * kern/misc.c (grub_vprintf): Call grub_refresh.
12095 * normal/menu.c (DISP_LEFT): Renamed to ...
12096 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12097 * normal/menu.c (DISP_UP): Renamed to ...
12098 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12099 * normal/menu.c (DISP_RIGHT): Renamed to ...
12100 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12101 * normal/menu.c (DISP_DOWN): Renamed to ...
12102 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12103 * normal/menu.c (DISP_HLINE): Renamed to ...
12104 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12105 * normal/menu.c (DISP_VLINE): Renamed to ...
12106 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12107 * normal/menu.c (DISP_UL): Renamed to ...
12108 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12109 * normal/menu.c (DISP_UR): Renamed to ...
12110 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12111 * normal/menu.c (DISP_LL): Renamed to ...
12112 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12113 * normal/menu.c (DISP_LR): Renamed to ...
12114 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12115 * normal/menu.c (TERM_WIDTH): Renamed to ...
12116 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12117 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12118 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12119 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12120 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12121 * normal/menu.c (TERM_MARGIN): Renamed to ...
12122 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12123 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12124 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12125 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12126 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12127 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12128 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12129 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12130 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12131 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12132 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12133 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12134 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12135 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12136 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12137 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12138 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12139 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12140 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12141 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12142 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12143 All callers changed.
12145 * include/grub/normal.h: New prototype.
12147 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12148 normal/menu_entry.c.
12149 (normal_mod_SOURCES): Likewise.
12150 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12151 (normal_mod_SOURCES): Likewise.
12153 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12155 * include/grub/normal.h (grub_halt_init): New prototype.
12156 (grub_halt_fini): Likewise.
12157 (grub_reboot_init): Likewise.
12158 (grub_reboot_fini): Likewise.
12160 * util/grub-emu.c: Include signal.h.
12161 (main_env): New global variable.
12162 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12164 (grub_machine_fini): New function.
12165 (main): Call grub_halt_init and grub_reboot_init before
12166 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12167 Call setjmp with MAIN_ENV to go back afterwards.
12168 Call grub_machine_fini right before return.
12170 * include/grub/util/misc.h: Include setjmp.h.
12171 (main_env): New prototype.
12173 * include/grub/kernel.h (grub_machine_fini): New prototype.
12174 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12175 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12177 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12178 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12179 * term/i386/pc/console.c (grub_console_fini): Likewise.
12181 * util/i386/pc/misc.c: New file.
12183 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12184 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12185 commands/i386/pc/reboot.c.
12187 2005-02-14 Guillem Jover <guillem@hadrons.org>
12189 * include/grub/dl.h (grub_dl_check_header): New prototype.
12190 (grub_arch_dl_check_header): Change return type to grub_err_t,
12191 remove size parameter and export function. Update all callers.
12192 * kern/dl.c (grub_dl_check_header): New function.
12193 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12194 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12195 are inside the core.
12196 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12197 independent ELF header checks.
12198 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12199 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12200 `grub_dl_check_header' instead of explicit checks. Check for the
12202 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12203 `grub_dl_check_header' instead of explicit checks. Remove arch
12204 specific ELF header checks.
12206 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12209 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12211 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12212 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12214 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12216 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
12217 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
12218 (part_map_iterate): Clear `grub_errno' and return 0 if
12219 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
12220 * partmap/amiga.c (amiga_partition_map_iterate): Return
12221 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12222 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12224 2005-02-01 Guillem Jover <guillem@hadrons.org>
12226 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12229 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12231 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12233 (grub_rescue_cmd_linux): New prototype.
12234 (grub_rescue_cmd_initrd): Likewise.
12235 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12237 (grub_linux_release_mem): Release the memory for the initrd.
12238 (grub_load_linux): Renamed from this...
12239 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12240 Changed `entry' not to be static. Loop over memory regions to
12241 find another one when the default fails.
12242 (grub_rescue_cmd_initrd): New function.
12243 (grub_linux_init): Remove function.
12244 (grub_linux_fini): Likewise.
12245 (GRUB_MOD_INIT): Register `initrd'.
12246 (GRUB_MOD_FINI): Unregister `initrd'.
12247 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12249 (grub_linux_normal_fini): Likewise.
12250 (GRUB_MOD_INIT): Register `initrd'.
12251 (GRUB_MOD_FINI): Unregister `initrd'.
12253 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12255 * commands/help.c: New file.
12256 * normal/arg.c (show_help): Renamed to...
12257 (grub_arg_show_help): ... this.
12258 * commands/i386/pc/halt.c: New file.
12259 * commands/i386/pc/reboot.c: Likewise.
12260 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12261 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12262 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12263 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12267 (pkgdata_MODULES): Add `help.mod'.
12268 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12269 * grub/i386/pc/init.h (grub_reboot): New prototype.
12270 (grub_halt): Likewise.
12271 * include/grub/normal.h (grub_arg_show_help): New prototype.
12272 (grub_help_init): Likewise.
12273 (grub_help_fini): Likewise.
12274 * util/grub-emu.c (main): Initialize and deinitialize the help
12277 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12279 * normal/command.c (grub_command_init): Fixed the description of
12280 the `set' and `unset' commands.
12282 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12284 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12286 * commands/ieee1275/halt.c: New file.
12287 * commands/ieee1275/reboot.c: Likewise.
12288 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12289 `__attribute__ ((unused))'. Some GCS related fixed.
12290 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12291 (grub_suspend_fini): Likewise.
12292 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12294 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12295 (halt_mod_CFLAGS): New variables.
12296 * include/grub/powerpc/ieee1275/ieee1275.h
12297 (grub_ieee1275_interpret): New prototype.
12299 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12301 * include/grub/misc.h (memmove): New prototype.
12302 (memcpy): Likewise.
12304 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12306 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12307 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12309 2005-01-22 Marco Gerards <metgerards@student.han.nl>
12311 * kern/misc.c (grub_strndup): Function rewritten.
12313 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12315 * normal/menu.c (TERM_WIDTH): Macro redefined.
12316 (TERM_TOP_BORDER_Y): Likewise.
12317 (draw_border): Replaced while-loop by a for-loop. Make the number
12318 of lines consistent with the number of lines displayed in
12319 print_entries. Added a margin below the rectangle.
12320 (print_entry): Make the entry fit in the rectangle.
12321 (print_entries): Display the scroll arrows next to the right
12324 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12326 * fs/minix.c (grub_minix_find_file): Reserve more space for
12327 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12328 `grub_strncpy' to copy `path' into it.
12330 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12332 Add the loopback device, a device via which files can be accessed
12335 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12336 (pkgdata_MODULES): Add loopback.mod.
12337 (loopback_mod_SOURCES): New variable.
12338 (loopback_mod_CFLAGS): Likewise.
12339 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12341 (pkgdata_MODULES): Add loopback.mod.
12342 (loopback_mod_SOURCES): New variable.
12343 (loopback_mod_CFLAGS): Likewise.
12344 * disk/loopback.c: new file.
12345 * include/grub/normal.h (grub_loop_init): New prototype.
12346 (grub_loop_fini): New prototype.
12347 * util/grub-emu.c (main): Initialize and de-initialize loopback
12349 * include/grub/disk.h (grub_disk_dev_id): Add
12350 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12352 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12354 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12356 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12357 (suspend_mod_SOURCES): New variable.
12358 (suspend_mod_CFLAGS): Likewise.
12359 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12361 * commands/ieee1275/suspend.c: New file.
12363 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12365 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
12366 ((unused))' to `__attribute__ ((used))'.
12367 (GRUB_MOD_FINI): Likewise.
12368 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12369 * genmk.rb (PModule): Assign space to common symbols when linking
12372 2005-01-20 Marco Gerards <metgerards@student.han.nl>
12374 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12375 `unsigned' arguments to `grub_size_t'.
12376 (grub_malloc): Likewise.
12377 (grub_realloc): Likewise.
12378 (grub_memalign): Likewise.
12379 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12380 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12381 * util/misc.c (grub_malloc): Likewise.
12382 (grub_realloc): Likewise.
12383 * kern/mm.c (get_header_from_pointer): Change the casts to
12384 `unsigned' into a cast to `grub_size_t'.
12386 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12387 point to `currnode' when `currnode' is changed.
12389 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12390 Schottelius <nico-linux@schottelius.org>.
12392 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12394 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12395 (note_path): Remove variable.
12396 (GRUB_IEEE1275_NOTE_NAME): New macro.
12397 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12398 (grub_ieee1275_note_hdr): New structure.
12399 (grub_ieee1275_note_desc): Likewise.
12400 (grub_ieee1275_note): Likewise.
12401 (load_note): Remove `dir' argument. All callers updated. Remove
12402 `note_img' and `path'. Do not load a file from `note_path'.
12403 Initialize a struct grub_ieee1275_note and write that to `out'.
12404 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12406 2005-01-05 Marco Gerards <metgerards@student.han.nl>
12408 * util/misc.c (grub_util_read_image): Revert last change. It
12409 called `grub_util_read_at', which seeks from the beginning of the
12412 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12414 * TODO: Add note about endianness in grub-mkimage.
12415 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12417 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12418 (grub_mkimage_SOURCES): New target.
12419 * include/grub/kernel.h (grub_start_addr): Remove variable.
12420 (grub_end_addr): Likewise.
12421 (grub_total_module_size): Likewise.
12422 (grub_kernel_image_size): Likewise.
12423 (GRUB_MODULE_MAGIC): New constant.
12424 (grub_module_info): New structure.
12425 (grub_arch_modules_addr): New prototype.
12426 (grub_get_end_addr): Remove prototype.
12427 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12428 * include/grub/powerpc/ieee1275/kernel.h: New file.
12429 * include/grub/util/misc.h (grub_util_get_fp_size): New
12431 (grub_util_read_at): Likewise.
12432 (grub_util_write_image_at): Likewise.
12433 * kern/main.c (grub_get_end_addr): Remove function.
12434 (grub_load_modules): Call grub_arch_modules_addr instead of using
12435 grub_end_addr. Look for a grub_module_info struct in memory. Use
12436 the grub_module_info fields instead of calling grub_get_end_addr
12437 as loop conditions. Move grub_add_unused_region code here.
12438 (grub_add_unused_region): Remove function.
12439 * kern/i386/pc/init.c: Include grub/cache.h.
12440 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12441 one call to add_mem_region.
12442 (grub_arch_modules_addr): New function.
12443 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12444 (grub_total_module_size): Likewise.
12445 Include grub/machine/kernel.h.
12446 (grub_arch_modules_addr): New function.
12447 * util/grub-emu.c (grub_end_addr): Remove variable.
12448 (grub_total_module_size): Likewise.
12449 (grub_arch_modules_addr): New function.
12450 * util/misc.c: Include unistd.h.
12451 (grub_util_get_fp_size): New function.
12452 (grub_util_read_at): Likewise.
12453 (grub_util_write_image_at): Likewise.
12454 (grub_util_read_image): Call grub_util_read_at.
12455 (grub_util_write_image): Call grub_util_write_image_at.
12456 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12457 additional memory in kernel_img for a struct grub_module_info.
12458 Fill in that grub_module_info.
12459 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12461 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12463 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12465 * include/grub/powerpc/ieee1275/ieee1275.h
12466 (grub_ieee1275_milliseconds): New prototype.
12467 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12469 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12470 grub_ieee1275_milliseconds.
12472 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12474 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12476 (find_options): New function.
12477 (cmain): Call find_options.
12478 * include/grub/powerpc/ieee1275/ieee1275.h
12479 (grub_ieee1275_realmode): New extern variable.
12480 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12481 grub_map if grub_ieee1275_realmode is false.
12483 2004-12-29 Marco Gerards <metgerards@student.han.nl>
12485 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12486 lines are inserted and make it work like readline. Reported by
12487 Vincent Pelletier <subdino2004@yahoo.fr>.
12489 2004-12-28 Marco Gerards <metgerards@student.han.nl>
12491 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12493 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12494 `kern/powerpc/cache.S'.
12496 2004-12-27 Marco Gerards <metgerards@student.han.nl>
12498 * genmk.rb: Handle the `Program' class in the main loop. Written
12499 by Johan Rydberg <jrydberg@gnu.org>.
12500 (Program): New class.
12501 (programs): New variable.
12502 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12503 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12504 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12505 (help_arch): Function removed.
12506 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12507 `powerpc/libgcc.h' and `loader.h'.
12508 (pkgdata_PROGRAMS): New variable.
12509 (sbin_UTILITIES): Variable removed.
12510 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12511 (grubof_SOURCES): Variable re-defined so it only includes the
12512 core functionality.
12513 (grubof_CFLAGS): Remove `-DGRUBOF'.
12514 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12515 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12516 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12517 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12518 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12519 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12520 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12521 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12522 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12523 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12524 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12525 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12526 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12527 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12528 (pc_mod_CFLAGS): New variables.
12529 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12530 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12531 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12532 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12534 * include/grub/i386/pc/init.h (grub_os_area_addr)
12535 (rub_os_area_size): ... to here.
12536 * include/grub/powerpc/ieee1275/ieee1275.h
12537 (grub_ieee1275_entry_fn): Export symbol.
12538 * include/grub/powerpc/ieee1275/init.h: New file.
12539 * include/grub/powerpc/libgcc.h: Likewise.
12540 * include/grub/cache.h: Likewise.
12541 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12542 <hollis@penguinppc.org>.
12543 * kern/dl.c: Include <grub/cache.h>.
12544 (grub_dl_flush_cache): New function.
12545 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12547 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12548 (grub_console_init): Removed prototypes.
12549 (grub_machine_init): Don't initialize the modules anymore.
12550 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12552 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12553 Macro undef removed.
12554 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12555 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12556 relocation `R_PPC_REL32'. Return an error when the relocation is
12558 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12559 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12560 * util/misc.c (grub_arch_sync_caches): Likewise.
12562 2004-12-19 Marco Gerards <metgerards@student.han.nl>
12564 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12565 `symlist.c', add `grubof_symlist.c'.
12566 (symlist.c): Variable removed.
12567 (grubof_HEADERS): Variable added.
12568 (grubof_symlist.c): New target.
12569 (kernel_syms.lst): Use `grubof_HEADERS' instead of
12570 `kernel_img_HEADERS'.
12571 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12572 * kern/powerpc/dl.c: New file.
12573 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12575 (grub_arch_dl_relocate_symbols): Likewise.
12576 (grub_register_exported_symbols): Likewise.
12578 2004-12-13 Marco Gerards <metgerards@student.han.nl>
12580 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12581 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12582 to fail instead. Reported by Vincent Pelletier
12583 <subdino2004@yahoo.fr>.
12585 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12586 it is not allocated. Reported by Vincent Pelletier
12587 <subdino2004@yahoo.fr>.
12589 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12590 output so the output looks better.
12592 2004-12-04 Marco Gerards <metgerards@student.han.nl>
12594 Modulize the partition map support and add support for the amiga
12597 * commands/ls.c: Include <grub/partition.h> instead of
12598 <grub/machine/partition.h>.
12599 * kern/disk.c: Likewise.
12600 * kern/rescue.c: Likewise.
12601 * loader/i386/pc/chainloader.c: Likewise.
12602 * normal/cmdline.c: Likewise.
12603 * kern/powerpc/ieee1275/init.c: Likewise.
12604 (grub_machine_init): Call `grub_pc_partition_map_init',
12605 `grub_amiga_partition_map_init' and
12606 `grub_apple_partition_map_init'.
12607 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12608 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12609 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12610 `partition.h' and `pc_partition.h'.
12611 (grub_setup_SOURCES): Remove
12612 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12613 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12614 (grub_emu_SOURCES): Likewise.
12615 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12616 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12617 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12618 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12619 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12620 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12621 (grubof_SOURCES): Likewise.
12622 * disk/i386/pc/partition.c: File removed.
12623 * disk/powerpc/ieee1275/partition.c: Likewise.
12624 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12625 * include/grub/i386/pc/partition.h: Likewise.
12626 * kern/partition.c: New file.
12627 * partmap/amiga.c: Likewise.
12628 * partmap/apple.c: Likewise.
12629 * partmap/pc.c: Likewise.
12630 * include/grub/partition.h: Likewise..
12631 * include/grub/pc_partition.h: Likewise.
12632 * util/grub-emu.c: Include <grub/partition.h> instead of
12633 <grub/machine/partition.h>.
12634 (main): Call `grub_pc_partition_map_init',
12635 `grub_amiga_partition_map_init' and
12636 `grub_apple_partition_map_init' and deinitialize afterwards.
12637 * util/i386/pc/biosdisk.c: Include `#include
12638 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12639 `<grub/machine/partition.h>'.
12640 * util/i386/pc/grub-setup.c: Likewise.
12641 * util/i386/pc/biosdisk.c: Likewise.
12642 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12643 partition information in case of a PC partition.
12644 * util/i386/pc/grub-setup.c: Include `#include
12645 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12646 `<grub/machine/partition.h>'.
12647 (setup): Only access the PC specific partition information in case
12650 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
12652 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12653 (grub_longjmp): Likewise.
12654 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12656 * normal/powerpc/setjmp.S: New file.
12657 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12658 `normal/powerpc/setjmp.S'.
12659 (grubof_CFLAGS): Add `-DGRUBOF'.
12660 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12661 [GRUB_UTIL && !GRUBOF].
12663 2004-11-16 Marco Gerards <metgerards@student.han.nl>
12665 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12666 property named `name'. Correctly handle the error returned by
12667 `grub_ieee1275_finddevice' if a device can not be opened.
12669 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12671 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12672 `actual' for negativity.
12673 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12676 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12678 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12679 (PAGE_OFFSET): New macro.
12680 (CRTC_ADDR_PORT): Likewise.
12681 (CRTC_DATA_PORT): Likewise.
12682 (START_ADDR_HIGH_REGISTER): Likewise.
12683 (START_ADDR_LOW_REGISTER): Likewise.
12684 (GRAPHICS_ADDR_PORT): Likewise.
12685 (GRAPHICS_DATA_PORT): Likewise.
12686 (READ_MAP_REGISTER): Likewise.
12687 (INPUT_STATUS1_REGISTER): Likewise.
12688 (INPUT_STATUS1_VERTR_BIT): Likewise.
12689 (page): New variable.
12690 (wait_vretrace): New function.
12691 (set_read_map): Likewise.
12692 (set_start_address): Likewise.
12693 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12695 (check_vga_mem): Take the page into account.
12696 (write_char): Likewise.
12697 (write_cursor): Likewise.
12698 (scroll_up): Likewise. Copy the page to the page that is not
12699 shown and switch between both pages.
12700 (grub_vga_putchar): Fix off by one error.
12701 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12704 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12706 Add support for iso9660 (including rockridge).
12708 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12709 (iso9660_mod_SOURCES): New variable.
12710 (iso9660_mod_CFLAGS): Likewise.
12711 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12712 * include/grub/fs.h (grub_iso9660_init): New prototype.
12713 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12714 * fs/iso9660.c: New file.
12716 * include/grub/misc.h (grub_strncat): New prototype.
12717 * kern/misc.c (grub_strncat): New function.
12719 * fs/hfs.c (grub_hfs_mount): Translate the error
12720 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12721 * fs/jfs.c (grub_jfs_mount): Likewise.
12722 * fs/ufs.c (grub_ufs_mount): Likewise.
12724 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12726 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12727 which initialized BAT registers.
12728 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12729 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12731 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12732 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12734 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12735 (grub_mapclaim): Likewise.
12736 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12737 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12740 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12742 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12743 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12744 -ffreestanding and -msoft-float.
12746 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12748 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12749 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12750 set in grub_ieee1275_flags.
12752 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12754 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12756 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12757 grub_console_init first.
12758 Change the memory range used for grub_ieee1275_claim and
12759 grub_mm_init_region.
12760 Print an error message if the claim fails.
12761 Include <grub/misc.h>.
12763 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12765 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12766 Call grub_children_iterate for device nodes of type `scsi',
12768 (grub_ofdisk_open): Remove manual device alias resolution.
12769 Fix memory leak when device cannot be opened.
12770 * include/grub/powerpc/ieee1275/ieee1275.h
12771 (grub_children_iterate): New prototype.
12772 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12774 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12775 Return -1 if args.size was -1.
12777 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12779 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12780 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12781 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12782 Open Firmware's memory for it; claim memory from _start to _end.
12783 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12784 (_end): New extern.
12785 (_start): Zero BSS from __bss_start to _end.
12786 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12788 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12790 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12792 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12793 -1 if args.base was -1.
12795 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12797 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12798 escape sequence instead of a literal ^L. Also call
12799 grub_ofconsole_gotoxy.
12801 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12803 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12804 void * arguments to grub_addr_t. All callers updated. Also make
12805 the `result' argument optional.
12806 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12807 All callers updated.
12809 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12811 * commands/ls.c (grub_ls_list_files): Use the string following the
12812 initial ')', if present, as the filesystem path.
12813 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12815 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12817 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12819 Make the source code of the menu interface more readable.
12821 * normal/menu.c: Include grub/mm.h.
12822 (TERM_WIDTH): New macro.
12823 (TERM_HEIGHT): Likewise.
12824 (TERM_INFO_HEIGHT): Likewise.
12825 (TERM_MARGIN): Likewise.
12826 (TERM_SCROLL_WIDTH): Likewise.
12827 (TERM_TOP_BORDER_Y): Likewise.
12828 (TERM_LEFT_BORDER_X): Likewise.
12829 (TERM_BORDER_WIDTH): Likewise.
12830 (TERM_MESSAGE_HEIGHT): Likewise.
12831 (TERM_BORDER_HEIGHT): Likewise.
12832 (TERM_NUM_ENTRIES): Likewise.
12833 (TERM_FIRST_ENTRY_Y): Likewise.
12834 (TERM_ENTRY_WIDTH): Likewise.
12835 (TERM_CURSOR_X): Likewise.
12836 (draw_border): Use macros instead of magic numbers.
12837 (print_entry): Likewise.
12838 (print_entries): Likewise.
12839 (run_menu): Likewise. Also, handle the key 'e'.
12840 (run_menu_entry): Ignore empty command lines.
12841 (print_message): Added a new argument EDIT. If EDIT is true,
12842 print a different message.
12843 (init_page): Likewise.
12844 (edit_menu_entry): New function. Not implemented yet.
12846 2004-09-17 Marco Gerards <metgerards@student.han.nl>
12848 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12849 can be loaded from normal mode.
12851 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12853 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12854 (multiboot_mod_CFLAGS): New variables.
12855 * loader/i386/pc/linux_normal.c: New file.
12856 * loader/i386/pc/multiboot_normal.c: Likewise.
12858 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12859 attribute `unused'.
12861 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12862 `fdiro' to read the mode information from instead of `diro'.
12864 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12865 looking up a symlink.
12867 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12869 * normal/command.c (grub_command_execute): Don't parse the
12870 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12871 flags of the command.
12873 * normal/menu.c (grub_menu_run): Fix typo.
12875 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12877 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12879 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12880 `y + 1' instead of `y - 1'.
12882 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12884 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12886 From Hollis Blanchard <hollis@penguinppc.org>:
12887 * kern/misc.c (memmove): New alias for grub_memmove.
12888 (memcmp): New alias for grub_memcmp.
12889 (memset): New alias for grub_memset.
12890 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12891 Change "int handle" to "grub_ieee1275_phandle_t handle".
12892 * include/grub/powerpc/ieee1275/ieee1275.h
12893 (grub_ieee1275_get_property): Likewise.
12895 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12897 Added normal mode command `chainloader' as module chain.mod, which
12898 depends on normal.mod and _chain.mod.
12900 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12901 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12902 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12904 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12905 but arguments parsing moved to ...
12906 (grub_chainloader_cmd): ... here. New function.
12907 * include/grub/i386/pc/chainloader.h: New file.
12908 * loader/i386/pc/chainloader_normal.c: Likewise.
12910 2004-09-11 Marco Gerards <metgerards@student.han.nl>
12912 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12913 (grub_mkimage_LDFLAGS): Likewise.
12914 (grub_emu_SOURCES): Likewise.
12915 (kernel_img_HEADERS): Added fshelp.h.
12916 * fs/ext2.c: Include <grub/fshelp.h>.
12917 (FILETYPE_REG): New macro.
12918 (FILETYPE_INO_REG): Likewise.
12919 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12921 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12923 (grub_fshelp_node): New struct.
12924 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12926 (grub_ext2_get_file_block): Removed function.
12927 (grub_ext2_read_block): New function.
12928 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12929 This function was written.
12930 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12931 (grub_ext2_find_file): Removed function.
12932 (grub_ext2_read_symlink): New function.
12933 (grub_ext2_iterate_dir): Likewise.
12934 (grub_ext2_open): Rewritten.
12935 (grub_ext2_dir): Rewritten.
12936 * include/grub/fshelp.h: New file.
12937 * fs/fshelp.c: Likewise.
12939 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12941 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12942 (print_message): Add a missing newline.
12943 (run_menu): Added timeout support.
12944 (run_menu_entry): New local function.
12945 (grub_menu_run): Added support for booting.
12947 * kern/loader.c (grub_loader_is_loaded): New function.
12949 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12950 (grub_get_rtc): Exported.
12952 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12953 (grub_get_rtc): Exported.
12955 * include/grub/normal.h (struct grub_command_list): Remove
12956 constant from the member `command'.
12958 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12960 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12962 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12964 2004-08-28 Marco Gerards <metgerards@student.han.nl>
12966 Add support for the JFS filesystem.
12968 * fs/jfs.c: New file.
12969 * include/grub/fs.h (grub_jfs_init): New prototype.
12970 (grub_jfs_fini): New prototype.
12971 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12972 (grub_emu_SOURCES): Likewise.
12973 (pkgdata_MODULES): Add jfs.mod.
12974 (jfs_mod_SOURCES): New variable.
12975 (jfs_mod_CFLAGS): Likewise.
12976 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12977 (grubof_SOURCES): Likewise.
12978 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12980 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12981 endian to the host endian.
12982 (grub_fat_utf16_to_utf8): Move function from there...
12983 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
12984 the endianness of the source string anymore.
12985 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12987 2004-08-24 Marco Gerards <metgerards@student.han.nl>
12989 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12990 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12991 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12992 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12994 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12995 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12996 for `node_found' and `it_dir'.
12997 (grub_hfs_dir): Add prototype for `dir_hook'.
12999 * fs/minix.c (grub_minix_get_file_block): Add prototype for
13000 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
13001 and `indir32' to silence a gcc warning.
13003 * include/grub/fs.h (grub_hfs_init): New prototype.
13004 (grub_hfs_fini): Likewise.
13007 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13009 Each disk device has its own id now. This is useful to make use
13010 of multiple disk devices.
13012 * include/grub/disk.h (grub_disk_dev_id): New enum.
13013 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13014 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13016 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13017 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13019 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13020 GRUB_DISK_DEVICE_OFDISK_ID as an id.
13022 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13023 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13025 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13026 "id" which is used by the cache manager.
13028 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13031 2004-08-18 Marco Gerards <metgerards@student.han.nl>
13033 * fs/hfs.c: New file.
13034 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13035 (grub_emu_SOURCES): Likewise.
13036 (pkgdata_MODULES): Add hfs.mod.
13037 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13038 (grubof_SOURCES): Likewise.
13039 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13041 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13042 * kern/misc.c (grub_strncasecmp): Add function.
13044 2004-08-14 Marco Gerards <metgerards@student.han.nl>
13046 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13049 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13050 (grub_ext2_dir): In case the directory entry type is unknown, read
13053 2004-08-02 Peter Bruin <pjbruin@dds.nl>
13055 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13056 grub_load_linux instead of grub_rescue_cmd_linux as second
13057 argument of grub_rescue_register_command.
13059 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13061 2004-07-27 Marco Gerards <metgerards@student.han.nl>
13063 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13065 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13066 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13067 `loader/powerpc/ieee1275/linux.c',
13068 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13069 * include/grub/powerpc/ieee1275/ieee1275.h
13070 (grub_ieee1275_release): New prototype.
13071 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13072 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13073 normal, boot, linux and linux_normal.
13074 * loader/powerpc/ieee1275/linux.c: New file.
13075 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13077 2004-07-12 Marco Gerards <metgerards@student.han.nl>
13079 * normal/arg.c (grub_arg_parse): Correct error handling after
13080 reallocating the argumentlist (check if `argl' is not null instead
13081 of checking if `args' is not null).
13082 * kern/mm.c (grub_realloc): Return the same pointer when using the
13083 same region, instead of returning the header address.
13085 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13087 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13088 one block instead of two when looking for the initial partition.
13089 (grub_partition_probe): Initialize the local variable `p' with 0.
13090 Use base 10 for the grub_strtoul call.
13091 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13092 need for one local variable.
13093 (grub_strtoul): Don't add the new value to `num', instead of that
13096 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13098 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13099 (pxeboot_img_SOURCES): New variable.
13100 (pxeboot_img_ASFLAGS): Likewise.
13101 (pxeboot_img_LDFLAGS): Likewise.
13102 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13103 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13104 <lode_leroy@hotmail.com>.
13106 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13108 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13109 there was no input.
13111 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13113 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13114 the history buffer logic.
13116 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13118 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13119 (FILETYPE_INO_SYMLINK): New macros.
13120 (grub_ext2_find_file): Check if the node is a directory using the
13121 inode stat information instead of using the filetype in the
13122 dirent. Exclude the first character of an absolute symlink.
13123 (grub_ext2_dir): Mask out the filetype part of the mode member of
13126 2004-05-24 Marco Gerards <metgerards@student.han.nl>
13128 Add support for UFS version 1 and 2. Add support for the minix
13129 filesystem version 1 and 2, both the variants with 14 and 30 long
13132 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13134 (grub_emu_SOURCES): Likewise.
13135 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13136 (ufs_mod_SOURCES): New variable.
13137 (ufs_mod_CFLAGS): Likewise.
13138 (minix_mod_SOURCES): Likewise.
13139 (minix_mod_CFLAGS): Likewise.
13140 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13142 (grubof_SOURCES): Likewise.
13143 * fs/ufs.c: New file.
13144 * fs/minix.c: New file.
13145 * include/grub/fs.h (grub_ufs_init): New prototype.
13146 (grub_ufs_fini): Likewise.
13147 (grub_minix_init): Likewise.
13148 (grub_minix_fini): Likewise.
13149 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13152 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13154 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13155 commands/ls.c, commands/terminal.c, commands/boot.c,
13156 commands/cmp.c and commands/cat.c.
13157 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13159 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13162 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13164 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13165 and grub_, respectively. Because the conversion is trivial and
13166 mechanical, I omit the details here. Please refer to the CVS
13167 if you need more information.
13169 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13171 * include/pupa: Renamed to ...
13172 * include/grub: ... this.
13173 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13174 * util/i386/pc/grub-mkimage.c: ... this.
13175 * util/i386/pc/pupa-setup.c: Renamed to ...
13176 * util/i386/pc/grub-setup.c: ... this.
13177 * util/pupa-emu.c: Renamed to ...
13178 * util/grub-emu.c: ... this.
13180 2004-03-29 Marco Gerards <metgerards@student.han.nl>
13182 Add support for the newworld apple macintosh (PPC). This has been
13183 tested on the powerbook 2000 only. It only adds support for
13184 generic ieee1275 functions, console and disk support. This should
13185 be easy to port to other architectures with support for Open
13188 * configure.ac: Accept the powerpc as host_cpu. In the case of
13189 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13190 specific tests are only executed while building for the i386.
13191 Inverse test for crosscompile.
13192 * genmk.rb (Utility): Allow assembler files.
13193 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13194 * conf/powerpc-ieee1275.rmk: New file.
13195 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13196 * disk/powerpc/ieee1275/partition.c: Likewise.
13197 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13198 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13199 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13200 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13201 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13202 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13203 * include/pupa/powerpc/ieee1275/loader.h
13204 * include/pupa/powerpc/setjmp.h: Likewise.
13205 * include/pupa/powerpc/types.h: Likewise.
13206 * kern/powerpc/ieee1275/init.c: Likewise.
13207 * kern/powerpc/ieee1275/openfw.c: Likewise.
13208 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13210 These files were written by Johan Rydberg
13211 (jrydberg@night.trouble.net) and I only modified them slightly.
13213 * boot/powerpc/ieee1275/cmain.c: New file.
13214 * boot/powerpc/ieee1275/crt0.S: Likewise.
13215 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13216 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13218 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13220 * Makefile.in: Update copyright.
13221 * genmodsrc.sh: Likewise.
13222 * gensymlist.sh: Likewise.
13223 * term/i386/pc/vga.c: Indent correctly.
13225 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13226 bugreporting address.
13227 * util/i386/pc/pupa-setup.c (usage): Likewise,
13228 (main): Call pupa_ext2_init and pupa_ext2_fini.
13230 * fs/fat.c (log2): Renamed to ...
13231 (fat_log2): ... this.
13232 All callers changed.
13233 * kern/misc.c (memcpy): Alias to pupa_memmove.
13234 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13236 * util/console.c (pupa_ncurses_fini): Return 0.
13238 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13239 Move fail label here.
13240 [__GNU__]: Don't warn when using stat.
13241 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13242 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13243 long int. Use strtol instead of strtoul.
13245 2004-03-14 Marco Gerards <metgerards@student.han.nl>
13247 * commands/boot.c: New file.
13248 * commands/cat.c: Likewise.
13249 * commands/cmp.c: Likewise.
13250 * commands/ls.c: Likewise.
13251 * commands/terminal.c: Likewise.
13252 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13253 (pupa_register_command): Changed interface to match the new
13255 (pupa_command_execute): Changed (almost rewritten) so it uses
13256 pupa_split_command. Added support for setting variables using the
13258 (rescue_command): Changed to work with the new argument parser.
13259 (terminal_command): Moved from here to commands/terminal.c.
13260 (set_command): New function.
13261 (unset_command): New function.
13262 (insmod_command): New function.
13263 (rmmod_command): New function.
13264 (lsmod_command): New function.
13265 (pupa_command_init): Don't initialize the command terminal
13266 anymore. Initialize the commands set, unset, insmod, rmmod and
13268 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13269 (kernel_img_HEADERS): Add arg.h and env.h.
13270 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13271 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13272 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13274 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13276 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13277 (boot_mod_SOURCES): New variable.
13278 (terminal_mod_SOURCES): Likewise.
13279 (ls_mod_SOURCES): Likewise.
13280 (cmp_mod_SOURCES): Likewise.
13281 (cat_mod_SOURCES): Likewise.
13283 * normal/arg.c: New file.
13284 * kern/env.c: Likewise.
13285 * include/pupa/arg.h: Likewise.
13286 * include/pupa/env.h: Likewise.
13287 * font/manager.c (font_command): Changed to match argument parsing
13289 (PUPA_MOD_INIT): Likewise.
13290 * hello/hello.c (pupa_cmd_hello): Likewise.
13291 (PUPA_MOD_INIT): Likewise.
13292 * include/pupa/disk.h: Include <pupa/device.h>.
13293 (pupa_print_partinfo): New prototype.
13294 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13295 (pupa_dl_get_prefix): Likewise.
13296 * include/pupa/misc.h: Include <pupa/err.h>.
13297 (pupa_isgraph): New prototype.
13298 (pupa_isdigit): Likewise.
13299 (pupa_split_cmdline): Likewise.
13300 * include/pupa/normal.h: Include <pupa/arg.h>.
13301 (pupa_command): Changed the prototype of the member `func' to
13302 match the argument parsing interface. Added member `options'.
13303 (pupa_register_command): Updated to match function.
13304 (pupa_arg_parse): New prototype.
13305 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13306 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13307 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13308 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13309 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13310 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13311 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13312 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13313 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13314 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13315 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13316 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13317 * kern/disk.c: Include <pupa/file.h>.
13318 (pupa_print_partinfo): New function.
13319 * kern/dl.c: Include <pupa/env.h>.
13320 (pupa_dl_dir): Variable removed.
13321 (pupa_dl_load): Use the environment variable `prefix' instead of
13322 the variable pupa_dl_dir.
13323 (pupa_dl_set_prefix): Function removed.
13324 (pupa_dl_get_prefix): Likewise.
13325 * kern/i386/pc/init.c: Include <pupa/env.h>.
13326 (pupa_machine_init): Use the environment variable `prefix' instead of
13327 using pupa_dl_set_prefix to set the prefix.
13328 * kern/main.c: Include <pupa/env.h>.
13329 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13330 using pupa_dl_get_prefix to get the prefix.
13331 * kern/misc.c: Include <pupa/env.h>.
13332 (pupa_isdigit): New function.
13333 (pupa_isgraph): Likewise.
13334 (pupa_ftoa): Likewise.
13335 (pupa_vsprintf): Added support for printing values of the type
13336 `double'. Make it possible to format variable output when using
13337 formatting like `%1.2%f'.
13338 (pupa_split_cmdline): New function.
13339 * kern/rescue.c: Include <pupa/env.h>.
13340 (next_word): Removed function.
13341 (pupa_rescue_cmd_prefix): Likewise.
13342 (pupa_rescue_cmd_set): New function.
13343 (pupa_rescue_cmd_unset): New function.
13344 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13345 split the command line instead of splitting it here. Added
13346 support for setting variables using the syntax `foo=bar'. Don't
13347 initialize the prefix command anymore. Initialized the set and
13349 * normal/cmdline.c: Include <pupa/env.h>.
13350 (pupa_tab_complete): Added prototypes for print_simple_completion,
13351 print_partition_completion, add_completion, iterate_commands,
13352 iterate_dev, iterate_part and iterate_dir. Moved code to print
13353 partition information from here to kern/disk.c.
13354 (pupa_cmdline_run): Don't check if the function exists anymore.
13355 * normal/main.c: Include <pupa/env.h>.
13356 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13357 instead of using pupa_dl_get_prefix to get the prefix.
13358 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13359 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13361 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13362 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13363 ((unused))' to silence a gcc warning.
13364 (pupa_vga_setcolor): Likewise.
13365 (debug_command): Changed to match argument parsing
13367 * util/pupa-emu.c: Include <pupa/env.h>.
13368 (options): Added 0's for unused fields to silence a gcc warning.
13370 (main): Use the environment variable `prefix' instead of using
13371 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13372 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13375 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13376 * util/misc.c: Include <malloc.h>.
13377 (pupa_malloc): Rewritten so errors are correctly reported.
13378 (pupa_realloc): Likewise.
13379 (pupa_memalign): Likewise.
13380 (pupa_mm_init_region): Declare unused variables with
13381 `__attribute__ ((unused))' to silence a gcc warning.
13382 * normal/i386/setjmp.S: Remove tab at the end of the file to
13383 silence a gcc warning.
13384 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13385 variables with `__attribute__ ((unused))' to silence a gcc
13387 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13388 local variable i unsigned to silence a gcc warning.
13390 * kern/term.c: Include <pupa/misc.h>.
13391 (pupa_more_lines): New variable.
13392 (pupa_more): Likewise.
13393 (pupa_putcode): When the pager is active pause at the end of every
13395 (pupa_set_more): New function.
13396 * include/pupa/term.h (pupa_set_more): New prototype.
13399 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13401 Now this project is GRUB 2 rather than PUPA. The location of
13402 the CVS repository was moved to GRUB's.
13404 * configure.ac: Use bug-grub as the reporting address.
13405 Use GRUB instead of PUPA.
13406 Change the version number to 1.90.
13408 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13410 * genkernsyms.sh: Updated copyright information.
13411 * genmk.rb: Likewise.
13412 * genmodsrc.sh: Likewise.
13413 * gensymlist.sh: Likewise.
13414 * boot/i386/pc/boot.S: Likewise.
13415 * boot/i386/pc/diskboot.S: Likewise.
13416 * disk/i386/pc/biosdisk.c: Likewise.
13417 * disk/i386/pc/partition.c: Likewise.
13418 * font/manager.c: Likewise.
13419 * fs/ext2.c: Likewise.
13420 * fs/fat.c: Likewise.
13421 * include/pupa/boot.h: Likewise.
13422 * include/pupa/device.h: Likewise.
13423 * include/pupa/disk.h: Likewise.
13424 * include/pupa/dl.h: Likewise.
13425 * include/pupa/elf.h: Likewise.
13426 * include/pupa/err.h: Likewise.
13427 * include/pupa/file.h: Likewise.
13428 * include/pupa/font.h: Likewise.
13429 * include/pupa/fs.h: Likewise.
13430 * include/pupa/kernel.h: Likewise.
13431 * include/pupa/loader.h: Likewise.
13432 * include/pupa/misc.h: Likewise.
13433 * include/pupa/mm.h: Likewise.
13434 * include/pupa/net.h: Likewise.
13435 * include/pupa/normal.h: Likewise.
13436 * include/pupa/rescue.h: Likewise.
13437 * include/pupa/setjmp.h: Likewise.
13438 * include/pupa/symbol.h: Likewise.
13439 * include/pupa/term.h: Likewise.
13440 * include/pupa/types.h: Likewise.
13441 * include/pupa/i386/setjmp.h: Likewise.
13442 * include/pupa/i386/types.h: Likewise.
13443 * include/pupa/i386/pc/biosdisk.h: Likewise.
13444 * include/pupa/i386/pc/boot.h: Likewise.
13445 * include/pupa/i386/pc/console.h: Likewise.
13446 * include/pupa/i386/pc/init.h: Likewise.
13447 * include/pupa/i386/pc/kernel.h: Likewise.
13448 * include/pupa/i386/pc/linux.h: Likewise.
13449 * include/pupa/i386/pc/loader.h: Likewise.
13450 * include/pupa/i386/pc/memory.h: Likewise.
13451 * include/pupa/i386/pc/multiboot.h: Likewise.
13452 * include/pupa/i386/pc/partition.h: Likewise.
13453 * include/pupa/i386/pc/time.h: Likewise.
13454 * include/pupa/i386/pc/vga.h: Likewise.
13455 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13456 * include/pupa/util/getroot.h: Likewise.
13457 * include/pupa/util/misc.h: Likewise.
13458 * include/pupa/util/resolve.h: Likewise.
13459 * kern/device.c: Likewise.
13460 * kern/disk.c: Likewise.
13461 * kern/dl.c: Likewise.
13462 * kern/err.c: Likewise.
13463 * kern/file.c: Likewise.
13464 * kern/fs.c: Likewise.
13465 * kern/loader.c: Likewise.
13466 * kern/main.c: Likewise.
13467 * kern/misc.c: Likewise.
13468 * kern/mm.c: Likewise.
13469 * kern/rescue.c: Likewise.
13470 * kern/term.c: Likewise.
13471 * kern/i386/dl.c: Likewise.
13472 * kern/i386/pc/init.c: Likewise.
13473 * kern/i386/pc/lzo1x.S: Likewise.
13474 * kern/i386/pc/startup.S: Likewise.
13475 * loader/i386/pc/chainloader.c: Likewise.
13476 * loader/i386/pc/linux.c: Likewise.
13477 * loader/i386/pc/multiboot.c: Likewise.
13478 * normal/cmdline.c: Likewise.
13479 * normal/command.c: Likewise.
13480 * normal/main.c: Likewise.
13481 * normal/menu.c: Likewise.
13482 * normal/i386/setjmp.S: Likewise.
13483 * term/i386/pc/console.c: Likewise.
13484 * term/i386/pc/vga.c: Likewise.
13485 * util/console.c: Likewise.
13486 * util/genmoddep.c: Likewise.
13487 * util/misc.c: Likewise.
13488 * util/pupa-emu.c: Likewise.
13489 * util/resolve.c: Likewise.
13490 * util/unifont2pff.rb: Likewise.
13491 * util/i386/pc/biosdisk.c: Likewise.
13492 * util/i386/pc/getroot.c: Likewise.
13493 * util/i386/pc/pupa-mkimage.c: Likewise.
13494 * util/i386/pc/pupa-setup.c: Likewise.
13496 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13498 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13499 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13500 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13501 reading and reset it after reading.
13502 (pupa_ext2_close): Return PUPA_ERR_NONE.
13504 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13506 (struct linux_kernel_header): Add kernel_version and
13508 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13509 pupa_file_read succeeds.
13510 (pupa_rescue_cmd_initrd): Implement.
13512 2003-12-03 Marco Gerards <metgerards@student.han.nl>
13514 * fs/ext2.c (pupa_ext2_label): New function.
13515 (pupa_ext2_fs): Added label.
13516 * fs/fat.c (pupa_fat_label): New function.
13517 (pupa_fat_fs): Added label.
13518 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13520 * kern/misc.c (pupa_strndup): New function.
13521 * include/pupa/misc.h (pupa_strndup): New prototype.
13523 * include/pupa/normal.h: Include <pupa/err.h>.
13524 (pupa_set_history): New prototype.
13525 (pupa_iterate_commands): New prototype.
13526 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13527 <pupa/disk.h>, <pupa/file.h>.
13528 (hist_size): New variable.
13529 (hist_lines): Likewise.
13530 (hist_end): Likewise.
13531 (hist_used): Likewise.
13532 (pupa_set_history): New function.
13533 (pupa_history_get): Likewise.
13534 (pupa_history_add): Likewise.
13535 (pupa_history_replace): Likewise.
13536 (pupa_tab_complete): Likewise.
13537 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13538 completion shows partitionnames while completing partitions, this
13539 feature was suggested by Jeff Bailey.
13540 * normal/command.c (pupa_iterate_commands): New function.
13541 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13542 (pupa_normal_init): Initialize history buffer.
13543 (PUPA_MOD_INIT): Likewise.
13544 (pupa_normal_fini): Free the history buffer.
13545 (PUPA_MOD_FINI): Likewise.
13547 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13550 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13551 * configure.ac [i386]: Check for regparam bug.
13552 (NESTED_FUNC_ATTR) [! i386]: Defined.
13554 2003-11-17 Marco Gerards <metgerards@student.han.nl>
13556 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13557 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13558 (pupa_emu_SOURCES): New variable.
13559 (pupa_emu_LDFLAGS): Likewise.
13560 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
13561 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
13562 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
13563 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13564 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13565 (pupa_jmp_buf): New typedef.
13566 (pupa_setjmp) [PUPA_UTIL]: New macro.
13567 (pupa_longjmp) [PUPA_UTIL]: Likewise.
13568 * include/pupa/term.h (struct pupa_term): New member `refresh'.
13569 (pupa_refresh): New prototype.
13570 * include/pupa/util/getroot.h: New file.
13571 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13573 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13574 (pupa_rescue_cmd_cat): Likewise.
13575 (pupa_rescue_cmd_ls): Likewise.
13576 (pupa_rescue_cmd_testload): Likewise.
13577 (pupa_rescue_cmd_lsmod): Likewise.
13578 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13579 * normal/menu.c (run_menu): Likewise.
13580 * kern/term.c (pupa_cls): Likewise.
13581 (pupa_refresh): New function.
13582 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13583 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13584 * util/console.c: New file.
13586 * util/i386/pc/getroot.c: New file.
13587 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13588 (pupa_putchar): New function.
13589 (pupa_refresh): Likewise.
13590 (xgetcwd): Function moved to ...
13591 (strip_extra_slashes): Likewise.
13592 (get_prefix): Likewise.
13593 * util/i386/pc/getroot.c: ... here.
13594 (find_root_device): Function moved and renamed to...
13595 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13596 Changed all callers.
13597 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13599 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13600 Changed all callers.
13601 * util/misc.c (pupa_memalign): New function.
13602 (pupa_mm_init_region): Likewise.
13603 (pupa_register_exported_symbols): Likewise.
13604 (pupa_putchar): Function removed.
13605 * util/pupa-emu.c: New file.
13607 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13609 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13610 (_multiboot_mod_SOURCES): New variable.
13611 (_multiboot_mod_CFLAGS): Likewise.
13612 * loader/i386/pc/multiboot.c: New file.
13613 * include/pupa/i386/pc/multiboot.h: Likewise.
13614 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13615 (pupa_multiboot_real_boot): New function.
13616 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13617 (pupa_multiboot_real_boot): New prototype.
13618 (pupa_rescue_cmd_multiboot): Likewise
13619 (pupa_rescue_cmd_module): Likewise.
13621 * kern/loader.c (pupa_loader_set): Continue when
13622 pupa_loader_unload_func() fails.
13623 (pupa_loader_unset): New function.
13624 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13626 * kern/misc.c (pupa_stpcpy): New function.
13627 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13629 2003-11-12 Marco Gerards <metgerards@student.han.nl>
13631 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13632 for available extensions.
13634 * include/pupa/i386/pc/time.h: New file.
13635 * kern/disk.c: Include <pupa/machine/time.h>.
13636 (PUPA_CACHE_TIMEOUT): New macro.
13637 (pupa_last_time): New variable.
13638 (pupa_disk_open): Flush the cache when there was a timeout.
13639 (pupa_disk_close): Reset the timer.
13640 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13642 * util/misc.c: Include <sys/times.h>
13643 (pupa_get_rtc): New function.
13645 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13647 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13649 (pupa_ext2_get_file_block): Use blocks member.
13651 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13652 first block. Return -1 instead of pupa_errno on error.
13654 2003-10-27 Marco Gerards <metgerards@student.han.nl>
13656 * README: In the pupa-mkimage example use _chain instead of chain
13657 and ext2 instead of fat.
13658 * TODO: Replace ext2fs with jfs as an example. Add an item for
13659 adding journal playback for ext2fs.
13660 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13661 (pkgdata_MODULES): Added ext2.mod.
13662 (ext2_mod_SOURCES): New variable.
13663 (ext2_mod_CFLAGS): Likewise.
13664 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13665 * include/pupa/misc.h (pupa_strncpy): New prototype.
13666 (pupa_strcat): Likewise.
13667 (pupa_strncmp): Likewise.
13668 * kern/misc.c (pupa_strcat): Enable function.
13669 (pupa_strncpy): New function.
13670 (pupa_strncmp): Likewise.
13671 * fs/ext2.c: New file.
13673 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13674 when the read failed before retrying.
13675 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13676 (_FILE_OFFSET_BITS): Likewise.
13677 * configure.ac: Added AC_SYS_LARGEFILE.
13679 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13681 * genmk.rb (PModule#rule): Make sure to get only symbol names
13682 from the output of nm.
13683 Reported by Robert Millan <zeratul2@wanadoo.es>.
13685 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13687 I forgot to check in these changes for a long time. This adds
13688 incomplete support for VGA console, and this is still very
13689 buggy. Also, a lot of consideration is required for I18N,
13690 UNICODE, and VGA font issues. Therefore, assume that this is
13691 such that "better than nothing".
13693 * font/manager.c: New file.
13694 * include/pupa/font.h: Likewise.
13695 * include/pupa/i386/pc/vga.h: Likewise.
13696 * term/i386/pc/vga.c: Likewise.
13697 * util/unifont2pff.rb: Likewise.
13699 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13700 (pkgdata_MODULES): Added vga.mod and font.mod.
13701 (vga_mod_SOURCES): New variables.
13702 (vga_mod_CFLAGS): Likewise.
13703 (font_mod_SOURCES): Likewise.
13704 (font_mod_CFLAGS): Likewise.
13706 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13708 * include/pupa/term.h: Include pupa/err.h.
13709 (struct pupa_term): Added init and fini.
13710 Changed the argument of putchar to pupa_uint32_t.
13712 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13713 (pupa_console_real_putchar): New prototype.
13714 (pupa_console_putchar): Removed.
13715 (pupa_console_checkkey): Exported.
13716 (pupa_console_getkey): Likewise.
13718 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13721 * kern/term.c (pupa_term_set_current): Rewritten.
13722 (pupa_putchar): Likewise.
13723 (pupa_putcode): New function.
13725 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13726 (pupa_console_real_putchar): ... this.
13727 (pupa_vga_set_mode): New function.
13728 (pupa_vga_get_font): Likewise.
13730 * normal/command.c: Include pupa/term.h.
13731 (terminal_command): New function.
13732 (pupa_command_init): Register the command "terminal".
13734 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13735 (DISP_UP): Likewise.
13736 (DISP_RIGHT): Likewise.
13737 (DISP_DOWN): Likewise.
13738 (DISP_HLINE): Likewise.
13739 (DISP_VLINE): Likewise.
13740 (DISP_UL): Likewise.
13741 (DISP_UR): Likewise.
13742 (DISP_LL): Likewise.
13743 (DISP_LR): Likewise.
13745 * term/i386/pc/console.c (pupa_console_putchar): New function.
13747 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13749 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13750 FIX. Reverse the path_list.
13752 * include/pupa/normal.h: Export pupa_register_command and
13753 pupa_unregister_command.
13755 * hello/hello.c (pupa_cmd_hello): New module.
13756 * conf/i386-pc.rmk: Added hello.mod.
13758 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13760 * kern/i386/pc/lzo1x.S: New file.
13762 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13763 (compress_kernel): New variable.
13764 (generate_image): Heavily modified to support compressing a
13765 large part of the core image.
13767 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13769 (pupa_util_load_image): New function.
13771 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13772 (pupa_compressed_size): New variable.
13773 (codestart): Enable Gate A20 here.
13774 Decompress the compressed part of the core image.
13775 Rearrange the code to put functions and variables which are
13776 required for initialization in the non-compressed part.
13779 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13782 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13784 * include/pupa/i386/pc/kernel.h
13785 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13786 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13787 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13788 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13789 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13791 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13793 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13794 (Utility#rule): Likewise.
13796 * configure.ac: Check if LZO is available.
13798 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13800 * include/pupa/normal.h: New file.
13801 * include/pupa/setjmp.h: Likewise.
13802 * include/pupa/i386/setjmp.h: Likewise.
13803 * normal/cmdline.c: Likewise.
13804 * normal/command.c: Likewise.
13805 * normal/main.c: Likewise.
13806 * normal/menu.c: Likewise.
13807 * normal/i386/setjmp.S: Likewise.
13809 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13810 (pupa_rescue_cmd_initrd): Likewise.
13812 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13815 * kern/i386/pc/startup.S (translation_table): New variable.
13816 (translate_keycode): New function.
13817 (pupa_console_getkey): Call translate_keycode.
13819 * kern/rescue.c (attempt_normal_mode): New function.
13820 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13821 it failed, print a message.
13823 * kern/mm.c (pupa_real_malloc): Print more information when a
13824 free magic is broken.
13825 (pupa_free): If the first free header is not free actually, set
13828 * kern/main.c (pupa_load_normal_mode): Just load the module
13830 (pupa_main): Don't print the message
13831 "Entering into rescue mode..." here.
13833 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13835 (pupa_rescue_cmd_initrd): Likewise.
13836 (pupa_rescue_cmd_initrd): Likewise.
13838 * include/pupa/symbol.h (FUNCTION): Specify the type.
13839 (VARIABLE): Likewise.
13841 * include/pupa/err.h (pupa_err_t): Added
13842 PUPA_ERR_UNKNOWN_COMMAND.
13844 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13845 (pupa_dl_get_prefix): Likewise.
13847 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13848 Added _chain.mod and _linux.mod instead of chain.mod and
13850 (chain_mod_SOURCES): Renamed to ...
13851 (_chain_mod_SOURCES): ... this.
13852 (chain_mod_CFLAGS): Renamed to ...
13853 (_chain_mod_CFLAGS): ... this.
13854 (linux_mod_SOURCES): Renamed to ...
13855 (_linux_mod_SOURCES): ... this.
13856 (linux_mod_CFLAGS): Renamed to ...
13857 (_linux_mod_CFLAGS): ... this.
13858 (normal_mod_SOURCES): New variable.
13859 (normal_mod_CFLAGS): Likewise.
13860 (normal_mod_ASFLAGS): Likewise.
13862 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13864 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13867 * kern/dl.c (pupa_dl_ref): Refer depending modules
13869 (pupa_dl_unref): Unrefer depending modules recursively.
13870 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13871 a module is unloaded before one depending on that module is
13873 (pupa_dl_unload): Unload depending modules explicitly,
13876 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13878 * include/pupa/i386/pc/linux.h: New file.
13879 * loader/i386/pc/linux.c: Likewise.
13881 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13883 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13884 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13885 of PUPA_CHAINLOADER_BOOT_SECTOR.
13887 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13888 (pupa_linux_prot_size): New variable.
13889 (pupa_linux_tmp_addr): Likewise.
13890 (pupa_linux_real_addr): Likewise.
13891 (pupa_linux_boot_zimage): New function.
13892 (pupa_linux_boot_bzimage): Likewise.
13894 * kern/i386/pc/init.c (struct mem_region): New structure.
13895 (MAX_REGIONS): New macro.
13896 (mem_regions): New variable.
13897 (num_regions): Likewise.
13898 (pupa_os_area_addr): Likewise.
13899 (pupa_os_area_size): Likewise.
13900 (pupa_lower_mem): Likewise.
13901 (pupa_upper_mem): Likewise.
13902 (add_mem_region): New function.
13903 (compact_mem_regions): Likewise.
13904 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13905 the size of the conventional memory and that of so-called upper
13906 memory (before the first memory hole).
13907 Instead of adding each found region to free memory, use
13908 add_mem_region and add them after removing overlaps.
13909 Also, add only 1/4 of the upper memory to free memory. The rest
13910 is used for loading OS images. Maybe this is ad hoc, but this
13911 makes it much easier to relocate OS images when booting.
13913 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13914 (pupa_enter_rescue_mode): Don't register initrd and module.
13916 * kern/mm.c: Include pupa/dl.h.
13918 * kern/main.c: Include pupa/file.h and pupa/device.h.
13920 * kern/loader.c (pupa_loader_load_module_func): Removed.
13921 (pupa_loader_load_module): Likewise.
13923 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13926 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13927 (pupa_linux_tmp_addr): Likewise.
13928 (pupa_linux_real_addr): Likewise.
13929 (pupa_linux_boot_zimage): Likewise.
13930 (pupa_linux_boot_bzimage): Likewise.
13932 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13933 (pupa_upper_mem): Likewise.
13934 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13935 module is too dangerous.
13937 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13938 (pupa_os_area_size): Likewise.
13939 (pupa_loader_set): Remove the first argument. Loader doesn't
13940 manage modules or initrd any longer.
13941 (pupa_loader_load_module): Removed.
13943 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13944 (linux_mod_SOURCES): New variable.
13945 (linux_mod_CFLAGS): Likewise.
13947 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13949 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13950 the length of a blocklist correctly.
13952 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13953 Use ioctl only if the OS file is a block device.
13954 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13955 not very useful for normal files.
13957 * kern/main.c (pupa_set_root_dev): New function.
13958 (pupa_load_normal_mode): Likewise.
13959 (pupa_main): Call those above.
13961 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13964 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13966 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13968 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13969 (setup): Configure the installed partition information and the
13972 * loader/i386/pc/chainloader.c (my_mod): New variable.
13973 (pupa_chainloader_unload): New function.
13974 (pupa_rescue_cmd_chainloader): Refer itself.
13975 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13977 * kern/i386/pc/startup.S (install_partition): Removed.
13978 (version_string): Likewise.
13979 (config_file): Likewise.
13980 (pupa_install_dos_part): New variable.
13981 (pupa_install_bsd_part): Likewise.
13982 (pupa_prefix): Likewise.
13983 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13985 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13987 (make_install_device): New function.
13988 (pupa_machine_init): Set the dl prefix.
13990 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13991 (buf): Renamed to ...
13992 (linebuf): ... this.
13993 (pupa_rescue_cmd_prefix): New function.
13994 (pupa_rescue_cmd_insmod): Likewise.
13995 (pupa_rescue_cmd_rmmod): Likewise.
13996 (pupa_rescue_cmd_lsmod): Likewise.
13997 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14000 * kern/mm.c (pupa_memalign): If failed even after invalidating
14001 disk caches, unload unneeded modules and retry.
14003 * kern/misc.c (pupa_memmove): New function.
14004 (pupa_memcpy): Removed.
14005 (pupa_strcpy): New function.
14006 (pupa_itoa): Made static.
14008 * kern/dl.c (pupa_dl_iterate): New function.
14009 (pupa_dl_ref): Likewise.
14010 (pupa_dl_unref): Likewise.
14011 (pupa_dl_unload): Return if succeeded or not.
14012 (pupa_dl_unload_unneeded): New function.
14013 (pupa_dl_unload_all): Likewise.
14014 (pupa_dl_init): Renamed to ...
14015 (pupa_dl_set_prefix): ... this.
14016 (pupa_dl_get_prefix): New function.
14018 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14019 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14020 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14021 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14022 (pupa_install_dos_part): Declared.
14023 (pupa_install_bsd_part): Likewise.
14024 (pupa_prefix): Likewise.
14025 (pupa_boot_drive): Likewise.
14027 * include/pupa/types.h: Fix a typo.
14029 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14031 (pupa_memmove): Declared.
14032 (pupa_strcpy): Likewise.
14034 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14035 pupa_mod_init takes one argument, its own module.
14036 (pupa_dl_unload_unneeded): Declared.
14037 (pupa_dl_unload_all): Likewise.
14038 (pupa_dl_ref): Likewise.
14039 (pupa_dl_unref): Likewise.
14040 (pupa_dl_iterate): Likewise.
14041 (pupa_dl_init): Renamed to ...
14042 (pupa_dl_set_prefix): ... this.
14043 (pupa_dl_get_prefix): Declared.
14045 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
14046 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
14048 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14049 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14051 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14052 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14054 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14056 * util/i386/pc/pupa-setup.c (setup): Define the internal
14057 function find_first_partition_start at the top level, because GCC
14058 3.0.x cannot compile internal functions in deeper scopes
14060 (find_root_device): Use lstat instead of stat.
14061 Don't follow symbolic links.
14062 Fix the path-constructing code.
14064 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14065 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14066 by a BLKGETSIZE ioctl first, because block devices don't fill
14067 the member st_mode of the structure stat on Linux.
14068 [__linux__] (linux_find_partition): Use a temporary buffer
14069 REAL_DEV for the working space. Copy it to DEV before returning.
14070 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14071 buffer cache consistent.
14072 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14073 strncmp. The previous value was merely wrong.
14074 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14076 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14077 FAT size is 12. The previous value was merely wrong.
14079 * kern/main.c (pupa_main): Don't split the starting message from
14082 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14083 LF, because BIOS goes crazy about character attributes in this
14086 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14088 * include/i386/pc/util/biosdisk.h: New file.
14089 * util/i386/pc/biosdisk.c: Likewise.
14090 * util/i386/pc/pupa-setup.c: Likewise.
14092 * Makefile.in (INCLUDE_DISTFILES): Added
14093 include/pupa/i386/pc/util/biosdisk.h.
14094 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14095 directory util/i386/pc.
14096 (install-local): Added a rule for sbin_UTILITIES.
14097 (uninstall): Likewise.
14099 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14101 * util/misc.c (xrealloc): New function.
14102 (pupa_malloc): Likewise.
14103 (pupa_free): Likewise.
14104 (pupa_realloc): Likewise.
14105 (pupa_stop): Likewise.
14106 (pupa_putchar): Likewise.
14108 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14110 * include/pupa/util/misc.h (xrealloc): Declared.
14112 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14114 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14115 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14117 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14118 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14120 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14121 way should be implemented.
14122 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14124 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14125 the size of NAME for safety.
14126 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14129 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14130 (pupa_setup_SOURCES): Likewise.
14132 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14134 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14136 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14137 bunch of pushl's from pusha, because this destroys the return
14140 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14142 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14143 This means that any missing prototypes could be fatal. Also, you
14144 must take care when writing assembly code. See the comments at
14145 the beginning of startup.S, for more details.
14147 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14148 compilation mechanism.
14149 (pupa_chainloader_real_boot): Likewise.
14150 (pupa_biosdisk_rw_int13_extensions): Likewise.
14151 (pupa_biosdisk_rw_standard): Likewise.
14152 (pupa_biosdisk_check_int13_extensions): Likewise.
14153 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14154 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14155 (pupa_get_memsize): Likewise.
14156 (pupa_get_mmap_entry): Likewise.
14157 (pupa_console_putchar): Likewise.
14158 (pupa_console_setcursor): Likewise.
14159 (pupa_getrtsecs): Use pushl instead of push.
14161 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14162 memory instead of the stack for a mmap entry, because some
14163 BIOSes may ignore the maximum size and overflow.
14165 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14167 * genmk.rb (PModule#rule): Compile automatically generated
14168 sources with module-specific CFLAGS as well as other sources.
14170 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14172 * configure.ac: Check ld.
14173 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14174 respectively, before checking endianness and sizes.
14176 * Makefile.in (LD): New variable.
14178 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14180 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14182 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14184 * Changelog: New file.