1 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
3 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
5 Based on patch from Javier Martín.
7 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
9 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
10 to avoid false posivites with FAT.
11 (grub_fstest_SOURCES): Likewise.
12 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
14 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
16 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
19 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
21 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
22 bpb.version_specific.fat12_or_fat16.fstype and
23 bpb.version_specific.fat32.fstype.
25 2009-02-08 Robert Millan <rmh@aybabtu.com>
27 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
29 2009-02-08 Robert Millan <rmh@aybabtu.com>
31 * Makefile.in (host_os, host_cpu): New variables.
32 (target_os): Remove. Update all users.
34 2009-02-08 Marco Gerards <marco@gnu.org>
36 * Makefile.in (enable_grub_emu_usb): New variable.
37 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
38 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
39 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
40 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
41 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
42 `usbtest.mod' and `usbms.mod'.
43 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
44 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
45 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
46 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
47 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
50 * disk/usbms.c: New file.
52 * include/grub/usb.h: Likewise.
54 * include/grub/usbtrans.h: Likewise.
56 * include/grub/usbdesc.h: Likewise.
58 * bus/usb/usbtrans.c: Likewise.
60 * bus/usb/ohci.c: Likewise.
62 * bus/usb/uhci.c: Likewise.
64 * bus/usb/usbhub.c: Likewise.
66 * bus/usb/usb.c: Likewise.
68 * commands/usbtest.c: Likewise.
70 * util/usb.c: Likewise.
72 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
74 * configure.ac: Test for libusb presence.
76 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
78 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
80 * kern/mm.c: Add more comments.
82 2009-02-08 Robert Millan <rmh@aybabtu.com>
84 Patch from Javier Martín.
85 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
86 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
88 2009-02-08 Robert Millan <rmh@aybabtu.com>
90 * fs/cpio.c: Split tar functionality to ...
91 * fs/tar.c: ... here (new file). Update all users.
93 2009-02-07 Robert Millan <rmh@aybabtu.com>
95 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
96 backward-incompatible features.
98 Based on patch from Javier Martín, with some adjustments.
100 2009-02-07 Michael Scherer <misc@mandriva.org>
102 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
104 2009-02-07 Robert Millan <rmh@aybabtu.com>
106 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
107 position of `disk/lvm.c' to ensure grub_init_all() always picks it
108 after the RAID stuff.
110 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
112 Fixes problem when running vbetest command as reported by
113 Vladimir Serbinenko <phcoder@gmail.com>.
115 * (grub_vbe_set_video_mode): Fixed problem with text modes.
117 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
119 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
120 /dev/md/NpN style mdraid devices.
122 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
124 * util/unifont2pff.rb: Remove.
126 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
128 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
131 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
133 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
134 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
135 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
136 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
137 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
138 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
139 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
141 2009-02-02 Christian Franke <franke@computer.org>
143 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
145 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
147 * INSTALL: Note that we now require at least autoconf 2.59 and
148 that LZO is optional.
150 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
152 Base on patch on bug #24154 created by Tomas Tintera
155 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
157 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
159 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
162 * normal/parser.y (script_init): Add missing semicolon.
164 2009-01-31 Colin D Bennett <colin@gibibit.com>
166 * normal/main.c: Add include to grub/menu_viewer.h.
167 (free_menu_entry_classes): Added.
168 (grub_normal_menu_addentry): Added class property handling.
169 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
170 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
172 * normal/menu_viewer.c: New file.
174 * normal/menu.c (run_menu_entry): Renamed to ...
175 (grub_menu_execute_entry): ... this and made it as global.
176 (grub_menu_run): Renamed to ...
177 (show_text_menu): ... this and made it local.
178 (show_text_menu): Adapt to new function names.
179 (grub_normal_terminal_menu_viewer): New global variable.
181 * include/grub/menu.h: New file.
183 * include/grub/menu_viewer.h: New file.
185 * include/grub/normal.h: Added include to grub/menu.h.
186 (grub_menu_entry): Moved to include/grub/menu.h.
187 (grub_menu_entry_t): Likewise.
188 (grub_menu): Likewise.
189 (grub_menu_t): Likewise.
190 (grub_normal_terminal_menu_viewer): Added.
191 (grub_menu_execute_entry): Likewise.
192 (grub_menu_run): Removed.
194 * DISTLIST: Added include/grub/menu.h.
195 Added include/grub/menu_viewer.h.
196 Added normal/menu_viewer.c.
198 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
200 * normal/execute.c (grub_script_execute_menuentry): Changed to use
201 arglist for menutitle arguments.
203 * normal/main.c (grub_normal_menu_addentry): Likewise.
205 * normal/parser.y (menuentry): Likewise.
207 * normal/script.c (grub_script_create_cmdmenu): Likewise.
209 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
210 (grub_script_create_cmdmenu): Likewise.
212 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
214 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
217 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
219 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
221 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
223 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
225 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
227 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
229 2009-01-30 Christian Franke <franke@computer.org>
231 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
234 2009-01-27 Pavel Roskin <proski@gnu.org>
236 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
238 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
240 * commands/lsmmap.c: Add include to grub/machine/memory.h.
242 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
244 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
247 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
249 * disk/scsi.c (grub_scsi_read): Fix sign problem.
251 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
253 * util/grub-mkfont.c (usage): Fix typo.
255 * util/elf/grub-mkimage.c (load_modules): Fix warning.
257 2009-01-26 Daniel Mierswa <impulze@impulze.org>
259 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
261 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
263 * kern/misc.c (grub_strcasecmp): New function.
264 (grub_strcasecmp): Use grub_size_t instead of int for length.
266 * include/grub/misc.h: Update function prototypes.
268 2009-01-26 Robert Millan <rmh@aybabtu.com>
270 * configure.ac: Fix cross-compilation check.
272 2009-01-22 Christian Franke <franke@computer.org>
274 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
275 (precision) digit string. Allow `.format2' without `format1' (width).
276 Limit input chars for `%s' output to `format2' if specified. This is
277 compatible with standard printf ().
279 2009-01-22 Christian Franke <franke@computer.org>
281 * disk/ata.c (grub_ata_wait_status): Replace by ...
282 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
283 other status bits may be invalid while BSY is asserted.
284 (grub_ata_check_ready): New function.
285 (grub_ata_cmd): Removed.
286 (grub_ata_wait_drq): New function.
287 (grub_ata_strncpy): Remove inline.
288 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
289 and error check now done by grub_ata_wait_drq ().
290 (grub_ata_pio_write): Likewise.
291 (grub_atapi_identify): Set DEV before check for !BSY. Use
292 grub_ata_wait_drq () to wait for data.
293 (grub_ata_device_initialize): Add status register check to
294 detect missing SATA slave devices. Add debug messages.
295 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
296 (grub_atapi_packet): Set DEV before check for !BSY. Replace
297 transfer loop by grub_ata_pio_write ().
298 (grub_ata_identify): Set DEV before check for !BSY. Use
299 grub_ata_wait_drq () to wait for data.
300 (grub_ata_setaddress): Set DEV before check for !BSY.
301 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
302 read/write in one loop. Fix invalid command on write. Fix incomplete
303 command on (size % batch) == 0. Add missing error check after write of
304 last block. Add debug messages.
305 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
307 2009-01-19 Christian Franke <franke@computer.org>
309 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
310 (GRUB_ATAPI_IREASON_*): Likewise.
311 (grub_ata_pio_write): Fix timeout error return.
312 (grub_atapi_identify): Add grub_ata_wait () after cmd.
313 (grub_atapi_wait_drq): New function.
314 (grub_atapi_packet): New parameter `size'.
315 Use grub_atapi_wait_drq () and direct write instead of
316 grub_ata_pio_write ().
317 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
318 reads the number of bytes requested by the device for each DRQ
320 (grub_atapi_write): Remove old implementation, return not
323 2009-01-19 Christian Franke <franke@computer.org>
325 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
326 of 512 to calculate data size.
327 (grub_scsi_read12): Likewise.
328 (grub_scsi_write10): Likewise.
329 (grub_scsi_write12): Likewise.
330 (grub_scsi_read): Adjust size according to blocksize.
331 Add checks for invalid blocksize and unaligned transfer.
333 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
335 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
337 * term/gfxterm.c (write_char): Fix background rendering for wide
340 2009-01-19 Robert Millan <rmh@aybabtu.com>
342 * config.guess: Update to latest version from config git.
343 * config.sub: Likewise.
345 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
347 * Makefile.in: Change font compilation to use new grub-mkfont instead
350 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
351 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
352 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
353 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
354 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
355 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
356 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
357 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
358 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
360 2009-01-16 Christian Franke <franke@computer.org>
362 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
363 (enum grub_ata_timeout_milliseconds): New enum.
364 (grub_ata_wait_status): Add parameter milliseconds.
365 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
366 recovery from timed-out commands.
367 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
368 return grub_errno instead of REG_ERROR.
369 (grub_ata_pio_write): Add parameter milliseconds.
370 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
371 Pass milliseconds to grub_ata_wait_status () and
372 grub_ata_pio_read ().
373 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
374 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
375 grub_ata_wait_status (). Fix IDENTIFY timeout check.
376 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
377 It is not suitable for device detection, because DEV bit is ignored,
378 the command may run too long, and not all devices set the signature
380 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
381 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
382 Fix device selection, DEV bit must be set first to address the registers
383 of the correct device.
384 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
385 grub_ata_pio_read/write ().
386 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
387 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
389 2009-01-13 Carles Pina i Estany <carles@pina.cat>
391 * util/grub-editenv.c (main): Use fseeko(), not fseek().
393 2009-01-13 Bean <bean123ch@gmail.com>
395 * util/grub-mkfont.c (write_font): forget to remove some debug code.
397 2009-01-13 Bean <bean123ch@gmail.com>
399 * Makefile.in: (enable_grub_mkfont): New variable.
400 (freetype_cflags): Likewise.
401 (freetype_libs): Likewise.
403 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
404 (grub_mkfont_SOURCES): New variable.
405 (grub_mkfont_CFLAGS): Likewise.
406 (grub_mkfont_LDFLAGS): Likewise.
408 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
409 library if `--enable-grub-mkfont' is requested.
410 (enable_grub_mkfont): New variable.
411 (freetype_cflags): Likewise.
412 (freetype_libs): Likewise.
414 * util/grub-mkfont.c: New file.
416 2009-01-12 Christian Franke <franke@computer.org>
418 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
419 mode check. Fix setting of compat_use[].
421 2009-01-10 Robert Millan <rmh@aybabtu.com>
423 Update a few copyright years which we forgot to do in 2008 (only for
424 files whose changes made in 2008 were copyright-significant)
426 * Makefile.in: Add 2008 to Copyright line.
427 * disk/ieee1275/ofdisk.c: Likewise.
428 * disk/efi/efidisk.c: Likewise.
429 * kern/dl.c: Likewise.
430 * kern/sparc64/ieee1275/init.c: Likewise.
431 * kern/mm.c: Likewise.
432 * kern/efi/mm.c: Likewise.
433 * boot/i386/pc/boot.S: Likewise.
434 * genfslist.sh: Likewise.
435 * fs/iso9660.c: Likewise.
436 * fs/hfs.c: Likewise.
437 * fs/jfs.c: Likewise.
438 * fs/minix.c: Likewise.
439 * fs/ufs.c: Likewise.
440 * gensymlist.sh.in: Likewise.
441 * genkernsyms.sh.in: Likewise.
442 * include/grub/misc.h: Likewise.
443 * include/grub/types.h: Likewise.
444 * include/grub/symbol.h: Likewise.
445 * include/grub/elf.h: Likewise.
446 * include/grub/kernel.h: Likewise.
447 * include/grub/disk.h: Likewise.
448 * include/grub/dl.h: Likewise.
449 * include/grub/i386/linux.h: Likewise.
450 * include/grub/i386/pc/biosdisk.h: Likewise.
451 * include/grub/efi/api.h: Likewise.
452 * include/grub/efi/pe32.h: Likewise.
453 * include/grub/util/misc.h: Likewise.
454 * normal/execute.c: Likewise.
455 * normal/arg.c: Likewise.
456 * normal/completion.c: Likewise.
457 * normal/lexer.c: Likewise.
458 * normal/parser.y: Likewise.
459 * normal/misc.c: Likewise.
460 * commands/i386/pc/vbeinfo.c: Likewise.
461 * commands/hexdump.c: Likewise.
462 * commands/terminal.c: Likewise.
463 * commands/ls.c: Likewise.
464 * commands/help.c: Likewise.
465 * partmap/pc.c: Likewise.
466 * loader/efi/chainloader.c: Likewise.
467 * loader/multiboot_loader.c: Likewise.
468 * loader/i386/pc/multiboot2.c: Likewise.
469 * term/efi/console.c: Likewise.
470 * term/i386/pc/serial.c: Likewise.
471 * util/lvm.c: Likewise.
472 * util/console.c: Likewise.
473 * util/i386/efi/grub-mkimage.c: Likewise.
474 * util/raid.c: Likewise.
476 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
478 * commands/videotest.c: Removed include to grub/machine/memory.h.
480 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
481 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
482 (video_mod_SOURCES): Removed.
483 (video_mod_CFLAGS): Likewise.
484 (video_mod_LDFLAGS): Likewise.
485 (gfxterm_mod_SOURCES): Likewise.
486 (gfxterm_mod_CFLAGS): Likewise.
487 (gfxterm_mod_LDFLAGS): Likewise.
488 (videotest_mod_SOURCES): Likewise.
489 (videotest_mod_CFLAGS): Likewise.
490 (videotest_mod_LDFLAGS): Likewise.
491 (bitmap_mod_SOURCES): Likewise.
492 (bitmap_mod_CFLAGS): Likewise.
493 (bitmap_mod_LDFLAGS): Likewise.
494 (tga_mod_SOURCES): Likewise.
495 (tga_mod_CFLAGS): Likewise.
496 (tga_mod_LDFLAGS): Likewise.
497 (jpeg_mod_SOURCES): Likewise.
498 (jpeg_mod_CFLAGS): Likewise.
499 (jpeg_mod_LDFLAGS): Likewise.
500 (png_mod_SOURCES): Likewise.
501 (png_mod_CFLAGS): Likewise.
502 (png_mod_LDFLAGS): Likewise.
504 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
505 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
506 (video_mod_SOURCES): Added.
507 (video_mod_CFLAGS): Likewise.
508 (video_mod_LDFLAGS): Likewise.
509 (videotest_mod_SOURCES): Likewise.
510 (videotest_mod_CFLAGS): Likewise.
511 (videotest_mod_LDFLAGS): Likewise.
512 (bitmap_mod_SOURCES): Likewise.
513 (bitmap_mod_CFLAGS): Likewise.
514 (bitmap_mod_LDFLAGS): Likewise.
515 (tga_mod_SOURCES): Likewise.
516 (tga_mod_CFLAGS): Likewise.
517 (tga_mod_LDFLAGS): Likewise.
518 (jpeg_mod_SOURCES): Likewise.
519 (jpeg_mod_CFLAGS): Likewise.
520 (jpeg_mod_LDFLAGS): Likewise.
521 (png_mod_SOURCES): Likewise.
522 (png_mod_CFLAGS): Likewise.
523 (png_mod_LDFLAGS): Likewise.
524 (gfxterm_mod_SOURCES): Likewise.
525 (gfxterm_mod_CFLAGS): Likewise.
526 (gfxterm_mod_LDFLAGS): Likewise.
528 * term/gfxterm.c: Removed include to grub/machine/memory.h,
529 grub/machine/console.h.
531 2009-01-04 Jerone Young <jerone@gmail.com>
533 Make on screen instructions clearer
535 Based on patch created by Jidanni <jidanni@jidanni.org>
537 * normal/menu.c: print clearer instructions on the screen
539 2009-01-02 Colin D Bennett <colin@gibibit.com>
543 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
544 build system and fixed gfxterm.c to work with different sized fonts.
546 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
548 * configure: Re-generated.
550 * DISTLIST: Removed font/manager.c.
552 Added font/font_cmd.c.
554 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
557 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
559 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
561 * kern/term.c: Changed users of grub_utf8_to_ucs4.
563 * normal/menu.c: Likewise.
565 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
566 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
568 * include/grub/font.h: Replaced with new file.
570 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
571 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
572 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
573 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
574 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
575 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
576 fg_red, fg_green, fg_blue, fg_alpha.
577 (grub_video_adapter): Removed blit_glyph.
578 (grub_video_blit_glyph): Removed.
580 * font/manager.c: Removed file.
582 * font/font.c: New file.
584 * font/font_cmd.c: Likewise.
586 * video/video.c (grub_video_blit_glyph): Removed.
588 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
589 (grub_video_vbe_map_rgba): Likewise.
590 (grub_video_vbe_unmap_color_int): Likewise.
591 (grub_video_vbe_blit_glyph): Removed.
592 (grub_video_vbe_adapter): Removed blit_glyph.
594 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
595 (get_pixel): Likewise.
596 (set_pixel): Likewise.
598 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
600 * term/gfxterm.c: Adapted to new font engine.
602 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
604 * term/i386/pc/vga.c: Likewise.
606 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
608 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
610 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
612 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
614 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
616 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
618 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
620 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
622 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
624 * util/grub.d/00_header.in: Changed to use new loadfont command.
626 * util/grub-mkconfig_lib.in: Changed font extension.
628 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
630 * util/getroot.c (grub_util_get_grub_dev): Add support for
631 /dev/md/dNNpNN style partitionable mdraid devices.
633 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
635 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
636 at a time limit of the PXE TFTP API correctly.
637 (grub_pxefs_close): Likewise.
639 2008-11-29 Robert Millan <rmh@aybabtu.com>
641 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
642 grub_ata_device_initialize() calls.
644 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
646 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
648 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
650 2008-11-28 Robert Millan <rmh@aybabtu.com>
652 Fix build on powerpc-ieee1275. Based on patch created by
653 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
654 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
655 `kern/ieee1275/mmap.c'.
656 * include/grub/powerpc/ieee1275/memory.h: New file.
658 Provide grub-install on coreboot.
659 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
660 (grub_install_SOURCES): New variable.
661 * util/i386/pc/grub-install.in: Add a few condition checks to make it
664 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
666 * util/grub-fstest.c (grub_term_get_current_input): Change return type
667 to `grub_term_input_t'.
668 (grub_term_get_current_output): Change return type to
669 `grub_term_output_t'.
671 2008-11-22 Robert Millan <rmh@aybabtu.com>
673 Fix breakage on coreboot due to declaration mismatch.
674 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
675 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
678 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
679 comments. Avoid copying one more byte than necessary (just in case).
681 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
682 to 0x200000 (avoids trouble with some OFW implementations, and matches
683 with the one in Yaboot).
684 Reported by Manoel Abranches
686 2008-11-20 Robert Millan <rmh@aybabtu.com>
688 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
689 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
691 * util/grub-mkconfig_lib.in (grub_warn): New function.
692 (convert_system_path_to_grub_path): Use grub_warn() when issuing
693 warnings, to obtain consistent formatting.
694 * util/grub.d/00_header.in: Likewise.
695 * util/update-grub_lib.in: Likewise.
697 * loader/i386/linux.c (allocate_pages): Fix a warning.
698 Move comment text to `#error' stanza.
700 Harmonize ieee1275's grub_available_iterate() with the generic
701 grub_machine_mmap_iterate() interface (fixes a recently-introduced
702 build problem on i386-ieee1275):
703 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
704 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
705 parameter `type'. Update all users of this function.
706 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
707 `kern/ieee1275/mmap.c'.
708 * kern/ieee1275/init.c
709 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
711 (grub_machine_mmap_iterate): ... this.
712 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
713 return type to `grub_err_t'. Update all implementations of this
715 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
718 Add `lsmmap' command (lists firmware-provided memory map):
719 * commands/lsmmap.c: New file.
720 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
721 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
723 * conf/powerpc-ieee1275.rmk: Likewise.
724 * conf/i386-coreboot.rmk: Likewise.
725 * conf/i386-ieee1275.rmk: Likewise.
727 2008-11-19 Robert Millan <rmh@aybabtu.com>
729 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
730 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
731 constraints to initrd allocation (based on code from
732 loader/i386/pc/linux.c). Without them, initrd was allocated too high
733 for Linux to find it.
735 2008-11-14 Robert Millan <rmh@aybabtu.com>
737 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
738 order to cope with duplicate slashes.
740 2008-11-14 Robert Millan <rmh@aybabtu.com>
742 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
743 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
744 don't want to mess with lower memory, because it is used in the Linux
747 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
748 an appropriate place in lower memory, between 0x10000 and 0x90000,
749 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
750 is in our heap (probably as a result of it being corrupted during
751 decompression). Add #error instance with comment to explain why this
752 loader isn't currently usable on PC/BIOS.
754 2008-11-14 Robert Millan <rmh@aybabtu.com>
756 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
757 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
759 2008-11-12 Robert Millan <rmh@aybabtu.com>
761 Make loader/i386/linux.c buildable on i386-pc (although disabled).
763 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
764 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
766 * include/grub/i386/pc/memory.h: ... to here.
768 2008-11-12 Robert Millan <rmh@aybabtu.com>
770 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
773 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
774 (grub_console_cur_color, grub_console_real_putchar)
775 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
776 (grub_console_setcolorstate, grub_console_setcolor)
777 (grub_console_getcolor): Move from here ...
778 * include/grub/i386/vga_common.h: ... to here (new file).
780 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
781 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
783 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
784 `<grub/i386/vga_common.h>'.
786 2008-11-12 Robert Millan <rmh@aybabtu.com>
788 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
789 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
790 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
792 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
793 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
795 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
796 grub_console_init() with call to grub_vga_text_init().
797 (grub_machine_fini): Replace call to
798 grub_console_fini() with call to grub_vga_text_fini() and
799 grub_at_keyboard_fini().
801 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
802 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
803 (grub_console_setcolorstate, grub_console_setcolor)
804 (grub_console_getcolor): New function prototypes.
806 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
807 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
808 (grub_vga_text_setcursor): Static-ize.
809 (grub_vga_text_term): New structure.
810 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
812 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
813 (grub_console_cur_color, grub_console_standard_color)
814 (grub_console_normal_color, grub_console_highlight_color)
815 (map_char, grub_console_putchar, grub_console_getcharwidth)
816 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
817 (grub_console_getcolor): Move from here ...
818 * term/i386/vga_common.c: ... to here (same function names).
820 2008-11-12 Robert Millan <rmh@aybabtu.com>
822 Use newly-added Multiboot support in coreboot.
824 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
825 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
827 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
828 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
829 (codestart): Store the MBI in `startup_multiboot_info' when we're
830 being loaded using Multiboot.
832 * kern/i386/coreboot/init.c (grub_machine_init): Move
833 grub_at_keyboard_init() call to beginning of function (useful for
834 debugging). Call grub_machine_mmap_init() before attempting to use
835 grub_machine_mmap_iterate().
836 (grub_lower_mem, grub_upper_mem): Move from here ...
837 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
840 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
843 2008-11-12 Robert Millan <rmh@aybabtu.com>
845 Fix a regression introduced by the at_keyboard.mod split. Because
846 some terminals are default on some platforms and non-default on
847 others, the first terminal being registered determines which is
850 * kern/term.c (grub_term_register_input): If this is the first
851 terminal being registered, set it as the current one.
852 (grub_term_register_output): Likewise.
854 * term/efi/console.c (grub_console_init): Do not call
855 grub_term_set_current_output() or grub_term_set_current_input().
856 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
857 * term/i386/pc/console.c (grub_console_init): Likewise.
858 (grub_console_fini): Do not call grub_term_set_current_input()
859 (but leave grub_term_set_current_output() to restore text mode).
861 2008-11-10 Robert Millan <rmh@aybabtu.com>
863 * util/grub.d/00_header.in: Add backward compatibility check for
864 versions of terminal.mod that don't understand `terminal_input' or
867 2008-11-09 Robert Millan <rmh@aybabtu.com>
869 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
870 `terminal_input' / `terminal_output', not `terminal'.
872 2008-11-08 Robert Millan <rmh@aybabtu.com>
874 * Makefile.in (include_DATA): Fix srcdir=. assumption.
875 (DISTCLEANFILES): Add `build_env.mk'.
877 2008-11-08 Robert Millan <rmh@aybabtu.com>
879 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
880 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
881 members. Update all users.
882 * util/console.c (grub_ncurses_term): Split in ...
883 (grub_ncurses_term_input): ... this, and ...
884 (grub_ncurses_term_output): ... this. Update all users.
885 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
887 2008-11-08 Robert Millan <rmh@aybabtu.com>
889 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
890 (PKGDATA): Add $(pkgdata_SRCDIR).
891 (pkglib_BUILDDIR): New variable.
892 (pkgdata_SRCDIR): New variable.
893 (build_env.mk): New target.
894 (include_DATA): New variable.
895 (install-local): Install $(include_DATA) files in $(includedir).
897 2008-11-07 Pavel Roskin <proski@gnu.org>
899 * gendistlist.sh: Use C locale for sorting to ensure consistent
900 output on all systems.
902 * util/grub.d/00_header.in: Remove incorrect space before
905 2008-11-07 Robert Millan <rmh@aybabtu.com>
907 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
909 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
910 * loader/multiboot_loader.c (find_multi_boot2_header): New function
911 (based on find_multi_boot1_header).
912 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
913 using find_multi_boot2_header(), and abort if neither Multiboot or
914 Multiboot headers were found.
916 2008-11-07 Robert Millan <rmh@aybabtu.com>
918 Modularize at_keyboard.mod:
920 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
921 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
922 (at_keyboard_mod_LDFLAGS): New variables.
924 Actual terminal split:
926 * include/grub/term.h (struct grub_term): Split in ...
927 (struct grub_term_input): ... this, and ...
928 (struct grub_term_output): ... this. Update all users.
929 (grub_term_set_current): Split in ...
930 (grub_term_set_current_input): ... this, and ...
931 (grub_term_set_current_output): ... this.
932 (grub_term_get_current): Split in ...
933 (grub_term_get_current_input): ... this, and ...
934 (grub_term_get_current_output): ... this.
935 (grub_term_register): Split in ...
936 (grub_term_register_input): ... this, and ...
937 (grub_term_register_output): ... this.
938 (grub_term_unregister): Split in ...
939 (grub_term_unregister_input): ... this, and ...
940 (grub_term_unregister_output): ... this.
941 (grub_term_iterate): Split in ...
942 (grub_term_iterate_input): ... this, and ...
943 (grub_term_iterate_output): ... this.
945 * kern/term.c (grub_term_list): Split in ...
946 (grub_term_list_input): ... this, and ...
947 (grub_term_list_output): ... this. Update all users.
948 (grub_cur_term): Split in ...
949 (grub_cur_term_input): ... this, and ...
950 (grub_cur_term_output): ... this. Update all users.
951 (grub_term_set_current): Split in ...
952 (grub_term_set_current_input): ... this, and ...
953 (grub_term_set_current_output): ... this.
954 (grub_term_get_current): Split in ...
955 (grub_term_get_current_input): ... this, and ...
956 (grub_term_get_current_output): ... this.
957 (grub_term_register): Split in ...
958 (grub_term_register_input): ... this, and ...
959 (grub_term_register_output): ... this.
960 (grub_term_unregister): Split in ...
961 (grub_term_unregister_input): ... this, and ...
962 (grub_term_unregister_output): ... this.
963 (grub_term_iterate): Split in ...
964 (grub_term_iterate_input): ... this, and ...
965 (grub_term_iterate_output): ... this.
967 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
968 a check for input and one for output (and only attempt to get keys
969 from user when input works).
971 * util/grub-probe.c (grub_term_get_current): Split in ...
972 (grub_term_get_current_input): ... this, and ...
973 (grub_term_get_current_output): ... this.
974 * util/grub-fstest.c: Likewise.
975 * util/i386/pc/grub-setup.c: Likewise.
976 * util/grub-editenv.c: Likewise.
978 Portability adjustments:
980 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
981 `term/i386/pc/at_keyboard.c'.
982 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
983 grub_keyboard_controller_init() (now handled by terminal .init).
984 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
985 grub_at_keyboard_init().
986 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
987 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
988 at_keyboard.mod via input terminal interface).
989 * include/grub/i386/coreboot/console.h: Convert into a stub for
990 `<grub/i386/pc/console.h>'.
992 Migrate full terminals to new API:
994 * term/efi/console.c (grub_console_term): Split into ...
995 (grub_console_term_input): ... this, and ...
996 (grub_console_term_output): ... this. Update all users.
997 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
998 (grub_ofconsole_init): Split into ...
999 (grub_ofconsole_init_input): ... this, and ...
1000 (grub_ofconsole_init_output): ... this.
1001 (grub_ofconsole_term): Split into ...
1002 (grub_ofconsole_term_input): ... this, and ...
1003 (grub_ofconsole_term_output): ... this. Update all users.
1004 * term/i386/pc/serial.c (grub_serial_term): Split into ...
1005 (grub_serial_term_input): ... this, and ...
1006 (grub_serial_term_output): ... this. Update all users.
1007 * term/i386/pc/console.c (grub_console_term): Split into ...
1008 (grub_console_term_input): ... this, and ...
1009 (grub_console_term_output): ... this. Update all users.
1010 (grub_console_term_input): Only enable it on PC/BIOS platform.
1011 (grub_console_init): Remove grub_keyboard_controller_init() call.
1013 Migrate input terminals to new API:
1015 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1016 `i386' and `i386/pc' to enable build on x86_64 (this driver is
1017 i386-specific anyway).
1018 (grub_console_checkkey): Rename to ...
1019 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
1021 (grub_keyboard_controller_orig): New variable.
1022 (grub_console_getkey): Rename to ...
1023 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
1025 (grub_keyboard_controller_init): Static-ize. Save original
1026 controller value so that it can be restored ...
1027 (grub_keyboard_controller_fini): ... here (new function).
1028 (grub_at_keyboard_term): New structure.
1029 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1032 Migrate output terminals to new API:
1034 * term/i386/pc/vga.c (grub_vga_term): Change type to
1035 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1036 members. Update all users.
1037 * term/gfxterm.c (grub_video_term): Change type to
1038 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1039 members. Update all users.
1040 * include/grub/i386/pc/console.h (grub_console_checkkey)
1041 (grub_console_getkey): Do not export (no longer needed by gfxterm,
1044 Migrate `terminal' command and userland tools to new API:
1046 * commands/terminal.c (grub_cmd_terminal): Split into ...
1047 (grub_cmd_terminal_input): ... this, and ...
1048 (grub_cmd_terminal_output): ... this.
1049 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1050 `terminal_input' and `terminal_output'.
1051 * util/grub.d/00_header.in: Adjust `terminal' calls to new
1052 `terminal_input' / `terminal_output' API.
1053 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1054 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1055 provided ${GRUB_TERMINAL}, convert it).
1057 2008-11-04 Robert Millan <rmh@aybabtu.com>
1059 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
1061 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1063 2008-11-03 Bean <bean123ch@gmail.com>
1065 * kern/elf.c (grub_elf32_load): Revert to previous code.
1066 (grub_elf64_load): Likewise.
1068 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1070 2008-11-01 Robert Millan <rmh@aybabtu.com>
1072 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1073 (TARGET_CPPFLAGS): Likewise.
1074 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1076 2008-11-01 Carles Pina i Estany <carles@pina.cat>
1078 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1080 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
1082 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1083 addition of objects until the code is not going to be able to fail.
1085 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
1087 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1088 (add a missing NULL check, and correct them by moving the pointer
1089 operations after the actual check).
1091 2008-10-29 Robert Millan <rmh@aybabtu.com>
1093 * util/i386/pc/grub-install.in: Handle empty string as output from
1094 make_system_path_relative_to_its_root().
1096 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
1098 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1099 circular metadata worst case scenario. If the metadata is circular
1100 then copy the wrap in place.
1101 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1102 project lib/format_text/layout.h
1103 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1105 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
1107 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
1109 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
1111 * util/update-grub_lib.in: Mention filename in warning message.
1113 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
1115 * NEWS: Update for rename of update-grub to grub-mkconfig.
1117 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
1119 * util/update-grub_lib.in: Copy to ...
1120 * util/grub-mkconfig_lib.in: ... this. Update all users.
1121 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
1122 * util/update-grub.in: Rename to ...
1123 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1124 option. Add `--output' option to allow users to specify the generated
1125 configuration file. Default to stdout.
1126 (update_grub_dir): Rename to ...
1127 (grub_mkconfig_dir): ... this.
1128 (grub_cfg): Default to an empty string.
1129 * conf/common.rmk (update-grub): Rename to ...
1130 (grub-mkconfig): ... this.
1131 (update-grub_lib): Copy to ...
1132 (grub-mkconfig_lib): ... this.
1133 (update-grub_SCRIPTS): Copy to ...
1134 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1135 (update-grub_DATA): Rename to ...
1136 (grub-mkconfig_DATA): ... this.
1138 2008-09-28 Robert Millan <rmh@aybabtu.com>
1140 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1141 to `modified'. Add the real `created' field.
1142 (grub_iso9660_uuid): Use `modified' rather than `created' for
1143 constructing the UUID.
1145 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
1147 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1148 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1150 2008-09-28 Bean <bean123ch@gmail.com>
1152 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1153 Thanks to Christian Franke for finding this bug.
1155 2008-09-25 Robert Millan <rmh@aybabtu.com>
1157 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1158 instances of grub_util_get_disk_name() (see previous commit).
1160 2008-09-25 Robert Millan <rmh@aybabtu.com>
1162 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1163 `util/i386/get_disk_name.c'.
1164 * conf/i386-efi.rmk: Likewise.
1165 * conf/x86_64-efi.rmk: Likewise.
1166 * conf/i386-coreboot.rmk: Likewise.
1167 * conf/i386-ieee1275.rmk: Likewise.
1168 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1169 `util/ieee1275/get_disk_name.c'.
1170 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1171 * util/ieee1275/get_disk_name.c: Remove file.
1172 * util/i386/get_disk_name.c: Remove file.
1173 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1174 "hd%d" for device.map entries, rather than using
1175 grub_util_get_disk_name().
1177 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1179 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1181 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1183 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1185 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1187 (GRUB_TERM_PPAGE): Changed to 0x4900.
1189 2008-09-24 Robert Millan <rmh@aybabtu.com>
1191 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1192 macros (they were i386-pc specific).
1193 * include/grub/sparc64/ieee1275/console.h: Likewise.
1194 * include/grub/efi/console.h: Likewise.
1196 2008-09-22 Bean <bean123ch@gmail.com>
1198 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1199 resident and in attribute list.
1201 * include/grub/ntfs.h (BMP_LEN): Removed.
1203 2008-09-22 Bean <bean123ch@gmail.com>
1205 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
1206 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1208 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1209 error occurs, as grub_disk_open will call grub_disk_close, which will
1210 call p->close (scsi).
1212 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1214 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1215 (AC_PREREQ): Bumped to 2.59.
1216 (AC_TRY_COMPILE): Replace obsolete macro with ...
1217 (AC_COMPILE_IFELSE): ... this.
1218 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1219 (AC_LINK_IFELSE): ... this.
1221 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1223 * autogen.sh: Add a call to `gendistlist.sh'.
1225 2008-09-19 Christian Franke <franke@computer.org>
1227 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1228 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1229 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1230 Export __enable_execute_stack() to modules.
1231 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1234 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1236 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1239 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1241 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
1242 #include <grub/util/hostdisk.h>.
1244 2008-09-08 Robert Millan <rmh@aybabtu.com>
1246 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1247 segments when their filesz is zero (grub_file_read() interprets
1248 zero-size as "read until EOF", which results in memory corruption).
1249 Use `lowest_segment' rather than 0 for calculating the current
1250 segment load address.
1252 2008-09-08 Robert Millan <rmh@aybabtu.com>
1254 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1255 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1256 clobbered useful information.
1258 2008-09-08 Robert Millan <rmh@aybabtu.com>
1260 * include/grub/util/biosdisk.h: Move to ...
1261 * include/grub/util/hostdisk.h: ... here. Update all users.
1262 * util/biosdisk.c: Move to ...
1263 * util/hostdisk.c: ... here. Update all users.
1265 2008-09-07 Robert Millan <rmh@aybabtu.com>
1267 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1269 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1270 and length can be stored directly in the `mbi->mmap_addr' and
1271 `mbi->mmap_length' struct fields.
1273 2008-09-07 Robert Millan <rmh@aybabtu.com>
1275 * conf/i386.rmk: New file. Provides declaration for building
1277 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1278 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1280 Include `conf/i386.mk'.
1281 * conf/i386-efi.rmk: Likewise.
1282 * conf/x86_64-efi.rmk: Likewise.
1283 * conf/i386-coreboot.rmk: Likewise.
1284 * conf/i386-ieee1275.rmk: Likewise.
1286 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1288 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1289 Adds optimization support for BGR based modes.
1291 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1292 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1293 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1294 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1295 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1296 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1297 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1298 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1299 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1300 (grub_video_i386_vbeblit_index_index): Likewise.
1301 (grub_video_i386_vbeblit_replace_directN): Added.
1302 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1303 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1304 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1305 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1306 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1307 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1308 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1309 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1310 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1311 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1312 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1313 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1314 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1316 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1317 (grub_video_i386_vbefill_R8G8B8): Likewise.
1318 (grub_video_i386_vbefill_index): Likewise.
1319 (grub_video_i386_vbefill_direct32): Added.
1320 (grub_video_i386_vbefill_direct24): Likewise.
1321 (grub_video_i386_vbefill_direct16): Likewise.
1322 (grub_video_i386_vbefill_direct8): Likewise.
1324 * include/grub/video.h (grub_video_blit_format): Removed
1325 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1326 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1327 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1328 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1329 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
1331 * video/video.c (grub_video_get_blit_format): Updated to use new
1332 blit formats. Added handling for 16 bit color modes.
1334 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
1336 (common_blitter): Updated to use new blitters.
1338 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1340 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1341 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1342 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1343 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1344 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1345 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1346 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1347 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1348 (grub_video_i386_vbeblit_index_index): Likewise.
1349 (grub_video_i386_vbeblit_replace_directN): Added.
1350 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1351 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1352 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1353 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1354 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1355 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1356 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1357 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1358 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1359 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1360 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1361 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1362 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1364 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1365 (grub_video_i386_vbefill_R8G8B8): Likewise.
1366 (grub_video_i386_vbefill_index): Likewise.
1367 (grub_video_i386_vbefill_direct32): Added.
1368 (grub_video_i386_vbefill_direct24): Likewise.
1369 (grub_video_i386_vbefill_direct16): Likewise.
1370 (grub_video_i386_vbefill_direct8): Likewise.
1372 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1375 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1378 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1381 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1384 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1386 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1389 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1391 * fs/iso9660.c (grub_iso9660_date): New structure.
1392 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1393 (grub_iso9660_uuid): New function.
1395 2008-09-05 Bean <bean123ch@gmail.com>
1397 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1399 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1400 insensitive bit for names in Win32 and Win32 & DOS namespace.
1402 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1404 * include/grub/types.h (LONG_MAX): Likewise.
1406 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1408 * util/getroot.c: Include <config.h>.
1409 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1410 add support for /dev/md/N devices and handle LVM double dash escaping.
1412 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1414 * config.guess: Update to latest version from config git.
1415 * config.sub: Likewise.
1417 2008-09-03 Robert Millan <rmh@aybabtu.com>
1419 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1420 `disk->total_sectors'.
1422 2008-09-01 Colin D Bennett <colin@gibibit.com>
1424 * include/grub/normal.h: Fixed incorrect comment for
1425 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1427 2008-09-01 Colin D Bennett <colin@gibibit.com>
1429 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1430 values with defines.
1432 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1433 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1434 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1435 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1436 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1437 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1438 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1439 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1440 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1441 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1442 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1443 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1444 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1445 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1446 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1447 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1448 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1449 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1450 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1452 2008-08-31 Robert Millan <rmh@aybabtu.com>
1454 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1456 (grub_multiboot): Fix a few warnings.
1458 2008-08-31 Robert Millan <rmh@aybabtu.com>
1460 * loader/i386/pc/multiboot.c: Update comment not to say that
1461 boot_device support is unimplemented.
1463 2008-08-31 Robert Millan <rmh@aybabtu.com>
1465 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1466 or memory map support are unimplemented.
1468 2008-08-31 Colin D Bennett <colin@gibibit.com>
1470 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1472 2008-08-31 Colin D Bennett <colin@gibibit.com>
1474 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1475 total video memory in 'vbeinfo' output; show color format details for
1478 2008-08-30 Pavel Roskin <proski@gnu.org>
1480 * util/genmoddep.c: Remove for real this time.
1481 * DISTLIST: Remove util/genmoddep.c.
1483 2008-08-30 Robert Millan <rmh@aybabtu.com>
1485 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1486 as required by Multiboot spec (it was already 4-byte aligned, but
1489 2008-08-29 Pavel Roskin <proski@gnu.org>
1491 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1492 * kern/powerpc/ieee1275/startup.S: ... this.
1493 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1494 * DISTLIST: Likewise.
1496 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1497 grub/cpu/kernel.h. Add start label for consistency with other
1498 platforms. Add grub_prefix immediately after start. Add jump
1499 to the code after grub_prefix.
1500 * include/grub/powerpc/kernel.h: Provide valid values for
1501 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1503 2008-08-29 Bean <bean123ch@gmail.com>
1505 * configure.ac: Change host_os to cygwin for mingw.
1506 (asprintf): New check for function.
1508 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1509 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1511 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
1512 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
1513 sync, sleep and grub_util_get_disk_size for mingw.
1515 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1516 to get size in mingw.
1517 (open_device): Use flag O_BINARY if it's defined.
1518 (find_root_device): Add dummy code for mingw.
1520 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1521 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1522 (get_scsi_disk_name): Return 0 for mingw.
1524 * util/hostfs.c: #include <grub/util/misc.h>.
1525 (grub_hostfs_open): Use "rb" flag to open file, use
1526 grub_util_get_disk_size to get disk size for mingw.
1528 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1529 (asprintf): New function if HAVE_ASPRINTF is not set.
1530 (sync): New function for mingw.
1532 (grub_util_get_disk_size): Likewise.
1534 2008-08-28 Pavel Roskin <proski@gnu.org>
1536 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1539 2008-08-28 Robert Millan <rmh@aybabtu.com>
1541 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1543 2008-08-28 Robert Millan <rmh@aybabtu.com>
1545 Change find_grub_drive() syntax so it doesn't prevent it from
1546 detecting NULL names as errors.
1548 * util/biosdisk.c (find_grub_drive): Move free slot search code
1550 (find_free_slot): ... to here.
1551 (read_device_map): Use find_free_slot() to search for free slots.
1553 2008-08-27 Marco Gerards <marco@gnu.org>
1555 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1556 (scsi_mod_SOURCES): New variable.
1557 (scsi_mod_CFLAGS): Likewise
1558 (scsi_mod_LDFLAGS): Likewise.
1560 * disk/scsi.c: New file.
1562 * include/grub/scsi.h: Likewise.
1564 * include/grub/scsicmd.h: Likewise.
1566 * disk/ata.c: Include <grub/scsi.h>.
1567 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1569 (grub_ata_iterate): Skip ATAPI devices.
1570 (grub_ata_open): Only handle ATAPI devices.
1571 (struct grub_atapi_read): Removed.
1572 (grub_atapi_readsector): Likewise.
1573 (grub_ata_read): No longer handle ATAPI devices.
1574 (grub_ata_write): Likewise.
1575 (grub_atapi_iterate): New function.
1576 (grub_atapi_read): Likewise.
1577 (grub_atapi_write): Likewise.
1578 (grub_atapi_open): Likewise.
1579 (grub_atapi_close): Likewise.
1580 (grub_atapi_dev): New variable.
1581 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1582 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1584 * include/grub/disk.h (enum grub_disk_dev_id): Add
1585 `GRUB_DISK_DEVICE_SCSI_ID'.
1587 2008-08-26 Robert Millan <rmh@aybabtu.com>
1589 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1590 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1593 2008-08-23 Bean <bean123ch@gmail.com>
1595 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1596 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1597 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1598 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1600 (raid5rec_mod_SOURCES): New macro.
1601 (raid5rec_mod_CFLAGS): Likewise.
1602 (raid5rec_mod_LDFLAGS): Likewise.
1603 (raid6rec_mod_SOURCES): Likewise.
1604 (raid6rec_mod_CFLAGS): Likewise.
1605 (raid6rec_mod_LDFLAGS): Likewise.
1606 (mdraid_mod_SOURCES): Likewise.
1607 (mdraid_mod_CFLAGS): Likewise.
1608 (mdraid_mod_LDFLAGS): Likewise.
1609 (dm_nv_mod_SOURCES): Likewise.
1610 (dm_nv_mod_CFLAGS): Likewise.
1611 (dm_nv_mod_LDFLAGS): Likewise.
1613 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1614 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1615 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1617 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1618 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1620 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1622 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1624 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1626 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1628 * disk/raid5_recover.c: New file.
1630 * disk/raid6_recover.c: Likewise.
1632 * disk/mdraid_linux.c: Likewise.
1634 * disk/dmraid_nvidia.c: Likewise.
1636 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1639 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1640 calculate the size of raid device.
1641 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1642 different layout of raid5.
1643 (grub_raid_scan_device): Remove code specific to mdraid.
1644 (grub_raid_list): New variable.
1645 (free_array): New function.
1646 (grub_raid_register): Likewise.
1647 (grub_raid_unregister): Likewise.
1648 (grub_raid_rescan): Likewise.
1649 (GRUB_MOD_INIT): Don't iterate device here.
1650 (GRUB_MOD_FINI): Use free_array to release resource.
1652 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1653 (grub_raid5_recover_func_t): New function variable type.
1654 (grub_raid6_recover_func_t): Likewise.
1655 (grub_raid5_recover_func): New variable.
1656 (grub_raid6_recover_func): Likewise.
1657 (grub_raid_register): New function.
1658 (grub_raid_unregister): Likewise.
1659 (grub_raid_rescan): Likewise.
1660 (grub_raid_block_xor): Likewise.
1662 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1663 (CMD_CRC): New macro.
1665 (read_file): Handle device as well as file.
1666 (cmd_crc): New function.
1667 (fstest): Handle multiple disks.
1668 (options): Remove part, raw and long, add root and diskcount.
1669 (usage): Add crc, remove -p, -r, -l, add -r and -c.
1670 (main): Find the first non option entry and ignore subsequent options,
1671 add handling for the new options, support multiple disks.
1673 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1675 2008-08-23 Bean <bean123ch@gmail.com>
1677 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1679 * genfslist.sh: Ignore kernel.mod.
1681 * genpartmaplist.sh: Likewise.
1683 2008-08-23 Robert Millan <rmh@aybabtu.com>
1685 * util/getroot.c (find_root_device): Skip anything that starts with
1686 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1688 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
1690 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1691 * util/grub.d/00_header.in: Allow the administrator to change default
1692 gfxmode via ${GRUB_GFXMODE}.
1694 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
1696 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1698 2008-08-21 Robert Millan <rmh@aybabtu.com>
1700 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1702 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1703 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1705 2008-08-20 Carles Pina i Estany <carles@pina.cat>
1707 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1708 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1710 2008-08-19 Robert Millan <rmh@aybabtu.com>
1712 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1713 (struct grub_virtual_screen): Remove `cursor_color'.
1714 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1716 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1718 2008-08-18 Robert Millan <rmh@aybabtu.com>
1720 Unify (identical) linux_normal.c files.
1721 * loader/i386/efi/linux_normal.c: Move from here ...
1722 * loader/linux_normal.c: ... to here. Update all users.
1723 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1724 * loader/i386/ieee1275/linux_normal.c: Likewise.
1726 2008-08-18 Robert Millan <rmh@aybabtu.com>
1728 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1729 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1730 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1731 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1732 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1734 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1735 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1736 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1737 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1738 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1739 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1740 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1741 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1742 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1743 portably using grub_getxy().
1744 Replace `-EFI' with `-bzImage' in boot message.
1746 2008-08-17 Robert Millan <rmh@aybabtu.com>
1748 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1750 2008-08-17 Robert Millan <rmh@aybabtu.com>
1752 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1754 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1755 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1756 (grub_machine_mmap_iterate): New function declaration.
1757 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1759 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1762 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1763 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1764 Move e820 parsing from here ...
1765 * kern/i386/pc/mmap.c: New file.
1766 (grub_machine_mmap_iterate): ... to here.
1768 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1769 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1770 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1771 (grub_available_iterate): Redeclare to return `void', and redeclare
1772 its hook to use grub_uint64_t as addr and size parameters, and rename
1774 (grub_machine_mmap_iterate): ... this. Update all users.
1776 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1777 to make it more readable. Rename to ...
1778 (grub_machine_mmap_iterate): ... this.
1780 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1781 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1782 (grub_multiboot): Allocate an extra region after the payload, and fill
1783 it with a Multiboot memory map. Adjust a.out loader to calculate size
1784 with the extra space.
1785 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1786 with the extra space.
1788 2008-08-17 Carles Pina i Estany <carles@pina.cat>
1790 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1792 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
1794 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1795 mdate-sh to the list `find' searches for.
1796 * DISTLIST: Regenerated.
1798 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
1800 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1801 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1802 genmoddep.awk, gensymlist.sh.in.
1803 (DISTDIRS): Add bus, docs, hook, lib.
1804 * DISTLIST: Regenerated.
1805 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1807 2008-08-16 Robert Millan <rmh@aybabtu.com>
1809 * disk/raid.c (grub_raid_init): Handle/report errors set by
1810 grub_device_iterate().
1811 * disk/lvm.c (grub_lvm_init): Likewise.
1813 2008-08-15 Bean <bean123ch@gmail.com>
1815 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1817 (datetime_mod_SOURCES): New macro.
1818 (datetime_mod_CFLAGS): Likewise.
1819 (datetime_mod_LDFLAGS): Likewise.
1820 (date_mod_SOURCES): Likewise.
1821 (date_mod_CFLAGS): Likewise.
1822 (date_mod_LDFLAGS): Likewise.
1823 (datehook_mod_SOURCES): Likewise.
1824 (datehook_mod_CFLAGS): Likewise.
1825 (datehook_mod_LDFLAGS): Likewise.
1827 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1829 (datetime_mod_SOURCES): New macro.
1830 (datetime_mod_CFLAGS): Likewise.
1831 (datetime_mod_LDFLAGS): Likewise.
1832 (date_mod_SOURCES): Likewise.
1833 (date_mod_CFLAGS): Likewise.
1834 (date_mod_LDFLAGS): Likewise.
1835 (datehook_mod_SOURCES): Likewise.
1836 (datehook_mod_CFLAGS): Likewise.
1837 (datehook_mod_LDFLAGS): Likewise.
1839 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1841 (datetime_mod_SOURCES): New macro.
1842 (datetime_mod_CFLAGS): Likewise.
1843 (datetime_mod_LDFLAGS): Likewise.
1844 (date_mod_SOURCES): Likewise.
1845 (date_mod_CFLAGS): Likewise.
1846 (date_mod_LDFLAGS): Likewise.
1847 (datehook_mod_SOURCES): Likewise.
1848 (datehook_mod_CFLAGS): Likewise.
1849 (datehook_mod_LDFLAGS): Likewise.
1851 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1853 (datetime_mod_SOURCES): New macro.
1854 (datetime_mod_CFLAGS): Likewise.
1855 (datetime_mod_LDFLAGS): Likewise.
1856 (date_mod_SOURCES): Likewise.
1857 (date_mod_CFLAGS): Likewise.
1858 (date_mod_LDFLAGS): Likewise.
1859 (datehook_mod_SOURCES): Likewise.
1860 (datehook_mod_CFLAGS): Likewise.
1861 (datehook_mod_LDFLAGS): Likewise.
1863 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1865 (datetime_mod_SOURCES): New macro.
1866 (datetime_mod_CFLAGS): Likewise.
1867 (datetime_mod_LDFLAGS): Likewise.
1868 (date_mod_SOURCES): Likewise.
1869 (date_mod_CFLAGS): Likewise.
1870 (date_mod_LDFLAGS): Likewise.
1871 (datehook_mod_SOURCES): Likewise.
1872 (datehook_mod_CFLAGS): Likewise.
1873 (datehook_mod_LDFLAGS): Likewise.
1875 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1877 * commands/date.c: New file.
1879 * hook/datehook.c: Likewise.
1881 * include/grub/lib/datetime.h: Likewise.
1883 * include/grub/i386/cmos.h: Likewise.
1885 * lib/datetime.c: Likewise.
1887 * lib/i386/datetime.c: Likewise.
1889 * lib/efi/datetime.c: Likewise.
1891 2008-08-14 Robert Millan <rmh@aybabtu.com>
1893 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1894 (grub_mkelfimage_SOURCES): New variable.
1895 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1897 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1898 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1899 * conf/powerpc-ieee1275.rmk: Likewise.
1900 * conf/i386-ieee1275.rmk: Likewise.
1902 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1903 * kern/i386/coreboot/init.c: Likewise.
1905 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1906 with `<grub/cpu/kernel.h>'.
1907 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1909 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1910 * kern/i386/coreboot/startup.S: Likewise.
1912 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1913 (GRUB_MOD_GAP): Remove.
1914 * include/grub/powerpc/kernel.h: New file.
1915 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1916 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1917 * include/grub/i386/kernel.h: New file.
1918 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1919 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1920 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1922 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1924 Use --directory when invoking grub_mkimage.
1926 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1927 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1928 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1929 and GRUB_KERNEL_CPU_PREFIX.
1931 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
1933 * include/grub/err.h (grub_err_printf): New function prototype.
1934 * util/misc.c (grub_err_printf): New function.
1935 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1937 * kern/err.c (grub_print_error): Use grub_err_printf.
1939 2008-08-13 Robert Millan <rmh@aybabtu.com>
1941 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1943 2008-08-13 Robert Millan <rmh@aybabtu.com>
1945 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1948 2008-08-12 Robert Millan <rmh@aybabtu.com>
1950 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1951 of the relocation code from here ...
1952 (grub_multiboot): ... to here.
1953 (forward_relocator, backward_relocator): Move from here ...
1954 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1955 (grub_multiboot_backward_relocator): ... to here.
1956 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1957 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1958 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1959 (grub_multiboot_forward_relocator_end)
1960 (grub_multiboot_backward_relocator)
1961 (grub_multiboot_backward_relocator_end): New variables.
1963 2008-08-12 Bean <bean123ch@gmail.com>
1965 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1967 2008-08-11 Robert Millan <rmh@aybabtu.com>
1969 * kern/i386/linuxbios/startup.S: Move from here ...
1970 * kern/i386/coreboot/startup.S: ... to here.
1972 * kern/i386/linuxbios/init.c: Move from here ...
1973 * kern/i386/coreboot/init.c: ... to here.
1975 * kern/i386/linuxbios/table.c: Move from here ...
1976 * kern/i386/coreboot/mmap.c: ... to here.
1978 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1980 2008-08-11 Robert Millan <rmh@aybabtu.com>
1982 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1983 errors. Leave it to the upper layer to handle them.
1985 2008-08-09 Christian Franke <franke@computer.org>
1987 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1988 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1989 Install `grub.d/10_windows' only on Cygwin.
1990 * configure.ac: Add subst of `target_os'.
1991 Check `target_os' also before setting TARGET_OBJ2ELF.
1992 Add `--enable-grub-pe2elf'.
1994 2008-08-08 Robert Millan <rmh@aybabtu.com>
1996 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1997 (grub_last_time): Change type to grub_uint64_t.
1998 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1999 (grub_disk_close): Likewise.
2001 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2002 (run_menu): Migrate code from to using grub_get_time_ms().
2004 * util/misc.c (grub_get_time_ms): New function.
2006 2008-08-08 Marco Gerards <marco@gnu.org>
2008 * disk/ata.c (grub_ata_regget): Change return type to
2010 (grub_ata_regget2): Likewise.
2011 (grub_ata_wait_status): New function.
2012 (grub_ata_wait_busy): Removed function, updated all users to use
2013 `grub_ata_wait_status'.
2014 (grub_ata_wait_drq): Likewise.
2015 (grub_ata_cmd): New function.
2016 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
2018 (grub_ata_pio_write): Add error handling.
2019 (grub_atapi_identify): Likewise.
2020 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2022 (grub_ata_identify): Use `grub_ata_cmd' and improve error
2023 handling. Actually use the detected registers. Reorder the
2024 detection logic such that it is easier to read.
2025 (grub_ata_pciinit): Do not assign the same ID to each controller.
2026 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2028 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2030 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2032 2008-08-08 Marco Gerards <marco@gnu.org>
2036 2008-08-07 Bean <bean123ch@gmail.com>
2038 * include/grub/x86_64/pci.h: New file.
2040 2008-08-07 Christian Franke <franke@computer.org>
2042 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2043 (TIMER2_GATE): Likewise.
2044 (grub_pit_wait): Add enable/disable of the timer2 gate
2045 bit of port 0x61. This fixes a possible infinite loop.
2047 2008-08-07 Bean <bean123ch@gmail.com>
2049 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2050 kern/i386/tsc.c and kern/i386/pit.c.
2052 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2055 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2058 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2060 2008-08-07 Bean <bean123ch@gmail.com>
2062 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2064 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2066 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2067 multiple inclusion. Add #include <grub/types.h>.
2069 2008-08-06 Christian Franke <franke@computer.org>
2071 * conf/common.rmk: Build and install `10_windows'.
2072 * util/grub.d/10_windows.in: New script.
2074 2008-08-06 Pavel Roskin <proski@gnu.org>
2076 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2078 2008-08-06 Robert Millan <rmh@aybabtu.com>
2080 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2081 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2083 2008-08-06 Bean <bean123ch@gmail.com>
2085 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2086 (grub_pxefs_fs_int): Remove dummy definition.
2087 (grub_pxefs_open): Use data->block_size to store the current block
2089 (grub_pxefs_read): Use block size stored in data->block_size. As the
2090 value of grub_pxe_blksize can be changed after the file is opened.
2092 2008-08-06 Bean <bean123ch@gmail.com>
2094 * fs/i386/pc/pxe.c (curr_file): new variable.
2095 (grub_pxefs_open): Simply the handling of pxe file system. Don't
2096 require the dummy internal file system anymore.
2097 (grub_pxefs_read): Removed.
2098 (grub_pxefs_close): Likewise.
2099 (grub_pxefs_fs_int): Likewise.
2100 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2101 connection when we switch file.
2102 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2104 2008-08-06 Robert Millan <rmh@aybabtu.com>
2106 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2108 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2109 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2111 * kern/i386/halt.c: New file.
2112 * kern/i386/reboot.c: Likewise.
2113 * include/grub/i386/reboot.h: Likewise.
2114 * include/grub/i386/halt.h: Likewise.
2116 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2117 Include `<grub/cpu/halt.h>'.
2118 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2119 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2121 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2122 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2123 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2124 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2125 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2126 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2128 * include/grub/i386/at_keyboard.h: ... to here.
2130 2008-08-05 Robert Millan <rmh@aybabtu.com>
2132 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2133 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2134 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2135 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2136 `kern/generic/millisleep.c'.
2138 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2139 instead of grub_get_rtc().
2140 (grub_tsc_init): Initialize `tsc_boot_time'.
2142 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2143 (grub_machine_init): Use grub_tsc_init() rather than
2144 installing an RTC-based handler via grub_install_get_time_ms().
2146 * kern/i386/pit.c: New file.
2147 * include/grub/i386/pit.h: Likewise.
2149 2008-08-05 Bean <bean123ch@gmail.com>
2151 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2153 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2154 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2155 (pxe_mod_SOURCES): New macro.
2156 (pxe_mod_CFLAGS): Likewise.
2157 (pxe_mod_LDFLAGS): Likewise.
2158 (pxecmd_mod_SOURCES): Likewise.
2159 (pxecmd_mod_CFLAGS): Likewise.
2160 (pxecmd_mod_LDFLAGS): Likewise.
2162 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2163 (grub_pxe_call): Likewise.
2165 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2167 * commands/i386/pc/pxecmd.c: New file.
2169 * fs/i386/pc/pxe.c: Likewise.
2171 * include/grub/i386/pc/pxe.h: Likewise.
2173 2008-08-05 Bean <bean123ch@gmail.com>
2175 * util/console.c (grub_console_cur_color): New variable.
2176 (grub_console_standard_color): Likewise.
2177 (grub_console_normal_color): Likewise.
2178 (grub_console_highlight_color): Likewise.
2179 (color_map): Likewise.
2180 (use_color): Likewise.
2181 (NUM_COLORS): New macro.
2182 (grub_ncurses_setcolorstate): Handle color properly.
2183 (grub_ncurses_setcolor): Don't change color here, just remember the
2184 settings, color will be set in grub_ncurses_setcolorstate.
2185 (grub_ncurses_getcolor): New function.
2186 (grub_ncurses_init): Initialize color pairs.
2187 (grub_ncurses_term): New member grub_ncurses_getcolor.
2189 2008-08-05 Colin D Bennett <colin@gibibit.com>
2191 High resolution timer support. Implemented for x86 CPUs using TSC.
2192 Extracted generic grub_millisleep() so it's linked in only as needed.
2193 This requires a Pentium compatible CPU; if the RDTSC instruction is
2194 not supported, then it falls back on the generic grub_get_time_ms()
2195 implementation that uses the machine's RTC.
2197 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2198 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2199 `kern/generic/millisleep.c'.
2201 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2202 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2204 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2205 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2207 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2209 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2210 `kern/generic/millisleep.c'.
2212 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2214 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2216 * kern/generic/rtc_get_time_ms.c: New file.
2218 * kern/generic/millisleep.c: New file.
2220 * kern/misc.c: Don't include
2221 <kern/time.h> anymore.
2222 (grub_millisleep_generic): Removed.
2224 * commands/sleep.c (grub_interruptible_millisleep): Uses
2225 grub_get_time_ms() instead of grub_get_rtc().
2227 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2229 (grub_cpu_is_cpuid_supported): New inline function.
2230 (grub_cpu_is_tsc_supported): New inline function.
2231 (grub_tsc_init): New function prototype.
2232 (grub_tsc_get_time_ms): New function prototype.
2234 * kern/i386/tsc.c (grub_get_time_ms): New file.
2236 * include/grub/time.h: Include <grub/types.h.
2237 (grub_millisleep_generic): Removed.
2238 (grub_get_time_ms): New prototype.
2239 (grub_install_get_time_ms): New prototype.
2240 (grub_rtc_get_time_ms): New prototype.
2242 * kern/time.c (grub_get_time_ms): New function.
2243 (grub_install_get_time_ms): New function.
2245 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2246 <grub/time.h> anymore.
2247 (grub_millisleep): Removed.
2248 (grub_machine_init): Call grub_tsc_init.
2250 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2251 get_time_ms() implementation.
2253 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2254 (ieee1275_get_time_ms): New function.
2255 (grub_machine_init): Install get_time_ms() implementation.
2257 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2258 (grub_machine_init): Call grub_tsc_init().
2259 (grub_millisleep): Removed.
2261 * kern/ieee1275/init.c (grub_millisleep): Removed.
2262 (grub_machine_init): Install ieee1275_get_time_ms()
2264 (ieee1275_get_time_ms): New function.
2265 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2268 2008-08-05 Marco Gerards <marco@gnu.org>
2270 * disk/ata.c: Include <grub/pci.h>.
2271 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2272 (grub_ata_initialize): Rewritten.
2273 (grub_ata_device_initialize): New function.
2275 2008-08-04 Pavel Roskin <proski@gnu.org>
2277 * kern/main.c: Include grub/mm.h.
2279 2008-08-04 Robert Millan <rmh@aybabtu.com>
2281 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2282 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2283 corruption problem).
2285 2008-08-04 Robert Millan <rmh@aybabtu.com>
2287 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2288 warnings introduced in my last commit.
2290 2008-08-03 Robert Millan <rmh@aybabtu.com>
2292 Make PCI available on all i386 architectures.
2294 * include/grub/i386/pc/pci.h: Move from here ...
2295 * include/grub/i386/pci.h: ... to here.
2297 * include/grub/i386/pc/pci.h: Remove.
2298 * include/grub/i386/efi/pci.h: Remove.
2299 * include/grub/x86_64/efi/pci.h: Remove.
2301 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2304 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2305 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2306 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2308 * conf/i386-ieee1275.rmk: Likewise.
2310 2008-08-03 Robert Millan <rmh@aybabtu.com>
2312 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2313 (grub_console_setcursor): Make it possible to set cursor off.
2315 2008-08-03 Robert Millan <rmh@aybabtu.com>
2317 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2318 of modules instead of assuming which platform provides what.
2319 * util/update-grub.in: Likewise.
2321 2008-08-03 Robert Millan <rmh@aybabtu.com>
2323 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2324 instead of `grub_install_dos_part' to determine whether a drive needs
2325 to be prepended to prefix (`grub_install_dos_part' is not reliable,
2326 because it can be overridden when loading GRUB via Multiboot).
2328 2008-08-02 Robert Millan <rmh@aybabtu.com>
2330 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2332 2008-08-02 Robert Millan <rmh@aybabtu.com>
2334 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2335 of informational grub_dprintf() calls.
2337 2008-08-02 Robert Millan <rmh@aybabtu.com>
2339 * disk/memdisk.c (memdisk_size): Don't initialize.
2340 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2342 * include/grub/i386/pc/kernel.h
2343 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2344 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2345 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2346 (grub_arch_memdisk_size): Remove.
2348 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2349 field (was only used to transfer a constant). Add `type' field to
2350 support multiple module types.
2351 (grub_module_iterate): New function.
2353 * kern/device.c (grub_device_open): Do not hide error messages
2354 when grub_disk_open() fails. Use grub_print_error() instead.
2356 * kern/i386/pc/init.c (grub_arch_modules_addr)
2357 (grub_arch_memdisk_size): Remove functions.
2358 (grub_arch_modules_addr): Return the module address in high memory
2359 (now that it isn't copied anymore).
2361 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2362 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2363 decompression routine (grub_total_module_size already includes that
2364 now). Don't copy modules back to low memory.
2366 * kern/main.c: Include `<grub/mm.h>'.
2367 (grub_load_modules): Split out (and use) ...
2368 (grub_module_iterate): ... this function, which iterates through
2369 module objects and runs a hook.
2370 Comment out grub_mm_init_region() call, as it would cause non-ELF
2371 modules to be overwritten.
2373 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2374 the memdisk image in its own region, make it part of the module list.
2375 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2376 (main): Parse --memdisk|-m option, and pass user-provided path as
2377 parameter to generate_image().
2378 (add_segments): Pass `memdisk_path' down to load_modules().
2379 (load_modules): Embed memdisk image in module section when requested.
2380 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2381 `header.type' instead of `header.offset'.
2383 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2384 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2385 (memdisk_mod_LDFLAGS): New variables.
2386 * conf/i386-coreboot.rmk: Likewise.
2387 * conf/i386-ieee1275.rmk: Likewise.
2389 2008-08-02 Robert Millan <rmh@aybabtu.com>
2391 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2392 (backward_relocator): New variables. Used to allocate and relocate
2393 the payload, respectively.
2394 (grub_multiboot_load_elf32): Load into heap instead of requested
2395 address, install the appropriate relocator code in each bound of
2396 the payload, and set the entry point such that
2397 grub_multiboot_real_boot() will jump to one of them.
2399 * kern/i386/loader.S (grub_multiboot_payload_size)
2400 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2401 (grub_multiboot_payload_entry_offset): New variables.
2402 (grub_multiboot_real_boot): Set cpu context to what the relocator
2403 expects, and jump to the relocator instead of the payload.
2405 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2406 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2407 (grub_multiboot_payload_entry_offset): Export.
2409 2008-08-01 Bean <bean123ch@gmail.com>
2411 * normal/menu_entry.c (editor_getline): Don't return the original
2412 string as result, as it will be released by lexer once it has done
2415 2008-08-01 Robert Millan <rmh@aybabtu.com>
2417 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2418 within menuentries, not before them.
2419 util/grub.d/10_hurd.in: Likewise.
2421 2008-08-01 Bean <bean123ch@gmail.com>
2423 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2424 (bufio_mod_SOURCES): New macro.
2425 (bufio_mod_CFLAGS): Likewise.
2426 (bufio_mod_LDFLAGS): Likewise.
2428 * include/grub/bufio.h: New file.
2430 * io/bufio.c: Likewise.
2432 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2433 (grub_video_reader_png): Use grub_buffile_open to open file.
2435 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2436 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2438 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2439 (grub_video_reader_tga): Use grub_buffile_open to open file.
2441 * font/manager.c: Include <grub/bufio.h>.
2442 (add_font): Use grub_buffile_open to open file.
2444 2008-07-31 Robert Millan <rmh@aybabtu.com>
2446 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2447 ELF segments, use a macro for arbitrarily accessing any of them instead
2448 of preparing a pointer that allows access to one at a time.
2449 (grub_multiboot_load_elf64): Likewise.
2451 2008-07-31 Bean <bean123ch@gmail.com>
2453 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2454 GRUB_KERNEL_MACHINE_DATA_END.
2456 2008-07-30 Robert Millan <rmh@aybabtu.com>
2458 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2459 Increase from 0x50 to 0x60.
2460 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2461 use UUIDs to identify the root drive for them. If that's not
2463 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2464 check, for cross-disk installs.
2466 2008-07-30 Robert Millan <rmh@aybabtu.com>
2468 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2469 is non-empty, use it to set the `prefix' environment variable instead
2470 of the usual approach.
2471 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2472 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2473 environment variable instead of dummy make_install_device().
2475 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2476 (start): Insert a data section, with `grub_prefix' variable.
2477 * kern/i386/linuxbios/startup.S: Likewise.
2479 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2480 New variable reference.
2481 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2482 New macro. Defines offset of `grub_prefix' within startup.S (relative
2484 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2485 section within startup.S (relative to `start').
2486 * include/grub/i386/coreboot/kernel.h: Likewise.
2488 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2489 Overwrite grub_prefix with its contents, at the beginning of the
2491 (main): Understand -p|--prefix.
2493 2008-07-30 Robert Millan <rmh@aybabtu.com>
2495 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2497 2008-07-30 Robert Millan <rmh@aybabtu.com>
2499 * term/i386/pc/vga_text.c (grub_console_cls): Use
2500 grub_console_gotoxy() to go back to beginning of the screen.
2501 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2503 2008-07-29 Christian Franke <franke@computer.org>
2505 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2506 Add conversion of emulated mount points on Cygwin.
2508 2008-07-29 Christian Franke <franke@computer.org>
2510 * util/update-grub.in: Add a check for admin
2512 Remove old `grub.cfg.new' before creation.
2513 Add `-f' to `mv' to handle the different filesystem
2514 semantics of Windows.
2516 2008-07-29 Bean <bean123ch@gmail.com>
2518 * normal/main.c (get_line): Fix buffer overflow bug.
2520 2008-07-28 Robert Millan <rmh@aybabtu.com>
2522 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2523 (struct grub_apple_header): New struct. Describes the layout of
2525 (apple_partition_map_iterate): Check the header magic as well as the
2526 partition magic (which was already being checked).
2528 2008-07-28 Pavel Roskin <proski@gnu.org>
2530 * genmk.rb: Add a warning to the beginning of the output that
2531 it's a generated file and should not be edited.
2533 2008-07-28 Robert Millan <rmh@aybabtu.com>
2535 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2536 with the same number are found, just use issue a warning with
2537 grub_dprintf(), as this error has been reported to be non-fatal.
2539 2008-07-27 Robert Millan <rmh@aybabtu.com>
2541 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2544 2008-07-27 Bean <bean123ch@gmail.com>
2546 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2547 (grub_fat_find_dir): Ignore case when comparing filename.
2549 2008-07-27 Bean <bean123ch@gmail.com>
2551 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2552 smallino, as it's more descriptive, and i8count can be confused with
2553 the other field count.
2554 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2557 2008-07-27 Bean <bean123ch@gmail.com>
2559 * commands/crc.c: New file.
2561 * lib/crc.c: Likewise.
2563 * include/grub/lib/crc.h: Likewise.
2565 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2567 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2568 (hexdump): Move this function to ...
2570 * lib/hexdump.c: ... here.
2572 * include/grub/hexdump.h: Renamed to ...
2574 * include/grub/lib/hexdump.h: ... this.
2576 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2578 * util/grub-editenv.c: Likewise.
2580 * include/envblk.h: Renamed to ...
2582 * include/lib/envblk.h: ... this.
2584 * util/envblk.c: Renamed to ...
2586 * lib/envblk.c: ... this.
2588 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2590 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2591 (pkglib_MODULES): Add crc.mod.
2592 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2593 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2594 (crc_mod_SOURCES): New macro.
2595 (crc_mod_CFLAGS): Likewise.
2596 (crc_mod_LDFLAGS): Likewise.
2598 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2600 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2602 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2604 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2606 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2608 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
2610 * commands/help.c: Include <grub/term.h>.
2611 (TERM_WIDTH): Removed. Updated all users.
2613 2008-07-27 Pavel Roskin <proski@gnu.org>
2615 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2616 spurious warnings about a comment within a comment.
2618 2008-07-25 Robert Millan <rmh@aybabtu.com>
2620 * util/getroot.c (find_root_device): Skip devices that match
2621 /dev/dm-[0-9]. This lets the real device be found for any type of
2622 abstraction (LVM, EVMS, RAID..).
2623 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2624 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2625 device is found first, find_root_device() will now skip it.
2627 2008-07-24 Pavel Roskin <proski@gnu.org>
2629 * include/grub/types.h: Use __builtin_bswap32() and
2630 __builtin_bswap64() with gcc 4.3 and newer.
2632 2008-07-24 Christian Franke <franke@computer.org>
2634 * util/i386/pc/grub-install.in: If `--debug' is specified,
2635 pass `--verbose' to grub-setup.
2636 Abort script if make_system_path_relative_to_its_root() fails.
2638 2008-07-24 Bean <bean123ch@gmail.com>
2640 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2641 variable `target_platform' should be `platform'.
2643 2008-07-24 Bean <bean123ch@gmail.com>
2645 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
2646 (grub_png_init_fixed_block): New function.
2647 (grub_png_decode_image_data): Handle fixed huffman code compression.
2649 2008-07-24 Bean <bean123ch@gmail.com>
2651 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2652 (grub_pe2elf_SOURCES): New macro.
2653 (CLEANFILES): Add grub-pe2elf.
2655 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2656 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2657 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2658 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2659 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
2660 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
2661 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
2662 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2663 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2664 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2665 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2666 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2667 (GRUB_PE32_DT_FUNCTION): Likewise.
2668 (GRUB_PE32_REL_I386_DIR32): Likewise.
2669 (GRUB_PE32_REL_I386_REL32): Likewise.
2670 (grub_pe32_symbol): New structure.
2671 (grub_pe32_reloc): Likewise.
2673 * util/grub-pe2elf.c: New file.
2675 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2676 start symbol in non pc platform.
2678 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2680 The following patches are from Christian Franke.
2682 * include/grub/dl.h: Remove .previous, gas supports this only
2685 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2686 Remove .type, gas supports this only for ELF format.
2688 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2689 nullbytes in symbol table. This fixes an infinite loop if table is
2692 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2693 TARGET_IMG_LDFLAGS and EXEEXT.
2695 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2696 TARGET_IMG_LDFLAGS_AC.
2697 (grub_CHECK_STACK_ARG_PROBE): New function.
2699 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2701 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2703 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2704 to set TARGET_IMG_LD* accordingly.
2705 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2706 Add call to grub_CHECK_STACK_ARG_PROBE.
2707 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2709 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2711 * genmk.rb: Add EXEEXT to CLEANFILES.
2713 2008-07-23 Robert Millan <rmh@aybabtu.com>
2715 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2716 define the codes for arrows and lines used for the menu).
2717 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2720 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2721 fonts, because the latter are too slow.
2723 2008-07-21 Bean <bean123ch@gmail.com>
2725 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2726 a20. Run keyboard test last, as it will cause macbook to halt.
2728 2008-07-18 Pavel Roskin <proski@gnu.org>
2730 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2731 load foreign architecture modules correctly anyway. Keep
2732 support for loading host architecture modules, whether we
2733 compile them or not.
2735 2008-07-17 Pavel Roskin <proski@gnu.org>
2737 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2738 change target_cpu. The compiler default can mismatch target_cpu
2741 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2742 * kern/efi/efi.c: Likewise.
2744 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2745 target compiler is functional.
2746 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2749 * configure.ac: Default to efi platform for x86_64-apple. Allow
2750 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2751 adjustments from the rest, only do them if target is not
2752 explicitly given. Merge other adjustments with the final sanity
2753 check. Remove an extraneous check for supported CPU. Be
2754 specific which CPU and which platform is not supported.
2756 * configure.ac: Default to pc platform for x86_64.
2758 2008-07-17 Robert Millan <rmh@aybabtu.com>
2760 Partial LinuxBIOS -> Coreboot rename.
2762 * conf/i386-linuxbios.rmk: Renamed to ...
2763 * conf/i386-coreboot.rmk: ... this.
2764 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2765 * configure.ac: Accept "coreboot" as input platform (but maintain
2766 compatibility with "linuxbios").
2767 * include/grub/i386/linuxbios: Renamed to ...
2768 * include/grub/i386/coreboot: ... this.
2770 2008-07-17 Bean <bean123ch@gmail.com>
2772 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2773 (appleldr_mod_SOURCE): New variable.
2774 (appleldr_mod_CFLAGS): Likewise.
2775 (appleldr_mod_LDFLAGS): Likewise.
2776 (pci_mod_SOURCES): Likewise.
2777 (pci_mod_CFLAGS): Likewise.
2778 (pci_mod_LDFLAGS): Likewise.
2779 (lspci_mod_SOURCES): Likewise.
2780 (lspci_mod_CFLAGS): Likewise.
2781 (lspci_mod_LDFLAGS): Likewise.
2783 * conf/x86_64-efi.rmk: New file.
2785 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2787 (grub_efidisk_write): Likewise.
2789 * include/efi/api.h (efi_call_0): New macro.
2790 (efi_call_1): Likewise.
2791 (efi_call_2): Likewise.
2792 (efi_call_3): Likewise.
2793 (efi_call_4): Likewise.
2794 (efi_call_5): Likewise.
2795 (efi_call_6): Likewise.
2797 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2798 grub_rescue_cmd_chainloader.
2800 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2801 (grub_pe32_optional_header): Change some fields based on i386 or
2803 (GRUB_PE32_PE32_MAGIC): Likewise.
2805 * include/grub/efi/uga_draw.h: New file.
2807 * include/grub/elf.h (STN_ABS): New constant.
2808 (R_X86_64_NONE): Relocation constant for x86_64.
2809 (R_X86_64_64): Likewise.
2810 (R_X86_64_PC32): Likewise.
2811 (R_X86_64_GOT32): Likewise.
2812 (R_X86_64_PLT32): Likewise.
2813 (R_X86_64_COPY): Likewise.
2814 (R_X86_64_GLOB_DAT): Likewise.
2815 (R_X86_64_JUMP_SLOT): Likewise.
2816 (R_X86_64_RELATIVE): Likewise.
2817 (R_X86_64_GOTPCREL): Likewise.
2818 (R_X86_64_32): Likewise.
2819 (R_X86_64_32S): Likewise.
2820 (R_X86_64_16): Likewise.
2821 (R_X86_64_PC16): Likewise.
2822 (R_X86_64_8): Likewise.
2823 (R_X86_64_PC8): Likewise.
2825 * include/grub/i386/efi/pci.h: New file.
2827 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2828 Change it value based on platform.
2829 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2830 (GRUB_E820_RAM): Likewise.
2831 (GRUB_E820_RESERVED): Likewise.
2832 (GRUB_E820_ACPI): Likewise.
2833 (GRUB_E820_NVS): Likewise.
2834 (GRUB_E820_EXEC_CODE): Likewise.
2835 (GRUB_E820_MAX_ENTRY): Likewise.
2836 (grub_e820_mmap): New structure.
2837 (linux_kernel_header): Change the efi field according to different
2838 kernel version, also field from linux_kernel_header.
2840 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2842 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2843 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2844 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2845 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2846 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2847 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2848 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2849 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2850 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2851 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2853 * include/grub/x86_64/efi/kernel.h: New file.
2855 * include/grub/x86_64/efi/loader.h: Likewise.
2857 * include/grub/x86_64/efi/machine.h: Likewise.
2859 * include/grub/x86_64/efi/pci.h: Likewise.
2861 * include/grub/x86_64/efi/time.h: Likewise.
2863 * include/grub/x86_64/linux.h: Likewise.
2865 * include/grub/x86_64/setjmp.h: Likewise.
2867 * include/grub/x86_64/time.h: Likewise.
2869 * include/grub/x86_64/types.h: Likewise.
2871 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2872 GRUB_TARGET_SIZEOF_VOID_P.
2874 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2875 (grub_efi_locate_handle): Likewise.
2876 (grub_efi_open_protocol): Likewise.
2877 (grub_efi_set_text_mode): Likewise.
2878 (grub_efi_stall): Likewise.
2879 (grub_exit): Likewise.
2880 (grub_reboot): Likewise.
2881 (grub_halt): Likewise.
2882 (grub_efi_exit_boot_services): Likewise.
2883 (grub_get_rtc): Likewise.
2885 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2886 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2887 (grub_efi_allocate_pages): Wrap efi calls.
2888 (grub_efi_free_pages): Wrap efi calls.
2889 (grub_efi_get_memory_map): Wrap efi calls.
2891 * kern/x86_64/dl.c: New file.
2893 * kern/x86_64/efi/callwrap.S: Likewise.
2895 * kern/x86_64/efi/startup.S: Likewise.
2897 * loader/efi/appleloader.c: Likewise.
2899 * loader/efi/chainloader.c (cmdline): New variable.
2900 (grub_chainloader_unload): Wrap efi calls.
2901 (grub_chainloader_boot): Likewise.
2902 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2905 * loader/efi/chainloader_normal.c (chainloader_command):
2906 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2909 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2911 (grub_e820_add_region): New function.
2912 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2914 (grub_find_video_card): New function.
2915 (grub_linux_setup_video): New function.
2916 (grub_rescue_cmd_linux): Probe for video information.
2918 * normal/x86_64/setjmp.S: New file.
2920 * term/efi/console.c (map_char): New function.
2921 (grub_console_putchar): Map unicode char.
2922 (grub_console_checkkey): Wrap efi calls.
2923 (grub_console_getkey): Likewise.
2924 (grub_console_getwh): Likewise.
2925 (grub_console_gotoxy): Likewise.
2926 (grub_console_cls): Likewise.
2927 (grub_console_setcolorstate): Likewise.
2928 (grub_console_setcursor): Likewise.
2930 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2932 2008-07-16 Pavel Roskin <proski@gnu.org>
2934 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2937 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2938 pointer, not an integer. This fixes a warning and prevents
2939 precision loss on 64-bit systems.
2940 (relocate_addresses): Remove unneeded cast.
2942 2008-07-15 Pavel Roskin <proski@gnu.org>
2944 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2946 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2948 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2949 Fix comparison between signed and unsigned.
2951 * include/grub/i386/ieee1275/console.h: Declare
2952 grub_console_init() and grub_console_fini().
2954 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2955 It's empty and unused.
2957 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2958 beginning to avoid warnings with some compilers.
2960 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2961 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2963 2008-07-14 Pavel Roskin <proski@gnu.org>
2965 * kern/env.c (grub_register_variable_hook): Don't copy empty
2966 string, it leaks memory. Pass "" to grub_env_set(), it should
2967 handle constant strings.
2969 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2970 * commands/cmp.c (grub_cmd_cmp): Likewise.
2971 * kern/dl.c (grub_dl_flush_cache): Likewise.
2972 (grub_dl_load_core): Likewise.
2973 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2974 (grub_elf64_load_phdrs): Likewise.
2976 2008-07-13 Pavel Roskin <proski@gnu.org>
2978 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2979 between signed and unsigned.
2980 (LzmaEnc_Finish): Fix warning about an unused parameter.
2982 2008-07-13 Bean <bean123ch@gmail.com>
2984 * Makefile.in (enable_lzo): New rule.
2986 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2988 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2990 * boot/i386/pc/lnxboot.S: #include <config.h>.
2992 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2993 its value according to the compression algorithm used, lzo or lzma.
2995 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2996 compression algorithm according to configure macro.
2998 * kern/i386/pc/startup.S (codestart): Likewise.
3000 * kern/i386/pc/lzma_decode.S: New file.
3002 * include/grub/lib/LzFind.h: Likewise.
3004 * include/grub/lib/LzHash.h: Likewise.
3006 * include/grub/lib/LzmaDec.h: Likewise.
3008 * include/grub/lib/LzmaEnc.h: Likewise.
3010 * include/grub/lib/LzmaTypes.h: Likewise.
3012 * lib/LzFind.c: Likewise.
3014 * lib/LzmaDec.c: Likewise.
3016 * lib/LzmaEnc.c: Likewise.
3018 2008-07-13 Bean <bean123ch@gmail.com>
3020 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3021 (grub_ext4_extent_header): New structure.
3022 (grub_ext4_extent): Likewise.
3023 (grub_ext4_extent_idx): Likewise.
3024 (grub_ext4_find_leaf): New function.
3025 (grub_ext2_read_block): Handle extents.
3027 2008-07-12 Robert Millan <rmh@aybabtu.com>
3029 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3031 2008-07-11 Robert Millan <rmh@aybabtu.com>
3033 * util/grub.d/40_custom.in: New file. Example on how to add custom
3034 entries to /etc/grub.d.
3035 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3036 40_custom (implicitly, by merging all the grub.d rules).
3038 2008-07-11 Pavel Roskin <proski@gnu.org>
3040 * commands/read.c (grub_getline): Fix invalid memory access.
3041 Don't add newline to the variable value.
3043 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3044 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3045 (serial_hw_get_port): Check validity of the port number.
3046 (grub_cmd_serial): Check return value of serial_hw_get_port().
3048 2008-07-07 Pavel Roskin <proski@gnu.org>
3050 * boot/i386/pc/diskboot.S (notification_string): Replace
3051 "Loading kernel" with just "loading". This is shorter, less
3052 confusing and saves a few bytes for possible future changes.
3054 2008-07-05 Pavel Roskin <proski@gnu.org>
3056 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3057 size for ATAPI devices, they are undefined. Output sector
3058 number in decimal form.
3060 * disk/ata.c: Use named constants for status bits.
3062 2008-07-04 Pavel Roskin <proski@gnu.org>
3064 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3065 grub_addr_t before casting it to the void pointer to fix a
3066 warning. Non-addressable regions are discarded earlier.
3067 (grub_arch_modules_addr): Cast _end to grub_addr_t.
3068 * kern/i386/linuxbios/table.c: Include grub/misc.h.
3069 (check_signature): Don't shadow table_header.
3070 (grub_linuxbios_table_iterate): Cast numeric constants to
3071 grub_linuxbios_table_header_t.
3072 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3075 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3078 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3079 pointer, which can cause warnings. Support 64-bit addresses.
3081 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3082 of sizeof(long). This fixes PowerPC image generation on x86_64.
3084 2008-07-04 Robert Millan <rmh@aybabtu.com>
3086 This fixes a performance issue when pc & gpt partmap iterators
3087 didn't abort iteration even after our hook found what it was
3088 looking for (often causing expensive probes of non-existent drives).
3090 Some callers relied on previous buggy behaviour, since they would
3091 raise an error when their own hooks caused early abortion of its
3094 * kern/device.c (grub_device_open): Improve error message.
3095 * disk/lvm.c (grub_lvm_open): Likewise.
3096 * disk/raid.c (grub_raid_open): Likewise.
3098 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3099 when hook requests it, independently of grub_errno.
3100 (pc_partition_map_probe): Do not fail when find_func() caused
3101 early abortion of pc_partition_map_iterate().
3103 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3104 when hook requests it, independently of grub_errno.
3105 (gpt_partition_map_probe): Do not fail when find_func() caused
3106 early abortion of gpt_partition_map_iterate().
3108 * kern/partition.c (grub_partition_iterate): Abort parent iteration
3109 when hook requests it, independently of grub_errno. Do not fail when
3110 part_map_iterate_hook() caused early abortion of p->iterate().
3112 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3113 when grub_partition_iterate() returned with non-zero.
3115 2008-07-03 Pavel Roskin <proski@gnu.org>
3117 * disk/ata.c (grub_ata_pio_write): Check status before writing,
3118 like we do in grub_ata_pio_read().
3119 (grub_ata_readwrite): Always write individual sectors. Fix the
3120 sector count for the remainder.
3121 (grub_ata_write): Enable writing to ATA devices. Correctly
3122 report error for ATAPI devices.
3124 2008-07-02 Pavel Roskin <proski@gnu.org>
3126 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3129 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3130 for every read sector, we already increment it for the whole
3131 batch. This fixes reading more than 256 sectors at once.
3133 * util/grub-editenv.c (cmd_info): Cast argument to long
3134 explicitly. ptrdiff_t reduces to int on i386.
3136 * util/grub-editenv.c (main): Be specific which parameter is
3139 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3140 (memdisk): Make memdisk_orig_addr a pointer.
3142 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3143 for file offsets, use grub_off_t instead. Fix printf format
3146 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3147 there. Real unexpected warnings should not drown in the noise
3148 about known problems.
3150 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3151 grub_disk_addr_t for memory addresses.
3153 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3154 explicitly to fix a warning.
3156 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3158 * Makefile.in (MODULE_LDFLAGS): New variable.
3159 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3160 the linker accepts --build-id=none.
3161 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3163 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3165 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3166 those in Linux XFS code. Provide a way to access 64-bit parent
3168 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3169 the end of struct grub_xfs_dir_header.
3171 2008-07-02 Bean <bean123ch@gmail.com>
3173 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3174 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3175 and GRUB_IEEE1275_FLAG_NO_ANSI.
3177 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3178 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3179 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3181 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3182 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3184 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3185 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3187 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3188 esc sequence on non ANSI terminal.
3189 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3191 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3194 2008-07-02 Bean <bean123ch@gmail.com>
3196 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3197 (grub_editenv_SOURCES): New variable.
3198 (pkglib_MODULES): Add loadenv.mod.
3199 (loadenv_mod_SOURCES): New variable.
3200 (loadenv_mod_CFLAGS): Likewise.
3201 (loadenv_mod_LDFLAGS): Likewise.
3203 * include/grub/envblk.h: New file.
3205 * util/envblk.c: New file.
3207 * util/grub-editenv.c: New file.
3209 * commands/loadenv.c: New file.
3211 2008-07-01 Pavel Roskin <proski@gnu.org>
3213 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3214 not unsigned char. This fixes warnings and is consistent with
3217 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3219 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3221 * term/tparm.c (analyze): Always set *popcount.
3223 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3224 cast to fix a warning.
3226 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3227 cast to suppress a warning.
3229 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3230 grub_fshelp_read_file() expects.
3232 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3233 write uuid as a 32-bit value in CPU byte order, so declare and
3236 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3237 long if the format specifier expects it.
3238 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3239 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3240 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3241 long to fix a warning.
3242 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3243 grub_dprintf() arguments to fix warnings.
3245 2008-06-30 Pavel Roskin <proski@gnu.org>
3247 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3248 install_bsd_part immediately before core.img is embedded or
3249 modified on disk. This fixes core.img verification if core.img
3252 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3253 core_path to calculate the blocklist.
3254 Patch from Javier Martín <lordhabbit@gmail.com>
3256 2008-06-29 Robert Millan <rmh@aybabtu.com>
3258 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3259 block to disk block.
3260 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3261 Patch from Niels Böhm <bitbucket@arcor.de>
3263 2008-06-29 Robert Millan <rmh@aybabtu.com>
3265 * util/update-grub_lib.in (font_path): Search for fonts in
3266 /boot/grub first, which is more likely to be readable (we aren't
3267 deciding where fonts live, just looking for them).
3269 2008-06-26 Pavel Roskin <proski@gnu.org>
3271 * util/biosdisk.c (read_device_map): Don't leave dead map
3272 entries for devices failing stat() check.
3274 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3275 core_path_dev for the core.img path on the target device.
3277 2008-06-26 Robert Millan <rmh@aybabtu.com>
3279 * disk/fs_uuid.c: New file.
3280 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3281 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3282 (fs_uuid_mod_LDFLAGS): New variables.
3283 * include/grub/disk.h (grub_disk_dev_id): Add
3284 `GRUB_DISK_DEVICE_UUID_ID'.
3285 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3286 implement iterate().
3288 2008-06-26 Robert Millan <rmh@aybabtu.com>
3290 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3291 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3292 Linux image includes no initrd.
3294 2008-06-21 Javier Martín <lordhabbit@gmail.com>
3296 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3297 call to resolve the core image location that effectively appended the
3300 2008-06-21 Robert Millan <rmh@aybabtu.com>
3302 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3305 * util/grub.d/10_hurd.in: ... to here ...
3306 * util/grub.d/10_linux.in: ... and here.
3308 2008-06-19 Robert Millan <rmh@aybabtu.com>
3310 * kern/main.c (grub_main): Export `prefix' variable immediately
3311 after it has been set by grub_machine_set_prefix().
3313 2008-06-19 Robert Millan <rmh@aybabtu.com>
3315 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3316 search result when not saving to variable, not the other way around.
3317 When saving to variable, abort iteration as soon as a match is found.
3319 2008-06-19 Robert Millan <rmh@aybabtu.com>
3321 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3322 check for partition that provides /boot/grub. Its logic is flawed,
3323 as it prevents prepare_grub_to_access_device() from being called
3326 2008-06-19 Robert Millan <rmh@aybabtu.com>
3328 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3329 "insmod" command directly when abstraction modules are needed,
3330 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3331 since it had already been processed).
3333 2008-06-19 Pavel Roskin <proski@gnu.org>
3335 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3336 changed. This is needed in case GRUB_LIBDIR changes.
3337 * conf/i386-ieee1275.rmk: Likewise.
3338 * conf/i386-linuxbios.rmk: Likewise.
3339 * conf/i386-pc.rmk: Likewise.
3340 * conf/powerpc-ieee1275.rmk: Likewise.
3342 2008-06-18 Pavel Roskin <proski@gnu.org>
3344 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3345 kernel_elf_symlist.c to symlist.c for consistency with other
3346 architectures. Update all users.
3347 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3349 2008-06-18 Robert Millan <rmh@aybabtu.com>
3351 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3354 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3355 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3356 a RAID device, run setup() for all members independently on whether
3357 LVM abstraction is being used.
3358 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3359 If grub-mkimage has set `*install_dos_part == -2', don't override this
3361 Perform *install_dos_part adjustments independently on whether
3362 we're embedding or not.
3363 Clarify error message when image is too big for embedding.
3364 Remove duplicate *install_dos_part stanza.
3366 2008-06-17 Robert Millan <rmh@aybabtu.com>
3368 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3369 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3371 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3372 values in grub_ofconsole_normal_color and
3373 grub_ofconsole_highlight_color (they're not directly related to
3374 background and foreground).
3375 (grub_ofconsole_setcolorstate): Extract background and foreground
3376 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3378 2008-06-17 Robert Millan <rmh@aybabtu.com>
3380 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3381 /boot/grub for the check in last commit, not /boot (they could be
3382 different partitions).
3384 2008-06-16 Robert Millan <rmh@aybabtu.com>
3386 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3387 asked to setup access for the same partition that provides /boot,
3388 don't bother using UUIDs since our root already has the value we
3391 2008-06-16 Robert Millan <rmh@aybabtu.com>
3393 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3395 Patch from Sven Mueller <sven@debian.org>.
3397 2008-06-16 Robert Millan <rmh@aybabtu.com>
3399 * util/update-grub.in: Check for $EUID instead of $UID.
3400 Reported by Vincent Zweije.
3402 2008-06-16 Bean <bean123ch@gmail.com>
3404 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
3405 (grub_ext2_read_block): Likewise.
3406 (grub_ext2_read_inode): Likewise.
3407 (grub_ext2_mount): Likewise.
3408 (grub_ext2_close): Likewise.
3409 (grub_ext3_get_journal): Removed.
3411 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
3412 (grub_reiserfs_read_symlink): Likewise.
3413 (grub_reiserfs_mount): Likewise.
3414 (grub_reiserfs_open): Likewise.
3415 (grub_reiserfs_read): Likewise.
3416 (grub_reiserfs_close): Likewise.
3417 (grub_reiserfs_get_journal): Removed.
3419 * fs/fshelp.c (grub_fshelp_read): Removed.
3420 (grub_fshelp_map_block): Likewise.
3422 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3423 (grub_fshelp_journal): Likewise.
3424 (grub_fshelp_read): Likewise.
3425 (grub_fshelp_map_block): Likewise.
3427 2008-06-16 Pavel Roskin <proski@gnu.org>
3429 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3430 floating point anymore.
3431 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3433 2008-06-15 Pavel Roskin <proski@gnu.org>
3435 * commands/ls.c (grub_ls_list_files): Use integer calculations
3436 for human readable format, avoid floating point use.
3437 * kern/misc.c (grub_ftoa): Remove.
3438 (grub_vsprintf): Remove floating point support.
3440 2008-06-15 Robert Millan <rmh@aybabtu.com>
3442 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
3444 Reported by Max Vozeler.
3446 2008-06-15 Robert Millan <rmh@aybabtu.com>
3448 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3449 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3451 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3452 the beginning of the prefix.
3454 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3455 It is assumed that if we have a memdisk, grub-mkimage has set
3456 grub_prefix to include the "(memdisk)" drive in it.
3458 2008-06-15 Robert Millan <rmh@aybabtu.com>
3460 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3461 Initialize keyboard controller after registering the terminal, so that
3462 grub_printf() can be called from grub_keyboard_controller_init().
3464 2008-06-15 Robert Millan <rmh@aybabtu.com>
3466 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3467 extent-btree which is written as big endian on disk.
3468 Reported by Alain Greppin <al@chilibi.org>.
3470 2008-06-14 Robert Millan <rmh@aybabtu.com>
3472 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3473 * util/i386/pc/grub-install.in (modules): Likewise.
3475 2008-06-13 Pavel Roskin <proski@gnu.org>
3477 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3479 2008-06-13 Bean <bean123ch@gmail.com>
3481 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3483 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3485 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3486 to indicate sparse block.
3488 2008-06-12 Pavel Roskin <proski@gnu.org>
3490 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3491 number, grub_fshelp_read() does it for us.
3493 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3494 linear disk read with journal translation.
3495 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3496 * include/grub/fshelp.h: Declare grub_fshelp_read().
3498 2008-06-09 Pavel Roskin <proski@gnu.org>
3500 * fs/minix.c (grub_minix_mount): Handle error reading
3503 2008-06-08 Robert Millan <rmh@aybabtu.com>
3505 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3506 don't append the RAID prefix afterwards.
3507 Reported by Clint Adams.
3509 2008-06-08 Robert Millan <rmh@aybabtu.com>
3511 Based on description from Pavel:
3512 * kern/disk.c (grub_disk_check_range): Rename to ...
3513 (grub_disk_adjust_range): ... this. Add a comment explaining the
3514 tasks performed by this function.
3516 2008-06-08 Robert Millan <rmh@aybabtu.com>
3518 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3519 `num_serial' (for consistency with other variables).
3520 (struct grub_ntfs_data): Add `uuid' member.
3521 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3522 (grub_ntfs_uuid): New function.
3523 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3525 2008-06-07 Pavel Roskin <proski@gnu.org>
3527 * util/biosdisk.c (open_device): Revert last change to the
3528 function, it broke installation. The sector needs to be
3529 different dependent on which device is opened.
3531 2008-06-06 Robert Millan <rmh@aybabtu.com>
3533 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3534 rest of GRUB, and breakage doesn't happen if its value were modified.
3536 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3537 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3538 a constant (same value).
3539 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3540 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3542 2008-06-06 Robert Millan <rmh@aybabtu.com>
3544 * util/biosdisk.c (open_device): Do not modify sector offset when
3545 accessing a partition. kern/disk.c already handles this for us.
3547 2008-06-06 Robert Millan <rmh@aybabtu.com>
3549 * util/grub-emu.c (grub_machine_init): Move code in this function from
3551 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3552 segfault in case grub_printf() is called).
3554 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3555 grub_probe. Update all users not to explicitly add it again.
3556 (grub_device): New variable; contains corresponding device for grubdir.
3557 (fs_module, partmap_module, devabstraction_module): Pass
3558 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3561 2008-06-05 Robert Millan <rmh@aybabtu.com>
3563 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3564 is found, print it (same layout as with labels).
3566 2008-06-04 Robert Millan <rmh@aybabtu.com>
3568 * util/biosdisk.c (get_drive): Rename to ...
3569 (find_grub_drive): ... this. Update all users.
3571 (get_os_disk): Rename to ...
3572 (convert_system_partition_to_system_disk): ... this. Update all users.
3574 (find_drive): Rename to ...
3575 (find_system_device): ... this. Update all users.
3577 2008-06-04 Robert Millan <rmh@aybabtu.com>
3579 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3580 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3581 (make_device_map): Likewise.
3583 2008-06-01 Robert Millan <rmh@aybabtu.com>
3585 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3586 before dereferencing it.
3588 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3589 union with fat12/fat16-specific ones. Add some new fields, including
3590 `num_serial' for both versions.
3591 (struct grub_fat_data): Add `uuid' member.
3592 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3593 names. Initialize `data->uuid' using `num_serial'.
3594 (grub_fat_uuid): New function.
3595 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3597 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3598 (grub_reiserfs_uuid): New function.
3599 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3602 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3603 (grub_xfs_uuid): New function.
3604 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3606 2008-06-01 Robert Millan <rmh@aybabtu.com>
3608 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3609 code that is backward compatible with pre-uuid search command.
3611 2008-05-31 Robert Millan <rmh@aybabtu.com>
3613 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3614 floppies after everything else, to ensure floppy drive isn't accessed
3615 unnecessarily (patch from Bean).
3617 2008-05-31 Robert Millan <rmh@aybabtu.com>
3619 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3620 not print device names when we were asked to set a variable.
3622 2008-05-31 Robert Millan <rmh@aybabtu.com>
3624 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3625 using "cursor-on" and "cursor-off" commands (understood at least by
3626 the Open Firmware flavour on OLPC).
3628 2008-05-31 Michael Gorven <michael@gorven.za.net>
3630 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3631 on and off sequences.
3633 2008-05-31 Robert Millan <rmh@aybabtu.com>
3635 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3636 * util/update-grub.in: Likewise.
3638 2008-05-30 Pavel Roskin <proski@gnu.org>
3640 * util/biosdisk.c (linux_find_partition): Simplify logic and
3641 make the code more universal. Keep special processing for
3642 devfs, but use a simple rule for all other devices. If the
3643 device ends with a number, append 'p' and the partition number.
3644 Otherwise, append only the partition number.
3646 2008-05-30 Robert Millan <rmh@aybabtu.com>
3648 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3649 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3650 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3651 the `root' parameter to Linux.
3653 2008-05-30 Robert Millan <rmh@aybabtu.com>
3655 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3656 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3657 --fs_uuid with --fs-uuid.
3658 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3659 all filesystems support them).
3661 2008-05-30 Robert Millan <rmh@aybabtu.com>
3663 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
3664 grub_printf() flags, since we're printing in units of 2 bytes.
3666 2008-05-30 Robert Millan <rmh@aybabtu.com>
3668 * util/grub.d/00_header.in: Remove obsolete comment referencing
3669 convert_system_path_to_grub_path().
3670 * util/update-grub.in: Likewise.
3671 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3672 (convert_system_path_to_grub_path): Add a warning message explaining
3673 that this function is deprecated. Rely on is_path_readable_by_grub()
3674 for the readability checks.
3675 (font_path): Use is_path_readable_by_grub() for the readability
3676 check rather than convert_system_path_to_grub_path().
3678 2008-05-30 Robert Millan <rmh@aybabtu.com>
3680 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3681 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3682 converting it first.
3683 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3684 grub.cfg for access to font file, and afterwards call it again to set
3687 2008-05-30 Robert Millan <rmh@aybabtu.com>
3689 * commands/search.c (options): Add --fs_uuid option.
3690 (search_fs_uuid): New function.
3691 (grub_cmd_search): Fix --set argument passing.
3692 Use search_fs_uuid() when requested via --fs_uuid.
3693 (grub_search_init): Update help message.
3694 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3695 and redeclare it as an array of 16-bit words.
3696 (grub_ext2_uuid): New function.
3697 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3698 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3699 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3700 (GRUB_DEVICE_BOOT_UUID): New variables.
3701 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3702 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3704 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3705 just assume `root' variable has the right value.
3706 * util/grub.d/10_linux.in: Likewise.
3707 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3709 (main): Recognise `-t fs_uuid' argument.
3711 2008-05-30 Robert Millan <rmh@aybabtu.com>
3713 * util/biosdisk.c (map): Redefine structure to hold information
3714 about GRUB drive name.
3715 (get_drive): Reimplement without assuming (and verifying) BIOS-like
3717 (call_hook): Remove.
3718 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3719 member. Assume drive has partitions.
3720 (grub_util_biosdisk_open): Access device names via `.device' struct
3722 (open_device): Likewise.
3723 (find_drive): Likewise.
3724 (read_device_map): Adjust map[] usage to match the new struct
3725 definition. Don't check for duplicates (still possible, but not cheap
3727 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3728 (make_device_name): Remove assumption of BIOS-like drive names.
3730 2008-05-30 Pavel Roskin <proski@gnu.org>
3732 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3733 compiling execute.c doesn't need grub_script.tab.h anymore.
3734 (normal/command.c_DEPENDENCIES): Likewise.
3735 (normal/function.c_DEPENDENCIES): Likewise.
3736 * conf/i386-ieee1275.rmk: Likewise.
3737 * conf/i386-linuxbios.rmk: Likewise.
3738 * conf/i386-pc.rmk: Likewise.
3739 * conf/powerpc-ieee1275.rmk: Likewise.
3740 * conf/sparc64-ieee1275.rmk: Likewise.
3742 2008-05-29 Pavel Roskin <proski@gnu.org>
3744 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3745 when scanning metadata for volume group name.
3747 * include/grub/script.h: Don't include grub_script.tab.h. It's
3748 a generated file, which may only be included from the files with
3749 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3750 use union YYSTYPE, as the later allows forward declaration.
3751 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3753 2008-05-29 Robert Millan <rmh@aybabtu.com>
3755 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3756 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3757 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3758 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3761 2008-05-29 Robert Millan <rmh@aybabtu.com>
3763 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3764 control key combinations.
3766 2008-05-29 Robert Millan <rmh@aybabtu.com>
3768 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3769 * util/ieee1275/grub-install.in: ... to here.
3770 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3771 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3772 (grub_install_SOURCES): Likewise.
3774 2008-05-29 Robert Millan <rmh@aybabtu.com>
3776 * fs/affs.c: Update copyright year.
3777 * fs/ext2.c: Likewise.
3778 * fs/fshelp.c: Likewise.
3779 * fs/hfsplus.c: Likewise.
3780 * fs/ntfs.c: Likewise.
3781 * fs/xfs.c: Likewise.
3782 * include/grub/fshelp.h: Likewise.
3783 * util/grub-mkdevicemap.c: Likewise.
3785 2008-05-28 Robert Millan <rmh@aybabtu.com>
3787 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3788 might need to be fatfs to support some firmware implementations
3791 2008-05-28 Robert Millan <rmh@aybabtu.com>
3793 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3795 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3796 (make_device_map): Likewise.
3798 2008-05-20 Bean <bean123ch@gmail.com>
3800 * fs/fshelp.c (grub_fshelp_map_block): New function.
3801 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3802 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3804 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3805 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3806 (grub_fshelp_journal): New structure.
3807 (grub_fshelp_map_block): New function prototype.
3808 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3809 (grub_fshelp_map_block): Likewise.
3811 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3812 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3813 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3814 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3815 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3816 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3817 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3818 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3819 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3820 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3821 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3822 (grub_ext2_sblock): New members for journal support.
3823 (grub_ext3_journal_header): New structure.
3824 (grub_ext3_journal_revoke_header): Likewise.
3825 (grub_ext3_journal_block_tag): Likewise.
3826 (grub_ext3_journal_sblock): Likewise.
3827 (grub_fshelp_node): New members logfile and journal.
3828 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3829 grub_fshelp_map_block to get real block number.
3830 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3832 (grub_ext2_read_inode): Likewise.
3833 (grub_ext3_get_journal): New function.
3834 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3835 (grub_ext2_close): Release memory used by journal.
3837 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3838 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3839 (grub_reiserfs_transaction_header): Renamed to
3840 grub_reiserfs_description_block, replace field data with real_blocks.
3841 (grub_reiserfs_commit_block): New structure.
3842 (grub_reiserfs_data): New member journal.
3843 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3845 (grub_reiserfs_read_symlink): Likewise.
3846 (grub_reiserfs_iterate_dir): Likewise.
3847 (grub_reiserfs_open): Likewise.
3848 (grub_reiserfs_read): Likewise.
3849 (grub_reiserfs_get_journal): New function.
3850 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3851 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3852 using grub_reiserfs_get_journal.
3853 (grub_reiserfs_close): Release memory used by journal.
3855 * fs/affs.c (grub_affs_read_block): Change block type to
3856 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3858 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3860 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3862 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3864 * fs/udf.c (grub_udf_read_block): Change block type to
3865 grub_disk_addr_t. Use type cast to avoid warning.
3867 * fs/xfs.c (grub_xfs_read_block): Likewise.
3869 2008-05-16 Christian Franke <franke@computer.org>
3871 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3872 to ensure that break with ESC will always work.
3873 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3874 Remove ESC from keyboard queue.
3876 2008-05-16 Christian Franke <franke@computer.org>
3878 * util/biosdisk.c: [__CYGWIN__] Add includes.
3879 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3880 (get_os_disk): Move variable declarations to OS specific
3881 parts to avoid warning.
3882 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3883 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3884 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3886 * util/getroot.c: [__CYGWIN__] Add includes.
3887 (strip_extra_slashes): Fix "/" case.
3888 [__CYGWIN__] (get_win32_path): New function.
3889 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3890 [__CYGWIN__] (find_root_device): Disable.
3891 [__CYGWIN__] (get_bootsec_serial): New function.
3892 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3893 [__linux__] (grub_guess_root_device): Add early returns to simplify
3895 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3896 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3897 check for Linux only.
3899 2008-05-15 Bean <bean123ch@gmail.com>
3901 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3902 keyboard hang problem in apple's intel mac.
3904 2008-05-09 Robert Millan <rmh@aybabtu.com>
3906 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3908 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3909 (make_device_map): Likewise.
3910 Reported by Aurelien Jarno <aurel32@debian.org>
3912 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
3914 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3915 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3916 (make_device_map): Output entries for xvd type disks.
3918 2008-05-07 Robert Millan <rmh@aybabtu.com>
3920 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3922 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3923 (make_device_map): Likewise.
3924 Reported by Roland Dreier <rdreier@cisco.com>
3926 2008-05-07 Robert Millan <rmh@aybabtu.com>
3928 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3929 grub_strstr() call. Correct a few mistakes in failure path handling.
3931 2008-05-06 Robert Millan <rmh@aybabtu.com>
3933 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3934 Do not print a trailing slash (therefore, the root directory is an
3936 (convert_system_path_to_grub_path): Do not remove trailing slash
3937 from make_system_path_relative_to_its_root() output.
3939 * util/i386/pc/grub-install.in: Add trailing slash to output from
3940 make_system_path_relative_to_its_root().
3942 2008-05-06 Robert Millan <rmh@aybabtu.com>
3944 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3945 ensures that output lines aren't intermangled with those sent to
3946 stderr (via grub_util_info()).
3947 * util/grub-probe.c (grub_refresh): Likewise.
3948 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3950 2008-05-05 Christian Franke <franke@computer.org>
3952 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3953 Add Cygwin device names.
3954 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3955 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3956 (check_device): Return error instead of success on empty name.
3957 (make_device_map): Move label inside linux specific code to
3958 prevent compiler warning.
3960 2008-04-30 Robert Millan <rmh@aybabtu.com>
3962 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3963 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3965 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3967 2008-04-29 Robert Millan <rmh@aybabtu.com>
3969 * docs/grub.cfg: New file (example GRUB configuration).
3971 2008-04-26 Robert Millan <rmh@aybabtu.com>
3973 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3974 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3975 and `disk/ieee1275/nand.c'.
3977 2008-04-25 Bean <bean123ch@gmail.com>
3979 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3982 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3983 change the buffer size to 4096 for cdrom device.
3985 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3987 (_linux_mod_SOURCES): New variable.
3988 (_linux_mod_CFLAGS): Likewise.
3989 (_linux_mod_LDFLAGS): Likewise.
3990 (linux_mod_SOURCES): Likewise.
3991 (linux_mod_CFLAGS): Likewise.
3992 (linux_mod_LDFLAGS): Likewise.
3993 (nand_mod_SOURCES): Likewise.
3994 (nand_mod_CFLAGS): Likewise.
3995 (nand_mod_LDFLAGS): Likewise.
3997 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3998 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3999 type property. (nand device in olpc don't have this property)
4001 * include/grub/disk.h (grub_disk_dev_id): New macro
4002 GRUB_DISK_DEVICE_NAND_ID.
4004 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4006 (grub_rescue_cmd_initrd): Likewise.
4008 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4009 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4010 ofw_cif_handler and ofw_idt, adjust padding number.
4012 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4013 GRUB_MACHINE_IEEE1275 is defined.
4015 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4016 Use NESTED_FUNC_ATTR attribute on the hook parameter.
4018 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4019 on nested function heap_init.
4020 (grub_upper_mem): New variable for i386-ieee1275.
4021 (grub_get_extended_memory): New function for i386-ieee1275.
4022 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4024 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4025 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4028 * loader/i386/ieee1275/linux.c: New file.
4030 * loader/i386/ieee1275/linux_normal.c: New file.
4032 * disk/ieee1275/nand.c: New file.
4034 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
4036 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4038 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4040 2008-04-18 Robert Millan <rmh@aybabtu.com>
4042 Restructures early code path on ieee1275 to unify grub_main() as
4043 the first C function that is executed in every platform.
4045 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4046 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4048 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4049 * kern/ieee1275/cmain.c (cmain): Rename to ...
4050 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4051 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4054 2008-04-18 Robert Millan <rmh@aybabtu.com>
4056 * util/update-grub.in: Fix syntax error when setting
4057 `GRUB_PRELOAD_MODULES'.
4058 Reported by Stephane Chazelas <stephane@artesyncp.com>
4060 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
4062 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4063 section into account, newer toolchains generate unique build ids
4064 * configure.ac: remove the test for --build-id=none acceptance,
4065 we want build ids to be preserved
4066 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4067 far from other sections don't cause the raw binary images grow
4070 2008-04-15 Robert Millan <rmh@aybabtu.com>
4072 * disk/lvm.c: Update copyright year.
4073 * kern/misc.c: Likewise.
4075 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4077 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
4078 there is no memory left for physical volume name.
4080 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4082 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4083 volume name mapping to support bigger than 9 character names properly.
4085 2008-04-13 Robert Millan <rmh@aybabtu.com>
4087 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4088 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4090 2008-04-13 Christian Franke <franke@computer.org>
4092 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4093 to create a floppy emulation boot CD when non emulation mode
4095 Enable Joliet CD filesystem extension.
4097 2008-04-13 Robert Millan <rmh@aybabtu.com>
4099 * kern/misc.c (grub_strncat): Fix off-by-one error.
4100 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4102 * kern/env.c (grub_env_context_close): Clear current context, not
4104 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4106 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4108 2008-04-13 Robert Millan <rmh@aybabtu.com>
4110 Improve robustness when handling LVM.
4112 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
4113 (and leave `*p' unmodified).
4114 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4116 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4117 iterating through it.
4118 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4120 (grub_lvm_scan_device): Check the return value (and fail gracefully
4121 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4122 Don't assume `vg->pvs != NULL' when iterating through it.
4124 2008-04-13 Robert Millan <rmh@aybabtu.com>
4126 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4127 * genmk.rb (partmap): New variable.
4128 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4129 (#{partmap}): New target rule.
4130 * genpartmaplist.sh: New file.
4131 * Makefile.in (pkglib_DATA): Add partmap.lst.
4132 (partmap.lst): New target rule.
4133 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4134 modules (including all partition maps), instead of preloading them.
4136 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4138 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4139 `linux-boot-prober' (if installed) to detect other operating
4140 systems which are installed on the computer and add them to
4142 * conf/common.rmk: Build and install 30_os-prober.
4144 2008-04-12 Robert Millan <rmh@aybabtu.com>
4146 * kern/powerpc/ieee1275/init.c: Move from here ...
4147 * kern/ieee1275/init.c: ... to here. Update all users.
4149 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4150 * kern/ieee1275/cmain.c: ... to here. Update all users.
4152 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4153 * kern/ieee1275/openfw.c: ... to here. Update all users.
4155 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4156 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4158 2008-04-10 Pavel Roskin <proski@gnu.org>
4160 * configure.ac: Always use "_cv_" in cache variables for
4161 compatibility with Autoconf 2.62.
4163 2008-04-07 Robert Millan <rmh@aybabtu.com>
4165 Revert grub/machine/init.h addition by Pavel (since it breaks on
4166 i386-ieee1275 and others):
4167 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4168 * util/powerpc/ieee1275/misc.c: Likewise.
4170 2008-04-07 Robert Millan <rmh@aybabtu.com>
4172 * util/grub-probe.c (probe): Improve error message.
4174 2008-04-07 Robert Millan <rmh@aybabtu.com>
4176 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4177 (this prevents the presence of a bogus entry from ruining the whole
4180 2008-04-06 Pavel Roskin <proski@gnu.org>
4182 * util/biosdisk.c: Include grub/util/biosdisk.h.
4183 * util/grub-fstest.c (execute_command): Make static.
4184 * util/grub-mkdevicemap.c (check_device): Likewise.
4185 * util/i386/pc/misc.c: Include grub/machine/init.h.
4186 * util/powerpc/ieee1275/misc.c: Likewise.
4187 * util/lvm.c: Include grub/util/lvm.h.
4188 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4190 * util/raid.c: Include grub/util/raid.h.
4191 (grub_util_getdiskname): Make static.
4193 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4194 grub_hostfs_fini(), as they are called from grub_init_all() and
4195 grub_fini_all() respectively. This fixes an infinite loop in
4196 grub-fstest due to double registration of hostfs.
4197 Reported by Christian Franke <Christian.Franke@t-online.de>
4199 2008-04-05 Pavel Roskin <proski@gnu.org>
4201 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4202 all 8 functions. Otherwise, probe function 0 only.
4204 2008-04-04 Pavel Roskin <proski@gnu.org>
4206 * commands/lspci.c (grub_lspci_iter): Print the bus number
4209 * commands/lspci.c (grub_pci_classes): Fix typos.
4210 (grub_lspci_iter): Don't print func twice. Print vendor ID
4211 before device ID, as it's normally done.
4213 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4214 Fix signedness warnings.
4215 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4217 * util/ieee1275/get_disk_name.c: Include config.h so that
4218 _GNU_SOURCE is defined and getline() is declared. Mark an
4219 unused argument as such. Fix a signedness warning.
4221 2008-04-02 Pavel Roskin <proski@gnu.org>
4223 * genkernsyms.sh.in: Use more robust assignments for CC and
4224 srcdir. Quote srcdir.
4225 * gensymlist.sh.in: Likewise. Assert at the compile time that
4226 the symbol table is not empty.
4228 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4229 * fs/cpio.c (grub_cpio_read): Likewise.
4231 2008-04-01 Pavel Roskin <proski@gnu.org>
4233 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4234 * disk/host.c (grub_host_open): Likewise.
4235 * disk/loopback.c (grub_loopback_open): Likewise.
4236 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4237 disk->id as in disk/host.c, not a multi-character constant.
4239 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4240 later is obsolete, potentially dangerous and sets a bad example.
4241 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4242 * util/misc.c (grub_util_get_image_size): Likewise.
4244 * disk/loopback.c (options): Improve help for "--partitions".
4246 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4247 options to align them with the short options, e.g. "echo -e".
4249 2008-03-31 Bean <bean123ch@gmail.com>
4251 * video/reader/png.c (grub_png_data): New member is_16bit and
4253 (grub_png_decode_image_header): Detect 16 bit png image.
4254 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4255 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4256 (grub_video_reader_png): Release memory occupied by image_data.
4258 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4260 (grub_nfs_mount): Skip the test for sector per cluster.
4262 * include/grub/ntfs.h (MAX_SPC): Removed.
4264 2008-03-31 Bean <bean123ch@gmail.com>
4266 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4267 (grub_probe_SOURCES): Add fs/afs.c.
4268 (grub_fstest_SOURCES): Likewise.
4269 (afs_mod_SOURCES): New variable.
4270 (afs_mod_CFLAGS): Likewise.
4271 (afs_mod_LDFLAGS): Likewise.
4273 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4274 (grub_emu_SOURCES): Likewise.
4276 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4278 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4280 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4282 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4284 * fs/afs.c: New file.
4286 2008-03-30 Pavel Roskin <proski@gnu.org>
4288 * disk/host.c: Include grub/misc.h to fix a warning.
4289 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4290 warnings about implicit declarations.
4292 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4294 * include/grub/i386/loader.h: Change declaration of
4295 grub_linux_boot() to match what grub_loader_set() expects.
4296 * util/getroot.c (grub_guess_root_device): Return const char* to
4298 * util/grub-probe.c (probe): Fix a warning about uninitialized
4299 abstraction_name variable.
4300 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4301 second argument as unused to fix a warning.
4303 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4304 missing grub_error() call.
4306 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4307 2.60 and newer uses it to define datadir.
4309 * commands/sleep.c: Fix warning about implicit declaration.
4310 * disk/memdisk.c: Likewise.
4311 * loader/aout.c: Likewise.
4312 * loader/i386/bsd_normal.c: Likewise.
4313 * util/grub-probe.c: Likewise.
4315 * commands/i386/cpuid.c (has_longmode): Make static.
4316 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4317 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4319 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4320 GDT. This is more robust, as %ds can change.
4321 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4322 calling real_to_prot().
4323 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4325 2008-03-28 Pavel Roskin <proski@gnu.org>
4327 * kern/i386/pc/startup.S: Assert that uncompressed functions
4328 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4329 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4330 code, as they push parts of the code (error handlers) beyond
4331 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4332 code as correctness and size.
4334 2008-03-28 Pavel Roskin <proski@gnu.org>
4336 * kern/i386/pc/startup.S
4337 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4338 data block address to the real mode, keep offset minimal. This
4339 works around a bug in AWARD BIOS on old Athlon systems, which
4340 makes CD detection hang.
4342 2008-03-26 Pavel Roskin <proski@gnu.org>
4344 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4346 * include/grub/normal.h: Add grub_parse_color_name_pair()
4349 2008-03-24 Bean <bean123ch@gmail.com>
4351 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4352 (cd_count): Removed.
4353 (cd_drive): New variable.
4354 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4355 (grub_biosdisk_call_hook): Likewise.
4356 (grub_biosdisk_iterate): Change cdrom detection method.
4357 (grub_biosdisk_open): Replace cd_start with cd_drive.
4358 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4359 detect cdrom device.
4361 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4363 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4364 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4365 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4366 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4367 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4368 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4369 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4370 (grub_biosdisk_cdrp): New structure.
4371 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4373 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4375 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4378 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4381 2008-03-20 Robert Millan <rmh@aybabtu.com>
4383 Remove 2 TiB limit in ata.mod.
4384 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4385 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4386 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4387 grub_uint64_t instead of grub_uint32_t.
4389 2008-03-05 Bean <bean123ch@gmail.com>
4391 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4392 (grub_multiboot): Set boot device.
4394 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4396 2008-03-02 Bean <bean123ch@gmail.com>
4398 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4401 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4403 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4406 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4409 * docs/fdl.texi: New file.
4411 * docs/mdate-sh: New file. Copied from gnulib.
4412 * docs/texinfo.tex: Likewise.
4414 * config.guess: Updated from gnulib.
4415 * install-sh: Likewise.
4417 2008-02-28 Robert Millan <rmh@aybabtu.com>
4419 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4420 (aout_mod_SOURCES): New variable.
4421 (aout_mod_CFLAGS): Likewise.
4422 (aout_mod_LDFLAGS): Likewise.
4424 * conf/i386-ieee1275.rmk: Likewise.
4426 2008-02-28 Robert Millan <rmh@aybabtu.com>
4428 * util/update-grub.in: Reorganise terminal validity check. Accept
4429 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4430 Based on suggestion by Franklin PIAT.
4432 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4434 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4436 * util/getroot.c (grub_util_check_block_device): New function that
4437 returns the given argument if it is a block device and returns NULL else.
4438 * util/grub-probe.c (argument_is_device): New variable.
4439 (probe): Promote device_name from a variable to an argument. Receive
4440 device_name from grub_util_check_block_device() if path is NULL and from
4441 grub_guess_root_device() else. Do not free() device_name anymore.
4442 (options): Introduce new parameter '-d, --device'.
4443 (main): Add description of the new parameter to the help screen.
4444 Rename path variable to argument. Set argument_is_device if the '-d'
4445 option is given. Pass argument to probe() depending on
4448 2008-02-24 Bean <bean123ch@gmail.com>
4450 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4451 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4452 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4453 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4454 (GRUB_ISO9660_VOLDESC_END): Likewise.
4455 (grub_iso9660_primary_voldesc): New member escape.
4456 (grub_iso9660_data): New member joliet.
4457 (grub_iso9660_convert_string): New function.
4458 (grub_iso9660_mount): Detect joliet extension.
4459 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4460 (grub_iso9660_iso9660_label): Likewise.
4462 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4463 (grub_setup_SOURCES): Add fs/udf.c.
4464 (grub_fstest_SOURCES): Likewise.
4465 (udf_mod_SOURCES): New variable.
4466 (udf_mod_CFLAGS): Likewise.
4467 (udf_mod_LDFLAGS): Likewise.
4469 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4470 (grub_emu_SOURCES): Likewise.
4472 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4474 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4476 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4478 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4480 * fs/udf.c: New file.
4482 2008-02-24 Robert Millan <rmh@aybabtu.com>
4484 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4485 (normal/lexer.c_DEPENDENCIES): New variables.
4486 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4487 (normal/lexer.c_DEPENDENCIES): Likewise.
4488 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4489 (normal/lexer.c_DEPENDENCIES): Likewise.
4490 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4491 (normal/lexer.c_DEPENDENCIES): Likewise.
4492 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4493 (normal/lexer.c_DEPENDENCIES): Likewise.
4494 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4495 (normal/lexer.c_DEPENDENCIES): Likewise.
4497 2008-02-23 Robert Millan <rmh@aybabtu.com>
4499 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4500 since they were intended to be in hex. This didn't break previously
4501 because of a bug in gpt_partition_map_iterate() (see below).
4503 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4504 when checking the validity of GPT header.
4505 Remove `partno', since it always provides the same information as `i'.
4507 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4509 * include/grub/efi/time.h: Fix a wrong comment.
4511 2008-02-19 Pavel Roskin <proski@gnu.org>
4513 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4516 2008-02-19 Bean <bean123ch@gmail.com>
4518 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4519 (aout_mod_SOURCES): New variable.
4520 (aout_mod_CFLAGS): Likewise.
4521 (aout_mod_LDFLAGS): Likewise.
4522 (_bsd_mod_SOURCES): New variable.
4523 (_bsd_mod_CFLAGS): Likewise.
4524 (_bsd_mod_LDFLAGS): Likewise.
4525 (bsd_mod_SOURCES): New variable.
4526 (bsd_mod_CFLAGS): Likewise.
4527 (bsd_mod_LDFLAGS): Likewise.
4529 * include/grub/aout.h: New file.
4531 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4533 * include/grub/i386/bsd.h: New file.
4535 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4538 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4539 function is called, so that it's possible to change it inside the hook.
4540 (grub_elf64_load): Likewise.
4541 (grub_elf_file): Don't close the file if elf header is not found.
4542 (grub_elf_close): Close the file if grub_elf_file fails (The new
4543 grub_elf_file won't close it).
4544 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4545 (grub_elf64_size): Likewise.
4547 * kern/i386/loader.S (grub_unix_real_boot): New function.
4549 * loader/aout.c: New file.
4551 * loader/i386/bsd.c: New file.
4553 * loader/i386/bsd_normal.c: New file.
4555 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4557 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
4558 can test other formats.
4560 2008-02-19 Robert Millan <rmh@aybabtu.com>
4562 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4563 (grub_gpt_partition_type_empty): Redefine with macro from
4564 `<grub/gpt_partition.h>'.
4565 (gpt_partition_map_iterate): Adjust partition type comparison.
4567 Export `entry' as partmap-specific `part.data' struct.
4568 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4570 * include/grub/gpt_partition.h (grub_gpt_header)
4571 (grub_gpt_partentry): ... to here (new file).
4573 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4575 (grub_gpt_partition_type_bios_boot): New const variable, defined
4576 with macro from `<grub/gpt_partition.h>'.
4578 (setup): Replace `first_start' with `embed_region', which keeps
4579 track of the embed region (and is partmap-agnostic).
4581 Replace find_first_partition_start() with find_usable_region(),
4582 which finds a usable region for embedding using partmap-specific
4583 knowledge (supports PC/MSDOS and GPT).
4585 Fix all assumptions that the embed region start at sector 1, using
4586 `embed_region.start' from now on. Similarly, use `embed_region.end'
4587 rather than `first_start' to calculate available size.
4589 In grub_util_info() message, replace "into after the MBR" with an
4590 indication of the specific sector our embed region starts at.
4592 2008-02-19 Robert Millan <rmh@aybabtu.com>
4594 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4595 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4596 `commands/reboot.c'.
4597 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4598 (halt_mod_SOURCES): Likewise.
4599 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4600 (halt_mod_SOURCES): Likewise.
4602 2008-02-17 Christian Franke <franke@computer.org>
4604 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4606 2008-02-17 Robert Millan <rmh@aybabtu.com>
4608 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4609 set `first_start' to 0 for non-PC/MSDOS partition maps.
4611 2008-02-16 Robert Millan <rmh@aybabtu.com>
4613 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4614 do not assume partition map is PC/MSDOS before performing checks that
4615 are specific to that layout.
4617 2008-02-13 Robert Millan <rmh@aybabtu.com>
4619 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4620 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4621 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4623 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4625 * configure.ac: Only a cosmetic change on the handling of
4626 -fno-stack-protector.
4628 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
4630 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4631 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4633 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4634 (halt_mod_SOURCES): New variable.
4635 (halt_mod_CFLAGS): Likewise.
4636 (halt_mod_LDFLAGS): Likewise.
4637 (reboot_mod_SOURCES): Likewise.
4638 (reboot_mod_CFLAGS): Likewise.
4639 (reboot_mod_LDFLAGS): Likewise.
4641 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4642 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4644 (halt_mod_SOURCES): Likewise.
4645 (reboot_mod_SOURCES): Likewise.
4647 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4648 commands/i386/pc/reboot.c by commands/reboot.c.
4649 (reboot_mod_SOURCES): Likewise.
4651 * commands/i386/pc/reboot.c: merge this file ...
4653 * commands/ieee1275/reboot.c: ... and this file ...
4655 * commands/reboot.c: ... to this file.
4656 Add some precompiler directive to include the correct header for
4659 * commands/ieee1275/halt.c: move this file ...
4661 * commands/halt.c: ... to here.
4662 Add some precompiler directive to include the correct header for
4665 * include/grub/efi/efi.h (grub_reboot): New function declaration.
4666 (grub_halt): Likewise.
4668 * kern/efi/efi.c (grub_reboot): New function.
4669 (grub_halt): Likewise.
4671 2008-02-12 Robert Millan <rmh@aybabtu.com>
4673 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4674 /dev (like it is done for /dev/mapper). This doesn't provide support
4675 for EVMS, but at least it is now easy to identify the problem when it
4678 2008-02-11 Robert Millan <rmh@aybabtu.com>
4680 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4681 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4682 comparing it with -1, not 0.
4684 2008-02-10 Robert Millan <rmh@aybabtu.com>
4686 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4688 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4689 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4691 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4692 `disk/lvm.c' to the end of the list.
4693 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4694 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4696 2008-02-10 Robert Millan <rmh@aybabtu.com>
4698 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4699 grub_print_error() instead. This will let user know why we're entering
4701 Based on suggestions from Sam Morris.
4703 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
4705 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4706 on remaining N args, instead of "--" arg N times.
4708 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4710 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4711 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4712 pattern for unknown glyphs.
4714 2008-02-09 Robert Millan <rmh@aybabtu.com>
4716 * configure.ac: Probe for `help2man'.
4717 * Makefile.in (builddir): New variable.
4718 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4719 or otherwise add a few flags/options to it.
4720 (install-local): For every executable utility or script that is
4721 installed, invoke $(HELP2MAN) to install a manpage based on --help
4724 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4725 that it doesn't prevent --help from working in build tree.
4727 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4728 with `bug-grub@gnu.org'.
4729 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4730 * util/update-grub.in (usage): New function.
4731 Implement proper argument check, with support for --help and --version
4732 (as well as existing -y).
4734 2008-02-09 Christian Franke <franke@computer.org>
4736 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4737 avoid overwriting previous output.
4738 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4740 2008-02-09 Robert Millan <rmh@aybabtu.com>
4742 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4745 2008-02-09 Robert Millan <rmh@aybabtu.com>
4747 * commands/sleep.c: New file.
4748 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4749 (sleep_mod_SOURCES): New variable.
4750 (sleep_mod_CFLAGS): Likewise.
4751 (sleep_mod_LDFLAGS): Likewise.
4753 2008-02-09 Robert Millan <rmh@aybabtu.com>
4755 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4756 situations in which we can deduce the RAID size and the superblock
4759 2008-02-09 Robert Millan <rmh@aybabtu.com>
4761 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4762 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4763 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4765 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4766 and return a grub_diskmemberlist_t composed of physical array members.
4767 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4769 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4771 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4772 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4773 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4775 * util/grub-probe.c (probe): Move partmap probing code from here ...
4776 (probe_partmap): ... to here.
4777 (probe): Use probe_partmap() once for the disk we're probing, and
4778 additionally, when such disk contains a memberlist() struct member,
4779 once for each disk that is contained in the structure returned by
4782 2008-02-09 Robert Millan <rmh@aybabtu.com>
4784 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4785 environment variable to 'all' in order to obtain debug output from
4787 * util/i386/pc/grub-setup.c (main): Likewise.
4789 2008-02-08 Robert Millan <rmh@aybabtu.com>
4791 * disk/raid.c (grub_raid_scan_device): Check for
4792 `array->device[sb.this_disk.number]' rather than for
4793 `array->device[sb.this_disk.number]->name', since the latter is not
4794 guaranteed to be accessible.
4796 2008-02-08 Robert Millan <rmh@aybabtu.com>
4798 * disk/raid.c: Update copyright.
4799 * fs/cpio.c: Likewise.
4800 * include/grub/raid.h: Likewise.
4801 * loader/i386/pc/multiboot.c: Likewise.
4802 * util/hostfs.c: Likewise.
4804 2008-02-08 Robert Millan <rmh@aybabtu.com>
4806 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4807 to a grub_disk_t array.
4808 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4810 (grub_raid_scan_device): Replace `device[x].name' accesses with
4811 `device[x]->name'. Simplify initialization of `array->device[x]'.
4813 2008-02-08 Robert Millan <rmh@aybabtu.com>
4815 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4816 grub_dprintf() calls.
4817 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4820 2008-02-07 Christian Franke <franke@computer.org>
4822 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4823 instead of fseek and ftell to support large files.
4824 (grub_hostfs_read): Likewise.
4826 2008-02-07 Robert Millan <rmh@aybabtu.com>
4828 Patch from Jeroen Dekkers.
4829 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4830 failure, since successfully reading all array members might not be
4833 2008-02-06 Robert Millan <rmh@aybabtu.com>
4835 * util/grub-probe.c (probe): Simplify partmap probing (with the
4836 assumption that the first word up to the underscore equals to
4839 2008-02-06 Christian Franke <franke@computer.org>
4841 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4842 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4843 last block of a cpio or tar stream.
4844 Check for "TRAILER!!!" instead of any empty data
4845 block to detect last block of a cpio stream.
4846 (grub_cpio_dir): Fix constness of variable np.
4847 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4848 cpio or tar trailer is detected. This fixes a crash
4849 on open of a non existing file.
4851 2008-02-05 Bean <bean123ch@gmail.com>
4853 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4855 (grub_multiboot_load_elf64): Likewise.
4856 (grub_multiboot): Initialize mbi structure.
4858 * util/grub-fstest.c: Don't include unused header file script.h.
4860 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4862 (grub_fstest_SOURCES): Likewise.
4864 2008-02-05 Robert Millan <rmh@aybabtu.com>
4866 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4867 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4868 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4869 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4871 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4872 (translation_table): Replace hardcoded values with macros
4873 provided by `<grub/term.h>'.
4875 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4876 (keyboard_map): Correct/add a few values, with macros provided
4878 (keyboard_map_shift): Zero values that don't differ from their
4879 `keyboard_map' equivalents.
4880 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4881 Discard the second scan code that is always sent by Caps lock.
4882 Only use `keyboard_map_shift' when it provides a non-zero value,
4883 otherwise fallback to `keyboard_map'.
4885 2008-02-04 Bean <bean123ch@gmail.com>
4887 * Makefile.in (enable_grub_fstest): New variable.
4889 * conf/common.rmk (grub_fstest_init.lst): New rule.
4890 (grub_fstest_init.h): Likewise.
4891 (grub_fstest_init.c): Likewise.
4892 (util/grub-fstest.c_DEPENDENCIES): New variable.
4893 (grub_fstest_SOURCES): Likewise.
4895 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4897 * util/grub-fstest.c: New file.
4899 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4901 Make grub-setup handle a separate root device.
4903 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4904 so that the root device can be compared with the destination
4906 When embedding the core image, if the root and destination devices
4907 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4909 When not embedding, set ROOT_DRIVE to 0xFF.
4911 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4913 Add support for having a grub directory in a different drive. This
4914 is still only the data handling part.
4916 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4917 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4918 (grub_root_drive): New variable.
4920 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4921 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4922 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4925 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4927 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4929 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4931 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4932 is bogus, because PXE booting does not specify any drive
4935 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4936 am not sure if this is really correct.
4938 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4939 is always identical to the boot drive when booting from a CD.
4941 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4943 (root_drive): New variable.
4944 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4945 (setup_sectors): Push %dx right after popping it, because %dh will
4947 (copy_buffer): Restore %dx.
4949 2008-02-03 Robert Millan <rmh@aybabtu.com>
4951 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4952 use `cdboot.img' for cdrom images.
4954 2008-02-03 Robert Millan <rmh@aybabtu.com>
4956 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4957 only setup gfxterm when `font' command has succeeded.
4959 2008-02-03 Robert Millan <rmh@aybabtu.com>
4961 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4962 (grub_rescue_cmd_multiboot_loader)
4963 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4965 2008-02-03 Pavel Roskin <proski@gnu.org>
4967 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4968 %edx and %esi from stack only after grub_gate_a20() is called.
4969 grub_gate_a20() clobbers %edx.
4971 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4973 * configure.ac (AC_INIT): Bumped to 1.96.
4975 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4976 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4977 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4978 video/readers/png.c.
4980 2008-02-03 Bean <bean123ch@gmail.com>
4982 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4983 (cdboot_img_SOURCES): New variable.
4984 (cdboot_img_ASFLAGS): New variable.
4985 (cdboot_img_LDFLAGS): New variable.
4987 * boot/i386/pc/cdboot.S: New file.
4989 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4990 (cd_count): Likewise.
4991 (grub_biosdisk_get_drive): Add support for cd device.
4992 (grub_biosdisk_call_hook): Likewise.
4993 (grub_biosdisk_iterate): Likewise.
4994 (grub_biosdisk_open): Likewise.
4995 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4996 (grub_biosdisk_rw): Support reading from cd device.
4997 (GRUB_MOD_INIT): Iterate cd devices.
4999 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5000 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5001 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5003 * kern/i386/pc/init.c (make_install_device): Check for cd device.
5005 2008-02-02 Robert Millan <rmh@aybabtu.com>
5007 * commands/read.c: New file.
5008 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5009 (read_mod_SOURCES): New variable.
5010 (read_mod_CFLAGS): Likewise.
5011 (read_mod_LDFLAGS): Likewise.
5013 2008-02-02 Robert Millan <rmh@aybabtu.com>
5015 * normal/main.c (grub_normal_execute): Check for `menu->size' when
5016 determining whether menu has to be displayed.
5018 2008-02-02 Marco Gerards <marco@gnu.org>
5020 * bus/pci.c: New file.
5022 * include/grub/pci.h: Likewise.
5024 * include/grub/i386/pc/pci.h: Likewise.
5026 * commands/lspci.c: Likewise.
5028 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5030 (pci_mod_SOURCES): New variable.
5031 (pci_mod_CFLAGS): Likewise.
5032 (pci_mod_LDFLAGS): Likewise.
5033 (lspci_mod_SOURCES): Likewise.
5034 (lspci_mod_CFLAGS): Likewise.
5035 (lspci_mod_LDFLAGS): Likewise.
5037 2008-02-02 Bean <bean123ch@gmail.com>
5039 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5040 (grub_ufs_get_file_block): Fix indirect block calculation problem.
5042 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5043 (grub_xfs_btree_node): New structure.
5044 (grub_xfs_btree_root): New structure.
5045 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5046 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5047 (GRUB_XFS_EXTENT_BLOCK): Likewise.
5048 (GRUB_XFS_EXTENT_SIZE): Likewise.
5049 (grub_xfs_read_block): Support btree format type.
5050 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5051 Use directory block as basic unit.
5053 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5055 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5056 __attribute__ ((__regparm__ (1))).
5058 2008-02-01 Robert Millan <rmh@aybabtu.com>
5060 Correct a mistake in previous commit.
5062 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5064 (normal/command.c_DEPENDENCIES): New variable.
5066 2008-02-01 Robert Millan <rmh@aybabtu.com>
5068 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5070 (normal/command.c_DEPENDENCIES): New variable.
5071 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5072 * conf/i386-ieee1275.rmk: Likewise.
5073 * conf/i386-linuxbios.rmk: Likewise.
5074 * conf/i386-pc.rmk: Likewise.
5075 * conf/sparc64-ieee1275.rmk: Likewise.
5076 * conf/powerpc-ieee1275.rmk: Likewise.
5077 (grub_emu_SOURCES): Add `fs/fshelp.c'.
5079 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5081 2008-02-01 Robert Millan <rmh@aybabtu.com>
5083 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5084 call at beginning of function.
5086 2008-01-31 Pavel Roskin <proski@gnu.org>
5088 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
5089 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5090 (grub_mkrescue_SOURCES): Likewise.
5091 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5093 2008-01-30 Robert Millan <rmh@aybabtu.com>
5095 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5096 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5097 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5098 (grub_probe_SOURCES): ... to here.
5100 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5101 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5102 * conf/i386-ieee1275.rmk: Likewise.
5103 * conf/i386-linuxbios.rmk: Likewise.
5104 * conf/powerpc-ieee1275.rmk: Likewise.
5106 2008-01-30 Tristan Gingold <gingold@free.fr>
5108 * kern/rescue.c: Silently accept empty lines.
5110 2008-01-29 Bean <bean123ch@gmail.com>
5112 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5113 (real_code_2): Code cleanup and change comment style.
5114 (move_memory): Avoid using 32-bit address mode.
5116 2008-01-29 Bean <bean123ch@gmail.com>
5118 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5119 (png_mod_SOURCES): New variable.
5120 (png_mod_CFLAGS): Likewise.
5121 (png_mod_LDFLAGS): Likewise.
5123 * video/readers/png.c: New file.
5125 2008-01-28 Robert Millan <rmh@aybabtu.com>
5127 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5128 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5129 `ifndef GRUB_MOD_GAP' hack.
5130 * util/elf/grub-mkimage.c (add_segments): Likewise.
5132 2008-01-27 Robert Millan <rmh@aybabtu.com>
5134 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5135 `GRUB_MOD_GAP' for platforms in which it's not defined.
5136 * util/elf/grub-mkimage.c (add_segments): Likewise.
5138 2008-01-27 Robert Millan <rmh@aybabtu.com>
5140 Get grub-emu to build again (including parallel builds).
5142 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5144 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5145 (normal/execute.c_DEPENDENCIES): ... this, ...
5146 (grub-emu_DEPENDENCIES): ... and this.
5148 * conf/i386-efi.rmk: Likewise.
5149 * conf/i386-linuxbios.rmk: Likewise.
5150 * conf/i386-ieee1275.rmk: Likewise.
5151 * conf/powerpc-ieee1275.rmk: Likewise.
5152 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5154 2008-01-27 Robert Millan <rmh@aybabtu.com>
5156 * NEWS: Add a few items.
5158 2008-01-27 Robert Millan <rmh@aybabtu.com>
5160 Fix parallel builds with grub-emu. Based on earlier commit for
5161 grub-probe and grub-setup.
5163 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5164 (util/grub-emu.c_DEPENDENCIES): ... this.
5165 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5166 (util/grub-emu.c_DEPENDENCIES): ... this.
5167 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5168 (util/grub-emu.c_DEPENDENCIES): ... this.
5169 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5170 (util/grub-emu.c_DEPENDENCIES): ... this.
5171 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5172 (util/grub-emu.c_DEPENDENCIES): ... this.
5174 2008-01-27 Pavel Roskin <proski@gnu.org>
5176 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5177 to create a gap between _end and the modules added to the image
5178 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5179 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5180 * util/elf/grub-mkimage.c (add_segments): Likewise.
5182 2008-01-26 Pavel Roskin <proski@gnu.org>
5184 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5185 just return an error.
5187 2008-01-26 Bean <bean123ch@gmail.com>
5189 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5190 (grub_reiserfs_get_item): Save offset of the next item.
5191 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5193 2008-01-25 Robert Millan <rmh@aybabtu.com>
5195 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5196 make all filesystem sources appear together (possibly fixing omissions
5198 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5199 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5200 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5201 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5203 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5205 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5206 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5207 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5208 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5210 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5211 (probe): Add a sanity check to make sure of our ability to read
5212 requested files when probing for filesystem type.
5214 * genmk.rb: Update copyright year (2007).
5216 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5217 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5218 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5219 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5220 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5221 : Remove function prototypes.
5223 2008-01-25 Robert Millan <rmh@aybabtu.com>
5225 Revert my previous commits (based on wrong assumption of how grub_errno
5228 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
5229 * kern/file.c (grub_file_open): Likewise.
5231 2008-01-24 Pavel Roskin <proski@gnu.org>
5233 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5234 that hang if GRUB tries to setup colors.
5235 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5236 colors for firmwares that don't support it.
5237 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5238 Recognize Open Hack'Ware, set flags to work around its
5241 2008-01-24 Robert Millan <rmh@aybabtu.com>
5243 * kern/file.c (grub_file_open): Do not account previous failures of
5244 unrelated functions when grub_errno is checked for.
5245 Reported by Oleg Strikov.
5247 2008-01-24 Bean <bean123ch@gmail.com>
5249 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5250 (grub_ufs_sblock): New member volume name.
5251 (grub_ufs_find_file): Fix string copy bug.
5252 (grub_ufs_label): Implement this function properly.
5254 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5255 (grub_hfs_iterate_records): Use the correct file number for extents
5256 and catalog file. Fix problem in next index calculation.
5257 (grub_hfs_find_node): Replace recursive function call with loop.
5258 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5260 2008-01-23 Robert Millan <rmh@aybabtu.com>
5262 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5263 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5264 (grub_multiboot2_real_boot): New function prototype.
5266 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5267 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5269 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5270 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5272 2008-01-23 Robert Millan <rmh@aybabtu.com>
5274 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5275 #ifdef'ed out grub_printf().
5277 2008-01-23 Robert Millan <rmh@aybabtu.com>
5279 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5280 grub_dprintf calls, since they make "debug=all" mode unusable.
5281 (grub_console_checkkey): Likewise.
5283 2008-01-23 Robert Millan <rmh@aybabtu.com>
5285 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5286 `term/i386/pc/at_keyboard.c'.
5287 (pkglib_MODULES): Add `serial.mod'.
5288 (serial_mod_SOURCES): New variable.
5289 (serial_mod_CFLAGS): Likewise.
5290 (serial_mod_LDFLAGS): Likewise.
5292 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5293 `<grub/powerpc/ieee1275/console.h>'.
5294 (grub_keyboard_controller_init): New function prototype.
5295 (grub_console_checkkey): Likewise.
5296 (grub_console_getkey): Likewise.
5298 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5301 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5302 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5304 2008-01-23 Robert Millan <rmh@aybabtu.com>
5306 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5307 present, "(memdisk)/boot/grub" becomes the default prefix.
5309 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5310 a memdisk tarball with all the modules. Add --overlay=DIR option that
5311 allows users to overlay additional files into the image.
5313 2008-01-23 Robert Millan <rmh@aybabtu.com>
5315 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5316 and `machine/memory.h'.
5317 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5318 (_multiboot_mod_SOURCES): New variable.
5319 (_multiboot_mod_CFLAGS): Likewise.
5320 (_multiboot_mod_LDFLAGS): Likewise.
5321 (multiboot_mod_SOURCES): Likewise.
5322 (multiboot_mod_CFLAGS): Likewise.
5323 (multiboot_mod_LDFLAGS): Likewise.
5325 * include/grub/i386/ieee1275/loader.h: New file.
5327 * include/grub/i386/ieee1275/machine.h: Likewise.
5329 * include/grub/i386/ieee1275/memory.h: Likewise.
5331 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5332 variable declaration.
5333 (grub_os_area_size): Likewise.
5335 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5336 (grub_lower_mem, grub_upper_mem): New variables.
5337 (grub_stop_floppy): New function (just to make
5338 grub_multiboot2_real_boot() happy).
5340 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5341 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5342 (grub_stop): New function.
5343 Include `"../realmode.S"' and `"../loader.S"'.
5345 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5346 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5348 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5349 rely on grub_multiboot2_real_boot() for final boot.
5351 2008-01-22 Robert Millan <rmh@aybabtu.com>
5353 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5354 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5355 device that doesn't look like an SD card.
5356 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5357 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5358 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5359 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5362 2008-01-22 Robert Millan <rmh@aybabtu.com>
5364 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5365 avoid claiming over our own code.
5367 2008-01-22 Bean <bean123ch@gmail.com>
5369 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5370 (jpeg_mod_SOURCES): New variable.
5371 (jpeg_mod_CFLAGS): Likewise.
5372 (jpeg_mod_LDFLAGS): Likewise.
5374 * video/readers/jpeg.c : New file.
5376 2008-01-22 Bean <bean123ch@gmail.com>
5378 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5379 there are no more items.
5381 2008-01-21 Robert Millan <rmh@aybabtu.com>
5383 * kern/mm.c (grub_mm_init_region): Improve debug message.
5385 2008-01-21 Robert Millan <rmh@aybabtu.com>
5387 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5388 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5390 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5392 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5393 Indicates start of upper memory.
5394 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5395 (generate_image): Abort when image size is big enough to corrupt
5398 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5399 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5400 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5401 instead of hardcoding 0xA0000.
5402 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5403 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5404 instead of hardcoding 0xA0000.
5406 2008-01-21 Robert Millan <rmh@aybabtu.com>
5408 * disk/memdisk.c (memdisk_size): New variable.
5409 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5411 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5412 image to dynamic memory.
5413 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5414 `memdisk_size'. Free memdisk block.
5416 2008-01-21 Robert Millan <rmh@aybabtu.com>
5418 Fix detection of very small filesystems (like tar).
5420 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5421 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5422 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5423 a problem with this disk).
5425 2008-01-21 Robert Millan <rmh@aybabtu.com>
5427 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5428 on grub_biosdisk_rw_standard() error.
5430 2008-01-21 Robert Millan <rmh@aybabtu.com>
5432 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5434 * kern/elf.c: Likewise.
5435 * kern/ieee1275/ieee1275.c: Likewise.
5436 * kern/powerpc/ieee1275/openfw.c: Likewise.
5437 * term/ieee1275/ofconsole.c: Likewise.
5439 2008-01-21 Robert Millan <rmh@aybabtu.com>
5441 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5443 * include/grub/kernel.h (grub_arch_memdisk_addr)
5444 (grub_arch_memdisk_size): Moved from here ...
5446 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5447 (grub_arch_memdisk_size): ... to here.
5449 2008-01-21 Robert Millan <rmh@aybabtu.com>
5451 Mostly based on bugfix from Bean.
5453 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5454 attribute with hook() parameter.
5455 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5457 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5458 attribute with hook() parameter.
5459 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5462 2008-01-21 Robert Millan <rmh@aybabtu.com>
5464 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5465 (pkglib_MODULES): Add `memdisk.mod'.
5466 (memdisk_mod_SOURCES): New variable.
5467 (memdisk_mod_CFLAGS): Likewise.
5468 (memdisk_mod_LDFLAGS): Likewise.
5470 * disk/memdisk.c: New file.
5472 * include/grub/disk.h (grub_disk_dev_id): Add
5473 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5475 * include/grub/i386/pc/kernel.h
5476 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5477 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5478 (grub_kernel_image_size): New variable declaration.
5479 (grub_total_module_size): Likewise.
5480 (grub_memdisk_image_size): Likewise.
5482 * include/grub/i386/pc/memory.h
5483 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5485 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5486 (grub_arch_memdisk_addr): New variable declaration.
5487 (grub_arch_memdisk_size): Likewise.
5489 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5490 (grub_arch_memdisk_size): Likewise.
5492 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5493 (codestart): Replace hardcoded `0x100000' with
5494 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5496 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5497 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5498 not NULL, append the contents of the file it refers to, at the end of
5499 the compressed kernel image. Initialize `grub_memdisk_image_size'
5500 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5501 (options): Add "memdisk"|'m' option.
5502 (main): Parse --memdisk|-m option, and pass user-provided path as
5503 parameter to generate_image().
5505 2008-01-20 Robert Millan <rmh@aybabtu.com>
5507 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5508 grub_dprintf() calls from here ...
5509 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5511 2008-01-20 Robert Millan <rmh@aybabtu.com>
5513 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5515 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5517 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5518 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5519 `GRUB_IEEE1275_FLAG_REAL_MODE'.
5520 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
5522 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5523 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5525 2008-01-19 Robert Millan <rmh@aybabtu.com>
5527 Get rid of confusing function (superseded by
5528 `grub_ieee1275_get_integer_property')
5529 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5531 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5533 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5534 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
5535 in native endianness from grub_ieee1275_get_integer_property().
5537 2008-01-19 Robert Millan <rmh@aybabtu.com>
5539 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5540 command after "shut-down", since implementations differ on which
5541 the command for halt is.
5543 2008-01-19 Robert Millan <rmh@aybabtu.com>
5545 * include/grub/i386/linuxbios/console.h: Add header protection.
5546 (grub_keyboard_controller_init): New function prototype.
5547 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5548 (KEYBOARD_COMMAND_READ): Likewise.
5549 (KEYBOARD_COMMAND_WRITE): Likewise.
5550 (KEYBOARD_SCANCODE_SET1): Likewise.
5551 (grub_keyboard_controller_write): New function.
5552 (grub_keyboard_controller_read): Likewise.
5553 (grub_keyboard_controller_init): Likewise.
5555 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5556 (grub_console_init): On coreboot/LinuxBIOS, call
5557 grub_keyboard_controller_init().
5559 2008-01-19 Robert Millan <rmh@aybabtu.com>
5561 PowerPC changes provided by Pavel Roskin.
5563 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5564 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5565 don't rely on cmain() doing it.
5566 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5567 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5569 2008-01-16 Robert Millan <rmh@aybabtu.com>
5571 * include/grub/i386/linuxbios/memory.h
5572 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5573 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5574 receive `table_header' as argument. Instead, probe for it in the
5575 known memory ranges where it can be present.
5576 (grub_available_iterate): Do not pass a fixed `table_header' address
5577 to grub_linuxbios_table_iterate().
5579 2008-01-15 Robert Millan <rmh@aybabtu.com>
5581 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5582 * conf/i386-ieee1275.rmk: New file.
5583 * include/grub/i386/ieee1275/console.h: Likewise.
5584 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5585 * include/grub/i386/ieee1275/kernel.h: Likewise.
5586 * include/grub/i386/ieee1275/time.h: Likewise.
5587 * kern/i386/ieee1275/init.c: Likewise.
5588 * kern/i386/ieee1275/startup.S: Likewise.
5590 2008-01-15 Robert Millan <rmh@aybabtu.com>
5592 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5593 when pointers are 32-bit (but still do set it to one when they are
5596 2008-01-15 Robert Millan <rmh@aybabtu.com>
5598 * include/grub/ieee1275/ieee1275.h
5599 (grub_ieee1275_get_integer_property): New function prototype.
5601 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5602 (grub_ieee1275_get_integer_property): New function. Wraps around
5603 grub_ieee1275_get_property() to handle endianness.
5605 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5606 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
5608 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5609 (grub_map): Likewise.
5610 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5612 2008-01-15 Bean <bean123ch@gmail.com>
5614 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5615 (grub_script_execute_cmdline): Reset grub_errno.
5617 * normal/main.c (read_config_file): Reset grub_errno.
5619 * normal/parse.y (script_init): New.
5620 (script): Move function and menuentry here.
5622 (command): Add delimiter at the end of command.
5623 (commands): Adjust to match the new command.
5624 (commandblock): Remove grub_script_lexer_record_start.
5625 (menuentry): Add grub_script_lexer_record_start, use the new commands.
5626 (if): Use the new commands.
5628 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5630 2008-01-15 Robert Millan <rmh@aybabtu.com>
5632 * normal/menu.c (run_menu): Move timeout message from here ...
5633 (print_timeout): ... to here.
5634 (run_menu): Use print_timeout() once during initial draw to print
5635 the whole message, and again in every clock tick to update only
5636 the number of seconds.
5638 2008-01-15 Robert Millan <rmh@aybabtu.com>
5640 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5641 actual size of `available' from grub_ieee1275_get_property(), and
5642 restrict parsing to that bound.
5644 2008-01-15 Christian Franke <franke@computer.org>
5646 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5647 (argp_program_version): Remove variable.
5648 (argp_program_bug_address): Likewise.
5649 (options): Convert from struct argp_option to struct option.
5650 (struct arguments): Remove.
5651 (parse_opt): Remove.
5652 (usage): New function.
5653 (main): Replace struct args members by simple variables.
5654 Replace argp_parse() by getopt_long().
5655 Add switch to evaluate options.
5656 Add missing "(...)" around root_dev in prefix string.
5658 2008-01-14 Robert Millan <rmh@aybabtu.com>
5660 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
5661 for grub_ieee1275_exit(), in order to improve portability.
5663 2008-01-14 Robert Millan <rmh@aybabtu.com>
5665 * util/grub.d/10_linux.in (prefix): Define.
5666 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
5668 2008-01-13 Pavel Roskin <proski@gnu.org>
5670 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5671 grub_errno if no errors have been detected.
5673 2008-01-12 Robert Millan <rmh@aybabtu.com>
5675 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5676 (grub_util_get_dev_abstraction): New function prototype.
5678 * util/getroot.c: Include `<grub/util/getroot.h>'
5679 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5680 (grub_util_get_dev_abstraction): ... here (new function).
5682 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5683 `PRINT_ABSTRACTION'.
5684 (probe): Probe for abstraction type when requested.
5685 (main): Understand `--target=abstraction'.
5687 * util/i386/efi/grub-install.in: Add abstraction module to core
5688 image when it is found to be necessary.
5689 * util/i386/pc/grub-install.in: Likewise.
5690 * util/powerpc/ieee1275/grub-install.in: Likewise.
5692 * util/update-grub_lib.in (font_path): Return system path without
5693 converting to GRUB path.
5694 * util/update-grub.in: Convert system path returned by font_path()
5695 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5696 abstraction module is needed for loading fonts (if any). Export
5697 that as `GRUB_PRELOAD_MODULES'.
5698 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5701 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5703 Remove some unused code from reiserfs.
5705 * fs/reiserfs.c (struct grub_reiserfs_key)
5706 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5707 (struct grub_reiserfs_node_body): Removed.
5708 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5710 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5712 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5714 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5716 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5718 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5720 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5721 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5722 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5724 2008-01-10 Robert Millan <rmh@aybabtu.com>
5726 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5727 Determines if a file is garbage left by packaging systems, etc.
5728 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5729 for processing /etc/grub.d scripts.
5730 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5731 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5732 as a condition for processing Linux images.
5734 2008-01-10 Pavel Roskin <proski@gnu.org>
5736 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5737 to compile reiserfs.c on PowerPC.
5739 2008-01-10 Robert Millan <rmh@aybabtu.com>
5741 * kern/device.c (grub_device_iterate): Do not abort device iteration
5742 when one of the devices cannot be opened.
5743 * kern/disk.c (grub_disk_open): Do not account previous failures of
5744 unrelated functions when grub_errno is checked for.
5746 2008-01-08 Robert Millan <rmh@aybabtu.com>
5748 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5749 `! grub_linux_is_bzimage', change order of address comparison to make
5750 it more intuitive, and improve "too big zImage" error message.
5752 2008-01-08 Robert Millan <rmh@aybabtu.com>
5754 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5755 `$(update-grub_DATA)'.
5756 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5759 2008-01-07 Robert Millan <rmh@aybabtu.com>
5761 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5762 which instruction is modified by grub-setup during installation
5763 (since it wasn't obvious by only looking at this file).
5765 2008-01-07 Robert Millan <rmh@aybabtu.com>
5767 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5768 listing actual TODO items.
5770 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5772 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5774 (grub_reiserfs_get_key_offset): Likewise.
5775 (grub_reiserfs_set_key_offset): Likewise.
5776 (grub_reiserfs_set_key_type): Likewise.
5777 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5779 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5780 better to remove the bitfield version completely.
5782 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5784 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5785 allocated from the heap, due to the fshelp implementation.
5786 (grub_reiserfs_dir): Free NODE, due to the same reason.
5788 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5790 Mostly from Vincent Pelletier:
5792 * fs/reiserfs.c: New file.
5794 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5795 (reiserfs_mod_SOURCES): New variable.
5796 (reiserfs_mod_CFLAGS): Likewise.
5797 (reiserfs_mod_LDFLAGS): Likewise.
5799 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5800 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5801 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5804 2008-01-06 Robert Millan <rmh@aybabtu.com>
5806 * normal/color.c: Remove `<grub/env.h>'.
5808 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5810 * include/grub/normal.h: Include <grub/env.h>.
5812 2008-01-05 Robert Millan <rmh@aybabtu.com>
5814 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5815 usage example with `(hd0,1)'.
5816 Reported by Samuel Thibault.
5818 2008-01-05 Robert Millan <rmh@aybabtu.com>
5820 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5821 (grub_linux_boot_zimage): Rename to ...
5822 (grub_linux_boot): ... this.
5823 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5824 (grub_linux_boot_zimage): Conditionalize zImage copy.
5826 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5827 (grub_linux_boot_bzimage): Remove prototype.
5828 (grub_linux_boot_zimage): Rename to ...
5829 (grub_linux_boot): ... this.
5831 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5832 (grub_linux_boot): Remove function.
5834 2008-01-05 Robert Millan <rmh@aybabtu.com>
5836 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5837 (grub_env_write_color_highlight): Likewise.
5838 (grub_wait_after_message): Likewise.
5840 * normal/color.c: New file.
5842 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5843 (normal_mod_DEPENDENCIES): Likewise.
5845 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5846 (normal_mod_DEPENDENCIES): Likewise.
5848 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5849 (normal_mod_DEPENDENCIES): Likewise.
5851 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5852 (normal_mod_DEPENDENCIES): Likewise.
5854 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5855 for waiting after a message is printed.
5856 * normal/main.c (read_config_file): Likewise.
5857 (grub_normal_init): Register grub_env_write_color_normal() and
5858 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5859 `color_highlight' variables as global.
5861 * normal/menu.c (grub_wait_after_message): New function.
5862 (grub_color_menu_normal): New variable. Replaces ...
5863 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5864 (grub_color_menu_highlight): New variable. Replaces ...
5865 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5866 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5867 `GRUB_TERM_COLOR_STANDARD'.
5868 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5869 `normal_code' and `highlight_code' to `old_color_normal' and
5870 `old_color_highlight', respectively.
5871 (grub_menu_init_page): Update colors when drawing the menu, based on
5872 `menu_color_normal' and `menu_color_highlight' variables.
5873 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5874 a message is printed.
5876 2008-01-05 Robert Millan <rmh@aybabtu.com>
5878 * kern/env.c (grub_env_context_open): Propagate hooks for global
5879 variables to new context.
5881 * kern/main.c (grub_set_root_dev): Export `root' variable.
5883 2008-01-05 Robert Millan <rmh@aybabtu.com>
5885 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5886 discs unconditionally, since udev and others have options to provide
5889 2008-01-05 Robert Millan <rmh@aybabtu.com>
5891 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5893 2008-01-04 Christian Franke <franke@computer.org>
5895 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5898 2008-01-03 Pavel Roskin <proski@gnu.org>
5900 * kern/i386/linuxbios/init.c: Put "void" to all function
5901 declarations with no arguments.
5902 * kern/powerpc/ieee1275/init.c: Likewise.
5903 * term/i386/pc/at_keyboard.c: Likewise.
5904 * term/i386/pc/vga_text.c: Likewise.
5905 * util/grub-mkdevicemap.c: Likewise.
5907 2008-01-02 Robert Millan <rmh@aybabtu.com>
5909 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5910 message when loaded image is out of bounds.
5911 (grub_multiboot_load_elf64): Likewise.
5913 2008-01-02 Pavel Roskin <proski@gnu.org>
5915 * util/grub.d/10_linux.in: Try version without ".old" when
5916 looking for initrd. It's better to use initrd from the newer
5917 kernel of the same version than no initrd at all.
5919 2008-01-01 Robert Millan <rmh@aybabtu.com>
5921 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5923 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5925 * include/grub/video.h: Added grub_video_unmap_color and
5926 grub_video_get_active_render_target.
5927 (grub_video_adapter): Added unmap_color and get_active_render_target.
5929 * video/video.c: Added grub_video_unmap_color and
5930 grub_video_get_active_render_target.
5931 (grub_video_get_info): Changed method to accept NULL pointer as an
5932 argument to allow detection of active video adapter.
5934 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5935 grub_video_vbe_unmap_color_int.
5936 Added grub_video_vbe_unmap_color and
5937 grub_video_vbe_get_active_render_target.
5938 (grub_video_vbe_adapter): Added unmap_color and
5939 get_active_render_target.
5941 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5942 with grub_video_vbe_unmap_color_int.
5944 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5945 (DEFAULT_NORMAL_COLOR): Likewise.
5946 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5947 (DEFAULT_FG_COLOR): Removed.
5948 (DEFAULT_BG_COLOR): Likewise.
5949 (DEFAULT_CURSOR_COLOR): Changed value.
5950 (grub_virtual_screen): Added standard_color_setting,
5951 normal_color_setting, highlight_color_setting and term_color.
5952 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5953 (bitmap_width): Added.
5954 (bitmap_height): Likewise.
5956 (set_term_color): Likewise.
5957 (grub_virtual_screen_setup): Changed to use new terminal coloring
5959 (grub_gfxterm_init): Added init for bitmap.
5960 (grub_gfxterm_fini): Added destroy for bitmap.
5961 (redraw_screen_rect): Updated to use background bitmap and new
5963 (scroll_up): Added optimization for case when there is no bitmap.
5964 (grub_gfxterm_cls): Fixed to use correct background color.
5965 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5967 (grub_virtual_screen_setcolor): Likewise.
5968 (grub_virtual_screen_getcolor): Added.
5969 (grub_gfxterm_background_image_cmd): Likewise.
5970 (grub_video_term): Added setcolor and getcolor.
5971 (MOD_INIT): Added registration of background_image command.
5972 (MOD_TERM): Added unregistration for background_image command.
5974 2007-12-30 Pavel Roskin <proski@gnu.org>
5976 * loader/multiboot_loader.c: Fix multiboot command
5977 unregistration. Fix all typos in the word "multiboot".
5979 2007-12-29 Pavel Roskin <proski@gnu.org>
5981 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5982 support for initrd names used in Fedora.
5984 2007-12-26 Bean <bean123ch@gmail.com>
5986 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5987 (cpio_mod_SOURCES): New variable.
5988 (cpio_mod_CFLAGS): Likewise.
5989 (cpio_mod_LDFLAGS): Likewise.
5991 * fs/cpio.c: New file.
5993 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5995 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5997 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5999 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6001 2007-12-25 Robert Millan <rmh@aybabtu.com>
6003 * include/grub/term.h (struct grub_term): Add `getcolor' function.
6004 (grub_getcolor): New function.
6006 * kern/term.c (grub_getcolor): New function.
6007 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6008 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6009 (print_entry): Set normal and highlight colors to
6010 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6011 respectively, before printing and restore them to old
6013 (grub_menu_init_page): Likewise. Fill an additional colored space
6014 that would otherwise be left blank.
6016 * term/efi/console.c (grub_console_getcolor): New function.
6017 (struct grub_console_term.getcolor): New variable.
6018 * term/i386/pc/console.c (grub_console_getcolor): New function.
6019 (struct grub_console_term.getcolor): New variable.
6020 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6021 (struct grub_console_term.getcolor): New variable.
6023 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6024 (struct grub_console_term.setcolor): Remove variable.
6025 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6026 (struct grub_console_term.setcolor): Remove variable.
6027 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6028 (struct grub_console_term.setcolor): Remove variable.
6029 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6030 (struct grub_console_term.setcolor): Remove variable.
6032 2007-12-25 Robert Millan <rmh@aybabtu.com>
6034 * configure.ac: Search for possible unifont.hex locations, and
6035 define UNIFONT_HEX if found.
6037 * Makefile.in (UNIFONT_HEX): Define variable.
6038 (DATA): Rename to ...
6039 (PKGLIB): ... this. Update all users.
6040 (PKGDATA): New variable.
6041 (pkgdata_IMAGES): Rename to ...
6042 (pkglib_IMAGES): ... this. Update all users.
6043 (pkgdata_MODULES): Rename to ...
6044 (pkglib_MODULES): ... this. Update all users.
6045 (pkgdata_PROGRAMS): Rename to ...
6046 (pkglib_PROGRAMS): ... this. Update all users.
6047 (pkgdata_DATA): Rename to ...
6048 (pkglib_DATA): ... this. Update all users.
6049 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6050 (unicode.pff, ascii.pff): New rules.
6051 (all-local): Add `$(PKGDATA)' dependency.
6052 (install-local): Process `$(PKGDATA)'.
6054 * util/update-grub_lib.in (font_path): Search for *.pff files in
6055 a few more locations, including `${pkgdata}'.
6057 2007-12-23 Robert Millan <rmh@aybabtu.com>
6059 Patch from Bean <bean123ch@gmail.com>:
6060 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6063 2007-12-21 Bean <bean123ch@gmail.com>
6065 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6066 (ntfscomp_mod_SOURCES): New variable.
6067 (ntfscomp_mod_CFLAGS): Likewise.
6068 (ntfscomp_mod_LDFLAGS): Likewise.
6070 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6071 (grub_probe_SOURCES): Likewise.
6072 (grub_emu_SOURCES): Likewise.
6074 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6075 (grub_emu_SOURCES): Likewise.
6077 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6078 (grub_emu_SOURCES): Likewise.
6080 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6081 (grub_emu_SOURCES): Likewise.
6083 * fs/ntfs.c (grub_ntfscomp_func): New variable.
6084 (read_run_list): Renamed to grub_ntfs_read_run_list.
6085 (decomp_nextvcn): Moved to ntfscomp.c.
6086 (decomp_getch): Likewise.
6087 (decomp_get16): Likewise.
6088 (decomp_block): Likewise.
6089 (read_block): Likewise.
6090 (read_data): Partially moved to ntfscomp.c.
6091 (fixup): Change unsigned to grub_uint16_t.
6092 (read_mft): Change unsigned long to grub_uint32_t.
6093 (read_attr): Likewise.
6094 (read_data): Likewise.
6095 (read_run_data): Likewise.
6096 (read_run_list): Likewise.
6097 (read_mft): Likewise.
6099 * fs/ntfscomp.c: New file.
6101 * include/grub/ntfs.h: New file.
6103 2007-12-16 Robert Millan <rmh@aybabtu.com>
6105 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6106 IDE disk check, since Linux is known to support 20 IDE disks.
6107 Reported by Colin Watson.
6109 2007-12-15 Bean <bean123ch@gmail.com>
6111 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6112 (lnxboot_img_SOURCES): New variable.
6113 (lnxboot_img_ASFLAGS): Likewise.
6114 (lnxboot_img_LDFLAGS): Likewise.
6116 * boot/i386/pc/lnxboot.S: New file.
6118 2007-11-24 Pavel Roskin <proski@gnu.org>
6120 * configure.ac: Test if '--build-id=none' is supported by the
6121 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6122 objcopy to generate incorrect binary files (binutils
6123 2.17.50.0.18-1 as shipped by Fedora 8).
6124 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6125 linking, so that build ID doesn't break the test.
6127 2007-11-24 Pavel Roskin <proski@gnu.org>
6129 * include/grub/i386/time.h: use "void" in the argument list
6131 * include/grub/powerpc/time.h: Likewise.
6132 * include/grub/sparc64/time.h: Likewise.
6134 2007-11-18 Christian Franke <franke@computer.org>
6136 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6137 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6138 This fixes the problem that function keys did not work in grub-emu.
6140 2007-11-18 Christian Franke <franke@computer.org>
6142 * disk/host.c (grub_host_open): Remove attribute unused from
6143 name parameter. Add check for "host". This fixes the problem
6144 that grub-emu does not find partitions.
6146 2007-11-18 Christian Franke <franke@computer.org>
6148 * util/hostfs.c (is_dir): New function.
6149 (grub_hostfs_dir): Handle missing dirent.d_type case.
6150 (grub_hostfs_read): Add missing fseek().
6151 (grub_hostfs_label): Clear label pointer. This fixes a crash
6152 of grub-emu on "ls (host)".
6154 2007-11-18 Christian Franke <franke@computer.org>
6156 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6157 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6158 to 64 bit boundary by default.
6160 2007-11-18 Bean <bean123ch@gmail.com>
6162 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6163 (hexdump_mod_SOURCES): New variable.
6164 (hexdump_mod_CFLAGS): Likewise.
6165 (hexdump_mod_LDFLAGS): Likewise.
6167 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6169 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6171 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6173 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6175 * include/grub/hexdump.h: New file.
6177 * commands/hexdump.c: New file.
6179 2007-11-10 Robert Millan <rmh@aybabtu.com>
6181 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6182 in grub_outb() calls.
6183 (beep_on): Likewise.
6185 2007-11-10 Christian Franke <franke@computer.org>
6187 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6188 (grub_menu_run): Likewise.
6190 2007-11-10 Robert Millan <rmh@aybabtu.com>
6192 * include/grub/i386/efi/machine.h: New file.
6193 * include/grub/i386/linuxbios/machine.h: Likewise.
6194 * include/grub/i386/pc/machine.h: Likewise.
6195 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6196 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6198 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6199 (serial_hw_io_addr): New variable.
6200 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6201 instead of `(unsigned short *) 0x400'.
6203 2007-11-10 Bean <bean123ch@gmail.com>
6205 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6207 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6209 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6210 (vga_mod_SOURCES): Added.
6211 (vga_mod_CFLAGS): Likewise.
6212 (vga_mod_LDFLAGS): Likewise.
6214 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6216 (set_map_mask): Likewise.
6217 (set_read_map): Likewise.
6218 (set_read_address): Likewise.
6219 (vga_font): Removed variable.
6220 (get_vga_glyph): Removed function.
6221 (invalidate_char): Likewise.
6222 (write_char): Changed to use grub_font_get_glyph() for font
6224 (grub_vga_putchar): Likewise.
6225 (grub_vga_getcharwidth): Likewise.
6227 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6229 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6231 (pxeboot_img_LDFLAGS): Likewise.
6232 (diskboot_img_LDFLAGS): Likewise.
6233 (kernel_img_LDFLAGS): Likewise.
6235 2007-11-06 Robert Millan <rmh@aybabtu.com>
6237 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6238 in grub_outb() calls.
6239 (serial_hw_init): Likewise.
6241 2007-11-05 Robert Millan <rmh@aybabtu.com>
6243 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6244 spaces. Skip non-regular files.
6246 2007-11-05 Robert Millan <rmh@aybabtu.com>
6248 * kern/disk.c (grub_disk_firmware_fini)
6249 (grub_disk_firmware_is_tainted): New variables.
6251 * include/grub/disk.h (grub_disk_firmware_fini)
6252 (grub_disk_firmware_is_tainted): Likewise.
6254 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6255 (grub_disk_biosdisk_fini): ... to here.
6256 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6257 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6258 is set. Register grub_disk_biosdisk_fini() in
6259 `grub_disk_firmware_fini'.
6261 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6262 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6263 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6264 to finish existing firmware disk interface.
6266 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6267 (ata_mod_SOURCES): New variable.
6268 (ata_mod_CFLAGS): Likewise.
6269 (ata_mod_LDFLAGS): Likewise.
6271 2007-11-05 Robert Millan <rmh@aybabtu.com>
6273 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6274 (grub_ata_wait): Reimplement using grub_millisleep().
6276 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6277 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6279 2007-11-03 Marco Gerards <marco@gnu.org>
6281 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6282 (CRTC_ADDR_PORT): New macro.
6283 (CRTC_DATA_PORT): Likewise.
6284 (CRTC_CURSOR): Likewise.
6285 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6286 (CRTC_CURSOR_ADDR_LOW): Likewise.
6287 (update_cursor): New function.
6288 (grub_console_real_putchar): Call `update_cursor'.
6289 (grub_console_gotoxy): Likewise.
6290 (grub_console_cls): Set the default color when clearing the
6292 (grub_console_setcursor): Implemented.
6294 2007-11-03 Marco Gerards <marco@gnu.org>
6296 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6298 (grub_ata_pio_write): Likewise.
6300 (grub_atapi_identify): Wait after issuing an ATA command.
6301 (grub_atapi_packet): Likewise.
6302 (grub_ata_identify): Likewise.
6303 (grub_ata_readwrite): Likewise.
6305 2007-11-03 Marco Gerards <marco@gnu.org>
6307 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6308 (grub_ata_pio_write): Likewise.
6309 (grub_ata_readwrite): Use `grub_error', instead of
6310 returning `grub_errno'.
6312 2007-11-03 Marco Gerards <marco@gnu.org>
6314 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6315 grub_ata_pio_write once for every single sector, instead of for
6318 2007-10-31 Robert Millan <rmh@aybabtu.com>
6320 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6322 * conf/i386-linuxbios.rmk: New file.
6324 * kern/i386/pc/hardware.c: Likewise.
6325 * term/i386/pc/at_keyboard.c: Likewise.
6326 * term/i386/pc/vga_text.c: Likewise.
6328 * include/grub/i386/linuxbios/boot.h: Likewise.
6329 * include/grub/i386/linuxbios/console.h: Likewise.
6330 * include/grub/i386/linuxbios/init.h: Likewise.
6331 * include/grub/i386/linuxbios/kernel.h: Likewise.
6332 * include/grub/i386/linuxbios/loader.h: Likewise.
6333 * include/grub/i386/linuxbios/memory.h: Likewise.
6334 * include/grub/i386/linuxbios/serial.h: Likewise.
6335 * include/grub/i386/linuxbios/time.h: Likewise.
6337 * kern/i386/linuxbios/init.c: Likewise.
6338 * kern/i386/linuxbios/startup.S: Likewise.
6339 * kern/i386/linuxbios/table.c: Likewise.
6341 2007-10-31 Marco Gerards <marco@gnu.org>
6343 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6344 (ata_mod_SOURCES): New variable.
6345 (ata_mod_CFLAGS): Likewise.
6346 (ata_mod_LDFLAGS): Likewise.
6348 * disk/ata.c: New file.
6350 * include/grub/disk.h (grub_disk_dev_id): Add
6351 `GRUB_DISK_DEV_ATA_ID'.
6353 2007-10-31 Robert Millan <rmh@aybabtu.com>
6355 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6356 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6358 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6359 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6361 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6364 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6366 2007-10-27 Robert Millan <rmh@aybabtu.com>
6368 * include/grub/types.h (ULONG_MAX): Define macro.
6370 2007-10-22 Robert Millan <rmh@aybabtu.com>
6372 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6374 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6376 2007-10-22 Robert Millan <rmh@aybabtu.com>
6378 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6379 (pkgdata_MODULES): Add `biosdisk.mod'.
6380 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6383 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6384 (grub_biosdisk_init): Replace with ...
6385 (GRUB_MOD_INIT(biosdisk)): ... this.
6386 (grub_biosdisk_fini): Replace with ...
6387 (GRUB_MOD_FINI(biosdisk)): ... this.
6389 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6390 (grub_machine_init): Remove call to grub_biosdisk_init().
6391 (grub_machine_fini): Remove call to grub_machine_fini().
6393 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6395 2007-10-22 Robert Millan <rmh@aybabtu.com>
6397 * include/grub/time.h: New file.
6398 * include/grub/i386/time.h: Likewise.
6399 * include/grub/powerpc/time.h: Likewise.
6400 * include/grub/sparc64/time.h: Likewise.
6402 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6404 (KERNEL_MACHINE_TIME_HEADER): ... this.
6405 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6407 (KERNEL_MACHINE_TIME_HEADER): ... this.
6408 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6410 (KERNEL_MACHINE_TIME_HEADER): ... this.
6412 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6413 (grub_millisleep): New function.
6414 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6415 (grub_millisleep): New function.
6416 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6417 Remove `grub/machine/time.h' include.
6418 (grub_millisleep): New function.
6419 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6420 Remove `grub/machine/time.h' include.
6421 (grub_millisleep): New function.
6423 * include/grub/misc.h (grub_div_roundup): New function.
6425 * kern/misc.c: Include `<grub/time.h>'.
6426 (grub_millisleep_generic): New function.
6428 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6430 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6432 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6433 `machine/time.h'. Add `time.h'.
6434 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6436 2007-10-21 Robert Millan <rmh@aybabtu.com>
6438 * include/grub/misc.h (grub_max): New function.
6440 2007-10-21 Robert Millan <rmh@aybabtu.com>
6442 * util/misc.c (grub_util_info): Call fflush() before returning.
6444 2007-10-20 Robert Millan <rmh@aybabtu.com>
6446 * genmk.rb (Image): Copy `extra_flags' from here ...
6447 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6449 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6450 to `argc' and `args' arguments.
6452 2007-10-17 Robert Millan <rmh@aybabtu.com>
6454 * kern/i386/loader.S: New file.
6456 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6457 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6458 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6459 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6460 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6461 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6462 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6463 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6464 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6465 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6466 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6467 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6468 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6469 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6471 * kern/i386/realmode.S: New file.
6473 * kern/i386/pc/startup.S (protstack): Moved from here ...
6474 * kern/i386/realmode.S (protstack)... to here.
6475 * kern/i386/pc/startup.S (gdt): Moved from here ...
6476 * kern/i386/realmode.S (gdt)... to here.
6477 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6478 * kern/i386/realmode.S (prot_to_real)... to here.
6480 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6481 `kern/i386/realmode.S'.
6483 2007-10-17 Robert Millan <rmh@aybabtu.com>
6485 * include/grub/i386/loader.h: New file.
6487 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6488 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6489 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6490 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6491 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6492 * include/grub/i386/loader.h (grub_linux_prot_size)
6493 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6494 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6495 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6496 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6498 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6500 2007-10-15 Robert Millan <rmh@aybabtu.com>
6502 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6503 filesystem when dev->disk is unset.
6504 Do probe for filesystem even when dev->disk->has_partitions is set.
6505 In case a filesystem is found, always report it.
6506 In case it isn't, if dev->disk->has_partitions is set, report that
6507 a partition table was found instead of reporting that no filesystem
6508 could be identified.
6510 2007-10-12 Robert Millan <rmh@aybabtu.com>
6512 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6513 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6515 * include/grub/types.h (grub_host_to_target16): New macro.
6516 (grub_host_to_target32): Likewise.
6517 (grub_host_to_target64): Likewise.
6518 (grub_target_to_host16): Likewise.
6519 (grub_target_to_host32): Likewise.
6520 (grub_target_to_host64): Likewise.
6522 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6524 (GRUB_MOD_ALIGN): ...this. Update all users.
6526 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6527 grub_host_to_target32.
6528 Replace grub_be_to_cpu32 with grub_target_to_host32.
6529 (load_modules): Likewise.
6530 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6531 Replace grub_be_to_cpu32 with grub_target_to_host32.
6532 Replace grub_cpu_to_be16 with grub_host_to_target16.
6533 Replace grub_cpu_to_be32 grub_host_to_target32.
6535 2007-10-12 Robert Millan <rmh@aybabtu.com>
6537 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6538 * util/elf/grub-mkimage.c: ... here.
6540 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6541 `util/powerpc/ieee1275/grub-mkimage.c'.
6543 2007-10-07 Robert Millan <rmh@aybabtu.com>
6545 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6546 and make it easier to figure out.
6547 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6548 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6549 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6550 leave us with less than HEAP_MIN_SIZE total heap.
6551 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
6553 2007-10-03 Robert Millan <rmh@aybabtu.com>
6555 * include/grub/i386/io.h: New file.
6556 * commands/i386/pc/play.c (inb): Removed.
6558 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6560 * term/i386/pc/serial.c (inb): Removed.
6562 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6564 * term/i386/pc/vga.c (inb): Removed.
6566 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6569 2007-10-02 Robert Millan <rmh@aybabtu.com>
6571 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6572 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6573 Reported by Marcin Kurek.
6575 2007-09-07 Robert Millan <rmh@aybabtu.com>
6577 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6578 SmartFirmware version updates (as released by Sven Luther), and avoid
6579 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6580 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6583 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6586 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6587 when merging two regions.
6589 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6591 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6592 * normal/completion.c (grub_normal_do_completion): Likewise.
6593 Reported by Hitoshi Ozeki.
6595 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6597 Do not use devices at boot in chainloading.
6599 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6600 (boot_part_addr): Likewise.
6601 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6602 with BOOT_DRIVE and BOOT_PART_ADDR.
6603 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6604 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6606 2007-08-29 Robert Millan <rmh@aybabtu.com>
6608 Patch from Simon Peter <dn.tlp@gmx.net>:
6609 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6610 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6611 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6612 util/i386/pc/grub-setup.c_DEPENDENCIES.
6613 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6614 util/grub-probe.c_DEPENDENCIES.
6615 * conf/powerpc-ieee1275.rmk: Likewise.
6617 2007-08-28 Robert Millan <rmh@aybabtu.com>
6619 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6620 to tell grub-mkdevicemap how to name devices.
6621 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6624 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6625 util/i386/get_disk_name.c.
6626 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6627 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6628 util/ieee1275/get_disk_name.c.
6630 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6632 * DISTLIST: Add util/i386/get_disk_name.c and
6633 util/ieee1275/get_disk_name.c.
6635 * util/grub-mkdevicemap.c: Replace device naming logic with
6636 grub_util_get_disk_name() calls.
6638 2007-08-20 Robert Millan <rmh@aybabtu.com>
6640 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6641 (so that it works for both plural and singular quantities).
6643 2007-08-05 Robert Millan <rmh@aybabtu.com>
6645 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6646 so that [xz] isn't taken into account when determining order.
6648 2007-08-02 Marco Gerards <marco@gnu.org>
6650 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6651 `include/multiboot2.h', `include/grub/elfload.h',
6652 `include/multiboot.h', `include/grub/multiboot.h',
6653 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6654 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6655 `kern/elf.c', `loader/multiboot_loader.c',
6656 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6657 `loader/i386/pc/multiboot2.c',
6658 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6659 `util/i386/pc/grub-mkrescue.in'. Remove
6660 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
6661 `include/grub/i386/pc/util/biosdisk.h' and
6662 `include/grub/powerpc/ieee1275/multiboot.h'.
6664 2007-08-02 Bean <bean123ch@gmail.com>
6666 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6667 (ntfs_mod_SOURCES): New variable.
6668 (ntfs_mod_CFLAGS): Likewise.
6669 (ntfs_mod_LDFLAGS): Likewise.
6671 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6672 (grub_probe_SOURCES): Likewise.
6673 (grub_emu_SOURCES): Likewise.
6675 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6676 (grub_emu_SOURCES): Likewise.
6678 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6679 (grub_emu_SOURCES): Likewise.
6681 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6683 * fs/ntfs.c: New file.
6685 2007-08-02 Bean <bean123ch@gmail.com>
6687 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6689 * file.h (grub_file): Likewise.
6691 * fshelp.h (grub_fshelp_read_file): Likewise.
6693 * util/i386/pc/grub-setup.c (setup): Likewise.
6694 (save_first_sector): Likewise.
6695 (save_blocklists): Likewise.
6697 * fs/affs.c (grub_affs_read_file): Likewise.
6699 * fs/ext2.c (grub_ext2_read_file): Likewise.
6701 * fs/fat.c (grub_fat_read_data): Likewise.
6703 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6705 * fs/hfs.c (grub_hfs_read_file): Likewise.
6707 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6709 * fs/jfs.c (grub_jfs_read_file): Likewise.
6711 * fs/minix.c (grub_minix_read_file): Likewise.
6713 * fs/sfs.c (grub_sfs_read_file): Likewise.
6715 * fs/ufs.c (grub_ufs_read_file): Likewise.
6717 * fs/xfs.c (grub_xfs_read_file): Likewise.
6719 * command/blocklist.c (read_blocklist): Likewise.
6720 (print_blocklist): Likewise.
6722 2007-08-02 Marco Gerards <marco@gnu.org>
6724 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6727 * disk/host.c: New file.
6729 * util/hostfs.c: Likewise.
6731 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6732 return `GRUB_ERR_BAD_FS'.
6733 * fs/sfs.c (grub_sfs_mount): Likewise.
6734 * fs/xfs.c (grub_xfs_mount): Likewise.
6736 * include/grub/disk.h (enum grub_disk_dev_id): Add
6737 `GRUB_DISK_DEVICE_HOST_ID'.
6739 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6741 2007-07-24 Jerone Young <jerone@gmail.com>
6743 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6744 modules for compilation.
6745 * conf/powerpc-ieee1275.rmk: Likewise.
6747 * include/multiboot.h: Move multiboot definitions to one file. Rename
6748 many definitions to not get grub specific.
6749 * include/multiboot2.h: Create header with multiboot 2 definitions.
6750 * include/grub/multiboot.h: Header for grub specific function
6751 prototypes and definitions.
6752 * include/grub/multiboot2.h: Likewise.
6753 * include/grub/multiboot_loader.h: Likewise.
6754 * include/grub/i386/pc/multiboot.h: Removed.
6755 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6757 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6758 and 2 to allow for one multiboot and module commands.
6759 * loader/multiboot2.c: Add multiboot2 functionality.
6760 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6761 and definition names.
6762 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6764 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6765 ieee1275 specific multiboot2 code.
6767 * kern/i386/pc/startup.S: Change headers and definition names for
6768 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6770 2007-07-22 Robert Millan <rmh@aybabtu.com>
6772 * geninitheader.sh: Process file specified in first parameter rather
6773 than hardcoding grub_modules_init.lst.
6774 * geninit.sh: Likewise. Also, construct header name dynamically rather
6775 than hardcoding grub_modules_init.h.
6777 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6778 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6779 grub_probe_init.[ch] and grub_setup_init.[ch].
6781 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6782 grub_modules_init.h with grub_emu_init.h.
6783 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6784 grub_probe_init.[ch] files.
6785 * conf/i386-efi.rmk: Likewise.
6786 * conf/i386-pc.rmk: Likewise.
6787 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6788 grub_setup_init.[ch] files.
6790 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6791 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6792 to initialize modules rather than a list of hardcoded functions.
6793 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6794 grub_init_all() to initialize modules rather than a list of hardcoded
6797 2007-07-22 Robert Millan <rmh@aybabtu.com>
6799 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6800 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6802 2007-07-22 Robert Millan <rmh@aybabtu.com>
6804 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6805 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6806 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6807 flag when running on SmartFirmware.
6808 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6809 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6812 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6813 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6814 rather than decreasing it.
6816 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6817 there's not enough space to do it, fail in the same way as when it
6818 can't be done because there are no partitions.
6820 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6821 when nvsetenv failed.
6823 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6825 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6826 because this rule is automatically generated.
6827 (grub-mkrescue): Removed for the same reason as above.
6829 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6831 Migrate to GNU General Public License Version 3.
6833 * COPYING: Replaced with the plain text version of GPLv3.
6835 * config.guess: Updated from gnulib.
6836 * config.sub: Likewise.
6838 * geninit.sh: Output a GPLv3 copyright notice.
6839 * geninitheader.sh: Likewise.
6840 * genmodsrc.sh: Likewise.
6841 * gensymlist.sh.in: Likewise.
6843 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6844 * boot/i386/pc/diskboot.S: Likewise.
6845 * boot/i386/pc/pxeboot.S: Likewise.
6846 * commands/blocklist.c: Likewise.
6847 * commands/boot.c: Likewise.
6848 * commands/cat.c: Likewise.
6849 * commands/cmp.c: Likewise.
6850 * commands/configfile.c: Likewise.
6851 * commands/echo.c: Likewise.
6852 * commands/help.c: Likewise.
6853 * commands/ls.c: Likewise.
6854 * commands/search.c: Likewise.
6855 * commands/terminal.c: Likewise.
6856 * commands/test.c: Likewise.
6857 * commands/videotest.c: Likewise.
6858 * commands/i386/cpuid.c: Likewise.
6859 * commands/i386/pc/halt.c: Likewise.
6860 * commands/i386/pc/play.c: Likewise.
6861 * commands/i386/pc/reboot.c: Likewise.
6862 * commands/i386/pc/vbeinfo.c: Likewise.
6863 * commands/i386/pc/vbetest.c: Likewise.
6864 * commands/ieee1275/halt.c: Likewise.
6865 * commands/ieee1275/reboot.c: Likewise.
6866 * commands/ieee1275/suspend.c: Likewise.
6867 * disk/loopback.c: Likewise.
6868 * disk/lvm.c: Likewise.
6869 * disk/raid.c: Likewise.
6870 * disk/efi/efidisk.c: Likewise.
6871 * disk/i386/pc/biosdisk.c: Likewise.
6872 * disk/ieee1275/ofdisk.c: Likewise.
6873 * font/manager.c: Likewise.
6874 * fs/affs.c: Likewise.
6875 * fs/ext2.c: Likewise.
6876 * fs/fat.c: Likewise.
6877 * fs/fshelp.c: Likewise.
6878 * fs/hfs.c: Likewise.
6879 * fs/hfsplus.c: Likewise.
6880 * fs/iso9660.c: Likewise.
6881 * fs/jfs.c: Likewise.
6882 * fs/minix.c: Likewise.
6883 * fs/sfs.c: Likewise.
6884 * fs/ufs.c: Likewise.
6885 * fs/xfs.c: Likewise.
6886 * hello/hello.c: Likewise.
6887 * include/grub/acorn_filecore.h: Likewise.
6888 * include/grub/arg.h: Likewise.
6889 * include/grub/bitmap.h: Likewise.
6890 * include/grub/boot.h: Likewise.
6891 * include/grub/cache.h: Likewise.
6892 * include/grub/device.h: Likewise.
6893 * include/grub/disk.h: Likewise.
6894 * include/grub/dl.h: Likewise.
6895 * include/grub/elfload.h: Likewise.
6896 * include/grub/env.h: Likewise.
6897 * include/grub/err.h: Likewise.
6898 * include/grub/file.h: Likewise.
6899 * include/grub/font.h: Likewise.
6900 * include/grub/fs.h: Likewise.
6901 * include/grub/fshelp.h: Likewise.
6902 * include/grub/gzio.h: Likewise.
6903 * include/grub/hfs.h: Likewise.
6904 * include/grub/kernel.h: Likewise.
6905 * include/grub/loader.h: Likewise.
6906 * include/grub/lvm.h: Likewise.
6907 * include/grub/misc.h: Likewise.
6908 * include/grub/mm.h: Likewise.
6909 * include/grub/net.h: Likewise.
6910 * include/grub/normal.h: Likewise.
6911 * include/grub/parser.h: Likewise.
6912 * include/grub/partition.h: Likewise.
6913 * include/grub/pc_partition.h: Likewise.
6914 * include/grub/raid.h: Likewise.
6915 * include/grub/rescue.h: Likewise.
6916 * include/grub/script.h: Likewise.
6917 * include/grub/setjmp.h: Likewise.
6918 * include/grub/symbol.h: Likewise.
6919 * include/grub/term.h: Likewise.
6920 * include/grub/terminfo.h: Likewise.
6921 * include/grub/tparm.h: Likewise.
6922 * include/grub/types.h: Likewise.
6923 * include/grub/video.h: Likewise.
6924 * include/grub/efi/api.h: Likewise.
6925 * include/grub/efi/chainloader.h: Likewise.
6926 * include/grub/efi/console.h: Likewise.
6927 * include/grub/efi/console_control.h: Likewise.
6928 * include/grub/efi/disk.h: Likewise.
6929 * include/grub/efi/efi.h: Likewise.
6930 * include/grub/efi/pe32.h: Likewise.
6931 * include/grub/efi/time.h: Likewise.
6932 * include/grub/i386/linux.h: Likewise.
6933 * include/grub/i386/setjmp.h: Likewise.
6934 * include/grub/i386/types.h: Likewise.
6935 * include/grub/i386/efi/kernel.h: Likewise.
6936 * include/grub/i386/efi/loader.h: Likewise.
6937 * include/grub/i386/efi/time.h: Likewise.
6938 * include/grub/i386/pc/biosdisk.h: Likewise.
6939 * include/grub/i386/pc/boot.h: Likewise.
6940 * include/grub/i386/pc/chainloader.h: Likewise.
6941 * include/grub/i386/pc/console.h: Likewise.
6942 * include/grub/i386/pc/init.h: Likewise.
6943 * include/grub/i386/pc/kernel.h: Likewise.
6944 * include/grub/i386/pc/loader.h: Likewise.
6945 * include/grub/i386/pc/memory.h: Likewise.
6946 * include/grub/i386/pc/multiboot.h: Likewise.
6947 * include/grub/i386/pc/serial.h: Likewise.
6948 * include/grub/i386/pc/time.h: Likewise.
6949 * include/grub/i386/pc/vbe.h: Likewise.
6950 * include/grub/i386/pc/vbeblit.h: Likewise.
6951 * include/grub/i386/pc/vbefill.h: Likewise.
6952 * include/grub/i386/pc/vbeutil.h: Likewise.
6953 * include/grub/i386/pc/vga.h: Likewise.
6954 * include/grub/ieee1275/ieee1275.h: Likewise.
6955 * include/grub/ieee1275/ofdisk.h: Likewise.
6956 * include/grub/powerpc/libgcc.h: Likewise.
6957 * include/grub/powerpc/setjmp.h: Likewise.
6958 * include/grub/powerpc/types.h: Likewise.
6959 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6960 * include/grub/powerpc/ieee1275/console.h: Likewise.
6961 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6962 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6963 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6964 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6965 * include/grub/powerpc/ieee1275/time.h: Likewise.
6966 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6967 * include/grub/sparc64/libgcc.h: Likewise.
6968 * include/grub/sparc64/setjmp.h: Likewise.
6969 * include/grub/sparc64/types.h: Likewise.
6970 * include/grub/sparc64/ieee1275/console.h: Likewise.
6971 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6972 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6973 * include/grub/sparc64/ieee1275/time.h: Likewise.
6974 * include/grub/util/biosdisk.h: Likewise.
6975 * include/grub/util/getroot.h: Likewise.
6976 * include/grub/util/lvm.h: Likewise.
6977 * include/grub/util/misc.h: Likewise.
6978 * include/grub/util/raid.h: Likewise.
6979 * include/grub/util/resolve.h: Likewise.
6980 * io/gzio.c: Likewise.
6981 * kern/device.c: Likewise.
6982 * kern/disk.c: Likewise.
6983 * kern/dl.c: Likewise.
6984 * kern/elf.c: Likewise.
6985 * kern/env.c: Likewise.
6986 * kern/err.c: Likewise.
6987 * kern/file.c: Likewise.
6988 * kern/fs.c: Likewise.
6989 * kern/loader.c: Likewise.
6990 * kern/main.c: Likewise.
6991 * kern/misc.c: Likewise.
6992 * kern/mm.c: Likewise.
6993 * kern/parser.c: Likewise.
6994 * kern/partition.c: Likewise.
6995 * kern/rescue.c: Likewise.
6996 * kern/term.c: Likewise.
6997 * kern/efi/efi.c: Likewise.
6998 * kern/efi/init.c: Likewise.
6999 * kern/efi/mm.c: Likewise.
7000 * kern/i386/dl.c: Likewise.
7001 * kern/i386/efi/init.c: Likewise.
7002 * kern/i386/efi/startup.S: Likewise.
7003 * kern/i386/pc/init.c: Likewise.
7004 * kern/i386/pc/lzo1x.S: Likewise.
7005 * kern/i386/pc/startup.S: Likewise.
7006 * kern/ieee1275/ieee1275.c: Likewise.
7007 * kern/powerpc/cache.S: Likewise.
7008 * kern/powerpc/dl.c: Likewise.
7009 * kern/powerpc/ieee1275/cmain.c: Likewise.
7010 * kern/powerpc/ieee1275/crt0.S: Likewise.
7011 * kern/powerpc/ieee1275/init.c: Likewise.
7012 * kern/powerpc/ieee1275/openfw.c: Likewise.
7013 * kern/sparc64/cache.S: Likewise.
7014 * kern/sparc64/dl.c: Likewise.
7015 * kern/sparc64/ieee1275/init.c: Likewise.
7016 * kern/sparc64/ieee1275/openfw.c: Likewise.
7017 * loader/efi/chainloader.c: Likewise.
7018 * loader/efi/chainloader_normal.c: Likewise.
7019 * loader/i386/efi/linux.c: Likewise.
7020 * loader/i386/efi/linux_normal.c: Likewise.
7021 * loader/i386/pc/chainloader.c: Likewise.
7022 * loader/i386/pc/chainloader_normal.c: Likewise.
7023 * loader/i386/pc/linux.c: Likewise.
7024 * loader/i386/pc/linux_normal.c: Likewise.
7025 * loader/i386/pc/multiboot.c: Likewise.
7026 * loader/i386/pc/multiboot_normal.c: Likewise.
7027 * loader/powerpc/ieee1275/linux.c: Likewise.
7028 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7029 * normal/arg.c: Likewise.
7030 * normal/cmdline.c: Likewise.
7031 * normal/command.c: Likewise.
7032 * normal/completion.c: Likewise.
7033 * normal/execute.c: Likewise.
7034 * normal/function.c: Likewise.
7035 * normal/lexer.c: Likewise.
7036 * normal/main.c: Likewise.
7037 * normal/menu.c: Likewise.
7038 * normal/menu_entry.c: Likewise.
7039 * normal/misc.c: Likewise.
7040 * normal/parser.y: Likewise.
7041 * normal/script.c: Likewise.
7042 * normal/i386/setjmp.S: Likewise.
7043 * normal/powerpc/setjmp.S: Likewise.
7044 * normal/sparc64/setjmp.S: Likewise.
7045 * partmap/acorn.c: Likewise.
7046 * partmap/amiga.c: Likewise.
7047 * partmap/apple.c: Likewise.
7048 * partmap/gpt.c: Likewise.
7049 * partmap/pc.c: Likewise.
7050 * partmap/sun.c: Likewise.
7051 * term/gfxterm.c: Likewise.
7052 * term/terminfo.c: Likewise.
7053 * term/efi/console.c: Likewise.
7054 * term/i386/pc/console.c: Likewise.
7055 * term/i386/pc/serial.c: Likewise.
7056 * term/i386/pc/vesafb.c: Likewise.
7057 * term/i386/pc/vga.c: Likewise.
7058 * term/ieee1275/ofconsole.c: Likewise.
7059 * util/biosdisk.c: Likewise.
7060 * util/console.c: Likewise.
7061 * util/genmoddep.c: Likewise.
7062 * util/getroot.c: Likewise.
7063 * util/grub-emu.c: Likewise.
7064 * util/grub-mkdevicemap.c: Likewise.
7065 * util/grub-probe.c: Likewise.
7066 * util/lvm.c: Likewise.
7067 * util/misc.c: Likewise.
7068 * util/raid.c: Likewise.
7069 * util/resolve.c: Likewise.
7070 * util/update-grub.in: Likewise.
7071 * util/update-grub_lib.in: Likewise.
7072 * util/grub.d/00_header.in: Likewise.
7073 * util/grub.d/10_hurd.in: Likewise.
7074 * util/grub.d/10_linux.in: Likewise.
7075 * util/i386/efi/grub-install.in: Likewise.
7076 * util/i386/efi/grub-mkimage.c: Likewise.
7077 * util/i386/pc/grub-install.in: Likewise.
7078 * util/i386/pc/grub-mkimage.c: Likewise.
7079 * util/i386/pc/grub-mkrescue.in: Likewise.
7080 * util/i386/pc/grub-setup.c: Likewise.
7081 * util/i386/pc/misc.c: Likewise.
7082 * util/powerpc/ieee1275/grub-install.in: Likewise.
7083 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7084 * util/powerpc/ieee1275/misc.c: Likewise.
7085 * video/bitmap.c: Likewise.
7086 * video/video.c: Likewise.
7087 * video/i386/pc/vbe.c: Likewise.
7088 * video/i386/pc/vbeblit.c: Likewise.
7089 * video/i386/pc/vbefill.c: Likewise.
7090 * video/i386/pc/vbeutil.c: Likewise.
7091 * video/readers/tga.c: Likewise.
7093 2007-07-02 Robert Millan <rmh@aybabtu.com>
7095 * conf/i386-efi.rmk: Replace obsolete reference to
7096 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7097 with util/getroot.c.
7098 * conf/powerpc-ieee1275.rmk: Likewise.
7099 * conf/sparc64-ieee1275.rmk: Likewise.
7101 * util/grub-emu.c (main): Fix unchecked pointer handling.
7103 2007-07-02 Robert Millan <rmh@aybabtu.com>
7105 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7106 invocation to fail, in order to support partition-less media.
7108 * util/i386/pc/grub-install.in: Likewise.
7110 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7111 which fs or partmap modules are needed (akin to its sister scripts).
7113 Also use grub-probe to get rid of unportable /proc/mounts check.
7115 Print the same informational message that the other scripts do, before
7118 2007-06-23 Robert Millan <rmh@aybabtu.com>
7120 * util/update-grub_lib.in (font_path): New function. Determine whether
7121 a font file can be found and, if so, echo the GRUB path to it.
7123 * util/update-grub.in: Handle multiple terminals depending on user
7124 input, platform availability and font file presence. Propagate
7125 variables of our findings to /etc/grub.d/ children.
7127 * util/grub.d/00_header.in: Handle multiple terminals, based on
7128 environment setup by update-grub.
7130 2007-06-23 Robert Millan <rmh@aybabtu.com>
7132 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
7134 2007-06-21 Robert Millan <rmh@aybabtu.com>
7136 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7137 indicate end of data section in kernel image.
7138 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7139 GRUB_KERNEL_MACHINE_DATA_END.
7141 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7143 * kern/i386/efi/startup.S: Likewise.
7145 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7146 during image generation. Implement --prefix option to override this
7148 * util/i386/efi/grub-mkimage.c: Likewise.
7150 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7151 code to make path relative to its root into a separate function.
7153 * util/i386/pc/grub-install.in: Use newly provided
7154 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7155 pass the result to grub-install --prefix.
7157 2007-06-13 Robert Millan <rmh@aybabtu.com>
7159 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7161 * util/grub-emu.c: Use above definitions from misc.h instead of
7163 * util/grub-mkdevicemap.c: Likewise.
7164 * util/i386/pc/grub-setup.c: Likewise.
7165 * util/grub-probe.c: Likewise.
7166 (probe): Abort with grub_util_error() when either
7167 grub_guess_root_device or grub_util_get_grub_dev fails.
7169 2007-06-12 Robert Millan <rmh@aybabtu.com>
7171 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7173 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7175 * util/grub-probe.c (probe): Likewise for "drive_name".
7177 2007-06-11 Robert Millan <rmh@aybabtu.com>
7179 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7180 not just the cdrom one.
7182 2007-06-11 Robert Millan <rmh@aybabtu.com>
7184 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7185 Add --pkglibdir=DIR option to override pkglibdir.
7186 Mention --image-type=TYPE in help output.
7187 Fix --grub-mkimage (it was a no-op).
7188 Abort gracefully when no parameter is given.
7190 2007-06-11 Robert Millan <rmh@aybabtu.com>
7192 * util/i386/pc/grub-mkrescue.in: New file.
7193 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7194 * Makefile.in: Handle bin_SCRIPTS.
7196 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7198 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7199 list of video modes.
7201 2007-06-06 Robert Millan <rmh@aybabtu.com>
7203 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7204 file doesn't exist, or if it is in a filesystem grub can't read.
7206 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7207 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7208 header comment to fit in 80 columns when the variables are resolved.
7210 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7211 could be identified by update-grub. Remove redundant check for
7212 unifont.pff existence (since convert_system_path_to_grub_path now
7215 2007-06-04 Robert Millan <rmh@aybabtu.com>
7217 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7219 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7221 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7223 2007-06-04 Robert Millan <rmh@aybabtu.com>
7225 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7227 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7228 grub_apple_partition_map_fini.
7231 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7232 to access >2 TiB disks).
7234 Print disk->total_sectors with %llu instead of %lu, since this
7235 variable is always 64-bit (prevents wrong disk size from being displayed
7236 on either >2 TiB disk or big-endian CPU).
7238 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7239 into a generic case that supports all (sane) partition maps.
7241 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7244 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7245 and grub_apple_partition_map_fini() after that.
7247 2007-06-01 Robert Millan <rmh@aybabtu.com>
7249 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7251 * util/grub.d/00_header.in: Only enable gfxterm when
7252 convert_system_path_to_grub_path() succeeds.
7254 2007-05-20 Robert Millan <rmh@aybabtu.com>
7256 * util/update-grub_lib.in: New file.
7257 * DISTLIST: Add update-grub_lib.in.
7258 * conf/common.rmk: Generate update-grub_lib and install it in
7260 * Makefile.in: Add install routine for $(lib_DATA).
7262 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7263 function provided by update-grub_lib to support arbitrary paths of
7265 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7266 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7268 2007-05-19 Robert Millan <rmh@aybabtu.com>
7270 * commands/i386/cpuid.c: New module.
7272 * conf/i386-efi.rmk: Enable cpuid.mod.
7273 * conf/i386-pc.rmk: Likewise.
7275 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7277 * kern/disk.c (grub_disk_read): Check return value of
7280 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7282 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7284 * disk/raid.c (grub_raid_open): Likewise.
7286 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7288 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7289 stack instead of on the heap.
7291 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7292 before doing a read on it.
7294 * configure.ac: Only use -fno-stack-protector for the target
7297 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7299 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7300 __attribute_ ((unused)) to mode_type argument.
7302 * util/getroot.c (grub_guess_root_device): Fix #endif.
7304 * kern/misc.c (memcmp): Fix prototype.
7306 * include/grub/partition.h [GRUB_UTIL]
7307 (grub_gpt_partition_map_init): Add prototype.
7308 (grub_gpt_partition_map_fini): Likewise.
7310 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7313 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7314 (grub_fat_read_data): Likewise.
7315 (grub_fat_find_dir): Likewise.
7317 * font/manager.c (find_glyph): Make table a const.
7318 (grub_font_get_glyph): Remove bitmap from if statement.
7320 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7322 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7323 code, first search for device in /dev/mapper, then in /dev.
7324 (grub_util_get_grub_dev): New function.
7325 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7327 * util/grub-probe.c (probe): Remove check for RAID, call
7328 grub_util_get_grub_dev() instead of
7329 grub_util_biosdisk_get_grub_dev().
7330 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7331 grub_util_biosdisk_get_grub_dev().
7332 * util/i386/pc/grub-setup.c (main): Likewise.
7334 2007-05-16 Robert Millan <rmh@aybabtu.com>
7336 * DISTLIST: Update for the latest changes.
7337 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7338 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7339 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7340 grub/util/biosdisk.h.
7341 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7342 grub/util/biosdisk.h.
7344 2007-05-16 Robert Millan <rmh@aybabtu.com>
7346 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7348 2007-05-16 Robert Millan <rmh@aybabtu.com>
7350 * util/i386/efi/grub-install.in: New.
7351 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7352 newly added grub-install.
7353 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7355 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7356 grub/util/biosdisk.h.
7357 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7358 grub/util/biosdisk.h.
7360 2007-05-16 Robert Millan <rmh@aybabtu.com>
7362 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7363 * include/grub/util/biosdisk.h: ... here.
7364 * util/i386/pc/biosdisk.c: Moved to ...
7365 * util/biosdisk.c: ... here.
7366 * util/i386/pc/getroot.c: Moved to ...
7367 * util/getroot.c: ... here.
7368 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7369 * util/grub-mkdevicemap.c: ... here.
7370 * util/i386/pc/grub-probe.c: Moved to ...
7371 * util/grub-probe.c: ... here.
7373 2007-05-15 Robert Millan <rmh@aybabtu.com>
7375 * util/update-grub.in: Remove duplicated line in grub.cfg header
7378 2007-05-13 Robert Millan <rmh@aybabtu.com>
7380 * util/update-grub.in: Fix a few assumptions about the devices holding
7381 /, /boot and /boot/grub being the same.
7382 * util/grub.d/00_header.in: Likewise.
7383 * util/grub.d/10_hurd.in: Likewise.
7384 * util/grub.d/10_linux.in: Likewise.
7386 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7387 patterns. Use that to define the `.old' suffix as older than `'.
7389 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7391 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7392 the grub.cfg header message.
7394 2007-05-11 Robert Millan <rmh@aybabtu.com>
7396 * util/update-grub.in: Create device.map if it doesn't already exist,
7397 before attempting to run grub-probe.
7398 Check for grub-probe and grub-mkdevicemap with the same code
7399 grub-install is using.
7402 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7404 * Makefile.in: Add the datarootdir autoconf variable.
7406 2007-05-09 Robert Millan <rmh@aybabtu.com>
7408 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
7409 fail gracefully if dev->disk->partition == NULL.
7411 2007-05-07 Robert Millan <rmh@aybabtu.com>
7413 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7414 determine partition map module.
7415 * util/i386/pc/grub-install.in: Use this feature to decide which
7416 partition module to load, instead of hardcoding pc and gpt.
7418 2007-05-07 Robert Millan <rmh@aybabtu.com>
7420 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7421 source directory differs from build directory.
7423 2007-05-05 Robert Millan <rmh@aybabtu.com>
7425 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7428 2007-05-05 Robert Millan <rmh@aybabtu.com>
7430 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7432 2007-05-05 Robert Millan <rmh@aybabtu.com>
7434 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7435 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7437 2007-05-05 Robert Millan <rmh@aybabtu.com>
7439 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7440 (grub_probe_SOURCES): Likewise.
7441 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7442 GPT and initialize dos_part and bsd_part accordingly.
7443 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7445 (main): Activate gpt module for use during partition identification,
7446 and deactivate it afterwards.
7447 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7448 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7449 partition identification, and deactivate it afterwards.
7451 2007-05-05 Robert Millan <rmh@aybabtu.com>
7453 * term/i386/pc/console.c (grub_console_fini): Call
7454 grub_term_set_current() before grub_term_unregister().
7456 2007-05-04 Robert Millan <rmh@aybabtu.com>
7458 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7459 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7460 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7461 and update-grub_DATA.
7462 * conf/common.rmk: Build and install update-grub components.
7463 * conf/common.mk: Regenerate.
7464 * util/update-grub.in: New. Core of update-grub.
7465 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7466 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7467 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7468 * util/grub.d/README: New. Document grub.d directory layout.
7470 2007-05-01 Robert Millan <rmh@aybabtu.com>
7472 * util/grub-emu.c: Move initialization functions
7473 grub_util_biosdisk_init() and grub_init_all() before
7474 grub_util_biosdisk_get_grub_dev(), which relies on them.
7476 2007-04-19 Robert Millan <rmh@aybabtu.com>
7478 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7481 2007-04-18 Jerone Young <jerone@gmail.com>
7483 * kernel/elf.c: Add missing parenthesis for conditional statement
7486 2007-04-10 Jerone Young <jerone@gmail.com>
7488 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7489 continue on and look for device node with real device name.
7491 2007-04-10 Jerone Young <jerone@gmail.com>
7493 * configure.ac: Add argument for autoconf to use transformation
7495 * Makefile.in: Add autoconf package transformation code.
7496 * util/i386/pc/grub-install.in: Likewise.
7497 * util/powerpc/ieee1275/grub-install.in: Likewise.
7499 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7501 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7502 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7503 (EXT2_REVISION): Likewise.
7504 (EXT2_INODE_SIZE): Likewise.
7505 (struct grub_ext2_block_group): Added a missing member
7507 (grub_ext2_read_inode): Divide by the inode size in a superblock
7508 instead of 128 to obtain INODES_PER_BLOCK.
7509 Use the macro EXT2_INODE_SIZE instead of directly using
7512 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7514 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7515 superblock instead of the structure size to compute an
7516 offset. This fixes the problem that GRUB could not read a
7517 filesystem when inode size is different from 128-byte.
7519 2007-03-05 Marco Gerards <marco@gnu.org>
7521 * normal/main.c (read_config_file): When "menu" is not set, create
7524 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7526 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7527 (HEAP_LIMIT): New macro.
7528 (grub_claim_heap): Claim memory up to `heaplimit'.
7530 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7532 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7533 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7535 (grub_arch_modules_addr): Return address after `_end'.
7536 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7537 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7538 (add_segments): Calculate `_end' from phdr size and location.
7539 (ALIGN_UP): Moved to ...
7540 * include/grub/misc.h: here.
7541 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7543 (GRUB_IEEE1275_MODULE_BASE): Removed.
7545 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7547 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7550 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7552 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7554 (grub_elf64_load_hook_t): Likewise.
7555 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7558 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7560 * kern/mm.c: Update copyright.
7561 (grub_mm_debug): Correct syntax error.
7562 (grub_mm_dump_free): New function.
7563 (grub_debug_free): Call `grub_free'.
7564 * include/grub/mm.h: Update copyright.
7565 (grub_mm_dump_free): Add declaration.
7567 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7569 * include/grub/ieee1275/ieee1275.h: Update copyright.
7570 * kern/powerpc/ieee1275/init.c: Likewise.
7571 * kern/powerpc/ieee1275/openfw.c: Likewise.
7573 * loader/powerpc/ieee1275/linux.c: Likewise.
7574 * include/grub/elfload.h: Likewise.
7575 * kern/elf.c: Likewise.
7576 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7578 (grub_elf64_load): Likewise.
7579 (grub_elf32_load_segment): Move to a nested function.
7580 (grub_elf64_load_segment): Likewise.
7582 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7584 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7586 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7587 (grub_heap_len): Likewise.
7588 (HEAP_SIZE): New macro.
7589 (grub_claim_heap): New function.
7590 (grub_machine_init): Don't claim heap directly. Call
7592 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7593 (grub_available_iterate): New function.
7595 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7597 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7598 * configure.ac: Use it for testing the HOST and TARGET compilers.
7600 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7602 * Makefile.in (enable_grub_emu): New variable.
7603 * configure.ac (--enable-grub-emu): New option.
7604 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7605 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7606 * conf/i386-pc.rmk: Likewise.
7607 * conf/powerpc-ieee1275.rmk: Likewise.
7608 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7610 2006-12-12 Marco Gerards <marco@gnu.org>
7612 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7614 * kern/env.c (grub_env_unset): Don't free the member `value' when
7615 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7618 * normal/main.c (current_menu): Removed.
7619 (free_menu): Unset the `menu' environment variable.
7620 (grub_normal_menu_addentry): Make use of the environment variable
7621 `menu', instead of using the global `current_menu'. Allocate
7622 memory for the sourcecode of this entry.
7623 (read_config_file): New argument `nested', changed all callers.
7624 Only in the case of a new context, initialize a new menu. Set the
7625 `menu' environment variable.
7626 (grub_normal_execute): Don't set and unset the environment
7627 variable `menu' here anymore. Only free the menu when leaving the
7630 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7633 2006-12-11 Marco Gerards <marco@gnu.org>
7635 * normal/menu_entry.c (run): Fix off by one bug so the last line
7636 is executed. Move the loader check to outside the loop.
7638 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7640 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7642 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7644 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7645 the number of sectors. Reported by Andrey Shuvikov
7646 <mr_hyro@yahoo.com>.
7648 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7650 * kern/disk.c (grub_disk_read): When there is a read error, always
7651 try to read only the necessary data.
7653 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7655 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7657 [GRUB_UTIL] (grub_raid_fini): Likewise.
7658 [GRUB_UTIL] (grub_lvm_init): Likewise.
7659 [GRUB_UTIL] (grub_lvm_fini): Likewise.
7660 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
7661 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
7662 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7663 and grub_raid_fini().
7665 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7667 * include/grub/types.h (__unused): Rename to UNUSED.
7668 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7669 (grub_elf64_size): Likewise.
7671 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7673 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7674 grub_error_push and grub_error_pop in the error-handling path.
7675 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7678 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7680 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7681 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7682 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7683 (kernel_elf_SOURCES): Likewise.
7684 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7685 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7686 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7687 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7688 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7689 (elf_mod_SOURCES): New variable.
7690 (elf_mod_CFLAGS): Likewise.
7691 (elf_mod_LDFLAGS): Likewise.
7692 * include/grub/types.h (__unused): New macro.
7693 * include/grub/elfload.h: New file.
7694 * kern/elf.c: Likewise.
7695 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7696 (ELF32_LOADMASK): New macro.
7697 (ELF64_LOADMASK): Likewise.
7699 (grub_linux_load32): New function.
7700 (grub_linux_load64): Likewise.
7701 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7702 Use grub_elf_t instead of grub_file_t.
7704 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7706 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7707 `catch_result' to struct set_color_args.
7709 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7711 * normal/menu.c: Include grub/script.h.
7712 * normal/menu_entry.c: Likewise.
7713 * include/grub/normal.h: Do not include grub/script.h.
7715 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7717 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7719 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7721 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7723 (grub_disk_close): Print debug messages when closing a disk.
7724 (grub_disk_read): Print debug messages when disk read fails.
7725 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7727 * kern/partition.c: Include misc.h.
7728 (grub_partition_iterate): Print debug messages when detecting
7731 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7733 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7735 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7737 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7739 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7740 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7742 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7744 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7745 instead of sizeof(lv). Patch by Michael Guntsche.
7747 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7749 * disk/lvm.c: Rename VGS to VG_LIST.
7750 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7751 (grub_lvm_open): Likewise.
7752 Thanks to Michael Guntsche for finding this bug.
7754 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7756 * configure.ac (AC_INIT): Bumped to 1.95.
7758 2006-10-14 Robert Millan <rmh@aybabtu.com>
7760 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7761 with "/dev/.static/dev/md".
7763 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7765 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7766 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7767 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7768 DRIVE_NAME are always freed.
7770 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7771 DOS_PART, as a DOS partition is counted from one instead of zero
7772 now. Reported by Robert Millan.
7774 2006-10-14 Robert Millan <rmh@aybabtu.com>
7776 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7777 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7778 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7779 string returned by grub_guess_root_device.
7780 * util/i386/pc/grub-setup.c: Likewise.
7781 * util/i386/pc/grub-probefs.c: Likewise.
7783 * util/i386/pc/grub-probefs.c: Rename to ...
7784 * util/i386/pc/grub-probe.c: ... this.
7785 * DISTLIST: Remove grub-probefs, add grub-probe.
7786 * conf/i386-efi.rmk: Likewise.
7787 * conf/i386-pc.rmk: Likewise.
7788 * util/i386/pc/grub-install.in: Likewise.
7790 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7791 choose which information we want to print.
7793 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7795 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7796 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7797 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7798 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7799 video/readers/tga.c and video/i386/pc/vbeutil.c.
7801 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7803 Added support for RAID and LVM.
7805 * disk/lvm.c: New file.
7806 * disk/raid.c: Likewise.
7807 * include/grub/lvm.h: Likewise.
7808 * include/grub/raid.h: Likewise.
7809 * include/grub/util/lvm.h: Likewise.
7810 * include/grub/util/raid.h: Likewise.
7811 * util/lvm.c: Likewise.
7812 * util/raid.c: Likewise.
7814 * include/grub/disk.h (grub_disk_dev_id): Add
7815 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7816 (grub_disk_get_size): New prototype.
7817 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7818 returns a partition.
7819 (grub_disk_get_size): New function.
7821 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7822 verbatim if grub_install_dos_part is -2.
7824 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7827 * util/i386/pc/grub-setup.c (setup): New argument
7828 MUST_EMBED. Force embedding of GRUB when the argument is
7829 true. Close FILE before returning.
7830 (main): Add support for RAID and LVM.
7832 * conf/common.rmk: Add RAID and LVM modules.
7833 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7835 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7837 * kern/misc.c (grub_strstr): New function.
7838 * include/grub/misc.h (grub_strstr): New prototype.
7840 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7842 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7844 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7846 * kern/misc.c (grub_strtoull): Guess the base only if not
7849 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7851 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7854 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7856 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7858 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7859 Remove `flags' argument. All callers changed.
7860 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7861 (IEEE1275_IHANDLE_INVALID): New variable.
7862 (IEEE1275_CELL_INVALID): New variable.
7863 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7864 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7865 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7866 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7867 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7868 codes from Open Firmware. All callers updated.
7869 (grub_ieee1275_next_property): Directly return Open Firmware return
7871 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7872 Standardize error checking from `grub_ieee1275_get_property'.
7873 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7874 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7876 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7878 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7879 `instance_to_package_args' to `instance_to_path_args'.
7881 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7882 `grub_ieee1275_chosen'.
7884 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7885 `grub_ieee1275_interpret'.
7887 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7889 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7891 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7893 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7894 (__cmpdi): Likewise.
7896 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7897 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7900 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7902 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7903 to type `grub_ssize_t'.
7904 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7906 2006-09-22 Marco Gerards <marco@gnu.org>
7908 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7911 2006-09-22 Marco Gerards <marco@gnu.org>
7913 * commands/echo.c: New file.
7915 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7917 * conf/common.rmk (echo_mod_SOURCES): New variable.
7918 (echo_mod_CFLAGS): Likewise.
7919 (echo_mod_LDFLAGS): Likewise.
7921 2006-09-22 Marco Gerards <marco@gnu.org>
7923 * normal/main.c (get_line): Malloc memory instead of using
7924 preallocated memory. Removed the arguments `cmdline' and
7925 `max_len'. Updated all callers.
7927 2006-09-22 Marco Gerards <marco@gnu.org>
7929 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7930 (normal_mod_DEPENDENCIES): Likewise.
7932 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7933 (normal_mod_DEPENDENCIES): Likewise.
7935 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7937 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
7939 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7941 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7942 (normal_mod_DEPENDENCIES): Likewise.
7943 * conf/i386-pc.mk: Regenerate.
7944 * conf/i386-efi.mk: Likewise
7945 * conf/common.mk: Likewise.
7946 * conf/powerpc-ieee1275.mk: Likewise.
7947 * conf/sparc64-ieee1275.mk: Likewise.
7949 2006-09-22 Robert Millan <rmh@aybabtu.com>
7951 Sync with i386 version.
7952 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7953 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7955 2006-09-21 Robert Millan <rmh@aybabtu.com>
7957 Import from GRUB Legacy (lib/device.c):
7958 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7959 (init_device_map) [__linux__]: Add support for I2O devices.
7961 2006-09-14 Marco Gerards <marco@gnu.org>
7963 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7966 2006-09-14 Robert Millan <rmh@aybabtu.com>
7968 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7971 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7973 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7974 before adding it to device.map.
7976 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
7978 * genmk.rb: Let GCC generate dependencies the first time it
7979 compiles a file; using the -MD option.
7980 * conf/common.mk: Regenerate.
7981 * conf/i386-pc.mk: Likewise.
7982 * conf/i386-efi.mk: Likewise.
7983 * conf/powerpc-ieee1275.mk: Likewise.
7984 * conf/sparc64-ieee1275.mk: Likewise.
7986 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7988 Move the prototypes of grub_setjmp and grub_longjmp to
7989 cpu/setjmp.h, so that each architecture may specify different
7992 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7993 (grub_longjmp): Likewise.
7994 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7995 (grub_longjmp): Likewise.
7996 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7997 (grub_longjmp): Likewise.
7999 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8000 [!GRUB_UTIL] (grub_longjmp): Removed.
8002 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
8004 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8005 "color!" method does not return any value.
8007 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8009 * include/grub/bitmap.h: New file.
8011 * include/grub/i386/pc/vbeutil.h: Likewise.
8013 * video/bitmap.c: Likewise.
8015 * video/readers/tga.c: Likewise.
8017 * video/i386/pc/vbeutil.c: Likewise.
8019 * commands/videotest.c: Code cleanup and updated to reflect to new
8022 * term/gfxterm.c: Likewise.
8024 * video/video.c: Likewise.
8026 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8027 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8028 (bitmap_mod_SOURCES): New entry.
8029 (bitmap_mod_CFLAGS): Likewise.
8030 (bitmap_mod_LDFLAGS): Likewise.
8031 (tga_mod_SOURCES): Likewise.
8032 (tga_mod_CFLAGS): Likewise.
8033 (tga_mod_LDFLAGS): Likewise.
8035 * include/grub/video.h (grub_video_blit_operators): New enum type.
8036 (grub_video_render_target): Changed as forward declaration and moved
8037 actual definition to be video driver specific.
8038 (grub_video_adapter.blit_bitmap): Added blitting operator.
8039 (grub_video_adapter.blit_render_target): Likewise.
8040 (grub_video_blit_bitmap): Likewise.
8041 (grub_video_blit_render_target): Likewise.
8043 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8044 driver specific render target definition.
8045 (grub_video_vbe_map_rgba): Added driver internal helper.
8046 (grub_video_vbe_unmap_color): Updated to use
8047 grub_video_i386_vbeblit_info.
8048 (grub_video_vbe_get_video_ptr): Likewise.
8050 * include/grub/i386/pc/vbeblit.h
8051 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8052 grub_video_i386_vbeblit_info.
8053 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8054 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8055 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8056 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8057 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8058 (grub_video_i386_vbeblit_index_index): Likewise.
8059 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8060 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8061 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8062 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8064 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8067 * video/i386/pc/vbeblit.c: Updated to reflect changes on
8068 include/grub/i386/pc/vbeblit.h.
8070 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8071 Updated to use grub_video_i386_vbeblit_info.
8072 (grub_video_i386_vbefill_R8G8B8): Likewise.
8073 (grub_video_i386_vbefill_index): Likewise.
8074 (grub_video_i386_vbefill): Added generic filler.
8076 * video/i386/pc/vbefill.c: Updated to reflect changes on
8077 include/grub/i386/pc/vbefill.h.
8079 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8080 grub_video_i386_vbeblit_info.
8081 (grub_video_vbe_unmap_color): Likewise.
8082 (grub_video_vbe_blit_glyph): Likewise.
8083 (grub_video_vbe_scroll): Likewise.
8084 (grub_video_vbe_draw_pixel): Removed function.
8085 (grub_video_vbe_get_pixel): Likewise.
8086 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8087 updated code to use it.
8088 (common_blitter): Added common blitter for render target and bitmap.
8089 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8090 (grub_video_vbe_blit_render_target): Likewise.
8092 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
8094 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8095 is in text mode if there is no console control protocol instance
8098 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8100 * include/grub/video.h: Code cleanup.
8102 * include/grub/i386/pc/vbe.h: Likewise.
8104 * video/i386/pc/vbe.c: Likewise.
8106 * video/i386/pc/vbeblit.c: Likewise.
8108 * video/i386/pc/vbefill.c: Likewise.
8110 * video/video.c: Likewise. Also added more comments.
8112 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8114 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8115 (struct grub_biosdisk_dap): Likewise.
8117 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
8118 linkage settings for all functions.
8120 2006-07-12 Marco Gerards <marco@gnu.org>
8122 * configure.ac (--enable-mm-debug): Fix typo.
8124 * genkernsyms.sh.in: Use proper quoting for `CC'.
8126 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8128 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8129 (normal_mod_ASFLAGS): Remove "-m32".
8131 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8133 * util/misc.c: Include config.h.
8134 [!HAVE_MEMALIGN]: Do not include malloc.h.
8135 (grub_memalign): Use posix_memalign, if present. Then, use
8136 memalign, if present. Otherwise, emit an error.
8138 * util/grub-emu.c: Do not include malloc.h.
8140 * include/grub/util/misc.h: Include unistd.h. This is required for
8141 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8142 D. Eades III <hde@foobar-qux.org>.
8144 * configure.ac (AC_GNU_SOURCE): Added.
8145 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8148 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8150 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8151 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8153 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8155 * include/grub/types.h (grub_host_addr_t): Rename to
8157 (grub_host_off_t): Rename to grub_target_off_t.
8158 (grub_host_size_t): Rename to grub_target_size_t.
8159 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8160 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8162 * include/grub/kernel.h (struct grub_module_header): Change type
8163 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8164 (grub_module_info): Likewise.
8166 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8168 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8169 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8170 Velazquez <jesus.velazquez@gmail.com>.
8172 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8174 Count partitions from 1 instead of 0 in the string representation
8175 of partitions. Still use 0-based internally.
8177 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8178 (sun_partition_map_iterate): Use grub_partition_t instead of
8179 struct grub_partition *. Cast DESC->START_CYLINDER to
8180 grub_uint64_t after converting the endian.
8181 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8182 (sun_partition_map_get_name): Add 1 to P->INDEX.
8184 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8186 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8188 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8189 zero instead of one.
8190 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8191 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8193 * partmap/apple.c (apple_partition_map_iterate): Change the type
8195 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8196 (apple_partition_map_get_name): Add 1 into P->INDEX.
8198 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8200 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8201 calculate the offset of a partition.
8202 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8203 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8205 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8206 SECTOR to grub_disk_addr_t.
8207 (acorn_partition_map_iterate): Likewise.
8208 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8209 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8211 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8213 * kern/i386/pc/init.c (make_install_device): Add 1 into
8214 GRUB_INSTALL_DOS_PART.
8216 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8219 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8221 Clean up the code to support 64-bit addressing in disks and
8222 files. This change is not enough for filesystems yet.
8224 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8225 type of "start" to grub_uint64_t.
8226 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8227 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8228 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8231 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8232 to grub_disk_addr_t.
8234 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8237 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8239 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8242 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8244 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8246 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8248 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8249 to grub_off_t, to detect an error from grub_file_seek.
8250 (grub_multiboot_load_elf32): Likewise.
8252 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8253 maximum unsigned long value when an overflow is detected.
8254 (grub_strtoull): New function.
8255 (grub_divmod64): Likewise.
8256 (grub_lltoa): use grub_divmod64.
8258 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8260 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8261 the pointer to next character. Use grub_strtoull instead of
8263 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8264 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8267 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
8268 return value is signed.
8269 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8270 test if OFFSET is less than zero, as OFFSET is unsigned now.
8272 * kern/disk.c (struct grub_disk_cache): Change the type of
8273 "sector" to grub_disk_addr_t.
8274 (grub_disk_cache_get_index): Change the type of SECTOR to
8275 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8276 unsigned after shifting.
8277 (grub_disk_cache_invalidate): Change the type of SECTOR to
8279 (grub_disk_cache_unlock): Likewise.
8280 (grub_disk_cache_store): Likewise.
8281 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8282 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8283 grub_disk_addr_t and grub_uint64_t, respectively.
8284 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8285 body, as the value of OFFSET is tweaked by
8286 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8287 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8289 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8290 body, as the value of OFFSET is tweaked by
8291 grub_disk_check_range. Change the types of LEN and N to
8294 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8295 and "saved_offset" to grub_off_t.
8296 (test_header): Cast BUF to char *.
8297 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8299 (grub_gzio_read): Change the types of OFFSET and SIZE to
8300 grub_off_t and grub_size_t, respectively.
8302 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8304 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8305 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8306 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8307 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8308 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8310 * include/grub/types.h (grub_off_t): Unconditionally set to
8312 (grub_disk_addr_t): Changed to grub_uint64_t.
8314 * include/grub/partition.h (struct grub_partition): Change the
8315 types of "start", "len" and "offset" to grub_disk_addr_t,
8316 grub_uint64_t and grub_disk_addr_t, respectively.
8317 (grub_partition_get_start): Return grub_disk_addr_t.
8318 (grub_partition_get_len): Return grub_uint64_t.
8320 * include/grub/misc.h (grub_strtoull): New prototype.
8321 (grub_divmod64): Likewise.
8323 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8324 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8325 grub_off_t, respectively.
8326 All callers and references changed.
8328 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8329 grub_size_t in "read".
8330 All callers and references changed.
8332 * include/grub/file.h (struct grub_file): Change the types of
8333 "offset" and "size" to grub_off_t and grub_off_t,
8334 respectively. Change the type of SECTOR to grub_disk_addr_t in
8336 (grub_file_read): Change the type of LEN to grub_size_t.
8337 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8339 (grub_file_size): Return grub_off_t.
8340 (grub_file_tell): Likewise.
8341 All callers and references changed.
8343 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8344 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8346 (struct grub_disk): Change the type of "total_sectors" to
8347 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
8349 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8350 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8351 (grub_disk_write): Likewise.
8352 All callers and references changed.
8354 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8355 char * for grub_strncmp to silence gcc.
8356 (grub_iso9660_mount): Likewise.
8357 (grub_iso9660_mount): Likewise.
8358 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8360 (grub_iso9660_iterate_dir): Likewise.
8361 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8363 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8364 LEN to grub_disk_addr_t and grub_size_t, respectively.
8366 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8368 * fs/jfs.c (grub_jfs_read_file): Likewise.
8370 * fs/minix.c (grub_jfs_read_file): Likewise.
8372 * fs/sfs.c (grub_jfs_read_file): Likewise.
8374 * fs/ufs.c (grub_jfs_read_file): Likewise.
8376 * fs/xfs.c (grub_jfs_read_file): Likewise.
8378 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8379 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8382 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8383 BLKNR to -1 instead of returning GRUB_ERRNO.
8384 (grub_ext2_read_file): Change the types of SECTOR and
8385 LEN to grub_disk_addr_t and grub_size_t, respectively.
8387 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8388 LEN to grub_disk_addr_t and grub_size_t, respectively.
8390 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8393 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8394 string. Do not cast SECTOR explicitly.
8396 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8397 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8398 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8399 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8400 over 2TB and LBA mode is not supported, raise an error.
8401 (get_safe_sectors): New function.
8402 (grub_biosdisk_read): Use get_safe_sectors.
8403 (grub_biosdisk_write): Likewise.
8405 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8406 (grub_efidisk_write): Likewise.
8408 * disk/loopback.c (delete_loopback): Cosmetic changes.
8409 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8411 (grub_loopback_open): Likewise.
8412 (grub_loopback_read): Likewise. Also, change the type of POS to
8413 grub_off_t, and fix the usage of grub_memset.
8415 * commands/i386/pc/play.c: Include grub/machine/time.h.
8417 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8420 * commands/configfile.c: Include grub/env.h.
8422 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8423 GRUB_ERRNO directly instead. Change the type of POS to
8424 grub_off_t. Follow the coding standard.
8426 * commands/blocklist.c: Include grub/partition.h.
8427 (grub_cmd_blocklist): Return an error if the underlying device is
8428 not a disk. Take the starting sector of a partition into account,
8429 if a partition is used.
8431 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8433 (lba_mode): Support 64-bit addresses.
8434 (chs_mode): Likewise.
8435 (copy_buffer): Adapted to the new offsets of a length field and a
8437 (blocklist_default_start): Allocate 64-bit space.
8439 * boot/i386/pc/boot.S (force_lba): Removed.
8440 (boot_drive): Moved to under KERNEL_SECTOR.
8441 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
8443 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8445 (lba_mode): Refactored to support a 64-bit address. More size
8447 (setup_sectors): Likewise.
8449 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8451 * DISTLIST: Added include/grub/i386/linux.h. Removed
8452 include/grub/i386/pc/linux.h
8454 * configure.ac (AC_INIT): Bumped to 1.94.
8456 * config.guess: Updated from gnulib.
8457 * config.sub: Likewise.
8458 * install-sh: Likewise.
8459 * mkinstalldirs: Likewise.
8461 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8463 * conf/common.rmk (grub_modules_init.lst): Depended on
8464 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8467 * genmk.rb (PModule::rule): Reverted the previous change.
8469 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8471 * conf/common.rmk (grub_modules_init.lst): Depends on
8472 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8473 that the target does not exist before producing.
8474 (grub_modules_init.h): Remove the target before generating.
8475 (grub_emu_init.c): Likewise.
8477 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8479 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8481 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8482 for the target-specific tests. Make sure that we also have the
8483 up-to-date target variables for those tests.
8485 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8487 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8488 (PModule::rule): Likewise.
8490 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8492 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8493 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8494 target-specific flags should be prefixed.
8495 (PModule::rule): Likewise.
8497 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8499 * configure.ac (CMP): Check if cmp is available explicitly.
8501 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8503 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8504 (target_cpu): New variable.
8505 (pkglibdir): Use target_cpu instead of host_cpu.
8507 * util/i386/pc/grub-install.in (host_cpu): Removed.
8508 (target_cpu): New variable.
8509 (pkglibdir): Use target_cpu instead of host_cpu.
8511 * util/genmoddep.c: Removed.
8513 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8514 instead of GRUB_HOST_SIZEOF_VOID_P.
8515 * kern/dl.c: Likewise.
8517 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8519 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8520 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8521 (GRUB_TARGET_SIZEOF_LONG): ... this.
8522 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8523 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8524 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8526 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8527 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8528 (GRUB_TARGET_SIZEOF_LONG): ... this.
8529 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8530 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8531 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8533 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8534 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8535 (GRUB_TARGET_SIZEOF_LONG): ... this.
8536 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8537 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8539 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8540 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8541 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8542 instead of GRUB_HOST_SIZEOF_LONG.
8543 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8544 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8545 GRUB_CPU_WORDS_BIGENDIAN.
8546 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8547 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8550 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8551 (genmoddep_SOURCES): Likewise.
8552 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8553 (genmoddep_SOURCES): Likewise.
8554 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8555 (genmoddep_SOURCES): Likewise.
8556 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8558 (genmoddep_SOURCES): Likewise.
8560 * genmoddep.awk: New file.
8562 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8563 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8564 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8565 (PModule::rule): Likewise.
8566 (Program::rule): Likewise.
8567 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8568 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8571 * configure.ac: Rewritten intensively to use host and target
8572 instead of build and host, respectively.
8574 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8575 (host_cpu): Removed.
8576 (target_cpu): New variable.
8577 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8578 (BUILD_CC): Removed.
8579 (BUILD_CFLAGS): Likewise.
8580 (BUILD_CPPFLAGS): Likewise.
8581 (TARGET_CC): New variable.
8582 (TARGET_CFLAGS): Likewise.
8583 (TARGET_CPPFLAGS): Likewise.
8584 (TARGET_LDFLAGS): Likewise.
8586 (include): Use target_cpu instead of host_cpu.
8587 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
8589 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8591 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8593 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8594 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8595 field 'false' to 'exec_on_false'.
8596 (grub_script_create_cmdif): Renamed argument names to reflect above
8599 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8601 * normal/script.c (grub_script_create_cmdif): Likewise.
8603 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8605 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8607 (grub_hfsplus_btree_recptr): Likewise.
8608 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8609 FILEBLOCK both to pass a block number and store next block
8611 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8612 overflow file correctly. Specify errors appropriately, because
8613 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8614 grub_hfsplus_btree_recptr to get the pointer to a found key.
8615 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8618 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8620 (_linux_mod_SOURCES): New variable.
8621 (_linux_mod_CFLAGS): Likewise.
8622 (_linux_mod_LDFLAGS): Likewise.
8623 (linux_mod_SOURCES): Likewise.
8624 (linux_mod_CFLAGS): Likewise.
8625 (linux_mod_LDFLAGS): Likewise.
8627 * DISTLIST: Added loader/i386/efi/linux.c,
8628 loader/i386/efi/linux_normal.c and
8629 include/grub/i386/efi/loader.h.
8631 * loader/i386/efi/linux.c: New file.
8632 * loader/i386/efi/linux_normal.c: Likewise.
8633 * include/grub/i386/efi/loader.h: Likewise.
8635 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8637 * commands/blocklist.c: New file.
8639 * DISTLIST: Added commands/blocklist.c.
8641 * term/efi/console.c (grub_console_highlight_color): Use a lighter
8642 color for the background, and a darker color for the foreground.
8643 (grub_console_checkkey): Return READ_KEY.
8644 (grub_console_cls): Set the background to
8645 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8647 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8649 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8650 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8652 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8655 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8656 BG. The spec is wrong again.
8658 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8660 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
8662 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8663 commands/blocklist.c.
8664 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8666 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8667 (blocklist_mod_SOURCES): New variable.
8668 (blocklist_mod_CFLAGS): Likewise.
8669 (blocklist_mod_LDFLAGS): Likewise.
8671 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8673 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8675 (lba_mode): Use %eax more intensively to reduce the code size.
8677 2006-05-20 Marco Gerards <marco@gnu.org>
8679 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8681 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8683 (script): Accept leading newlines.
8684 (newlines): New rule to describe 0 or more newlines.
8685 (commands): Accept `command' with trailing newline. Fixed the
8686 order in which arguments were passed to `grub_script_add_cmd'.
8687 Accept commands separated by newlines.
8688 (function): Changed to accept newlines.
8689 (menuentry) Rewritten.
8691 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8692 front of the list, instead of to the end.
8694 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8696 * util/i386/pc/grub-install.in (bindir): New variable.
8697 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8698 Shaver <lbgwjl@gmail.com>.
8700 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8702 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8703 grub/machine/linux.h
8704 * loader/i386/pc/linux.c: Likewise.
8706 * include/grub/i386/pc/linux.h: Moved to ...
8707 * include/grub/i386/linux.h: ... here.
8709 * include/grub/i386/linux.h (struct linux_kernel_params): New
8712 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8714 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8716 (grub_video_vbe_blit_glyph): Likewise.
8717 (grub_video_vbe_blit_bitmap): Likewise.
8718 (grub_video_vbe_blit_render_target): Likewise.
8720 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8722 * configure.ac (--with-platform): Properly quote the square
8725 2006-05-08 Marco Gerards <marco@gnu.org>
8727 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8729 (kernel_elf_HEADERS): ...to this. Updated all users.
8730 (grubof_symlist.c): Renamed from this...
8731 (kernel_elf_symlist.c): ...to this. Updated all users.
8732 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8733 (grubof_SOURCES): Renamed from this...
8734 (kernel_elf_SOURCES): ...to this.
8735 (grubof_HEADERS): Renamed from this...
8736 (kernel_elf_HEADERS): ...to this.
8737 (grubof_CFLAGS): Renamed from this...
8738 (kernel_elf_CFLAGS): ...to this.
8739 (grubof_ASFLAGS): Renamed from this...
8740 (kernel_elf_ASFLAGS): ...to this.
8741 (grubof_LDFLAGS): Renamed from this...
8742 (kernel_elf_LDFLAGS): ...to this.
8744 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8746 (kernel_elf_HEADERS): ...to this. Updated all users.
8747 (grubof_symlist.c): Renamed from this...
8748 (kernel_elf_symlist.c): ...to this. Updated all users.
8749 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8750 (grubof_SOURCES): Renamed from this...
8751 (kernel_elf_SOURCES): ...to this.
8752 (grubof_HEADERS): Renamed from this...
8753 (kernel_elf_HEADERS): ...to this.
8754 (grubof_CFLAGS): Renamed from this...
8755 (kernel_elf_CFLAGS): ...to this.
8756 (grubof_ASFLAGS): Renamed from this...
8757 (kernel_elf_ASFLAGS): ...to this.
8758 (grubof_LDFLAGS): Renamed from this...
8759 (kernel_elf_LDFLAGS): ...to this.
8761 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8762 `kernel.elf' instead of `grubof'.
8764 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8766 Add --with-platform to configure. Use pkglibdir instead of
8767 pkgdatadir. This is reported by Roger Leigh.
8769 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8770 (host_vendor): Likewise.
8771 (host_os): Likewise.
8772 (pkgdatadir): Likewise.
8773 (platform): New variable.
8774 (pkglibdir): Likewise.
8775 Use PKGLIBDIR instead of PKGDATADIR.
8777 * util/i386/pc/grub-install.in (datadir): Removed.
8778 (host_vendor): Likewise.
8779 (host_os): Likewise.
8780 (pkgdatadir): Likewise.
8781 (platform): New variable.
8782 (pkglibdir): Likewise.
8783 Use PKGLIBDIR instead of PKGDATADIR.
8785 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8786 instead of GRUB_DATADIR.
8788 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8790 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8793 * configure.ac (--with-platform): New option.
8794 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8796 * Makefile.in: Include a makefile based on PLATFORM instead of
8798 (pkgdatadir): Not appended by the machine type.
8799 (pkglibdir): Appended by the machine type.
8800 (host_vendor): Removed.
8801 (platform): New variable.
8802 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8803 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8804 (uninstall): Likewise.
8806 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8808 Use the environment context in the menu. Remove the commands
8809 "default" and "timeout", and use variables instead.
8811 * normal/menu.c: Include grub/env.h.
8812 (print_entry): Cast TITLE to silence gcc.
8813 (get_timeout): New function.
8814 (set_timeout): Likewise.
8815 (get_entry_number): Likewise.
8816 (run_menu): Use a default entry, a fallback entry and a timeout
8817 in the environment variables "default", "fallback" and
8818 "timeout". Also, tweak the default entry if it is not within the
8819 current menu entries.
8820 (grub_menu_run): Use a fallback entry in the environment variable
8823 * normal/main.c (read_config_file): Do not initialize
8824 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8826 (grub_normal_execute): Use a data slot to store the menu.
8828 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8829 fallback_entry and timeout.
8830 (struct grub_menu_list): Removed.
8831 (grub_menu_list_t): Likewise.
8832 (struct grub_context): Likewise.
8833 (grub_context_t): Likewise.
8834 (grub_context_get): Likewise.
8835 (grub_context_get_current_menu): Likewise.
8836 (grub_context_push_menu): Likewise.
8837 (grub_context_pop_menu): Likewise.
8838 (grub_default_init): Likewise.
8839 (grub_default_fini): Likewise.
8840 (grub_timeout_init): Likewise.
8841 (grub_timeout_fini): Likewise.
8843 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8845 (normal_mod_SOURCES): Removed normal/context.c.
8847 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8848 commands/default.c, commands/timeout.c and normal/context.c.
8849 (normal_mod_SOURCES): Removed normal/context.c.
8851 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8852 commands/timeout.c and normal/context.c.
8853 (normal_mod_SOURCES): Removed normal/context.c.
8855 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8856 commands/default.c, commands/timeout.c and normal/context.c.
8857 (normal_mod_SOURCES): Removed normal/context.c.
8859 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8861 (default_mod_SOURCES): Removed.
8862 (default_mod_CFLAGS): Likewise.
8863 (default_mod_LDFLAGS): Likewise.
8864 (timeout_mod_SOURCES): Removed.
8865 (timeout_mod_CFLAGS): Likewise.
8866 (timeout_mod_LDFLAGS): Likewise.
8868 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8871 * commands/default.c: Removed.
8872 * commands/timeout.c: Likewise.
8873 * normal/context.c: Likewise.
8875 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8877 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8879 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8881 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8882 "next" to "prev" for readability.
8883 (struct grub_env_sorted_var): New struct.
8884 (grub_env_context): Renamed to ...
8885 (initial_context): ... this.
8886 (grub_env_var_context): Renamed to ...
8887 (current_context): ... this.
8888 (grub_env_find): Look only at CURRENT_CONTEXT.
8889 (grub_env_context_open): Rewritten to copy exported variables from
8891 (grub_env_context_close): Rewritten according to the new
8892 scheme. Also, add an assertion to prevent the initial context from
8894 (grub_env_insert): Removed the code for the sorted list.
8895 (grub_env_remove): Likewise.
8896 (grub_env_export): Simply mark the variable with
8897 GRUB_ENV_VAR_GLOBAL.
8898 (grub_env_set): A cosmetic change for naming consistency.
8899 (grub_env_get): Likewise.
8900 (grub_env_unset): Likewise.
8901 (grub_env_iterate): Rewritten to sort variables within this
8903 (grub_register_variable_hook): Fixed for naming consistency. Call
8904 grub_env_find again, only if NAME is not found at the first time.
8905 (mangle_data_slot_name): New function.
8906 (grub_env_set_data_slot): Likewise.
8907 (grub_env_get_data_slot): Likewise.
8908 (grub_env_unset_data_slot): Likewise.
8910 * include/grub/env.h (grub_env_var_type): New enum.
8911 (GRUB_ENV_VAR_LOCAL): New constant.
8912 (GRUB_ENV_VAR_GLOBAL): Likewise.
8913 (GRUB_ENV_VAR_DATA): Likewise.
8914 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8916 (grub_env_set): Replace VAR with NAME for consistency.
8917 (grub_register_variable_hook): Likewise.
8918 (grub_env_export): Specify the name of the argument.
8919 (grub_env_set_data_slot): New prototype.
8920 (grub_env_get_data_slot): Likewise.
8921 (grub_env_unset_data_slot): Likewise.
8923 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8925 Extend the loader so that GRUB can accept a loader which comes
8926 back to GRUB when a loaded image exits. Also, this change adds
8927 support for a chainloader on EFI.
8929 * term/efi/console.c: Include grub/misc.h.
8930 (grub_console_checkkey): Display a scan code on the top for
8931 debugging. This will be removed once the EFI port gets stable.
8932 Correct the scan code mapping.
8934 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8935 allocate memory from larger regions, in order to reduce the number
8936 of allocated regions. Otherwise, the MacOSX loader panics.
8937 (filter_memory_map): Avoid less than 1MB for compatibility with
8939 (add_memory_regions): Allocate from the tail of a region, if
8940 possible, to avoid allocating a region near to 1MB, for the MacOSX
8943 * kern/efi/init.c (grub_efi_set_prefix): Specify
8944 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8946 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8947 argument IMAGE_HANDLE and specify it to get a loaded image.
8948 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8949 grub_efi_get_loaded_image.
8950 (grub_efi_get_filename): Divide the length by the size of
8952 (grub_efi_get_device_path): New function.
8953 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8954 the length by the size of grub_efi_char16_t for a file path device
8957 * kern/loader.c (grub_loader_noreturn): New variable.
8958 (grub_loader_set): Accept a new argument NORETURN. Set
8959 GRUB_LOADER_NORETURN to NORETURN.
8960 All callers changed.
8961 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8964 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8966 (grub_efi_get_loaded_image): Take an argument to specify an image
8969 * include/grub/loader.h (grub_loader_set): Added one more argument
8972 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8973 instead of grub_efi_open_protocol.
8974 (grub_efidisk_get_device_name): Likewise.
8975 (grub_efidisk_close): Print a newline.
8976 (grub_efidisk_get_device_handle): Fixed to use
8977 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8978 GRUB_EFI_DEVICE_PATH_TYPE.
8980 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8981 * kern/efi/efi.c (device_path_guid): ... here.
8983 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8985 (kernel_mod_HEADERS): Added efi/disk.h.
8986 (_chain_mod_SOURCES): New variable.
8987 (_chain_mod_CFLAGS): Likewise.
8988 (_chain_mod_LDFLAGS): Likewise.
8989 (chain_mod_SOURCES): Likewise.
8990 (chain_mod_CFLAGS): Likewise.
8991 (chain_mod_LDFLAGS): Likewise.
8993 * DISTLIST: Added include/grub/efi/chainloader.h,
8994 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8996 * include/grub/efi/chainloader.h: New file.
8997 * loader/efi/chainloader.c: Likewise.
8998 * loader/efi/chainloader_normal.c: Likewise.
9000 2006-04-30 Marco Gerards <marco@gnu.org>
9002 * commands/configfile.c (grub_cmd_source): New function.
9003 (GRUB_MOD_INIT): Register the commands `source' and `.'.
9004 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9006 2006-04-30 Marco Gerards <marco@gnu.org>
9008 * normal/execute.c (grub_script_execute_cmd): Change the return
9009 type to `grub_err_t'. Correctly return the error.
9010 (grub_script_execute_cmdline): In case a command line is not a
9011 command or a function, try to interpret it as an assignment.
9013 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9015 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9016 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9017 skip a node whose name is obviously invalid as UTF-16,
9018 i.e. contains a NUL character. Stop the iteration when the last
9019 directory entry is found. Instead of using the return value of
9020 grub_hfsplus_btree_iterate_node, store the value in RET and use
9021 it, because the iterator can be stopped by the last directory
9024 2006-04-30 Marco Gerards <marco@gnu.org>
9026 * include/grub/env.h (grub_env_export): New prototype. Reported
9027 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9029 2006-04-30 Marco Gerards <marco@gnu.org>
9031 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9032 size of the extents in a catalog file record.
9034 2006-04-29 Marco Gerards <marco@gnu.org>
9036 * commands/configfile.c (grub_cmd_configfile): Execute the
9037 configfile within its own context.
9039 * include/grub/env.h (grub_env_context_open): New prototype.
9040 (grub_env_context_close): Likewise.
9042 * kern/env.c (grub_env): Removed.
9043 (grub_env_sorted): Likewise.
9044 (grub_env_context): New variable.
9045 (grub_env_var_context): Likewise.
9046 (grub_env_find): Search both the active context and the global
9048 (grub_env_context_open): New function.
9049 (grub_env_context_close): Likewise.
9050 (grub_env_insert): Likewise.
9051 (grub_env_remove): Likewise.
9052 (grub_env_export): Likewise.
9053 (grub_env_set): Changed to use helper functions to avoid code
9055 (grub_env_iterate): Rewritten so both the current context and the
9056 global context are being used.
9058 * normal/command.c (export_command): New function.
9059 (grub_command_init): Register the `export' function.
9061 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
9063 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9064 explicitly to suppress gcc's warnings.
9065 * fs/fat.c (grub_fat_find_dir): Likewise.
9066 (grub_fat_label): Likewise.
9067 * fs/xfs.c (grub_xfs_read_inode): Likewise.
9068 (grub_xfs_mount): Likewise.
9069 (grub_xfs_label): Likewise.
9070 * fs/affs.c (grub_affs_mount): Likewise.
9071 (grub_affs_label): Likewise.
9072 (grub_affs_iterate_dir): Likewise.
9073 * fs/sfs.c (grub_sfs_mount): Likewise.
9074 (grub_sfs_iterate_dir): Likewise.
9075 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9076 * fs/hfs.c (grub_hfs_mount): Likewise.
9077 (grub_hfs_cmp_catkeys): Likewise.
9078 (grub_hfs_find_dir): Likewise.
9079 (grub_hfs_dir): Likewise.
9080 (grub_hfs_label): Likewise.
9081 * fs/jfs.c (grub_jfs_mount): Likewise.
9082 (grub_jfs_opendir): Likewise.
9083 (grub_jfs_getent): Likewise.
9084 (grub_jfs_lookup_symlink): Likewise.
9085 (grub_jfs_label): Likewise.
9086 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9087 (grub_hfsplus_iterate_dir): Likewise.
9088 (grub_hfsplus_btree_iterate_node): Made static.
9090 * util/grub-emu.c (prefix): New variable.
9091 (grub_machine_set_prefix): New function.
9092 (main): Do not set the environment variable "prefix" here. Only
9093 set PREFIX, which is used later by grub_machine_set_prefix.
9095 * include/grub/video.h: Do not include grub/symbol.h.
9096 (grub_video_register): Not exported. This symbol is not defined in
9098 (grub_video_unregister): Likewise.
9099 (grub_video_iterate): Likewise.
9100 (grub_video_setup): Likewise.
9101 (grub_video_restore): Likewise.
9102 (grub_video_get_info): Likewise.
9103 (grub_video_get_blit_format): Likewise.
9104 (grub_video_set_palette): Likewise.
9105 (grub_video_get_palette): Likewise.
9106 (grub_video_set_viewport): Likewise.
9107 (grub_video_get_viewport): Likewise.
9108 (grub_video_map_color): Likewise.
9109 (grub_video_map_rgb): Likewise.
9110 (grub_video_map_rgba): Likewise.
9111 (grub_video_fill_rect): Likewise.
9112 (grub_video_blit_glyph): Likewise.
9113 (grub_video_blit_bitmap): Likewise.
9114 (grub_video_blit_render_target): Likewise.
9115 (grub_video_scroll): Likewise.
9116 (grub_video_swap_buffers): Likewise.
9117 (grub_video_create_render_target): Likewise.
9118 (grub_video_delete_render_target): Likewise.
9119 (grub_video_set_active_render_target): Likewise.
9121 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9123 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9125 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9126 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9127 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9128 instead of $(srcdir)/genkernsyms.sh.
9130 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9131 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9132 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9133 instead of $(srcdir)/genkernsyms.sh.
9135 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9136 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9137 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9138 instead of $(srcdir)/genkernsyms.sh.
9140 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9141 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9142 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9143 instead of $(srcdir)/genkernsyms.sh.
9145 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9148 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9150 (gensymlist.sh): New target.
9151 (genkernsyms.sh): Likewise.
9153 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9154 genkernsyms.sh.in and gensymlist.sh.in.
9156 * genkernsyms.sh: Removed.
9157 * gensymlist.sh: Likewise.
9159 * genkernsyms.sh.in: New file.
9160 * gensymlist.sh.in: Likewise.
9162 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9164 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9165 clobber "prefix", since we may have already set it manually.
9167 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9169 * kern/misc.c (abort): New alias for grub_abort.
9171 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9173 A new machine-specific function "grub_machine_set_prefix" is
9174 defined. This is called after loading modules, so that a prefix
9175 initialization can use modules. Also, this change adds an
9176 intensive debugging feature for the memory manager via the
9177 configure option "--enable-mm-debug".
9179 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9182 * kern/sparc64/ieee1275/init.c (abort): Removed.
9183 (grub_stop): Likewise.
9184 (grub_exit): New function.
9185 (grub_set_prefix): Renamed to ...
9186 (grub_machine_set_prefix): ... this.
9187 (grub_machine_init): Do not call grub_set_prefix.
9189 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9190 (grub_machine_set_prefix): ... this.
9191 (grub_machine_init): Do not call grub_set_prefix.
9193 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9194 (grub_machine_init): Do not set the prefix here.
9196 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9198 * kern/efi/init.c: Include grub/mm.h.
9199 (grub_efi_set_prefix): New function.
9201 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9202 (grub_efi_get_filename): New function.
9203 (grub_print_device_path): Renamed to ...
9204 (grub_efi_print_device_path): ... this.
9206 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9207 [MM_DEBUG] (grub_realloc): Likewise.
9208 [MM_DEBUG] (grub_free): Likewise.
9209 [MM_DEBUG] (grub_memalign): Likewise.
9210 [MM_DEBUG] (grub_mm_debug): New variable.
9211 [MM_DEBUG] (grub_debug_malloc): New function.
9212 [MM_DEBUG] (grub_debug_free): New function.
9213 [MM_DEBUG] (grub_debug_realloc): New function.
9214 [MM_DEBUG] (grub_debug_memalign): New function.
9216 * kern/misc.c (grub_abort): Print a newline to distinguish
9219 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9220 grub_set_root_dev after loading modules. This is necessary when
9221 setting a prefix depends on modules.
9223 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9224 (grub_efi_print_device_path): ... this.
9225 (grub_efi_get_filename): New prototype.
9226 (grub_efi_set_prefix): Likewise.
9228 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9230 (grub_efidisk_get_device_handle): New prototype.
9231 (grub_efidisk_get_device_name): Likewise.
9233 * include/grub/mm.h: Include config.h.
9234 (MM_DEBUG): Removed.
9235 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9236 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9237 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9238 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9239 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9240 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9241 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9242 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9243 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9245 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9247 * disk/efi/efidisk.c: Include grub/partition.h.
9248 (iterate_child_devices): New function.
9249 (add_device): First, compare only last device path nodes, so that
9250 devices are sorted by the types.
9251 (grub_efidisk_get_device_handle): New function.
9252 (grub_efidisk_get_device_name): Likewise.
9254 * configure.ac (--enable-mm-debug): New option to enable the
9255 memory manager debugging feature. This makes the binary much
9256 bigger, so is disabled by default.
9258 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9260 Use grub_abort instead of grub_stop, and grub_exit must be
9261 define in each architecture now. Also, this change adds support
9264 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9265 (grub_getkey): New function.
9266 (grub_term_get_current): Likewise.
9268 * util/i386/pc/grub-setup.c: Include grub/term.h.
9269 (grub_getkey): New function.
9270 (grub_term_get_current): Likewise.
9272 * util/misc.c (grub_stop): Renamed to ...
9273 (grub_exit): ... this.
9275 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9276 (grub_exit): ... this.
9277 (grub_machine_init): Use grub_abort instead of abort.
9278 (grub_stop): Removed.
9280 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9283 * kern/i386/pc/startup.S (grub_exit): New function.
9284 (cold_reboot): New label.
9286 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9287 (grub_efi_init): Call grub_efidisk_init.
9288 (grub_efi_fini): Call grub_efidisk_fini.
9290 * kern/efi/efi.c: Include grub/mm.h.
9291 (grub_efi_console_control_guid): Renamed to ...
9292 (console_control_guid): ... this.
9293 (grub_efi_loaded_image_guid): Renamed to ...
9294 (loaded_image_guid): ... this.
9295 (grub_efi_locate_handle): New function.
9296 (grub_efi_open_protocol): Likewise.
9297 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9298 GRUB_EFI_CONSOLE_CONTROL_GUID.
9299 (grub_efi_exit): Removed.
9300 (grub_stop): Likewise.
9301 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9302 (grub_exit): New function.
9303 (grub_print_device_path): Likewise.
9305 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9306 (grub_enter_rescue_mode): Register "exit".
9308 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9309 (grub_abort): New function.
9311 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9313 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9315 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9317 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9318 (grub_print_device_path): New prototype.
9319 (grub_efi_locate_handle): Likewise.
9320 (grub_efi_open_protocol): Likewise.
9322 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9323 * disk/efi/efidisk.c: Likewise.
9325 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9327 * include/grub/efi/console_control.h
9328 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9330 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9331 last 8 bytes as an array.
9332 (GRUB_EFI_DISK_IO_GUID): New macro.
9333 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9334 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9335 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9337 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9338 (struct grub_efi_device_path): Rename the member "sub_type" to
9340 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9341 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9342 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9343 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9344 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9345 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9346 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9347 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9348 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9349 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9350 (struct grub_efi_pci_device_path): New structure.
9351 (grub_efi_pci_device_path_t): New type.
9352 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9353 (struct grub_efi_pccard_device_path): New structure.
9354 (grub_efi_pccard_device_path_t): New type.
9355 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9356 (struct grub_efi_memory_mapped_device_path): New structure.
9357 (grub_efi_memory_mapped_device_path_t): New type.
9358 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9359 (struct grub_efi_vendor_device_path): New structure.
9360 (grub_efi_vendor_device_path_t): New type.
9361 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9362 (struct grub_efi_controller_device_path): New structure.
9363 (grub_efi_controller_device_path_t): New type.
9364 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9365 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9366 (struct grub_efi_acpi_device_path): New structure.
9367 (grub_efi_acpi_device_path_t): New type.
9368 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9369 (struct grub_efi_expanded_acpi_device_path): New structure.
9370 (grub_efi_expanded_acpi_device_path_t): New type.
9371 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9372 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9373 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9374 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9375 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9376 (struct grub_efi_atapi_device_path): New structure.
9377 (grub_efi_atapi_device_path_t): New type.
9378 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9379 (struct grub_efi_fibre_channel_device_path): New structure.
9380 (grub_efi_fibre_channel_device_path_t): New type.
9381 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9382 (struct grub_efi_1394_device_path): New structure.
9383 (grub_efi_1394_device_path_t): New type.
9384 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9385 (struct grub_efi_usb_device_path): New structure.
9386 (grub_efi_usb_device_path_t): New type.
9387 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9388 (struct grub_efi_usb_class_device_path): New structure.
9389 (grub_efi_usb_class_device_path_t): New type.
9390 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9391 (struct grub_efi_i2o_device_path): New structure.
9392 (grub_efi_i2o_device_path_t): New type.
9393 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9394 (struct grub_efi_mac_address_device_path): New structure.
9395 (grub_efi_mac_address_device_path_t): New type.
9396 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9397 (struct grub_efi_ipv4_device_path): New structure.
9398 (grub_efi_ipv4_device_path_t): New type.
9399 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9400 (struct grub_efi_ipv6_device_path): New structure.
9401 (grub_efi_ipv6_device_path_t): New type.
9402 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9403 (struct grub_efi_infiniband_device_path): New structure.
9404 (grub_efi_infiniband_device_path_t): New type.
9405 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9406 (struct grub_efi_uart_device_path): New structure.
9407 (grub_efi_uart_device_path_t): New type.
9408 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9409 (struct grub_efi_vendor_messaging_device_path): New structure.
9410 (grub_efi_vendor_messaging_device_path_t): New type.
9411 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9412 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9413 (struct grub_efi_hard_drive_device_path): New structure.
9414 (grub_efi_hard_drive_device_path_t): New type.
9415 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9416 (struct grub_efi_cdrom_device_path): New structure.
9417 (grub_efi_cdrom_device_path_t): New type.
9418 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9419 (struct grub_efi_vendor_media_device_path): New structure.
9420 (grub_efi_vendor_media_device_path_t): New type.
9421 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9422 (struct grub_efi_file_path_device_path): New structure.
9423 (grub_efi_file_path_device_path_t): New type.
9424 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9425 (struct grub_efi_protocol_device_path): New structure.
9426 (grub_efi_protocol_device_path_t): New type.
9427 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9428 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9429 (struct grub_efi_bios_device_path): New structure.
9430 (grub_efi_bios_device_path_t): New type.
9431 (struct grub_efi_disk_io): New structure.
9432 (grub_efi_disk_io_t): New type.
9433 (struct grub_efi_block_io_media): New structure.
9434 (grub_efi_block_io_media_t): New type.
9435 (struct grub_efi_block_io): New structure.
9436 (grub_efi_block_io_t): New type.
9438 * include/grub/misc.h (grub_stop): Removed.
9439 (grub_exit): New prototype.
9440 (grub_abort): Likewise.
9442 * include/grub/disk.h (enum grub_disk_dev_id): Added
9443 GRUB_DISK_DEVICE_EFIDISK_ID.
9445 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9447 (kernel_syms.lst): Remove the target if an error occurs.
9449 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9451 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9452 as it was simply too buggy.
9454 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9456 * kern/misc.c (grub_lltoa): New function.
9457 (grub_vsprintf): Added support for the long long suffix,
9460 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9462 * Makefile.in (LDFLAGS): Add variable.
9463 (LD): Remove variable.
9464 * configure.ac: Add -m32 to LDFLAGS.
9465 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9466 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9467 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9468 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9469 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9471 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9472 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9473 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9475 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9477 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9478 length for unknown glyph.
9480 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9482 Add support for pre-loaded modules into the EFI port.
9484 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9485 completely. Accept one more argument DIR. The caller has changed.
9487 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9489 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9490 (grub_efi_loaded_image_guid): New variable.
9491 (grub_efi_get_loaded_image): New function.
9492 (grub_arch_modules_addr): Likewise.
9494 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9497 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9498 (struct grub_efi_loaded_image): New structure.
9499 (grub_efi_loaded_image_t): New type.
9501 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9503 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9504 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9505 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9507 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9509 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9511 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9513 * DISTLIST: Added include/grub/efi/console.h,
9514 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9515 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9517 * include/grub/efi/console.h: New file.
9518 * include/grub/efi/time.h: Likewise.
9519 * include/grub/i386/efi/kernel.h: Likewise.
9520 * kern/efi/init.c: Likewise.
9521 * kern/efi/mm.c: Likewise.
9522 * term/efi/console.c: Likewise.
9524 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9525 (grub_stop): Removed.
9526 (grub_get_rtc): Likewise.
9527 (grub_machine_init): Simply call grub_efi_init.
9528 (grub_machine_fini): Call grub_efi_fini.
9530 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9531 (grub_efi_output_string): Removed.
9532 (grub_efi_stall): New function.
9533 (grub_stop): Likewise.
9534 (grub_get_rtc): Likewise.
9536 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9537 (grub_efi_stall): New prototype.
9538 (grub_efi_allocate_pages): Likewise.
9539 (grub_efi_free_pages): Likewise.
9540 (grub_efi_get_memory_map): Likewise.
9541 (grub_efi_mm_init): Likewise.
9542 (grub_efi_mm_fini): Likewise.
9543 (grub_efi_init): Likewise.
9544 (grub_efi_fini): Likewise.
9546 * include/grub/i386/efi/time.h: Do not include
9547 grub/symbol.h. Include grub/efi/time.h.
9548 (GRUB_TICKS_PER_SECOND): Removed.
9549 (grub_get_rtc): Likewise.
9551 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9552 Added padding. The EFI spec is buggy.
9553 (GRUB_EFI_BLACK): New macro.
9554 (GRUB_EFI_BLUE): Likewise.
9555 (GRUB_EFI_GREEN): Likewise.
9556 (GRUB_EFI_CYAN): Likewise.
9557 (GRUB_EFI_RED): Likewise.
9558 (GRUB_EFI_MAGENTA): Likewise.
9559 (GRUB_EFI_BROWN): Likewise.
9560 (GRUB_EFI_LIGHTGRAY): Likewise.
9561 (GRUB_EFI_BRIGHT): Likewise.
9562 (GRUB_EFI_DARKGRAY): Likewise.
9563 (GRUB_EFI_LIGHTBLUE): Likewise.
9564 (GRUB_EFI_LIGHTGREEN): Likewise.
9565 (GRUB_EFI_LIGHTCYAN): Likewise.
9566 (GRUB_EFI_LIGHTRED): Likewise.
9567 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9568 (GRUB_EFI_YELLOW): Likewise.
9569 (GRUB_EFI_WHITE): Likewise.
9570 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9571 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9572 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9573 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9574 (GRUB_EFI_BACKGROUND_RED): Likewise.
9575 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9576 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9577 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9578 (GRUB_EFI_TEXT_ATTR): Likewise.
9580 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9581 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9582 (kernel_mod_HEADERS): Added efi/time.h.
9584 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9586 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9587 include/grub/efi/api.h, include/grub/efi/console_control.h,
9588 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9589 include/grub/i386/efi/time.h, kern/efi/efi.c,
9590 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9591 and util/i386/efi/grub-mkimage.c.
9593 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9595 * genmk.rb (PModule#rule): Do not export symbols if
9596 #{prefix}_EXPORTS is set to "no".
9598 * conf/i386-efi.mk: New file.
9599 * conf/i386-efi.rmk: Likewise.
9600 * include/grub/efi/api.h: Likewise.
9601 * include/grub/efi/console_control.h: Likewise.
9602 * include/grub/efi/efi.h: Likewise.
9603 * include/grub/efi/pe32.h: Likewise.
9604 * include/grub/i386/efi/time.h: Likewise.
9605 * kern/efi/efi.c: Likewise.
9606 * kern/i386/efi/init.c: Likewise.
9607 * kern/i386/efi/startup.S: Likewise.
9608 * util/i386/efi/grub-mkimage.c: Likewise.
9610 2006-04-17 Marco Gerards <marco@gnu.org>
9612 * include/grub/script.h: Include <grub/parser.h> and
9613 "grub_script.tab.h".
9614 (struct grub_lexer_param): New struct.
9615 (struct grub_parser_param): Likewise.
9616 (grub_script_create_arglist): Pass the state in an argument.
9617 (grub_script_add_arglist): Likewise.
9618 (grub_script_create_cmdline): Likewise.
9619 (grub_script_create_cmdblock): Likewise.
9620 (grub_script_create_cmdif): Likewise.
9621 (grub_script_create_cmdmenu): Likewise.
9622 (grub_script_add_cmd): Likewise.
9623 (grub_script_arg_add): Likewise.
9624 (grub_script_lexer_ref): Likewise.
9625 (grub_script_lexer_deref): Likewise.
9626 (grub_script_lexer_record_start): Likewise.
9627 (grub_script_lexer_record_stop): Likewise.
9628 (grub_script_mem_record): Likewise.
9629 (grub_script_mem_record_stop): Likewise.
9630 (grub_script_malloc): Likewise.
9631 (grub_script_yylex): Likewise.
9632 (grub_script_yyparse): Likewise.
9633 (grub_script_yyerror): Likewise.
9634 (grub_script_yylex): Likewise.
9635 (grub_script_lexer_init): Return the state.
9637 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9638 (grub_script_lexer_done): Likewise.
9639 (grub_script_lexer_getline): Likewise.
9640 (grub_script_lexer_refs): Likewise.
9642 (newscript): Likewise.
9644 (recording): Likewise.
9645 (recordpos): Likewise.
9646 (recordlen): Likewise.
9647 (grub_script_lexer_init): Return the state instead of setting
9649 (grub_script_lexer_ref): Use the newly added argument for state
9651 (grub_script_lexer_deref): Likewise.
9652 (grub_script_lexer_record_start): Likewise.
9653 (grub_script_lexer_record_stop): Likewise.
9654 (recordchar): Likewise.
9655 (nextchar): Likewise.
9656 (grub_script_yylex2): Likewise.
9657 (grub_script_yylex): Likewise.
9658 (grub_script_yyerror): Likewise.
9660 * normal/parser.y (func_mem): Removed variable.
9661 (menu_entry): Likewise.
9663 (%lex-param): New parser option.
9664 (%parse-param): Likewise.
9665 (script): Always return the AST.
9666 (argument): Pass the state around.
9667 (arguments): Likewise.
9668 (grubcmd): Likewise.
9669 (commands): Likewise.
9670 (function): Likewise.
9671 (menuentry): Likewise.
9672 (if_statement): Likewise.
9675 * normal/script.c (grub_script_memused): Removed variable.
9676 (grub_script_parsed): Likewise.
9677 (grub_script_malloc): Added a state argument. Use that instead of
9679 (grub_script_mem_record): Likewise.
9680 (grub_script_mem_record_stop): Likewise.
9681 (grub_script_arg_add): Likewise.
9682 (grub_script_add_arglist): Likewise.
9683 (grub_script_create_cmdline): Likewise.
9684 (grub_script_create_cmdif): Likewise.
9685 (grub_script_create_cmdmenu): Likewise.
9686 (grub_script_add_cmd): Likewise.
9687 (grub_script_parse): Setup the state before calling the parser.
9689 2006-04-16 Marco Gerards <marco@gnu.org>
9691 * normal/command.c (grub_command_init): Remove the title command.
9693 * normal/lexer.c (grub_script_yylex): Renamed from this...
9694 (grub_script_yylex2): ... to this.
9695 (grub_script_yylex): New function. Temporary
9696 introduced to filter some tokens.
9697 (grub_script_yyerror): Print a newline.
9699 * normal/main.c (read_config_file): Output information about the
9700 lines that contain errors. Wait for a key after all lines have
9701 been processed. Don't return an empty menu.
9703 * normal/parser.y (func_mem): Don't initialize.
9704 (menu_entry): Likewise.
9705 (err): New variable.
9706 (script): Don't return anything when an error was encountered.
9707 (ws, returns): Removed rules.
9708 (argument): Disabled concatenated variable support.
9709 (arguments): Remove explicit separators.
9710 (grubcmd): Likewise.
9711 (function): Likewise.
9712 (menuentry): Likewise.
9714 (commands): Likewise. Add error handling.
9716 * normal/script.c (grub_script_create_cmdline): If
9717 `grub_script_parsed' is 0, assume the parser encountered an error.
9719 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9721 * configure.ac: Add support for EFI. Fix the typo
9722 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9724 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9726 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9727 foreign multibyte characters should be shown correctly.
9729 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9731 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9733 (read_config_file): Made it to close file before returning.
9735 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9737 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9738 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9739 video/i386/pc/vbefill.c.
9741 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9742 video/i386/pc/vbefill.c.
9744 * include/grub/video.h (grub_video_blit_format): New enum.
9745 (grub_video_mode_info): Added new member blit_format.
9746 (grub_video_get_blit_format): New function prototype.
9748 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9750 (grub_video_vbe_map_rgb): Likewise.
9751 (grub_video_vbe_unmap_color): Likewise.
9753 * include/grub/i386/pc/vbeblit.h: New file.
9755 * include/grub/i386/pc/vbefill.h: New file.
9757 * video/video.c (grub_video_get_blit_format): New function.
9758 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9759 (grub_video_vbe_map_rgb): Likewise.
9760 (grub_video_vbe_unmap_color): Likewise.
9762 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9764 (grub_video_vbe_blit_render_target): Changed to use more optimized
9766 (grub_video_vbe_setup): Added detection for optimized settings.
9767 (grub_video_vbe_create_render_target): Likewise.
9769 * video/i386/pc/vbeblit.c: New file.
9771 * video/i386/pc/vbefill.c: New file.
9773 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9775 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9778 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9779 parsing to support both hex and dec ranges. If filename was missing
9780 show usage information.
9782 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9784 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9785 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9787 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9788 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9789 (video_mod_SOURCES): Added.
9790 (video_mod_CFLAGS): Likewise.
9791 (video_mod_LDFLAGS): Likewise.
9792 (gfxterm_mod_SOURCES): Likewise.
9793 (gfxterm_mod_CFLAGS): Likewise.
9794 (gfxterm_mod_LDFLAGS): Likewise.
9795 (videotest_mod_SOURCES): Likewise.
9796 (videotest_mod_CFLAGS): Likewise.
9797 (videotest_mod_LDFLAGS): Likewise.
9798 (vesafb_mod_SOURCES): Removed.
9799 (vesafb_mod_CFLAGS): Likewise.
9800 (vesafb_mod_LDFLAGS): Likewise.
9801 (vga_mod_SOURCES): Likewise.
9802 (vga_mod_CFLAGS): Likewise.
9803 (vga_mod_LDFLAGS): Likewise.
9805 * commands/videotest.c: New file.
9807 * font/manager.c (fill_with_default_glyph): Modified to use
9809 (grub_font_get_glyph): Likewise.
9810 (fontmanager): Renamed from this...
9811 (font_manager): ... to this.
9813 * include/grub/font.h (grub_font_glyph): Added new structure.
9814 (grub_font_get_glyph): Modified to use grub_font_glyph.
9816 * include/grub/misc.h (grub_abs): Added as inline function.
9818 * include/grub/video.h: New file.
9820 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9821 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9822 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9823 (grub_vbe_get_controller_info): Renamed from this...
9824 (grub_vbe_bios_get_controller_info): ... to this.
9825 (grub_vbe_get_mode_info): Renamed from this...
9826 (grub_vbe_bios_get_mode_info): ... to this.
9827 (grub_vbe_set_mode): Renamed from this...
9828 (grub_vbe_bios_set_mode): ... to this.
9829 (grub_vbe_get_mode): Renamed from this...
9830 (grub_vbe_bios_get_mode): ... to this.
9831 (grub_vbe_set_memory_window): Renamed from this...
9832 (grub_vbe_bios_set_memory_window): ... to this.
9833 (grub_vbe_get_memory_window): Renamed from this...
9834 (grub_vbe_bios_get_memory_window): ... to this.
9835 (grub_vbe_set_scanline_length): Renamed from this...
9836 (grub_vbe_set_scanline_length): ... to this.
9837 (grub_vbe_get_scanline_length): Renamed from this...
9838 (grub_vbe_bios_get_scanline_length): ... to this.
9839 (grub_vbe_set_display_start): Renamed from this...
9840 (grub_vbe_bios_set_display_start): ... to this.
9841 (grub_vbe_get_display_start): Renamed from this...
9842 (grub_vbe_bios_get_display_start): ... to this.
9843 (grub_vbe_set_palette_data): Renamed from this...
9844 (grub_vbe_bios_set_palette_data): ... to this.
9845 (grub_vbe_set_pixel_rgb): Removed.
9846 (grub_vbe_set_pixel_index): Likewise.
9848 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9850 (grub_vbe_bios_get_controller_info): ... to this.
9851 (grub_vbe_get_mode_info): Renamed from this...
9852 (grub_vbe_bios_get_mode_info): ... to this.
9853 (grub_vbe_set_mode): Renamed from this...
9854 (grub_vbe_bios_set_mode): ... to this.
9855 (grub_vbe_get_mode): Renamed from this...
9856 (grub_vbe_bios_get_mode): ... to this.
9857 (grub_vbe_set_memory_window): Renamed from this...
9858 (grub_vbe_bios_set_memory_window): ... to this.
9859 (grub_vbe_get_memory_window): Renamed from this...
9860 (grub_vbe_bios_get_memory_window): ... to this.
9861 (grub_vbe_set_scanline_length): Renamed from this...
9862 (grub_vbe_set_scanline_length): ... to this.
9863 (grub_vbe_get_scanline_length): Renamed from this...
9864 (grub_vbe_bios_get_scanline_length): ... to this.
9865 (grub_vbe_set_display_start): Renamed from this...
9866 (grub_vbe_bios_set_display_start): ... to this.
9867 (grub_vbe_get_display_start): Renamed from this...
9868 (grub_vbe_bios_get_display_start): ... to this.
9869 (grub_vbe_set_palette_data): Renamed from this...
9870 (grub_vbe_bios_set_palette_data): ... to this.
9871 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9872 getting corrupted after calling it. Added more pushes and pops.
9873 (grub_vbe_bios_set_mode): Likewise.
9874 (grub_vbe_bios_get_mode): Likewise.
9875 (grub_vbe_bios_get_memory_window): Likewise.
9876 (grub_vbe_bios_set_scanline_length): Likewise.
9877 (grub_vbe_bios_get_scanline_length): Likewise.
9878 (grub_vbe_bios_get_display_start): Likewise.
9879 (grub_vbe_bios_set_palette_data): Likewise.
9881 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9882 (cl_insert): Likewise.
9883 (cl_delete): Likewise.
9885 * term/gfxterm.c: New file.
9887 * term/i386/pc/vesafb.c: Removed file.
9889 * video/video.c: New file.
9891 * video/i386/pc/vbe.c (real2pm): Added new function.
9892 (grub_video_vbe_draw_pixel): Likewise.
9893 (grub_video_vbe_get_video_ptr): Likewise.
9894 (grub_video_vbe_get_pixel): Likewise
9895 (grub_video_vbe_init): Likewise.
9896 (grub_video_vbe_fini): Likewise.
9897 (grub_video_vbe_setup): Likewise.
9898 (grub_video_vbe_get_info): Likewise.
9899 (grub_video_vbe_set_palette): Likewise.
9900 (grub_video_vbe_get_palette): Likewise.
9901 (grub_video_vbe_set_viewport): Likewise.
9902 (grub_video_vbe_get_viewport): Likewise.
9903 (grub_video_vbe_map_color): Likewise.
9904 (grub_video_vbe_map_rgb): Likewise.
9905 (grub_video_vbe_map_rgba): Likewise.
9906 (grub_video_vbe_unmap_color): Likewise.
9907 (grub_video_vbe_fill_rect): Likewise.
9908 (grub_video_vbe_blit_glyph): Likewise.
9909 (grub_video_vbe_blit_bitmap): Likewise.
9910 (grub_video_vbe_blit_render_target): Likewise.
9911 (grub_video_vbe_scroll): Likewise.
9912 (grub_video_vbe_swap_buffers): Likewise.
9913 (grub_video_vbe_create_render_target): Likewise.
9914 (grub_video_vbe_delete_render_target): Likewise.
9915 (grub_video_vbe_set_active_render_target): Likewise.
9916 (grub_vbe_set_pixel_rgb): Remove function.
9917 (grub_vbe_set_pixel_index): Likewise.
9918 (index_color_mode): Remove static variable.
9919 (active_mode): Likewise.
9920 (framebuffer): Likewise.
9921 (bytes_per_scan_line): Likewise.
9922 (grub_video_vbe_adapter): Added new static variable.
9923 (framebuffer): Likewise.
9924 (render_target): Likewise.
9925 (initial_mode): Likewise.
9926 (mode_in_use): Likewise.
9927 (mode_list): Likewise.
9929 2006-03-10 Marco Gerards <marco@gnu.org>
9931 * configure.ac (AC_INIT): Bumped to 1.93.
9933 * DISTLIST: Added `include/grub/hfs.h'.
9935 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9937 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9938 18H, which might help the BIOS falling back to next boot media.
9940 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9942 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9943 Poe Chen <poe.poechen@gmail.com>.
9945 2006-01-17 Marco Gerards <marco@gnu.org>
9947 * include/grub/normal.h: Include <grub/script.h>.
9948 (grub_command_list): Removed struct.
9949 (grub_command_list_t): Removed type.
9950 (grub_menu_entry): Remove members `num' and `command_list'. Add
9951 members `commands' and `sourcecode'.
9952 * include/grub/script.h: Add inclusion guards.
9953 (grub_script_cmd_menuentry): New struct.
9954 (grub_script_execute_menuentry): New prototype.
9955 (grub_script_lexer_record_start): Likewise.
9956 (grub_script_lexer_record_stop): Likewise.
9957 * normal/execute.c (grub_script_execute_menuentry): New function.
9958 * normal/lexer.c (record, recording, recordpos, recordlen): New
9960 (grub_script_lexer_record_start): New function.
9961 (grub_script_lexer_record_stop): Likewise.
9962 (recordchar): Likewise.
9963 (nextchar): Likewise.
9964 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9965 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9966 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9967 (current_menu): New variable.
9968 (free_menu): Mainly rewritten.
9969 (grub_normal_menu_addentry): New function.
9970 (read_config_file): Rewritten.
9971 * normal/menu.c (run_menu_entry): Mainly rewritten.
9972 * normal/menu_entry.c (make_screen): Rewritten the code to insert
9974 (run): Mainly rewritten.
9975 * normal/parser.y (menu_entry): New variable.
9976 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9977 (menuentry): New rule.
9978 (command): Add `menuentry'.
9979 (if_statement): Allow additional returns before `fi'.
9980 * normal/script.c (grub_script_create_cmdmenu): New function.
9982 2006-01-03 Marco Gerards <marco@gnu.org>
9984 * INSTALL: GNU Bison is required.
9985 * configure.ac: Rewritten the test to detect Bison.
9986 * Makefile.in (YACC): New variable. Reported by Xun Sun
9987 <xun.sun.cn@gmail.com>.
9989 2006-01-03 Marco Gerards <marco@gnu.org>
9991 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9992 the HFS+ filesystem to filesystem blocks.
9993 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9994 GCC warning is silenced.
9996 2006-01-03 Marco Gerards <marco@gnu.org>
9998 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9999 read from disk from big endian to host byte order.
10001 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
10003 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
10005 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10006 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10007 embedded HFS+ filesystem.
10008 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10009 (grub_hfs_sblock): Move from here...
10010 * include/grub/hfs.h: To here... New file.
10011 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
10013 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10015 (grub_hfsplus_volheader): Change type of member `magic' to
10017 (grub_hfsplus_data): Add new member `embedded_offset'.
10018 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10020 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10021 Calculate the offset.
10023 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10025 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10027 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10029 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10031 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10032 ENV->NAME is NULL after allocating ENV->VALUE.
10034 2005-12-25 Marco Gerards <marco@gnu.org>
10036 * kern/env.c (grub_env_set): Rewritten the error handling code.
10038 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10040 * geninit.sh: Made more robust, and more portable.
10042 2005-12-25 Marco Gerards <marco@gnu.org>
10044 Add support for Apple HFS+ filesystems.
10046 * fs/hfsplus.c: New file.
10048 * DISTLIST: Added `fs/hfsplus.c'.
10050 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10051 (hfsplus_mod_SOURCES): New variable.
10052 (hfsplus_mod_CFLAGS): Likewise.
10053 (hfsplus_mod_LDFLAGS): Likewise.
10054 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10055 (grub_setup_SOURCES): Likewise.
10056 (grub_mkdevicemap_SOURCES): Likewise.
10057 (grub_emu_SOURCES): Likewise.
10058 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10060 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10062 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10064 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10066 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10067 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10068 include/grub/parser.h, include/grub/script.h, kern/parser.c,
10069 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10070 normal/lexer.c, normal/parser.y, normal/script.c, and
10072 Removed kern/sparc64/cache.c.
10074 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10075 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10078 * configure.ac (AC_INIT): Bumped to 1.92.
10080 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
10082 * kern/err.c (grub_error_push): Added new function to support error
10084 (grub_error_pop): Likewise.
10085 (grub_error_stack_items): New local variable to support error stacks.
10086 (grub_error_stack_pos): Likewise.
10087 (grub_error_stack_assert): Likewise.
10088 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10090 (grub_print_error): Added support to print errors from error stack.
10092 * include/grub/err.h (grub_error_push): Added function prototype.
10093 (grub_error_pop): Likewise.
10095 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
10097 * configure.ac: Accept `powerpc64' as host_cpu.
10098 (amd64): Rename to `biarch32'.
10100 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10101 non-cacheline-aligned addresses.
10103 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10104 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
10105 if `size' is non-zero.
10107 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
10109 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10110 and `cd' to make sure the filename is not prefixed with a
10112 (pkgdata_MODULES): Add `gpt.mod'.
10113 (gpt_mod_SOURCES): New variable.
10114 (gpt_mod_CFLAGS): Likewise.
10115 (gpt_mod_LDFLAGS): Likewise.
10117 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10119 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10122 * partmap/gpt.c: New file.
10124 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10125 GPT partition map is detected.
10127 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10129 * commands/i386/pc/play.c: New file.
10130 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10131 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10134 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
10136 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10137 ((unused))' to silence gcc warning.
10139 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10141 * configure.ac: Correct `AC_PROG_YACC' test.
10143 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10145 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10146 check before installing files.
10148 2005-11-22 Mike Small <smallm@panix.com>
10150 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10151 number regex so multidigit numbers are recognized correctly.
10153 2005-11-22 Mike Small <smallm@panix.com>
10155 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10156 debugging message before attempting to claim memory.
10157 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10158 multiple addresses in case of failure.
10160 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10162 * term/tparm.c (get_space): Remove empty `if' statement.
10164 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10166 * kern/parser.c (check_varstate): Rename `state' to 's'.
10168 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10170 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10171 variable definitions to the beginning of each function. Sort stack
10173 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10174 `buf' argument to `char *'.
10176 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10178 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10179 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10180 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10181 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10182 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10183 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10184 configfile.mod, search.mod, gzio.mod and test.mod.
10185 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10186 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10187 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10188 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10189 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10190 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10191 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10192 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10193 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10194 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10195 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10196 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10197 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10198 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10199 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10200 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10201 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10202 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10203 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10204 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10205 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10206 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10207 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10209 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10211 (pkgdata_MODULES): Add test.mod.
10213 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10215 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10216 appending to variables with "+=".
10217 (PModule): Use full pathname to generate *.lst filenames.
10219 * Makefile.in: Fixed list rules moved from genmk.rb.
10220 (.DELETE_ON_ERROR): New special target.
10221 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10223 * conf/i386-pc.rmk: Include conf/common.mk.
10224 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10225 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10226 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10227 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10228 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10229 configfile.mod, search.mod, gzio.mod and test.mod.
10230 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10231 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10232 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10233 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10234 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10235 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10236 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10237 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10238 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10239 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10240 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10241 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10242 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10243 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10244 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10245 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10246 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10247 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10248 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10249 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10250 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10251 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10252 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10254 * conf/common.rmk: ... to here. New file.
10256 * conf/common.mk: New file.
10258 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10260 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10261 (grub_script.tab.c): ... here.
10263 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10264 (grub_script.tab.c): ... here.
10266 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10267 (grub_script.tab.c): ... here.
10269 * normal/command.c (grub_command_find): Fixed a memory leak of
10270 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10272 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10274 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10275 "@" which marks the start of a comment on ARM.
10276 (VARIABLE): Likewise.
10278 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10280 Add support for Linux/ADFS partition tables.
10282 * partmap/acorn.c: New file.
10284 * include/grub/acorn_filecore.h: Likewise.
10286 * DISTLIST: Added `partmap/acorn.c' and
10287 `include/grub/acorn_filecore.h'.
10289 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10291 (pkgdata_MODULES): Add `acorn.mod'.
10292 (acorn_mod_SOURCES): New variable.
10293 (acorn_mod_CFLAGS): Likewise.
10295 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10297 (pkgdata_MODULES): Add `acorn.mod'.
10298 (acorn_mod_SOURCES): New variable.
10299 (acorn_mod_CFLAGS): Likewise.
10301 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10302 (pkgdata_MODULES): Add `acorn.mod'.
10303 (acorn_mod_SOURCES): New variable.
10304 (acorn_mod_CFLAGS): Likewise.
10305 (acorn_mod_LDFLAGS): Likewise.
10307 * include/types.h (grub_disk_addr_t): New typedef.
10309 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
10311 * geninit.sh: New file.
10313 * geninitheader.sh: Likewise.
10315 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10316 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10317 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10318 * commands/configfile.c (grub_configfile_init)
10319 (grub_configfile_fini): Likewise.
10320 * commands/default.c (grub_default_init, grub_default_fini):
10322 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10323 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10324 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10325 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10327 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10328 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10330 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
10331 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
10333 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10335 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
10337 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10338 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10339 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10340 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10341 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10342 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10343 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10344 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10345 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10346 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10347 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10348 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10349 * partmap/amiga.c (grub_amiga_partition_map_init)
10350 (grub_amiga_partition_map_fini): Likewise.
10351 * partmap/apple.c (grub_apple_partition_map_init)
10352 (grub_apple_partition_map_fini): Likewise.
10353 * partmap/pc.c (grub_pc_partition_map_init)
10354 (grub_pc_partition_map_fini): Likewise.
10355 * partmap/sun.c (grub_sun_partition_map_init,
10356 grub_sun_partition_map_fini): Likewise.
10357 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10360 * util/grub-emu.c: Include <grub_modules_init.h>.
10361 (main): Don't initialize and de-initialize any modules directly,
10362 use `grub_init_all' and `grub_fini_all' instead.
10364 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10365 `grub_vesafb_mod_init'.
10366 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10368 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10369 `grub_vga_mod_init'. Updated all users.
10370 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
10372 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10373 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10376 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10377 Generate a function to initialize the module in utilities.
10378 Updated all callers.
10379 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10380 initialize the module in utilities. Updated all callers.
10382 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10384 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10385 escape sequence and a literal ^L to clear the screen.
10387 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10388 when returning from Open Firmware.
10390 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10392 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10393 (grub_ofconsole_height): Likewise.
10394 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10395 manually insert a '\n'.
10396 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10397 `grub_ofconsole_height'. Return early if these are already set.
10399 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10401 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10402 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10403 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10404 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10405 and `normal/script.c'.
10406 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10407 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10408 (test_mod_SOURCES): New variable.
10409 (test_mod_CFLAGS): Likewise.
10410 (test_mod_LDFLAGS): Likewise.
10411 (pkgdata_MODULES): Add `test.mod'.
10412 (grub_script.tab.c): New rule.
10413 (grub_script.tab.h): Likewise.
10415 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
10417 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10418 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10419 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10420 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10421 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10422 (test_mod_SOURCES): New variable.
10423 (test_mod_CFLAGS): Likewise.
10424 (pkgdata_MODULES): Add `test.mod'.
10425 (grub_script.tab.c): New rule.
10426 (grub_script.tab.h): Likewise.
10428 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
10430 Add initial scripting support.
10432 * commands/test.c: New file.
10433 * include/grub/script.h: Likewise.
10434 * normal/execute.c: Likewise.
10435 * normal/function.c: Likewise.
10436 * normal/lexer.c: Likewise.
10437 * normal/parser.y: Likewise.
10438 * normal/script.c: Likewise.
10440 * configure.ac: Add `AC_PROG_YACC' test.
10442 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10443 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10444 `normal/function.c' and `normal/script.c'.
10445 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10446 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10447 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10449 (pkgdata_MODULES): Add `test.mod'.
10450 (grub_script.tab.c): New rule.
10451 (grub_script.tab.h): Likewise.
10453 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10455 * include/grub/normal.h (grub_test_init): New prototype.
10456 (grub_test_fini): Likewise.
10458 * normal/command.c: Include <grub/script.h>.
10459 (grub_command_execute): Rewritten.
10461 * util/grub-emu.c (main): Call `grub_test_init' and
10464 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10466 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10468 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10469 there are no pending characters.
10471 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10473 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10474 `grub_strndup' to drop device arguments. Replace unnecessary
10475 `grub_strndup' with `grub_strdup'.
10477 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10479 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10480 `debug' environment variable has been set.
10482 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
10484 * Makefile.in (install-local): Use $(DATA).
10485 (uninstall): Likewise.
10486 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10487 (sbin_UTILITIES): ... to here.
10488 (sbin_SCRIPTS): New variable.
10489 (grub_install_SOURCES): New variable.
10490 * util/powerpc/ieee1275/grub-install.in: New file.
10491 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10493 (add_segments): Call `grub_util_get_path'.
10495 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10497 From Timothy Baldwin:
10498 * commands/ls.c (grub_ls_list_files): Close FILE with
10500 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10502 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
10504 * include/grub/parser.h: New file.
10506 * kern/parser.c: Likewise.
10508 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10509 (grub_setup_SOURCES): Likewise.
10510 (grub_probefs_SOURCES): Likewise.
10511 (grub_emu_SOURCES): Likewise.
10512 (kernel_img_HEADERS): Add `parser.h'.
10514 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10515 (grub_emu_SOURCES): Add `kern/parser.c'.
10516 (grubof_SOURCES): Likewise.
10518 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10519 (grubof_SOURCES): Add `kern/parser.c'.
10521 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10523 * kern/misc.c (grub_split_cmdline): Removed function.
10525 * kern/rescue.c: Include <grub/parser.h>.
10526 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10527 of `grub_split_cmdline'.
10529 * normal/command.c: Include <grub/parser.h>.
10530 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10531 of `grub_split_cmdline'.
10533 * normal/completion.c: Include <grub/parser.h>.
10534 (cmdline_state): New variable.
10535 (iterate_dir): End the filename with a quote depending on the
10536 command line state.
10537 (get_state): new function.
10538 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10539 split the arguments and determine the current argument. When the
10540 argument string is not quoted, escape all spaces.
10542 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10544 * normal/sparc64/setjmp.S: New file.
10546 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10548 * include/grub/sparc64/libgcc.h: New file.
10549 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10550 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10551 normal/sparc64/setjmp.c.
10553 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10555 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10556 * kern/sparc64/cache.S: New file.
10557 * kern/sparc64/cache.c: Removed.
10558 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10559 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10561 (COMMON_LDFLAGS): Add -melf64_sparc.
10562 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10563 (grubof_SOURCES): Use cache.S instead of cache.c.
10564 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10565 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10566 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10568 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10569 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10570 (linux_mod_CFLAGS): Commented out.
10571 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10572 out because module isn't built.
10573 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10574 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10575 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10576 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10577 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10578 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10579 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10580 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10581 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10582 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10583 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10584 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10585 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10586 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10588 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10590 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10591 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10592 longer, because HFS should not be used on PC.
10594 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10596 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10597 consistently within the loop.
10599 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
10601 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10602 directory can not be read.
10604 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10606 * configure.ac (AC_INIT): Increase the version number to 1.91.
10608 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10609 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10610 term/i386/pc/serial.c.
10612 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10614 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10615 file size must be permitted.
10617 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10618 between %ah and %al.
10620 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10622 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10624 Call the hook with a NUL-terminated filename.
10625 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10628 * kern/term.c (cursor_state): New variable.
10629 (grub_term_set_current): Reset the cursor state on a new
10631 (grub_setcursor): Rewritten to use CURSOR_STATE.
10632 (grub_getcursor): New function.
10634 * include/grub/term.h (grub_getcursor): New prototype.
10636 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10637 integers on ARM. Reported by Timothy Baldwin
10638 <T.E.Baldwin99@members.leeds.ac.uk>.
10640 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
10642 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10644 (grub_sfs_dir): Likewise.
10646 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
10648 Add support for the SFS filesystem.
10650 * fs/sfs.c: New file.
10652 * DISTLIST: Added `fs/sfs.c'.
10654 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10655 (grub_probefs_SOURCES): Likewise.
10656 (grub_emu_SOURCES): Likewise.
10657 (pkgdata_MODULES): Add `sfs.mod'.
10658 (sfs_mod_SOURCES): New variable.
10659 (sfs_mod_CFLAGS): Likewise.
10660 (sfs_mod_LDFLAGS): Likewise.
10662 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10663 (pkgdata_MODULES): Add `sfs.mod'.
10664 (sfs_mod_SOURCES): New variable.
10665 (sfs_mod_CFLAGS): Likewise.
10667 * util/grub-emu.c (main): Call `grub_sfs_init' and
10670 * include/grub/fs.h (grub_sfs_init): New prototype.
10671 (grub_sfs_fini): Likewise.
10673 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
10675 Add support for the AFFS filesystem.
10677 * fs/affs.c: New file.
10679 * DISTLIST: Added `fs/affs.c'.
10681 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10682 (grub_probefs_SOURCES): Likewise.
10683 (grub_emu_SOURCES): Likewise.
10684 (pkgdata_MODULES): Add `affs.mod'.
10685 (affs_mod_SOURCES): New variable.
10686 (affs_mod_CFLAGS): Likewise.
10687 (affs_mod_LDFLAGS): Likewise.
10689 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10690 (pkgdata_MODULES): Add `affs.mod'.
10691 (affs_mod_SOURCES): New variable.
10692 (affs_mod_CFLAGS): Likewise.
10694 * util/grub-emu.c (main): Call `grub_affs_init' and
10697 * include/grub/fs.h (grub_affs_init): New prototype.
10698 (grub_affs_fini): Likewise.
10700 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10702 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10704 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10706 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10709 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10712 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10713 (COMMON_LDFLAGS): New variable.
10714 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10715 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10716 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10717 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10718 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10719 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10720 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10721 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10722 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10723 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10724 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10725 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10726 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10727 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10728 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10730 (normal_mod_ASFLAGS): Add `-m32'.
10732 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10733 (grub_host_size_t, grub_host_ssize_t): New types.
10734 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10735 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10736 `GRUB_HOST_SIZEOF_VOID_P'.
10738 * include/grub/kernel.h (struct grub_module_header): Type of
10739 member offset changed to `grub_host_off_t'. Type of member size
10740 changed to `grub_host_size_t'.
10741 (struct grub_module_info): Type of member offset changed to
10742 `grub_host_off_t'. Type of member size changed to
10743 `grub_host_size_t'.
10745 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10747 Make GRUB's kernel compliant to Multiboot Specification.
10749 * kern/i386/pc/startup.S (multiboot_header): New label.
10750 (multiboot_entry): Likewise.
10751 (multiboot_trampoline): Likewise.
10753 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10754 Increased to 0x4A0.
10756 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10757 put parentheses after a question mark.
10758 [!GRUB_UTIL] (my_mod): New variable.
10760 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10762 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
10764 Adds support for the XFS filesystem. Btrees are not supported
10767 * fs/xfs.c: New file.
10769 * DISTLIST: Added `fs/xfs.c'.
10771 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10772 (grub_probefs_SOURCES): Likewise.
10773 (grub_emu_SOURCES): Likewise.
10774 (pkgdata_MODULES): Add `xfs.mod'.
10775 (xfs_mod_SOURCES): New variable.
10776 (xfs_mod_CFLAGS): Likewise.
10778 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10779 (pkgdata_MODULES): Add `xfs.mod'.
10780 (xfs_mod_SOURCES): New variable.
10781 (xfs_mod_CFLAGS): Likewise.
10783 * util/grub-emu.c (main): Call `grub_xfs_init' and
10786 * include/grub/fs.h (grub_xfs_init): New prototype.
10787 (grub_xfs_fini): Likewise.
10790 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10792 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10793 color modes, allow greater than 16 colors to be configured as
10796 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10798 * normal/completion.c (complete_arguments): Add the qualifier
10799 const into OPTIONS.
10801 From Omniflux <omniflux+lists@omniflux.com>:
10802 * include/grub/terminfo.h: New file.
10803 * include/grub/tparm.h: Likewise.
10804 * include/grub/i386/pc/serial.h: Likewise.
10805 * term/terminfo.c: Likewise.
10806 * term/tparm.c: Likewise.
10807 * term/i386/pc/serial.c: Likewise.
10808 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10810 (terminfo_mod_SOURCES): New variable.
10811 (terminfo_mod_CFLAGS): Likewise.
10812 (serial_mod_SOURCES): Likewise.
10813 (serial_mod_CFLAGS): Likewise.
10815 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10817 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10818 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10819 and kern/powerpc/ieee1275/cmain.c, respectively.
10821 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10822 * kern/powerpc/ieee1275/crt0.S: ... here.
10824 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10825 * kern/powerpc/ieee1275/cmain.c: ... here.
10827 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10828 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10829 instead of boot/powerpc/ieee1275/crt0.S and
10830 boot/powerpc/ieee1275/cmain.c, respectively.
10832 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10833 sectors. It was not used anyway.
10835 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10837 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10838 `unused parameter' warning.
10840 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10842 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10844 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10847 2005-08-28 Marco Gerards <metgerards@student.han.nl>
10849 * include/grub/normal.h (enum grub_completion_type): Added
10850 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10852 * normal/cmdline.c (print_completion): Handle
10853 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10854 * normal/menu_entry.c (store_completion): Likewise.
10856 * normal/completion.c (complete_arguments): New function.
10857 (grub_normal_do_completion): Call `complete_arguments' when the
10858 current words start with a dash.
10860 2005-08-27 Marco Gerards <metgerards@student.han.nl>
10862 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10863 `gzio.mod' instead of `io.mod').
10865 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10867 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10868 (DISTDIRS): Added io and video.
10869 Rewrite the search routine to make an output consistently.
10871 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10872 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10873 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10874 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10875 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10876 util/powerpc/ieee1275/misc.c.
10878 * include/grub/gzio.h: New file.
10879 * io/gzio.c: Likewise.
10881 * kern/file.c (grub_file_close): Call grub_device_close only if
10882 FILE->DEVICE is not NULL.
10884 * include/grub/mm.h [!NULL] (NULL): New macro.
10886 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10888 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10889 (pkgdata_MODULES): Added gzio.mod.
10890 (gzio_mod_SOURCES): New variable.
10891 (gzio_mod_CFLAGS): Likewise.
10893 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10894 (pkgdata_MODULES): Added gzio.mod.
10895 (gzio_mod_SOURCES): New variable.
10896 (gzio_mod_CFLAGS): Likewise.
10898 * commands/cat.c: Include grub/gzio.h.
10899 (grub_cmd_cat): Use grub_gzfile_open instead of
10902 * commands/cmp.c: Include grub/gzio.h.
10903 (grub_cmd_cmp): Use grub_gzfile_open instead of
10906 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10907 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10909 (grub_rescue_cmd_module): Likewise.
10911 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10913 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10914 kern/sparc64/ieee1275/init.c because it contains _start.
10915 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10917 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10919 * configure.ac: Add support for sparc64 host with ieee1275
10921 * configure: Generated from configure.ac.
10922 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10924 (grub_ofdisk_read): Likewise.
10925 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10926 pointers as (void *) to remove a warning.
10927 (grub_ofdisk_close): Likewise.
10928 (grub_ofdisk_read): Likewise.
10929 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10930 returns, so make it return void to remove a warning.
10931 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10932 Corresponding prototype change.
10933 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10934 values, and cast the pointers as (void *) to remove a warning.
10935 (grub_mm_dump): Likewise.
10936 * conf/sparc64-ieee1275.mk: New file.
10937 * conf/sparc64-ieee1275.rmk: Likewise.
10938 * include/grub/sparc64/setjmp.h: Likewise.
10939 * include/grub/sparc64/types.h: Likewise.
10940 * include/grub/sparc64/ieee1275/console.h: Likewise.
10941 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10942 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10943 * include/grub/sparc64/ieee1275/time.h: Likewise.
10944 * kern/sparc64/cache.c: Likewise.
10945 * kern/sparc64/dl.c: Likewise.
10946 * kern/sparc64/ieee1275/init.c: Likewise.
10947 * kern/sparc64/ieee1275/openfw.c: Likewise.
10949 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10951 * util/console.c (grub_ncurses_putchar): If C is greater than
10952 0x7f, set C to a question mark.
10953 (grub_ncurses_getcharwidth): New function.
10954 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10957 * normal/menu.c (print_entry): Made aware of Unicode. First,
10958 convert TITLE to UCS-4, and predict the cursor position by
10961 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10963 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10965 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10967 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10968 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10971 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10972 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10973 grub_strcpy and grub_strlen. Take it into account that a space
10974 character is inserted as a delimiter.
10976 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10978 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10979 invalid magic in the error.
10981 * commands/search.c: New file.
10983 * util/grub-emu.c (main): Call grub_search_init and
10986 * kern/rescue.c (grub_rescue_print_disks): Removed.
10987 (grub_rescue_print_devices): New function.
10988 (grub_rescue_cmd_ls): Use grub_device_iterate with
10989 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10990 grub_rescue_print_disks.
10992 * kern/partition.c (grub_partition_iterate): Return the result of
10993 PARTMAP->ITERATE instead of GRUB_ERRNO.
10995 * kern/device.c: Include grub/partition.h.
10996 (grub_device_iterate): New function.
10998 * include/grub/partition.h (grub_partition_iterate): Return int
10999 instead of grub_err_t.
11001 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11003 [GRUB_UTIL] (grub_search_fini): Likewise.
11005 * include/grub/device.h (grub_device_iterate): New prototype.
11007 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11009 (pkgdata_MODULES): Added search.mod.
11010 (search_mod_SOURCES): New variable.
11011 (search_mod_CFLAGS): Likewise.
11013 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11014 (pkgdata_MODULES): Added search.mod.
11015 (search_mod_SOURCES): New variable.
11016 (search_mod_CFLAGS): Likewise.
11018 * commands/ls.c (grub_ls_list_disks): Renamed to ...
11019 (grub_ls_list_devices): ... this, and use grub_device_iterate.
11020 All callers changed.
11022 * DISTLIST: Added commands/search.c.
11024 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11026 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11028 (grub_getcharwidth): New function.
11030 * kern/misc.c (grub_utf8_to_ucs4): New function.
11032 * include/grub/term.h (struct grub_term): Added a new member
11034 (grub_getcharwidth): New prototype.
11036 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11038 * term/i386/pc/console.c (map_char): New function. Segregated from
11039 grub_console_putchar.
11040 (grub_console_putchar): Use map_char.
11041 (grub_console_getcharwidth): New function.
11042 (grub_console_term): Specified grub_console_getcharwidth as
11045 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11046 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11048 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11050 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11051 on grub_strtoul completely.
11052 (write_char): Declare local variables in the beginning of the
11054 (grub_vesafb_getcharwidth): New function.
11055 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11058 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
11060 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11061 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11062 commands/i386/pc/vbetest.c.
11064 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11065 call grub_vbe_get_controller_info again, because the returned
11066 information is volatile.
11067 (grub_vbe_set_video_mode): Mostly rewritten.
11068 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11069 grub_vbe_status_t correctly.
11070 (grub_vbe_get_video_mode_info): Likewise.
11071 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11072 several if statements.
11074 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11075 * commands/i386/pc/vbeinfo.c: ... this.
11077 * commands/i386/pc/vbe_test.c: Renamed to ...
11078 * commands/i386/pc/vbetest.c: ... this.
11080 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11082 (grub_cmd_vbeinfo): ... this. Save video modes before
11083 iterating. Skip a video mode, if it is not available, not enough
11084 information is given or it is monochrome. Show the memory
11085 model. Leave the interpretation of MODEVAR to grub_strtoul
11087 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11088 (GRUB_MOD_FINI): Likewise.
11090 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11091 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11092 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11093 duplicated grub_env_get. Leave the interpretation of MODEVAR to
11094 grub_strtoul completely.
11095 (real2pm): Removed.
11096 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11097 (GRUB_MOD_FINI): Likewise.
11099 * normal/misc.c: Include grub/mm.h.
11101 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11102 vbe_list_modes with vbetest.mod and vbeinfo.mod.
11103 (vbe_list_modes_mod_SOURCES): Removed.
11104 (vbe_list_modes_mod_CFLAGS): Likewise.
11105 (vbe_test_mod_SOURCES): Likewise.
11106 (vbe_test_mod_CFLAGS): Likewise.
11107 (vbeinfo_mod_SOURCES): New variable.
11108 (vbeinfo_mod_CFLAGS): Likewise.
11109 (vbetest_mod_SOURCES): Likewise.
11110 (vbetest_mod_CFLAGS): Likewise.
11112 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
11114 * normal/misc.c: New file.
11116 * DISTLIST: Added normal/misc.c.
11118 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11119 DISK to HOOK. Call HOOK with DISK.
11120 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11121 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11122 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11124 * normal/menu_entry.c (struct screen): Added a new member
11125 "completion_shown".
11126 (completion_buffer): New global variable.
11127 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11128 (store_completion): New function.
11129 (complete): Likewise.
11130 (clear_completions): Likewise.
11131 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11132 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11133 a tab, call complete.
11135 * normal/completion.c (disk_dev): Removed.
11136 (print_simple_completion): Likewise.
11137 (print_partition_completion): Likewise.
11138 (print_func): New global variable.
11139 (add_completion): Do not take the arguments WHAT or PRINT any
11140 longer. Added a new argument TYPE. Instead of printing directly,
11141 call PRINT_FUNC if not NULL.
11142 All callers changed.
11143 (complete_device): Use a local variable DEV instead of
11144 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11145 (grub_normal_do_completion): Take a new argument HOOK. Do not
11146 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11147 empty string, return NULL instead.
11148 All callers changed.
11150 * normal/cmdline.c (print_completion): New function.
11152 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11154 All callers changed.
11156 * kern/disk.c (grub_print_partinfo): Removed.
11158 * include/grub/partition.h (struct grub_partition_map): Add a new
11159 argument DISK into HOOK of ITERATE.
11160 (grub_partition_iterate): Add a new argument DISK to HOOK.
11162 * include/grub/normal.h (enum grub_completion_type): New enum.
11163 (grub_completion_type_t): New type.
11164 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11165 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11166 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11167 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11168 (grub_normal_do_completion): Added a new argument HOOK.
11169 (grub_normal_print_device_info): New prototype.
11171 * include/grub/disk.h (grub_print_partinfo): Removed.
11173 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11174 (normal_mod_SOURCES): Likewise.
11175 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11176 (normal_mod_SOURCES): Likewise.
11178 * commands/ls.c (grub_ls_list_disks): Use
11179 grub_normal_print_device_info instead of grub_print_partinfo. Free
11181 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11182 duplicating the code.
11184 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11186 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
11187 follow GCS more precisely.
11188 * commands/i386/pc/vbe_test.c: Likewise.
11189 * include/grub/i386/pc/vbe.h: Likewise.
11190 * term/i386/pc/vesafb.c: Likewise.
11191 * video/i386/pc/vbe.c: Likewise.
11193 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11195 * DISTLIST: Added term/i386/pc/vesafb.c
11196 DISTLIST: Added video/i386/pc/vbe.c
11197 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11198 DISTLIST: Added commands/i386/pc/vbe_test.c.
11199 * commands/i386/pc/vbe_list_modes.c: New file.
11200 * commands/i386/pc/vbe_test.c: Likewise.
11201 * term/i386/pc/vesafb.c: Likewise.
11202 * video/i386/pc/vbe.c: Likewise.
11203 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11204 (grub_vbe_probe) Added prototype.
11205 (grub_vbe_set_video_mode) Likewise.
11206 (grub_vbe_get_video_mode) Likewise.
11207 (grub_vbe_get_video_mode_info) Likewise.
11208 (grub_vbe_set_pixel_rgb) Likewise.
11209 (grub_vbe_set_pixel_index) Likewise.
11210 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11211 (pkgdata_MODULES): Added vesafb.mod.
11212 (pkgdata_MODULES): Added vbe_list_modes.mod.
11213 (pkgdata_MODULES): Added vbe_test.mod.
11214 (vbe_mod_SOURCES): Added.
11215 (vbe_mod_CFLAGS): Likewise.
11216 (vesafb_mod_SOURCES): Likewise.
11217 (vesafb_mod_CFLAGS): Likewise.
11218 (vbe_list_modes_mod_SOURCES): Likewise.
11219 (vbe_list_modes_mod_CFLAGS): Likewise.
11220 (vbe_test_mod_SOURCES): Likewise.
11221 (vbe_test_mod_CFLAGS): Likewise.
11223 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11225 * normal/command.c (grub_command_execute): If INTERACTIVE is
11226 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11227 CMDLINE. Disable the pager if INTERACTIVE is true.
11228 All callers are changed.
11230 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11231 before reading a config file.
11232 * normal/main.c (read_config_file): Even if a command is not
11233 found, register it if it is within an entry.
11235 * util/grub-emu.c: Include sys/types.h and unistd.h.
11236 (options): Added --hold.
11237 (struct arguments): Added a new member "hold".
11238 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11240 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11241 cleared by a debugger, if it is not zero.
11243 * include/grub/normal.h (grub_command_execute): Add an argument
11246 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11248 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11250 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11252 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11253 program with another one, because the old one didn't detect a bug
11254 in gcc-3.4. Always use regparm 2, because the new test is still
11255 not enough for gcc-4.0. Someone must investigate a simple test
11256 case which detects a bug in gcc-4.0.
11258 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11260 * DISTLIST: Added normal/completion.c.
11262 * normal/completion.c: New file.
11264 * term/i386/pc/console.c (grub_console_getwh): New function.
11265 (grub_console_term): Assign grub_console_getwh to getwh.
11267 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11268 function is defined in normal/completion.c as
11269 grub_normal_do_completion.
11270 (grub_cmdline_get): Use grub_normal_do_completion instead of
11273 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11274 returns non-zero, otherwise return 0.
11275 (grub_partition_iterate): First, probe the partition map. Then,
11276 call ITERATE only for this partition map.
11278 * kern/misc.c (grub_strncmp): Rewritten.
11280 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11281 returns non-zero. Otherwise return 0.
11283 * include/grub/partition.h (grub_partition_map_iterate): Return
11284 int instead of void.
11286 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11288 * include/grub/misc.h (grub_strncmp): Change the type of N to
11291 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11294 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
11295 unsigned explicitly before comparing it with I.
11297 * kern/main.c (grub_env_write_root): Add the attribute unused into
11300 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11301 normal/completion.c.
11302 (normal_mod_SOURCES): Likewise.
11303 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11304 (normal_mod_SOURCES): Likewise.
11306 * normal/command.c (grub_iterate_commands): If ITERATE returns
11307 non-zero, return one immediately.
11309 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11311 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11312 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11314 (grub_vbe_get_controller_info): New function.
11315 (grub_vbe_get_mode_info): Likewise.
11316 (grub_vbe_set_mode): Likewise.
11317 (grub_vbe_get_mode): Likewise.
11318 (grub_vbe_set_memory_window): Likewise.
11319 (grub_vbe_get_memory_window): Likewise.
11320 (grub_vbe_set_scanline_length): Likewise.
11321 (grub_vbe_get_scanline_length): Likewise.
11322 (grub_vbe_set_display_start): Likewise.
11323 (grub_vbe_get_display_start): Likewise.
11324 (grub_vbe_set_palette_data): Likewise.
11325 * include/grub/i386/pc/vbe.h: New file.
11327 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11329 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11330 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11331 * DISTLIST: Likewise.
11332 * kern/ieee1275/of.c: Moved to ...
11333 * kern/ieee1275/ieee1275.c: ... here.
11335 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11337 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11338 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11339 Pass 0 as `end' parameter to grub_strtoul().
11341 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11343 * include/grub/powerpc/ieee1275/console.h: Do not include
11344 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11346 (grub_console_cur_color): Remove i386-specific prototype.
11347 (grub_console_real_putchar): Likewise.
11348 (grub_console_checkkey): Likewise.
11349 (grub_console_getkey): Likewise.
11350 (grub_console_getxy): Likewise.
11351 (grub_console_gotoxy): Likewise.
11352 (grub_console_cls): Likewise.
11353 (grub_console_setcursor): Likewise.
11354 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11355 Include <grub/machine/console.h>.
11356 * term/ieee1275/ofconsole.c: Likewise.
11358 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11360 * Makefile.in (LIBLZO): New variable.
11362 * configure.ac: Check for LZO version 2.
11364 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11365 lzo/lzo1x.h instead of lzo1x.h.
11367 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11370 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11371 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11373 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11374 copying the data from PARTITION to P.
11376 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11378 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11379 negative, unload the module.
11381 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11382 map is "pc_partition_map" but not "pc".
11383 (usage): Fix the description. The options are --boot-image and
11384 --core-image but not --boot-file or --core-file.
11385 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11386 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11389 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11390 --core-file. Specify INSTALL_DEVICE as an argument.
11392 * util/console.c: Include config.h.
11393 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11394 [HAVE_NCURSES_H]: Include ncurses.h.
11395 [HAVE_CURSES_H]: Include curses.h.
11396 [!A_NORMAL] (A_NORMAL): Defined as zero.
11397 [!A_STANDOUT] (A_STANDOUT): Likewise.
11399 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11401 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11403 * configure.ac: Check for curses libraries and headers.
11405 * Makefile.in (LIBCURSES): New variable.
11407 * genmk.rb (Script::rule): Set the executable bits.
11409 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11410 name of the PC partition map is "pc_partition_map" but not "pc".
11412 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11414 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11415 (modules): Likewise.
11416 (usage): Added descriptions for --modules and --grub-probefs.
11417 Handle --modules and --grub-probefs. Save the arguments in MODULES
11418 and GRUB_PROBEFS, respectively.
11419 Auto-detect a filesystem module against GRUBDIR. If the result is
11420 empty and modules are not specified explicitly, abort the
11421 installation. Add the result to MODULES.
11423 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11424 disk/powerpc/ieee1275/ofdisk.c,
11425 include/grub/powerpc/ieee1275/init.h and
11426 term/powerpc/ieee1275/ofconsole.c.
11427 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11428 term/ieee1275/ofconsole.c.
11430 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11432 * COPYING: Upgraded to the latest version. Only the address of the
11433 FSF office has changed.
11435 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11437 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11438 kern/ieee1275.c with kern/ieee1275/of.c.
11440 * kern/ieee1275.c: Moved to ...
11441 * kern/ieee1275/of.c: ... here.
11443 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11445 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
11448 * config.guess: Updated to the latest version from gnulib.
11449 * config.sub: Likewise.
11450 * install.sh: Likewise.
11451 * mkinstalldirs: Likewise.
11453 * include/grub/console.h: Removed. This file is arch-specific. Do
11454 not put this in include/grub.
11456 * include/grub/i386/pc/console.h: Resurrected.
11458 * util/console.c: Include grub/machine/console.h instead of
11460 * util/grub-emu.c: Likewise.
11462 2005-08-04 Marco Gerards <metgerards@student.han.nl>
11464 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11467 From Vincent Pelletier <subdino2004@yahoo.fr>
11468 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11469 Redefined to use grub_getwh.
11470 (grub_term): New member named getwh.
11471 (grub_getwh): New prototype.
11472 * kern/term.c (grub_getwh): New function.
11473 * term/i386/pc/console.c (grub_console_getwh): New function.
11474 (grub_console_term): New member `getwh'.
11475 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11476 (grub_vga_term): New member `getwh'.
11477 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
11479 (grub_ofconsole_getw): New function.
11480 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11481 (grub_ofconsole_term): New field named getwh and new initial
11484 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11486 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11487 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11488 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11489 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11490 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11491 of <grub/machine/ieee1275.h>.
11492 * commands/ieee1275/reboot.c: Likewise.
11493 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11494 * kern/ieee1275.c: ... to here. All users updated. Change all
11495 parameter structs to use new type `grub_ieee1275_cell_t'.
11496 * term/powerpc/ieee1275/ofconsole.c: Move ...
11497 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11498 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11499 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11500 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11502 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11503 Remove unused prototypes. All users updated.
11504 * include/grub/powerpc/ieee1275/console.h: Removed.
11505 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11506 `grub_ieee1275_cell_t'.
11507 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11508 Cast comparisons with -1 to the correct type.
11509 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11510 type to match `grub_ieee1275_entry_fn'.
11512 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11514 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11516 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11517 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11519 (grub_probefs_SOURCES): New variable.
11521 * util/i386/pc/grub-probefs.c: New file.
11523 * util/i386/pc/grub-setup.c (main): Call
11524 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11525 grub_hfs_init and grub_jfs_init to initialize the system. Call
11526 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11527 grub_pc_partition_map_fini to finish the system.
11529 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11531 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11533 (grub_multiboot_load_elf32): Likewise.
11534 (grub_multiboot_is_elf64): Likewise.
11535 (grub_multiboot_load_elf64): Likewise.
11536 (grub_multiboot_load_elf): Likewise.
11537 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11538 an ELF32 or ELF64 file.
11539 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11541 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11542 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11543 NULL before calling FS->LABEL.
11544 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11545 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11546 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11547 before calling FS->LABEL.
11549 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11551 * util/i386/pc/grub-install.in (datadir): New variable.
11553 (pkgdatadir): New variable.
11554 (pkglibdir): Removed.
11556 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11558 * DISTLIST: Added util/i386/pc/grub-install.in.
11560 * util/i386/pc/grub-install.in: New file.
11562 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11563 (grub_install_SOURCES): Likewise.
11565 * genmk.rb: Added support for scripts.
11566 (Script): New class.
11567 (scripts): New variable.
11569 * Makefile.in (install-local): Install sbin_SCRIPTS by
11571 (uninstall): Remove sbin_SCRIPTS.
11573 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11574 device, try to get a GRUB device by
11575 grub_util_biosdisk_get_grub_dev.
11578 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11579 description for --device-map.
11581 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11583 Change the semantics of variable hooks. They now return strings
11584 instead of error values.
11586 * util/i386/pc/grub-setup.c: Include grub/env.h.
11587 (setup): Use grub_device_set_root instead of grub_env_set.
11589 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11590 grub_env_get instead of grub_device_set_root and
11591 grub_device_get_root, respectively.
11593 * kern/main.c (grub_env_write_root): New function.
11594 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11595 grub_env_set instead of grub_device_set_root.
11597 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11599 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11600 rather than calling ENV->WRITE_HOOK afterwards.
11601 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11602 passing a pointer of a pointer.
11603 (grub_register_variable_hook): Change the types of "read_hook" and
11604 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11606 Allocate the default empty string on the heap, because this string
11607 may be freed later.
11609 * kern/device.c: Include grub/env.h.
11610 (grub_device_set_root): Removed.
11611 (grub_device_get_root): Likewise.
11612 (grub_device_open): Use grub_env_get instead of
11613 grub_device_get_root.
11615 * include/grub/env.h (grub_env_read_hook_t): New type.
11616 (grub_env_write_hook_t): Likewise.
11617 (grub_env_var): Change the types of "read_hook" and "write_hook"
11618 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11619 (grub_register_variable_hook): Likewise.
11621 * include/grub/device.h (grub_device_set_root): Removed.
11622 (grub_device_set_root): Likewise.
11624 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11625 make sure that DIRNAME terminates with '/', so that
11626 grub_fat_find_dir will fail if PATH is not a directory.
11628 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11630 Use the qualifier auto for print_files and print_files_long.
11631 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11633 Put a newline only if there is no error.
11634 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11637 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11639 * kern/partition.c (grub_partition_probe): Initialize PART to
11640 NULL. Otherwise, when no partition map is registered, this returns
11643 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11645 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11646 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11649 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11651 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11652 information on each device, if it does not have partitions. Print
11653 "Device" instead of "Disk", because this function is not specific
11656 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11657 static to ensure that it is put on the memory rather than a
11660 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11662 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11663 (grub_cat_init): Likewise.
11664 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11665 (options): Likewise.
11666 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11667 (grub_configfile_init): Likewise.
11668 * font/manager.c (GRUB_MOD_INIT): Likewise.
11669 * commands/help.c (GRUB_MOD_INIT): Likewise.
11670 (grub_help_init): Likewise.
11671 * normal/command.c (grub_command_init): Likewise.
11672 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11673 * disk/loopback.c (grub_loop_init): Likewise.
11674 (GRUB_MOD_INIT): Likewise.
11675 * commands/ls.c (grub_ls_init): Likewise.
11676 (GRUB_MOD_INIT): Likewise.
11677 (options): Likewise.
11678 * commands/boot.c (grub_boot_init): Likewise.
11679 (GRUB_MOD_INIT): Likewise.
11680 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11681 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11682 (GRUB_MOD_INIT): Likewise.
11683 * commands/cmp.c (grub_cmp_init): Likewise.
11684 (GRUB_MOD_INIT): Likewise.
11686 * normal/arg.c: Use <> instead of "" to include header files.
11687 (SHORT_ARG_HELP): New macro.
11688 (SHORT_ARG_USAGE): Likewise.
11689 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11690 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11692 (find_short): Check if C is 'h' or 'u' explicitly.
11693 (grub_arg_show_help): Use space characters instead of tabs. Treat
11694 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11695 are shown with --help and --usage only if they are not used for
11696 the command itself.
11697 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11700 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11701 const into "longarg". Change the type of "shortarg" to int.
11703 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11705 * boot/i386/pc/boot.S (boot_drive_check): New label.
11707 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11710 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11711 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11713 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11715 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11716 When turning off Gate A20, skip the check and return immediately,
11717 because this is not fatal usually.
11719 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11721 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11722 be 0x7C00 instead of 0x8000.
11724 * boot/i386/pc/pxeboot.S: Rewritten.
11726 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11728 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11731 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11733 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11734 robustness. This routine now supports a BIOS call and System
11735 Control Port A to modify the gate A20.
11737 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11738 Increased to 0x440.
11740 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11742 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11743 device path and resulting ihandle.
11744 (grub_ofdisk_close): dprintf the ihandle being closed.
11745 (grub_ofdisk_read): dprintf function parameters.
11746 * kern/mm.c (grub_mm_init_region): Likewise.
11747 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11748 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11749 size, and boot arguments.
11750 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11751 before loading into memory.
11752 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11753 before loading into memory.
11755 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11757 * kern/mm.c: Added much documentation.
11758 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11759 8, set to 5 instead of 8.
11761 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11763 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11765 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11766 (grub_mkdevicemap_SOURCES): New variable.
11768 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11769 lib/device.c of GRUB Legacy.
11771 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11773 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11774 instead of PATH is NULL.
11776 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11778 * commands/cmp.c (BUFFER_SIZE): New macro.
11779 (grub_cmd_cmp): Close the right file at the right time. Compare
11780 only data just read. Don't report files of different size as
11781 identical. Dynamically allocate buffers. Move variable
11782 declarations at the beginning of function.
11784 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
11786 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11789 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11791 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11792 when backspace is pressed at beginning of line.
11794 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
11796 * DISTLIST: Added genfslist.sh.
11798 * normal/main.c (fs_module_list): New variable.
11799 (autoload_fs_module): New function.
11800 (read_fs_list): Likewise.
11801 (grub_normal_execute): Call read_fs_list.
11803 * kern/fs.c (grub_fs_autoload_hook): New variable.
11804 (grub_fs_probe): Added support for auto-loading.
11806 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11807 (grub_fs_module_list_t): New type.
11809 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11810 (grub_fs_autoload_hook): New prototype.
11812 * genfslist.sh: New file.
11814 * genmk.rb: Added a rule to generate a filesystem list.
11816 2005-06-30 Marco Gerards <metgerards@student.han.nl>
11818 * configure.ac: Fix the test for cross-compiling.
11820 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11821 define GRUB_UTIL anymore.
11823 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11824 so this function works on other systems than just big endian.
11825 (load_modules): Likewise.
11826 (add_segments): Likewise.
11828 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11830 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11831 contains `l' modifier, get a long from va_arg().
11833 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11835 * kern/mm.c (grub_free): If the next free block which is being
11836 merged is the first free block, set the first block to the block
11838 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11840 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11842 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11843 `grub_ieee1275_chosen'.
11845 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11847 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11848 (grub_ieee1275_chosen): New variable.
11849 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11851 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11852 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11853 Rename first argument to `phandle' for consistency.
11854 (grub_ieee1275_get_property_length): Likewise.
11855 (grub_ieee1275_next_property): Likewise. Change type of first argument
11856 to grub_ieee1275_phandle_t.
11857 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11858 Move export next to declaration.
11859 (grub_ieee1275_chosen): New variable.
11860 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11861 Correct cosmetic typo.
11862 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11863 `grub_ieee1275_chosen'.
11864 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11865 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11866 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11867 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11868 `grub_ieee1275_chosen'.
11870 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11872 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11874 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11875 /chosen/bootargs as "variable=value" pairs.
11877 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11879 * include/grub/misc.h (grub_dprintf): New macro.
11880 (grub_real_dprintf): New prototype.
11881 (grub_strword): Likewise.
11882 (grub_iswordseparator): Likewise.
11883 * kern/misc.c (grub_real_dprintf): New function.
11884 (grub_strword): Likewise.
11885 (grub_iswordseparator): Likewise.
11887 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11889 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11890 (roundup): Remove macro.
11891 (grub_ieee1275_flags): Make static.
11892 (grub_ieee1275_realmode): Remove.
11893 (grub_ieee1275_test_flag): New function.
11894 (grub_ieee1275_set_flag): Likewise.
11895 (find_options): Rename to `grub_ieee1275_find_options'; update
11896 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11897 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11898 (cmain): New prototype.
11899 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11900 `grub_ieee1275_flags' directly.
11901 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11902 machine/biosdisk.h.
11903 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11904 Don't include grub/machine/init.h.
11905 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11906 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11908 (grub_ieee1275_realmode): Likewise.
11909 (grub_ieee1275_flag): New enum.
11910 (grub_ieee1275_test_flag): New prototype.
11911 (grub_ieee1275_set_flag): New prototype.
11912 * include/grub/powerpc/ieee1275/init.h: Remove file.
11913 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11914 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11915 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11916 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11918 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11919 `grub_ieee1275_test_flag'.
11920 (grub_ieee1275_encode_devname): Likewise.
11922 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11924 * include/grub/powerpc/ieee1275/ieee1275.h
11925 (grub_ieee1275_encode_devname): New prototype.
11926 (grub_ieee1275_get_filename): Likewise.
11927 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11929 (grub_set_prefix): Likewise.
11930 (grub_machine_init): Call grub_set_prefix.
11931 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11932 (grub_parse_type): New enum.
11933 (grub_ieee1275_get_devargs): New function.
11934 (grub_ieee1275_get_devname): Likewise.
11935 (grub_ieee1275_parse_args): Likewise.
11936 (grub_ieee1275_get_filename): Likewise.
11937 (grub_ieee1275_encode_devname): Likewise.
11939 2005-03-30 Marco Gerards <metgerards@student.han.nl>
11941 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11942 `grub_loader_unset'.
11944 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11946 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11947 instead of grub_ieee1275_interpret.
11948 (grub_halt_init): New function.
11949 (grub_halt_fini): Likewise.
11950 (GRUB_MOD_INIT): Correct message grammar.
11951 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11952 instead of grub_ieee1275_interpret.
11953 (grub_reboot_init): New function.
11954 (grub_reboot_fini): Likewise.
11955 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11956 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11957 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11958 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11959 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11961 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11963 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11965 (grub_halt): Likewise.
11966 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11967 (cmain): Remove __attribute__((unused)).
11968 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11969 (grub_heap_len): Likewise.
11970 (grub_machine_fini): New function.
11971 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11972 (grub_halt): Likewise.
11973 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11975 * util/powerpc/ieee1275/misc.c: New file.
11977 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11979 * DISTLIST: New file.
11980 * gendistlist.sh: Likewise.
11982 * Makefile.in (COMMON_DISTFILES): Removed.
11983 (BOOT_DISTFILES): Likewise.
11984 (CONF_DISTFILES): Likewise.
11985 (DISK_DISTFILES): Likewise.
11986 (FS_DISTFILES): Likewise.
11987 (INCLUDE_DISTFILES): Likewise.
11988 (KERN_DISTFILES): Likewise.
11989 (LOADER_DISTFILES): Likewise.
11990 (TERM_DISTFILES): Likewise.
11991 (UTIL_DISTFILES): Likewise.
11992 (DISTFILES): Likewise.
11993 (uninstall): Uninstall files in $(pkgdata_DATA).
11994 (DISTLIST): New target.
11995 (distdir): Use the contents of the file DISTLIST to get a list of
11998 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12000 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12001 descriptor. This is ported from GRUB Legacy.
12003 * gencmdlist.sh: Added an extra semicolon to make it work with
12004 old sed versions. Reported by Robert Bihlmeyer
12005 <robbe@orcus.priv.at>.
12007 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
12009 Automatic loading of commands is supported.
12011 * normal/main.c (read_command_list): New function.
12012 (grub_normal_execute): Call read_command_list.
12014 * normal/command.c (grub_register_command): Return zero or CMD.
12015 Allocate CMD->NAME from the heap.
12016 Initialize CMD->MODULE_NAME to zero.
12017 Find the same name as well. If the same command is found and it is
12018 a dummy command, overwrite members. If it is not a dummy command,
12020 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12021 (grub_command_find): If a dummy command is found, load a module
12022 and retry to find a command only once.
12024 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12025 make sure that each command is loaded.
12027 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12029 (struct grub_command): Remove const from the member `name'.
12030 Add a new member `module_name'.
12031 (grub_register_command): Return grub_command_t.
12033 * commands/help.c (grub_cmd_help): Call grub_command_find to make
12034 sure that each command is loaded.
12036 * genmk.rb (PModule::rule): Specify a module name without the
12037 suffix ".mod" to gencmdlist.sh.
12039 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12041 * gencmdlist.sh: New file.
12043 * genmk.rb (PModule::rule): Generate a rule for a command list.
12045 Generate command.lst from $(COMMANDFILES).
12047 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12048 (DATA): Added $(pkgdata_DATA).
12049 (install-local): Install files in $(pkgdata_DATA).
12051 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12053 * term/i386/pc/vga.c (debug_command): Removed.
12054 (GRUB_MOD_INIT): Do not register the command "debug".
12056 From Hollis Blanchard:
12057 * commands/configfile.c: New file.
12058 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12059 commands/configfile.c.
12060 (pkgdata_MODULES): Added configfile.mod.
12061 (configfile_mod_SOURCES): New variable.
12062 (configfile_mod_CFLAGS): Likewise.
12063 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12064 commands/configfile.c.
12065 (pkgdata_MODULES): Added configfile.mod.
12066 (configfile_mod_SOURCES): New variable.
12067 (configfile_mod_CFLAGS): Likewise.
12068 * util/grub-emu.c (main): Call grub_configfile_init and
12069 grub_configfile_fini.
12070 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12072 [GRUB_UTIL] (grub_configfile_fini): Likewise.
12074 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12076 * normal/arg.c (grub_arg_show_help): Do not show the bug report
12079 * commands/help.c (grub_cmd_help): Do not print newlines after
12080 the last command in print_command_help.
12082 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12084 * commands/default.h: New file.
12085 * commands/timeout.h: Likewise.
12086 * normal/context.c: Likewise.
12088 * util/misc.c: Do not include sys/times.h.
12089 Include sys/time.h and grub/machine/time.h.
12090 (grub_get_rtc): Rewritten with gettimeofday.
12092 * util/grub-emu.c (main): Call grub_default_init and
12093 grub_timeout_init before grub_normal_init, and call
12094 grub_timeout_fini and grub_default_fini after grub_main.
12096 * util/console.c (grub_ncurses_checkkey): Return the read
12099 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12102 * normal/main.c (read_config_file): Push MENU. If this fails,
12103 print an error and wait for a user input.
12104 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12105 If a menu is empty or an error occurs, pop MENU.
12106 (grub_normal_execute): Pop and free MENU after grub_menu_run
12109 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12111 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12113 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12115 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12117 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12120 * include/grub/normal.h (struct grub_menu_list): New struct.
12121 (grub_menu_list_t): New type.
12122 (struct grub_context): New struct.
12123 (grub_context_t): New type.
12124 (grub_register_command): Got rid of EXPORT_FUNC.
12125 (grub_unregister_command): Likewise.
12126 (grub_context_get): New prototype.
12127 (grub_context_get_current_menu): Likewise.
12128 (grub_context_push_menu): Likewise.
12129 (grub_context_pop_menu): Likewise.
12130 [GRUB_UTIL] (grub_default_init): Likewise.
12131 [GRUB_UTIL] (grub_default_fini): Likewise.
12132 [GRUB_UTIL] (grub_timeout_init): Likewise.
12133 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12135 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12136 commands/timeout.c and normal/context.c.
12137 (pkgdata_MODULES): Added default.mod and timeout.mod.
12138 (normal_mod_SOURCES): Added normal/context.c.
12139 (default_mod_SOURCES): New variable.
12140 (default_mod_CFLAGS): Likewise.
12141 (timeout_mod_SOURCES): Likewise.
12142 (timeout_mod_CFLAGS): Likewise.
12143 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12145 (pkgdata_MODULES): Added default.mod and timeout.mod.
12146 (normal_mod_SOURCES): Added normal/context.c.
12147 (default_mod_SOURCES): New variable.
12148 (default_mod_CFLAGS): Likewise.
12149 (timeout_mod_SOURCES): Likewise.
12150 (timeout_mod_CFLAGS): Likewise.
12152 * Makefile.in (all-local): Added $(MKFILES).
12154 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12156 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12157 (grub_emu_SOURCES): Likewise.
12158 (pkgdata_MODULES): Add `sun.mod'.
12159 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12160 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12162 (pkgdata_MODULES): Add `sun.mod'.
12163 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12164 * include/grub/partition.h (grub_sun_partition_map_init): New
12166 (grub_sun_partition_map_fini): Likewise.
12167 * partmap/sun.c: New file.
12168 * util/grub-emu.c (main): Initialize and de-initialize the sun
12169 partitionmap support.
12171 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12173 This implements an Emacs-like menu entry editor.
12175 * normal/menu_entry.c: New file.
12177 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12178 characters to ASCII.
12179 (saved_char): New variable.
12180 (grub_ncurses_checkkey): Rewritten completely.
12181 (grub_ncurses_getkey): Likewise.
12182 (grub_ncurses_init): Call raw instead of cbreak.
12184 * normal/menu.c (print_entry): Do not put a space.
12185 (init_page): Renamed to ...
12186 (grub_menu_init_page): ... this. All callers changed.
12187 (edit_menu_entry): Removed.
12188 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12190 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12192 * kern/misc.c (grub_vprintf): Call grub_refresh.
12194 * normal/menu.c (DISP_LEFT): Renamed to ...
12195 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12196 * normal/menu.c (DISP_UP): Renamed to ...
12197 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12198 * normal/menu.c (DISP_RIGHT): Renamed to ...
12199 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12200 * normal/menu.c (DISP_DOWN): Renamed to ...
12201 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12202 * normal/menu.c (DISP_HLINE): Renamed to ...
12203 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12204 * normal/menu.c (DISP_VLINE): Renamed to ...
12205 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12206 * normal/menu.c (DISP_UL): Renamed to ...
12207 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12208 * normal/menu.c (DISP_UR): Renamed to ...
12209 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12210 * normal/menu.c (DISP_LL): Renamed to ...
12211 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12212 * normal/menu.c (DISP_LR): Renamed to ...
12213 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12214 * normal/menu.c (TERM_WIDTH): Renamed to ...
12215 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12216 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12217 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12218 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12219 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12220 * normal/menu.c (TERM_MARGIN): Renamed to ...
12221 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12222 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12223 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12224 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12225 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12226 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12227 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12228 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12229 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12230 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12231 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12232 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12233 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12234 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12235 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12236 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12237 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12238 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12239 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12240 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12241 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12242 All callers changed.
12244 * include/grub/normal.h: New prototype.
12246 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12247 normal/menu_entry.c.
12248 (normal_mod_SOURCES): Likewise.
12249 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12250 (normal_mod_SOURCES): Likewise.
12252 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12254 * include/grub/normal.h (grub_halt_init): New prototype.
12255 (grub_halt_fini): Likewise.
12256 (grub_reboot_init): Likewise.
12257 (grub_reboot_fini): Likewise.
12259 * util/grub-emu.c: Include signal.h.
12260 (main_env): New global variable.
12261 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12263 (grub_machine_fini): New function.
12264 (main): Call grub_halt_init and grub_reboot_init before
12265 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12266 Call setjmp with MAIN_ENV to go back afterwards.
12267 Call grub_machine_fini right before return.
12269 * include/grub/util/misc.h: Include setjmp.h.
12270 (main_env): New prototype.
12272 * include/grub/kernel.h (grub_machine_fini): New prototype.
12273 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12274 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12276 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12277 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12278 * term/i386/pc/console.c (grub_console_fini): Likewise.
12280 * util/i386/pc/misc.c: New file.
12282 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12283 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12284 commands/i386/pc/reboot.c.
12286 2005-02-14 Guillem Jover <guillem@hadrons.org>
12288 * include/grub/dl.h (grub_dl_check_header): New prototype.
12289 (grub_arch_dl_check_header): Change return type to grub_err_t,
12290 remove size parameter and export function. Update all callers.
12291 * kern/dl.c (grub_dl_check_header): New function.
12292 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12293 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12294 are inside the core.
12295 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12296 independent ELF header checks.
12297 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12298 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12299 `grub_dl_check_header' instead of explicit checks. Check for the
12301 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12302 `grub_dl_check_header' instead of explicit checks. Remove arch
12303 specific ELF header checks.
12305 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12308 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12310 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12311 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12313 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12315 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
12316 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
12317 (part_map_iterate): Clear `grub_errno' and return 0 if
12318 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
12319 * partmap/amiga.c (amiga_partition_map_iterate): Return
12320 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12321 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12323 2005-02-01 Guillem Jover <guillem@hadrons.org>
12325 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12328 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12330 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12332 (grub_rescue_cmd_linux): New prototype.
12333 (grub_rescue_cmd_initrd): Likewise.
12334 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12336 (grub_linux_release_mem): Release the memory for the initrd.
12337 (grub_load_linux): Renamed from this...
12338 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12339 Changed `entry' not to be static. Loop over memory regions to
12340 find another one when the default fails.
12341 (grub_rescue_cmd_initrd): New function.
12342 (grub_linux_init): Remove function.
12343 (grub_linux_fini): Likewise.
12344 (GRUB_MOD_INIT): Register `initrd'.
12345 (GRUB_MOD_FINI): Unregister `initrd'.
12346 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12348 (grub_linux_normal_fini): Likewise.
12349 (GRUB_MOD_INIT): Register `initrd'.
12350 (GRUB_MOD_FINI): Unregister `initrd'.
12352 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12354 * commands/help.c: New file.
12355 * normal/arg.c (show_help): Renamed to...
12356 (grub_arg_show_help): ... this.
12357 * commands/i386/pc/halt.c: New file.
12358 * commands/i386/pc/reboot.c: Likewise.
12359 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12360 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12361 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12362 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12364 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12366 (pkgdata_MODULES): Add `help.mod'.
12367 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12368 * grub/i386/pc/init.h (grub_reboot): New prototype.
12369 (grub_halt): Likewise.
12370 * include/grub/normal.h (grub_arg_show_help): New prototype.
12371 (grub_help_init): Likewise.
12372 (grub_help_fini): Likewise.
12373 * util/grub-emu.c (main): Initialize and deinitialize the help
12376 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12378 * normal/command.c (grub_command_init): Fixed the description of
12379 the `set' and `unset' commands.
12381 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12383 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12385 * commands/ieee1275/halt.c: New file.
12386 * commands/ieee1275/reboot.c: Likewise.
12387 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12388 `__attribute__ ((unused))'. Some GCS related fixed.
12389 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12390 (grub_suspend_fini): Likewise.
12391 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12393 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12394 (halt_mod_CFLAGS): New variables.
12395 * include/grub/powerpc/ieee1275/ieee1275.h
12396 (grub_ieee1275_interpret): New prototype.
12398 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12400 * include/grub/misc.h (memmove): New prototype.
12401 (memcpy): Likewise.
12403 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12405 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12406 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12408 2005-01-22 Marco Gerards <metgerards@student.han.nl>
12410 * kern/misc.c (grub_strndup): Function rewritten.
12412 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12414 * normal/menu.c (TERM_WIDTH): Macro redefined.
12415 (TERM_TOP_BORDER_Y): Likewise.
12416 (draw_border): Replaced while-loop by a for-loop. Make the number
12417 of lines consistent with the number of lines displayed in
12418 print_entries. Added a margin below the rectangle.
12419 (print_entry): Make the entry fit in the rectangle.
12420 (print_entries): Display the scroll arrows next to the right
12423 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12425 * fs/minix.c (grub_minix_find_file): Reserve more space for
12426 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12427 `grub_strncpy' to copy `path' into it.
12429 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12431 Add the loopback device, a device via which files can be accessed
12434 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12435 (pkgdata_MODULES): Add loopback.mod.
12436 (loopback_mod_SOURCES): New variable.
12437 (loopback_mod_CFLAGS): Likewise.
12438 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12440 (pkgdata_MODULES): Add loopback.mod.
12441 (loopback_mod_SOURCES): New variable.
12442 (loopback_mod_CFLAGS): Likewise.
12443 * disk/loopback.c: new file.
12444 * include/grub/normal.h (grub_loop_init): New prototype.
12445 (grub_loop_fini): New prototype.
12446 * util/grub-emu.c (main): Initialize and de-initialize loopback
12448 * include/grub/disk.h (grub_disk_dev_id): Add
12449 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12451 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12453 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12455 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12456 (suspend_mod_SOURCES): New variable.
12457 (suspend_mod_CFLAGS): Likewise.
12458 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12460 * commands/ieee1275/suspend.c: New file.
12462 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12464 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
12465 ((unused))' to `__attribute__ ((used))'.
12466 (GRUB_MOD_FINI): Likewise.
12467 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12468 * genmk.rb (PModule): Assign space to common symbols when linking
12471 2005-01-20 Marco Gerards <metgerards@student.han.nl>
12473 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12474 `unsigned' arguments to `grub_size_t'.
12475 (grub_malloc): Likewise.
12476 (grub_realloc): Likewise.
12477 (grub_memalign): Likewise.
12478 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12479 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12480 * util/misc.c (grub_malloc): Likewise.
12481 (grub_realloc): Likewise.
12482 * kern/mm.c (get_header_from_pointer): Change the casts to
12483 `unsigned' into a cast to `grub_size_t'.
12485 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12486 point to `currnode' when `currnode' is changed.
12488 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12489 Schottelius <nico-linux@schottelius.org>.
12491 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12493 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12494 (note_path): Remove variable.
12495 (GRUB_IEEE1275_NOTE_NAME): New macro.
12496 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12497 (grub_ieee1275_note_hdr): New structure.
12498 (grub_ieee1275_note_desc): Likewise.
12499 (grub_ieee1275_note): Likewise.
12500 (load_note): Remove `dir' argument. All callers updated. Remove
12501 `note_img' and `path'. Do not load a file from `note_path'.
12502 Initialize a struct grub_ieee1275_note and write that to `out'.
12503 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12505 2005-01-05 Marco Gerards <metgerards@student.han.nl>
12507 * util/misc.c (grub_util_read_image): Revert last change. It
12508 called `grub_util_read_at', which seeks from the beginning of the
12511 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12513 * TODO: Add note about endianness in grub-mkimage.
12514 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12516 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12517 (grub_mkimage_SOURCES): New target.
12518 * include/grub/kernel.h (grub_start_addr): Remove variable.
12519 (grub_end_addr): Likewise.
12520 (grub_total_module_size): Likewise.
12521 (grub_kernel_image_size): Likewise.
12522 (GRUB_MODULE_MAGIC): New constant.
12523 (grub_module_info): New structure.
12524 (grub_arch_modules_addr): New prototype.
12525 (grub_get_end_addr): Remove prototype.
12526 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12527 * include/grub/powerpc/ieee1275/kernel.h: New file.
12528 * include/grub/util/misc.h (grub_util_get_fp_size): New
12530 (grub_util_read_at): Likewise.
12531 (grub_util_write_image_at): Likewise.
12532 * kern/main.c (grub_get_end_addr): Remove function.
12533 (grub_load_modules): Call grub_arch_modules_addr instead of using
12534 grub_end_addr. Look for a grub_module_info struct in memory. Use
12535 the grub_module_info fields instead of calling grub_get_end_addr
12536 as loop conditions. Move grub_add_unused_region code here.
12537 (grub_add_unused_region): Remove function.
12538 * kern/i386/pc/init.c: Include grub/cache.h.
12539 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12540 one call to add_mem_region.
12541 (grub_arch_modules_addr): New function.
12542 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12543 (grub_total_module_size): Likewise.
12544 Include grub/machine/kernel.h.
12545 (grub_arch_modules_addr): New function.
12546 * util/grub-emu.c (grub_end_addr): Remove variable.
12547 (grub_total_module_size): Likewise.
12548 (grub_arch_modules_addr): New function.
12549 * util/misc.c: Include unistd.h.
12550 (grub_util_get_fp_size): New function.
12551 (grub_util_read_at): Likewise.
12552 (grub_util_write_image_at): Likewise.
12553 (grub_util_read_image): Call grub_util_read_at.
12554 (grub_util_write_image): Call grub_util_write_image_at.
12555 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12556 additional memory in kernel_img for a struct grub_module_info.
12557 Fill in that grub_module_info.
12558 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12560 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12562 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12564 * include/grub/powerpc/ieee1275/ieee1275.h
12565 (grub_ieee1275_milliseconds): New prototype.
12566 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12568 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12569 grub_ieee1275_milliseconds.
12571 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12573 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12575 (find_options): New function.
12576 (cmain): Call find_options.
12577 * include/grub/powerpc/ieee1275/ieee1275.h
12578 (grub_ieee1275_realmode): New extern variable.
12579 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12580 grub_map if grub_ieee1275_realmode is false.
12582 2004-12-29 Marco Gerards <metgerards@student.han.nl>
12584 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12585 lines are inserted and make it work like readline. Reported by
12586 Vincent Pelletier <subdino2004@yahoo.fr>.
12588 2004-12-28 Marco Gerards <metgerards@student.han.nl>
12590 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12592 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12593 `kern/powerpc/cache.S'.
12595 2004-12-27 Marco Gerards <metgerards@student.han.nl>
12597 * genmk.rb: Handle the `Program' class in the main loop. Written
12598 by Johan Rydberg <jrydberg@gnu.org>.
12599 (Program): New class.
12600 (programs): New variable.
12601 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12602 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12603 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12604 (help_arch): Function removed.
12605 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12606 `powerpc/libgcc.h' and `loader.h'.
12607 (pkgdata_PROGRAMS): New variable.
12608 (sbin_UTILITIES): Variable removed.
12609 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12610 (grubof_SOURCES): Variable re-defined so it only includes the
12611 core functionality.
12612 (grubof_CFLAGS): Remove `-DGRUBOF'.
12613 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12614 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12615 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12616 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12617 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12618 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12619 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12620 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12621 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12622 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12623 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12624 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12625 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12626 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12627 (pc_mod_CFLAGS): New variables.
12628 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12629 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12630 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12631 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12633 * include/grub/i386/pc/init.h (grub_os_area_addr)
12634 (rub_os_area_size): ... to here.
12635 * include/grub/powerpc/ieee1275/ieee1275.h
12636 (grub_ieee1275_entry_fn): Export symbol.
12637 * include/grub/powerpc/ieee1275/init.h: New file.
12638 * include/grub/powerpc/libgcc.h: Likewise.
12639 * include/grub/cache.h: Likewise.
12640 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12641 <hollis@penguinppc.org>.
12642 * kern/dl.c: Include <grub/cache.h>.
12643 (grub_dl_flush_cache): New function.
12644 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12646 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12647 (grub_console_init): Removed prototypes.
12648 (grub_machine_init): Don't initialize the modules anymore.
12649 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12651 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12652 Macro undef removed.
12653 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12654 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12655 relocation `R_PPC_REL32'. Return an error when the relocation is
12657 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12658 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12659 * util/misc.c (grub_arch_sync_caches): Likewise.
12661 2004-12-19 Marco Gerards <metgerards@student.han.nl>
12663 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12664 `symlist.c', add `grubof_symlist.c'.
12665 (symlist.c): Variable removed.
12666 (grubof_HEADERS): Variable added.
12667 (grubof_symlist.c): New target.
12668 (kernel_syms.lst): Use `grubof_HEADERS' instead of
12669 `kernel_img_HEADERS'.
12670 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12671 * kern/powerpc/dl.c: New file.
12672 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12674 (grub_arch_dl_relocate_symbols): Likewise.
12675 (grub_register_exported_symbols): Likewise.
12677 2004-12-13 Marco Gerards <metgerards@student.han.nl>
12679 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12680 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12681 to fail instead. Reported by Vincent Pelletier
12682 <subdino2004@yahoo.fr>.
12684 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12685 it is not allocated. Reported by Vincent Pelletier
12686 <subdino2004@yahoo.fr>.
12688 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12689 output so the output looks better.
12691 2004-12-04 Marco Gerards <metgerards@student.han.nl>
12693 Modulize the partition map support and add support for the amiga
12696 * commands/ls.c: Include <grub/partition.h> instead of
12697 <grub/machine/partition.h>.
12698 * kern/disk.c: Likewise.
12699 * kern/rescue.c: Likewise.
12700 * loader/i386/pc/chainloader.c: Likewise.
12701 * normal/cmdline.c: Likewise.
12702 * kern/powerpc/ieee1275/init.c: Likewise.
12703 (grub_machine_init): Call `grub_pc_partition_map_init',
12704 `grub_amiga_partition_map_init' and
12705 `grub_apple_partition_map_init'.
12706 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12707 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12708 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12709 `partition.h' and `pc_partition.h'.
12710 (grub_setup_SOURCES): Remove
12711 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12712 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12713 (grub_emu_SOURCES): Likewise.
12714 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12715 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12716 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12717 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12718 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12719 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12720 (grubof_SOURCES): Likewise.
12721 * disk/i386/pc/partition.c: File removed.
12722 * disk/powerpc/ieee1275/partition.c: Likewise.
12723 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12724 * include/grub/i386/pc/partition.h: Likewise.
12725 * kern/partition.c: New file.
12726 * partmap/amiga.c: Likewise.
12727 * partmap/apple.c: Likewise.
12728 * partmap/pc.c: Likewise.
12729 * include/grub/partition.h: Likewise..
12730 * include/grub/pc_partition.h: Likewise.
12731 * util/grub-emu.c: Include <grub/partition.h> instead of
12732 <grub/machine/partition.h>.
12733 (main): Call `grub_pc_partition_map_init',
12734 `grub_amiga_partition_map_init' and
12735 `grub_apple_partition_map_init' and deinitialize afterwards.
12736 * util/i386/pc/biosdisk.c: Include `#include
12737 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12738 `<grub/machine/partition.h>'.
12739 * util/i386/pc/grub-setup.c: Likewise.
12740 * util/i386/pc/biosdisk.c: Likewise.
12741 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12742 partition information in case of a PC partition.
12743 * util/i386/pc/grub-setup.c: Include `#include
12744 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12745 `<grub/machine/partition.h>'.
12746 (setup): Only access the PC specific partition information in case
12749 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
12751 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12752 (grub_longjmp): Likewise.
12753 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12755 * normal/powerpc/setjmp.S: New file.
12756 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12757 `normal/powerpc/setjmp.S'.
12758 (grubof_CFLAGS): Add `-DGRUBOF'.
12759 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12760 [GRUB_UTIL && !GRUBOF].
12762 2004-11-16 Marco Gerards <metgerards@student.han.nl>
12764 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12765 property named `name'. Correctly handle the error returned by
12766 `grub_ieee1275_finddevice' if a device can not be opened.
12768 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12770 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12771 `actual' for negativity.
12772 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12775 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12777 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12778 (PAGE_OFFSET): New macro.
12779 (CRTC_ADDR_PORT): Likewise.
12780 (CRTC_DATA_PORT): Likewise.
12781 (START_ADDR_HIGH_REGISTER): Likewise.
12782 (START_ADDR_LOW_REGISTER): Likewise.
12783 (GRAPHICS_ADDR_PORT): Likewise.
12784 (GRAPHICS_DATA_PORT): Likewise.
12785 (READ_MAP_REGISTER): Likewise.
12786 (INPUT_STATUS1_REGISTER): Likewise.
12787 (INPUT_STATUS1_VERTR_BIT): Likewise.
12788 (page): New variable.
12789 (wait_vretrace): New function.
12790 (set_read_map): Likewise.
12791 (set_start_address): Likewise.
12792 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12794 (check_vga_mem): Take the page into account.
12795 (write_char): Likewise.
12796 (write_cursor): Likewise.
12797 (scroll_up): Likewise. Copy the page to the page that is not
12798 shown and switch between both pages.
12799 (grub_vga_putchar): Fix off by one error.
12800 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12803 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12805 Add support for iso9660 (including rockridge).
12807 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12808 (iso9660_mod_SOURCES): New variable.
12809 (iso9660_mod_CFLAGS): Likewise.
12810 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12811 * include/grub/fs.h (grub_iso9660_init): New prototype.
12812 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12813 * fs/iso9660.c: New file.
12815 * include/grub/misc.h (grub_strncat): New prototype.
12816 * kern/misc.c (grub_strncat): New function.
12818 * fs/hfs.c (grub_hfs_mount): Translate the error
12819 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12820 * fs/jfs.c (grub_jfs_mount): Likewise.
12821 * fs/ufs.c (grub_ufs_mount): Likewise.
12823 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12825 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12826 which initialized BAT registers.
12827 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12828 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12830 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12831 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12833 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12834 (grub_mapclaim): Likewise.
12835 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12836 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12839 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12841 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12842 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12843 -ffreestanding and -msoft-float.
12845 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12847 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12848 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12849 set in grub_ieee1275_flags.
12851 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12853 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12855 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12856 grub_console_init first.
12857 Change the memory range used for grub_ieee1275_claim and
12858 grub_mm_init_region.
12859 Print an error message if the claim fails.
12860 Include <grub/misc.h>.
12862 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12864 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12865 Call grub_children_iterate for device nodes of type `scsi',
12867 (grub_ofdisk_open): Remove manual device alias resolution.
12868 Fix memory leak when device cannot be opened.
12869 * include/grub/powerpc/ieee1275/ieee1275.h
12870 (grub_children_iterate): New prototype.
12871 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12873 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12874 Return -1 if args.size was -1.
12876 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12878 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12879 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12880 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12881 Open Firmware's memory for it; claim memory from _start to _end.
12882 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12883 (_end): New extern.
12884 (_start): Zero BSS from __bss_start to _end.
12885 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12887 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12889 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12891 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12892 -1 if args.base was -1.
12894 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12896 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12897 escape sequence instead of a literal ^L. Also call
12898 grub_ofconsole_gotoxy.
12900 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12902 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12903 void * arguments to grub_addr_t. All callers updated. Also make
12904 the `result' argument optional.
12905 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12906 All callers updated.
12908 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12910 * commands/ls.c (grub_ls_list_files): Use the string following the
12911 initial ')', if present, as the filesystem path.
12912 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12914 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12916 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12918 Make the source code of the menu interface more readable.
12920 * normal/menu.c: Include grub/mm.h.
12921 (TERM_WIDTH): New macro.
12922 (TERM_HEIGHT): Likewise.
12923 (TERM_INFO_HEIGHT): Likewise.
12924 (TERM_MARGIN): Likewise.
12925 (TERM_SCROLL_WIDTH): Likewise.
12926 (TERM_TOP_BORDER_Y): Likewise.
12927 (TERM_LEFT_BORDER_X): Likewise.
12928 (TERM_BORDER_WIDTH): Likewise.
12929 (TERM_MESSAGE_HEIGHT): Likewise.
12930 (TERM_BORDER_HEIGHT): Likewise.
12931 (TERM_NUM_ENTRIES): Likewise.
12932 (TERM_FIRST_ENTRY_Y): Likewise.
12933 (TERM_ENTRY_WIDTH): Likewise.
12934 (TERM_CURSOR_X): Likewise.
12935 (draw_border): Use macros instead of magic numbers.
12936 (print_entry): Likewise.
12937 (print_entries): Likewise.
12938 (run_menu): Likewise. Also, handle the key 'e'.
12939 (run_menu_entry): Ignore empty command lines.
12940 (print_message): Added a new argument EDIT. If EDIT is true,
12941 print a different message.
12942 (init_page): Likewise.
12943 (edit_menu_entry): New function. Not implemented yet.
12945 2004-09-17 Marco Gerards <metgerards@student.han.nl>
12947 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12948 can be loaded from normal mode.
12950 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12952 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12953 (multiboot_mod_CFLAGS): New variables.
12954 * loader/i386/pc/linux_normal.c: New file.
12955 * loader/i386/pc/multiboot_normal.c: Likewise.
12957 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12958 attribute `unused'.
12960 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12961 `fdiro' to read the mode information from instead of `diro'.
12963 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12964 looking up a symlink.
12966 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12968 * normal/command.c (grub_command_execute): Don't parse the
12969 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12970 flags of the command.
12972 * normal/menu.c (grub_menu_run): Fix typo.
12974 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12976 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12978 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12979 `y + 1' instead of `y - 1'.
12981 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12983 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12985 From Hollis Blanchard <hollis@penguinppc.org>:
12986 * kern/misc.c (memmove): New alias for grub_memmove.
12987 (memcmp): New alias for grub_memcmp.
12988 (memset): New alias for grub_memset.
12989 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12990 Change "int handle" to "grub_ieee1275_phandle_t handle".
12991 * include/grub/powerpc/ieee1275/ieee1275.h
12992 (grub_ieee1275_get_property): Likewise.
12994 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12996 Added normal mode command `chainloader' as module chain.mod, which
12997 depends on normal.mod and _chain.mod.
12999 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13000 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13001 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13003 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13004 but arguments parsing moved to ...
13005 (grub_chainloader_cmd): ... here. New function.
13006 * include/grub/i386/pc/chainloader.h: New file.
13007 * loader/i386/pc/chainloader_normal.c: Likewise.
13009 2004-09-11 Marco Gerards <metgerards@student.han.nl>
13011 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13012 (grub_mkimage_LDFLAGS): Likewise.
13013 (grub_emu_SOURCES): Likewise.
13014 (kernel_img_HEADERS): Added fshelp.h.
13015 * fs/ext2.c: Include <grub/fshelp.h>.
13016 (FILETYPE_REG): New macro.
13017 (FILETYPE_INO_REG): Likewise.
13018 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13020 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
13022 (grub_fshelp_node): New struct.
13023 (grub_ext2_data): Added member `diropen'. Changed member `inode'
13025 (grub_ext2_get_file_block): Removed function.
13026 (grub_ext2_read_block): New function.
13027 (grub_ext2_read_file): Replaced parameter `data' by `node'.
13028 This function was written.
13029 (grub_ext2_mount): Read the root inode. Create a diropen struct.
13030 (grub_ext2_find_file): Removed function.
13031 (grub_ext2_read_symlink): New function.
13032 (grub_ext2_iterate_dir): Likewise.
13033 (grub_ext2_open): Rewritten.
13034 (grub_ext2_dir): Rewritten.
13035 * include/grub/fshelp.h: New file.
13036 * fs/fshelp.c: Likewise.
13038 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
13040 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13041 (print_message): Add a missing newline.
13042 (run_menu): Added timeout support.
13043 (run_menu_entry): New local function.
13044 (grub_menu_run): Added support for booting.
13046 * kern/loader.c (grub_loader_is_loaded): New function.
13048 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13049 (grub_get_rtc): Exported.
13051 * include/grub/i386/pc/time.h: Include grub/symbol.h.
13052 (grub_get_rtc): Exported.
13054 * include/grub/normal.h (struct grub_command_list): Remove
13055 constant from the member `command'.
13057 * include/grub/loader.h (grub_loader_is_loaded): Declared.
13059 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13061 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13063 2004-08-28 Marco Gerards <metgerards@student.han.nl>
13065 Add support for the JFS filesystem.
13067 * fs/jfs.c: New file.
13068 * include/grub/fs.h (grub_jfs_init): New prototype.
13069 (grub_jfs_fini): New prototype.
13070 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13071 (grub_emu_SOURCES): Likewise.
13072 (pkgdata_MODULES): Add jfs.mod.
13073 (jfs_mod_SOURCES): New variable.
13074 (jfs_mod_CFLAGS): Likewise.
13075 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13076 (grubof_SOURCES): Likewise.
13077 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13079 * fs/fat.c (grub_fat_find_dir): Convert the filename little
13080 endian to the host endian.
13081 (grub_fat_utf16_to_utf8): Move function from there...
13082 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
13083 the endianness of the source string anymore.
13084 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13086 2004-08-24 Marco Gerards <metgerards@student.han.nl>
13088 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13089 (grub_boot_fini) [GRUB_UTIL]: Likewise.
13090 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13091 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
13093 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13094 (grub_hfs_iterate_dir): Make the function static. Add prototypes
13095 for `node_found' and `it_dir'.
13096 (grub_hfs_dir): Add prototype for `dir_hook'.
13098 * fs/minix.c (grub_minix_get_file_block): Add prototype for
13099 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
13100 and `indir32' to silence a gcc warning.
13102 * include/grub/fs.h (grub_hfs_init): New prototype.
13103 (grub_hfs_fini): Likewise.
13106 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13108 Each disk device has its own id now. This is useful to make use
13109 of multiple disk devices.
13111 * include/grub/disk.h (grub_disk_dev_id): New enum.
13112 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13113 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13115 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13116 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13118 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13119 GRUB_DISK_DEVICE_OFDISK_ID as an id.
13121 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13122 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13124 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13125 "id" which is used by the cache manager.
13127 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13130 2004-08-18 Marco Gerards <metgerards@student.han.nl>
13132 * fs/hfs.c: New file.
13133 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13134 (grub_emu_SOURCES): Likewise.
13135 (pkgdata_MODULES): Add hfs.mod.
13136 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13137 (grubof_SOURCES): Likewise.
13138 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13140 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13141 * kern/misc.c (grub_strncasecmp): Add function.
13143 2004-08-14 Marco Gerards <metgerards@student.han.nl>
13145 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13148 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13149 (grub_ext2_dir): In case the directory entry type is unknown, read
13152 2004-08-02 Peter Bruin <pjbruin@dds.nl>
13154 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13155 grub_load_linux instead of grub_rescue_cmd_linux as second
13156 argument of grub_rescue_register_command.
13158 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13160 2004-07-27 Marco Gerards <metgerards@student.han.nl>
13162 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13164 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13165 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13166 `loader/powerpc/ieee1275/linux.c',
13167 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13168 * include/grub/powerpc/ieee1275/ieee1275.h
13169 (grub_ieee1275_release): New prototype.
13170 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13171 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13172 normal, boot, linux and linux_normal.
13173 * loader/powerpc/ieee1275/linux.c: New file.
13174 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13176 2004-07-12 Marco Gerards <metgerards@student.han.nl>
13178 * normal/arg.c (grub_arg_parse): Correct error handling after
13179 reallocating the argumentlist (check if `argl' is not null instead
13180 of checking if `args' is not null).
13181 * kern/mm.c (grub_realloc): Return the same pointer when using the
13182 same region, instead of returning the header address.
13184 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13186 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13187 one block instead of two when looking for the initial partition.
13188 (grub_partition_probe): Initialize the local variable `p' with 0.
13189 Use base 10 for the grub_strtoul call.
13190 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13191 need for one local variable.
13192 (grub_strtoul): Don't add the new value to `num', instead of that
13195 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13197 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13198 (pxeboot_img_SOURCES): New variable.
13199 (pxeboot_img_ASFLAGS): Likewise.
13200 (pxeboot_img_LDFLAGS): Likewise.
13201 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13202 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13203 <lode_leroy@hotmail.com>.
13205 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13207 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13208 there was no input.
13210 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13212 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13213 the history buffer logic.
13215 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13217 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13218 (FILETYPE_INO_SYMLINK): New macros.
13219 (grub_ext2_find_file): Check if the node is a directory using the
13220 inode stat information instead of using the filetype in the
13221 dirent. Exclude the first character of an absolute symlink.
13222 (grub_ext2_dir): Mask out the filetype part of the mode member of
13225 2004-05-24 Marco Gerards <metgerards@student.han.nl>
13227 Add support for UFS version 1 and 2. Add support for the minix
13228 filesystem version 1 and 2, both the variants with 14 and 30 long
13231 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13233 (grub_emu_SOURCES): Likewise.
13234 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13235 (ufs_mod_SOURCES): New variable.
13236 (ufs_mod_CFLAGS): Likewise.
13237 (minix_mod_SOURCES): Likewise.
13238 (minix_mod_CFLAGS): Likewise.
13239 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13241 (grubof_SOURCES): Likewise.
13242 * fs/ufs.c: New file.
13243 * fs/minix.c: New file.
13244 * include/grub/fs.h (grub_ufs_init): New prototype.
13245 (grub_ufs_fini): Likewise.
13246 (grub_minix_init): Likewise.
13247 (grub_minix_fini): Likewise.
13248 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13251 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13253 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13254 commands/ls.c, commands/terminal.c, commands/boot.c,
13255 commands/cmp.c and commands/cat.c.
13256 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13258 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13261 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13263 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13264 and grub_, respectively. Because the conversion is trivial and
13265 mechanical, I omit the details here. Please refer to the CVS
13266 if you need more information.
13268 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13270 * include/pupa: Renamed to ...
13271 * include/grub: ... this.
13272 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13273 * util/i386/pc/grub-mkimage.c: ... this.
13274 * util/i386/pc/pupa-setup.c: Renamed to ...
13275 * util/i386/pc/grub-setup.c: ... this.
13276 * util/pupa-emu.c: Renamed to ...
13277 * util/grub-emu.c: ... this.
13279 2004-03-29 Marco Gerards <metgerards@student.han.nl>
13281 Add support for the newworld apple macintosh (PPC). This has been
13282 tested on the powerbook 2000 only. It only adds support for
13283 generic ieee1275 functions, console and disk support. This should
13284 be easy to port to other architectures with support for Open
13287 * configure.ac: Accept the powerpc as host_cpu. In the case of
13288 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13289 specific tests are only executed while building for the i386.
13290 Inverse test for crosscompile.
13291 * genmk.rb (Utility): Allow assembler files.
13292 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13293 * conf/powerpc-ieee1275.rmk: New file.
13294 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13295 * disk/powerpc/ieee1275/partition.c: Likewise.
13296 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13297 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13298 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13299 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13300 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13301 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13302 * include/pupa/powerpc/ieee1275/loader.h
13303 * include/pupa/powerpc/setjmp.h: Likewise.
13304 * include/pupa/powerpc/types.h: Likewise.
13305 * kern/powerpc/ieee1275/init.c: Likewise.
13306 * kern/powerpc/ieee1275/openfw.c: Likewise.
13307 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13309 These files were written by Johan Rydberg
13310 (jrydberg@night.trouble.net) and I only modified them slightly.
13312 * boot/powerpc/ieee1275/cmain.c: New file.
13313 * boot/powerpc/ieee1275/crt0.S: Likewise.
13314 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13315 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13317 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13319 * Makefile.in: Update copyright.
13320 * genmodsrc.sh: Likewise.
13321 * gensymlist.sh: Likewise.
13322 * term/i386/pc/vga.c: Indent correctly.
13324 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13325 bugreporting address.
13326 * util/i386/pc/pupa-setup.c (usage): Likewise,
13327 (main): Call pupa_ext2_init and pupa_ext2_fini.
13329 * fs/fat.c (log2): Renamed to ...
13330 (fat_log2): ... this.
13331 All callers changed.
13332 * kern/misc.c (memcpy): Alias to pupa_memmove.
13333 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13335 * util/console.c (pupa_ncurses_fini): Return 0.
13337 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13338 Move fail label here.
13339 [__GNU__]: Don't warn when using stat.
13340 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13341 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13342 long int. Use strtol instead of strtoul.
13344 2004-03-14 Marco Gerards <metgerards@student.han.nl>
13346 * commands/boot.c: New file.
13347 * commands/cat.c: Likewise.
13348 * commands/cmp.c: Likewise.
13349 * commands/ls.c: Likewise.
13350 * commands/terminal.c: Likewise.
13351 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13352 (pupa_register_command): Changed interface to match the new
13354 (pupa_command_execute): Changed (almost rewritten) so it uses
13355 pupa_split_command. Added support for setting variables using the
13357 (rescue_command): Changed to work with the new argument parser.
13358 (terminal_command): Moved from here to commands/terminal.c.
13359 (set_command): New function.
13360 (unset_command): New function.
13361 (insmod_command): New function.
13362 (rmmod_command): New function.
13363 (lsmod_command): New function.
13364 (pupa_command_init): Don't initialize the command terminal
13365 anymore. Initialize the commands set, unset, insmod, rmmod and
13367 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13368 (kernel_img_HEADERS): Add arg.h and env.h.
13369 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13370 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13371 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13373 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13375 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13376 (boot_mod_SOURCES): New variable.
13377 (terminal_mod_SOURCES): Likewise.
13378 (ls_mod_SOURCES): Likewise.
13379 (cmp_mod_SOURCES): Likewise.
13380 (cat_mod_SOURCES): Likewise.
13382 * normal/arg.c: New file.
13383 * kern/env.c: Likewise.
13384 * include/pupa/arg.h: Likewise.
13385 * include/pupa/env.h: Likewise.
13386 * font/manager.c (font_command): Changed to match argument parsing
13388 (PUPA_MOD_INIT): Likewise.
13389 * hello/hello.c (pupa_cmd_hello): Likewise.
13390 (PUPA_MOD_INIT): Likewise.
13391 * include/pupa/disk.h: Include <pupa/device.h>.
13392 (pupa_print_partinfo): New prototype.
13393 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13394 (pupa_dl_get_prefix): Likewise.
13395 * include/pupa/misc.h: Include <pupa/err.h>.
13396 (pupa_isgraph): New prototype.
13397 (pupa_isdigit): Likewise.
13398 (pupa_split_cmdline): Likewise.
13399 * include/pupa/normal.h: Include <pupa/arg.h>.
13400 (pupa_command): Changed the prototype of the member `func' to
13401 match the argument parsing interface. Added member `options'.
13402 (pupa_register_command): Updated to match function.
13403 (pupa_arg_parse): New prototype.
13404 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13405 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13406 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13407 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13408 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13409 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13410 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13411 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13412 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13413 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13414 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13415 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13416 * kern/disk.c: Include <pupa/file.h>.
13417 (pupa_print_partinfo): New function.
13418 * kern/dl.c: Include <pupa/env.h>.
13419 (pupa_dl_dir): Variable removed.
13420 (pupa_dl_load): Use the environment variable `prefix' instead of
13421 the variable pupa_dl_dir.
13422 (pupa_dl_set_prefix): Function removed.
13423 (pupa_dl_get_prefix): Likewise.
13424 * kern/i386/pc/init.c: Include <pupa/env.h>.
13425 (pupa_machine_init): Use the environment variable `prefix' instead of
13426 using pupa_dl_set_prefix to set the prefix.
13427 * kern/main.c: Include <pupa/env.h>.
13428 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13429 using pupa_dl_get_prefix to get the prefix.
13430 * kern/misc.c: Include <pupa/env.h>.
13431 (pupa_isdigit): New function.
13432 (pupa_isgraph): Likewise.
13433 (pupa_ftoa): Likewise.
13434 (pupa_vsprintf): Added support for printing values of the type
13435 `double'. Make it possible to format variable output when using
13436 formatting like `%1.2%f'.
13437 (pupa_split_cmdline): New function.
13438 * kern/rescue.c: Include <pupa/env.h>.
13439 (next_word): Removed function.
13440 (pupa_rescue_cmd_prefix): Likewise.
13441 (pupa_rescue_cmd_set): New function.
13442 (pupa_rescue_cmd_unset): New function.
13443 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13444 split the command line instead of splitting it here. Added
13445 support for setting variables using the syntax `foo=bar'. Don't
13446 initialize the prefix command anymore. Initialized the set and
13448 * normal/cmdline.c: Include <pupa/env.h>.
13449 (pupa_tab_complete): Added prototypes for print_simple_completion,
13450 print_partition_completion, add_completion, iterate_commands,
13451 iterate_dev, iterate_part and iterate_dir. Moved code to print
13452 partition information from here to kern/disk.c.
13453 (pupa_cmdline_run): Don't check if the function exists anymore.
13454 * normal/main.c: Include <pupa/env.h>.
13455 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13456 instead of using pupa_dl_get_prefix to get the prefix.
13457 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13458 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13460 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13461 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13462 ((unused))' to silence a gcc warning.
13463 (pupa_vga_setcolor): Likewise.
13464 (debug_command): Changed to match argument parsing
13466 * util/pupa-emu.c: Include <pupa/env.h>.
13467 (options): Added 0's for unused fields to silence a gcc warning.
13469 (main): Use the environment variable `prefix' instead of using
13470 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13471 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13474 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13475 * util/misc.c: Include <malloc.h>.
13476 (pupa_malloc): Rewritten so errors are correctly reported.
13477 (pupa_realloc): Likewise.
13478 (pupa_memalign): Likewise.
13479 (pupa_mm_init_region): Declare unused variables with
13480 `__attribute__ ((unused))' to silence a gcc warning.
13481 * normal/i386/setjmp.S: Remove tab at the end of the file to
13482 silence a gcc warning.
13483 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13484 variables with `__attribute__ ((unused))' to silence a gcc
13486 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13487 local variable i unsigned to silence a gcc warning.
13489 * kern/term.c: Include <pupa/misc.h>.
13490 (pupa_more_lines): New variable.
13491 (pupa_more): Likewise.
13492 (pupa_putcode): When the pager is active pause at the end of every
13494 (pupa_set_more): New function.
13495 * include/pupa/term.h (pupa_set_more): New prototype.
13498 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13500 Now this project is GRUB 2 rather than PUPA. The location of
13501 the CVS repository was moved to GRUB's.
13503 * configure.ac: Use bug-grub as the reporting address.
13504 Use GRUB instead of PUPA.
13505 Change the version number to 1.90.
13507 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13509 * genkernsyms.sh: Updated copyright information.
13510 * genmk.rb: Likewise.
13511 * genmodsrc.sh: Likewise.
13512 * gensymlist.sh: Likewise.
13513 * boot/i386/pc/boot.S: Likewise.
13514 * boot/i386/pc/diskboot.S: Likewise.
13515 * disk/i386/pc/biosdisk.c: Likewise.
13516 * disk/i386/pc/partition.c: Likewise.
13517 * font/manager.c: Likewise.
13518 * fs/ext2.c: Likewise.
13519 * fs/fat.c: Likewise.
13520 * include/pupa/boot.h: Likewise.
13521 * include/pupa/device.h: Likewise.
13522 * include/pupa/disk.h: Likewise.
13523 * include/pupa/dl.h: Likewise.
13524 * include/pupa/elf.h: Likewise.
13525 * include/pupa/err.h: Likewise.
13526 * include/pupa/file.h: Likewise.
13527 * include/pupa/font.h: Likewise.
13528 * include/pupa/fs.h: Likewise.
13529 * include/pupa/kernel.h: Likewise.
13530 * include/pupa/loader.h: Likewise.
13531 * include/pupa/misc.h: Likewise.
13532 * include/pupa/mm.h: Likewise.
13533 * include/pupa/net.h: Likewise.
13534 * include/pupa/normal.h: Likewise.
13535 * include/pupa/rescue.h: Likewise.
13536 * include/pupa/setjmp.h: Likewise.
13537 * include/pupa/symbol.h: Likewise.
13538 * include/pupa/term.h: Likewise.
13539 * include/pupa/types.h: Likewise.
13540 * include/pupa/i386/setjmp.h: Likewise.
13541 * include/pupa/i386/types.h: Likewise.
13542 * include/pupa/i386/pc/biosdisk.h: Likewise.
13543 * include/pupa/i386/pc/boot.h: Likewise.
13544 * include/pupa/i386/pc/console.h: Likewise.
13545 * include/pupa/i386/pc/init.h: Likewise.
13546 * include/pupa/i386/pc/kernel.h: Likewise.
13547 * include/pupa/i386/pc/linux.h: Likewise.
13548 * include/pupa/i386/pc/loader.h: Likewise.
13549 * include/pupa/i386/pc/memory.h: Likewise.
13550 * include/pupa/i386/pc/multiboot.h: Likewise.
13551 * include/pupa/i386/pc/partition.h: Likewise.
13552 * include/pupa/i386/pc/time.h: Likewise.
13553 * include/pupa/i386/pc/vga.h: Likewise.
13554 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13555 * include/pupa/util/getroot.h: Likewise.
13556 * include/pupa/util/misc.h: Likewise.
13557 * include/pupa/util/resolve.h: Likewise.
13558 * kern/device.c: Likewise.
13559 * kern/disk.c: Likewise.
13560 * kern/dl.c: Likewise.
13561 * kern/err.c: Likewise.
13562 * kern/file.c: Likewise.
13563 * kern/fs.c: Likewise.
13564 * kern/loader.c: Likewise.
13565 * kern/main.c: Likewise.
13566 * kern/misc.c: Likewise.
13567 * kern/mm.c: Likewise.
13568 * kern/rescue.c: Likewise.
13569 * kern/term.c: Likewise.
13570 * kern/i386/dl.c: Likewise.
13571 * kern/i386/pc/init.c: Likewise.
13572 * kern/i386/pc/lzo1x.S: Likewise.
13573 * kern/i386/pc/startup.S: Likewise.
13574 * loader/i386/pc/chainloader.c: Likewise.
13575 * loader/i386/pc/linux.c: Likewise.
13576 * loader/i386/pc/multiboot.c: Likewise.
13577 * normal/cmdline.c: Likewise.
13578 * normal/command.c: Likewise.
13579 * normal/main.c: Likewise.
13580 * normal/menu.c: Likewise.
13581 * normal/i386/setjmp.S: Likewise.
13582 * term/i386/pc/console.c: Likewise.
13583 * term/i386/pc/vga.c: Likewise.
13584 * util/console.c: Likewise.
13585 * util/genmoddep.c: Likewise.
13586 * util/misc.c: Likewise.
13587 * util/pupa-emu.c: Likewise.
13588 * util/resolve.c: Likewise.
13589 * util/unifont2pff.rb: Likewise.
13590 * util/i386/pc/biosdisk.c: Likewise.
13591 * util/i386/pc/getroot.c: Likewise.
13592 * util/i386/pc/pupa-mkimage.c: Likewise.
13593 * util/i386/pc/pupa-setup.c: Likewise.
13595 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13597 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13598 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13599 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13600 reading and reset it after reading.
13601 (pupa_ext2_close): Return PUPA_ERR_NONE.
13603 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13605 (struct linux_kernel_header): Add kernel_version and
13607 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13608 pupa_file_read succeeds.
13609 (pupa_rescue_cmd_initrd): Implement.
13611 2003-12-03 Marco Gerards <metgerards@student.han.nl>
13613 * fs/ext2.c (pupa_ext2_label): New function.
13614 (pupa_ext2_fs): Added label.
13615 * fs/fat.c (pupa_fat_label): New function.
13616 (pupa_fat_fs): Added label.
13617 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13619 * kern/misc.c (pupa_strndup): New function.
13620 * include/pupa/misc.h (pupa_strndup): New prototype.
13622 * include/pupa/normal.h: Include <pupa/err.h>.
13623 (pupa_set_history): New prototype.
13624 (pupa_iterate_commands): New prototype.
13625 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13626 <pupa/disk.h>, <pupa/file.h>.
13627 (hist_size): New variable.
13628 (hist_lines): Likewise.
13629 (hist_end): Likewise.
13630 (hist_used): Likewise.
13631 (pupa_set_history): New function.
13632 (pupa_history_get): Likewise.
13633 (pupa_history_add): Likewise.
13634 (pupa_history_replace): Likewise.
13635 (pupa_tab_complete): Likewise.
13636 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13637 completion shows partitionnames while completing partitions, this
13638 feature was suggested by Jeff Bailey.
13639 * normal/command.c (pupa_iterate_commands): New function.
13640 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13641 (pupa_normal_init): Initialize history buffer.
13642 (PUPA_MOD_INIT): Likewise.
13643 (pupa_normal_fini): Free the history buffer.
13644 (PUPA_MOD_FINI): Likewise.
13646 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13649 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13650 * configure.ac [i386]: Check for regparam bug.
13651 (NESTED_FUNC_ATTR) [! i386]: Defined.
13653 2003-11-17 Marco Gerards <metgerards@student.han.nl>
13655 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13656 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13657 (pupa_emu_SOURCES): New variable.
13658 (pupa_emu_LDFLAGS): Likewise.
13659 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
13660 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
13661 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
13662 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13663 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13664 (pupa_jmp_buf): New typedef.
13665 (pupa_setjmp) [PUPA_UTIL]: New macro.
13666 (pupa_longjmp) [PUPA_UTIL]: Likewise.
13667 * include/pupa/term.h (struct pupa_term): New member `refresh'.
13668 (pupa_refresh): New prototype.
13669 * include/pupa/util/getroot.h: New file.
13670 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13672 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13673 (pupa_rescue_cmd_cat): Likewise.
13674 (pupa_rescue_cmd_ls): Likewise.
13675 (pupa_rescue_cmd_testload): Likewise.
13676 (pupa_rescue_cmd_lsmod): Likewise.
13677 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13678 * normal/menu.c (run_menu): Likewise.
13679 * kern/term.c (pupa_cls): Likewise.
13680 (pupa_refresh): New function.
13681 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13682 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13683 * util/console.c: New file.
13685 * util/i386/pc/getroot.c: New file.
13686 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13687 (pupa_putchar): New function.
13688 (pupa_refresh): Likewise.
13689 (xgetcwd): Function moved to ...
13690 (strip_extra_slashes): Likewise.
13691 (get_prefix): Likewise.
13692 * util/i386/pc/getroot.c: ... here.
13693 (find_root_device): Function moved and renamed to...
13694 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13695 Changed all callers.
13696 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13698 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13699 Changed all callers.
13700 * util/misc.c (pupa_memalign): New function.
13701 (pupa_mm_init_region): Likewise.
13702 (pupa_register_exported_symbols): Likewise.
13703 (pupa_putchar): Function removed.
13704 * util/pupa-emu.c: New file.
13706 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13708 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13709 (_multiboot_mod_SOURCES): New variable.
13710 (_multiboot_mod_CFLAGS): Likewise.
13711 * loader/i386/pc/multiboot.c: New file.
13712 * include/pupa/i386/pc/multiboot.h: Likewise.
13713 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13714 (pupa_multiboot_real_boot): New function.
13715 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13716 (pupa_multiboot_real_boot): New prototype.
13717 (pupa_rescue_cmd_multiboot): Likewise
13718 (pupa_rescue_cmd_module): Likewise.
13720 * kern/loader.c (pupa_loader_set): Continue when
13721 pupa_loader_unload_func() fails.
13722 (pupa_loader_unset): New function.
13723 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13725 * kern/misc.c (pupa_stpcpy): New function.
13726 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13728 2003-11-12 Marco Gerards <metgerards@student.han.nl>
13730 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13731 for available extensions.
13733 * include/pupa/i386/pc/time.h: New file.
13734 * kern/disk.c: Include <pupa/machine/time.h>.
13735 (PUPA_CACHE_TIMEOUT): New macro.
13736 (pupa_last_time): New variable.
13737 (pupa_disk_open): Flush the cache when there was a timeout.
13738 (pupa_disk_close): Reset the timer.
13739 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13741 * util/misc.c: Include <sys/times.h>
13742 (pupa_get_rtc): New function.
13744 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13746 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13748 (pupa_ext2_get_file_block): Use blocks member.
13750 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13751 first block. Return -1 instead of pupa_errno on error.
13753 2003-10-27 Marco Gerards <metgerards@student.han.nl>
13755 * README: In the pupa-mkimage example use _chain instead of chain
13756 and ext2 instead of fat.
13757 * TODO: Replace ext2fs with jfs as an example. Add an item for
13758 adding journal playback for ext2fs.
13759 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13760 (pkgdata_MODULES): Added ext2.mod.
13761 (ext2_mod_SOURCES): New variable.
13762 (ext2_mod_CFLAGS): Likewise.
13763 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13764 * include/pupa/misc.h (pupa_strncpy): New prototype.
13765 (pupa_strcat): Likewise.
13766 (pupa_strncmp): Likewise.
13767 * kern/misc.c (pupa_strcat): Enable function.
13768 (pupa_strncpy): New function.
13769 (pupa_strncmp): Likewise.
13770 * fs/ext2.c: New file.
13772 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13773 when the read failed before retrying.
13774 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13775 (_FILE_OFFSET_BITS): Likewise.
13776 * configure.ac: Added AC_SYS_LARGEFILE.
13778 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13780 * genmk.rb (PModule#rule): Make sure to get only symbol names
13781 from the output of nm.
13782 Reported by Robert Millan <zeratul2@wanadoo.es>.
13784 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13786 I forgot to check in these changes for a long time. This adds
13787 incomplete support for VGA console, and this is still very
13788 buggy. Also, a lot of consideration is required for I18N,
13789 UNICODE, and VGA font issues. Therefore, assume that this is
13790 such that "better than nothing".
13792 * font/manager.c: New file.
13793 * include/pupa/font.h: Likewise.
13794 * include/pupa/i386/pc/vga.h: Likewise.
13795 * term/i386/pc/vga.c: Likewise.
13796 * util/unifont2pff.rb: Likewise.
13798 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13799 (pkgdata_MODULES): Added vga.mod and font.mod.
13800 (vga_mod_SOURCES): New variables.
13801 (vga_mod_CFLAGS): Likewise.
13802 (font_mod_SOURCES): Likewise.
13803 (font_mod_CFLAGS): Likewise.
13805 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13807 * include/pupa/term.h: Include pupa/err.h.
13808 (struct pupa_term): Added init and fini.
13809 Changed the argument of putchar to pupa_uint32_t.
13811 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13812 (pupa_console_real_putchar): New prototype.
13813 (pupa_console_putchar): Removed.
13814 (pupa_console_checkkey): Exported.
13815 (pupa_console_getkey): Likewise.
13817 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13820 * kern/term.c (pupa_term_set_current): Rewritten.
13821 (pupa_putchar): Likewise.
13822 (pupa_putcode): New function.
13824 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13825 (pupa_console_real_putchar): ... this.
13826 (pupa_vga_set_mode): New function.
13827 (pupa_vga_get_font): Likewise.
13829 * normal/command.c: Include pupa/term.h.
13830 (terminal_command): New function.
13831 (pupa_command_init): Register the command "terminal".
13833 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13834 (DISP_UP): Likewise.
13835 (DISP_RIGHT): Likewise.
13836 (DISP_DOWN): Likewise.
13837 (DISP_HLINE): Likewise.
13838 (DISP_VLINE): Likewise.
13839 (DISP_UL): Likewise.
13840 (DISP_UR): Likewise.
13841 (DISP_LL): Likewise.
13842 (DISP_LR): Likewise.
13844 * term/i386/pc/console.c (pupa_console_putchar): New function.
13846 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13848 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13849 FIX. Reverse the path_list.
13851 * include/pupa/normal.h: Export pupa_register_command and
13852 pupa_unregister_command.
13854 * hello/hello.c (pupa_cmd_hello): New module.
13855 * conf/i386-pc.rmk: Added hello.mod.
13857 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13859 * kern/i386/pc/lzo1x.S: New file.
13861 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13862 (compress_kernel): New variable.
13863 (generate_image): Heavily modified to support compressing a
13864 large part of the core image.
13866 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13868 (pupa_util_load_image): New function.
13870 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13871 (pupa_compressed_size): New variable.
13872 (codestart): Enable Gate A20 here.
13873 Decompress the compressed part of the core image.
13874 Rearrange the code to put functions and variables which are
13875 required for initialization in the non-compressed part.
13878 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13881 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13883 * include/pupa/i386/pc/kernel.h
13884 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13885 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13886 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13887 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13888 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13890 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13892 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13893 (Utility#rule): Likewise.
13895 * configure.ac: Check if LZO is available.
13897 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13899 * include/pupa/normal.h: New file.
13900 * include/pupa/setjmp.h: Likewise.
13901 * include/pupa/i386/setjmp.h: Likewise.
13902 * normal/cmdline.c: Likewise.
13903 * normal/command.c: Likewise.
13904 * normal/main.c: Likewise.
13905 * normal/menu.c: Likewise.
13906 * normal/i386/setjmp.S: Likewise.
13908 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13909 (pupa_rescue_cmd_initrd): Likewise.
13911 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13914 * kern/i386/pc/startup.S (translation_table): New variable.
13915 (translate_keycode): New function.
13916 (pupa_console_getkey): Call translate_keycode.
13918 * kern/rescue.c (attempt_normal_mode): New function.
13919 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13920 it failed, print a message.
13922 * kern/mm.c (pupa_real_malloc): Print more information when a
13923 free magic is broken.
13924 (pupa_free): If the first free header is not free actually, set
13927 * kern/main.c (pupa_load_normal_mode): Just load the module
13929 (pupa_main): Don't print the message
13930 "Entering into rescue mode..." here.
13932 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13934 (pupa_rescue_cmd_initrd): Likewise.
13935 (pupa_rescue_cmd_initrd): Likewise.
13937 * include/pupa/symbol.h (FUNCTION): Specify the type.
13938 (VARIABLE): Likewise.
13940 * include/pupa/err.h (pupa_err_t): Added
13941 PUPA_ERR_UNKNOWN_COMMAND.
13943 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13944 (pupa_dl_get_prefix): Likewise.
13946 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13947 Added _chain.mod and _linux.mod instead of chain.mod and
13949 (chain_mod_SOURCES): Renamed to ...
13950 (_chain_mod_SOURCES): ... this.
13951 (chain_mod_CFLAGS): Renamed to ...
13952 (_chain_mod_CFLAGS): ... this.
13953 (linux_mod_SOURCES): Renamed to ...
13954 (_linux_mod_SOURCES): ... this.
13955 (linux_mod_CFLAGS): Renamed to ...
13956 (_linux_mod_CFLAGS): ... this.
13957 (normal_mod_SOURCES): New variable.
13958 (normal_mod_CFLAGS): Likewise.
13959 (normal_mod_ASFLAGS): Likewise.
13961 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13963 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13966 * kern/dl.c (pupa_dl_ref): Refer depending modules
13968 (pupa_dl_unref): Unrefer depending modules recursively.
13969 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13970 a module is unloaded before one depending on that module is
13972 (pupa_dl_unload): Unload depending modules explicitly,
13975 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13977 * include/pupa/i386/pc/linux.h: New file.
13978 * loader/i386/pc/linux.c: Likewise.
13980 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13982 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13983 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13984 of PUPA_CHAINLOADER_BOOT_SECTOR.
13986 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13987 (pupa_linux_prot_size): New variable.
13988 (pupa_linux_tmp_addr): Likewise.
13989 (pupa_linux_real_addr): Likewise.
13990 (pupa_linux_boot_zimage): New function.
13991 (pupa_linux_boot_bzimage): Likewise.
13993 * kern/i386/pc/init.c (struct mem_region): New structure.
13994 (MAX_REGIONS): New macro.
13995 (mem_regions): New variable.
13996 (num_regions): Likewise.
13997 (pupa_os_area_addr): Likewise.
13998 (pupa_os_area_size): Likewise.
13999 (pupa_lower_mem): Likewise.
14000 (pupa_upper_mem): Likewise.
14001 (add_mem_region): New function.
14002 (compact_mem_regions): Likewise.
14003 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14004 the size of the conventional memory and that of so-called upper
14005 memory (before the first memory hole).
14006 Instead of adding each found region to free memory, use
14007 add_mem_region and add them after removing overlaps.
14008 Also, add only 1/4 of the upper memory to free memory. The rest
14009 is used for loading OS images. Maybe this is ad hoc, but this
14010 makes it much easier to relocate OS images when booting.
14012 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14013 (pupa_enter_rescue_mode): Don't register initrd and module.
14015 * kern/mm.c: Include pupa/dl.h.
14017 * kern/main.c: Include pupa/file.h and pupa/device.h.
14019 * kern/loader.c (pupa_loader_load_module_func): Removed.
14020 (pupa_loader_load_module): Likewise.
14022 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14025 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14026 (pupa_linux_tmp_addr): Likewise.
14027 (pupa_linux_real_addr): Likewise.
14028 (pupa_linux_boot_zimage): Likewise.
14029 (pupa_linux_boot_bzimage): Likewise.
14031 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14032 (pupa_upper_mem): Likewise.
14033 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14034 module is too dangerous.
14036 * include/pupa/loader.h (pupa_os_area_addr): Declared.
14037 (pupa_os_area_size): Likewise.
14038 (pupa_loader_set): Remove the first argument. Loader doesn't
14039 manage modules or initrd any longer.
14040 (pupa_loader_load_module): Removed.
14042 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14043 (linux_mod_SOURCES): New variable.
14044 (linux_mod_CFLAGS): Likewise.
14046 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
14048 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14049 the length of a blocklist correctly.
14051 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14052 Use ioctl only if the OS file is a block device.
14053 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14054 not very useful for normal files.
14056 * kern/main.c (pupa_set_root_dev): New function.
14057 (pupa_load_normal_mode): Likewise.
14058 (pupa_main): Call those above.
14060 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14063 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14065 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
14067 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14068 (setup): Configure the installed partition information and the
14071 * loader/i386/pc/chainloader.c (my_mod): New variable.
14072 (pupa_chainloader_unload): New function.
14073 (pupa_rescue_cmd_chainloader): Refer itself.
14074 (PUPA_MOD_INIT): Save its own module in MY_MOD.
14076 * kern/i386/pc/startup.S (install_partition): Removed.
14077 (version_string): Likewise.
14078 (config_file): Likewise.
14079 (pupa_install_dos_part): New variable.
14080 (pupa_install_bsd_part): Likewise.
14081 (pupa_prefix): Likewise.
14082 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14084 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14086 (make_install_device): New function.
14087 (pupa_machine_init): Set the dl prefix.
14089 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14090 (buf): Renamed to ...
14091 (linebuf): ... this.
14092 (pupa_rescue_cmd_prefix): New function.
14093 (pupa_rescue_cmd_insmod): Likewise.
14094 (pupa_rescue_cmd_rmmod): Likewise.
14095 (pupa_rescue_cmd_lsmod): Likewise.
14096 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14099 * kern/mm.c (pupa_memalign): If failed even after invalidating
14100 disk caches, unload unneeded modules and retry.
14102 * kern/misc.c (pupa_memmove): New function.
14103 (pupa_memcpy): Removed.
14104 (pupa_strcpy): New function.
14105 (pupa_itoa): Made static.
14107 * kern/dl.c (pupa_dl_iterate): New function.
14108 (pupa_dl_ref): Likewise.
14109 (pupa_dl_unref): Likewise.
14110 (pupa_dl_unload): Return if succeeded or not.
14111 (pupa_dl_unload_unneeded): New function.
14112 (pupa_dl_unload_all): Likewise.
14113 (pupa_dl_init): Renamed to ...
14114 (pupa_dl_set_prefix): ... this.
14115 (pupa_dl_get_prefix): New function.
14117 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14118 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14119 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14120 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14121 (pupa_install_dos_part): Declared.
14122 (pupa_install_bsd_part): Likewise.
14123 (pupa_prefix): Likewise.
14124 (pupa_boot_drive): Likewise.
14126 * include/pupa/types.h: Fix a typo.
14128 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14130 (pupa_memmove): Declared.
14131 (pupa_strcpy): Likewise.
14133 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14134 pupa_mod_init takes one argument, its own module.
14135 (pupa_dl_unload_unneeded): Declared.
14136 (pupa_dl_unload_all): Likewise.
14137 (pupa_dl_ref): Likewise.
14138 (pupa_dl_unref): Likewise.
14139 (pupa_dl_iterate): Likewise.
14140 (pupa_dl_init): Renamed to ...
14141 (pupa_dl_set_prefix): ... this.
14142 (pupa_dl_get_prefix): Declared.
14144 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
14145 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
14147 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14148 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14150 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14151 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14153 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14155 * util/i386/pc/pupa-setup.c (setup): Define the internal
14156 function find_first_partition_start at the top level, because GCC
14157 3.0.x cannot compile internal functions in deeper scopes
14159 (find_root_device): Use lstat instead of stat.
14160 Don't follow symbolic links.
14161 Fix the path-constructing code.
14163 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14164 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14165 by a BLKGETSIZE ioctl first, because block devices don't fill
14166 the member st_mode of the structure stat on Linux.
14167 [__linux__] (linux_find_partition): Use a temporary buffer
14168 REAL_DEV for the working space. Copy it to DEV before returning.
14169 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14170 buffer cache consistent.
14171 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14172 strncmp. The previous value was merely wrong.
14173 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14175 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14176 FAT size is 12. The previous value was merely wrong.
14178 * kern/main.c (pupa_main): Don't split the starting message from
14181 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14182 LF, because BIOS goes crazy about character attributes in this
14185 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14187 * include/i386/pc/util/biosdisk.h: New file.
14188 * util/i386/pc/biosdisk.c: Likewise.
14189 * util/i386/pc/pupa-setup.c: Likewise.
14191 * Makefile.in (INCLUDE_DISTFILES): Added
14192 include/pupa/i386/pc/util/biosdisk.h.
14193 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14194 directory util/i386/pc.
14195 (install-local): Added a rule for sbin_UTILITIES.
14196 (uninstall): Likewise.
14198 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14200 * util/misc.c (xrealloc): New function.
14201 (pupa_malloc): Likewise.
14202 (pupa_free): Likewise.
14203 (pupa_realloc): Likewise.
14204 (pupa_stop): Likewise.
14205 (pupa_putchar): Likewise.
14207 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14209 * include/pupa/util/misc.h (xrealloc): Declared.
14211 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14213 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14214 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14216 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14217 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14219 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14220 way should be implemented.
14221 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14223 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14224 the size of NAME for safety.
14225 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14228 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14229 (pupa_setup_SOURCES): Likewise.
14231 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14233 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14235 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14236 bunch of pushl's from pusha, because this destroys the return
14239 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14241 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14242 This means that any missing prototypes could be fatal. Also, you
14243 must take care when writing assembly code. See the comments at
14244 the beginning of startup.S, for more details.
14246 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14247 compilation mechanism.
14248 (pupa_chainloader_real_boot): Likewise.
14249 (pupa_biosdisk_rw_int13_extensions): Likewise.
14250 (pupa_biosdisk_rw_standard): Likewise.
14251 (pupa_biosdisk_check_int13_extensions): Likewise.
14252 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14253 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14254 (pupa_get_memsize): Likewise.
14255 (pupa_get_mmap_entry): Likewise.
14256 (pupa_console_putchar): Likewise.
14257 (pupa_console_setcursor): Likewise.
14258 (pupa_getrtsecs): Use pushl instead of push.
14260 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14261 memory instead of the stack for a mmap entry, because some
14262 BIOSes may ignore the maximum size and overflow.
14264 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14266 * genmk.rb (PModule#rule): Compile automatically generated
14267 sources with module-specific CFLAGS as well as other sources.
14269 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14271 * configure.ac: Check ld.
14272 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14273 respectively, before checking endianness and sizes.
14275 * Makefile.in (LD): New variable.
14277 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14279 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14281 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14283 * Changelog: New file.