1 2009-02-08 Robert Millan <rmh@aybabtu.com>
3 * fs/tar.c: Replace "fs/cpio.h" with "cpio.h".
5 2009-02-08 Robert Millan <rmh@aybabtu.com>
7 * Makefile.in (host_os, host_cpu): New variables.
8 (target_os): Remove. Update all users.
10 2009-02-08 Marco Gerards <marco@gnu.org>
12 * Makefile.in (enable_grub_emu_usb): New variable.
13 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
14 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
15 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
16 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
17 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
18 `usbtest.mod' and `usbms.mod'.
19 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
20 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
21 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
22 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
23 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
26 * disk/usbms.c: New file.
28 * include/grub/usb.h: Likewise.
30 * include/grub/usbtrans.h: Likewise.
32 * include/grub/usbdesc.h: Likewise.
34 * bus/usb/usbtrans.c: Likewise.
36 * bus/usb/ohci.c: Likewise.
38 * bus/usb/uhci.c: Likewise.
40 * bus/usb/usbhub.c: Likewise.
42 * bus/usb/usb.c: Likewise.
44 * commands/usbtest.c: Likewise.
46 * util/usb.c: Likewise.
48 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
50 * configure.ac: Test for libusb presence.
52 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
54 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
56 * kern/mm.c: Add more comments.
58 2009-02-08 Robert Millan <rmh@aybabtu.com>
60 Patch from Javier Martín.
61 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
62 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
64 2009-02-08 Robert Millan <rmh@aybabtu.com>
66 * fs/cpio.c: Split tar functionality to ...
67 * fs/tar.c: ... here (new file). Update all users.
69 2009-02-07 Robert Millan <rmh@aybabtu.com>
71 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
72 backward-incompatible features.
74 Based on patch from Javier Martín, with some adjustments.
76 2009-02-07 Michael Scherer <misc@mandriva.org>
78 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
80 2009-02-07 Robert Millan <rmh@aybabtu.com>
82 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
83 position of `disk/lvm.c' to ensure grub_init_all() always picks it
86 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
88 Fixes problem when running vbetest command as reported by
89 Vladimir Serbinenko <phcoder@gmail.com>.
91 * (grub_vbe_set_video_mode): Fixed problem with text modes.
93 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
95 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
96 /dev/md/NpN style mdraid devices.
98 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
100 * util/unifont2pff.rb: Remove.
102 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
104 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
107 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
109 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
110 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
111 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
112 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
113 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
114 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
115 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
117 2009-02-02 Christian Franke <franke@computer.org>
119 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
121 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
123 * INSTALL: Note that we now require at least autoconf 2.59 and
124 that LZO is optional.
126 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
128 Base on patch on bug #24154 created by Tomas Tintera
131 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
133 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
135 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
138 * normal/parser.y (script_init): Add missing semicolon.
140 2009-01-31 Colin D Bennett <colin@gibibit.com>
142 * normal/main.c: Add include to grub/menu_viewer.h.
143 (free_menu_entry_classes): Added.
144 (grub_normal_menu_addentry): Added class property handling.
145 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
146 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
148 * normal/menu_viewer.c: New file.
150 * normal/menu.c (run_menu_entry): Renamed to ...
151 (grub_menu_execute_entry): ... this and made it as global.
152 (grub_menu_run): Renamed to ...
153 (show_text_menu): ... this and made it local.
154 (show_text_menu): Adapt to new function names.
155 (grub_normal_terminal_menu_viewer): New global variable.
157 * include/grub/menu.h: New file.
159 * include/grub/menu_viewer.h: New file.
161 * include/grub/normal.h: Added include to grub/menu.h.
162 (grub_menu_entry): Moved to include/grub/menu.h.
163 (grub_menu_entry_t): Likewise.
164 (grub_menu): Likewise.
165 (grub_menu_t): Likewise.
166 (grub_normal_terminal_menu_viewer): Added.
167 (grub_menu_execute_entry): Likewise.
168 (grub_menu_run): Removed.
170 * DISTLIST: Added include/grub/menu.h.
171 Added include/grub/menu_viewer.h.
172 Added normal/menu_viewer.c.
174 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
176 * normal/execute.c (grub_script_execute_menuentry): Changed to use
177 arglist for menutitle arguments.
179 * normal/main.c (grub_normal_menu_addentry): Likewise.
181 * normal/parser.y (menuentry): Likewise.
183 * normal/script.c (grub_script_create_cmdmenu): Likewise.
185 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
186 (grub_script_create_cmdmenu): Likewise.
188 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
190 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
193 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
195 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
197 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
199 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
201 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
203 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
205 2009-01-30 Christian Franke <franke@computer.org>
207 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
210 2009-01-27 Pavel Roskin <proski@gnu.org>
212 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
214 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
216 * commands/lsmmap.c: Add include to grub/machine/memory.h.
218 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
220 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
223 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
225 * disk/scsi.c (grub_scsi_read): Fix sign problem.
227 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
229 * util/grub-mkfont.c (usage): Fix typo.
231 * util/elf/grub-mkimage.c (load_modules): Fix warning.
233 2009-01-26 Daniel Mierswa <impulze@impulze.org>
235 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
237 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
239 * kern/misc.c (grub_strcasecmp): New function.
240 (grub_strcasecmp): Use grub_size_t instead of int for length.
242 * include/grub/misc.h: Update function prototypes.
244 2009-01-26 Robert Millan <rmh@aybabtu.com>
246 * configure.ac: Fix cross-compilation check.
248 2009-01-22 Christian Franke <franke@computer.org>
250 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
251 (precision) digit string. Allow `.format2' without `format1' (width).
252 Limit input chars for `%s' output to `format2' if specified. This is
253 compatible with standard printf ().
255 2009-01-22 Christian Franke <franke@computer.org>
257 * disk/ata.c (grub_ata_wait_status): Replace by ...
258 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
259 other status bits may be invalid while BSY is asserted.
260 (grub_ata_check_ready): New function.
261 (grub_ata_cmd): Removed.
262 (grub_ata_wait_drq): New function.
263 (grub_ata_strncpy): Remove inline.
264 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
265 and error check now done by grub_ata_wait_drq ().
266 (grub_ata_pio_write): Likewise.
267 (grub_atapi_identify): Set DEV before check for !BSY. Use
268 grub_ata_wait_drq () to wait for data.
269 (grub_ata_device_initialize): Add status register check to
270 detect missing SATA slave devices. Add debug messages.
271 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
272 (grub_atapi_packet): Set DEV before check for !BSY. Replace
273 transfer loop by grub_ata_pio_write ().
274 (grub_ata_identify): Set DEV before check for !BSY. Use
275 grub_ata_wait_drq () to wait for data.
276 (grub_ata_setaddress): Set DEV before check for !BSY.
277 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
278 read/write in one loop. Fix invalid command on write. Fix incomplete
279 command on (size % batch) == 0. Add missing error check after write of
280 last block. Add debug messages.
281 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
283 2009-01-19 Christian Franke <franke@computer.org>
285 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
286 (GRUB_ATAPI_IREASON_*): Likewise.
287 (grub_ata_pio_write): Fix timeout error return.
288 (grub_atapi_identify): Add grub_ata_wait () after cmd.
289 (grub_atapi_wait_drq): New function.
290 (grub_atapi_packet): New parameter `size'.
291 Use grub_atapi_wait_drq () and direct write instead of
292 grub_ata_pio_write ().
293 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
294 reads the number of bytes requested by the device for each DRQ
296 (grub_atapi_write): Remove old implementation, return not
299 2009-01-19 Christian Franke <franke@computer.org>
301 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
302 of 512 to calculate data size.
303 (grub_scsi_read12): Likewise.
304 (grub_scsi_write10): Likewise.
305 (grub_scsi_write12): Likewise.
306 (grub_scsi_read): Adjust size according to blocksize.
307 Add checks for invalid blocksize and unaligned transfer.
309 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
311 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
313 * term/gfxterm.c (write_char): Fix background rendering for wide
316 2009-01-19 Robert Millan <rmh@aybabtu.com>
318 * config.guess: Update to latest version from config git.
319 * config.sub: Likewise.
321 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
323 * Makefile.in: Change font compilation to use new grub-mkfont instead
326 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
327 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
328 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
329 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
330 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
331 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
332 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
333 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
334 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
336 2009-01-16 Christian Franke <franke@computer.org>
338 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
339 (enum grub_ata_timeout_milliseconds): New enum.
340 (grub_ata_wait_status): Add parameter milliseconds.
341 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
342 recovery from timed-out commands.
343 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
344 return grub_errno instead of REG_ERROR.
345 (grub_ata_pio_write): Add parameter milliseconds.
346 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
347 Pass milliseconds to grub_ata_wait_status () and
348 grub_ata_pio_read ().
349 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
350 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
351 grub_ata_wait_status (). Fix IDENTIFY timeout check.
352 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
353 It is not suitable for device detection, because DEV bit is ignored,
354 the command may run too long, and not all devices set the signature
356 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
357 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
358 Fix device selection, DEV bit must be set first to address the registers
359 of the correct device.
360 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
361 grub_ata_pio_read/write ().
362 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
363 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
365 2009-01-13 Carles Pina i Estany <carles@pina.cat>
367 * util/grub-editenv.c (main): Use fseeko(), not fseek().
369 2009-01-13 Bean <bean123ch@gmail.com>
371 * util/grub-mkfont.c (write_font): forget to remove some debug code.
373 2009-01-13 Bean <bean123ch@gmail.com>
375 * Makefile.in: (enable_grub_mkfont): New variable.
376 (freetype_cflags): Likewise.
377 (freetype_libs): Likewise.
379 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
380 (grub_mkfont_SOURCES): New variable.
381 (grub_mkfont_CFLAGS): Likewise.
382 (grub_mkfont_LDFLAGS): Likewise.
384 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
385 library if `--enable-grub-mkfont' is requested.
386 (enable_grub_mkfont): New variable.
387 (freetype_cflags): Likewise.
388 (freetype_libs): Likewise.
390 * util/grub-mkfont.c: New file.
392 2009-01-12 Christian Franke <franke@computer.org>
394 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
395 mode check. Fix setting of compat_use[].
397 2009-01-10 Robert Millan <rmh@aybabtu.com>
399 Update a few copyright years which we forgot to do in 2008 (only for
400 files whose changes made in 2008 were copyright-significant)
402 * Makefile.in: Add 2008 to Copyright line.
403 * disk/ieee1275/ofdisk.c: Likewise.
404 * disk/efi/efidisk.c: Likewise.
405 * kern/dl.c: Likewise.
406 * kern/sparc64/ieee1275/init.c: Likewise.
407 * kern/mm.c: Likewise.
408 * kern/efi/mm.c: Likewise.
409 * boot/i386/pc/boot.S: Likewise.
410 * genfslist.sh: Likewise.
411 * fs/iso9660.c: Likewise.
412 * fs/hfs.c: Likewise.
413 * fs/jfs.c: Likewise.
414 * fs/minix.c: Likewise.
415 * fs/ufs.c: Likewise.
416 * gensymlist.sh.in: Likewise.
417 * genkernsyms.sh.in: Likewise.
418 * include/grub/misc.h: Likewise.
419 * include/grub/types.h: Likewise.
420 * include/grub/symbol.h: Likewise.
421 * include/grub/elf.h: Likewise.
422 * include/grub/kernel.h: Likewise.
423 * include/grub/disk.h: Likewise.
424 * include/grub/dl.h: Likewise.
425 * include/grub/i386/linux.h: Likewise.
426 * include/grub/i386/pc/biosdisk.h: Likewise.
427 * include/grub/efi/api.h: Likewise.
428 * include/grub/efi/pe32.h: Likewise.
429 * include/grub/util/misc.h: Likewise.
430 * normal/execute.c: Likewise.
431 * normal/arg.c: Likewise.
432 * normal/completion.c: Likewise.
433 * normal/lexer.c: Likewise.
434 * normal/parser.y: Likewise.
435 * normal/misc.c: Likewise.
436 * commands/i386/pc/vbeinfo.c: Likewise.
437 * commands/hexdump.c: Likewise.
438 * commands/terminal.c: Likewise.
439 * commands/ls.c: Likewise.
440 * commands/help.c: Likewise.
441 * partmap/pc.c: Likewise.
442 * loader/efi/chainloader.c: Likewise.
443 * loader/multiboot_loader.c: Likewise.
444 * loader/i386/pc/multiboot2.c: Likewise.
445 * term/efi/console.c: Likewise.
446 * term/i386/pc/serial.c: Likewise.
447 * util/lvm.c: Likewise.
448 * util/console.c: Likewise.
449 * util/i386/efi/grub-mkimage.c: Likewise.
450 * util/raid.c: Likewise.
452 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
454 * commands/videotest.c: Removed include to grub/machine/memory.h.
456 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
457 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
458 (video_mod_SOURCES): Removed.
459 (video_mod_CFLAGS): Likewise.
460 (video_mod_LDFLAGS): Likewise.
461 (gfxterm_mod_SOURCES): Likewise.
462 (gfxterm_mod_CFLAGS): Likewise.
463 (gfxterm_mod_LDFLAGS): Likewise.
464 (videotest_mod_SOURCES): Likewise.
465 (videotest_mod_CFLAGS): Likewise.
466 (videotest_mod_LDFLAGS): Likewise.
467 (bitmap_mod_SOURCES): Likewise.
468 (bitmap_mod_CFLAGS): Likewise.
469 (bitmap_mod_LDFLAGS): Likewise.
470 (tga_mod_SOURCES): Likewise.
471 (tga_mod_CFLAGS): Likewise.
472 (tga_mod_LDFLAGS): Likewise.
473 (jpeg_mod_SOURCES): Likewise.
474 (jpeg_mod_CFLAGS): Likewise.
475 (jpeg_mod_LDFLAGS): Likewise.
476 (png_mod_SOURCES): Likewise.
477 (png_mod_CFLAGS): Likewise.
478 (png_mod_LDFLAGS): Likewise.
480 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
481 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
482 (video_mod_SOURCES): Added.
483 (video_mod_CFLAGS): Likewise.
484 (video_mod_LDFLAGS): Likewise.
485 (videotest_mod_SOURCES): Likewise.
486 (videotest_mod_CFLAGS): Likewise.
487 (videotest_mod_LDFLAGS): Likewise.
488 (bitmap_mod_SOURCES): Likewise.
489 (bitmap_mod_CFLAGS): Likewise.
490 (bitmap_mod_LDFLAGS): Likewise.
491 (tga_mod_SOURCES): Likewise.
492 (tga_mod_CFLAGS): Likewise.
493 (tga_mod_LDFLAGS): Likewise.
494 (jpeg_mod_SOURCES): Likewise.
495 (jpeg_mod_CFLAGS): Likewise.
496 (jpeg_mod_LDFLAGS): Likewise.
497 (png_mod_SOURCES): Likewise.
498 (png_mod_CFLAGS): Likewise.
499 (png_mod_LDFLAGS): Likewise.
500 (gfxterm_mod_SOURCES): Likewise.
501 (gfxterm_mod_CFLAGS): Likewise.
502 (gfxterm_mod_LDFLAGS): Likewise.
504 * term/gfxterm.c: Removed include to grub/machine/memory.h,
505 grub/machine/console.h.
507 2009-01-04 Jerone Young <jerone@gmail.com>
509 Make on screen instructions clearer
511 Based on patch created by Jidanni <jidanni@jidanni.org>
513 * normal/menu.c: print clearer instructions on the screen
515 2009-01-02 Colin D Bennett <colin@gibibit.com>
519 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
520 build system and fixed gfxterm.c to work with different sized fonts.
522 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
524 * configure: Re-generated.
526 * DISTLIST: Removed font/manager.c.
528 Added font/font_cmd.c.
530 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
533 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
535 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
537 * kern/term.c: Changed users of grub_utf8_to_ucs4.
539 * normal/menu.c: Likewise.
541 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
542 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
544 * include/grub/font.h: Replaced with new file.
546 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
547 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
548 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
549 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
550 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
551 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
552 fg_red, fg_green, fg_blue, fg_alpha.
553 (grub_video_adapter): Removed blit_glyph.
554 (grub_video_blit_glyph): Removed.
556 * font/manager.c: Removed file.
558 * font/font.c: New file.
560 * font/font_cmd.c: Likewise.
562 * video/video.c (grub_video_blit_glyph): Removed.
564 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
565 (grub_video_vbe_map_rgba): Likewise.
566 (grub_video_vbe_unmap_color_int): Likewise.
567 (grub_video_vbe_blit_glyph): Removed.
568 (grub_video_vbe_adapter): Removed blit_glyph.
570 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
571 (get_pixel): Likewise.
572 (set_pixel): Likewise.
574 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
576 * term/gfxterm.c: Adapted to new font engine.
578 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
580 * term/i386/pc/vga.c: Likewise.
582 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
584 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
586 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
588 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
590 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
592 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
594 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
596 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
598 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
600 * util/grub.d/00_header.in: Changed to use new loadfont command.
602 * util/grub-mkconfig_lib.in: Changed font extension.
604 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
606 * util/getroot.c (grub_util_get_grub_dev): Add support for
607 /dev/md/dNNpNN style partitionable mdraid devices.
609 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
611 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
612 at a time limit of the PXE TFTP API correctly.
613 (grub_pxefs_close): Likewise.
615 2008-11-29 Robert Millan <rmh@aybabtu.com>
617 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
618 grub_ata_device_initialize() calls.
620 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
622 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
624 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
626 2008-11-28 Robert Millan <rmh@aybabtu.com>
628 Fix build on powerpc-ieee1275. Based on patch created by
629 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
630 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
631 `kern/ieee1275/mmap.c'.
632 * include/grub/powerpc/ieee1275/memory.h: New file.
634 Provide grub-install on coreboot.
635 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
636 (grub_install_SOURCES): New variable.
637 * util/i386/pc/grub-install.in: Add a few condition checks to make it
640 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
642 * util/grub-fstest.c (grub_term_get_current_input): Change return type
643 to `grub_term_input_t'.
644 (grub_term_get_current_output): Change return type to
645 `grub_term_output_t'.
647 2008-11-22 Robert Millan <rmh@aybabtu.com>
649 Fix breakage on coreboot due to declaration mismatch.
650 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
651 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
654 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
655 comments. Avoid copying one more byte than necessary (just in case).
657 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
658 to 0x200000 (avoids trouble with some OFW implementations, and matches
659 with the one in Yaboot).
660 Reported by Manoel Abranches
662 2008-11-20 Robert Millan <rmh@aybabtu.com>
664 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
665 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
667 * util/grub-mkconfig_lib.in (grub_warn): New function.
668 (convert_system_path_to_grub_path): Use grub_warn() when issuing
669 warnings, to obtain consistent formatting.
670 * util/grub.d/00_header.in: Likewise.
671 * util/update-grub_lib.in: Likewise.
673 * loader/i386/linux.c (allocate_pages): Fix a warning.
674 Move comment text to `#error' stanza.
676 Harmonize ieee1275's grub_available_iterate() with the generic
677 grub_machine_mmap_iterate() interface (fixes a recently-introduced
678 build problem on i386-ieee1275):
679 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
680 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
681 parameter `type'. Update all users of this function.
682 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
683 `kern/ieee1275/mmap.c'.
684 * kern/ieee1275/init.c
685 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
687 (grub_machine_mmap_iterate): ... this.
688 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
689 return type to `grub_err_t'. Update all implementations of this
691 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
694 Add `lsmmap' command (lists firmware-provided memory map):
695 * commands/lsmmap.c: New file.
696 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
697 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
699 * conf/powerpc-ieee1275.rmk: Likewise.
700 * conf/i386-coreboot.rmk: Likewise.
701 * conf/i386-ieee1275.rmk: Likewise.
703 2008-11-19 Robert Millan <rmh@aybabtu.com>
705 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
706 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
707 constraints to initrd allocation (based on code from
708 loader/i386/pc/linux.c). Without them, initrd was allocated too high
709 for Linux to find it.
711 2008-11-14 Robert Millan <rmh@aybabtu.com>
713 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
714 order to cope with duplicate slashes.
716 2008-11-14 Robert Millan <rmh@aybabtu.com>
718 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
719 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
720 don't want to mess with lower memory, because it is used in the Linux
723 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
724 an appropriate place in lower memory, between 0x10000 and 0x90000,
725 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
726 is in our heap (probably as a result of it being corrupted during
727 decompression). Add #error instance with comment to explain why this
728 loader isn't currently usable on PC/BIOS.
730 2008-11-14 Robert Millan <rmh@aybabtu.com>
732 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
733 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
735 2008-11-12 Robert Millan <rmh@aybabtu.com>
737 Make loader/i386/linux.c buildable on i386-pc (although disabled).
739 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
740 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
742 * include/grub/i386/pc/memory.h: ... to here.
744 2008-11-12 Robert Millan <rmh@aybabtu.com>
746 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
749 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
750 (grub_console_cur_color, grub_console_real_putchar)
751 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
752 (grub_console_setcolorstate, grub_console_setcolor)
753 (grub_console_getcolor): Move from here ...
754 * include/grub/i386/vga_common.h: ... to here (new file).
756 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
757 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
759 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
760 `<grub/i386/vga_common.h>'.
762 2008-11-12 Robert Millan <rmh@aybabtu.com>
764 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
765 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
766 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
768 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
769 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
771 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
772 grub_console_init() with call to grub_vga_text_init().
773 (grub_machine_fini): Replace call to
774 grub_console_fini() with call to grub_vga_text_fini() and
775 grub_at_keyboard_fini().
777 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
778 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
779 (grub_console_setcolorstate, grub_console_setcolor)
780 (grub_console_getcolor): New function prototypes.
782 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
783 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
784 (grub_vga_text_setcursor): Static-ize.
785 (grub_vga_text_term): New structure.
786 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
788 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
789 (grub_console_cur_color, grub_console_standard_color)
790 (grub_console_normal_color, grub_console_highlight_color)
791 (map_char, grub_console_putchar, grub_console_getcharwidth)
792 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
793 (grub_console_getcolor): Move from here ...
794 * term/i386/vga_common.c: ... to here (same function names).
796 2008-11-12 Robert Millan <rmh@aybabtu.com>
798 Use newly-added Multiboot support in coreboot.
800 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
801 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
803 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
804 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
805 (codestart): Store the MBI in `startup_multiboot_info' when we're
806 being loaded using Multiboot.
808 * kern/i386/coreboot/init.c (grub_machine_init): Move
809 grub_at_keyboard_init() call to beginning of function (useful for
810 debugging). Call grub_machine_mmap_init() before attempting to use
811 grub_machine_mmap_iterate().
812 (grub_lower_mem, grub_upper_mem): Move from here ...
813 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
816 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
819 2008-11-12 Robert Millan <rmh@aybabtu.com>
821 Fix a regression introduced by the at_keyboard.mod split. Because
822 some terminals are default on some platforms and non-default on
823 others, the first terminal being registered determines which is
826 * kern/term.c (grub_term_register_input): If this is the first
827 terminal being registered, set it as the current one.
828 (grub_term_register_output): Likewise.
830 * term/efi/console.c (grub_console_init): Do not call
831 grub_term_set_current_output() or grub_term_set_current_input().
832 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
833 * term/i386/pc/console.c (grub_console_init): Likewise.
834 (grub_console_fini): Do not call grub_term_set_current_input()
835 (but leave grub_term_set_current_output() to restore text mode).
837 2008-11-10 Robert Millan <rmh@aybabtu.com>
839 * util/grub.d/00_header.in: Add backward compatibility check for
840 versions of terminal.mod that don't understand `terminal_input' or
843 2008-11-09 Robert Millan <rmh@aybabtu.com>
845 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
846 `terminal_input' / `terminal_output', not `terminal'.
848 2008-11-08 Robert Millan <rmh@aybabtu.com>
850 * Makefile.in (include_DATA): Fix srcdir=. assumption.
851 (DISTCLEANFILES): Add `build_env.mk'.
853 2008-11-08 Robert Millan <rmh@aybabtu.com>
855 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
856 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
857 members. Update all users.
858 * util/console.c (grub_ncurses_term): Split in ...
859 (grub_ncurses_term_input): ... this, and ...
860 (grub_ncurses_term_output): ... this. Update all users.
861 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
863 2008-11-08 Robert Millan <rmh@aybabtu.com>
865 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
866 (PKGDATA): Add $(pkgdata_SRCDIR).
867 (pkglib_BUILDDIR): New variable.
868 (pkgdata_SRCDIR): New variable.
869 (build_env.mk): New target.
870 (include_DATA): New variable.
871 (install-local): Install $(include_DATA) files in $(includedir).
873 2008-11-07 Pavel Roskin <proski@gnu.org>
875 * gendistlist.sh: Use C locale for sorting to ensure consistent
876 output on all systems.
878 * util/grub.d/00_header.in: Remove incorrect space before
881 2008-11-07 Robert Millan <rmh@aybabtu.com>
883 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
885 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
886 * loader/multiboot_loader.c (find_multi_boot2_header): New function
887 (based on find_multi_boot1_header).
888 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
889 using find_multi_boot2_header(), and abort if neither Multiboot or
890 Multiboot headers were found.
892 2008-11-07 Robert Millan <rmh@aybabtu.com>
894 Modularize at_keyboard.mod:
896 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
897 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
898 (at_keyboard_mod_LDFLAGS): New variables.
900 Actual terminal split:
902 * include/grub/term.h (struct grub_term): Split in ...
903 (struct grub_term_input): ... this, and ...
904 (struct grub_term_output): ... this. Update all users.
905 (grub_term_set_current): Split in ...
906 (grub_term_set_current_input): ... this, and ...
907 (grub_term_set_current_output): ... this.
908 (grub_term_get_current): Split in ...
909 (grub_term_get_current_input): ... this, and ...
910 (grub_term_get_current_output): ... this.
911 (grub_term_register): Split in ...
912 (grub_term_register_input): ... this, and ...
913 (grub_term_register_output): ... this.
914 (grub_term_unregister): Split in ...
915 (grub_term_unregister_input): ... this, and ...
916 (grub_term_unregister_output): ... this.
917 (grub_term_iterate): Split in ...
918 (grub_term_iterate_input): ... this, and ...
919 (grub_term_iterate_output): ... this.
921 * kern/term.c (grub_term_list): Split in ...
922 (grub_term_list_input): ... this, and ...
923 (grub_term_list_output): ... this. Update all users.
924 (grub_cur_term): Split in ...
925 (grub_cur_term_input): ... this, and ...
926 (grub_cur_term_output): ... this. Update all users.
927 (grub_term_set_current): Split in ...
928 (grub_term_set_current_input): ... this, and ...
929 (grub_term_set_current_output): ... this.
930 (grub_term_get_current): Split in ...
931 (grub_term_get_current_input): ... this, and ...
932 (grub_term_get_current_output): ... this.
933 (grub_term_register): Split in ...
934 (grub_term_register_input): ... this, and ...
935 (grub_term_register_output): ... this.
936 (grub_term_unregister): Split in ...
937 (grub_term_unregister_input): ... this, and ...
938 (grub_term_unregister_output): ... this.
939 (grub_term_iterate): Split in ...
940 (grub_term_iterate_input): ... this, and ...
941 (grub_term_iterate_output): ... this.
943 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
944 a check for input and one for output (and only attempt to get keys
945 from user when input works).
947 * util/grub-probe.c (grub_term_get_current): Split in ...
948 (grub_term_get_current_input): ... this, and ...
949 (grub_term_get_current_output): ... this.
950 * util/grub-fstest.c: Likewise.
951 * util/i386/pc/grub-setup.c: Likewise.
952 * util/grub-editenv.c: Likewise.
954 Portability adjustments:
956 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
957 `term/i386/pc/at_keyboard.c'.
958 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
959 grub_keyboard_controller_init() (now handled by terminal .init).
960 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
961 grub_at_keyboard_init().
962 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
963 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
964 at_keyboard.mod via input terminal interface).
965 * include/grub/i386/coreboot/console.h: Convert into a stub for
966 `<grub/i386/pc/console.h>'.
968 Migrate full terminals to new API:
970 * term/efi/console.c (grub_console_term): Split into ...
971 (grub_console_term_input): ... this, and ...
972 (grub_console_term_output): ... this. Update all users.
973 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
974 (grub_ofconsole_init): Split into ...
975 (grub_ofconsole_init_input): ... this, and ...
976 (grub_ofconsole_init_output): ... this.
977 (grub_ofconsole_term): Split into ...
978 (grub_ofconsole_term_input): ... this, and ...
979 (grub_ofconsole_term_output): ... this. Update all users.
980 * term/i386/pc/serial.c (grub_serial_term): Split into ...
981 (grub_serial_term_input): ... this, and ...
982 (grub_serial_term_output): ... this. Update all users.
983 * term/i386/pc/console.c (grub_console_term): Split into ...
984 (grub_console_term_input): ... this, and ...
985 (grub_console_term_output): ... this. Update all users.
986 (grub_console_term_input): Only enable it on PC/BIOS platform.
987 (grub_console_init): Remove grub_keyboard_controller_init() call.
989 Migrate input terminals to new API:
991 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
992 `i386' and `i386/pc' to enable build on x86_64 (this driver is
993 i386-specific anyway).
994 (grub_console_checkkey): Rename to ...
995 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
997 (grub_keyboard_controller_orig): New variable.
998 (grub_console_getkey): Rename to ...
999 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
1001 (grub_keyboard_controller_init): Static-ize. Save original
1002 controller value so that it can be restored ...
1003 (grub_keyboard_controller_fini): ... here (new function).
1004 (grub_at_keyboard_term): New structure.
1005 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1008 Migrate output terminals to new API:
1010 * term/i386/pc/vga.c (grub_vga_term): Change type to
1011 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1012 members. Update all users.
1013 * term/gfxterm.c (grub_video_term): Change type to
1014 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1015 members. Update all users.
1016 * include/grub/i386/pc/console.h (grub_console_checkkey)
1017 (grub_console_getkey): Do not export (no longer needed by gfxterm,
1020 Migrate `terminal' command and userland tools to new API:
1022 * commands/terminal.c (grub_cmd_terminal): Split into ...
1023 (grub_cmd_terminal_input): ... this, and ...
1024 (grub_cmd_terminal_output): ... this.
1025 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1026 `terminal_input' and `terminal_output'.
1027 * util/grub.d/00_header.in: Adjust `terminal' calls to new
1028 `terminal_input' / `terminal_output' API.
1029 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1030 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1031 provided ${GRUB_TERMINAL}, convert it).
1033 2008-11-04 Robert Millan <rmh@aybabtu.com>
1035 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
1037 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1039 2008-11-03 Bean <bean123ch@gmail.com>
1041 * kern/elf.c (grub_elf32_load): Revert to previous code.
1042 (grub_elf64_load): Likewise.
1044 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1046 2008-11-01 Robert Millan <rmh@aybabtu.com>
1048 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1049 (TARGET_CPPFLAGS): Likewise.
1050 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1052 2008-11-01 Carles Pina i Estany <carles@pina.cat>
1054 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1056 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
1058 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1059 addition of objects until the code is not going to be able to fail.
1061 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
1063 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1064 (add a missing NULL check, and correct them by moving the pointer
1065 operations after the actual check).
1067 2008-10-29 Robert Millan <rmh@aybabtu.com>
1069 * util/i386/pc/grub-install.in: Handle empty string as output from
1070 make_system_path_relative_to_its_root().
1072 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
1074 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1075 circular metadata worst case scenario. If the metadata is circular
1076 then copy the wrap in place.
1077 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1078 project lib/format_text/layout.h
1079 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1081 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
1083 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
1085 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
1087 * util/update-grub_lib.in: Mention filename in warning message.
1089 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
1091 * NEWS: Update for rename of update-grub to grub-mkconfig.
1093 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
1095 * util/update-grub_lib.in: Copy to ...
1096 * util/grub-mkconfig_lib.in: ... this. Update all users.
1097 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
1098 * util/update-grub.in: Rename to ...
1099 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1100 option. Add `--output' option to allow users to specify the generated
1101 configuration file. Default to stdout.
1102 (update_grub_dir): Rename to ...
1103 (grub_mkconfig_dir): ... this.
1104 (grub_cfg): Default to an empty string.
1105 * conf/common.rmk (update-grub): Rename to ...
1106 (grub-mkconfig): ... this.
1107 (update-grub_lib): Copy to ...
1108 (grub-mkconfig_lib): ... this.
1109 (update-grub_SCRIPTS): Copy to ...
1110 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1111 (update-grub_DATA): Rename to ...
1112 (grub-mkconfig_DATA): ... this.
1114 2008-09-28 Robert Millan <rmh@aybabtu.com>
1116 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1117 to `modified'. Add the real `created' field.
1118 (grub_iso9660_uuid): Use `modified' rather than `created' for
1119 constructing the UUID.
1121 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
1123 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1124 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1126 2008-09-28 Bean <bean123ch@gmail.com>
1128 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1129 Thanks to Christian Franke for finding this bug.
1131 2008-09-25 Robert Millan <rmh@aybabtu.com>
1133 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1134 instances of grub_util_get_disk_name() (see previous commit).
1136 2008-09-25 Robert Millan <rmh@aybabtu.com>
1138 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1139 `util/i386/get_disk_name.c'.
1140 * conf/i386-efi.rmk: Likewise.
1141 * conf/x86_64-efi.rmk: Likewise.
1142 * conf/i386-coreboot.rmk: Likewise.
1143 * conf/i386-ieee1275.rmk: Likewise.
1144 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1145 `util/ieee1275/get_disk_name.c'.
1146 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1147 * util/ieee1275/get_disk_name.c: Remove file.
1148 * util/i386/get_disk_name.c: Remove file.
1149 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1150 "hd%d" for device.map entries, rather than using
1151 grub_util_get_disk_name().
1153 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1155 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1157 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1159 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1161 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1163 (GRUB_TERM_PPAGE): Changed to 0x4900.
1165 2008-09-24 Robert Millan <rmh@aybabtu.com>
1167 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1168 macros (they were i386-pc specific).
1169 * include/grub/sparc64/ieee1275/console.h: Likewise.
1170 * include/grub/efi/console.h: Likewise.
1172 2008-09-22 Bean <bean123ch@gmail.com>
1174 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1175 resident and in attribute list.
1177 * include/grub/ntfs.h (BMP_LEN): Removed.
1179 2008-09-22 Bean <bean123ch@gmail.com>
1181 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
1182 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1184 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1185 error occurs, as grub_disk_open will call grub_disk_close, which will
1186 call p->close (scsi).
1188 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1190 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1191 (AC_PREREQ): Bumped to 2.59.
1192 (AC_TRY_COMPILE): Replace obsolete macro with ...
1193 (AC_COMPILE_IFELSE): ... this.
1194 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1195 (AC_LINK_IFELSE): ... this.
1197 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1199 * autogen.sh: Add a call to `gendistlist.sh'.
1201 2008-09-19 Christian Franke <franke@computer.org>
1203 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1204 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1205 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1206 Export __enable_execute_stack() to modules.
1207 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1210 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1212 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1215 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1217 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
1218 #include <grub/util/hostdisk.h>.
1220 2008-09-08 Robert Millan <rmh@aybabtu.com>
1222 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1223 segments when their filesz is zero (grub_file_read() interprets
1224 zero-size as "read until EOF", which results in memory corruption).
1225 Use `lowest_segment' rather than 0 for calculating the current
1226 segment load address.
1228 2008-09-08 Robert Millan <rmh@aybabtu.com>
1230 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1231 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1232 clobbered useful information.
1234 2008-09-08 Robert Millan <rmh@aybabtu.com>
1236 * include/grub/util/biosdisk.h: Move to ...
1237 * include/grub/util/hostdisk.h: ... here. Update all users.
1238 * util/biosdisk.c: Move to ...
1239 * util/hostdisk.c: ... here. Update all users.
1241 2008-09-07 Robert Millan <rmh@aybabtu.com>
1243 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1245 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1246 and length can be stored directly in the `mbi->mmap_addr' and
1247 `mbi->mmap_length' struct fields.
1249 2008-09-07 Robert Millan <rmh@aybabtu.com>
1251 * conf/i386.rmk: New file. Provides declaration for building
1253 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1254 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1256 Include `conf/i386.mk'.
1257 * conf/i386-efi.rmk: Likewise.
1258 * conf/x86_64-efi.rmk: Likewise.
1259 * conf/i386-coreboot.rmk: Likewise.
1260 * conf/i386-ieee1275.rmk: Likewise.
1262 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1264 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1265 Adds optimization support for BGR based modes.
1267 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1268 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1269 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1270 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1271 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1272 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1273 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1274 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1275 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1276 (grub_video_i386_vbeblit_index_index): Likewise.
1277 (grub_video_i386_vbeblit_replace_directN): Added.
1278 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1279 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1280 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1281 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1282 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1283 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1284 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1285 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1286 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1287 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1288 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1289 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1290 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1292 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1293 (grub_video_i386_vbefill_R8G8B8): Likewise.
1294 (grub_video_i386_vbefill_index): Likewise.
1295 (grub_video_i386_vbefill_direct32): Added.
1296 (grub_video_i386_vbefill_direct24): Likewise.
1297 (grub_video_i386_vbefill_direct16): Likewise.
1298 (grub_video_i386_vbefill_direct8): Likewise.
1300 * include/grub/video.h (grub_video_blit_format): Removed
1301 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1302 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1303 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1304 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1305 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
1307 * video/video.c (grub_video_get_blit_format): Updated to use new
1308 blit formats. Added handling for 16 bit color modes.
1310 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
1312 (common_blitter): Updated to use new blitters.
1314 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1316 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1317 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1318 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1319 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1320 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1321 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1322 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1323 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1324 (grub_video_i386_vbeblit_index_index): Likewise.
1325 (grub_video_i386_vbeblit_replace_directN): Added.
1326 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1327 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1328 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1329 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1330 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1331 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1332 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1333 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1334 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1335 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1336 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1337 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1338 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1340 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1341 (grub_video_i386_vbefill_R8G8B8): Likewise.
1342 (grub_video_i386_vbefill_index): Likewise.
1343 (grub_video_i386_vbefill_direct32): Added.
1344 (grub_video_i386_vbefill_direct24): Likewise.
1345 (grub_video_i386_vbefill_direct16): Likewise.
1346 (grub_video_i386_vbefill_direct8): Likewise.
1348 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1351 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1354 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1357 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1360 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1362 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1365 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1367 * fs/iso9660.c (grub_iso9660_date): New structure.
1368 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1369 (grub_iso9660_uuid): New function.
1371 2008-09-05 Bean <bean123ch@gmail.com>
1373 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1375 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1376 insensitive bit for names in Win32 and Win32 & DOS namespace.
1378 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1380 * include/grub/types.h (LONG_MAX): Likewise.
1382 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1384 * util/getroot.c: Include <config.h>.
1385 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1386 add support for /dev/md/N devices and handle LVM double dash escaping.
1388 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1390 * config.guess: Update to latest version from config git.
1391 * config.sub: Likewise.
1393 2008-09-03 Robert Millan <rmh@aybabtu.com>
1395 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1396 `disk->total_sectors'.
1398 2008-09-01 Colin D Bennett <colin@gibibit.com>
1400 * include/grub/normal.h: Fixed incorrect comment for
1401 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1403 2008-09-01 Colin D Bennett <colin@gibibit.com>
1405 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1406 values with defines.
1408 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1409 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1410 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1411 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1412 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1413 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1414 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1415 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1416 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1417 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1418 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1419 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1420 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1421 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1422 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1423 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1424 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1425 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1426 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1428 2008-08-31 Robert Millan <rmh@aybabtu.com>
1430 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1432 (grub_multiboot): Fix a few warnings.
1434 2008-08-31 Robert Millan <rmh@aybabtu.com>
1436 * loader/i386/pc/multiboot.c: Update comment not to say that
1437 boot_device support is unimplemented.
1439 2008-08-31 Robert Millan <rmh@aybabtu.com>
1441 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1442 or memory map support are unimplemented.
1444 2008-08-31 Colin D Bennett <colin@gibibit.com>
1446 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1448 2008-08-31 Colin D Bennett <colin@gibibit.com>
1450 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1451 total video memory in 'vbeinfo' output; show color format details for
1454 2008-08-30 Pavel Roskin <proski@gnu.org>
1456 * util/genmoddep.c: Remove for real this time.
1457 * DISTLIST: Remove util/genmoddep.c.
1459 2008-08-30 Robert Millan <rmh@aybabtu.com>
1461 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1462 as required by Multiboot spec (it was already 4-byte aligned, but
1465 2008-08-29 Pavel Roskin <proski@gnu.org>
1467 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1468 * kern/powerpc/ieee1275/startup.S: ... this.
1469 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1470 * DISTLIST: Likewise.
1472 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1473 grub/cpu/kernel.h. Add start label for consistency with other
1474 platforms. Add grub_prefix immediately after start. Add jump
1475 to the code after grub_prefix.
1476 * include/grub/powerpc/kernel.h: Provide valid values for
1477 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1479 2008-08-29 Bean <bean123ch@gmail.com>
1481 * configure.ac: Change host_os to cygwin for mingw.
1482 (asprintf): New check for function.
1484 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1485 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1487 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
1488 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
1489 sync, sleep and grub_util_get_disk_size for mingw.
1491 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1492 to get size in mingw.
1493 (open_device): Use flag O_BINARY if it's defined.
1494 (find_root_device): Add dummy code for mingw.
1496 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1497 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1498 (get_scsi_disk_name): Return 0 for mingw.
1500 * util/hostfs.c: #include <grub/util/misc.h>.
1501 (grub_hostfs_open): Use "rb" flag to open file, use
1502 grub_util_get_disk_size to get disk size for mingw.
1504 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1505 (asprintf): New function if HAVE_ASPRINTF is not set.
1506 (sync): New function for mingw.
1508 (grub_util_get_disk_size): Likewise.
1510 2008-08-28 Pavel Roskin <proski@gnu.org>
1512 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1515 2008-08-28 Robert Millan <rmh@aybabtu.com>
1517 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1519 2008-08-28 Robert Millan <rmh@aybabtu.com>
1521 Change find_grub_drive() syntax so it doesn't prevent it from
1522 detecting NULL names as errors.
1524 * util/biosdisk.c (find_grub_drive): Move free slot search code
1526 (find_free_slot): ... to here.
1527 (read_device_map): Use find_free_slot() to search for free slots.
1529 2008-08-27 Marco Gerards <marco@gnu.org>
1531 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1532 (scsi_mod_SOURCES): New variable.
1533 (scsi_mod_CFLAGS): Likewise
1534 (scsi_mod_LDFLAGS): Likewise.
1536 * disk/scsi.c: New file.
1538 * include/grub/scsi.h: Likewise.
1540 * include/grub/scsicmd.h: Likewise.
1542 * disk/ata.c: Include <grub/scsi.h>.
1543 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1545 (grub_ata_iterate): Skip ATAPI devices.
1546 (grub_ata_open): Only handle ATAPI devices.
1547 (struct grub_atapi_read): Removed.
1548 (grub_atapi_readsector): Likewise.
1549 (grub_ata_read): No longer handle ATAPI devices.
1550 (grub_ata_write): Likewise.
1551 (grub_atapi_iterate): New function.
1552 (grub_atapi_read): Likewise.
1553 (grub_atapi_write): Likewise.
1554 (grub_atapi_open): Likewise.
1555 (grub_atapi_close): Likewise.
1556 (grub_atapi_dev): New variable.
1557 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1558 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1560 * include/grub/disk.h (enum grub_disk_dev_id): Add
1561 `GRUB_DISK_DEVICE_SCSI_ID'.
1563 2008-08-26 Robert Millan <rmh@aybabtu.com>
1565 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1566 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1569 2008-08-23 Bean <bean123ch@gmail.com>
1571 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1572 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1573 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1574 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1576 (raid5rec_mod_SOURCES): New macro.
1577 (raid5rec_mod_CFLAGS): Likewise.
1578 (raid5rec_mod_LDFLAGS): Likewise.
1579 (raid6rec_mod_SOURCES): Likewise.
1580 (raid6rec_mod_CFLAGS): Likewise.
1581 (raid6rec_mod_LDFLAGS): Likewise.
1582 (mdraid_mod_SOURCES): Likewise.
1583 (mdraid_mod_CFLAGS): Likewise.
1584 (mdraid_mod_LDFLAGS): Likewise.
1585 (dm_nv_mod_SOURCES): Likewise.
1586 (dm_nv_mod_CFLAGS): Likewise.
1587 (dm_nv_mod_LDFLAGS): Likewise.
1589 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1590 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1591 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1593 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1594 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1596 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1598 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1600 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1602 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1604 * disk/raid5_recover.c: New file.
1606 * disk/raid6_recover.c: Likewise.
1608 * disk/mdraid_linux.c: Likewise.
1610 * disk/dmraid_nvidia.c: Likewise.
1612 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1615 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1616 calculate the size of raid device.
1617 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1618 different layout of raid5.
1619 (grub_raid_scan_device): Remove code specific to mdraid.
1620 (grub_raid_list): New variable.
1621 (free_array): New function.
1622 (grub_raid_register): Likewise.
1623 (grub_raid_unregister): Likewise.
1624 (grub_raid_rescan): Likewise.
1625 (GRUB_MOD_INIT): Don't iterate device here.
1626 (GRUB_MOD_FINI): Use free_array to release resource.
1628 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1629 (grub_raid5_recover_func_t): New function variable type.
1630 (grub_raid6_recover_func_t): Likewise.
1631 (grub_raid5_recover_func): New variable.
1632 (grub_raid6_recover_func): Likewise.
1633 (grub_raid_register): New function.
1634 (grub_raid_unregister): Likewise.
1635 (grub_raid_rescan): Likewise.
1636 (grub_raid_block_xor): Likewise.
1638 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
1639 (CMD_CRC): New macro.
1641 (read_file): Handle device as well as file.
1642 (cmd_crc): New function.
1643 (fstest): Handle multiple disks.
1644 (options): Remove part, raw and long, add root and diskcount.
1645 (usage): Add crc, remove -p, -r, -l, add -r and -c.
1646 (main): Find the first non option entry and ignore subsequent options,
1647 add handling for the new options, support multiple disks.
1649 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1651 2008-08-23 Bean <bean123ch@gmail.com>
1653 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1655 * genfslist.sh: Ignore kernel.mod.
1657 * genpartmaplist.sh: Likewise.
1659 2008-08-23 Robert Millan <rmh@aybabtu.com>
1661 * util/getroot.c (find_root_device): Skip anything that starts with
1662 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1664 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
1666 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1667 * util/grub.d/00_header.in: Allow the administrator to change default
1668 gfxmode via ${GRUB_GFXMODE}.
1670 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
1672 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1674 2008-08-21 Robert Millan <rmh@aybabtu.com>
1676 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1678 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1679 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1681 2008-08-20 Carles Pina i Estany <carles@pina.cat>
1683 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1684 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1686 2008-08-19 Robert Millan <rmh@aybabtu.com>
1688 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1689 (struct grub_virtual_screen): Remove `cursor_color'.
1690 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1692 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1694 2008-08-18 Robert Millan <rmh@aybabtu.com>
1696 Unify (identical) linux_normal.c files.
1697 * loader/i386/efi/linux_normal.c: Move from here ...
1698 * loader/linux_normal.c: ... to here. Update all users.
1699 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1700 * loader/i386/ieee1275/linux_normal.c: Likewise.
1702 2008-08-18 Robert Millan <rmh@aybabtu.com>
1704 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1705 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1706 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1707 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1708 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1710 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1711 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1712 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1713 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1714 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1715 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1716 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1717 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1718 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1719 portably using grub_getxy().
1720 Replace `-EFI' with `-bzImage' in boot message.
1722 2008-08-17 Robert Millan <rmh@aybabtu.com>
1724 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1726 2008-08-17 Robert Millan <rmh@aybabtu.com>
1728 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1730 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1731 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1732 (grub_machine_mmap_iterate): New function declaration.
1733 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1735 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1738 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1739 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1740 Move e820 parsing from here ...
1741 * kern/i386/pc/mmap.c: New file.
1742 (grub_machine_mmap_iterate): ... to here.
1744 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1745 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1746 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1747 (grub_available_iterate): Redeclare to return `void', and redeclare
1748 its hook to use grub_uint64_t as addr and size parameters, and rename
1750 (grub_machine_mmap_iterate): ... this. Update all users.
1752 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1753 to make it more readable. Rename to ...
1754 (grub_machine_mmap_iterate): ... this.
1756 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1757 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1758 (grub_multiboot): Allocate an extra region after the payload, and fill
1759 it with a Multiboot memory map. Adjust a.out loader to calculate size
1760 with the extra space.
1761 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1762 with the extra space.
1764 2008-08-17 Carles Pina i Estany <carles@pina.cat>
1766 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1768 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
1770 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1771 mdate-sh to the list `find' searches for.
1772 * DISTLIST: Regenerated.
1774 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
1776 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1777 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1778 genmoddep.awk, gensymlist.sh.in.
1779 (DISTDIRS): Add bus, docs, hook, lib.
1780 * DISTLIST: Regenerated.
1781 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1783 2008-08-16 Robert Millan <rmh@aybabtu.com>
1785 * disk/raid.c (grub_raid_init): Handle/report errors set by
1786 grub_device_iterate().
1787 * disk/lvm.c (grub_lvm_init): Likewise.
1789 2008-08-15 Bean <bean123ch@gmail.com>
1791 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1793 (datetime_mod_SOURCES): New macro.
1794 (datetime_mod_CFLAGS): Likewise.
1795 (datetime_mod_LDFLAGS): Likewise.
1796 (date_mod_SOURCES): Likewise.
1797 (date_mod_CFLAGS): Likewise.
1798 (date_mod_LDFLAGS): Likewise.
1799 (datehook_mod_SOURCES): Likewise.
1800 (datehook_mod_CFLAGS): Likewise.
1801 (datehook_mod_LDFLAGS): Likewise.
1803 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1805 (datetime_mod_SOURCES): New macro.
1806 (datetime_mod_CFLAGS): Likewise.
1807 (datetime_mod_LDFLAGS): Likewise.
1808 (date_mod_SOURCES): Likewise.
1809 (date_mod_CFLAGS): Likewise.
1810 (date_mod_LDFLAGS): Likewise.
1811 (datehook_mod_SOURCES): Likewise.
1812 (datehook_mod_CFLAGS): Likewise.
1813 (datehook_mod_LDFLAGS): Likewise.
1815 * conf/i386-ieee1275.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-efi.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/x86_64-efi.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 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1853 * commands/date.c: New file.
1855 * hook/datehook.c: Likewise.
1857 * include/grub/lib/datetime.h: Likewise.
1859 * include/grub/i386/cmos.h: Likewise.
1861 * lib/datetime.c: Likewise.
1863 * lib/i386/datetime.c: Likewise.
1865 * lib/efi/datetime.c: Likewise.
1867 2008-08-14 Robert Millan <rmh@aybabtu.com>
1869 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1870 (grub_mkelfimage_SOURCES): New variable.
1871 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1873 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1874 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1875 * conf/powerpc-ieee1275.rmk: Likewise.
1876 * conf/i386-ieee1275.rmk: Likewise.
1878 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1879 * kern/i386/coreboot/init.c: Likewise.
1881 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1882 with `<grub/cpu/kernel.h>'.
1883 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1885 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1886 * kern/i386/coreboot/startup.S: Likewise.
1888 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1889 (GRUB_MOD_GAP): Remove.
1890 * include/grub/powerpc/kernel.h: New file.
1891 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1892 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1893 * include/grub/i386/kernel.h: New file.
1894 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1895 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1896 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1898 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1900 Use --directory when invoking grub_mkimage.
1902 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1903 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1904 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1905 and GRUB_KERNEL_CPU_PREFIX.
1907 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
1909 * include/grub/err.h (grub_err_printf): New function prototype.
1910 * util/misc.c (grub_err_printf): New function.
1911 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1913 * kern/err.c (grub_print_error): Use grub_err_printf.
1915 2008-08-13 Robert Millan <rmh@aybabtu.com>
1917 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1919 2008-08-13 Robert Millan <rmh@aybabtu.com>
1921 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1924 2008-08-12 Robert Millan <rmh@aybabtu.com>
1926 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1927 of the relocation code from here ...
1928 (grub_multiboot): ... to here.
1929 (forward_relocator, backward_relocator): Move from here ...
1930 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1931 (grub_multiboot_backward_relocator): ... to here.
1932 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1933 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1934 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1935 (grub_multiboot_forward_relocator_end)
1936 (grub_multiboot_backward_relocator)
1937 (grub_multiboot_backward_relocator_end): New variables.
1939 2008-08-12 Bean <bean123ch@gmail.com>
1941 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1943 2008-08-11 Robert Millan <rmh@aybabtu.com>
1945 * kern/i386/linuxbios/startup.S: Move from here ...
1946 * kern/i386/coreboot/startup.S: ... to here.
1948 * kern/i386/linuxbios/init.c: Move from here ...
1949 * kern/i386/coreboot/init.c: ... to here.
1951 * kern/i386/linuxbios/table.c: Move from here ...
1952 * kern/i386/coreboot/mmap.c: ... to here.
1954 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1956 2008-08-11 Robert Millan <rmh@aybabtu.com>
1958 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1959 errors. Leave it to the upper layer to handle them.
1961 2008-08-09 Christian Franke <franke@computer.org>
1963 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1964 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1965 Install `grub.d/10_windows' only on Cygwin.
1966 * configure.ac: Add subst of `target_os'.
1967 Check `target_os' also before setting TARGET_OBJ2ELF.
1968 Add `--enable-grub-pe2elf'.
1970 2008-08-08 Robert Millan <rmh@aybabtu.com>
1972 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1973 (grub_last_time): Change type to grub_uint64_t.
1974 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1975 (grub_disk_close): Likewise.
1977 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1978 (run_menu): Migrate code from to using grub_get_time_ms().
1980 * util/misc.c (grub_get_time_ms): New function.
1982 2008-08-08 Marco Gerards <marco@gnu.org>
1984 * disk/ata.c (grub_ata_regget): Change return type to
1986 (grub_ata_regget2): Likewise.
1987 (grub_ata_wait_status): New function.
1988 (grub_ata_wait_busy): Removed function, updated all users to use
1989 `grub_ata_wait_status'.
1990 (grub_ata_wait_drq): Likewise.
1991 (grub_ata_cmd): New function.
1992 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1994 (grub_ata_pio_write): Add error handling.
1995 (grub_atapi_identify): Likewise.
1996 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1998 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1999 handling. Actually use the detected registers. Reorder the
2000 detection logic such that it is easier to read.
2001 (grub_ata_pciinit): Do not assign the same ID to each controller.
2002 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2004 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2006 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2008 2008-08-08 Marco Gerards <marco@gnu.org>
2012 2008-08-07 Bean <bean123ch@gmail.com>
2014 * include/grub/x86_64/pci.h: New file.
2016 2008-08-07 Christian Franke <franke@computer.org>
2018 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2019 (TIMER2_GATE): Likewise.
2020 (grub_pit_wait): Add enable/disable of the timer2 gate
2021 bit of port 0x61. This fixes a possible infinite loop.
2023 2008-08-07 Bean <bean123ch@gmail.com>
2025 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2026 kern/i386/tsc.c and kern/i386/pit.c.
2028 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2031 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2034 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2036 2008-08-07 Bean <bean123ch@gmail.com>
2038 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2040 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2042 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2043 multiple inclusion. Add #include <grub/types.h>.
2045 2008-08-06 Christian Franke <franke@computer.org>
2047 * conf/common.rmk: Build and install `10_windows'.
2048 * util/grub.d/10_windows.in: New script.
2050 2008-08-06 Pavel Roskin <proski@gnu.org>
2052 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2054 2008-08-06 Robert Millan <rmh@aybabtu.com>
2056 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2057 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2059 2008-08-06 Bean <bean123ch@gmail.com>
2061 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2062 (grub_pxefs_fs_int): Remove dummy definition.
2063 (grub_pxefs_open): Use data->block_size to store the current block
2065 (grub_pxefs_read): Use block size stored in data->block_size. As the
2066 value of grub_pxe_blksize can be changed after the file is opened.
2068 2008-08-06 Bean <bean123ch@gmail.com>
2070 * fs/i386/pc/pxe.c (curr_file): new variable.
2071 (grub_pxefs_open): Simply the handling of pxe file system. Don't
2072 require the dummy internal file system anymore.
2073 (grub_pxefs_read): Removed.
2074 (grub_pxefs_close): Likewise.
2075 (grub_pxefs_fs_int): Likewise.
2076 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2077 connection when we switch file.
2078 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2080 2008-08-06 Robert Millan <rmh@aybabtu.com>
2082 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2084 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2085 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2087 * kern/i386/halt.c: New file.
2088 * kern/i386/reboot.c: Likewise.
2089 * include/grub/i386/reboot.h: Likewise.
2090 * include/grub/i386/halt.h: Likewise.
2092 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2093 Include `<grub/cpu/halt.h>'.
2094 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2095 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2097 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2098 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2099 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2100 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2101 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2102 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2104 * include/grub/i386/at_keyboard.h: ... to here.
2106 2008-08-05 Robert Millan <rmh@aybabtu.com>
2108 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2109 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2110 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2111 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2112 `kern/generic/millisleep.c'.
2114 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2115 instead of grub_get_rtc().
2116 (grub_tsc_init): Initialize `tsc_boot_time'.
2118 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2119 (grub_machine_init): Use grub_tsc_init() rather than
2120 installing an RTC-based handler via grub_install_get_time_ms().
2122 * kern/i386/pit.c: New file.
2123 * include/grub/i386/pit.h: Likewise.
2125 2008-08-05 Bean <bean123ch@gmail.com>
2127 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2129 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2130 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2131 (pxe_mod_SOURCES): New macro.
2132 (pxe_mod_CFLAGS): Likewise.
2133 (pxe_mod_LDFLAGS): Likewise.
2134 (pxecmd_mod_SOURCES): Likewise.
2135 (pxecmd_mod_CFLAGS): Likewise.
2136 (pxecmd_mod_LDFLAGS): Likewise.
2138 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2139 (grub_pxe_call): Likewise.
2141 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2143 * commands/i386/pc/pxecmd.c: New file.
2145 * fs/i386/pc/pxe.c: Likewise.
2147 * include/grub/i386/pc/pxe.h: Likewise.
2149 2008-08-05 Bean <bean123ch@gmail.com>
2151 * util/console.c (grub_console_cur_color): New variable.
2152 (grub_console_standard_color): Likewise.
2153 (grub_console_normal_color): Likewise.
2154 (grub_console_highlight_color): Likewise.
2155 (color_map): Likewise.
2156 (use_color): Likewise.
2157 (NUM_COLORS): New macro.
2158 (grub_ncurses_setcolorstate): Handle color properly.
2159 (grub_ncurses_setcolor): Don't change color here, just remember the
2160 settings, color will be set in grub_ncurses_setcolorstate.
2161 (grub_ncurses_getcolor): New function.
2162 (grub_ncurses_init): Initialize color pairs.
2163 (grub_ncurses_term): New member grub_ncurses_getcolor.
2165 2008-08-05 Colin D Bennett <colin@gibibit.com>
2167 High resolution timer support. Implemented for x86 CPUs using TSC.
2168 Extracted generic grub_millisleep() so it's linked in only as needed.
2169 This requires a Pentium compatible CPU; if the RDTSC instruction is
2170 not supported, then it falls back on the generic grub_get_time_ms()
2171 implementation that uses the machine's RTC.
2173 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2174 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2175 `kern/generic/millisleep.c'.
2177 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2178 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2180 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2181 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2183 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2185 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2186 `kern/generic/millisleep.c'.
2188 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2190 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2192 * kern/generic/rtc_get_time_ms.c: New file.
2194 * kern/generic/millisleep.c: New file.
2196 * kern/misc.c: Don't include
2197 <kern/time.h> anymore.
2198 (grub_millisleep_generic): Removed.
2200 * commands/sleep.c (grub_interruptible_millisleep): Uses
2201 grub_get_time_ms() instead of grub_get_rtc().
2203 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2205 (grub_cpu_is_cpuid_supported): New inline function.
2206 (grub_cpu_is_tsc_supported): New inline function.
2207 (grub_tsc_init): New function prototype.
2208 (grub_tsc_get_time_ms): New function prototype.
2210 * kern/i386/tsc.c (grub_get_time_ms): New file.
2212 * include/grub/time.h: Include <grub/types.h.
2213 (grub_millisleep_generic): Removed.
2214 (grub_get_time_ms): New prototype.
2215 (grub_install_get_time_ms): New prototype.
2216 (grub_rtc_get_time_ms): New prototype.
2218 * kern/time.c (grub_get_time_ms): New function.
2219 (grub_install_get_time_ms): New function.
2221 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2222 <grub/time.h> anymore.
2223 (grub_millisleep): Removed.
2224 (grub_machine_init): Call grub_tsc_init.
2226 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2227 get_time_ms() implementation.
2229 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2230 (ieee1275_get_time_ms): New function.
2231 (grub_machine_init): Install get_time_ms() implementation.
2233 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2234 (grub_machine_init): Call grub_tsc_init().
2235 (grub_millisleep): Removed.
2237 * kern/ieee1275/init.c (grub_millisleep): Removed.
2238 (grub_machine_init): Install ieee1275_get_time_ms()
2240 (ieee1275_get_time_ms): New function.
2241 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2244 2008-08-05 Marco Gerards <marco@gnu.org>
2246 * disk/ata.c: Include <grub/pci.h>.
2247 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2248 (grub_ata_initialize): Rewritten.
2249 (grub_ata_device_initialize): New function.
2251 2008-08-04 Pavel Roskin <proski@gnu.org>
2253 * kern/main.c: Include grub/mm.h.
2255 2008-08-04 Robert Millan <rmh@aybabtu.com>
2257 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2258 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2259 corruption problem).
2261 2008-08-04 Robert Millan <rmh@aybabtu.com>
2263 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2264 warnings introduced in my last commit.
2266 2008-08-03 Robert Millan <rmh@aybabtu.com>
2268 Make PCI available on all i386 architectures.
2270 * include/grub/i386/pc/pci.h: Move from here ...
2271 * include/grub/i386/pci.h: ... to here.
2273 * include/grub/i386/pc/pci.h: Remove.
2274 * include/grub/i386/efi/pci.h: Remove.
2275 * include/grub/x86_64/efi/pci.h: Remove.
2277 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2280 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2281 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2282 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2284 * conf/i386-ieee1275.rmk: Likewise.
2286 2008-08-03 Robert Millan <rmh@aybabtu.com>
2288 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2289 (grub_console_setcursor): Make it possible to set cursor off.
2291 2008-08-03 Robert Millan <rmh@aybabtu.com>
2293 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2294 of modules instead of assuming which platform provides what.
2295 * util/update-grub.in: Likewise.
2297 2008-08-03 Robert Millan <rmh@aybabtu.com>
2299 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2300 instead of `grub_install_dos_part' to determine whether a drive needs
2301 to be prepended to prefix (`grub_install_dos_part' is not reliable,
2302 because it can be overridden when loading GRUB via Multiboot).
2304 2008-08-02 Robert Millan <rmh@aybabtu.com>
2306 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2308 2008-08-02 Robert Millan <rmh@aybabtu.com>
2310 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2311 of informational grub_dprintf() calls.
2313 2008-08-02 Robert Millan <rmh@aybabtu.com>
2315 * disk/memdisk.c (memdisk_size): Don't initialize.
2316 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2318 * include/grub/i386/pc/kernel.h
2319 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2320 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2321 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2322 (grub_arch_memdisk_size): Remove.
2324 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2325 field (was only used to transfer a constant). Add `type' field to
2326 support multiple module types.
2327 (grub_module_iterate): New function.
2329 * kern/device.c (grub_device_open): Do not hide error messages
2330 when grub_disk_open() fails. Use grub_print_error() instead.
2332 * kern/i386/pc/init.c (grub_arch_modules_addr)
2333 (grub_arch_memdisk_size): Remove functions.
2334 (grub_arch_modules_addr): Return the module address in high memory
2335 (now that it isn't copied anymore).
2337 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2338 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2339 decompression routine (grub_total_module_size already includes that
2340 now). Don't copy modules back to low memory.
2342 * kern/main.c: Include `<grub/mm.h>'.
2343 (grub_load_modules): Split out (and use) ...
2344 (grub_module_iterate): ... this function, which iterates through
2345 module objects and runs a hook.
2346 Comment out grub_mm_init_region() call, as it would cause non-ELF
2347 modules to be overwritten.
2349 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2350 the memdisk image in its own region, make it part of the module list.
2351 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2352 (main): Parse --memdisk|-m option, and pass user-provided path as
2353 parameter to generate_image().
2354 (add_segments): Pass `memdisk_path' down to load_modules().
2355 (load_modules): Embed memdisk image in module section when requested.
2356 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2357 `header.type' instead of `header.offset'.
2359 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2360 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2361 (memdisk_mod_LDFLAGS): New variables.
2362 * conf/i386-coreboot.rmk: Likewise.
2363 * conf/i386-ieee1275.rmk: Likewise.
2365 2008-08-02 Robert Millan <rmh@aybabtu.com>
2367 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2368 (backward_relocator): New variables. Used to allocate and relocate
2369 the payload, respectively.
2370 (grub_multiboot_load_elf32): Load into heap instead of requested
2371 address, install the appropriate relocator code in each bound of
2372 the payload, and set the entry point such that
2373 grub_multiboot_real_boot() will jump to one of them.
2375 * kern/i386/loader.S (grub_multiboot_payload_size)
2376 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2377 (grub_multiboot_payload_entry_offset): New variables.
2378 (grub_multiboot_real_boot): Set cpu context to what the relocator
2379 expects, and jump to the relocator instead of the payload.
2381 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2382 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2383 (grub_multiboot_payload_entry_offset): Export.
2385 2008-08-01 Bean <bean123ch@gmail.com>
2387 * normal/menu_entry.c (editor_getline): Don't return the original
2388 string as result, as it will be released by lexer once it has done
2391 2008-08-01 Robert Millan <rmh@aybabtu.com>
2393 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2394 within menuentries, not before them.
2395 util/grub.d/10_hurd.in: Likewise.
2397 2008-08-01 Bean <bean123ch@gmail.com>
2399 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2400 (bufio_mod_SOURCES): New macro.
2401 (bufio_mod_CFLAGS): Likewise.
2402 (bufio_mod_LDFLAGS): Likewise.
2404 * include/grub/bufio.h: New file.
2406 * io/bufio.c: Likewise.
2408 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2409 (grub_video_reader_png): Use grub_buffile_open to open file.
2411 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2412 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2414 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2415 (grub_video_reader_tga): Use grub_buffile_open to open file.
2417 * font/manager.c: Include <grub/bufio.h>.
2418 (add_font): Use grub_buffile_open to open file.
2420 2008-07-31 Robert Millan <rmh@aybabtu.com>
2422 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2423 ELF segments, use a macro for arbitrarily accessing any of them instead
2424 of preparing a pointer that allows access to one at a time.
2425 (grub_multiboot_load_elf64): Likewise.
2427 2008-07-31 Bean <bean123ch@gmail.com>
2429 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2430 GRUB_KERNEL_MACHINE_DATA_END.
2432 2008-07-30 Robert Millan <rmh@aybabtu.com>
2434 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2435 Increase from 0x50 to 0x60.
2436 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2437 use UUIDs to identify the root drive for them. If that's not
2439 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2440 check, for cross-disk installs.
2442 2008-07-30 Robert Millan <rmh@aybabtu.com>
2444 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2445 is non-empty, use it to set the `prefix' environment variable instead
2446 of the usual approach.
2447 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2448 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2449 environment variable instead of dummy make_install_device().
2451 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2452 (start): Insert a data section, with `grub_prefix' variable.
2453 * kern/i386/linuxbios/startup.S: Likewise.
2455 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2456 New variable reference.
2457 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2458 New macro. Defines offset of `grub_prefix' within startup.S (relative
2460 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2461 section within startup.S (relative to `start').
2462 * include/grub/i386/coreboot/kernel.h: Likewise.
2464 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2465 Overwrite grub_prefix with its contents, at the beginning of the
2467 (main): Understand -p|--prefix.
2469 2008-07-30 Robert Millan <rmh@aybabtu.com>
2471 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2473 2008-07-30 Robert Millan <rmh@aybabtu.com>
2475 * term/i386/pc/vga_text.c (grub_console_cls): Use
2476 grub_console_gotoxy() to go back to beginning of the screen.
2477 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2479 2008-07-29 Christian Franke <franke@computer.org>
2481 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2482 Add conversion of emulated mount points on Cygwin.
2484 2008-07-29 Christian Franke <franke@computer.org>
2486 * util/update-grub.in: Add a check for admin
2488 Remove old `grub.cfg.new' before creation.
2489 Add `-f' to `mv' to handle the different filesystem
2490 semantics of Windows.
2492 2008-07-29 Bean <bean123ch@gmail.com>
2494 * normal/main.c (get_line): Fix buffer overflow bug.
2496 2008-07-28 Robert Millan <rmh@aybabtu.com>
2498 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2499 (struct grub_apple_header): New struct. Describes the layout of
2501 (apple_partition_map_iterate): Check the header magic as well as the
2502 partition magic (which was already being checked).
2504 2008-07-28 Pavel Roskin <proski@gnu.org>
2506 * genmk.rb: Add a warning to the beginning of the output that
2507 it's a generated file and should not be edited.
2509 2008-07-28 Robert Millan <rmh@aybabtu.com>
2511 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2512 with the same number are found, just use issue a warning with
2513 grub_dprintf(), as this error has been reported to be non-fatal.
2515 2008-07-27 Robert Millan <rmh@aybabtu.com>
2517 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2520 2008-07-27 Bean <bean123ch@gmail.com>
2522 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2523 (grub_fat_find_dir): Ignore case when comparing filename.
2525 2008-07-27 Bean <bean123ch@gmail.com>
2527 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2528 smallino, as it's more descriptive, and i8count can be confused with
2529 the other field count.
2530 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2533 2008-07-27 Bean <bean123ch@gmail.com>
2535 * commands/crc.c: New file.
2537 * lib/crc.c: Likewise.
2539 * include/grub/lib/crc.h: Likewise.
2541 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2543 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2544 (hexdump): Move this function to ...
2546 * lib/hexdump.c: ... here.
2548 * include/grub/hexdump.h: Renamed to ...
2550 * include/grub/lib/hexdump.h: ... this.
2552 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2554 * util/grub-editenv.c: Likewise.
2556 * include/envblk.h: Renamed to ...
2558 * include/lib/envblk.h: ... this.
2560 * util/envblk.c: Renamed to ...
2562 * lib/envblk.c: ... this.
2564 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2566 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2567 (pkglib_MODULES): Add crc.mod.
2568 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2569 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2570 (crc_mod_SOURCES): New macro.
2571 (crc_mod_CFLAGS): Likewise.
2572 (crc_mod_LDFLAGS): Likewise.
2574 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2576 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2578 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2580 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2582 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2584 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
2586 * commands/help.c: Include <grub/term.h>.
2587 (TERM_WIDTH): Removed. Updated all users.
2589 2008-07-27 Pavel Roskin <proski@gnu.org>
2591 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2592 spurious warnings about a comment within a comment.
2594 2008-07-25 Robert Millan <rmh@aybabtu.com>
2596 * util/getroot.c (find_root_device): Skip devices that match
2597 /dev/dm-[0-9]. This lets the real device be found for any type of
2598 abstraction (LVM, EVMS, RAID..).
2599 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2600 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2601 device is found first, find_root_device() will now skip it.
2603 2008-07-24 Pavel Roskin <proski@gnu.org>
2605 * include/grub/types.h: Use __builtin_bswap32() and
2606 __builtin_bswap64() with gcc 4.3 and newer.
2608 2008-07-24 Christian Franke <franke@computer.org>
2610 * util/i386/pc/grub-install.in: If `--debug' is specified,
2611 pass `--verbose' to grub-setup.
2612 Abort script if make_system_path_relative_to_its_root() fails.
2614 2008-07-24 Bean <bean123ch@gmail.com>
2616 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2617 variable `target_platform' should be `platform'.
2619 2008-07-24 Bean <bean123ch@gmail.com>
2621 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
2622 (grub_png_init_fixed_block): New function.
2623 (grub_png_decode_image_data): Handle fixed huffman code compression.
2625 2008-07-24 Bean <bean123ch@gmail.com>
2627 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2628 (grub_pe2elf_SOURCES): New macro.
2629 (CLEANFILES): Add grub-pe2elf.
2631 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2632 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2633 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2634 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2635 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
2636 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
2637 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
2638 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
2639 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
2640 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
2641 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
2642 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
2643 (GRUB_PE32_DT_FUNCTION): Likewise.
2644 (GRUB_PE32_REL_I386_DIR32): Likewise.
2645 (GRUB_PE32_REL_I386_REL32): Likewise.
2646 (grub_pe32_symbol): New structure.
2647 (grub_pe32_reloc): Likewise.
2649 * util/grub-pe2elf.c: New file.
2651 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2652 start symbol in non pc platform.
2654 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2656 The following patches are from Christian Franke.
2658 * include/grub/dl.h: Remove .previous, gas supports this only
2661 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2662 Remove .type, gas supports this only for ELF format.
2664 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2665 nullbytes in symbol table. This fixes an infinite loop if table is
2668 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2669 TARGET_IMG_LDFLAGS and EXEEXT.
2671 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2672 TARGET_IMG_LDFLAGS_AC.
2673 (grub_CHECK_STACK_ARG_PROBE): New function.
2675 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2677 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2679 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2680 to set TARGET_IMG_LD* accordingly.
2681 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2682 Add call to grub_CHECK_STACK_ARG_PROBE.
2683 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2685 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2687 * genmk.rb: Add EXEEXT to CLEANFILES.
2689 2008-07-23 Robert Millan <rmh@aybabtu.com>
2691 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2692 define the codes for arrows and lines used for the menu).
2693 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2696 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2697 fonts, because the latter are too slow.
2699 2008-07-21 Bean <bean123ch@gmail.com>
2701 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2702 a20. Run keyboard test last, as it will cause macbook to halt.
2704 2008-07-18 Pavel Roskin <proski@gnu.org>
2706 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2707 load foreign architecture modules correctly anyway. Keep
2708 support for loading host architecture modules, whether we
2709 compile them or not.
2711 2008-07-17 Pavel Roskin <proski@gnu.org>
2713 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2714 change target_cpu. The compiler default can mismatch target_cpu
2717 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2718 * kern/efi/efi.c: Likewise.
2720 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2721 target compiler is functional.
2722 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2725 * configure.ac: Default to efi platform for x86_64-apple. Allow
2726 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2727 adjustments from the rest, only do them if target is not
2728 explicitly given. Merge other adjustments with the final sanity
2729 check. Remove an extraneous check for supported CPU. Be
2730 specific which CPU and which platform is not supported.
2732 * configure.ac: Default to pc platform for x86_64.
2734 2008-07-17 Robert Millan <rmh@aybabtu.com>
2736 Partial LinuxBIOS -> Coreboot rename.
2738 * conf/i386-linuxbios.rmk: Renamed to ...
2739 * conf/i386-coreboot.rmk: ... this.
2740 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2741 * configure.ac: Accept "coreboot" as input platform (but maintain
2742 compatibility with "linuxbios").
2743 * include/grub/i386/linuxbios: Renamed to ...
2744 * include/grub/i386/coreboot: ... this.
2746 2008-07-17 Bean <bean123ch@gmail.com>
2748 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2749 (appleldr_mod_SOURCE): New variable.
2750 (appleldr_mod_CFLAGS): Likewise.
2751 (appleldr_mod_LDFLAGS): Likewise.
2752 (pci_mod_SOURCES): Likewise.
2753 (pci_mod_CFLAGS): Likewise.
2754 (pci_mod_LDFLAGS): Likewise.
2755 (lspci_mod_SOURCES): Likewise.
2756 (lspci_mod_CFLAGS): Likewise.
2757 (lspci_mod_LDFLAGS): Likewise.
2759 * conf/x86_64-efi.rmk: New file.
2761 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2763 (grub_efidisk_write): Likewise.
2765 * include/efi/api.h (efi_call_0): New macro.
2766 (efi_call_1): Likewise.
2767 (efi_call_2): Likewise.
2768 (efi_call_3): Likewise.
2769 (efi_call_4): Likewise.
2770 (efi_call_5): Likewise.
2771 (efi_call_6): Likewise.
2773 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2774 grub_rescue_cmd_chainloader.
2776 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2777 (grub_pe32_optional_header): Change some fields based on i386 or
2779 (GRUB_PE32_PE32_MAGIC): Likewise.
2781 * include/grub/efi/uga_draw.h: New file.
2783 * include/grub/elf.h (STN_ABS): New constant.
2784 (R_X86_64_NONE): Relocation constant for x86_64.
2785 (R_X86_64_64): Likewise.
2786 (R_X86_64_PC32): Likewise.
2787 (R_X86_64_GOT32): Likewise.
2788 (R_X86_64_PLT32): Likewise.
2789 (R_X86_64_COPY): Likewise.
2790 (R_X86_64_GLOB_DAT): Likewise.
2791 (R_X86_64_JUMP_SLOT): Likewise.
2792 (R_X86_64_RELATIVE): Likewise.
2793 (R_X86_64_GOTPCREL): Likewise.
2794 (R_X86_64_32): Likewise.
2795 (R_X86_64_32S): Likewise.
2796 (R_X86_64_16): Likewise.
2797 (R_X86_64_PC16): Likewise.
2798 (R_X86_64_8): Likewise.
2799 (R_X86_64_PC8): Likewise.
2801 * include/grub/i386/efi/pci.h: New file.
2803 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2804 Change it value based on platform.
2805 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2806 (GRUB_E820_RAM): Likewise.
2807 (GRUB_E820_RESERVED): Likewise.
2808 (GRUB_E820_ACPI): Likewise.
2809 (GRUB_E820_NVS): Likewise.
2810 (GRUB_E820_EXEC_CODE): Likewise.
2811 (GRUB_E820_MAX_ENTRY): Likewise.
2812 (grub_e820_mmap): New structure.
2813 (linux_kernel_header): Change the efi field according to different
2814 kernel version, also field from linux_kernel_header.
2816 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2818 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2819 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2820 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2821 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2822 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2823 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2824 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2825 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2826 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2827 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2829 * include/grub/x86_64/efi/kernel.h: New file.
2831 * include/grub/x86_64/efi/loader.h: Likewise.
2833 * include/grub/x86_64/efi/machine.h: Likewise.
2835 * include/grub/x86_64/efi/pci.h: Likewise.
2837 * include/grub/x86_64/efi/time.h: Likewise.
2839 * include/grub/x86_64/linux.h: Likewise.
2841 * include/grub/x86_64/setjmp.h: Likewise.
2843 * include/grub/x86_64/time.h: Likewise.
2845 * include/grub/x86_64/types.h: Likewise.
2847 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2848 GRUB_TARGET_SIZEOF_VOID_P.
2850 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2851 (grub_efi_locate_handle): Likewise.
2852 (grub_efi_open_protocol): Likewise.
2853 (grub_efi_set_text_mode): Likewise.
2854 (grub_efi_stall): Likewise.
2855 (grub_exit): Likewise.
2856 (grub_reboot): Likewise.
2857 (grub_halt): Likewise.
2858 (grub_efi_exit_boot_services): Likewise.
2859 (grub_get_rtc): Likewise.
2861 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2862 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2863 (grub_efi_allocate_pages): Wrap efi calls.
2864 (grub_efi_free_pages): Wrap efi calls.
2865 (grub_efi_get_memory_map): Wrap efi calls.
2867 * kern/x86_64/dl.c: New file.
2869 * kern/x86_64/efi/callwrap.S: Likewise.
2871 * kern/x86_64/efi/startup.S: Likewise.
2873 * loader/efi/appleloader.c: Likewise.
2875 * loader/efi/chainloader.c (cmdline): New variable.
2876 (grub_chainloader_unload): Wrap efi calls.
2877 (grub_chainloader_boot): Likewise.
2878 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2881 * loader/efi/chainloader_normal.c (chainloader_command):
2882 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2885 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2887 (grub_e820_add_region): New function.
2888 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2890 (grub_find_video_card): New function.
2891 (grub_linux_setup_video): New function.
2892 (grub_rescue_cmd_linux): Probe for video information.
2894 * normal/x86_64/setjmp.S: New file.
2896 * term/efi/console.c (map_char): New function.
2897 (grub_console_putchar): Map unicode char.
2898 (grub_console_checkkey): Wrap efi calls.
2899 (grub_console_getkey): Likewise.
2900 (grub_console_getwh): Likewise.
2901 (grub_console_gotoxy): Likewise.
2902 (grub_console_cls): Likewise.
2903 (grub_console_setcolorstate): Likewise.
2904 (grub_console_setcursor): Likewise.
2906 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2908 2008-07-16 Pavel Roskin <proski@gnu.org>
2910 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2913 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2914 pointer, not an integer. This fixes a warning and prevents
2915 precision loss on 64-bit systems.
2916 (relocate_addresses): Remove unneeded cast.
2918 2008-07-15 Pavel Roskin <proski@gnu.org>
2920 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2922 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2924 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2925 Fix comparison between signed and unsigned.
2927 * include/grub/i386/ieee1275/console.h: Declare
2928 grub_console_init() and grub_console_fini().
2930 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2931 It's empty and unused.
2933 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2934 beginning to avoid warnings with some compilers.
2936 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2937 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2939 2008-07-14 Pavel Roskin <proski@gnu.org>
2941 * kern/env.c (grub_register_variable_hook): Don't copy empty
2942 string, it leaks memory. Pass "" to grub_env_set(), it should
2943 handle constant strings.
2945 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2946 * commands/cmp.c (grub_cmd_cmp): Likewise.
2947 * kern/dl.c (grub_dl_flush_cache): Likewise.
2948 (grub_dl_load_core): Likewise.
2949 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2950 (grub_elf64_load_phdrs): Likewise.
2952 2008-07-13 Pavel Roskin <proski@gnu.org>
2954 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2955 between signed and unsigned.
2956 (LzmaEnc_Finish): Fix warning about an unused parameter.
2958 2008-07-13 Bean <bean123ch@gmail.com>
2960 * Makefile.in (enable_lzo): New rule.
2962 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2964 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2966 * boot/i386/pc/lnxboot.S: #include <config.h>.
2968 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2969 its value according to the compression algorithm used, lzo or lzma.
2971 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2972 compression algorithm according to configure macro.
2974 * kern/i386/pc/startup.S (codestart): Likewise.
2976 * kern/i386/pc/lzma_decode.S: New file.
2978 * include/grub/lib/LzFind.h: Likewise.
2980 * include/grub/lib/LzHash.h: Likewise.
2982 * include/grub/lib/LzmaDec.h: Likewise.
2984 * include/grub/lib/LzmaEnc.h: Likewise.
2986 * include/grub/lib/LzmaTypes.h: Likewise.
2988 * lib/LzFind.c: Likewise.
2990 * lib/LzmaDec.c: Likewise.
2992 * lib/LzmaEnc.c: Likewise.
2994 2008-07-13 Bean <bean123ch@gmail.com>
2996 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2997 (grub_ext4_extent_header): New structure.
2998 (grub_ext4_extent): Likewise.
2999 (grub_ext4_extent_idx): Likewise.
3000 (grub_ext4_find_leaf): New function.
3001 (grub_ext2_read_block): Handle extents.
3003 2008-07-12 Robert Millan <rmh@aybabtu.com>
3005 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3007 2008-07-11 Robert Millan <rmh@aybabtu.com>
3009 * util/grub.d/40_custom.in: New file. Example on how to add custom
3010 entries to /etc/grub.d.
3011 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3012 40_custom (implicitly, by merging all the grub.d rules).
3014 2008-07-11 Pavel Roskin <proski@gnu.org>
3016 * commands/read.c (grub_getline): Fix invalid memory access.
3017 Don't add newline to the variable value.
3019 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3020 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3021 (serial_hw_get_port): Check validity of the port number.
3022 (grub_cmd_serial): Check return value of serial_hw_get_port().
3024 2008-07-07 Pavel Roskin <proski@gnu.org>
3026 * boot/i386/pc/diskboot.S (notification_string): Replace
3027 "Loading kernel" with just "loading". This is shorter, less
3028 confusing and saves a few bytes for possible future changes.
3030 2008-07-05 Pavel Roskin <proski@gnu.org>
3032 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3033 size for ATAPI devices, they are undefined. Output sector
3034 number in decimal form.
3036 * disk/ata.c: Use named constants for status bits.
3038 2008-07-04 Pavel Roskin <proski@gnu.org>
3040 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3041 grub_addr_t before casting it to the void pointer to fix a
3042 warning. Non-addressable regions are discarded earlier.
3043 (grub_arch_modules_addr): Cast _end to grub_addr_t.
3044 * kern/i386/linuxbios/table.c: Include grub/misc.h.
3045 (check_signature): Don't shadow table_header.
3046 (grub_linuxbios_table_iterate): Cast numeric constants to
3047 grub_linuxbios_table_header_t.
3048 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3051 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3054 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3055 pointer, which can cause warnings. Support 64-bit addresses.
3057 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3058 of sizeof(long). This fixes PowerPC image generation on x86_64.
3060 2008-07-04 Robert Millan <rmh@aybabtu.com>
3062 This fixes a performance issue when pc & gpt partmap iterators
3063 didn't abort iteration even after our hook found what it was
3064 looking for (often causing expensive probes of non-existent drives).
3066 Some callers relied on previous buggy behaviour, since they would
3067 raise an error when their own hooks caused early abortion of its
3070 * kern/device.c (grub_device_open): Improve error message.
3071 * disk/lvm.c (grub_lvm_open): Likewise.
3072 * disk/raid.c (grub_raid_open): Likewise.
3074 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3075 when hook requests it, independently of grub_errno.
3076 (pc_partition_map_probe): Do not fail when find_func() caused
3077 early abortion of pc_partition_map_iterate().
3079 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3080 when hook requests it, independently of grub_errno.
3081 (gpt_partition_map_probe): Do not fail when find_func() caused
3082 early abortion of gpt_partition_map_iterate().
3084 * kern/partition.c (grub_partition_iterate): Abort parent iteration
3085 when hook requests it, independently of grub_errno. Do not fail when
3086 part_map_iterate_hook() caused early abortion of p->iterate().
3088 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3089 when grub_partition_iterate() returned with non-zero.
3091 2008-07-03 Pavel Roskin <proski@gnu.org>
3093 * disk/ata.c (grub_ata_pio_write): Check status before writing,
3094 like we do in grub_ata_pio_read().
3095 (grub_ata_readwrite): Always write individual sectors. Fix the
3096 sector count for the remainder.
3097 (grub_ata_write): Enable writing to ATA devices. Correctly
3098 report error for ATAPI devices.
3100 2008-07-02 Pavel Roskin <proski@gnu.org>
3102 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3105 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3106 for every read sector, we already increment it for the whole
3107 batch. This fixes reading more than 256 sectors at once.
3109 * util/grub-editenv.c (cmd_info): Cast argument to long
3110 explicitly. ptrdiff_t reduces to int on i386.
3112 * util/grub-editenv.c (main): Be specific which parameter is
3115 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3116 (memdisk): Make memdisk_orig_addr a pointer.
3118 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3119 for file offsets, use grub_off_t instead. Fix printf format
3122 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3123 there. Real unexpected warnings should not drown in the noise
3124 about known problems.
3126 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3127 grub_disk_addr_t for memory addresses.
3129 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3130 explicitly to fix a warning.
3132 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3134 * Makefile.in (MODULE_LDFLAGS): New variable.
3135 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3136 the linker accepts --build-id=none.
3137 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3139 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3141 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3142 those in Linux XFS code. Provide a way to access 64-bit parent
3144 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3145 the end of struct grub_xfs_dir_header.
3147 2008-07-02 Bean <bean123ch@gmail.com>
3149 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3150 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3151 and GRUB_IEEE1275_FLAG_NO_ANSI.
3153 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3154 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3155 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3157 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3158 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3160 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3161 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3163 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3164 esc sequence on non ANSI terminal.
3165 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3167 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3170 2008-07-02 Bean <bean123ch@gmail.com>
3172 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3173 (grub_editenv_SOURCES): New variable.
3174 (pkglib_MODULES): Add loadenv.mod.
3175 (loadenv_mod_SOURCES): New variable.
3176 (loadenv_mod_CFLAGS): Likewise.
3177 (loadenv_mod_LDFLAGS): Likewise.
3179 * include/grub/envblk.h: New file.
3181 * util/envblk.c: New file.
3183 * util/grub-editenv.c: New file.
3185 * commands/loadenv.c: New file.
3187 2008-07-01 Pavel Roskin <proski@gnu.org>
3189 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3190 not unsigned char. This fixes warnings and is consistent with
3193 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3195 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3197 * term/tparm.c (analyze): Always set *popcount.
3199 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3200 cast to fix a warning.
3202 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3203 cast to suppress a warning.
3205 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3206 grub_fshelp_read_file() expects.
3208 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3209 write uuid as a 32-bit value in CPU byte order, so declare and
3212 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3213 long if the format specifier expects it.
3214 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3215 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3216 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3217 long to fix a warning.
3218 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3219 grub_dprintf() arguments to fix warnings.
3221 2008-06-30 Pavel Roskin <proski@gnu.org>
3223 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3224 install_bsd_part immediately before core.img is embedded or
3225 modified on disk. This fixes core.img verification if core.img
3228 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3229 core_path to calculate the blocklist.
3230 Patch from Javier Martín <lordhabbit@gmail.com>
3232 2008-06-29 Robert Millan <rmh@aybabtu.com>
3234 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3235 block to disk block.
3236 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3237 Patch from Niels Böhm <bitbucket@arcor.de>
3239 2008-06-29 Robert Millan <rmh@aybabtu.com>
3241 * util/update-grub_lib.in (font_path): Search for fonts in
3242 /boot/grub first, which is more likely to be readable (we aren't
3243 deciding where fonts live, just looking for them).
3245 2008-06-26 Pavel Roskin <proski@gnu.org>
3247 * util/biosdisk.c (read_device_map): Don't leave dead map
3248 entries for devices failing stat() check.
3250 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3251 core_path_dev for the core.img path on the target device.
3253 2008-06-26 Robert Millan <rmh@aybabtu.com>
3255 * disk/fs_uuid.c: New file.
3256 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3257 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3258 (fs_uuid_mod_LDFLAGS): New variables.
3259 * include/grub/disk.h (grub_disk_dev_id): Add
3260 `GRUB_DISK_DEVICE_UUID_ID'.
3261 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3262 implement iterate().
3264 2008-06-26 Robert Millan <rmh@aybabtu.com>
3266 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3267 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3268 Linux image includes no initrd.
3270 2008-06-21 Javier Martín <lordhabbit@gmail.com>
3272 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3273 call to resolve the core image location that effectively appended the
3276 2008-06-21 Robert Millan <rmh@aybabtu.com>
3278 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3281 * util/grub.d/10_hurd.in: ... to here ...
3282 * util/grub.d/10_linux.in: ... and here.
3284 2008-06-19 Robert Millan <rmh@aybabtu.com>
3286 * kern/main.c (grub_main): Export `prefix' variable immediately
3287 after it has been set by grub_machine_set_prefix().
3289 2008-06-19 Robert Millan <rmh@aybabtu.com>
3291 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3292 search result when not saving to variable, not the other way around.
3293 When saving to variable, abort iteration as soon as a match is found.
3295 2008-06-19 Robert Millan <rmh@aybabtu.com>
3297 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3298 check for partition that provides /boot/grub. Its logic is flawed,
3299 as it prevents prepare_grub_to_access_device() from being called
3302 2008-06-19 Robert Millan <rmh@aybabtu.com>
3304 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3305 "insmod" command directly when abstraction modules are needed,
3306 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3307 since it had already been processed).
3309 2008-06-19 Pavel Roskin <proski@gnu.org>
3311 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3312 changed. This is needed in case GRUB_LIBDIR changes.
3313 * conf/i386-ieee1275.rmk: Likewise.
3314 * conf/i386-linuxbios.rmk: Likewise.
3315 * conf/i386-pc.rmk: Likewise.
3316 * conf/powerpc-ieee1275.rmk: Likewise.
3318 2008-06-18 Pavel Roskin <proski@gnu.org>
3320 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3321 kernel_elf_symlist.c to symlist.c for consistency with other
3322 architectures. Update all users.
3323 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3325 2008-06-18 Robert Millan <rmh@aybabtu.com>
3327 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3330 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3331 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3332 a RAID device, run setup() for all members independently on whether
3333 LVM abstraction is being used.
3334 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3335 If grub-mkimage has set `*install_dos_part == -2', don't override this
3337 Perform *install_dos_part adjustments independently on whether
3338 we're embedding or not.
3339 Clarify error message when image is too big for embedding.
3340 Remove duplicate *install_dos_part stanza.
3342 2008-06-17 Robert Millan <rmh@aybabtu.com>
3344 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3345 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3347 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3348 values in grub_ofconsole_normal_color and
3349 grub_ofconsole_highlight_color (they're not directly related to
3350 background and foreground).
3351 (grub_ofconsole_setcolorstate): Extract background and foreground
3352 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3354 2008-06-17 Robert Millan <rmh@aybabtu.com>
3356 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3357 /boot/grub for the check in last commit, not /boot (they could be
3358 different partitions).
3360 2008-06-16 Robert Millan <rmh@aybabtu.com>
3362 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3363 asked to setup access for the same partition that provides /boot,
3364 don't bother using UUIDs since our root already has the value we
3367 2008-06-16 Robert Millan <rmh@aybabtu.com>
3369 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3371 Patch from Sven Mueller <sven@debian.org>.
3373 2008-06-16 Robert Millan <rmh@aybabtu.com>
3375 * util/update-grub.in: Check for $EUID instead of $UID.
3376 Reported by Vincent Zweije.
3378 2008-06-16 Bean <bean123ch@gmail.com>
3380 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
3381 (grub_ext2_read_block): Likewise.
3382 (grub_ext2_read_inode): Likewise.
3383 (grub_ext2_mount): Likewise.
3384 (grub_ext2_close): Likewise.
3385 (grub_ext3_get_journal): Removed.
3387 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
3388 (grub_reiserfs_read_symlink): Likewise.
3389 (grub_reiserfs_mount): Likewise.
3390 (grub_reiserfs_open): Likewise.
3391 (grub_reiserfs_read): Likewise.
3392 (grub_reiserfs_close): Likewise.
3393 (grub_reiserfs_get_journal): Removed.
3395 * fs/fshelp.c (grub_fshelp_read): Removed.
3396 (grub_fshelp_map_block): Likewise.
3398 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3399 (grub_fshelp_journal): Likewise.
3400 (grub_fshelp_read): Likewise.
3401 (grub_fshelp_map_block): Likewise.
3403 2008-06-16 Pavel Roskin <proski@gnu.org>
3405 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3406 floating point anymore.
3407 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3409 2008-06-15 Pavel Roskin <proski@gnu.org>
3411 * commands/ls.c (grub_ls_list_files): Use integer calculations
3412 for human readable format, avoid floating point use.
3413 * kern/misc.c (grub_ftoa): Remove.
3414 (grub_vsprintf): Remove floating point support.
3416 2008-06-15 Robert Millan <rmh@aybabtu.com>
3418 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
3420 Reported by Max Vozeler.
3422 2008-06-15 Robert Millan <rmh@aybabtu.com>
3424 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3425 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3427 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3428 the beginning of the prefix.
3430 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3431 It is assumed that if we have a memdisk, grub-mkimage has set
3432 grub_prefix to include the "(memdisk)" drive in it.
3434 2008-06-15 Robert Millan <rmh@aybabtu.com>
3436 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3437 Initialize keyboard controller after registering the terminal, so that
3438 grub_printf() can be called from grub_keyboard_controller_init().
3440 2008-06-15 Robert Millan <rmh@aybabtu.com>
3442 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3443 extent-btree which is written as big endian on disk.
3444 Reported by Alain Greppin <al@chilibi.org>.
3446 2008-06-14 Robert Millan <rmh@aybabtu.com>
3448 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3449 * util/i386/pc/grub-install.in (modules): Likewise.
3451 2008-06-13 Pavel Roskin <proski@gnu.org>
3453 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3455 2008-06-13 Bean <bean123ch@gmail.com>
3457 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3459 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3461 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3462 to indicate sparse block.
3464 2008-06-12 Pavel Roskin <proski@gnu.org>
3466 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3467 number, grub_fshelp_read() does it for us.
3469 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3470 linear disk read with journal translation.
3471 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3472 * include/grub/fshelp.h: Declare grub_fshelp_read().
3474 2008-06-09 Pavel Roskin <proski@gnu.org>
3476 * fs/minix.c (grub_minix_mount): Handle error reading
3479 2008-06-08 Robert Millan <rmh@aybabtu.com>
3481 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3482 don't append the RAID prefix afterwards.
3483 Reported by Clint Adams.
3485 2008-06-08 Robert Millan <rmh@aybabtu.com>
3487 Based on description from Pavel:
3488 * kern/disk.c (grub_disk_check_range): Rename to ...
3489 (grub_disk_adjust_range): ... this. Add a comment explaining the
3490 tasks performed by this function.
3492 2008-06-08 Robert Millan <rmh@aybabtu.com>
3494 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3495 `num_serial' (for consistency with other variables).
3496 (struct grub_ntfs_data): Add `uuid' member.
3497 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3498 (grub_ntfs_uuid): New function.
3499 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3501 2008-06-07 Pavel Roskin <proski@gnu.org>
3503 * util/biosdisk.c (open_device): Revert last change to the
3504 function, it broke installation. The sector needs to be
3505 different dependent on which device is opened.
3507 2008-06-06 Robert Millan <rmh@aybabtu.com>
3509 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3510 rest of GRUB, and breakage doesn't happen if its value were modified.
3512 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3513 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3514 a constant (same value).
3515 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3516 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3518 2008-06-06 Robert Millan <rmh@aybabtu.com>
3520 * util/biosdisk.c (open_device): Do not modify sector offset when
3521 accessing a partition. kern/disk.c already handles this for us.
3523 2008-06-06 Robert Millan <rmh@aybabtu.com>
3525 * util/grub-emu.c (grub_machine_init): Move code in this function from
3527 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3528 segfault in case grub_printf() is called).
3530 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3531 grub_probe. Update all users not to explicitly add it again.
3532 (grub_device): New variable; contains corresponding device for grubdir.
3533 (fs_module, partmap_module, devabstraction_module): Pass
3534 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3537 2008-06-05 Robert Millan <rmh@aybabtu.com>
3539 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3540 is found, print it (same layout as with labels).
3542 2008-06-04 Robert Millan <rmh@aybabtu.com>
3544 * util/biosdisk.c (get_drive): Rename to ...
3545 (find_grub_drive): ... this. Update all users.
3547 (get_os_disk): Rename to ...
3548 (convert_system_partition_to_system_disk): ... this. Update all users.
3550 (find_drive): Rename to ...
3551 (find_system_device): ... this. Update all users.
3553 2008-06-04 Robert Millan <rmh@aybabtu.com>
3555 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3556 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3557 (make_device_map): Likewise.
3559 2008-06-01 Robert Millan <rmh@aybabtu.com>
3561 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3562 before dereferencing it.
3564 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3565 union with fat12/fat16-specific ones. Add some new fields, including
3566 `num_serial' for both versions.
3567 (struct grub_fat_data): Add `uuid' member.
3568 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3569 names. Initialize `data->uuid' using `num_serial'.
3570 (grub_fat_uuid): New function.
3571 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3573 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3574 (grub_reiserfs_uuid): New function.
3575 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3578 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3579 (grub_xfs_uuid): New function.
3580 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3582 2008-06-01 Robert Millan <rmh@aybabtu.com>
3584 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3585 code that is backward compatible with pre-uuid search command.
3587 2008-05-31 Robert Millan <rmh@aybabtu.com>
3589 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3590 floppies after everything else, to ensure floppy drive isn't accessed
3591 unnecessarily (patch from Bean).
3593 2008-05-31 Robert Millan <rmh@aybabtu.com>
3595 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3596 not print device names when we were asked to set a variable.
3598 2008-05-31 Robert Millan <rmh@aybabtu.com>
3600 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3601 using "cursor-on" and "cursor-off" commands (understood at least by
3602 the Open Firmware flavour on OLPC).
3604 2008-05-31 Michael Gorven <michael@gorven.za.net>
3606 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3607 on and off sequences.
3609 2008-05-31 Robert Millan <rmh@aybabtu.com>
3611 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3612 * util/update-grub.in: Likewise.
3614 2008-05-30 Pavel Roskin <proski@gnu.org>
3616 * util/biosdisk.c (linux_find_partition): Simplify logic and
3617 make the code more universal. Keep special processing for
3618 devfs, but use a simple rule for all other devices. If the
3619 device ends with a number, append 'p' and the partition number.
3620 Otherwise, append only the partition number.
3622 2008-05-30 Robert Millan <rmh@aybabtu.com>
3624 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3625 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3626 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3627 the `root' parameter to Linux.
3629 2008-05-30 Robert Millan <rmh@aybabtu.com>
3631 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3632 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3633 --fs_uuid with --fs-uuid.
3634 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3635 all filesystems support them).
3637 2008-05-30 Robert Millan <rmh@aybabtu.com>
3639 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
3640 grub_printf() flags, since we're printing in units of 2 bytes.
3642 2008-05-30 Robert Millan <rmh@aybabtu.com>
3644 * util/grub.d/00_header.in: Remove obsolete comment referencing
3645 convert_system_path_to_grub_path().
3646 * util/update-grub.in: Likewise.
3647 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3648 (convert_system_path_to_grub_path): Add a warning message explaining
3649 that this function is deprecated. Rely on is_path_readable_by_grub()
3650 for the readability checks.
3651 (font_path): Use is_path_readable_by_grub() for the readability
3652 check rather than convert_system_path_to_grub_path().
3654 2008-05-30 Robert Millan <rmh@aybabtu.com>
3656 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3657 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3658 converting it first.
3659 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3660 grub.cfg for access to font file, and afterwards call it again to set
3663 2008-05-30 Robert Millan <rmh@aybabtu.com>
3665 * commands/search.c (options): Add --fs_uuid option.
3666 (search_fs_uuid): New function.
3667 (grub_cmd_search): Fix --set argument passing.
3668 Use search_fs_uuid() when requested via --fs_uuid.
3669 (grub_search_init): Update help message.
3670 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3671 and redeclare it as an array of 16-bit words.
3672 (grub_ext2_uuid): New function.
3673 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3674 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3675 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3676 (GRUB_DEVICE_BOOT_UUID): New variables.
3677 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3678 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3680 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3681 just assume `root' variable has the right value.
3682 * util/grub.d/10_linux.in: Likewise.
3683 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3685 (main): Recognise `-t fs_uuid' argument.
3687 2008-05-30 Robert Millan <rmh@aybabtu.com>
3689 * util/biosdisk.c (map): Redefine structure to hold information
3690 about GRUB drive name.
3691 (get_drive): Reimplement without assuming (and verifying) BIOS-like
3693 (call_hook): Remove.
3694 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3695 member. Assume drive has partitions.
3696 (grub_util_biosdisk_open): Access device names via `.device' struct
3698 (open_device): Likewise.
3699 (find_drive): Likewise.
3700 (read_device_map): Adjust map[] usage to match the new struct
3701 definition. Don't check for duplicates (still possible, but not cheap
3703 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3704 (make_device_name): Remove assumption of BIOS-like drive names.
3706 2008-05-30 Pavel Roskin <proski@gnu.org>
3708 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3709 compiling execute.c doesn't need grub_script.tab.h anymore.
3710 (normal/command.c_DEPENDENCIES): Likewise.
3711 (normal/function.c_DEPENDENCIES): Likewise.
3712 * conf/i386-ieee1275.rmk: Likewise.
3713 * conf/i386-linuxbios.rmk: Likewise.
3714 * conf/i386-pc.rmk: Likewise.
3715 * conf/powerpc-ieee1275.rmk: Likewise.
3716 * conf/sparc64-ieee1275.rmk: Likewise.
3718 2008-05-29 Pavel Roskin <proski@gnu.org>
3720 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3721 when scanning metadata for volume group name.
3723 * include/grub/script.h: Don't include grub_script.tab.h. It's
3724 a generated file, which may only be included from the files with
3725 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3726 use union YYSTYPE, as the later allows forward declaration.
3727 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3729 2008-05-29 Robert Millan <rmh@aybabtu.com>
3731 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3732 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3733 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3734 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3737 2008-05-29 Robert Millan <rmh@aybabtu.com>
3739 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3740 control key combinations.
3742 2008-05-29 Robert Millan <rmh@aybabtu.com>
3744 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3745 * util/ieee1275/grub-install.in: ... to here.
3746 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3747 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3748 (grub_install_SOURCES): Likewise.
3750 2008-05-29 Robert Millan <rmh@aybabtu.com>
3752 * fs/affs.c: Update copyright year.
3753 * fs/ext2.c: Likewise.
3754 * fs/fshelp.c: Likewise.
3755 * fs/hfsplus.c: Likewise.
3756 * fs/ntfs.c: Likewise.
3757 * fs/xfs.c: Likewise.
3758 * include/grub/fshelp.h: Likewise.
3759 * util/grub-mkdevicemap.c: Likewise.
3761 2008-05-28 Robert Millan <rmh@aybabtu.com>
3763 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3764 might need to be fatfs to support some firmware implementations
3767 2008-05-28 Robert Millan <rmh@aybabtu.com>
3769 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3771 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3772 (make_device_map): Likewise.
3774 2008-05-20 Bean <bean123ch@gmail.com>
3776 * fs/fshelp.c (grub_fshelp_map_block): New function.
3777 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3778 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3780 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3781 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3782 (grub_fshelp_journal): New structure.
3783 (grub_fshelp_map_block): New function prototype.
3784 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3785 (grub_fshelp_map_block): Likewise.
3787 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3788 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3789 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3790 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3791 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3792 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3793 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3794 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3795 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3796 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3797 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3798 (grub_ext2_sblock): New members for journal support.
3799 (grub_ext3_journal_header): New structure.
3800 (grub_ext3_journal_revoke_header): Likewise.
3801 (grub_ext3_journal_block_tag): Likewise.
3802 (grub_ext3_journal_sblock): Likewise.
3803 (grub_fshelp_node): New members logfile and journal.
3804 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3805 grub_fshelp_map_block to get real block number.
3806 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3808 (grub_ext2_read_inode): Likewise.
3809 (grub_ext3_get_journal): New function.
3810 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3811 (grub_ext2_close): Release memory used by journal.
3813 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3814 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3815 (grub_reiserfs_transaction_header): Renamed to
3816 grub_reiserfs_description_block, replace field data with real_blocks.
3817 (grub_reiserfs_commit_block): New structure.
3818 (grub_reiserfs_data): New member journal.
3819 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3821 (grub_reiserfs_read_symlink): Likewise.
3822 (grub_reiserfs_iterate_dir): Likewise.
3823 (grub_reiserfs_open): Likewise.
3824 (grub_reiserfs_read): Likewise.
3825 (grub_reiserfs_get_journal): New function.
3826 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3827 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3828 using grub_reiserfs_get_journal.
3829 (grub_reiserfs_close): Release memory used by journal.
3831 * fs/affs.c (grub_affs_read_block): Change block type to
3832 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3834 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3836 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3838 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3840 * fs/udf.c (grub_udf_read_block): Change block type to
3841 grub_disk_addr_t. Use type cast to avoid warning.
3843 * fs/xfs.c (grub_xfs_read_block): Likewise.
3845 2008-05-16 Christian Franke <franke@computer.org>
3847 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3848 to ensure that break with ESC will always work.
3849 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3850 Remove ESC from keyboard queue.
3852 2008-05-16 Christian Franke <franke@computer.org>
3854 * util/biosdisk.c: [__CYGWIN__] Add includes.
3855 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3856 (get_os_disk): Move variable declarations to OS specific
3857 parts to avoid warning.
3858 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3859 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3860 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3862 * util/getroot.c: [__CYGWIN__] Add includes.
3863 (strip_extra_slashes): Fix "/" case.
3864 [__CYGWIN__] (get_win32_path): New function.
3865 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3866 [__CYGWIN__] (find_root_device): Disable.
3867 [__CYGWIN__] (get_bootsec_serial): New function.
3868 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3869 [__linux__] (grub_guess_root_device): Add early returns to simplify
3871 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3872 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3873 check for Linux only.
3875 2008-05-15 Bean <bean123ch@gmail.com>
3877 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3878 keyboard hang problem in apple's intel mac.
3880 2008-05-09 Robert Millan <rmh@aybabtu.com>
3882 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3884 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3885 (make_device_map): Likewise.
3886 Reported by Aurelien Jarno <aurel32@debian.org>
3888 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
3890 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3891 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3892 (make_device_map): Output entries for xvd type disks.
3894 2008-05-07 Robert Millan <rmh@aybabtu.com>
3896 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3898 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3899 (make_device_map): Likewise.
3900 Reported by Roland Dreier <rdreier@cisco.com>
3902 2008-05-07 Robert Millan <rmh@aybabtu.com>
3904 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3905 grub_strstr() call. Correct a few mistakes in failure path handling.
3907 2008-05-06 Robert Millan <rmh@aybabtu.com>
3909 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3910 Do not print a trailing slash (therefore, the root directory is an
3912 (convert_system_path_to_grub_path): Do not remove trailing slash
3913 from make_system_path_relative_to_its_root() output.
3915 * util/i386/pc/grub-install.in: Add trailing slash to output from
3916 make_system_path_relative_to_its_root().
3918 2008-05-06 Robert Millan <rmh@aybabtu.com>
3920 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3921 ensures that output lines aren't intermangled with those sent to
3922 stderr (via grub_util_info()).
3923 * util/grub-probe.c (grub_refresh): Likewise.
3924 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3926 2008-05-05 Christian Franke <franke@computer.org>
3928 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3929 Add Cygwin device names.
3930 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3931 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3932 (check_device): Return error instead of success on empty name.
3933 (make_device_map): Move label inside linux specific code to
3934 prevent compiler warning.
3936 2008-04-30 Robert Millan <rmh@aybabtu.com>
3938 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3939 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3941 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3943 2008-04-29 Robert Millan <rmh@aybabtu.com>
3945 * docs/grub.cfg: New file (example GRUB configuration).
3947 2008-04-26 Robert Millan <rmh@aybabtu.com>
3949 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3950 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3951 and `disk/ieee1275/nand.c'.
3953 2008-04-25 Bean <bean123ch@gmail.com>
3955 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3958 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3959 change the buffer size to 4096 for cdrom device.
3961 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3963 (_linux_mod_SOURCES): New variable.
3964 (_linux_mod_CFLAGS): Likewise.
3965 (_linux_mod_LDFLAGS): Likewise.
3966 (linux_mod_SOURCES): Likewise.
3967 (linux_mod_CFLAGS): Likewise.
3968 (linux_mod_LDFLAGS): Likewise.
3969 (nand_mod_SOURCES): Likewise.
3970 (nand_mod_CFLAGS): Likewise.
3971 (nand_mod_LDFLAGS): Likewise.
3973 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3974 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3975 type property. (nand device in olpc don't have this property)
3977 * include/grub/disk.h (grub_disk_dev_id): New macro
3978 GRUB_DISK_DEVICE_NAND_ID.
3980 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3982 (grub_rescue_cmd_initrd): Likewise.
3984 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3985 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3986 ofw_cif_handler and ofw_idt, adjust padding number.
3988 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3989 GRUB_MACHINE_IEEE1275 is defined.
3991 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3992 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3994 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3995 on nested function heap_init.
3996 (grub_upper_mem): New variable for i386-ieee1275.
3997 (grub_get_extended_memory): New function for i386-ieee1275.
3998 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4000 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4001 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4004 * loader/i386/ieee1275/linux.c: New file.
4006 * loader/i386/ieee1275/linux_normal.c: New file.
4008 * disk/ieee1275/nand.c: New file.
4010 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
4012 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4014 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4016 2008-04-18 Robert Millan <rmh@aybabtu.com>
4018 Restructures early code path on ieee1275 to unify grub_main() as
4019 the first C function that is executed in every platform.
4021 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4022 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4024 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4025 * kern/ieee1275/cmain.c (cmain): Rename to ...
4026 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4027 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4030 2008-04-18 Robert Millan <rmh@aybabtu.com>
4032 * util/update-grub.in: Fix syntax error when setting
4033 `GRUB_PRELOAD_MODULES'.
4034 Reported by Stephane Chazelas <stephane@artesyncp.com>
4036 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
4038 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4039 section into account, newer toolchains generate unique build ids
4040 * configure.ac: remove the test for --build-id=none acceptance,
4041 we want build ids to be preserved
4042 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4043 far from other sections don't cause the raw binary images grow
4046 2008-04-15 Robert Millan <rmh@aybabtu.com>
4048 * disk/lvm.c: Update copyright year.
4049 * kern/misc.c: Likewise.
4051 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4053 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
4054 there is no memory left for physical volume name.
4056 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4058 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4059 volume name mapping to support bigger than 9 character names properly.
4061 2008-04-13 Robert Millan <rmh@aybabtu.com>
4063 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4064 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4066 2008-04-13 Christian Franke <franke@computer.org>
4068 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4069 to create a floppy emulation boot CD when non emulation mode
4071 Enable Joliet CD filesystem extension.
4073 2008-04-13 Robert Millan <rmh@aybabtu.com>
4075 * kern/misc.c (grub_strncat): Fix off-by-one error.
4076 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4078 * kern/env.c (grub_env_context_close): Clear current context, not
4080 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4082 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4084 2008-04-13 Robert Millan <rmh@aybabtu.com>
4086 Improve robustness when handling LVM.
4088 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
4089 (and leave `*p' unmodified).
4090 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4092 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4093 iterating through it.
4094 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4096 (grub_lvm_scan_device): Check the return value (and fail gracefully
4097 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4098 Don't assume `vg->pvs != NULL' when iterating through it.
4100 2008-04-13 Robert Millan <rmh@aybabtu.com>
4102 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4103 * genmk.rb (partmap): New variable.
4104 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4105 (#{partmap}): New target rule.
4106 * genpartmaplist.sh: New file.
4107 * Makefile.in (pkglib_DATA): Add partmap.lst.
4108 (partmap.lst): New target rule.
4109 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4110 modules (including all partition maps), instead of preloading them.
4112 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4114 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4115 `linux-boot-prober' (if installed) to detect other operating
4116 systems which are installed on the computer and add them to
4118 * conf/common.rmk: Build and install 30_os-prober.
4120 2008-04-12 Robert Millan <rmh@aybabtu.com>
4122 * kern/powerpc/ieee1275/init.c: Move from here ...
4123 * kern/ieee1275/init.c: ... to here. Update all users.
4125 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4126 * kern/ieee1275/cmain.c: ... to here. Update all users.
4128 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4129 * kern/ieee1275/openfw.c: ... to here. Update all users.
4131 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4132 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4134 2008-04-10 Pavel Roskin <proski@gnu.org>
4136 * configure.ac: Always use "_cv_" in cache variables for
4137 compatibility with Autoconf 2.62.
4139 2008-04-07 Robert Millan <rmh@aybabtu.com>
4141 Revert grub/machine/init.h addition by Pavel (since it breaks on
4142 i386-ieee1275 and others):
4143 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4144 * util/powerpc/ieee1275/misc.c: Likewise.
4146 2008-04-07 Robert Millan <rmh@aybabtu.com>
4148 * util/grub-probe.c (probe): Improve error message.
4150 2008-04-07 Robert Millan <rmh@aybabtu.com>
4152 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4153 (this prevents the presence of a bogus entry from ruining the whole
4156 2008-04-06 Pavel Roskin <proski@gnu.org>
4158 * util/biosdisk.c: Include grub/util/biosdisk.h.
4159 * util/grub-fstest.c (execute_command): Make static.
4160 * util/grub-mkdevicemap.c (check_device): Likewise.
4161 * util/i386/pc/misc.c: Include grub/machine/init.h.
4162 * util/powerpc/ieee1275/misc.c: Likewise.
4163 * util/lvm.c: Include grub/util/lvm.h.
4164 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4166 * util/raid.c: Include grub/util/raid.h.
4167 (grub_util_getdiskname): Make static.
4169 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4170 grub_hostfs_fini(), as they are called from grub_init_all() and
4171 grub_fini_all() respectively. This fixes an infinite loop in
4172 grub-fstest due to double registration of hostfs.
4173 Reported by Christian Franke <Christian.Franke@t-online.de>
4175 2008-04-05 Pavel Roskin <proski@gnu.org>
4177 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4178 all 8 functions. Otherwise, probe function 0 only.
4180 2008-04-04 Pavel Roskin <proski@gnu.org>
4182 * commands/lspci.c (grub_lspci_iter): Print the bus number
4185 * commands/lspci.c (grub_pci_classes): Fix typos.
4186 (grub_lspci_iter): Don't print func twice. Print vendor ID
4187 before device ID, as it's normally done.
4189 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4190 Fix signedness warnings.
4191 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4193 * util/ieee1275/get_disk_name.c: Include config.h so that
4194 _GNU_SOURCE is defined and getline() is declared. Mark an
4195 unused argument as such. Fix a signedness warning.
4197 2008-04-02 Pavel Roskin <proski@gnu.org>
4199 * genkernsyms.sh.in: Use more robust assignments for CC and
4200 srcdir. Quote srcdir.
4201 * gensymlist.sh.in: Likewise. Assert at the compile time that
4202 the symbol table is not empty.
4204 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4205 * fs/cpio.c (grub_cpio_read): Likewise.
4207 2008-04-01 Pavel Roskin <proski@gnu.org>
4209 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4210 * disk/host.c (grub_host_open): Likewise.
4211 * disk/loopback.c (grub_loopback_open): Likewise.
4212 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4213 disk->id as in disk/host.c, not a multi-character constant.
4215 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4216 later is obsolete, potentially dangerous and sets a bad example.
4217 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4218 * util/misc.c (grub_util_get_image_size): Likewise.
4220 * disk/loopback.c (options): Improve help for "--partitions".
4222 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4223 options to align them with the short options, e.g. "echo -e".
4225 2008-03-31 Bean <bean123ch@gmail.com>
4227 * video/reader/png.c (grub_png_data): New member is_16bit and
4229 (grub_png_decode_image_header): Detect 16 bit png image.
4230 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4231 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4232 (grub_video_reader_png): Release memory occupied by image_data.
4234 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4236 (grub_nfs_mount): Skip the test for sector per cluster.
4238 * include/grub/ntfs.h (MAX_SPC): Removed.
4240 2008-03-31 Bean <bean123ch@gmail.com>
4242 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4243 (grub_probe_SOURCES): Add fs/afs.c.
4244 (grub_fstest_SOURCES): Likewise.
4245 (afs_mod_SOURCES): New variable.
4246 (afs_mod_CFLAGS): Likewise.
4247 (afs_mod_LDFLAGS): Likewise.
4249 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4250 (grub_emu_SOURCES): Likewise.
4252 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4254 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4256 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4258 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4260 * fs/afs.c: New file.
4262 2008-03-30 Pavel Roskin <proski@gnu.org>
4264 * disk/host.c: Include grub/misc.h to fix a warning.
4265 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4266 warnings about implicit declarations.
4268 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4270 * include/grub/i386/loader.h: Change declaration of
4271 grub_linux_boot() to match what grub_loader_set() expects.
4272 * util/getroot.c (grub_guess_root_device): Return const char* to
4274 * util/grub-probe.c (probe): Fix a warning about uninitialized
4275 abstraction_name variable.
4276 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4277 second argument as unused to fix a warning.
4279 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4280 missing grub_error() call.
4282 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4283 2.60 and newer uses it to define datadir.
4285 * commands/sleep.c: Fix warning about implicit declaration.
4286 * disk/memdisk.c: Likewise.
4287 * loader/aout.c: Likewise.
4288 * loader/i386/bsd_normal.c: Likewise.
4289 * util/grub-probe.c: Likewise.
4291 * commands/i386/cpuid.c (has_longmode): Make static.
4292 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4293 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4295 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4296 GDT. This is more robust, as %ds can change.
4297 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4298 calling real_to_prot().
4299 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4301 2008-03-28 Pavel Roskin <proski@gnu.org>
4303 * kern/i386/pc/startup.S: Assert that uncompressed functions
4304 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4305 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4306 code, as they push parts of the code (error handlers) beyond
4307 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4308 code as correctness and size.
4310 2008-03-28 Pavel Roskin <proski@gnu.org>
4312 * kern/i386/pc/startup.S
4313 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4314 data block address to the real mode, keep offset minimal. This
4315 works around a bug in AWARD BIOS on old Athlon systems, which
4316 makes CD detection hang.
4318 2008-03-26 Pavel Roskin <proski@gnu.org>
4320 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4322 * include/grub/normal.h: Add grub_parse_color_name_pair()
4325 2008-03-24 Bean <bean123ch@gmail.com>
4327 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4328 (cd_count): Removed.
4329 (cd_drive): New variable.
4330 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4331 (grub_biosdisk_call_hook): Likewise.
4332 (grub_biosdisk_iterate): Change cdrom detection method.
4333 (grub_biosdisk_open): Replace cd_start with cd_drive.
4334 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4335 detect cdrom device.
4337 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4339 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4340 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4341 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4342 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4343 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4344 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4345 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4346 (grub_biosdisk_cdrp): New structure.
4347 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4349 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4351 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4354 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4357 2008-03-20 Robert Millan <rmh@aybabtu.com>
4359 Remove 2 TiB limit in ata.mod.
4360 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4361 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4362 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4363 grub_uint64_t instead of grub_uint32_t.
4365 2008-03-05 Bean <bean123ch@gmail.com>
4367 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4368 (grub_multiboot): Set boot device.
4370 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4372 2008-03-02 Bean <bean123ch@gmail.com>
4374 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4377 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4379 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4382 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4385 * docs/fdl.texi: New file.
4387 * docs/mdate-sh: New file. Copied from gnulib.
4388 * docs/texinfo.tex: Likewise.
4390 * config.guess: Updated from gnulib.
4391 * install-sh: Likewise.
4393 2008-02-28 Robert Millan <rmh@aybabtu.com>
4395 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4396 (aout_mod_SOURCES): New variable.
4397 (aout_mod_CFLAGS): Likewise.
4398 (aout_mod_LDFLAGS): Likewise.
4400 * conf/i386-ieee1275.rmk: Likewise.
4402 2008-02-28 Robert Millan <rmh@aybabtu.com>
4404 * util/update-grub.in: Reorganise terminal validity check. Accept
4405 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4406 Based on suggestion by Franklin PIAT.
4408 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4410 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4412 * util/getroot.c (grub_util_check_block_device): New function that
4413 returns the given argument if it is a block device and returns NULL else.
4414 * util/grub-probe.c (argument_is_device): New variable.
4415 (probe): Promote device_name from a variable to an argument. Receive
4416 device_name from grub_util_check_block_device() if path is NULL and from
4417 grub_guess_root_device() else. Do not free() device_name anymore.
4418 (options): Introduce new parameter '-d, --device'.
4419 (main): Add description of the new parameter to the help screen.
4420 Rename path variable to argument. Set argument_is_device if the '-d'
4421 option is given. Pass argument to probe() depending on
4424 2008-02-24 Bean <bean123ch@gmail.com>
4426 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4427 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4428 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4429 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4430 (GRUB_ISO9660_VOLDESC_END): Likewise.
4431 (grub_iso9660_primary_voldesc): New member escape.
4432 (grub_iso9660_data): New member joliet.
4433 (grub_iso9660_convert_string): New function.
4434 (grub_iso9660_mount): Detect joliet extension.
4435 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4436 (grub_iso9660_iso9660_label): Likewise.
4438 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4439 (grub_setup_SOURCES): Add fs/udf.c.
4440 (grub_fstest_SOURCES): Likewise.
4441 (udf_mod_SOURCES): New variable.
4442 (udf_mod_CFLAGS): Likewise.
4443 (udf_mod_LDFLAGS): Likewise.
4445 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4446 (grub_emu_SOURCES): Likewise.
4448 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4450 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4452 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4454 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4456 * fs/udf.c: New file.
4458 2008-02-24 Robert Millan <rmh@aybabtu.com>
4460 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4461 (normal/lexer.c_DEPENDENCIES): New variables.
4462 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4463 (normal/lexer.c_DEPENDENCIES): Likewise.
4464 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4465 (normal/lexer.c_DEPENDENCIES): Likewise.
4466 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4467 (normal/lexer.c_DEPENDENCIES): Likewise.
4468 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4469 (normal/lexer.c_DEPENDENCIES): Likewise.
4470 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4471 (normal/lexer.c_DEPENDENCIES): Likewise.
4473 2008-02-23 Robert Millan <rmh@aybabtu.com>
4475 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4476 since they were intended to be in hex. This didn't break previously
4477 because of a bug in gpt_partition_map_iterate() (see below).
4479 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4480 when checking the validity of GPT header.
4481 Remove `partno', since it always provides the same information as `i'.
4483 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4485 * include/grub/efi/time.h: Fix a wrong comment.
4487 2008-02-19 Pavel Roskin <proski@gnu.org>
4489 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4492 2008-02-19 Bean <bean123ch@gmail.com>
4494 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4495 (aout_mod_SOURCES): New variable.
4496 (aout_mod_CFLAGS): Likewise.
4497 (aout_mod_LDFLAGS): Likewise.
4498 (_bsd_mod_SOURCES): New variable.
4499 (_bsd_mod_CFLAGS): Likewise.
4500 (_bsd_mod_LDFLAGS): Likewise.
4501 (bsd_mod_SOURCES): New variable.
4502 (bsd_mod_CFLAGS): Likewise.
4503 (bsd_mod_LDFLAGS): Likewise.
4505 * include/grub/aout.h: New file.
4507 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4509 * include/grub/i386/bsd.h: New file.
4511 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4514 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4515 function is called, so that it's possible to change it inside the hook.
4516 (grub_elf64_load): Likewise.
4517 (grub_elf_file): Don't close the file if elf header is not found.
4518 (grub_elf_close): Close the file if grub_elf_file fails (The new
4519 grub_elf_file won't close it).
4520 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4521 (grub_elf64_size): Likewise.
4523 * kern/i386/loader.S (grub_unix_real_boot): New function.
4525 * loader/aout.c: New file.
4527 * loader/i386/bsd.c: New file.
4529 * loader/i386/bsd_normal.c: New file.
4531 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4533 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
4534 can test other formats.
4536 2008-02-19 Robert Millan <rmh@aybabtu.com>
4538 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4539 (grub_gpt_partition_type_empty): Redefine with macro from
4540 `<grub/gpt_partition.h>'.
4541 (gpt_partition_map_iterate): Adjust partition type comparison.
4543 Export `entry' as partmap-specific `part.data' struct.
4544 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4546 * include/grub/gpt_partition.h (grub_gpt_header)
4547 (grub_gpt_partentry): ... to here (new file).
4549 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4551 (grub_gpt_partition_type_bios_boot): New const variable, defined
4552 with macro from `<grub/gpt_partition.h>'.
4554 (setup): Replace `first_start' with `embed_region', which keeps
4555 track of the embed region (and is partmap-agnostic).
4557 Replace find_first_partition_start() with find_usable_region(),
4558 which finds a usable region for embedding using partmap-specific
4559 knowledge (supports PC/MSDOS and GPT).
4561 Fix all assumptions that the embed region start at sector 1, using
4562 `embed_region.start' from now on. Similarly, use `embed_region.end'
4563 rather than `first_start' to calculate available size.
4565 In grub_util_info() message, replace "into after the MBR" with an
4566 indication of the specific sector our embed region starts at.
4568 2008-02-19 Robert Millan <rmh@aybabtu.com>
4570 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4571 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4572 `commands/reboot.c'.
4573 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4574 (halt_mod_SOURCES): Likewise.
4575 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4576 (halt_mod_SOURCES): Likewise.
4578 2008-02-17 Christian Franke <franke@computer.org>
4580 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4582 2008-02-17 Robert Millan <rmh@aybabtu.com>
4584 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4585 set `first_start' to 0 for non-PC/MSDOS partition maps.
4587 2008-02-16 Robert Millan <rmh@aybabtu.com>
4589 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4590 do not assume partition map is PC/MSDOS before performing checks that
4591 are specific to that layout.
4593 2008-02-13 Robert Millan <rmh@aybabtu.com>
4595 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4596 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4597 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4599 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4601 * configure.ac: Only a cosmetic change on the handling of
4602 -fno-stack-protector.
4604 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
4606 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4607 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4609 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4610 (halt_mod_SOURCES): New variable.
4611 (halt_mod_CFLAGS): Likewise.
4612 (halt_mod_LDFLAGS): Likewise.
4613 (reboot_mod_SOURCES): Likewise.
4614 (reboot_mod_CFLAGS): Likewise.
4615 (reboot_mod_LDFLAGS): Likewise.
4617 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4618 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4620 (halt_mod_SOURCES): Likewise.
4621 (reboot_mod_SOURCES): Likewise.
4623 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4624 commands/i386/pc/reboot.c by commands/reboot.c.
4625 (reboot_mod_SOURCES): Likewise.
4627 * commands/i386/pc/reboot.c: merge this file ...
4629 * commands/ieee1275/reboot.c: ... and this file ...
4631 * commands/reboot.c: ... to this file.
4632 Add some precompiler directive to include the correct header for
4635 * commands/ieee1275/halt.c: move this file ...
4637 * commands/halt.c: ... to here.
4638 Add some precompiler directive to include the correct header for
4641 * include/grub/efi/efi.h (grub_reboot): New function declaration.
4642 (grub_halt): Likewise.
4644 * kern/efi/efi.c (grub_reboot): New function.
4645 (grub_halt): Likewise.
4647 2008-02-12 Robert Millan <rmh@aybabtu.com>
4649 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4650 /dev (like it is done for /dev/mapper). This doesn't provide support
4651 for EVMS, but at least it is now easy to identify the problem when it
4654 2008-02-11 Robert Millan <rmh@aybabtu.com>
4656 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4657 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4658 comparing it with -1, not 0.
4660 2008-02-10 Robert Millan <rmh@aybabtu.com>
4662 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4664 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4665 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4667 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4668 `disk/lvm.c' to the end of the list.
4669 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4670 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4672 2008-02-10 Robert Millan <rmh@aybabtu.com>
4674 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4675 grub_print_error() instead. This will let user know why we're entering
4677 Based on suggestions from Sam Morris.
4679 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
4681 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4682 on remaining N args, instead of "--" arg N times.
4684 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4686 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4687 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4688 pattern for unknown glyphs.
4690 2008-02-09 Robert Millan <rmh@aybabtu.com>
4692 * configure.ac: Probe for `help2man'.
4693 * Makefile.in (builddir): New variable.
4694 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4695 or otherwise add a few flags/options to it.
4696 (install-local): For every executable utility or script that is
4697 installed, invoke $(HELP2MAN) to install a manpage based on --help
4700 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4701 that it doesn't prevent --help from working in build tree.
4703 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4704 with `bug-grub@gnu.org'.
4705 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4706 * util/update-grub.in (usage): New function.
4707 Implement proper argument check, with support for --help and --version
4708 (as well as existing -y).
4710 2008-02-09 Christian Franke <franke@computer.org>
4712 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4713 avoid overwriting previous output.
4714 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4716 2008-02-09 Robert Millan <rmh@aybabtu.com>
4718 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4721 2008-02-09 Robert Millan <rmh@aybabtu.com>
4723 * commands/sleep.c: New file.
4724 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4725 (sleep_mod_SOURCES): New variable.
4726 (sleep_mod_CFLAGS): Likewise.
4727 (sleep_mod_LDFLAGS): Likewise.
4729 2008-02-09 Robert Millan <rmh@aybabtu.com>
4731 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4732 situations in which we can deduce the RAID size and the superblock
4735 2008-02-09 Robert Millan <rmh@aybabtu.com>
4737 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4738 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4739 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4741 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4742 and return a grub_diskmemberlist_t composed of physical array members.
4743 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4745 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4747 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4748 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4749 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4751 * util/grub-probe.c (probe): Move partmap probing code from here ...
4752 (probe_partmap): ... to here.
4753 (probe): Use probe_partmap() once for the disk we're probing, and
4754 additionally, when such disk contains a memberlist() struct member,
4755 once for each disk that is contained in the structure returned by
4758 2008-02-09 Robert Millan <rmh@aybabtu.com>
4760 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4761 environment variable to 'all' in order to obtain debug output from
4763 * util/i386/pc/grub-setup.c (main): Likewise.
4765 2008-02-08 Robert Millan <rmh@aybabtu.com>
4767 * disk/raid.c (grub_raid_scan_device): Check for
4768 `array->device[sb.this_disk.number]' rather than for
4769 `array->device[sb.this_disk.number]->name', since the latter is not
4770 guaranteed to be accessible.
4772 2008-02-08 Robert Millan <rmh@aybabtu.com>
4774 * disk/raid.c: Update copyright.
4775 * fs/cpio.c: Likewise.
4776 * include/grub/raid.h: Likewise.
4777 * loader/i386/pc/multiboot.c: Likewise.
4778 * util/hostfs.c: Likewise.
4780 2008-02-08 Robert Millan <rmh@aybabtu.com>
4782 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4783 to a grub_disk_t array.
4784 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4786 (grub_raid_scan_device): Replace `device[x].name' accesses with
4787 `device[x]->name'. Simplify initialization of `array->device[x]'.
4789 2008-02-08 Robert Millan <rmh@aybabtu.com>
4791 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4792 grub_dprintf() calls.
4793 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4796 2008-02-07 Christian Franke <franke@computer.org>
4798 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4799 instead of fseek and ftell to support large files.
4800 (grub_hostfs_read): Likewise.
4802 2008-02-07 Robert Millan <rmh@aybabtu.com>
4804 Patch from Jeroen Dekkers.
4805 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4806 failure, since successfully reading all array members might not be
4809 2008-02-06 Robert Millan <rmh@aybabtu.com>
4811 * util/grub-probe.c (probe): Simplify partmap probing (with the
4812 assumption that the first word up to the underscore equals to
4815 2008-02-06 Christian Franke <franke@computer.org>
4817 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4818 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4819 last block of a cpio or tar stream.
4820 Check for "TRAILER!!!" instead of any empty data
4821 block to detect last block of a cpio stream.
4822 (grub_cpio_dir): Fix constness of variable np.
4823 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4824 cpio or tar trailer is detected. This fixes a crash
4825 on open of a non existing file.
4827 2008-02-05 Bean <bean123ch@gmail.com>
4829 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4831 (grub_multiboot_load_elf64): Likewise.
4832 (grub_multiboot): Initialize mbi structure.
4834 * util/grub-fstest.c: Don't include unused header file script.h.
4836 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4838 (grub_fstest_SOURCES): Likewise.
4840 2008-02-05 Robert Millan <rmh@aybabtu.com>
4842 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4843 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4844 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4845 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4847 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4848 (translation_table): Replace hardcoded values with macros
4849 provided by `<grub/term.h>'.
4851 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4852 (keyboard_map): Correct/add a few values, with macros provided
4854 (keyboard_map_shift): Zero values that don't differ from their
4855 `keyboard_map' equivalents.
4856 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4857 Discard the second scan code that is always sent by Caps lock.
4858 Only use `keyboard_map_shift' when it provides a non-zero value,
4859 otherwise fallback to `keyboard_map'.
4861 2008-02-04 Bean <bean123ch@gmail.com>
4863 * Makefile.in (enable_grub_fstest): New variable.
4865 * conf/common.rmk (grub_fstest_init.lst): New rule.
4866 (grub_fstest_init.h): Likewise.
4867 (grub_fstest_init.c): Likewise.
4868 (util/grub-fstest.c_DEPENDENCIES): New variable.
4869 (grub_fstest_SOURCES): Likewise.
4871 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4873 * util/grub-fstest.c: New file.
4875 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4877 Make grub-setup handle a separate root device.
4879 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4880 so that the root device can be compared with the destination
4882 When embedding the core image, if the root and destination devices
4883 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4885 When not embedding, set ROOT_DRIVE to 0xFF.
4887 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4889 Add support for having a grub directory in a different drive. This
4890 is still only the data handling part.
4892 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4893 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4894 (grub_root_drive): New variable.
4896 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4897 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4898 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4901 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4903 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4905 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4907 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4908 is bogus, because PXE booting does not specify any drive
4911 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4912 am not sure if this is really correct.
4914 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4915 is always identical to the boot drive when booting from a CD.
4917 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4919 (root_drive): New variable.
4920 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4921 (setup_sectors): Push %dx right after popping it, because %dh will
4923 (copy_buffer): Restore %dx.
4925 2008-02-03 Robert Millan <rmh@aybabtu.com>
4927 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4928 use `cdboot.img' for cdrom images.
4930 2008-02-03 Robert Millan <rmh@aybabtu.com>
4932 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4933 only setup gfxterm when `font' command has succeeded.
4935 2008-02-03 Robert Millan <rmh@aybabtu.com>
4937 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4938 (grub_rescue_cmd_multiboot_loader)
4939 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4941 2008-02-03 Pavel Roskin <proski@gnu.org>
4943 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4944 %edx and %esi from stack only after grub_gate_a20() is called.
4945 grub_gate_a20() clobbers %edx.
4947 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4949 * configure.ac (AC_INIT): Bumped to 1.96.
4951 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4952 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4953 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4954 video/readers/png.c.
4956 2008-02-03 Bean <bean123ch@gmail.com>
4958 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4959 (cdboot_img_SOURCES): New variable.
4960 (cdboot_img_ASFLAGS): New variable.
4961 (cdboot_img_LDFLAGS): New variable.
4963 * boot/i386/pc/cdboot.S: New file.
4965 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4966 (cd_count): Likewise.
4967 (grub_biosdisk_get_drive): Add support for cd device.
4968 (grub_biosdisk_call_hook): Likewise.
4969 (grub_biosdisk_iterate): Likewise.
4970 (grub_biosdisk_open): Likewise.
4971 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4972 (grub_biosdisk_rw): Support reading from cd device.
4973 (GRUB_MOD_INIT): Iterate cd devices.
4975 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4976 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4977 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4979 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4981 2008-02-02 Robert Millan <rmh@aybabtu.com>
4983 * commands/read.c: New file.
4984 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4985 (read_mod_SOURCES): New variable.
4986 (read_mod_CFLAGS): Likewise.
4987 (read_mod_LDFLAGS): Likewise.
4989 2008-02-02 Robert Millan <rmh@aybabtu.com>
4991 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4992 determining whether menu has to be displayed.
4994 2008-02-02 Marco Gerards <marco@gnu.org>
4996 * bus/pci.c: New file.
4998 * include/grub/pci.h: Likewise.
5000 * include/grub/i386/pc/pci.h: Likewise.
5002 * commands/lspci.c: Likewise.
5004 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5006 (pci_mod_SOURCES): New variable.
5007 (pci_mod_CFLAGS): Likewise.
5008 (pci_mod_LDFLAGS): Likewise.
5009 (lspci_mod_SOURCES): Likewise.
5010 (lspci_mod_CFLAGS): Likewise.
5011 (lspci_mod_LDFLAGS): Likewise.
5013 2008-02-02 Bean <bean123ch@gmail.com>
5015 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5016 (grub_ufs_get_file_block): Fix indirect block calculation problem.
5018 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5019 (grub_xfs_btree_node): New structure.
5020 (grub_xfs_btree_root): New structure.
5021 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5022 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5023 (GRUB_XFS_EXTENT_BLOCK): Likewise.
5024 (GRUB_XFS_EXTENT_SIZE): Likewise.
5025 (grub_xfs_read_block): Support btree format type.
5026 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5027 Use directory block as basic unit.
5029 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5031 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5032 __attribute__ ((__regparm__ (1))).
5034 2008-02-01 Robert Millan <rmh@aybabtu.com>
5036 Correct a mistake in previous commit.
5038 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5040 (normal/command.c_DEPENDENCIES): New variable.
5042 2008-02-01 Robert Millan <rmh@aybabtu.com>
5044 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5046 (normal/command.c_DEPENDENCIES): New variable.
5047 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5048 * conf/i386-ieee1275.rmk: Likewise.
5049 * conf/i386-linuxbios.rmk: Likewise.
5050 * conf/i386-pc.rmk: Likewise.
5051 * conf/sparc64-ieee1275.rmk: Likewise.
5052 * conf/powerpc-ieee1275.rmk: Likewise.
5053 (grub_emu_SOURCES): Add `fs/fshelp.c'.
5055 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5057 2008-02-01 Robert Millan <rmh@aybabtu.com>
5059 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5060 call at beginning of function.
5062 2008-01-31 Pavel Roskin <proski@gnu.org>
5064 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
5065 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5066 (grub_mkrescue_SOURCES): Likewise.
5067 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5069 2008-01-30 Robert Millan <rmh@aybabtu.com>
5071 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5072 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5073 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5074 (grub_probe_SOURCES): ... to here.
5076 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5077 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5078 * conf/i386-ieee1275.rmk: Likewise.
5079 * conf/i386-linuxbios.rmk: Likewise.
5080 * conf/powerpc-ieee1275.rmk: Likewise.
5082 2008-01-30 Tristan Gingold <gingold@free.fr>
5084 * kern/rescue.c: Silently accept empty lines.
5086 2008-01-29 Bean <bean123ch@gmail.com>
5088 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5089 (real_code_2): Code cleanup and change comment style.
5090 (move_memory): Avoid using 32-bit address mode.
5092 2008-01-29 Bean <bean123ch@gmail.com>
5094 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5095 (png_mod_SOURCES): New variable.
5096 (png_mod_CFLAGS): Likewise.
5097 (png_mod_LDFLAGS): Likewise.
5099 * video/readers/png.c: New file.
5101 2008-01-28 Robert Millan <rmh@aybabtu.com>
5103 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5104 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5105 `ifndef GRUB_MOD_GAP' hack.
5106 * util/elf/grub-mkimage.c (add_segments): Likewise.
5108 2008-01-27 Robert Millan <rmh@aybabtu.com>
5110 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5111 `GRUB_MOD_GAP' for platforms in which it's not defined.
5112 * util/elf/grub-mkimage.c (add_segments): Likewise.
5114 2008-01-27 Robert Millan <rmh@aybabtu.com>
5116 Get grub-emu to build again (including parallel builds).
5118 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5120 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5121 (normal/execute.c_DEPENDENCIES): ... this, ...
5122 (grub-emu_DEPENDENCIES): ... and this.
5124 * conf/i386-efi.rmk: Likewise.
5125 * conf/i386-linuxbios.rmk: Likewise.
5126 * conf/i386-ieee1275.rmk: Likewise.
5127 * conf/powerpc-ieee1275.rmk: Likewise.
5128 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5130 2008-01-27 Robert Millan <rmh@aybabtu.com>
5132 * NEWS: Add a few items.
5134 2008-01-27 Robert Millan <rmh@aybabtu.com>
5136 Fix parallel builds with grub-emu. Based on earlier commit for
5137 grub-probe and grub-setup.
5139 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5140 (util/grub-emu.c_DEPENDENCIES): ... this.
5141 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5142 (util/grub-emu.c_DEPENDENCIES): ... this.
5143 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5144 (util/grub-emu.c_DEPENDENCIES): ... this.
5145 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5146 (util/grub-emu.c_DEPENDENCIES): ... this.
5147 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5148 (util/grub-emu.c_DEPENDENCIES): ... this.
5150 2008-01-27 Pavel Roskin <proski@gnu.org>
5152 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5153 to create a gap between _end and the modules added to the image
5154 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5155 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5156 * util/elf/grub-mkimage.c (add_segments): Likewise.
5158 2008-01-26 Pavel Roskin <proski@gnu.org>
5160 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5161 just return an error.
5163 2008-01-26 Bean <bean123ch@gmail.com>
5165 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5166 (grub_reiserfs_get_item): Save offset of the next item.
5167 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5169 2008-01-25 Robert Millan <rmh@aybabtu.com>
5171 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5172 make all filesystem sources appear together (possibly fixing omissions
5174 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5175 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5176 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5179 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5181 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5182 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5183 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5184 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5186 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5187 (probe): Add a sanity check to make sure of our ability to read
5188 requested files when probing for filesystem type.
5190 * genmk.rb: Update copyright year (2007).
5192 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5193 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5194 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5195 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5196 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5197 : Remove function prototypes.
5199 2008-01-25 Robert Millan <rmh@aybabtu.com>
5201 Revert my previous commits (based on wrong assumption of how grub_errno
5204 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
5205 * kern/file.c (grub_file_open): Likewise.
5207 2008-01-24 Pavel Roskin <proski@gnu.org>
5209 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5210 that hang if GRUB tries to setup colors.
5211 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5212 colors for firmwares that don't support it.
5213 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5214 Recognize Open Hack'Ware, set flags to work around its
5217 2008-01-24 Robert Millan <rmh@aybabtu.com>
5219 * kern/file.c (grub_file_open): Do not account previous failures of
5220 unrelated functions when grub_errno is checked for.
5221 Reported by Oleg Strikov.
5223 2008-01-24 Bean <bean123ch@gmail.com>
5225 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5226 (grub_ufs_sblock): New member volume name.
5227 (grub_ufs_find_file): Fix string copy bug.
5228 (grub_ufs_label): Implement this function properly.
5230 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5231 (grub_hfs_iterate_records): Use the correct file number for extents
5232 and catalog file. Fix problem in next index calculation.
5233 (grub_hfs_find_node): Replace recursive function call with loop.
5234 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5236 2008-01-23 Robert Millan <rmh@aybabtu.com>
5238 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5239 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5240 (grub_multiboot2_real_boot): New function prototype.
5242 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5243 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5245 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5246 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5248 2008-01-23 Robert Millan <rmh@aybabtu.com>
5250 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5251 #ifdef'ed out grub_printf().
5253 2008-01-23 Robert Millan <rmh@aybabtu.com>
5255 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5256 grub_dprintf calls, since they make "debug=all" mode unusable.
5257 (grub_console_checkkey): Likewise.
5259 2008-01-23 Robert Millan <rmh@aybabtu.com>
5261 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5262 `term/i386/pc/at_keyboard.c'.
5263 (pkglib_MODULES): Add `serial.mod'.
5264 (serial_mod_SOURCES): New variable.
5265 (serial_mod_CFLAGS): Likewise.
5266 (serial_mod_LDFLAGS): Likewise.
5268 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5269 `<grub/powerpc/ieee1275/console.h>'.
5270 (grub_keyboard_controller_init): New function prototype.
5271 (grub_console_checkkey): Likewise.
5272 (grub_console_getkey): Likewise.
5274 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5277 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5278 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5280 2008-01-23 Robert Millan <rmh@aybabtu.com>
5282 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5283 present, "(memdisk)/boot/grub" becomes the default prefix.
5285 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5286 a memdisk tarball with all the modules. Add --overlay=DIR option that
5287 allows users to overlay additional files into the image.
5289 2008-01-23 Robert Millan <rmh@aybabtu.com>
5291 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5292 and `machine/memory.h'.
5293 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5294 (_multiboot_mod_SOURCES): New variable.
5295 (_multiboot_mod_CFLAGS): Likewise.
5296 (_multiboot_mod_LDFLAGS): Likewise.
5297 (multiboot_mod_SOURCES): Likewise.
5298 (multiboot_mod_CFLAGS): Likewise.
5299 (multiboot_mod_LDFLAGS): Likewise.
5301 * include/grub/i386/ieee1275/loader.h: New file.
5303 * include/grub/i386/ieee1275/machine.h: Likewise.
5305 * include/grub/i386/ieee1275/memory.h: Likewise.
5307 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5308 variable declaration.
5309 (grub_os_area_size): Likewise.
5311 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5312 (grub_lower_mem, grub_upper_mem): New variables.
5313 (grub_stop_floppy): New function (just to make
5314 grub_multiboot2_real_boot() happy).
5316 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5317 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5318 (grub_stop): New function.
5319 Include `"../realmode.S"' and `"../loader.S"'.
5321 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5322 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5324 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5325 rely on grub_multiboot2_real_boot() for final boot.
5327 2008-01-22 Robert Millan <rmh@aybabtu.com>
5329 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5330 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5331 device that doesn't look like an SD card.
5332 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5333 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5334 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5335 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5338 2008-01-22 Robert Millan <rmh@aybabtu.com>
5340 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5341 avoid claiming over our own code.
5343 2008-01-22 Bean <bean123ch@gmail.com>
5345 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5346 (jpeg_mod_SOURCES): New variable.
5347 (jpeg_mod_CFLAGS): Likewise.
5348 (jpeg_mod_LDFLAGS): Likewise.
5350 * video/readers/jpeg.c : New file.
5352 2008-01-22 Bean <bean123ch@gmail.com>
5354 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5355 there are no more items.
5357 2008-01-21 Robert Millan <rmh@aybabtu.com>
5359 * kern/mm.c (grub_mm_init_region): Improve debug message.
5361 2008-01-21 Robert Millan <rmh@aybabtu.com>
5363 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5364 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5366 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5368 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5369 Indicates start of upper memory.
5370 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5371 (generate_image): Abort when image size is big enough to corrupt
5374 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5375 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5376 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5377 instead of hardcoding 0xA0000.
5378 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5379 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5380 instead of hardcoding 0xA0000.
5382 2008-01-21 Robert Millan <rmh@aybabtu.com>
5384 * disk/memdisk.c (memdisk_size): New variable.
5385 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5387 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5388 image to dynamic memory.
5389 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5390 `memdisk_size'. Free memdisk block.
5392 2008-01-21 Robert Millan <rmh@aybabtu.com>
5394 Fix detection of very small filesystems (like tar).
5396 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5397 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5398 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5399 a problem with this disk).
5401 2008-01-21 Robert Millan <rmh@aybabtu.com>
5403 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5404 on grub_biosdisk_rw_standard() error.
5406 2008-01-21 Robert Millan <rmh@aybabtu.com>
5408 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5410 * kern/elf.c: Likewise.
5411 * kern/ieee1275/ieee1275.c: Likewise.
5412 * kern/powerpc/ieee1275/openfw.c: Likewise.
5413 * term/ieee1275/ofconsole.c: Likewise.
5415 2008-01-21 Robert Millan <rmh@aybabtu.com>
5417 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5419 * include/grub/kernel.h (grub_arch_memdisk_addr)
5420 (grub_arch_memdisk_size): Moved from here ...
5422 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5423 (grub_arch_memdisk_size): ... to here.
5425 2008-01-21 Robert Millan <rmh@aybabtu.com>
5427 Mostly based on bugfix from Bean.
5429 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5430 attribute with hook() parameter.
5431 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5433 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5434 attribute with hook() parameter.
5435 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5438 2008-01-21 Robert Millan <rmh@aybabtu.com>
5440 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5441 (pkglib_MODULES): Add `memdisk.mod'.
5442 (memdisk_mod_SOURCES): New variable.
5443 (memdisk_mod_CFLAGS): Likewise.
5444 (memdisk_mod_LDFLAGS): Likewise.
5446 * disk/memdisk.c: New file.
5448 * include/grub/disk.h (grub_disk_dev_id): Add
5449 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5451 * include/grub/i386/pc/kernel.h
5452 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5453 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5454 (grub_kernel_image_size): New variable declaration.
5455 (grub_total_module_size): Likewise.
5456 (grub_memdisk_image_size): Likewise.
5458 * include/grub/i386/pc/memory.h
5459 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5461 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5462 (grub_arch_memdisk_addr): New variable declaration.
5463 (grub_arch_memdisk_size): Likewise.
5465 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5466 (grub_arch_memdisk_size): Likewise.
5468 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5469 (codestart): Replace hardcoded `0x100000' with
5470 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5472 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5473 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5474 not NULL, append the contents of the file it refers to, at the end of
5475 the compressed kernel image. Initialize `grub_memdisk_image_size'
5476 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5477 (options): Add "memdisk"|'m' option.
5478 (main): Parse --memdisk|-m option, and pass user-provided path as
5479 parameter to generate_image().
5481 2008-01-20 Robert Millan <rmh@aybabtu.com>
5483 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5484 grub_dprintf() calls from here ...
5485 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5487 2008-01-20 Robert Millan <rmh@aybabtu.com>
5489 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5491 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5493 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5494 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5495 `GRUB_IEEE1275_FLAG_REAL_MODE'.
5496 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
5498 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5499 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5501 2008-01-19 Robert Millan <rmh@aybabtu.com>
5503 Get rid of confusing function (superseded by
5504 `grub_ieee1275_get_integer_property')
5505 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5507 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5509 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5510 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
5511 in native endianness from grub_ieee1275_get_integer_property().
5513 2008-01-19 Robert Millan <rmh@aybabtu.com>
5515 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5516 command after "shut-down", since implementations differ on which
5517 the command for halt is.
5519 2008-01-19 Robert Millan <rmh@aybabtu.com>
5521 * include/grub/i386/linuxbios/console.h: Add header protection.
5522 (grub_keyboard_controller_init): New function prototype.
5523 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5524 (KEYBOARD_COMMAND_READ): Likewise.
5525 (KEYBOARD_COMMAND_WRITE): Likewise.
5526 (KEYBOARD_SCANCODE_SET1): Likewise.
5527 (grub_keyboard_controller_write): New function.
5528 (grub_keyboard_controller_read): Likewise.
5529 (grub_keyboard_controller_init): Likewise.
5531 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5532 (grub_console_init): On coreboot/LinuxBIOS, call
5533 grub_keyboard_controller_init().
5535 2008-01-19 Robert Millan <rmh@aybabtu.com>
5537 PowerPC changes provided by Pavel Roskin.
5539 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5540 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5541 don't rely on cmain() doing it.
5542 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5543 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5545 2008-01-16 Robert Millan <rmh@aybabtu.com>
5547 * include/grub/i386/linuxbios/memory.h
5548 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5549 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5550 receive `table_header' as argument. Instead, probe for it in the
5551 known memory ranges where it can be present.
5552 (grub_available_iterate): Do not pass a fixed `table_header' address
5553 to grub_linuxbios_table_iterate().
5555 2008-01-15 Robert Millan <rmh@aybabtu.com>
5557 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5558 * conf/i386-ieee1275.rmk: New file.
5559 * include/grub/i386/ieee1275/console.h: Likewise.
5560 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5561 * include/grub/i386/ieee1275/kernel.h: Likewise.
5562 * include/grub/i386/ieee1275/time.h: Likewise.
5563 * kern/i386/ieee1275/init.c: Likewise.
5564 * kern/i386/ieee1275/startup.S: Likewise.
5566 2008-01-15 Robert Millan <rmh@aybabtu.com>
5568 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5569 when pointers are 32-bit (but still do set it to one when they are
5572 2008-01-15 Robert Millan <rmh@aybabtu.com>
5574 * include/grub/ieee1275/ieee1275.h
5575 (grub_ieee1275_get_integer_property): New function prototype.
5577 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5578 (grub_ieee1275_get_integer_property): New function. Wraps around
5579 grub_ieee1275_get_property() to handle endianness.
5581 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5582 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
5584 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5585 (grub_map): Likewise.
5586 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5588 2008-01-15 Bean <bean123ch@gmail.com>
5590 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5591 (grub_script_execute_cmdline): Reset grub_errno.
5593 * normal/main.c (read_config_file): Reset grub_errno.
5595 * normal/parse.y (script_init): New.
5596 (script): Move function and menuentry here.
5598 (command): Add delimiter at the end of command.
5599 (commands): Adjust to match the new command.
5600 (commandblock): Remove grub_script_lexer_record_start.
5601 (menuentry): Add grub_script_lexer_record_start, use the new commands.
5602 (if): Use the new commands.
5604 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5606 2008-01-15 Robert Millan <rmh@aybabtu.com>
5608 * normal/menu.c (run_menu): Move timeout message from here ...
5609 (print_timeout): ... to here.
5610 (run_menu): Use print_timeout() once during initial draw to print
5611 the whole message, and again in every clock tick to update only
5612 the number of seconds.
5614 2008-01-15 Robert Millan <rmh@aybabtu.com>
5616 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5617 actual size of `available' from grub_ieee1275_get_property(), and
5618 restrict parsing to that bound.
5620 2008-01-15 Christian Franke <franke@computer.org>
5622 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5623 (argp_program_version): Remove variable.
5624 (argp_program_bug_address): Likewise.
5625 (options): Convert from struct argp_option to struct option.
5626 (struct arguments): Remove.
5627 (parse_opt): Remove.
5628 (usage): New function.
5629 (main): Replace struct args members by simple variables.
5630 Replace argp_parse() by getopt_long().
5631 Add switch to evaluate options.
5632 Add missing "(...)" around root_dev in prefix string.
5634 2008-01-14 Robert Millan <rmh@aybabtu.com>
5636 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
5637 for grub_ieee1275_exit(), in order to improve portability.
5639 2008-01-14 Robert Millan <rmh@aybabtu.com>
5641 * util/grub.d/10_linux.in (prefix): Define.
5642 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
5644 2008-01-13 Pavel Roskin <proski@gnu.org>
5646 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5647 grub_errno if no errors have been detected.
5649 2008-01-12 Robert Millan <rmh@aybabtu.com>
5651 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5652 (grub_util_get_dev_abstraction): New function prototype.
5654 * util/getroot.c: Include `<grub/util/getroot.h>'
5655 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5656 (grub_util_get_dev_abstraction): ... here (new function).
5658 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5659 `PRINT_ABSTRACTION'.
5660 (probe): Probe for abstraction type when requested.
5661 (main): Understand `--target=abstraction'.
5663 * util/i386/efi/grub-install.in: Add abstraction module to core
5664 image when it is found to be necessary.
5665 * util/i386/pc/grub-install.in: Likewise.
5666 * util/powerpc/ieee1275/grub-install.in: Likewise.
5668 * util/update-grub_lib.in (font_path): Return system path without
5669 converting to GRUB path.
5670 * util/update-grub.in: Convert system path returned by font_path()
5671 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5672 abstraction module is needed for loading fonts (if any). Export
5673 that as `GRUB_PRELOAD_MODULES'.
5674 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5677 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5679 Remove some unused code from reiserfs.
5681 * fs/reiserfs.c (struct grub_reiserfs_key)
5682 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5683 (struct grub_reiserfs_node_body): Removed.
5684 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5686 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5688 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5690 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5692 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5694 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5696 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5697 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5698 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5700 2008-01-10 Robert Millan <rmh@aybabtu.com>
5702 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5703 Determines if a file is garbage left by packaging systems, etc.
5704 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5705 for processing /etc/grub.d scripts.
5706 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5707 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5708 as a condition for processing Linux images.
5710 2008-01-10 Pavel Roskin <proski@gnu.org>
5712 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5713 to compile reiserfs.c on PowerPC.
5715 2008-01-10 Robert Millan <rmh@aybabtu.com>
5717 * kern/device.c (grub_device_iterate): Do not abort device iteration
5718 when one of the devices cannot be opened.
5719 * kern/disk.c (grub_disk_open): Do not account previous failures of
5720 unrelated functions when grub_errno is checked for.
5722 2008-01-08 Robert Millan <rmh@aybabtu.com>
5724 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5725 `! grub_linux_is_bzimage', change order of address comparison to make
5726 it more intuitive, and improve "too big zImage" error message.
5728 2008-01-08 Robert Millan <rmh@aybabtu.com>
5730 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5731 `$(update-grub_DATA)'.
5732 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5735 2008-01-07 Robert Millan <rmh@aybabtu.com>
5737 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5738 which instruction is modified by grub-setup during installation
5739 (since it wasn't obvious by only looking at this file).
5741 2008-01-07 Robert Millan <rmh@aybabtu.com>
5743 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5744 listing actual TODO items.
5746 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5748 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5750 (grub_reiserfs_get_key_offset): Likewise.
5751 (grub_reiserfs_set_key_offset): Likewise.
5752 (grub_reiserfs_set_key_type): Likewise.
5753 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5755 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5756 better to remove the bitfield version completely.
5758 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5760 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5761 allocated from the heap, due to the fshelp implementation.
5762 (grub_reiserfs_dir): Free NODE, due to the same reason.
5764 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5766 Mostly from Vincent Pelletier:
5768 * fs/reiserfs.c: New file.
5770 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5771 (reiserfs_mod_SOURCES): New variable.
5772 (reiserfs_mod_CFLAGS): Likewise.
5773 (reiserfs_mod_LDFLAGS): Likewise.
5775 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5776 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5777 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5780 2008-01-06 Robert Millan <rmh@aybabtu.com>
5782 * normal/color.c: Remove `<grub/env.h>'.
5784 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5786 * include/grub/normal.h: Include <grub/env.h>.
5788 2008-01-05 Robert Millan <rmh@aybabtu.com>
5790 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5791 usage example with `(hd0,1)'.
5792 Reported by Samuel Thibault.
5794 2008-01-05 Robert Millan <rmh@aybabtu.com>
5796 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5797 (grub_linux_boot_zimage): Rename to ...
5798 (grub_linux_boot): ... this.
5799 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5800 (grub_linux_boot_zimage): Conditionalize zImage copy.
5802 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5803 (grub_linux_boot_bzimage): Remove prototype.
5804 (grub_linux_boot_zimage): Rename to ...
5805 (grub_linux_boot): ... this.
5807 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5808 (grub_linux_boot): Remove function.
5810 2008-01-05 Robert Millan <rmh@aybabtu.com>
5812 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5813 (grub_env_write_color_highlight): Likewise.
5814 (grub_wait_after_message): Likewise.
5816 * normal/color.c: New file.
5818 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5819 (normal_mod_DEPENDENCIES): Likewise.
5821 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5822 (normal_mod_DEPENDENCIES): Likewise.
5824 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5825 (normal_mod_DEPENDENCIES): Likewise.
5827 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5828 (normal_mod_DEPENDENCIES): Likewise.
5830 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5831 for waiting after a message is printed.
5832 * normal/main.c (read_config_file): Likewise.
5833 (grub_normal_init): Register grub_env_write_color_normal() and
5834 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5835 `color_highlight' variables as global.
5837 * normal/menu.c (grub_wait_after_message): New function.
5838 (grub_color_menu_normal): New variable. Replaces ...
5839 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5840 (grub_color_menu_highlight): New variable. Replaces ...
5841 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5842 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5843 `GRUB_TERM_COLOR_STANDARD'.
5844 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5845 `normal_code' and `highlight_code' to `old_color_normal' and
5846 `old_color_highlight', respectively.
5847 (grub_menu_init_page): Update colors when drawing the menu, based on
5848 `menu_color_normal' and `menu_color_highlight' variables.
5849 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5850 a message is printed.
5852 2008-01-05 Robert Millan <rmh@aybabtu.com>
5854 * kern/env.c (grub_env_context_open): Propagate hooks for global
5855 variables to new context.
5857 * kern/main.c (grub_set_root_dev): Export `root' variable.
5859 2008-01-05 Robert Millan <rmh@aybabtu.com>
5861 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5862 discs unconditionally, since udev and others have options to provide
5865 2008-01-05 Robert Millan <rmh@aybabtu.com>
5867 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5869 2008-01-04 Christian Franke <franke@computer.org>
5871 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5874 2008-01-03 Pavel Roskin <proski@gnu.org>
5876 * kern/i386/linuxbios/init.c: Put "void" to all function
5877 declarations with no arguments.
5878 * kern/powerpc/ieee1275/init.c: Likewise.
5879 * term/i386/pc/at_keyboard.c: Likewise.
5880 * term/i386/pc/vga_text.c: Likewise.
5881 * util/grub-mkdevicemap.c: Likewise.
5883 2008-01-02 Robert Millan <rmh@aybabtu.com>
5885 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5886 message when loaded image is out of bounds.
5887 (grub_multiboot_load_elf64): Likewise.
5889 2008-01-02 Pavel Roskin <proski@gnu.org>
5891 * util/grub.d/10_linux.in: Try version without ".old" when
5892 looking for initrd. It's better to use initrd from the newer
5893 kernel of the same version than no initrd at all.
5895 2008-01-01 Robert Millan <rmh@aybabtu.com>
5897 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5899 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5901 * include/grub/video.h: Added grub_video_unmap_color and
5902 grub_video_get_active_render_target.
5903 (grub_video_adapter): Added unmap_color and get_active_render_target.
5905 * video/video.c: Added grub_video_unmap_color and
5906 grub_video_get_active_render_target.
5907 (grub_video_get_info): Changed method to accept NULL pointer as an
5908 argument to allow detection of active video adapter.
5910 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5911 grub_video_vbe_unmap_color_int.
5912 Added grub_video_vbe_unmap_color and
5913 grub_video_vbe_get_active_render_target.
5914 (grub_video_vbe_adapter): Added unmap_color and
5915 get_active_render_target.
5917 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5918 with grub_video_vbe_unmap_color_int.
5920 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5921 (DEFAULT_NORMAL_COLOR): Likewise.
5922 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5923 (DEFAULT_FG_COLOR): Removed.
5924 (DEFAULT_BG_COLOR): Likewise.
5925 (DEFAULT_CURSOR_COLOR): Changed value.
5926 (grub_virtual_screen): Added standard_color_setting,
5927 normal_color_setting, highlight_color_setting and term_color.
5928 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5929 (bitmap_width): Added.
5930 (bitmap_height): Likewise.
5932 (set_term_color): Likewise.
5933 (grub_virtual_screen_setup): Changed to use new terminal coloring
5935 (grub_gfxterm_init): Added init for bitmap.
5936 (grub_gfxterm_fini): Added destroy for bitmap.
5937 (redraw_screen_rect): Updated to use background bitmap and new
5939 (scroll_up): Added optimization for case when there is no bitmap.
5940 (grub_gfxterm_cls): Fixed to use correct background color.
5941 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5943 (grub_virtual_screen_setcolor): Likewise.
5944 (grub_virtual_screen_getcolor): Added.
5945 (grub_gfxterm_background_image_cmd): Likewise.
5946 (grub_video_term): Added setcolor and getcolor.
5947 (MOD_INIT): Added registration of background_image command.
5948 (MOD_TERM): Added unregistration for background_image command.
5950 2007-12-30 Pavel Roskin <proski@gnu.org>
5952 * loader/multiboot_loader.c: Fix multiboot command
5953 unregistration. Fix all typos in the word "multiboot".
5955 2007-12-29 Pavel Roskin <proski@gnu.org>
5957 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5958 support for initrd names used in Fedora.
5960 2007-12-26 Bean <bean123ch@gmail.com>
5962 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5963 (cpio_mod_SOURCES): New variable.
5964 (cpio_mod_CFLAGS): Likewise.
5965 (cpio_mod_LDFLAGS): Likewise.
5967 * fs/cpio.c: New file.
5969 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5971 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5973 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5975 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5977 2007-12-25 Robert Millan <rmh@aybabtu.com>
5979 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5980 (grub_getcolor): New function.
5982 * kern/term.c (grub_getcolor): New function.
5983 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5984 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5985 (print_entry): Set normal and highlight colors to
5986 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5987 respectively, before printing and restore them to old
5989 (grub_menu_init_page): Likewise. Fill an additional colored space
5990 that would otherwise be left blank.
5992 * term/efi/console.c (grub_console_getcolor): New function.
5993 (struct grub_console_term.getcolor): New variable.
5994 * term/i386/pc/console.c (grub_console_getcolor): New function.
5995 (struct grub_console_term.getcolor): New variable.
5996 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5997 (struct grub_console_term.getcolor): New variable.
5999 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6000 (struct grub_console_term.setcolor): Remove variable.
6001 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6002 (struct grub_console_term.setcolor): Remove variable.
6003 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6004 (struct grub_console_term.setcolor): Remove variable.
6005 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6006 (struct grub_console_term.setcolor): Remove variable.
6008 2007-12-25 Robert Millan <rmh@aybabtu.com>
6010 * configure.ac: Search for possible unifont.hex locations, and
6011 define UNIFONT_HEX if found.
6013 * Makefile.in (UNIFONT_HEX): Define variable.
6014 (DATA): Rename to ...
6015 (PKGLIB): ... this. Update all users.
6016 (PKGDATA): New variable.
6017 (pkgdata_IMAGES): Rename to ...
6018 (pkglib_IMAGES): ... this. Update all users.
6019 (pkgdata_MODULES): Rename to ...
6020 (pkglib_MODULES): ... this. Update all users.
6021 (pkgdata_PROGRAMS): Rename to ...
6022 (pkglib_PROGRAMS): ... this. Update all users.
6023 (pkgdata_DATA): Rename to ...
6024 (pkglib_DATA): ... this. Update all users.
6025 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6026 (unicode.pff, ascii.pff): New rules.
6027 (all-local): Add `$(PKGDATA)' dependency.
6028 (install-local): Process `$(PKGDATA)'.
6030 * util/update-grub_lib.in (font_path): Search for *.pff files in
6031 a few more locations, including `${pkgdata}'.
6033 2007-12-23 Robert Millan <rmh@aybabtu.com>
6035 Patch from Bean <bean123ch@gmail.com>:
6036 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6039 2007-12-21 Bean <bean123ch@gmail.com>
6041 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6042 (ntfscomp_mod_SOURCES): New variable.
6043 (ntfscomp_mod_CFLAGS): Likewise.
6044 (ntfscomp_mod_LDFLAGS): Likewise.
6046 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6047 (grub_probe_SOURCES): Likewise.
6048 (grub_emu_SOURCES): Likewise.
6050 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6051 (grub_emu_SOURCES): Likewise.
6053 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6054 (grub_emu_SOURCES): Likewise.
6056 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6057 (grub_emu_SOURCES): Likewise.
6059 * fs/ntfs.c (grub_ntfscomp_func): New variable.
6060 (read_run_list): Renamed to grub_ntfs_read_run_list.
6061 (decomp_nextvcn): Moved to ntfscomp.c.
6062 (decomp_getch): Likewise.
6063 (decomp_get16): Likewise.
6064 (decomp_block): Likewise.
6065 (read_block): Likewise.
6066 (read_data): Partially moved to ntfscomp.c.
6067 (fixup): Change unsigned to grub_uint16_t.
6068 (read_mft): Change unsigned long to grub_uint32_t.
6069 (read_attr): Likewise.
6070 (read_data): Likewise.
6071 (read_run_data): Likewise.
6072 (read_run_list): Likewise.
6073 (read_mft): Likewise.
6075 * fs/ntfscomp.c: New file.
6077 * include/grub/ntfs.h: New file.
6079 2007-12-16 Robert Millan <rmh@aybabtu.com>
6081 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6082 IDE disk check, since Linux is known to support 20 IDE disks.
6083 Reported by Colin Watson.
6085 2007-12-15 Bean <bean123ch@gmail.com>
6087 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6088 (lnxboot_img_SOURCES): New variable.
6089 (lnxboot_img_ASFLAGS): Likewise.
6090 (lnxboot_img_LDFLAGS): Likewise.
6092 * boot/i386/pc/lnxboot.S: New file.
6094 2007-11-24 Pavel Roskin <proski@gnu.org>
6096 * configure.ac: Test if '--build-id=none' is supported by the
6097 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6098 objcopy to generate incorrect binary files (binutils
6099 2.17.50.0.18-1 as shipped by Fedora 8).
6100 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6101 linking, so that build ID doesn't break the test.
6103 2007-11-24 Pavel Roskin <proski@gnu.org>
6105 * include/grub/i386/time.h: use "void" in the argument list
6107 * include/grub/powerpc/time.h: Likewise.
6108 * include/grub/sparc64/time.h: Likewise.
6110 2007-11-18 Christian Franke <franke@computer.org>
6112 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6113 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6114 This fixes the problem that function keys did not work in grub-emu.
6116 2007-11-18 Christian Franke <franke@computer.org>
6118 * disk/host.c (grub_host_open): Remove attribute unused from
6119 name parameter. Add check for "host". This fixes the problem
6120 that grub-emu does not find partitions.
6122 2007-11-18 Christian Franke <franke@computer.org>
6124 * util/hostfs.c (is_dir): New function.
6125 (grub_hostfs_dir): Handle missing dirent.d_type case.
6126 (grub_hostfs_read): Add missing fseek().
6127 (grub_hostfs_label): Clear label pointer. This fixes a crash
6128 of grub-emu on "ls (host)".
6130 2007-11-18 Christian Franke <franke@computer.org>
6132 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6133 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6134 to 64 bit boundary by default.
6136 2007-11-18 Bean <bean123ch@gmail.com>
6138 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6139 (hexdump_mod_SOURCES): New variable.
6140 (hexdump_mod_CFLAGS): Likewise.
6141 (hexdump_mod_LDFLAGS): Likewise.
6143 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6145 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6147 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6149 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6151 * include/grub/hexdump.h: New file.
6153 * commands/hexdump.c: New file.
6155 2007-11-10 Robert Millan <rmh@aybabtu.com>
6157 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6158 in grub_outb() calls.
6159 (beep_on): Likewise.
6161 2007-11-10 Christian Franke <franke@computer.org>
6163 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6164 (grub_menu_run): Likewise.
6166 2007-11-10 Robert Millan <rmh@aybabtu.com>
6168 * include/grub/i386/efi/machine.h: New file.
6169 * include/grub/i386/linuxbios/machine.h: Likewise.
6170 * include/grub/i386/pc/machine.h: Likewise.
6171 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6172 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6174 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6175 (serial_hw_io_addr): New variable.
6176 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6177 instead of `(unsigned short *) 0x400'.
6179 2007-11-10 Bean <bean123ch@gmail.com>
6181 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6183 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6185 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6186 (vga_mod_SOURCES): Added.
6187 (vga_mod_CFLAGS): Likewise.
6188 (vga_mod_LDFLAGS): Likewise.
6190 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6192 (set_map_mask): Likewise.
6193 (set_read_map): Likewise.
6194 (set_read_address): Likewise.
6195 (vga_font): Removed variable.
6196 (get_vga_glyph): Removed function.
6197 (invalidate_char): Likewise.
6198 (write_char): Changed to use grub_font_get_glyph() for font
6200 (grub_vga_putchar): Likewise.
6201 (grub_vga_getcharwidth): Likewise.
6203 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6205 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6207 (pxeboot_img_LDFLAGS): Likewise.
6208 (diskboot_img_LDFLAGS): Likewise.
6209 (kernel_img_LDFLAGS): Likewise.
6211 2007-11-06 Robert Millan <rmh@aybabtu.com>
6213 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6214 in grub_outb() calls.
6215 (serial_hw_init): Likewise.
6217 2007-11-05 Robert Millan <rmh@aybabtu.com>
6219 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6220 spaces. Skip non-regular files.
6222 2007-11-05 Robert Millan <rmh@aybabtu.com>
6224 * kern/disk.c (grub_disk_firmware_fini)
6225 (grub_disk_firmware_is_tainted): New variables.
6227 * include/grub/disk.h (grub_disk_firmware_fini)
6228 (grub_disk_firmware_is_tainted): Likewise.
6230 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6231 (grub_disk_biosdisk_fini): ... to here.
6232 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6233 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6234 is set. Register grub_disk_biosdisk_fini() in
6235 `grub_disk_firmware_fini'.
6237 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6238 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6239 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6240 to finish existing firmware disk interface.
6242 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6243 (ata_mod_SOURCES): New variable.
6244 (ata_mod_CFLAGS): Likewise.
6245 (ata_mod_LDFLAGS): Likewise.
6247 2007-11-05 Robert Millan <rmh@aybabtu.com>
6249 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6250 (grub_ata_wait): Reimplement using grub_millisleep().
6252 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6253 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6255 2007-11-03 Marco Gerards <marco@gnu.org>
6257 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6258 (CRTC_ADDR_PORT): New macro.
6259 (CRTC_DATA_PORT): Likewise.
6260 (CRTC_CURSOR): Likewise.
6261 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6262 (CRTC_CURSOR_ADDR_LOW): Likewise.
6263 (update_cursor): New function.
6264 (grub_console_real_putchar): Call `update_cursor'.
6265 (grub_console_gotoxy): Likewise.
6266 (grub_console_cls): Set the default color when clearing the
6268 (grub_console_setcursor): Implemented.
6270 2007-11-03 Marco Gerards <marco@gnu.org>
6272 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6274 (grub_ata_pio_write): Likewise.
6276 (grub_atapi_identify): Wait after issuing an ATA command.
6277 (grub_atapi_packet): Likewise.
6278 (grub_ata_identify): Likewise.
6279 (grub_ata_readwrite): Likewise.
6281 2007-11-03 Marco Gerards <marco@gnu.org>
6283 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6284 (grub_ata_pio_write): Likewise.
6285 (grub_ata_readwrite): Use `grub_error', instead of
6286 returning `grub_errno'.
6288 2007-11-03 Marco Gerards <marco@gnu.org>
6290 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6291 grub_ata_pio_write once for every single sector, instead of for
6294 2007-10-31 Robert Millan <rmh@aybabtu.com>
6296 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6298 * conf/i386-linuxbios.rmk: New file.
6300 * kern/i386/pc/hardware.c: Likewise.
6301 * term/i386/pc/at_keyboard.c: Likewise.
6302 * term/i386/pc/vga_text.c: Likewise.
6304 * include/grub/i386/linuxbios/boot.h: Likewise.
6305 * include/grub/i386/linuxbios/console.h: Likewise.
6306 * include/grub/i386/linuxbios/init.h: Likewise.
6307 * include/grub/i386/linuxbios/kernel.h: Likewise.
6308 * include/grub/i386/linuxbios/loader.h: Likewise.
6309 * include/grub/i386/linuxbios/memory.h: Likewise.
6310 * include/grub/i386/linuxbios/serial.h: Likewise.
6311 * include/grub/i386/linuxbios/time.h: Likewise.
6313 * kern/i386/linuxbios/init.c: Likewise.
6314 * kern/i386/linuxbios/startup.S: Likewise.
6315 * kern/i386/linuxbios/table.c: Likewise.
6317 2007-10-31 Marco Gerards <marco@gnu.org>
6319 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6320 (ata_mod_SOURCES): New variable.
6321 (ata_mod_CFLAGS): Likewise.
6322 (ata_mod_LDFLAGS): Likewise.
6324 * disk/ata.c: New file.
6326 * include/grub/disk.h (grub_disk_dev_id): Add
6327 `GRUB_DISK_DEV_ATA_ID'.
6329 2007-10-31 Robert Millan <rmh@aybabtu.com>
6331 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6332 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6334 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6335 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6337 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6340 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6342 2007-10-27 Robert Millan <rmh@aybabtu.com>
6344 * include/grub/types.h (ULONG_MAX): Define macro.
6346 2007-10-22 Robert Millan <rmh@aybabtu.com>
6348 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6350 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6352 2007-10-22 Robert Millan <rmh@aybabtu.com>
6354 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6355 (pkgdata_MODULES): Add `biosdisk.mod'.
6356 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6359 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6360 (grub_biosdisk_init): Replace with ...
6361 (GRUB_MOD_INIT(biosdisk)): ... this.
6362 (grub_biosdisk_fini): Replace with ...
6363 (GRUB_MOD_FINI(biosdisk)): ... this.
6365 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6366 (grub_machine_init): Remove call to grub_biosdisk_init().
6367 (grub_machine_fini): Remove call to grub_machine_fini().
6369 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6371 2007-10-22 Robert Millan <rmh@aybabtu.com>
6373 * include/grub/time.h: New file.
6374 * include/grub/i386/time.h: Likewise.
6375 * include/grub/powerpc/time.h: Likewise.
6376 * include/grub/sparc64/time.h: Likewise.
6378 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6380 (KERNEL_MACHINE_TIME_HEADER): ... this.
6381 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6383 (KERNEL_MACHINE_TIME_HEADER): ... this.
6384 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6386 (KERNEL_MACHINE_TIME_HEADER): ... this.
6388 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6389 (grub_millisleep): New function.
6390 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6391 (grub_millisleep): New function.
6392 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6393 Remove `grub/machine/time.h' include.
6394 (grub_millisleep): New function.
6395 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6396 Remove `grub/machine/time.h' include.
6397 (grub_millisleep): New function.
6399 * include/grub/misc.h (grub_div_roundup): New function.
6401 * kern/misc.c: Include `<grub/time.h>'.
6402 (grub_millisleep_generic): New function.
6404 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6406 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6408 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6409 `machine/time.h'. Add `time.h'.
6410 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6412 2007-10-21 Robert Millan <rmh@aybabtu.com>
6414 * include/grub/misc.h (grub_max): New function.
6416 2007-10-21 Robert Millan <rmh@aybabtu.com>
6418 * util/misc.c (grub_util_info): Call fflush() before returning.
6420 2007-10-20 Robert Millan <rmh@aybabtu.com>
6422 * genmk.rb (Image): Copy `extra_flags' from here ...
6423 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6425 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6426 to `argc' and `args' arguments.
6428 2007-10-17 Robert Millan <rmh@aybabtu.com>
6430 * kern/i386/loader.S: New file.
6432 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6433 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6434 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6435 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6436 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6437 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6438 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6439 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6440 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6441 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6442 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6443 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6444 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6445 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6447 * kern/i386/realmode.S: New file.
6449 * kern/i386/pc/startup.S (protstack): Moved from here ...
6450 * kern/i386/realmode.S (protstack)... to here.
6451 * kern/i386/pc/startup.S (gdt): Moved from here ...
6452 * kern/i386/realmode.S (gdt)... to here.
6453 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6454 * kern/i386/realmode.S (prot_to_real)... to here.
6456 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6457 `kern/i386/realmode.S'.
6459 2007-10-17 Robert Millan <rmh@aybabtu.com>
6461 * include/grub/i386/loader.h: New file.
6463 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6464 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6465 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6466 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6467 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6468 * include/grub/i386/loader.h (grub_linux_prot_size)
6469 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6470 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6471 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6472 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6474 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6476 2007-10-15 Robert Millan <rmh@aybabtu.com>
6478 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6479 filesystem when dev->disk is unset.
6480 Do probe for filesystem even when dev->disk->has_partitions is set.
6481 In case a filesystem is found, always report it.
6482 In case it isn't, if dev->disk->has_partitions is set, report that
6483 a partition table was found instead of reporting that no filesystem
6484 could be identified.
6486 2007-10-12 Robert Millan <rmh@aybabtu.com>
6488 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6489 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6491 * include/grub/types.h (grub_host_to_target16): New macro.
6492 (grub_host_to_target32): Likewise.
6493 (grub_host_to_target64): Likewise.
6494 (grub_target_to_host16): Likewise.
6495 (grub_target_to_host32): Likewise.
6496 (grub_target_to_host64): Likewise.
6498 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6500 (GRUB_MOD_ALIGN): ...this. Update all users.
6502 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6503 grub_host_to_target32.
6504 Replace grub_be_to_cpu32 with grub_target_to_host32.
6505 (load_modules): Likewise.
6506 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6507 Replace grub_be_to_cpu32 with grub_target_to_host32.
6508 Replace grub_cpu_to_be16 with grub_host_to_target16.
6509 Replace grub_cpu_to_be32 grub_host_to_target32.
6511 2007-10-12 Robert Millan <rmh@aybabtu.com>
6513 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6514 * util/elf/grub-mkimage.c: ... here.
6516 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6517 `util/powerpc/ieee1275/grub-mkimage.c'.
6519 2007-10-07 Robert Millan <rmh@aybabtu.com>
6521 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6522 and make it easier to figure out.
6523 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6524 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6525 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6526 leave us with less than HEAP_MIN_SIZE total heap.
6527 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
6529 2007-10-03 Robert Millan <rmh@aybabtu.com>
6531 * include/grub/i386/io.h: New file.
6532 * commands/i386/pc/play.c (inb): Removed.
6534 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6536 * term/i386/pc/serial.c (inb): Removed.
6538 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6540 * term/i386/pc/vga.c (inb): Removed.
6542 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6545 2007-10-02 Robert Millan <rmh@aybabtu.com>
6547 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6549 Reported by Marcin Kurek.
6551 2007-09-07 Robert Millan <rmh@aybabtu.com>
6553 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6554 SmartFirmware version updates (as released by Sven Luther), and avoid
6555 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6556 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6559 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6562 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6563 when merging two regions.
6565 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6567 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6568 * normal/completion.c (grub_normal_do_completion): Likewise.
6569 Reported by Hitoshi Ozeki.
6571 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6573 Do not use devices at boot in chainloading.
6575 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6576 (boot_part_addr): Likewise.
6577 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6578 with BOOT_DRIVE and BOOT_PART_ADDR.
6579 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6580 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6582 2007-08-29 Robert Millan <rmh@aybabtu.com>
6584 Patch from Simon Peter <dn.tlp@gmx.net>:
6585 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6586 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6587 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6588 util/i386/pc/grub-setup.c_DEPENDENCIES.
6589 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6590 util/grub-probe.c_DEPENDENCIES.
6591 * conf/powerpc-ieee1275.rmk: Likewise.
6593 2007-08-28 Robert Millan <rmh@aybabtu.com>
6595 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6596 to tell grub-mkdevicemap how to name devices.
6597 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6600 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6601 util/i386/get_disk_name.c.
6602 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6603 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6604 util/ieee1275/get_disk_name.c.
6606 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6608 * DISTLIST: Add util/i386/get_disk_name.c and
6609 util/ieee1275/get_disk_name.c.
6611 * util/grub-mkdevicemap.c: Replace device naming logic with
6612 grub_util_get_disk_name() calls.
6614 2007-08-20 Robert Millan <rmh@aybabtu.com>
6616 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6617 (so that it works for both plural and singular quantities).
6619 2007-08-05 Robert Millan <rmh@aybabtu.com>
6621 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6622 so that [xz] isn't taken into account when determining order.
6624 2007-08-02 Marco Gerards <marco@gnu.org>
6626 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6627 `include/multiboot2.h', `include/grub/elfload.h',
6628 `include/multiboot.h', `include/grub/multiboot.h',
6629 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6630 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6631 `kern/elf.c', `loader/multiboot_loader.c',
6632 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6633 `loader/i386/pc/multiboot2.c',
6634 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6635 `util/i386/pc/grub-mkrescue.in'. Remove
6636 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
6637 `include/grub/i386/pc/util/biosdisk.h' and
6638 `include/grub/powerpc/ieee1275/multiboot.h'.
6640 2007-08-02 Bean <bean123ch@gmail.com>
6642 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
6643 (ntfs_mod_SOURCES): New variable.
6644 (ntfs_mod_CFLAGS): Likewise.
6645 (ntfs_mod_LDFLAGS): Likewise.
6647 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6648 (grub_probe_SOURCES): Likewise.
6649 (grub_emu_SOURCES): Likewise.
6651 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6652 (grub_emu_SOURCES): Likewise.
6654 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6655 (grub_emu_SOURCES): Likewise.
6657 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6659 * fs/ntfs.c: New file.
6661 2007-08-02 Bean <bean123ch@gmail.com>
6663 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6665 * file.h (grub_file): Likewise.
6667 * fshelp.h (grub_fshelp_read_file): Likewise.
6669 * util/i386/pc/grub-setup.c (setup): Likewise.
6670 (save_first_sector): Likewise.
6671 (save_blocklists): Likewise.
6673 * fs/affs.c (grub_affs_read_file): Likewise.
6675 * fs/ext2.c (grub_ext2_read_file): Likewise.
6677 * fs/fat.c (grub_fat_read_data): Likewise.
6679 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6681 * fs/hfs.c (grub_hfs_read_file): Likewise.
6683 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6685 * fs/jfs.c (grub_jfs_read_file): Likewise.
6687 * fs/minix.c (grub_minix_read_file): Likewise.
6689 * fs/sfs.c (grub_sfs_read_file): Likewise.
6691 * fs/ufs.c (grub_ufs_read_file): Likewise.
6693 * fs/xfs.c (grub_xfs_read_file): Likewise.
6695 * command/blocklist.c (read_blocklist): Likewise.
6696 (print_blocklist): Likewise.
6698 2007-08-02 Marco Gerards <marco@gnu.org>
6700 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6703 * disk/host.c: New file.
6705 * util/hostfs.c: Likewise.
6707 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6708 return `GRUB_ERR_BAD_FS'.
6709 * fs/sfs.c (grub_sfs_mount): Likewise.
6710 * fs/xfs.c (grub_xfs_mount): Likewise.
6712 * include/grub/disk.h (enum grub_disk_dev_id): Add
6713 `GRUB_DISK_DEVICE_HOST_ID'.
6715 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6717 2007-07-24 Jerone Young <jerone@gmail.com>
6719 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6720 modules for compilation.
6721 * conf/powerpc-ieee1275.rmk: Likewise.
6723 * include/multiboot.h: Move multiboot definitions to one file. Rename
6724 many definitions to not get grub specific.
6725 * include/multiboot2.h: Create header with multiboot 2 definitions.
6726 * include/grub/multiboot.h: Header for grub specific function
6727 prototypes and definitions.
6728 * include/grub/multiboot2.h: Likewise.
6729 * include/grub/multiboot_loader.h: Likewise.
6730 * include/grub/i386/pc/multiboot.h: Removed.
6731 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6733 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6734 and 2 to allow for one multiboot and module commands.
6735 * loader/multiboot2.c: Add multiboot2 functionality.
6736 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6737 and definition names.
6738 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6740 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6741 ieee1275 specific multiboot2 code.
6743 * kern/i386/pc/startup.S: Change headers and definition names for
6744 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6746 2007-07-22 Robert Millan <rmh@aybabtu.com>
6748 * geninitheader.sh: Process file specified in first parameter rather
6749 than hardcoding grub_modules_init.lst.
6750 * geninit.sh: Likewise. Also, construct header name dynamically rather
6751 than hardcoding grub_modules_init.h.
6753 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6754 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6755 grub_probe_init.[ch] and grub_setup_init.[ch].
6757 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6758 grub_modules_init.h with grub_emu_init.h.
6759 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6760 grub_probe_init.[ch] files.
6761 * conf/i386-efi.rmk: Likewise.
6762 * conf/i386-pc.rmk: Likewise.
6763 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6764 grub_setup_init.[ch] files.
6766 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6767 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6768 to initialize modules rather than a list of hardcoded functions.
6769 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6770 grub_init_all() to initialize modules rather than a list of hardcoded
6773 2007-07-22 Robert Millan <rmh@aybabtu.com>
6775 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6776 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6778 2007-07-22 Robert Millan <rmh@aybabtu.com>
6780 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6781 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6782 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6783 flag when running on SmartFirmware.
6784 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6785 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6788 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6789 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6790 rather than decreasing it.
6792 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6793 there's not enough space to do it, fail in the same way as when it
6794 can't be done because there are no partitions.
6796 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6797 when nvsetenv failed.
6799 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6801 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6802 because this rule is automatically generated.
6803 (grub-mkrescue): Removed for the same reason as above.
6805 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6807 Migrate to GNU General Public License Version 3.
6809 * COPYING: Replaced with the plain text version of GPLv3.
6811 * config.guess: Updated from gnulib.
6812 * config.sub: Likewise.
6814 * geninit.sh: Output a GPLv3 copyright notice.
6815 * geninitheader.sh: Likewise.
6816 * genmodsrc.sh: Likewise.
6817 * gensymlist.sh.in: Likewise.
6819 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6820 * boot/i386/pc/diskboot.S: Likewise.
6821 * boot/i386/pc/pxeboot.S: Likewise.
6822 * commands/blocklist.c: Likewise.
6823 * commands/boot.c: Likewise.
6824 * commands/cat.c: Likewise.
6825 * commands/cmp.c: Likewise.
6826 * commands/configfile.c: Likewise.
6827 * commands/echo.c: Likewise.
6828 * commands/help.c: Likewise.
6829 * commands/ls.c: Likewise.
6830 * commands/search.c: Likewise.
6831 * commands/terminal.c: Likewise.
6832 * commands/test.c: Likewise.
6833 * commands/videotest.c: Likewise.
6834 * commands/i386/cpuid.c: Likewise.
6835 * commands/i386/pc/halt.c: Likewise.
6836 * commands/i386/pc/play.c: Likewise.
6837 * commands/i386/pc/reboot.c: Likewise.
6838 * commands/i386/pc/vbeinfo.c: Likewise.
6839 * commands/i386/pc/vbetest.c: Likewise.
6840 * commands/ieee1275/halt.c: Likewise.
6841 * commands/ieee1275/reboot.c: Likewise.
6842 * commands/ieee1275/suspend.c: Likewise.
6843 * disk/loopback.c: Likewise.
6844 * disk/lvm.c: Likewise.
6845 * disk/raid.c: Likewise.
6846 * disk/efi/efidisk.c: Likewise.
6847 * disk/i386/pc/biosdisk.c: Likewise.
6848 * disk/ieee1275/ofdisk.c: Likewise.
6849 * font/manager.c: Likewise.
6850 * fs/affs.c: Likewise.
6851 * fs/ext2.c: Likewise.
6852 * fs/fat.c: Likewise.
6853 * fs/fshelp.c: Likewise.
6854 * fs/hfs.c: Likewise.
6855 * fs/hfsplus.c: Likewise.
6856 * fs/iso9660.c: Likewise.
6857 * fs/jfs.c: Likewise.
6858 * fs/minix.c: Likewise.
6859 * fs/sfs.c: Likewise.
6860 * fs/ufs.c: Likewise.
6861 * fs/xfs.c: Likewise.
6862 * hello/hello.c: Likewise.
6863 * include/grub/acorn_filecore.h: Likewise.
6864 * include/grub/arg.h: Likewise.
6865 * include/grub/bitmap.h: Likewise.
6866 * include/grub/boot.h: Likewise.
6867 * include/grub/cache.h: Likewise.
6868 * include/grub/device.h: Likewise.
6869 * include/grub/disk.h: Likewise.
6870 * include/grub/dl.h: Likewise.
6871 * include/grub/elfload.h: Likewise.
6872 * include/grub/env.h: Likewise.
6873 * include/grub/err.h: Likewise.
6874 * include/grub/file.h: Likewise.
6875 * include/grub/font.h: Likewise.
6876 * include/grub/fs.h: Likewise.
6877 * include/grub/fshelp.h: Likewise.
6878 * include/grub/gzio.h: Likewise.
6879 * include/grub/hfs.h: Likewise.
6880 * include/grub/kernel.h: Likewise.
6881 * include/grub/loader.h: Likewise.
6882 * include/grub/lvm.h: Likewise.
6883 * include/grub/misc.h: Likewise.
6884 * include/grub/mm.h: Likewise.
6885 * include/grub/net.h: Likewise.
6886 * include/grub/normal.h: Likewise.
6887 * include/grub/parser.h: Likewise.
6888 * include/grub/partition.h: Likewise.
6889 * include/grub/pc_partition.h: Likewise.
6890 * include/grub/raid.h: Likewise.
6891 * include/grub/rescue.h: Likewise.
6892 * include/grub/script.h: Likewise.
6893 * include/grub/setjmp.h: Likewise.
6894 * include/grub/symbol.h: Likewise.
6895 * include/grub/term.h: Likewise.
6896 * include/grub/terminfo.h: Likewise.
6897 * include/grub/tparm.h: Likewise.
6898 * include/grub/types.h: Likewise.
6899 * include/grub/video.h: Likewise.
6900 * include/grub/efi/api.h: Likewise.
6901 * include/grub/efi/chainloader.h: Likewise.
6902 * include/grub/efi/console.h: Likewise.
6903 * include/grub/efi/console_control.h: Likewise.
6904 * include/grub/efi/disk.h: Likewise.
6905 * include/grub/efi/efi.h: Likewise.
6906 * include/grub/efi/pe32.h: Likewise.
6907 * include/grub/efi/time.h: Likewise.
6908 * include/grub/i386/linux.h: Likewise.
6909 * include/grub/i386/setjmp.h: Likewise.
6910 * include/grub/i386/types.h: Likewise.
6911 * include/grub/i386/efi/kernel.h: Likewise.
6912 * include/grub/i386/efi/loader.h: Likewise.
6913 * include/grub/i386/efi/time.h: Likewise.
6914 * include/grub/i386/pc/biosdisk.h: Likewise.
6915 * include/grub/i386/pc/boot.h: Likewise.
6916 * include/grub/i386/pc/chainloader.h: Likewise.
6917 * include/grub/i386/pc/console.h: Likewise.
6918 * include/grub/i386/pc/init.h: Likewise.
6919 * include/grub/i386/pc/kernel.h: Likewise.
6920 * include/grub/i386/pc/loader.h: Likewise.
6921 * include/grub/i386/pc/memory.h: Likewise.
6922 * include/grub/i386/pc/multiboot.h: Likewise.
6923 * include/grub/i386/pc/serial.h: Likewise.
6924 * include/grub/i386/pc/time.h: Likewise.
6925 * include/grub/i386/pc/vbe.h: Likewise.
6926 * include/grub/i386/pc/vbeblit.h: Likewise.
6927 * include/grub/i386/pc/vbefill.h: Likewise.
6928 * include/grub/i386/pc/vbeutil.h: Likewise.
6929 * include/grub/i386/pc/vga.h: Likewise.
6930 * include/grub/ieee1275/ieee1275.h: Likewise.
6931 * include/grub/ieee1275/ofdisk.h: Likewise.
6932 * include/grub/powerpc/libgcc.h: Likewise.
6933 * include/grub/powerpc/setjmp.h: Likewise.
6934 * include/grub/powerpc/types.h: Likewise.
6935 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6936 * include/grub/powerpc/ieee1275/console.h: Likewise.
6937 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6938 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6939 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6940 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6941 * include/grub/powerpc/ieee1275/time.h: Likewise.
6942 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6943 * include/grub/sparc64/libgcc.h: Likewise.
6944 * include/grub/sparc64/setjmp.h: Likewise.
6945 * include/grub/sparc64/types.h: Likewise.
6946 * include/grub/sparc64/ieee1275/console.h: Likewise.
6947 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6948 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6949 * include/grub/sparc64/ieee1275/time.h: Likewise.
6950 * include/grub/util/biosdisk.h: Likewise.
6951 * include/grub/util/getroot.h: Likewise.
6952 * include/grub/util/lvm.h: Likewise.
6953 * include/grub/util/misc.h: Likewise.
6954 * include/grub/util/raid.h: Likewise.
6955 * include/grub/util/resolve.h: Likewise.
6956 * io/gzio.c: Likewise.
6957 * kern/device.c: Likewise.
6958 * kern/disk.c: Likewise.
6959 * kern/dl.c: Likewise.
6960 * kern/elf.c: Likewise.
6961 * kern/env.c: Likewise.
6962 * kern/err.c: Likewise.
6963 * kern/file.c: Likewise.
6964 * kern/fs.c: Likewise.
6965 * kern/loader.c: Likewise.
6966 * kern/main.c: Likewise.
6967 * kern/misc.c: Likewise.
6968 * kern/mm.c: Likewise.
6969 * kern/parser.c: Likewise.
6970 * kern/partition.c: Likewise.
6971 * kern/rescue.c: Likewise.
6972 * kern/term.c: Likewise.
6973 * kern/efi/efi.c: Likewise.
6974 * kern/efi/init.c: Likewise.
6975 * kern/efi/mm.c: Likewise.
6976 * kern/i386/dl.c: Likewise.
6977 * kern/i386/efi/init.c: Likewise.
6978 * kern/i386/efi/startup.S: Likewise.
6979 * kern/i386/pc/init.c: Likewise.
6980 * kern/i386/pc/lzo1x.S: Likewise.
6981 * kern/i386/pc/startup.S: Likewise.
6982 * kern/ieee1275/ieee1275.c: Likewise.
6983 * kern/powerpc/cache.S: Likewise.
6984 * kern/powerpc/dl.c: Likewise.
6985 * kern/powerpc/ieee1275/cmain.c: Likewise.
6986 * kern/powerpc/ieee1275/crt0.S: Likewise.
6987 * kern/powerpc/ieee1275/init.c: Likewise.
6988 * kern/powerpc/ieee1275/openfw.c: Likewise.
6989 * kern/sparc64/cache.S: Likewise.
6990 * kern/sparc64/dl.c: Likewise.
6991 * kern/sparc64/ieee1275/init.c: Likewise.
6992 * kern/sparc64/ieee1275/openfw.c: Likewise.
6993 * loader/efi/chainloader.c: Likewise.
6994 * loader/efi/chainloader_normal.c: Likewise.
6995 * loader/i386/efi/linux.c: Likewise.
6996 * loader/i386/efi/linux_normal.c: Likewise.
6997 * loader/i386/pc/chainloader.c: Likewise.
6998 * loader/i386/pc/chainloader_normal.c: Likewise.
6999 * loader/i386/pc/linux.c: Likewise.
7000 * loader/i386/pc/linux_normal.c: Likewise.
7001 * loader/i386/pc/multiboot.c: Likewise.
7002 * loader/i386/pc/multiboot_normal.c: Likewise.
7003 * loader/powerpc/ieee1275/linux.c: Likewise.
7004 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7005 * normal/arg.c: Likewise.
7006 * normal/cmdline.c: Likewise.
7007 * normal/command.c: Likewise.
7008 * normal/completion.c: Likewise.
7009 * normal/execute.c: Likewise.
7010 * normal/function.c: Likewise.
7011 * normal/lexer.c: Likewise.
7012 * normal/main.c: Likewise.
7013 * normal/menu.c: Likewise.
7014 * normal/menu_entry.c: Likewise.
7015 * normal/misc.c: Likewise.
7016 * normal/parser.y: Likewise.
7017 * normal/script.c: Likewise.
7018 * normal/i386/setjmp.S: Likewise.
7019 * normal/powerpc/setjmp.S: Likewise.
7020 * normal/sparc64/setjmp.S: Likewise.
7021 * partmap/acorn.c: Likewise.
7022 * partmap/amiga.c: Likewise.
7023 * partmap/apple.c: Likewise.
7024 * partmap/gpt.c: Likewise.
7025 * partmap/pc.c: Likewise.
7026 * partmap/sun.c: Likewise.
7027 * term/gfxterm.c: Likewise.
7028 * term/terminfo.c: Likewise.
7029 * term/efi/console.c: Likewise.
7030 * term/i386/pc/console.c: Likewise.
7031 * term/i386/pc/serial.c: Likewise.
7032 * term/i386/pc/vesafb.c: Likewise.
7033 * term/i386/pc/vga.c: Likewise.
7034 * term/ieee1275/ofconsole.c: Likewise.
7035 * util/biosdisk.c: Likewise.
7036 * util/console.c: Likewise.
7037 * util/genmoddep.c: Likewise.
7038 * util/getroot.c: Likewise.
7039 * util/grub-emu.c: Likewise.
7040 * util/grub-mkdevicemap.c: Likewise.
7041 * util/grub-probe.c: Likewise.
7042 * util/lvm.c: Likewise.
7043 * util/misc.c: Likewise.
7044 * util/raid.c: Likewise.
7045 * util/resolve.c: Likewise.
7046 * util/update-grub.in: Likewise.
7047 * util/update-grub_lib.in: Likewise.
7048 * util/grub.d/00_header.in: Likewise.
7049 * util/grub.d/10_hurd.in: Likewise.
7050 * util/grub.d/10_linux.in: Likewise.
7051 * util/i386/efi/grub-install.in: Likewise.
7052 * util/i386/efi/grub-mkimage.c: Likewise.
7053 * util/i386/pc/grub-install.in: Likewise.
7054 * util/i386/pc/grub-mkimage.c: Likewise.
7055 * util/i386/pc/grub-mkrescue.in: Likewise.
7056 * util/i386/pc/grub-setup.c: Likewise.
7057 * util/i386/pc/misc.c: Likewise.
7058 * util/powerpc/ieee1275/grub-install.in: Likewise.
7059 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7060 * util/powerpc/ieee1275/misc.c: Likewise.
7061 * video/bitmap.c: Likewise.
7062 * video/video.c: Likewise.
7063 * video/i386/pc/vbe.c: Likewise.
7064 * video/i386/pc/vbeblit.c: Likewise.
7065 * video/i386/pc/vbefill.c: Likewise.
7066 * video/i386/pc/vbeutil.c: Likewise.
7067 * video/readers/tga.c: Likewise.
7069 2007-07-02 Robert Millan <rmh@aybabtu.com>
7071 * conf/i386-efi.rmk: Replace obsolete reference to
7072 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7073 with util/getroot.c.
7074 * conf/powerpc-ieee1275.rmk: Likewise.
7075 * conf/sparc64-ieee1275.rmk: Likewise.
7077 * util/grub-emu.c (main): Fix unchecked pointer handling.
7079 2007-07-02 Robert Millan <rmh@aybabtu.com>
7081 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7082 invocation to fail, in order to support partition-less media.
7084 * util/i386/pc/grub-install.in: Likewise.
7086 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7087 which fs or partmap modules are needed (akin to its sister scripts).
7089 Also use grub-probe to get rid of unportable /proc/mounts check.
7091 Print the same informational message that the other scripts do, before
7094 2007-06-23 Robert Millan <rmh@aybabtu.com>
7096 * util/update-grub_lib.in (font_path): New function. Determine whether
7097 a font file can be found and, if so, echo the GRUB path to it.
7099 * util/update-grub.in: Handle multiple terminals depending on user
7100 input, platform availability and font file presence. Propagate
7101 variables of our findings to /etc/grub.d/ children.
7103 * util/grub.d/00_header.in: Handle multiple terminals, based on
7104 environment setup by update-grub.
7106 2007-06-23 Robert Millan <rmh@aybabtu.com>
7108 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
7110 2007-06-21 Robert Millan <rmh@aybabtu.com>
7112 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7113 indicate end of data section in kernel image.
7114 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7115 GRUB_KERNEL_MACHINE_DATA_END.
7117 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7119 * kern/i386/efi/startup.S: Likewise.
7121 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7122 during image generation. Implement --prefix option to override this
7124 * util/i386/efi/grub-mkimage.c: Likewise.
7126 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7127 code to make path relative to its root into a separate function.
7129 * util/i386/pc/grub-install.in: Use newly provided
7130 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7131 pass the result to grub-install --prefix.
7133 2007-06-13 Robert Millan <rmh@aybabtu.com>
7135 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7137 * util/grub-emu.c: Use above definitions from misc.h instead of
7139 * util/grub-mkdevicemap.c: Likewise.
7140 * util/i386/pc/grub-setup.c: Likewise.
7141 * util/grub-probe.c: Likewise.
7142 (probe): Abort with grub_util_error() when either
7143 grub_guess_root_device or grub_util_get_grub_dev fails.
7145 2007-06-12 Robert Millan <rmh@aybabtu.com>
7147 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7149 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7151 * util/grub-probe.c (probe): Likewise for "drive_name".
7153 2007-06-11 Robert Millan <rmh@aybabtu.com>
7155 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7156 not just the cdrom one.
7158 2007-06-11 Robert Millan <rmh@aybabtu.com>
7160 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7161 Add --pkglibdir=DIR option to override pkglibdir.
7162 Mention --image-type=TYPE in help output.
7163 Fix --grub-mkimage (it was a no-op).
7164 Abort gracefully when no parameter is given.
7166 2007-06-11 Robert Millan <rmh@aybabtu.com>
7168 * util/i386/pc/grub-mkrescue.in: New file.
7169 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7170 * Makefile.in: Handle bin_SCRIPTS.
7172 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7174 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7175 list of video modes.
7177 2007-06-06 Robert Millan <rmh@aybabtu.com>
7179 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7180 file doesn't exist, or if it is in a filesystem grub can't read.
7182 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7183 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7184 header comment to fit in 80 columns when the variables are resolved.
7186 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7187 could be identified by update-grub. Remove redundant check for
7188 unifont.pff existence (since convert_system_path_to_grub_path now
7191 2007-06-04 Robert Millan <rmh@aybabtu.com>
7193 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7195 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7197 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7199 2007-06-04 Robert Millan <rmh@aybabtu.com>
7201 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7203 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7204 grub_apple_partition_map_fini.
7207 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7208 to access >2 TiB disks).
7210 Print disk->total_sectors with %llu instead of %lu, since this
7211 variable is always 64-bit (prevents wrong disk size from being displayed
7212 on either >2 TiB disk or big-endian CPU).
7214 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7215 into a generic case that supports all (sane) partition maps.
7217 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7220 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7221 and grub_apple_partition_map_fini() after that.
7223 2007-06-01 Robert Millan <rmh@aybabtu.com>
7225 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7227 * util/grub.d/00_header.in: Only enable gfxterm when
7228 convert_system_path_to_grub_path() succeeds.
7230 2007-05-20 Robert Millan <rmh@aybabtu.com>
7232 * util/update-grub_lib.in: New file.
7233 * DISTLIST: Add update-grub_lib.in.
7234 * conf/common.rmk: Generate update-grub_lib and install it in
7236 * Makefile.in: Add install routine for $(lib_DATA).
7238 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7239 function provided by update-grub_lib to support arbitrary paths of
7241 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7242 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7244 2007-05-19 Robert Millan <rmh@aybabtu.com>
7246 * commands/i386/cpuid.c: New module.
7248 * conf/i386-efi.rmk: Enable cpuid.mod.
7249 * conf/i386-pc.rmk: Likewise.
7251 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7253 * kern/disk.c (grub_disk_read): Check return value of
7256 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7258 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7260 * disk/raid.c (grub_raid_open): Likewise.
7262 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7264 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7265 stack instead of on the heap.
7267 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7268 before doing a read on it.
7270 * configure.ac: Only use -fno-stack-protector for the target
7273 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7275 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7276 __attribute_ ((unused)) to mode_type argument.
7278 * util/getroot.c (grub_guess_root_device): Fix #endif.
7280 * kern/misc.c (memcmp): Fix prototype.
7282 * include/grub/partition.h [GRUB_UTIL]
7283 (grub_gpt_partition_map_init): Add prototype.
7284 (grub_gpt_partition_map_fini): Likewise.
7286 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7289 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7290 (grub_fat_read_data): Likewise.
7291 (grub_fat_find_dir): Likewise.
7293 * font/manager.c (find_glyph): Make table a const.
7294 (grub_font_get_glyph): Remove bitmap from if statement.
7296 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7298 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7299 code, first search for device in /dev/mapper, then in /dev.
7300 (grub_util_get_grub_dev): New function.
7301 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7303 * util/grub-probe.c (probe): Remove check for RAID, call
7304 grub_util_get_grub_dev() instead of
7305 grub_util_biosdisk_get_grub_dev().
7306 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7307 grub_util_biosdisk_get_grub_dev().
7308 * util/i386/pc/grub-setup.c (main): Likewise.
7310 2007-05-16 Robert Millan <rmh@aybabtu.com>
7312 * DISTLIST: Update for the latest changes.
7313 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7314 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7315 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7316 grub/util/biosdisk.h.
7317 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7318 grub/util/biosdisk.h.
7320 2007-05-16 Robert Millan <rmh@aybabtu.com>
7322 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7324 2007-05-16 Robert Millan <rmh@aybabtu.com>
7326 * util/i386/efi/grub-install.in: New.
7327 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7328 newly added grub-install.
7329 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7331 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7332 grub/util/biosdisk.h.
7333 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7334 grub/util/biosdisk.h.
7336 2007-05-16 Robert Millan <rmh@aybabtu.com>
7338 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7339 * include/grub/util/biosdisk.h: ... here.
7340 * util/i386/pc/biosdisk.c: Moved to ...
7341 * util/biosdisk.c: ... here.
7342 * util/i386/pc/getroot.c: Moved to ...
7343 * util/getroot.c: ... here.
7344 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7345 * util/grub-mkdevicemap.c: ... here.
7346 * util/i386/pc/grub-probe.c: Moved to ...
7347 * util/grub-probe.c: ... here.
7349 2007-05-15 Robert Millan <rmh@aybabtu.com>
7351 * util/update-grub.in: Remove duplicated line in grub.cfg header
7354 2007-05-13 Robert Millan <rmh@aybabtu.com>
7356 * util/update-grub.in: Fix a few assumptions about the devices holding
7357 /, /boot and /boot/grub being the same.
7358 * util/grub.d/00_header.in: Likewise.
7359 * util/grub.d/10_hurd.in: Likewise.
7360 * util/grub.d/10_linux.in: Likewise.
7362 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7363 patterns. Use that to define the `.old' suffix as older than `'.
7365 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7367 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7368 the grub.cfg header message.
7370 2007-05-11 Robert Millan <rmh@aybabtu.com>
7372 * util/update-grub.in: Create device.map if it doesn't already exist,
7373 before attempting to run grub-probe.
7374 Check for grub-probe and grub-mkdevicemap with the same code
7375 grub-install is using.
7378 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7380 * Makefile.in: Add the datarootdir autoconf variable.
7382 2007-05-09 Robert Millan <rmh@aybabtu.com>
7384 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
7385 fail gracefully if dev->disk->partition == NULL.
7387 2007-05-07 Robert Millan <rmh@aybabtu.com>
7389 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7390 determine partition map module.
7391 * util/i386/pc/grub-install.in: Use this feature to decide which
7392 partition module to load, instead of hardcoding pc and gpt.
7394 2007-05-07 Robert Millan <rmh@aybabtu.com>
7396 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7397 source directory differs from build directory.
7399 2007-05-05 Robert Millan <rmh@aybabtu.com>
7401 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7404 2007-05-05 Robert Millan <rmh@aybabtu.com>
7406 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7408 2007-05-05 Robert Millan <rmh@aybabtu.com>
7410 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7411 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7413 2007-05-05 Robert Millan <rmh@aybabtu.com>
7415 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7416 (grub_probe_SOURCES): Likewise.
7417 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7418 GPT and initialize dos_part and bsd_part accordingly.
7419 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7421 (main): Activate gpt module for use during partition identification,
7422 and deactivate it afterwards.
7423 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7424 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7425 partition identification, and deactivate it afterwards.
7427 2007-05-05 Robert Millan <rmh@aybabtu.com>
7429 * term/i386/pc/console.c (grub_console_fini): Call
7430 grub_term_set_current() before grub_term_unregister().
7432 2007-05-04 Robert Millan <rmh@aybabtu.com>
7434 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7435 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7436 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7437 and update-grub_DATA.
7438 * conf/common.rmk: Build and install update-grub components.
7439 * conf/common.mk: Regenerate.
7440 * util/update-grub.in: New. Core of update-grub.
7441 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7442 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7443 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7444 * util/grub.d/README: New. Document grub.d directory layout.
7446 2007-05-01 Robert Millan <rmh@aybabtu.com>
7448 * util/grub-emu.c: Move initialization functions
7449 grub_util_biosdisk_init() and grub_init_all() before
7450 grub_util_biosdisk_get_grub_dev(), which relies on them.
7452 2007-04-19 Robert Millan <rmh@aybabtu.com>
7454 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7457 2007-04-18 Jerone Young <jerone@gmail.com>
7459 * kernel/elf.c: Add missing parenthesis for conditional statement
7462 2007-04-10 Jerone Young <jerone@gmail.com>
7464 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7465 continue on and look for device node with real device name.
7467 2007-04-10 Jerone Young <jerone@gmail.com>
7469 * configure.ac: Add argument for autoconf to use transformation
7471 * Makefile.in: Add autoconf package transformation code.
7472 * util/i386/pc/grub-install.in: Likewise.
7473 * util/powerpc/ieee1275/grub-install.in: Likewise.
7475 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7477 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7478 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7479 (EXT2_REVISION): Likewise.
7480 (EXT2_INODE_SIZE): Likewise.
7481 (struct grub_ext2_block_group): Added a missing member
7483 (grub_ext2_read_inode): Divide by the inode size in a superblock
7484 instead of 128 to obtain INODES_PER_BLOCK.
7485 Use the macro EXT2_INODE_SIZE instead of directly using
7488 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7490 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7491 superblock instead of the structure size to compute an
7492 offset. This fixes the problem that GRUB could not read a
7493 filesystem when inode size is different from 128-byte.
7495 2007-03-05 Marco Gerards <marco@gnu.org>
7497 * normal/main.c (read_config_file): When "menu" is not set, create
7500 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7502 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7503 (HEAP_LIMIT): New macro.
7504 (grub_claim_heap): Claim memory up to `heaplimit'.
7506 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7508 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7509 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7511 (grub_arch_modules_addr): Return address after `_end'.
7512 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7513 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7514 (add_segments): Calculate `_end' from phdr size and location.
7515 (ALIGN_UP): Moved to ...
7516 * include/grub/misc.h: here.
7517 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7519 (GRUB_IEEE1275_MODULE_BASE): Removed.
7521 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7523 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7526 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7528 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7530 (grub_elf64_load_hook_t): Likewise.
7531 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7534 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7536 * kern/mm.c: Update copyright.
7537 (grub_mm_debug): Correct syntax error.
7538 (grub_mm_dump_free): New function.
7539 (grub_debug_free): Call `grub_free'.
7540 * include/grub/mm.h: Update copyright.
7541 (grub_mm_dump_free): Add declaration.
7543 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7545 * include/grub/ieee1275/ieee1275.h: Update copyright.
7546 * kern/powerpc/ieee1275/init.c: Likewise.
7547 * kern/powerpc/ieee1275/openfw.c: Likewise.
7549 * loader/powerpc/ieee1275/linux.c: Likewise.
7550 * include/grub/elfload.h: Likewise.
7551 * kern/elf.c: Likewise.
7552 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7554 (grub_elf64_load): Likewise.
7555 (grub_elf32_load_segment): Move to a nested function.
7556 (grub_elf64_load_segment): Likewise.
7558 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7560 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7562 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7563 (grub_heap_len): Likewise.
7564 (HEAP_SIZE): New macro.
7565 (grub_claim_heap): New function.
7566 (grub_machine_init): Don't claim heap directly. Call
7568 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7569 (grub_available_iterate): New function.
7571 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7573 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7574 * configure.ac: Use it for testing the HOST and TARGET compilers.
7576 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7578 * Makefile.in (enable_grub_emu): New variable.
7579 * configure.ac (--enable-grub-emu): New option.
7580 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7581 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7582 * conf/i386-pc.rmk: Likewise.
7583 * conf/powerpc-ieee1275.rmk: Likewise.
7584 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7586 2006-12-12 Marco Gerards <marco@gnu.org>
7588 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7590 * kern/env.c (grub_env_unset): Don't free the member `value' when
7591 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7594 * normal/main.c (current_menu): Removed.
7595 (free_menu): Unset the `menu' environment variable.
7596 (grub_normal_menu_addentry): Make use of the environment variable
7597 `menu', instead of using the global `current_menu'. Allocate
7598 memory for the sourcecode of this entry.
7599 (read_config_file): New argument `nested', changed all callers.
7600 Only in the case of a new context, initialize a new menu. Set the
7601 `menu' environment variable.
7602 (grub_normal_execute): Don't set and unset the environment
7603 variable `menu' here anymore. Only free the menu when leaving the
7606 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7609 2006-12-11 Marco Gerards <marco@gnu.org>
7611 * normal/menu_entry.c (run): Fix off by one bug so the last line
7612 is executed. Move the loader check to outside the loop.
7614 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7616 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7618 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7620 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7621 the number of sectors. Reported by Andrey Shuvikov
7622 <mr_hyro@yahoo.com>.
7624 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7626 * kern/disk.c (grub_disk_read): When there is a read error, always
7627 try to read only the necessary data.
7629 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7631 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7633 [GRUB_UTIL] (grub_raid_fini): Likewise.
7634 [GRUB_UTIL] (grub_lvm_init): Likewise.
7635 [GRUB_UTIL] (grub_lvm_fini): Likewise.
7636 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
7637 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
7638 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
7639 and grub_raid_fini().
7641 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7643 * include/grub/types.h (__unused): Rename to UNUSED.
7644 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
7645 (grub_elf64_size): Likewise.
7647 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7649 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7650 grub_error_push and grub_error_pop in the error-handling path.
7651 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7654 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7656 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7657 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7658 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7659 (kernel_elf_SOURCES): Likewise.
7660 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7661 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7662 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7663 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7664 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7665 (elf_mod_SOURCES): New variable.
7666 (elf_mod_CFLAGS): Likewise.
7667 (elf_mod_LDFLAGS): Likewise.
7668 * include/grub/types.h (__unused): New macro.
7669 * include/grub/elfload.h: New file.
7670 * kern/elf.c: Likewise.
7671 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7672 (ELF32_LOADMASK): New macro.
7673 (ELF64_LOADMASK): Likewise.
7675 (grub_linux_load32): New function.
7676 (grub_linux_load64): Likewise.
7677 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7678 Use grub_elf_t instead of grub_file_t.
7680 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7682 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7683 `catch_result' to struct set_color_args.
7685 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7687 * normal/menu.c: Include grub/script.h.
7688 * normal/menu_entry.c: Likewise.
7689 * include/grub/normal.h: Do not include grub/script.h.
7691 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7693 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7695 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7697 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7699 (grub_disk_close): Print debug messages when closing a disk.
7700 (grub_disk_read): Print debug messages when disk read fails.
7701 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7703 * kern/partition.c: Include misc.h.
7704 (grub_partition_iterate): Print debug messages when detecting
7707 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7709 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7711 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7713 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7715 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7716 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7718 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7720 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7721 instead of sizeof(lv). Patch by Michael Guntsche.
7723 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7725 * disk/lvm.c: Rename VGS to VG_LIST.
7726 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7727 (grub_lvm_open): Likewise.
7728 Thanks to Michael Guntsche for finding this bug.
7730 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7732 * configure.ac (AC_INIT): Bumped to 1.95.
7734 2006-10-14 Robert Millan <rmh@aybabtu.com>
7736 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7737 with "/dev/.static/dev/md".
7739 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7741 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7742 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7743 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7744 DRIVE_NAME are always freed.
7746 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7747 DOS_PART, as a DOS partition is counted from one instead of zero
7748 now. Reported by Robert Millan.
7750 2006-10-14 Robert Millan <rmh@aybabtu.com>
7752 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7753 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7754 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7755 string returned by grub_guess_root_device.
7756 * util/i386/pc/grub-setup.c: Likewise.
7757 * util/i386/pc/grub-probefs.c: Likewise.
7759 * util/i386/pc/grub-probefs.c: Rename to ...
7760 * util/i386/pc/grub-probe.c: ... this.
7761 * DISTLIST: Remove grub-probefs, add grub-probe.
7762 * conf/i386-efi.rmk: Likewise.
7763 * conf/i386-pc.rmk: Likewise.
7764 * util/i386/pc/grub-install.in: Likewise.
7766 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7767 choose which information we want to print.
7769 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7771 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7772 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7773 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7774 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7775 video/readers/tga.c and video/i386/pc/vbeutil.c.
7777 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7779 Added support for RAID and LVM.
7781 * disk/lvm.c: New file.
7782 * disk/raid.c: Likewise.
7783 * include/grub/lvm.h: Likewise.
7784 * include/grub/raid.h: Likewise.
7785 * include/grub/util/lvm.h: Likewise.
7786 * include/grub/util/raid.h: Likewise.
7787 * util/lvm.c: Likewise.
7788 * util/raid.c: Likewise.
7790 * include/grub/disk.h (grub_disk_dev_id): Add
7791 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7792 (grub_disk_get_size): New prototype.
7793 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7794 returns a partition.
7795 (grub_disk_get_size): New function.
7797 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7798 verbatim if grub_install_dos_part is -2.
7800 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7803 * util/i386/pc/grub-setup.c (setup): New argument
7804 MUST_EMBED. Force embedding of GRUB when the argument is
7805 true. Close FILE before returning.
7806 (main): Add support for RAID and LVM.
7808 * conf/common.rmk: Add RAID and LVM modules.
7809 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7811 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7813 * kern/misc.c (grub_strstr): New function.
7814 * include/grub/misc.h (grub_strstr): New prototype.
7816 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7818 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7820 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7822 * kern/misc.c (grub_strtoull): Guess the base only if not
7825 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7827 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7830 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7832 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7834 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7835 Remove `flags' argument. All callers changed.
7836 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7837 (IEEE1275_IHANDLE_INVALID): New variable.
7838 (IEEE1275_CELL_INVALID): New variable.
7839 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7840 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7841 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7842 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7843 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7844 codes from Open Firmware. All callers updated.
7845 (grub_ieee1275_next_property): Directly return Open Firmware return
7847 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7848 Standardize error checking from `grub_ieee1275_get_property'.
7849 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7850 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7852 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7854 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7855 `instance_to_package_args' to `instance_to_path_args'.
7857 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7858 `grub_ieee1275_chosen'.
7860 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7861 `grub_ieee1275_interpret'.
7863 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7865 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7867 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7869 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7870 (__cmpdi): Likewise.
7872 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7873 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7876 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7878 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7879 to type `grub_ssize_t'.
7880 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7882 2006-09-22 Marco Gerards <marco@gnu.org>
7884 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7887 2006-09-22 Marco Gerards <marco@gnu.org>
7889 * commands/echo.c: New file.
7891 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7893 * conf/common.rmk (echo_mod_SOURCES): New variable.
7894 (echo_mod_CFLAGS): Likewise.
7895 (echo_mod_LDFLAGS): Likewise.
7897 2006-09-22 Marco Gerards <marco@gnu.org>
7899 * normal/main.c (get_line): Malloc memory instead of using
7900 preallocated memory. Removed the arguments `cmdline' and
7901 `max_len'. Updated all callers.
7903 2006-09-22 Marco Gerards <marco@gnu.org>
7905 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7906 (normal_mod_DEPENDENCIES): Likewise.
7908 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7909 (normal_mod_DEPENDENCIES): Likewise.
7911 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7913 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
7915 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7917 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7918 (normal_mod_DEPENDENCIES): Likewise.
7919 * conf/i386-pc.mk: Regenerate.
7920 * conf/i386-efi.mk: Likewise
7921 * conf/common.mk: Likewise.
7922 * conf/powerpc-ieee1275.mk: Likewise.
7923 * conf/sparc64-ieee1275.mk: Likewise.
7925 2006-09-22 Robert Millan <rmh@aybabtu.com>
7927 Sync with i386 version.
7928 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7929 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7931 2006-09-21 Robert Millan <rmh@aybabtu.com>
7933 Import from GRUB Legacy (lib/device.c):
7934 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7935 (init_device_map) [__linux__]: Add support for I2O devices.
7937 2006-09-14 Marco Gerards <marco@gnu.org>
7939 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7942 2006-09-14 Robert Millan <rmh@aybabtu.com>
7944 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7947 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7949 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7950 before adding it to device.map.
7952 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
7954 * genmk.rb: Let GCC generate dependencies the first time it
7955 compiles a file; using the -MD option.
7956 * conf/common.mk: Regenerate.
7957 * conf/i386-pc.mk: Likewise.
7958 * conf/i386-efi.mk: Likewise.
7959 * conf/powerpc-ieee1275.mk: Likewise.
7960 * conf/sparc64-ieee1275.mk: Likewise.
7962 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7964 Move the prototypes of grub_setjmp and grub_longjmp to
7965 cpu/setjmp.h, so that each architecture may specify different
7968 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7969 (grub_longjmp): Likewise.
7970 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7971 (grub_longjmp): Likewise.
7972 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7973 (grub_longjmp): Likewise.
7975 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7976 [!GRUB_UTIL] (grub_longjmp): Removed.
7978 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7980 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7981 "color!" method does not return any value.
7983 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7985 * include/grub/bitmap.h: New file.
7987 * include/grub/i386/pc/vbeutil.h: Likewise.
7989 * video/bitmap.c: Likewise.
7991 * video/readers/tga.c: Likewise.
7993 * video/i386/pc/vbeutil.c: Likewise.
7995 * commands/videotest.c: Code cleanup and updated to reflect to new
7998 * term/gfxterm.c: Likewise.
8000 * video/video.c: Likewise.
8002 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8003 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8004 (bitmap_mod_SOURCES): New entry.
8005 (bitmap_mod_CFLAGS): Likewise.
8006 (bitmap_mod_LDFLAGS): Likewise.
8007 (tga_mod_SOURCES): Likewise.
8008 (tga_mod_CFLAGS): Likewise.
8009 (tga_mod_LDFLAGS): Likewise.
8011 * include/grub/video.h (grub_video_blit_operators): New enum type.
8012 (grub_video_render_target): Changed as forward declaration and moved
8013 actual definition to be video driver specific.
8014 (grub_video_adapter.blit_bitmap): Added blitting operator.
8015 (grub_video_adapter.blit_render_target): Likewise.
8016 (grub_video_blit_bitmap): Likewise.
8017 (grub_video_blit_render_target): Likewise.
8019 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8020 driver specific render target definition.
8021 (grub_video_vbe_map_rgba): Added driver internal helper.
8022 (grub_video_vbe_unmap_color): Updated to use
8023 grub_video_i386_vbeblit_info.
8024 (grub_video_vbe_get_video_ptr): Likewise.
8026 * include/grub/i386/pc/vbeblit.h
8027 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8028 grub_video_i386_vbeblit_info.
8029 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8030 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8031 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8032 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8033 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8034 (grub_video_i386_vbeblit_index_index): Likewise.
8035 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8036 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8037 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8038 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8040 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8043 * video/i386/pc/vbeblit.c: Updated to reflect changes on
8044 include/grub/i386/pc/vbeblit.h.
8046 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8047 Updated to use grub_video_i386_vbeblit_info.
8048 (grub_video_i386_vbefill_R8G8B8): Likewise.
8049 (grub_video_i386_vbefill_index): Likewise.
8050 (grub_video_i386_vbefill): Added generic filler.
8052 * video/i386/pc/vbefill.c: Updated to reflect changes on
8053 include/grub/i386/pc/vbefill.h.
8055 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8056 grub_video_i386_vbeblit_info.
8057 (grub_video_vbe_unmap_color): Likewise.
8058 (grub_video_vbe_blit_glyph): Likewise.
8059 (grub_video_vbe_scroll): Likewise.
8060 (grub_video_vbe_draw_pixel): Removed function.
8061 (grub_video_vbe_get_pixel): Likewise.
8062 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8063 updated code to use it.
8064 (common_blitter): Added common blitter for render target and bitmap.
8065 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8066 (grub_video_vbe_blit_render_target): Likewise.
8068 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
8070 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8071 is in text mode if there is no console control protocol instance
8074 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8076 * include/grub/video.h: Code cleanup.
8078 * include/grub/i386/pc/vbe.h: Likewise.
8080 * video/i386/pc/vbe.c: Likewise.
8082 * video/i386/pc/vbeblit.c: Likewise.
8084 * video/i386/pc/vbefill.c: Likewise.
8086 * video/video.c: Likewise. Also added more comments.
8088 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8090 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8091 (struct grub_biosdisk_dap): Likewise.
8093 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
8094 linkage settings for all functions.
8096 2006-07-12 Marco Gerards <marco@gnu.org>
8098 * configure.ac (--enable-mm-debug): Fix typo.
8100 * genkernsyms.sh.in: Use proper quoting for `CC'.
8102 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8104 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8105 (normal_mod_ASFLAGS): Remove "-m32".
8107 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8109 * util/misc.c: Include config.h.
8110 [!HAVE_MEMALIGN]: Do not include malloc.h.
8111 (grub_memalign): Use posix_memalign, if present. Then, use
8112 memalign, if present. Otherwise, emit an error.
8114 * util/grub-emu.c: Do not include malloc.h.
8116 * include/grub/util/misc.h: Include unistd.h. This is required for
8117 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8118 D. Eades III <hde@foobar-qux.org>.
8120 * configure.ac (AC_GNU_SOURCE): Added.
8121 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8124 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8126 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8127 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8129 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8131 * include/grub/types.h (grub_host_addr_t): Rename to
8133 (grub_host_off_t): Rename to grub_target_off_t.
8134 (grub_host_size_t): Rename to grub_target_size_t.
8135 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8136 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8138 * include/grub/kernel.h (struct grub_module_header): Change type
8139 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8140 (grub_module_info): Likewise.
8142 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8144 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8145 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8146 Velazquez <jesus.velazquez@gmail.com>.
8148 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8150 Count partitions from 1 instead of 0 in the string representation
8151 of partitions. Still use 0-based internally.
8153 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8154 (sun_partition_map_iterate): Use grub_partition_t instead of
8155 struct grub_partition *. Cast DESC->START_CYLINDER to
8156 grub_uint64_t after converting the endian.
8157 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8158 (sun_partition_map_get_name): Add 1 to P->INDEX.
8160 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8162 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8164 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8165 zero instead of one.
8166 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8167 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8169 * partmap/apple.c (apple_partition_map_iterate): Change the type
8171 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8172 (apple_partition_map_get_name): Add 1 into P->INDEX.
8174 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8176 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8177 calculate the offset of a partition.
8178 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8179 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8181 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8182 SECTOR to grub_disk_addr_t.
8183 (acorn_partition_map_iterate): Likewise.
8184 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8185 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8187 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8189 * kern/i386/pc/init.c (make_install_device): Add 1 into
8190 GRUB_INSTALL_DOS_PART.
8192 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8195 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8197 Clean up the code to support 64-bit addressing in disks and
8198 files. This change is not enough for filesystems yet.
8200 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8201 type of "start" to grub_uint64_t.
8202 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8203 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8204 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8207 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8208 to grub_disk_addr_t.
8210 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8213 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8215 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8218 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8220 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8222 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8224 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8225 to grub_off_t, to detect an error from grub_file_seek.
8226 (grub_multiboot_load_elf32): Likewise.
8228 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8229 maximum unsigned long value when an overflow is detected.
8230 (grub_strtoull): New function.
8231 (grub_divmod64): Likewise.
8232 (grub_lltoa): use grub_divmod64.
8234 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8236 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8237 the pointer to next character. Use grub_strtoull instead of
8239 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8240 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8243 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
8244 return value is signed.
8245 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8246 test if OFFSET is less than zero, as OFFSET is unsigned now.
8248 * kern/disk.c (struct grub_disk_cache): Change the type of
8249 "sector" to grub_disk_addr_t.
8250 (grub_disk_cache_get_index): Change the type of SECTOR to
8251 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8252 unsigned after shifting.
8253 (grub_disk_cache_invalidate): Change the type of SECTOR to
8255 (grub_disk_cache_unlock): Likewise.
8256 (grub_disk_cache_store): Likewise.
8257 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8258 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8259 grub_disk_addr_t and grub_uint64_t, respectively.
8260 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8261 body, as the value of OFFSET is tweaked by
8262 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8263 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8265 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8266 body, as the value of OFFSET is tweaked by
8267 grub_disk_check_range. Change the types of LEN and N to
8270 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8271 and "saved_offset" to grub_off_t.
8272 (test_header): Cast BUF to char *.
8273 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8275 (grub_gzio_read): Change the types of OFFSET and SIZE to
8276 grub_off_t and grub_size_t, respectively.
8278 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8280 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8281 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8282 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8283 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8284 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8286 * include/grub/types.h (grub_off_t): Unconditionally set to
8288 (grub_disk_addr_t): Changed to grub_uint64_t.
8290 * include/grub/partition.h (struct grub_partition): Change the
8291 types of "start", "len" and "offset" to grub_disk_addr_t,
8292 grub_uint64_t and grub_disk_addr_t, respectively.
8293 (grub_partition_get_start): Return grub_disk_addr_t.
8294 (grub_partition_get_len): Return grub_uint64_t.
8296 * include/grub/misc.h (grub_strtoull): New prototype.
8297 (grub_divmod64): Likewise.
8299 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8300 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8301 grub_off_t, respectively.
8302 All callers and references changed.
8304 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8305 grub_size_t in "read".
8306 All callers and references changed.
8308 * include/grub/file.h (struct grub_file): Change the types of
8309 "offset" and "size" to grub_off_t and grub_off_t,
8310 respectively. Change the type of SECTOR to grub_disk_addr_t in
8312 (grub_file_read): Change the type of LEN to grub_size_t.
8313 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8315 (grub_file_size): Return grub_off_t.
8316 (grub_file_tell): Likewise.
8317 All callers and references changed.
8319 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8320 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8322 (struct grub_disk): Change the type of "total_sectors" to
8323 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
8325 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8326 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8327 (grub_disk_write): Likewise.
8328 All callers and references changed.
8330 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8331 char * for grub_strncmp to silence gcc.
8332 (grub_iso9660_mount): Likewise.
8333 (grub_iso9660_mount): Likewise.
8334 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8336 (grub_iso9660_iterate_dir): Likewise.
8337 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8339 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8340 LEN to grub_disk_addr_t and grub_size_t, respectively.
8342 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8344 * fs/jfs.c (grub_jfs_read_file): Likewise.
8346 * fs/minix.c (grub_jfs_read_file): Likewise.
8348 * fs/sfs.c (grub_jfs_read_file): Likewise.
8350 * fs/ufs.c (grub_jfs_read_file): Likewise.
8352 * fs/xfs.c (grub_jfs_read_file): Likewise.
8354 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8355 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8358 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8359 BLKNR to -1 instead of returning GRUB_ERRNO.
8360 (grub_ext2_read_file): Change the types of SECTOR and
8361 LEN to grub_disk_addr_t and grub_size_t, respectively.
8363 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8364 LEN to grub_disk_addr_t and grub_size_t, respectively.
8366 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8369 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8370 string. Do not cast SECTOR explicitly.
8372 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8373 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8374 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8375 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8376 over 2TB and LBA mode is not supported, raise an error.
8377 (get_safe_sectors): New function.
8378 (grub_biosdisk_read): Use get_safe_sectors.
8379 (grub_biosdisk_write): Likewise.
8381 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8382 (grub_efidisk_write): Likewise.
8384 * disk/loopback.c (delete_loopback): Cosmetic changes.
8385 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8387 (grub_loopback_open): Likewise.
8388 (grub_loopback_read): Likewise. Also, change the type of POS to
8389 grub_off_t, and fix the usage of grub_memset.
8391 * commands/i386/pc/play.c: Include grub/machine/time.h.
8393 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8396 * commands/configfile.c: Include grub/env.h.
8398 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8399 GRUB_ERRNO directly instead. Change the type of POS to
8400 grub_off_t. Follow the coding standard.
8402 * commands/blocklist.c: Include grub/partition.h.
8403 (grub_cmd_blocklist): Return an error if the underlying device is
8404 not a disk. Take the starting sector of a partition into account,
8405 if a partition is used.
8407 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8409 (lba_mode): Support 64-bit addresses.
8410 (chs_mode): Likewise.
8411 (copy_buffer): Adapted to the new offsets of a length field and a
8413 (blocklist_default_start): Allocate 64-bit space.
8415 * boot/i386/pc/boot.S (force_lba): Removed.
8416 (boot_drive): Moved to under KERNEL_SECTOR.
8417 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
8419 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8421 (lba_mode): Refactored to support a 64-bit address. More size
8423 (setup_sectors): Likewise.
8425 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8427 * DISTLIST: Added include/grub/i386/linux.h. Removed
8428 include/grub/i386/pc/linux.h
8430 * configure.ac (AC_INIT): Bumped to 1.94.
8432 * config.guess: Updated from gnulib.
8433 * config.sub: Likewise.
8434 * install-sh: Likewise.
8435 * mkinstalldirs: Likewise.
8437 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8439 * conf/common.rmk (grub_modules_init.lst): Depended on
8440 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8443 * genmk.rb (PModule::rule): Reverted the previous change.
8445 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8447 * conf/common.rmk (grub_modules_init.lst): Depends on
8448 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8449 that the target does not exist before producing.
8450 (grub_modules_init.h): Remove the target before generating.
8451 (grub_emu_init.c): Likewise.
8453 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8455 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8457 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8458 for the target-specific tests. Make sure that we also have the
8459 up-to-date target variables for those tests.
8461 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8463 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8464 (PModule::rule): Likewise.
8466 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8468 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8469 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8470 target-specific flags should be prefixed.
8471 (PModule::rule): Likewise.
8473 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8475 * configure.ac (CMP): Check if cmp is available explicitly.
8477 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8479 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8480 (target_cpu): New variable.
8481 (pkglibdir): Use target_cpu instead of host_cpu.
8483 * util/i386/pc/grub-install.in (host_cpu): Removed.
8484 (target_cpu): New variable.
8485 (pkglibdir): Use target_cpu instead of host_cpu.
8487 * util/genmoddep.c: Removed.
8489 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8490 instead of GRUB_HOST_SIZEOF_VOID_P.
8491 * kern/dl.c: Likewise.
8493 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8495 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8496 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8497 (GRUB_TARGET_SIZEOF_LONG): ... this.
8498 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8499 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8500 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8502 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8503 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8504 (GRUB_TARGET_SIZEOF_LONG): ... this.
8505 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8506 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8507 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8509 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8510 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8511 (GRUB_TARGET_SIZEOF_LONG): ... this.
8512 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8513 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8515 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8516 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8517 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8518 instead of GRUB_HOST_SIZEOF_LONG.
8519 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8520 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8521 GRUB_CPU_WORDS_BIGENDIAN.
8522 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8523 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8526 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8527 (genmoddep_SOURCES): Likewise.
8528 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8529 (genmoddep_SOURCES): Likewise.
8530 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8531 (genmoddep_SOURCES): Likewise.
8532 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8534 (genmoddep_SOURCES): Likewise.
8536 * genmoddep.awk: New file.
8538 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8539 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8540 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8541 (PModule::rule): Likewise.
8542 (Program::rule): Likewise.
8543 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8544 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8547 * configure.ac: Rewritten intensively to use host and target
8548 instead of build and host, respectively.
8550 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8551 (host_cpu): Removed.
8552 (target_cpu): New variable.
8553 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8554 (BUILD_CC): Removed.
8555 (BUILD_CFLAGS): Likewise.
8556 (BUILD_CPPFLAGS): Likewise.
8557 (TARGET_CC): New variable.
8558 (TARGET_CFLAGS): Likewise.
8559 (TARGET_CPPFLAGS): Likewise.
8560 (TARGET_LDFLAGS): Likewise.
8562 (include): Use target_cpu instead of host_cpu.
8563 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
8565 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8567 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8569 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8570 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8571 field 'false' to 'exec_on_false'.
8572 (grub_script_create_cmdif): Renamed argument names to reflect above
8575 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8577 * normal/script.c (grub_script_create_cmdif): Likewise.
8579 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8581 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8583 (grub_hfsplus_btree_recptr): Likewise.
8584 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8585 FILEBLOCK both to pass a block number and store next block
8587 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8588 overflow file correctly. Specify errors appropriately, because
8589 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8590 grub_hfsplus_btree_recptr to get the pointer to a found key.
8591 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8594 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8596 (_linux_mod_SOURCES): New variable.
8597 (_linux_mod_CFLAGS): Likewise.
8598 (_linux_mod_LDFLAGS): Likewise.
8599 (linux_mod_SOURCES): Likewise.
8600 (linux_mod_CFLAGS): Likewise.
8601 (linux_mod_LDFLAGS): Likewise.
8603 * DISTLIST: Added loader/i386/efi/linux.c,
8604 loader/i386/efi/linux_normal.c and
8605 include/grub/i386/efi/loader.h.
8607 * loader/i386/efi/linux.c: New file.
8608 * loader/i386/efi/linux_normal.c: Likewise.
8609 * include/grub/i386/efi/loader.h: Likewise.
8611 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8613 * commands/blocklist.c: New file.
8615 * DISTLIST: Added commands/blocklist.c.
8617 * term/efi/console.c (grub_console_highlight_color): Use a lighter
8618 color for the background, and a darker color for the foreground.
8619 (grub_console_checkkey): Return READ_KEY.
8620 (grub_console_cls): Set the background to
8621 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8623 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8625 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8626 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8628 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8631 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8632 BG. The spec is wrong again.
8634 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8636 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
8638 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8639 commands/blocklist.c.
8640 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8642 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
8643 (blocklist_mod_SOURCES): New variable.
8644 (blocklist_mod_CFLAGS): Likewise.
8645 (blocklist_mod_LDFLAGS): Likewise.
8647 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8649 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8651 (lba_mode): Use %eax more intensively to reduce the code size.
8653 2006-05-20 Marco Gerards <marco@gnu.org>
8655 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8657 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8659 (script): Accept leading newlines.
8660 (newlines): New rule to describe 0 or more newlines.
8661 (commands): Accept `command' with trailing newline. Fixed the
8662 order in which arguments were passed to `grub_script_add_cmd'.
8663 Accept commands separated by newlines.
8664 (function): Changed to accept newlines.
8665 (menuentry) Rewritten.
8667 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8668 front of the list, instead of to the end.
8670 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8672 * util/i386/pc/grub-install.in (bindir): New variable.
8673 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8674 Shaver <lbgwjl@gmail.com>.
8676 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8678 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8679 grub/machine/linux.h
8680 * loader/i386/pc/linux.c: Likewise.
8682 * include/grub/i386/pc/linux.h: Moved to ...
8683 * include/grub/i386/linux.h: ... here.
8685 * include/grub/i386/linux.h (struct linux_kernel_params): New
8688 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8690 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8692 (grub_video_vbe_blit_glyph): Likewise.
8693 (grub_video_vbe_blit_bitmap): Likewise.
8694 (grub_video_vbe_blit_render_target): Likewise.
8696 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8698 * configure.ac (--with-platform): Properly quote the square
8701 2006-05-08 Marco Gerards <marco@gnu.org>
8703 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8705 (kernel_elf_HEADERS): ...to this. Updated all users.
8706 (grubof_symlist.c): Renamed from this...
8707 (kernel_elf_symlist.c): ...to this. Updated all users.
8708 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8709 (grubof_SOURCES): Renamed from this...
8710 (kernel_elf_SOURCES): ...to this.
8711 (grubof_HEADERS): Renamed from this...
8712 (kernel_elf_HEADERS): ...to this.
8713 (grubof_CFLAGS): Renamed from this...
8714 (kernel_elf_CFLAGS): ...to this.
8715 (grubof_ASFLAGS): Renamed from this...
8716 (kernel_elf_ASFLAGS): ...to this.
8717 (grubof_LDFLAGS): Renamed from this...
8718 (kernel_elf_LDFLAGS): ...to this.
8720 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8722 (kernel_elf_HEADERS): ...to this. Updated all users.
8723 (grubof_symlist.c): Renamed from this...
8724 (kernel_elf_symlist.c): ...to this. Updated all users.
8725 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8726 (grubof_SOURCES): Renamed from this...
8727 (kernel_elf_SOURCES): ...to this.
8728 (grubof_HEADERS): Renamed from this...
8729 (kernel_elf_HEADERS): ...to this.
8730 (grubof_CFLAGS): Renamed from this...
8731 (kernel_elf_CFLAGS): ...to this.
8732 (grubof_ASFLAGS): Renamed from this...
8733 (kernel_elf_ASFLAGS): ...to this.
8734 (grubof_LDFLAGS): Renamed from this...
8735 (kernel_elf_LDFLAGS): ...to this.
8737 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8738 `kernel.elf' instead of `grubof'.
8740 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8742 Add --with-platform to configure. Use pkglibdir instead of
8743 pkgdatadir. This is reported by Roger Leigh.
8745 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8746 (host_vendor): Likewise.
8747 (host_os): Likewise.
8748 (pkgdatadir): Likewise.
8749 (platform): New variable.
8750 (pkglibdir): Likewise.
8751 Use PKGLIBDIR instead of PKGDATADIR.
8753 * util/i386/pc/grub-install.in (datadir): Removed.
8754 (host_vendor): Likewise.
8755 (host_os): Likewise.
8756 (pkgdatadir): Likewise.
8757 (platform): New variable.
8758 (pkglibdir): Likewise.
8759 Use PKGLIBDIR instead of PKGDATADIR.
8761 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8762 instead of GRUB_DATADIR.
8764 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8766 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8769 * configure.ac (--with-platform): New option.
8770 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8772 * Makefile.in: Include a makefile based on PLATFORM instead of
8774 (pkgdatadir): Not appended by the machine type.
8775 (pkglibdir): Appended by the machine type.
8776 (host_vendor): Removed.
8777 (platform): New variable.
8778 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8779 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8780 (uninstall): Likewise.
8782 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8784 Use the environment context in the menu. Remove the commands
8785 "default" and "timeout", and use variables instead.
8787 * normal/menu.c: Include grub/env.h.
8788 (print_entry): Cast TITLE to silence gcc.
8789 (get_timeout): New function.
8790 (set_timeout): Likewise.
8791 (get_entry_number): Likewise.
8792 (run_menu): Use a default entry, a fallback entry and a timeout
8793 in the environment variables "default", "fallback" and
8794 "timeout". Also, tweak the default entry if it is not within the
8795 current menu entries.
8796 (grub_menu_run): Use a fallback entry in the environment variable
8799 * normal/main.c (read_config_file): Do not initialize
8800 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8802 (grub_normal_execute): Use a data slot to store the menu.
8804 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8805 fallback_entry and timeout.
8806 (struct grub_menu_list): Removed.
8807 (grub_menu_list_t): Likewise.
8808 (struct grub_context): Likewise.
8809 (grub_context_t): Likewise.
8810 (grub_context_get): Likewise.
8811 (grub_context_get_current_menu): Likewise.
8812 (grub_context_push_menu): Likewise.
8813 (grub_context_pop_menu): Likewise.
8814 (grub_default_init): Likewise.
8815 (grub_default_fini): Likewise.
8816 (grub_timeout_init): Likewise.
8817 (grub_timeout_fini): Likewise.
8819 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8821 (normal_mod_SOURCES): Removed normal/context.c.
8823 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8824 commands/default.c, commands/timeout.c and normal/context.c.
8825 (normal_mod_SOURCES): Removed normal/context.c.
8827 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8828 commands/timeout.c and normal/context.c.
8829 (normal_mod_SOURCES): Removed normal/context.c.
8831 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8832 commands/default.c, commands/timeout.c and normal/context.c.
8833 (normal_mod_SOURCES): Removed normal/context.c.
8835 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8837 (default_mod_SOURCES): Removed.
8838 (default_mod_CFLAGS): Likewise.
8839 (default_mod_LDFLAGS): Likewise.
8840 (timeout_mod_SOURCES): Removed.
8841 (timeout_mod_CFLAGS): Likewise.
8842 (timeout_mod_LDFLAGS): Likewise.
8844 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8847 * commands/default.c: Removed.
8848 * commands/timeout.c: Likewise.
8849 * normal/context.c: Likewise.
8851 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8853 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8855 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8857 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8858 "next" to "prev" for readability.
8859 (struct grub_env_sorted_var): New struct.
8860 (grub_env_context): Renamed to ...
8861 (initial_context): ... this.
8862 (grub_env_var_context): Renamed to ...
8863 (current_context): ... this.
8864 (grub_env_find): Look only at CURRENT_CONTEXT.
8865 (grub_env_context_open): Rewritten to copy exported variables from
8867 (grub_env_context_close): Rewritten according to the new
8868 scheme. Also, add an assertion to prevent the initial context from
8870 (grub_env_insert): Removed the code for the sorted list.
8871 (grub_env_remove): Likewise.
8872 (grub_env_export): Simply mark the variable with
8873 GRUB_ENV_VAR_GLOBAL.
8874 (grub_env_set): A cosmetic change for naming consistency.
8875 (grub_env_get): Likewise.
8876 (grub_env_unset): Likewise.
8877 (grub_env_iterate): Rewritten to sort variables within this
8879 (grub_register_variable_hook): Fixed for naming consistency. Call
8880 grub_env_find again, only if NAME is not found at the first time.
8881 (mangle_data_slot_name): New function.
8882 (grub_env_set_data_slot): Likewise.
8883 (grub_env_get_data_slot): Likewise.
8884 (grub_env_unset_data_slot): Likewise.
8886 * include/grub/env.h (grub_env_var_type): New enum.
8887 (GRUB_ENV_VAR_LOCAL): New constant.
8888 (GRUB_ENV_VAR_GLOBAL): Likewise.
8889 (GRUB_ENV_VAR_DATA): Likewise.
8890 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8892 (grub_env_set): Replace VAR with NAME for consistency.
8893 (grub_register_variable_hook): Likewise.
8894 (grub_env_export): Specify the name of the argument.
8895 (grub_env_set_data_slot): New prototype.
8896 (grub_env_get_data_slot): Likewise.
8897 (grub_env_unset_data_slot): Likewise.
8899 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8901 Extend the loader so that GRUB can accept a loader which comes
8902 back to GRUB when a loaded image exits. Also, this change adds
8903 support for a chainloader on EFI.
8905 * term/efi/console.c: Include grub/misc.h.
8906 (grub_console_checkkey): Display a scan code on the top for
8907 debugging. This will be removed once the EFI port gets stable.
8908 Correct the scan code mapping.
8910 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8911 allocate memory from larger regions, in order to reduce the number
8912 of allocated regions. Otherwise, the MacOSX loader panics.
8913 (filter_memory_map): Avoid less than 1MB for compatibility with
8915 (add_memory_regions): Allocate from the tail of a region, if
8916 possible, to avoid allocating a region near to 1MB, for the MacOSX
8919 * kern/efi/init.c (grub_efi_set_prefix): Specify
8920 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8922 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8923 argument IMAGE_HANDLE and specify it to get a loaded image.
8924 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8925 grub_efi_get_loaded_image.
8926 (grub_efi_get_filename): Divide the length by the size of
8928 (grub_efi_get_device_path): New function.
8929 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8930 the length by the size of grub_efi_char16_t for a file path device
8933 * kern/loader.c (grub_loader_noreturn): New variable.
8934 (grub_loader_set): Accept a new argument NORETURN. Set
8935 GRUB_LOADER_NORETURN to NORETURN.
8936 All callers changed.
8937 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8940 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8942 (grub_efi_get_loaded_image): Take an argument to specify an image
8945 * include/grub/loader.h (grub_loader_set): Added one more argument
8948 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8949 instead of grub_efi_open_protocol.
8950 (grub_efidisk_get_device_name): Likewise.
8951 (grub_efidisk_close): Print a newline.
8952 (grub_efidisk_get_device_handle): Fixed to use
8953 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8954 GRUB_EFI_DEVICE_PATH_TYPE.
8956 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8957 * kern/efi/efi.c (device_path_guid): ... here.
8959 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8961 (kernel_mod_HEADERS): Added efi/disk.h.
8962 (_chain_mod_SOURCES): New variable.
8963 (_chain_mod_CFLAGS): Likewise.
8964 (_chain_mod_LDFLAGS): Likewise.
8965 (chain_mod_SOURCES): Likewise.
8966 (chain_mod_CFLAGS): Likewise.
8967 (chain_mod_LDFLAGS): Likewise.
8969 * DISTLIST: Added include/grub/efi/chainloader.h,
8970 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8972 * include/grub/efi/chainloader.h: New file.
8973 * loader/efi/chainloader.c: Likewise.
8974 * loader/efi/chainloader_normal.c: Likewise.
8976 2006-04-30 Marco Gerards <marco@gnu.org>
8978 * commands/configfile.c (grub_cmd_source): New function.
8979 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8980 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8982 2006-04-30 Marco Gerards <marco@gnu.org>
8984 * normal/execute.c (grub_script_execute_cmd): Change the return
8985 type to `grub_err_t'. Correctly return the error.
8986 (grub_script_execute_cmdline): In case a command line is not a
8987 command or a function, try to interpret it as an assignment.
8989 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8991 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8992 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8993 skip a node whose name is obviously invalid as UTF-16,
8994 i.e. contains a NUL character. Stop the iteration when the last
8995 directory entry is found. Instead of using the return value of
8996 grub_hfsplus_btree_iterate_node, store the value in RET and use
8997 it, because the iterator can be stopped by the last directory
9000 2006-04-30 Marco Gerards <marco@gnu.org>
9002 * include/grub/env.h (grub_env_export): New prototype. Reported
9003 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9005 2006-04-30 Marco Gerards <marco@gnu.org>
9007 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9008 size of the extents in a catalog file record.
9010 2006-04-29 Marco Gerards <marco@gnu.org>
9012 * commands/configfile.c (grub_cmd_configfile): Execute the
9013 configfile within its own context.
9015 * include/grub/env.h (grub_env_context_open): New prototype.
9016 (grub_env_context_close): Likewise.
9018 * kern/env.c (grub_env): Removed.
9019 (grub_env_sorted): Likewise.
9020 (grub_env_context): New variable.
9021 (grub_env_var_context): Likewise.
9022 (grub_env_find): Search both the active context and the global
9024 (grub_env_context_open): New function.
9025 (grub_env_context_close): Likewise.
9026 (grub_env_insert): Likewise.
9027 (grub_env_remove): Likewise.
9028 (grub_env_export): Likewise.
9029 (grub_env_set): Changed to use helper functions to avoid code
9031 (grub_env_iterate): Rewritten so both the current context and the
9032 global context are being used.
9034 * normal/command.c (export_command): New function.
9035 (grub_command_init): Register the `export' function.
9037 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
9039 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9040 explicitly to suppress gcc's warnings.
9041 * fs/fat.c (grub_fat_find_dir): Likewise.
9042 (grub_fat_label): Likewise.
9043 * fs/xfs.c (grub_xfs_read_inode): Likewise.
9044 (grub_xfs_mount): Likewise.
9045 (grub_xfs_label): Likewise.
9046 * fs/affs.c (grub_affs_mount): Likewise.
9047 (grub_affs_label): Likewise.
9048 (grub_affs_iterate_dir): Likewise.
9049 * fs/sfs.c (grub_sfs_mount): Likewise.
9050 (grub_sfs_iterate_dir): Likewise.
9051 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9052 * fs/hfs.c (grub_hfs_mount): Likewise.
9053 (grub_hfs_cmp_catkeys): Likewise.
9054 (grub_hfs_find_dir): Likewise.
9055 (grub_hfs_dir): Likewise.
9056 (grub_hfs_label): Likewise.
9057 * fs/jfs.c (grub_jfs_mount): Likewise.
9058 (grub_jfs_opendir): Likewise.
9059 (grub_jfs_getent): Likewise.
9060 (grub_jfs_lookup_symlink): Likewise.
9061 (grub_jfs_label): Likewise.
9062 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9063 (grub_hfsplus_iterate_dir): Likewise.
9064 (grub_hfsplus_btree_iterate_node): Made static.
9066 * util/grub-emu.c (prefix): New variable.
9067 (grub_machine_set_prefix): New function.
9068 (main): Do not set the environment variable "prefix" here. Only
9069 set PREFIX, which is used later by grub_machine_set_prefix.
9071 * include/grub/video.h: Do not include grub/symbol.h.
9072 (grub_video_register): Not exported. This symbol is not defined in
9074 (grub_video_unregister): Likewise.
9075 (grub_video_iterate): Likewise.
9076 (grub_video_setup): Likewise.
9077 (grub_video_restore): Likewise.
9078 (grub_video_get_info): Likewise.
9079 (grub_video_get_blit_format): Likewise.
9080 (grub_video_set_palette): Likewise.
9081 (grub_video_get_palette): Likewise.
9082 (grub_video_set_viewport): Likewise.
9083 (grub_video_get_viewport): Likewise.
9084 (grub_video_map_color): Likewise.
9085 (grub_video_map_rgb): Likewise.
9086 (grub_video_map_rgba): Likewise.
9087 (grub_video_fill_rect): Likewise.
9088 (grub_video_blit_glyph): Likewise.
9089 (grub_video_blit_bitmap): Likewise.
9090 (grub_video_blit_render_target): Likewise.
9091 (grub_video_scroll): Likewise.
9092 (grub_video_swap_buffers): Likewise.
9093 (grub_video_create_render_target): Likewise.
9094 (grub_video_delete_render_target): Likewise.
9095 (grub_video_set_active_render_target): Likewise.
9097 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9099 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9101 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9102 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9103 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9104 instead of $(srcdir)/genkernsyms.sh.
9106 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9107 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9108 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9109 instead of $(srcdir)/genkernsyms.sh.
9111 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9112 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9113 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9114 instead of $(srcdir)/genkernsyms.sh.
9116 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9117 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9118 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9119 instead of $(srcdir)/genkernsyms.sh.
9121 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9124 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9126 (gensymlist.sh): New target.
9127 (genkernsyms.sh): Likewise.
9129 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9130 genkernsyms.sh.in and gensymlist.sh.in.
9132 * genkernsyms.sh: Removed.
9133 * gensymlist.sh: Likewise.
9135 * genkernsyms.sh.in: New file.
9136 * gensymlist.sh.in: Likewise.
9138 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9140 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9141 clobber "prefix", since we may have already set it manually.
9143 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9145 * kern/misc.c (abort): New alias for grub_abort.
9147 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9149 A new machine-specific function "grub_machine_set_prefix" is
9150 defined. This is called after loading modules, so that a prefix
9151 initialization can use modules. Also, this change adds an
9152 intensive debugging feature for the memory manager via the
9153 configure option "--enable-mm-debug".
9155 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9158 * kern/sparc64/ieee1275/init.c (abort): Removed.
9159 (grub_stop): Likewise.
9160 (grub_exit): New function.
9161 (grub_set_prefix): Renamed to ...
9162 (grub_machine_set_prefix): ... this.
9163 (grub_machine_init): Do not call grub_set_prefix.
9165 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9166 (grub_machine_set_prefix): ... this.
9167 (grub_machine_init): Do not call grub_set_prefix.
9169 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9170 (grub_machine_init): Do not set the prefix here.
9172 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9174 * kern/efi/init.c: Include grub/mm.h.
9175 (grub_efi_set_prefix): New function.
9177 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9178 (grub_efi_get_filename): New function.
9179 (grub_print_device_path): Renamed to ...
9180 (grub_efi_print_device_path): ... this.
9182 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9183 [MM_DEBUG] (grub_realloc): Likewise.
9184 [MM_DEBUG] (grub_free): Likewise.
9185 [MM_DEBUG] (grub_memalign): Likewise.
9186 [MM_DEBUG] (grub_mm_debug): New variable.
9187 [MM_DEBUG] (grub_debug_malloc): New function.
9188 [MM_DEBUG] (grub_debug_free): New function.
9189 [MM_DEBUG] (grub_debug_realloc): New function.
9190 [MM_DEBUG] (grub_debug_memalign): New function.
9192 * kern/misc.c (grub_abort): Print a newline to distinguish
9195 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9196 grub_set_root_dev after loading modules. This is necessary when
9197 setting a prefix depends on modules.
9199 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9200 (grub_efi_print_device_path): ... this.
9201 (grub_efi_get_filename): New prototype.
9202 (grub_efi_set_prefix): Likewise.
9204 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9206 (grub_efidisk_get_device_handle): New prototype.
9207 (grub_efidisk_get_device_name): Likewise.
9209 * include/grub/mm.h: Include config.h.
9210 (MM_DEBUG): Removed.
9211 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9212 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9213 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9214 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9215 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9216 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9217 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9218 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9219 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9221 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9223 * disk/efi/efidisk.c: Include grub/partition.h.
9224 (iterate_child_devices): New function.
9225 (add_device): First, compare only last device path nodes, so that
9226 devices are sorted by the types.
9227 (grub_efidisk_get_device_handle): New function.
9228 (grub_efidisk_get_device_name): Likewise.
9230 * configure.ac (--enable-mm-debug): New option to enable the
9231 memory manager debugging feature. This makes the binary much
9232 bigger, so is disabled by default.
9234 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9236 Use grub_abort instead of grub_stop, and grub_exit must be
9237 define in each architecture now. Also, this change adds support
9240 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9241 (grub_getkey): New function.
9242 (grub_term_get_current): Likewise.
9244 * util/i386/pc/grub-setup.c: Include grub/term.h.
9245 (grub_getkey): New function.
9246 (grub_term_get_current): Likewise.
9248 * util/misc.c (grub_stop): Renamed to ...
9249 (grub_exit): ... this.
9251 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9252 (grub_exit): ... this.
9253 (grub_machine_init): Use grub_abort instead of abort.
9254 (grub_stop): Removed.
9256 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9259 * kern/i386/pc/startup.S (grub_exit): New function.
9260 (cold_reboot): New label.
9262 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9263 (grub_efi_init): Call grub_efidisk_init.
9264 (grub_efi_fini): Call grub_efidisk_fini.
9266 * kern/efi/efi.c: Include grub/mm.h.
9267 (grub_efi_console_control_guid): Renamed to ...
9268 (console_control_guid): ... this.
9269 (grub_efi_loaded_image_guid): Renamed to ...
9270 (loaded_image_guid): ... this.
9271 (grub_efi_locate_handle): New function.
9272 (grub_efi_open_protocol): Likewise.
9273 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9274 GRUB_EFI_CONSOLE_CONTROL_GUID.
9275 (grub_efi_exit): Removed.
9276 (grub_stop): Likewise.
9277 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9278 (grub_exit): New function.
9279 (grub_print_device_path): Likewise.
9281 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9282 (grub_enter_rescue_mode): Register "exit".
9284 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9285 (grub_abort): New function.
9287 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9289 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9291 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9293 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9294 (grub_print_device_path): New prototype.
9295 (grub_efi_locate_handle): Likewise.
9296 (grub_efi_open_protocol): Likewise.
9298 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9299 * disk/efi/efidisk.c: Likewise.
9301 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9303 * include/grub/efi/console_control.h
9304 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9306 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9307 last 8 bytes as an array.
9308 (GRUB_EFI_DISK_IO_GUID): New macro.
9309 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9310 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9311 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9313 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9314 (struct grub_efi_device_path): Rename the member "sub_type" to
9316 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9317 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9318 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9319 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9320 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9321 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9322 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9323 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9324 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9325 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9326 (struct grub_efi_pci_device_path): New structure.
9327 (grub_efi_pci_device_path_t): New type.
9328 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9329 (struct grub_efi_pccard_device_path): New structure.
9330 (grub_efi_pccard_device_path_t): New type.
9331 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9332 (struct grub_efi_memory_mapped_device_path): New structure.
9333 (grub_efi_memory_mapped_device_path_t): New type.
9334 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9335 (struct grub_efi_vendor_device_path): New structure.
9336 (grub_efi_vendor_device_path_t): New type.
9337 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9338 (struct grub_efi_controller_device_path): New structure.
9339 (grub_efi_controller_device_path_t): New type.
9340 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9341 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9342 (struct grub_efi_acpi_device_path): New structure.
9343 (grub_efi_acpi_device_path_t): New type.
9344 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9345 (struct grub_efi_expanded_acpi_device_path): New structure.
9346 (grub_efi_expanded_acpi_device_path_t): New type.
9347 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9348 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9349 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9350 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9351 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9352 (struct grub_efi_atapi_device_path): New structure.
9353 (grub_efi_atapi_device_path_t): New type.
9354 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9355 (struct grub_efi_fibre_channel_device_path): New structure.
9356 (grub_efi_fibre_channel_device_path_t): New type.
9357 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9358 (struct grub_efi_1394_device_path): New structure.
9359 (grub_efi_1394_device_path_t): New type.
9360 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9361 (struct grub_efi_usb_device_path): New structure.
9362 (grub_efi_usb_device_path_t): New type.
9363 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9364 (struct grub_efi_usb_class_device_path): New structure.
9365 (grub_efi_usb_class_device_path_t): New type.
9366 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9367 (struct grub_efi_i2o_device_path): New structure.
9368 (grub_efi_i2o_device_path_t): New type.
9369 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9370 (struct grub_efi_mac_address_device_path): New structure.
9371 (grub_efi_mac_address_device_path_t): New type.
9372 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9373 (struct grub_efi_ipv4_device_path): New structure.
9374 (grub_efi_ipv4_device_path_t): New type.
9375 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9376 (struct grub_efi_ipv6_device_path): New structure.
9377 (grub_efi_ipv6_device_path_t): New type.
9378 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9379 (struct grub_efi_infiniband_device_path): New structure.
9380 (grub_efi_infiniband_device_path_t): New type.
9381 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9382 (struct grub_efi_uart_device_path): New structure.
9383 (grub_efi_uart_device_path_t): New type.
9384 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9385 (struct grub_efi_vendor_messaging_device_path): New structure.
9386 (grub_efi_vendor_messaging_device_path_t): New type.
9387 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9388 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9389 (struct grub_efi_hard_drive_device_path): New structure.
9390 (grub_efi_hard_drive_device_path_t): New type.
9391 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9392 (struct grub_efi_cdrom_device_path): New structure.
9393 (grub_efi_cdrom_device_path_t): New type.
9394 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9395 (struct grub_efi_vendor_media_device_path): New structure.
9396 (grub_efi_vendor_media_device_path_t): New type.
9397 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9398 (struct grub_efi_file_path_device_path): New structure.
9399 (grub_efi_file_path_device_path_t): New type.
9400 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9401 (struct grub_efi_protocol_device_path): New structure.
9402 (grub_efi_protocol_device_path_t): New type.
9403 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9404 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9405 (struct grub_efi_bios_device_path): New structure.
9406 (grub_efi_bios_device_path_t): New type.
9407 (struct grub_efi_disk_io): New structure.
9408 (grub_efi_disk_io_t): New type.
9409 (struct grub_efi_block_io_media): New structure.
9410 (grub_efi_block_io_media_t): New type.
9411 (struct grub_efi_block_io): New structure.
9412 (grub_efi_block_io_t): New type.
9414 * include/grub/misc.h (grub_stop): Removed.
9415 (grub_exit): New prototype.
9416 (grub_abort): Likewise.
9418 * include/grub/disk.h (enum grub_disk_dev_id): Added
9419 GRUB_DISK_DEVICE_EFIDISK_ID.
9421 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9423 (kernel_syms.lst): Remove the target if an error occurs.
9425 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9427 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9428 as it was simply too buggy.
9430 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9432 * kern/misc.c (grub_lltoa): New function.
9433 (grub_vsprintf): Added support for the long long suffix,
9436 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9438 * Makefile.in (LDFLAGS): Add variable.
9439 (LD): Remove variable.
9440 * configure.ac: Add -m32 to LDFLAGS.
9441 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9442 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9443 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9444 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9445 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9447 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9448 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9449 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9451 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9453 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9454 length for unknown glyph.
9456 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9458 Add support for pre-loaded modules into the EFI port.
9460 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9461 completely. Accept one more argument DIR. The caller has changed.
9463 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9465 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9466 (grub_efi_loaded_image_guid): New variable.
9467 (grub_efi_get_loaded_image): New function.
9468 (grub_arch_modules_addr): Likewise.
9470 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9473 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9474 (struct grub_efi_loaded_image): New structure.
9475 (grub_efi_loaded_image_t): New type.
9477 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9479 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9480 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9481 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9483 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9485 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9487 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9489 * DISTLIST: Added include/grub/efi/console.h,
9490 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9491 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9493 * include/grub/efi/console.h: New file.
9494 * include/grub/efi/time.h: Likewise.
9495 * include/grub/i386/efi/kernel.h: Likewise.
9496 * kern/efi/init.c: Likewise.
9497 * kern/efi/mm.c: Likewise.
9498 * term/efi/console.c: Likewise.
9500 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9501 (grub_stop): Removed.
9502 (grub_get_rtc): Likewise.
9503 (grub_machine_init): Simply call grub_efi_init.
9504 (grub_machine_fini): Call grub_efi_fini.
9506 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9507 (grub_efi_output_string): Removed.
9508 (grub_efi_stall): New function.
9509 (grub_stop): Likewise.
9510 (grub_get_rtc): Likewise.
9512 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9513 (grub_efi_stall): New prototype.
9514 (grub_efi_allocate_pages): Likewise.
9515 (grub_efi_free_pages): Likewise.
9516 (grub_efi_get_memory_map): Likewise.
9517 (grub_efi_mm_init): Likewise.
9518 (grub_efi_mm_fini): Likewise.
9519 (grub_efi_init): Likewise.
9520 (grub_efi_fini): Likewise.
9522 * include/grub/i386/efi/time.h: Do not include
9523 grub/symbol.h. Include grub/efi/time.h.
9524 (GRUB_TICKS_PER_SECOND): Removed.
9525 (grub_get_rtc): Likewise.
9527 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9528 Added padding. The EFI spec is buggy.
9529 (GRUB_EFI_BLACK): New macro.
9530 (GRUB_EFI_BLUE): Likewise.
9531 (GRUB_EFI_GREEN): Likewise.
9532 (GRUB_EFI_CYAN): Likewise.
9533 (GRUB_EFI_RED): Likewise.
9534 (GRUB_EFI_MAGENTA): Likewise.
9535 (GRUB_EFI_BROWN): Likewise.
9536 (GRUB_EFI_LIGHTGRAY): Likewise.
9537 (GRUB_EFI_BRIGHT): Likewise.
9538 (GRUB_EFI_DARKGRAY): Likewise.
9539 (GRUB_EFI_LIGHTBLUE): Likewise.
9540 (GRUB_EFI_LIGHTGREEN): Likewise.
9541 (GRUB_EFI_LIGHTCYAN): Likewise.
9542 (GRUB_EFI_LIGHTRED): Likewise.
9543 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9544 (GRUB_EFI_YELLOW): Likewise.
9545 (GRUB_EFI_WHITE): Likewise.
9546 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9547 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9548 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9549 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9550 (GRUB_EFI_BACKGROUND_RED): Likewise.
9551 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9552 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9553 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9554 (GRUB_EFI_TEXT_ATTR): Likewise.
9556 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9557 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9558 (kernel_mod_HEADERS): Added efi/time.h.
9560 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9562 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9563 include/grub/efi/api.h, include/grub/efi/console_control.h,
9564 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9565 include/grub/i386/efi/time.h, kern/efi/efi.c,
9566 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9567 and util/i386/efi/grub-mkimage.c.
9569 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9571 * genmk.rb (PModule#rule): Do not export symbols if
9572 #{prefix}_EXPORTS is set to "no".
9574 * conf/i386-efi.mk: New file.
9575 * conf/i386-efi.rmk: Likewise.
9576 * include/grub/efi/api.h: Likewise.
9577 * include/grub/efi/console_control.h: Likewise.
9578 * include/grub/efi/efi.h: Likewise.
9579 * include/grub/efi/pe32.h: Likewise.
9580 * include/grub/i386/efi/time.h: Likewise.
9581 * kern/efi/efi.c: Likewise.
9582 * kern/i386/efi/init.c: Likewise.
9583 * kern/i386/efi/startup.S: Likewise.
9584 * util/i386/efi/grub-mkimage.c: Likewise.
9586 2006-04-17 Marco Gerards <marco@gnu.org>
9588 * include/grub/script.h: Include <grub/parser.h> and
9589 "grub_script.tab.h".
9590 (struct grub_lexer_param): New struct.
9591 (struct grub_parser_param): Likewise.
9592 (grub_script_create_arglist): Pass the state in an argument.
9593 (grub_script_add_arglist): Likewise.
9594 (grub_script_create_cmdline): Likewise.
9595 (grub_script_create_cmdblock): Likewise.
9596 (grub_script_create_cmdif): Likewise.
9597 (grub_script_create_cmdmenu): Likewise.
9598 (grub_script_add_cmd): Likewise.
9599 (grub_script_arg_add): Likewise.
9600 (grub_script_lexer_ref): Likewise.
9601 (grub_script_lexer_deref): Likewise.
9602 (grub_script_lexer_record_start): Likewise.
9603 (grub_script_lexer_record_stop): Likewise.
9604 (grub_script_mem_record): Likewise.
9605 (grub_script_mem_record_stop): Likewise.
9606 (grub_script_malloc): Likewise.
9607 (grub_script_yylex): Likewise.
9608 (grub_script_yyparse): Likewise.
9609 (grub_script_yyerror): Likewise.
9610 (grub_script_yylex): Likewise.
9611 (grub_script_lexer_init): Return the state.
9613 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9614 (grub_script_lexer_done): Likewise.
9615 (grub_script_lexer_getline): Likewise.
9616 (grub_script_lexer_refs): Likewise.
9618 (newscript): Likewise.
9620 (recording): Likewise.
9621 (recordpos): Likewise.
9622 (recordlen): Likewise.
9623 (grub_script_lexer_init): Return the state instead of setting
9625 (grub_script_lexer_ref): Use the newly added argument for state
9627 (grub_script_lexer_deref): Likewise.
9628 (grub_script_lexer_record_start): Likewise.
9629 (grub_script_lexer_record_stop): Likewise.
9630 (recordchar): Likewise.
9631 (nextchar): Likewise.
9632 (grub_script_yylex2): Likewise.
9633 (grub_script_yylex): Likewise.
9634 (grub_script_yyerror): Likewise.
9636 * normal/parser.y (func_mem): Removed variable.
9637 (menu_entry): Likewise.
9639 (%lex-param): New parser option.
9640 (%parse-param): Likewise.
9641 (script): Always return the AST.
9642 (argument): Pass the state around.
9643 (arguments): Likewise.
9644 (grubcmd): Likewise.
9645 (commands): Likewise.
9646 (function): Likewise.
9647 (menuentry): Likewise.
9648 (if_statement): Likewise.
9651 * normal/script.c (grub_script_memused): Removed variable.
9652 (grub_script_parsed): Likewise.
9653 (grub_script_malloc): Added a state argument. Use that instead of
9655 (grub_script_mem_record): Likewise.
9656 (grub_script_mem_record_stop): Likewise.
9657 (grub_script_arg_add): Likewise.
9658 (grub_script_add_arglist): Likewise.
9659 (grub_script_create_cmdline): Likewise.
9660 (grub_script_create_cmdif): Likewise.
9661 (grub_script_create_cmdmenu): Likewise.
9662 (grub_script_add_cmd): Likewise.
9663 (grub_script_parse): Setup the state before calling the parser.
9665 2006-04-16 Marco Gerards <marco@gnu.org>
9667 * normal/command.c (grub_command_init): Remove the title command.
9669 * normal/lexer.c (grub_script_yylex): Renamed from this...
9670 (grub_script_yylex2): ... to this.
9671 (grub_script_yylex): New function. Temporary
9672 introduced to filter some tokens.
9673 (grub_script_yyerror): Print a newline.
9675 * normal/main.c (read_config_file): Output information about the
9676 lines that contain errors. Wait for a key after all lines have
9677 been processed. Don't return an empty menu.
9679 * normal/parser.y (func_mem): Don't initialize.
9680 (menu_entry): Likewise.
9681 (err): New variable.
9682 (script): Don't return anything when an error was encountered.
9683 (ws, returns): Removed rules.
9684 (argument): Disabled concatenated variable support.
9685 (arguments): Remove explicit separators.
9686 (grubcmd): Likewise.
9687 (function): Likewise.
9688 (menuentry): Likewise.
9690 (commands): Likewise. Add error handling.
9692 * normal/script.c (grub_script_create_cmdline): If
9693 `grub_script_parsed' is 0, assume the parser encountered an error.
9695 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9697 * configure.ac: Add support for EFI. Fix the typo
9698 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9700 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9702 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9703 foreign multibyte characters should be shown correctly.
9705 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9707 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9709 (read_config_file): Made it to close file before returning.
9711 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9713 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9714 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9715 video/i386/pc/vbefill.c.
9717 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9718 video/i386/pc/vbefill.c.
9720 * include/grub/video.h (grub_video_blit_format): New enum.
9721 (grub_video_mode_info): Added new member blit_format.
9722 (grub_video_get_blit_format): New function prototype.
9724 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9726 (grub_video_vbe_map_rgb): Likewise.
9727 (grub_video_vbe_unmap_color): Likewise.
9729 * include/grub/i386/pc/vbeblit.h: New file.
9731 * include/grub/i386/pc/vbefill.h: New file.
9733 * video/video.c (grub_video_get_blit_format): New function.
9734 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9735 (grub_video_vbe_map_rgb): Likewise.
9736 (grub_video_vbe_unmap_color): Likewise.
9738 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9740 (grub_video_vbe_blit_render_target): Changed to use more optimized
9742 (grub_video_vbe_setup): Added detection for optimized settings.
9743 (grub_video_vbe_create_render_target): Likewise.
9745 * video/i386/pc/vbeblit.c: New file.
9747 * video/i386/pc/vbefill.c: New file.
9749 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9751 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9754 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9755 parsing to support both hex and dec ranges. If filename was missing
9756 show usage information.
9758 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9760 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9761 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9763 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9764 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9765 (video_mod_SOURCES): Added.
9766 (video_mod_CFLAGS): Likewise.
9767 (video_mod_LDFLAGS): Likewise.
9768 (gfxterm_mod_SOURCES): Likewise.
9769 (gfxterm_mod_CFLAGS): Likewise.
9770 (gfxterm_mod_LDFLAGS): Likewise.
9771 (videotest_mod_SOURCES): Likewise.
9772 (videotest_mod_CFLAGS): Likewise.
9773 (videotest_mod_LDFLAGS): Likewise.
9774 (vesafb_mod_SOURCES): Removed.
9775 (vesafb_mod_CFLAGS): Likewise.
9776 (vesafb_mod_LDFLAGS): Likewise.
9777 (vga_mod_SOURCES): Likewise.
9778 (vga_mod_CFLAGS): Likewise.
9779 (vga_mod_LDFLAGS): Likewise.
9781 * commands/videotest.c: New file.
9783 * font/manager.c (fill_with_default_glyph): Modified to use
9785 (grub_font_get_glyph): Likewise.
9786 (fontmanager): Renamed from this...
9787 (font_manager): ... to this.
9789 * include/grub/font.h (grub_font_glyph): Added new structure.
9790 (grub_font_get_glyph): Modified to use grub_font_glyph.
9792 * include/grub/misc.h (grub_abs): Added as inline function.
9794 * include/grub/video.h: New file.
9796 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9797 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9798 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9799 (grub_vbe_get_controller_info): Renamed from this...
9800 (grub_vbe_bios_get_controller_info): ... to this.
9801 (grub_vbe_get_mode_info): Renamed from this...
9802 (grub_vbe_bios_get_mode_info): ... to this.
9803 (grub_vbe_set_mode): Renamed from this...
9804 (grub_vbe_bios_set_mode): ... to this.
9805 (grub_vbe_get_mode): Renamed from this...
9806 (grub_vbe_bios_get_mode): ... to this.
9807 (grub_vbe_set_memory_window): Renamed from this...
9808 (grub_vbe_bios_set_memory_window): ... to this.
9809 (grub_vbe_get_memory_window): Renamed from this...
9810 (grub_vbe_bios_get_memory_window): ... to this.
9811 (grub_vbe_set_scanline_length): Renamed from this...
9812 (grub_vbe_set_scanline_length): ... to this.
9813 (grub_vbe_get_scanline_length): Renamed from this...
9814 (grub_vbe_bios_get_scanline_length): ... to this.
9815 (grub_vbe_set_display_start): Renamed from this...
9816 (grub_vbe_bios_set_display_start): ... to this.
9817 (grub_vbe_get_display_start): Renamed from this...
9818 (grub_vbe_bios_get_display_start): ... to this.
9819 (grub_vbe_set_palette_data): Renamed from this...
9820 (grub_vbe_bios_set_palette_data): ... to this.
9821 (grub_vbe_set_pixel_rgb): Removed.
9822 (grub_vbe_set_pixel_index): Likewise.
9824 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9826 (grub_vbe_bios_get_controller_info): ... to this.
9827 (grub_vbe_get_mode_info): Renamed from this...
9828 (grub_vbe_bios_get_mode_info): ... to this.
9829 (grub_vbe_set_mode): Renamed from this...
9830 (grub_vbe_bios_set_mode): ... to this.
9831 (grub_vbe_get_mode): Renamed from this...
9832 (grub_vbe_bios_get_mode): ... to this.
9833 (grub_vbe_set_memory_window): Renamed from this...
9834 (grub_vbe_bios_set_memory_window): ... to this.
9835 (grub_vbe_get_memory_window): Renamed from this...
9836 (grub_vbe_bios_get_memory_window): ... to this.
9837 (grub_vbe_set_scanline_length): Renamed from this...
9838 (grub_vbe_set_scanline_length): ... to this.
9839 (grub_vbe_get_scanline_length): Renamed from this...
9840 (grub_vbe_bios_get_scanline_length): ... to this.
9841 (grub_vbe_set_display_start): Renamed from this...
9842 (grub_vbe_bios_set_display_start): ... to this.
9843 (grub_vbe_get_display_start): Renamed from this...
9844 (grub_vbe_bios_get_display_start): ... to this.
9845 (grub_vbe_set_palette_data): Renamed from this...
9846 (grub_vbe_bios_set_palette_data): ... to this.
9847 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9848 getting corrupted after calling it. Added more pushes and pops.
9849 (grub_vbe_bios_set_mode): Likewise.
9850 (grub_vbe_bios_get_mode): Likewise.
9851 (grub_vbe_bios_get_memory_window): Likewise.
9852 (grub_vbe_bios_set_scanline_length): Likewise.
9853 (grub_vbe_bios_get_scanline_length): Likewise.
9854 (grub_vbe_bios_get_display_start): Likewise.
9855 (grub_vbe_bios_set_palette_data): Likewise.
9857 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9858 (cl_insert): Likewise.
9859 (cl_delete): Likewise.
9861 * term/gfxterm.c: New file.
9863 * term/i386/pc/vesafb.c: Removed file.
9865 * video/video.c: New file.
9867 * video/i386/pc/vbe.c (real2pm): Added new function.
9868 (grub_video_vbe_draw_pixel): Likewise.
9869 (grub_video_vbe_get_video_ptr): Likewise.
9870 (grub_video_vbe_get_pixel): Likewise
9871 (grub_video_vbe_init): Likewise.
9872 (grub_video_vbe_fini): Likewise.
9873 (grub_video_vbe_setup): Likewise.
9874 (grub_video_vbe_get_info): Likewise.
9875 (grub_video_vbe_set_palette): Likewise.
9876 (grub_video_vbe_get_palette): Likewise.
9877 (grub_video_vbe_set_viewport): Likewise.
9878 (grub_video_vbe_get_viewport): Likewise.
9879 (grub_video_vbe_map_color): Likewise.
9880 (grub_video_vbe_map_rgb): Likewise.
9881 (grub_video_vbe_map_rgba): Likewise.
9882 (grub_video_vbe_unmap_color): Likewise.
9883 (grub_video_vbe_fill_rect): Likewise.
9884 (grub_video_vbe_blit_glyph): Likewise.
9885 (grub_video_vbe_blit_bitmap): Likewise.
9886 (grub_video_vbe_blit_render_target): Likewise.
9887 (grub_video_vbe_scroll): Likewise.
9888 (grub_video_vbe_swap_buffers): Likewise.
9889 (grub_video_vbe_create_render_target): Likewise.
9890 (grub_video_vbe_delete_render_target): Likewise.
9891 (grub_video_vbe_set_active_render_target): Likewise.
9892 (grub_vbe_set_pixel_rgb): Remove function.
9893 (grub_vbe_set_pixel_index): Likewise.
9894 (index_color_mode): Remove static variable.
9895 (active_mode): Likewise.
9896 (framebuffer): Likewise.
9897 (bytes_per_scan_line): Likewise.
9898 (grub_video_vbe_adapter): Added new static variable.
9899 (framebuffer): Likewise.
9900 (render_target): Likewise.
9901 (initial_mode): Likewise.
9902 (mode_in_use): Likewise.
9903 (mode_list): Likewise.
9905 2006-03-10 Marco Gerards <marco@gnu.org>
9907 * configure.ac (AC_INIT): Bumped to 1.93.
9909 * DISTLIST: Added `include/grub/hfs.h'.
9911 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9913 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9914 18H, which might help the BIOS falling back to next boot media.
9916 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9918 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9919 Poe Chen <poe.poechen@gmail.com>.
9921 2006-01-17 Marco Gerards <marco@gnu.org>
9923 * include/grub/normal.h: Include <grub/script.h>.
9924 (grub_command_list): Removed struct.
9925 (grub_command_list_t): Removed type.
9926 (grub_menu_entry): Remove members `num' and `command_list'. Add
9927 members `commands' and `sourcecode'.
9928 * include/grub/script.h: Add inclusion guards.
9929 (grub_script_cmd_menuentry): New struct.
9930 (grub_script_execute_menuentry): New prototype.
9931 (grub_script_lexer_record_start): Likewise.
9932 (grub_script_lexer_record_stop): Likewise.
9933 * normal/execute.c (grub_script_execute_menuentry): New function.
9934 * normal/lexer.c (record, recording, recordpos, recordlen): New
9936 (grub_script_lexer_record_start): New function.
9937 (grub_script_lexer_record_stop): Likewise.
9938 (recordchar): Likewise.
9939 (nextchar): Likewise.
9940 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9941 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9942 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9943 (current_menu): New variable.
9944 (free_menu): Mainly rewritten.
9945 (grub_normal_menu_addentry): New function.
9946 (read_config_file): Rewritten.
9947 * normal/menu.c (run_menu_entry): Mainly rewritten.
9948 * normal/menu_entry.c (make_screen): Rewritten the code to insert
9950 (run): Mainly rewritten.
9951 * normal/parser.y (menu_entry): New variable.
9952 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9953 (menuentry): New rule.
9954 (command): Add `menuentry'.
9955 (if_statement): Allow additional returns before `fi'.
9956 * normal/script.c (grub_script_create_cmdmenu): New function.
9958 2006-01-03 Marco Gerards <marco@gnu.org>
9960 * INSTALL: GNU Bison is required.
9961 * configure.ac: Rewritten the test to detect Bison.
9962 * Makefile.in (YACC): New variable. Reported by Xun Sun
9963 <xun.sun.cn@gmail.com>.
9965 2006-01-03 Marco Gerards <marco@gnu.org>
9967 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9968 the HFS+ filesystem to filesystem blocks.
9969 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9970 GCC warning is silenced.
9972 2006-01-03 Marco Gerards <marco@gnu.org>
9974 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9975 read from disk from big endian to host byte order.
9977 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9979 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9981 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9982 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9983 embedded HFS+ filesystem.
9984 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9985 (grub_hfs_sblock): Move from here...
9986 * include/grub/hfs.h: To here... New file.
9987 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9989 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9991 (grub_hfsplus_volheader): Change type of member `magic' to
9993 (grub_hfsplus_data): Add new member `embedded_offset'.
9994 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9996 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9997 Calculate the offset.
9999 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10001 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10003 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10005 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10007 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10008 ENV->NAME is NULL after allocating ENV->VALUE.
10010 2005-12-25 Marco Gerards <marco@gnu.org>
10012 * kern/env.c (grub_env_set): Rewritten the error handling code.
10014 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10016 * geninit.sh: Made more robust, and more portable.
10018 2005-12-25 Marco Gerards <marco@gnu.org>
10020 Add support for Apple HFS+ filesystems.
10022 * fs/hfsplus.c: New file.
10024 * DISTLIST: Added `fs/hfsplus.c'.
10026 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10027 (hfsplus_mod_SOURCES): New variable.
10028 (hfsplus_mod_CFLAGS): Likewise.
10029 (hfsplus_mod_LDFLAGS): Likewise.
10030 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10031 (grub_setup_SOURCES): Likewise.
10032 (grub_mkdevicemap_SOURCES): Likewise.
10033 (grub_emu_SOURCES): Likewise.
10034 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10036 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10038 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10040 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10042 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10043 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10044 include/grub/parser.h, include/grub/script.h, kern/parser.c,
10045 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10046 normal/lexer.c, normal/parser.y, normal/script.c, and
10048 Removed kern/sparc64/cache.c.
10050 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10051 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10054 * configure.ac (AC_INIT): Bumped to 1.92.
10056 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
10058 * kern/err.c (grub_error_push): Added new function to support error
10060 (grub_error_pop): Likewise.
10061 (grub_error_stack_items): New local variable to support error stacks.
10062 (grub_error_stack_pos): Likewise.
10063 (grub_error_stack_assert): Likewise.
10064 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10066 (grub_print_error): Added support to print errors from error stack.
10068 * include/grub/err.h (grub_error_push): Added function prototype.
10069 (grub_error_pop): Likewise.
10071 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
10073 * configure.ac: Accept `powerpc64' as host_cpu.
10074 (amd64): Rename to `biarch32'.
10076 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10077 non-cacheline-aligned addresses.
10079 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10080 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
10081 if `size' is non-zero.
10083 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
10085 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10086 and `cd' to make sure the filename is not prefixed with a
10088 (pkgdata_MODULES): Add `gpt.mod'.
10089 (gpt_mod_SOURCES): New variable.
10090 (gpt_mod_CFLAGS): Likewise.
10091 (gpt_mod_LDFLAGS): Likewise.
10093 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10095 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10098 * partmap/gpt.c: New file.
10100 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10101 GPT partition map is detected.
10103 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10105 * commands/i386/pc/play.c: New file.
10106 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10107 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10110 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
10112 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10113 ((unused))' to silence gcc warning.
10115 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10117 * configure.ac: Correct `AC_PROG_YACC' test.
10119 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10121 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10122 check before installing files.
10124 2005-11-22 Mike Small <smallm@panix.com>
10126 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10127 number regex so multidigit numbers are recognized correctly.
10129 2005-11-22 Mike Small <smallm@panix.com>
10131 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10132 debugging message before attempting to claim memory.
10133 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10134 multiple addresses in case of failure.
10136 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10138 * term/tparm.c (get_space): Remove empty `if' statement.
10140 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10142 * kern/parser.c (check_varstate): Rename `state' to 's'.
10144 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10146 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10147 variable definitions to the beginning of each function. Sort stack
10149 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10150 `buf' argument to `char *'.
10152 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10154 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10155 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10156 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10157 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10158 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10159 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10160 configfile.mod, search.mod, gzio.mod and test.mod.
10161 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10162 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10163 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10164 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10165 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10166 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10167 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10168 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10169 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10170 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10171 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10172 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10173 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10174 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10175 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10176 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10177 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10178 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10179 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10180 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10181 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10182 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10183 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10185 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10187 (pkgdata_MODULES): Add test.mod.
10189 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10191 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10192 appending to variables with "+=".
10193 (PModule): Use full pathname to generate *.lst filenames.
10195 * Makefile.in: Fixed list rules moved from genmk.rb.
10196 (.DELETE_ON_ERROR): New special target.
10197 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10199 * conf/i386-pc.rmk: Include conf/common.mk.
10200 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10201 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10202 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10203 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10204 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10205 configfile.mod, search.mod, gzio.mod and test.mod.
10206 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10207 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10208 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10209 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10210 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10211 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10212 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10213 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10214 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10215 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10216 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10217 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10218 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10219 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10220 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10221 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10222 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10223 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10224 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10225 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10226 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10227 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10228 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10230 * conf/common.rmk: ... to here. New file.
10232 * conf/common.mk: New file.
10234 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10236 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10237 (grub_script.tab.c): ... here.
10239 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10240 (grub_script.tab.c): ... here.
10242 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10243 (grub_script.tab.c): ... here.
10245 * normal/command.c (grub_command_find): Fixed a memory leak of
10246 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10248 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10250 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10251 "@" which marks the start of a comment on ARM.
10252 (VARIABLE): Likewise.
10254 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10256 Add support for Linux/ADFS partition tables.
10258 * partmap/acorn.c: New file.
10260 * include/grub/acorn_filecore.h: Likewise.
10262 * DISTLIST: Added `partmap/acorn.c' and
10263 `include/grub/acorn_filecore.h'.
10265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10267 (pkgdata_MODULES): Add `acorn.mod'.
10268 (acorn_mod_SOURCES): New variable.
10269 (acorn_mod_CFLAGS): Likewise.
10271 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10273 (pkgdata_MODULES): Add `acorn.mod'.
10274 (acorn_mod_SOURCES): New variable.
10275 (acorn_mod_CFLAGS): Likewise.
10277 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10278 (pkgdata_MODULES): Add `acorn.mod'.
10279 (acorn_mod_SOURCES): New variable.
10280 (acorn_mod_CFLAGS): Likewise.
10281 (acorn_mod_LDFLAGS): Likewise.
10283 * include/types.h (grub_disk_addr_t): New typedef.
10285 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
10287 * geninit.sh: New file.
10289 * geninitheader.sh: Likewise.
10291 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10292 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10293 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10294 * commands/configfile.c (grub_configfile_init)
10295 (grub_configfile_fini): Likewise.
10296 * commands/default.c (grub_default_init, grub_default_fini):
10298 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10299 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10300 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10301 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10303 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10304 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10306 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
10307 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
10309 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10311 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
10313 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10314 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10315 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10316 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10317 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10318 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10319 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10320 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10321 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10322 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10323 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10324 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10325 * partmap/amiga.c (grub_amiga_partition_map_init)
10326 (grub_amiga_partition_map_fini): Likewise.
10327 * partmap/apple.c (grub_apple_partition_map_init)
10328 (grub_apple_partition_map_fini): Likewise.
10329 * partmap/pc.c (grub_pc_partition_map_init)
10330 (grub_pc_partition_map_fini): Likewise.
10331 * partmap/sun.c (grub_sun_partition_map_init,
10332 grub_sun_partition_map_fini): Likewise.
10333 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10336 * util/grub-emu.c: Include <grub_modules_init.h>.
10337 (main): Don't initialize and de-initialize any modules directly,
10338 use `grub_init_all' and `grub_fini_all' instead.
10340 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10341 `grub_vesafb_mod_init'.
10342 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10344 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10345 `grub_vga_mod_init'. Updated all users.
10346 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
10348 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10349 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10352 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10353 Generate a function to initialize the module in utilities.
10354 Updated all callers.
10355 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10356 initialize the module in utilities. Updated all callers.
10358 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10360 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10361 escape sequence and a literal ^L to clear the screen.
10363 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10364 when returning from Open Firmware.
10366 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10368 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10369 (grub_ofconsole_height): Likewise.
10370 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10371 manually insert a '\n'.
10372 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10373 `grub_ofconsole_height'. Return early if these are already set.
10375 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10377 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10378 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10379 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10380 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10381 and `normal/script.c'.
10382 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10383 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10384 (test_mod_SOURCES): New variable.
10385 (test_mod_CFLAGS): Likewise.
10386 (test_mod_LDFLAGS): Likewise.
10387 (pkgdata_MODULES): Add `test.mod'.
10388 (grub_script.tab.c): New rule.
10389 (grub_script.tab.h): Likewise.
10391 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
10393 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10394 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10395 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10396 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10397 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10398 (test_mod_SOURCES): New variable.
10399 (test_mod_CFLAGS): Likewise.
10400 (pkgdata_MODULES): Add `test.mod'.
10401 (grub_script.tab.c): New rule.
10402 (grub_script.tab.h): Likewise.
10404 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
10406 Add initial scripting support.
10408 * commands/test.c: New file.
10409 * include/grub/script.h: Likewise.
10410 * normal/execute.c: Likewise.
10411 * normal/function.c: Likewise.
10412 * normal/lexer.c: Likewise.
10413 * normal/parser.y: Likewise.
10414 * normal/script.c: Likewise.
10416 * configure.ac: Add `AC_PROG_YACC' test.
10418 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10419 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10420 `normal/function.c' and `normal/script.c'.
10421 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10422 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10423 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10425 (pkgdata_MODULES): Add `test.mod'.
10426 (grub_script.tab.c): New rule.
10427 (grub_script.tab.h): Likewise.
10429 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10431 * include/grub/normal.h (grub_test_init): New prototype.
10432 (grub_test_fini): Likewise.
10434 * normal/command.c: Include <grub/script.h>.
10435 (grub_command_execute): Rewritten.
10437 * util/grub-emu.c (main): Call `grub_test_init' and
10440 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10442 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10444 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10445 there are no pending characters.
10447 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10449 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10450 `grub_strndup' to drop device arguments. Replace unnecessary
10451 `grub_strndup' with `grub_strdup'.
10453 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10455 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10456 `debug' environment variable has been set.
10458 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
10460 * Makefile.in (install-local): Use $(DATA).
10461 (uninstall): Likewise.
10462 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10463 (sbin_UTILITIES): ... to here.
10464 (sbin_SCRIPTS): New variable.
10465 (grub_install_SOURCES): New variable.
10466 * util/powerpc/ieee1275/grub-install.in: New file.
10467 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10469 (add_segments): Call `grub_util_get_path'.
10471 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10473 From Timothy Baldwin:
10474 * commands/ls.c (grub_ls_list_files): Close FILE with
10476 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10478 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
10480 * include/grub/parser.h: New file.
10482 * kern/parser.c: Likewise.
10484 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10485 (grub_setup_SOURCES): Likewise.
10486 (grub_probefs_SOURCES): Likewise.
10487 (grub_emu_SOURCES): Likewise.
10488 (kernel_img_HEADERS): Add `parser.h'.
10490 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10491 (grub_emu_SOURCES): Add `kern/parser.c'.
10492 (grubof_SOURCES): Likewise.
10494 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10495 (grubof_SOURCES): Add `kern/parser.c'.
10497 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10499 * kern/misc.c (grub_split_cmdline): Removed function.
10501 * kern/rescue.c: Include <grub/parser.h>.
10502 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10503 of `grub_split_cmdline'.
10505 * normal/command.c: Include <grub/parser.h>.
10506 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10507 of `grub_split_cmdline'.
10509 * normal/completion.c: Include <grub/parser.h>.
10510 (cmdline_state): New variable.
10511 (iterate_dir): End the filename with a quote depending on the
10512 command line state.
10513 (get_state): new function.
10514 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10515 split the arguments and determine the current argument. When the
10516 argument string is not quoted, escape all spaces.
10518 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10520 * normal/sparc64/setjmp.S: New file.
10522 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10524 * include/grub/sparc64/libgcc.h: New file.
10525 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10526 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10527 normal/sparc64/setjmp.c.
10529 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10531 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10532 * kern/sparc64/cache.S: New file.
10533 * kern/sparc64/cache.c: Removed.
10534 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10535 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10537 (COMMON_LDFLAGS): Add -melf64_sparc.
10538 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10539 (grubof_SOURCES): Use cache.S instead of cache.c.
10540 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10541 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10542 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10544 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10545 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10546 (linux_mod_CFLAGS): Commented out.
10547 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10548 out because module isn't built.
10549 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10550 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10551 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10552 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10553 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10554 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10555 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10556 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10557 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10558 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10559 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10560 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10561 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10562 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10564 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10566 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10567 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10568 longer, because HFS should not be used on PC.
10570 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10572 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10573 consistently within the loop.
10575 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
10577 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10578 directory can not be read.
10580 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10582 * configure.ac (AC_INIT): Increase the version number to 1.91.
10584 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10585 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10586 term/i386/pc/serial.c.
10588 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10590 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10591 file size must be permitted.
10593 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10594 between %ah and %al.
10596 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10598 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10600 Call the hook with a NUL-terminated filename.
10601 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10604 * kern/term.c (cursor_state): New variable.
10605 (grub_term_set_current): Reset the cursor state on a new
10607 (grub_setcursor): Rewritten to use CURSOR_STATE.
10608 (grub_getcursor): New function.
10610 * include/grub/term.h (grub_getcursor): New prototype.
10612 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10613 integers on ARM. Reported by Timothy Baldwin
10614 <T.E.Baldwin99@members.leeds.ac.uk>.
10616 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
10618 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10620 (grub_sfs_dir): Likewise.
10622 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
10624 Add support for the SFS filesystem.
10626 * fs/sfs.c: New file.
10628 * DISTLIST: Added `fs/sfs.c'.
10630 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10631 (grub_probefs_SOURCES): Likewise.
10632 (grub_emu_SOURCES): Likewise.
10633 (pkgdata_MODULES): Add `sfs.mod'.
10634 (sfs_mod_SOURCES): New variable.
10635 (sfs_mod_CFLAGS): Likewise.
10636 (sfs_mod_LDFLAGS): Likewise.
10638 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
10639 (pkgdata_MODULES): Add `sfs.mod'.
10640 (sfs_mod_SOURCES): New variable.
10641 (sfs_mod_CFLAGS): Likewise.
10643 * util/grub-emu.c (main): Call `grub_sfs_init' and
10646 * include/grub/fs.h (grub_sfs_init): New prototype.
10647 (grub_sfs_fini): Likewise.
10649 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
10651 Add support for the AFFS filesystem.
10653 * fs/affs.c: New file.
10655 * DISTLIST: Added `fs/affs.c'.
10657 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10658 (grub_probefs_SOURCES): Likewise.
10659 (grub_emu_SOURCES): Likewise.
10660 (pkgdata_MODULES): Add `affs.mod'.
10661 (affs_mod_SOURCES): New variable.
10662 (affs_mod_CFLAGS): Likewise.
10663 (affs_mod_LDFLAGS): Likewise.
10665 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10666 (pkgdata_MODULES): Add `affs.mod'.
10667 (affs_mod_SOURCES): New variable.
10668 (affs_mod_CFLAGS): Likewise.
10670 * util/grub-emu.c (main): Call `grub_affs_init' and
10673 * include/grub/fs.h (grub_affs_init): New prototype.
10674 (grub_affs_fini): Likewise.
10676 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10678 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10680 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10682 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10685 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10688 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10689 (COMMON_LDFLAGS): New variable.
10690 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10691 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10692 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10693 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10694 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10695 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10696 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10697 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10698 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10699 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10700 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10701 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10702 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10703 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10704 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10706 (normal_mod_ASFLAGS): Add `-m32'.
10708 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10709 (grub_host_size_t, grub_host_ssize_t): New types.
10710 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10711 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10712 `GRUB_HOST_SIZEOF_VOID_P'.
10714 * include/grub/kernel.h (struct grub_module_header): Type of
10715 member offset changed to `grub_host_off_t'. Type of member size
10716 changed to `grub_host_size_t'.
10717 (struct grub_module_info): Type of member offset changed to
10718 `grub_host_off_t'. Type of member size changed to
10719 `grub_host_size_t'.
10721 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10723 Make GRUB's kernel compliant to Multiboot Specification.
10725 * kern/i386/pc/startup.S (multiboot_header): New label.
10726 (multiboot_entry): Likewise.
10727 (multiboot_trampoline): Likewise.
10729 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10730 Increased to 0x4A0.
10732 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10733 put parentheses after a question mark.
10734 [!GRUB_UTIL] (my_mod): New variable.
10736 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10738 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
10740 Adds support for the XFS filesystem. Btrees are not supported
10743 * fs/xfs.c: New file.
10745 * DISTLIST: Added `fs/xfs.c'.
10747 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10748 (grub_probefs_SOURCES): Likewise.
10749 (grub_emu_SOURCES): Likewise.
10750 (pkgdata_MODULES): Add `xfs.mod'.
10751 (xfs_mod_SOURCES): New variable.
10752 (xfs_mod_CFLAGS): Likewise.
10754 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10755 (pkgdata_MODULES): Add `xfs.mod'.
10756 (xfs_mod_SOURCES): New variable.
10757 (xfs_mod_CFLAGS): Likewise.
10759 * util/grub-emu.c (main): Call `grub_xfs_init' and
10762 * include/grub/fs.h (grub_xfs_init): New prototype.
10763 (grub_xfs_fini): Likewise.
10766 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10768 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10769 color modes, allow greater than 16 colors to be configured as
10772 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10774 * normal/completion.c (complete_arguments): Add the qualifier
10775 const into OPTIONS.
10777 From Omniflux <omniflux+lists@omniflux.com>:
10778 * include/grub/terminfo.h: New file.
10779 * include/grub/tparm.h: Likewise.
10780 * include/grub/i386/pc/serial.h: Likewise.
10781 * term/terminfo.c: Likewise.
10782 * term/tparm.c: Likewise.
10783 * term/i386/pc/serial.c: Likewise.
10784 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10786 (terminfo_mod_SOURCES): New variable.
10787 (terminfo_mod_CFLAGS): Likewise.
10788 (serial_mod_SOURCES): Likewise.
10789 (serial_mod_CFLAGS): Likewise.
10791 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10793 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10794 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10795 and kern/powerpc/ieee1275/cmain.c, respectively.
10797 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10798 * kern/powerpc/ieee1275/crt0.S: ... here.
10800 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10801 * kern/powerpc/ieee1275/cmain.c: ... here.
10803 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10804 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10805 instead of boot/powerpc/ieee1275/crt0.S and
10806 boot/powerpc/ieee1275/cmain.c, respectively.
10808 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10809 sectors. It was not used anyway.
10811 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10813 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10814 `unused parameter' warning.
10816 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10818 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10820 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10823 2005-08-28 Marco Gerards <metgerards@student.han.nl>
10825 * include/grub/normal.h (enum grub_completion_type): Added
10826 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10828 * normal/cmdline.c (print_completion): Handle
10829 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10830 * normal/menu_entry.c (store_completion): Likewise.
10832 * normal/completion.c (complete_arguments): New function.
10833 (grub_normal_do_completion): Call `complete_arguments' when the
10834 current words start with a dash.
10836 2005-08-27 Marco Gerards <metgerards@student.han.nl>
10838 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10839 `gzio.mod' instead of `io.mod').
10841 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10843 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10844 (DISTDIRS): Added io and video.
10845 Rewrite the search routine to make an output consistently.
10847 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10848 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10849 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10850 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10851 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10852 util/powerpc/ieee1275/misc.c.
10854 * include/grub/gzio.h: New file.
10855 * io/gzio.c: Likewise.
10857 * kern/file.c (grub_file_close): Call grub_device_close only if
10858 FILE->DEVICE is not NULL.
10860 * include/grub/mm.h [!NULL] (NULL): New macro.
10862 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10864 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10865 (pkgdata_MODULES): Added gzio.mod.
10866 (gzio_mod_SOURCES): New variable.
10867 (gzio_mod_CFLAGS): Likewise.
10869 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10870 (pkgdata_MODULES): Added gzio.mod.
10871 (gzio_mod_SOURCES): New variable.
10872 (gzio_mod_CFLAGS): Likewise.
10874 * commands/cat.c: Include grub/gzio.h.
10875 (grub_cmd_cat): Use grub_gzfile_open instead of
10878 * commands/cmp.c: Include grub/gzio.h.
10879 (grub_cmd_cmp): Use grub_gzfile_open instead of
10882 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10883 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10885 (grub_rescue_cmd_module): Likewise.
10887 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10889 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10890 kern/sparc64/ieee1275/init.c because it contains _start.
10891 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10893 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10895 * configure.ac: Add support for sparc64 host with ieee1275
10897 * configure: Generated from configure.ac.
10898 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10900 (grub_ofdisk_read): Likewise.
10901 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10902 pointers as (void *) to remove a warning.
10903 (grub_ofdisk_close): Likewise.
10904 (grub_ofdisk_read): Likewise.
10905 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10906 returns, so make it return void to remove a warning.
10907 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10908 Corresponding prototype change.
10909 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10910 values, and cast the pointers as (void *) to remove a warning.
10911 (grub_mm_dump): Likewise.
10912 * conf/sparc64-ieee1275.mk: New file.
10913 * conf/sparc64-ieee1275.rmk: Likewise.
10914 * include/grub/sparc64/setjmp.h: Likewise.
10915 * include/grub/sparc64/types.h: Likewise.
10916 * include/grub/sparc64/ieee1275/console.h: Likewise.
10917 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10918 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10919 * include/grub/sparc64/ieee1275/time.h: Likewise.
10920 * kern/sparc64/cache.c: Likewise.
10921 * kern/sparc64/dl.c: Likewise.
10922 * kern/sparc64/ieee1275/init.c: Likewise.
10923 * kern/sparc64/ieee1275/openfw.c: Likewise.
10925 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10927 * util/console.c (grub_ncurses_putchar): If C is greater than
10928 0x7f, set C to a question mark.
10929 (grub_ncurses_getcharwidth): New function.
10930 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10933 * normal/menu.c (print_entry): Made aware of Unicode. First,
10934 convert TITLE to UCS-4, and predict the cursor position by
10937 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10939 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10941 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10943 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10944 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10947 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10948 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10949 grub_strcpy and grub_strlen. Take it into account that a space
10950 character is inserted as a delimiter.
10952 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10954 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10955 invalid magic in the error.
10957 * commands/search.c: New file.
10959 * util/grub-emu.c (main): Call grub_search_init and
10962 * kern/rescue.c (grub_rescue_print_disks): Removed.
10963 (grub_rescue_print_devices): New function.
10964 (grub_rescue_cmd_ls): Use grub_device_iterate with
10965 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10966 grub_rescue_print_disks.
10968 * kern/partition.c (grub_partition_iterate): Return the result of
10969 PARTMAP->ITERATE instead of GRUB_ERRNO.
10971 * kern/device.c: Include grub/partition.h.
10972 (grub_device_iterate): New function.
10974 * include/grub/partition.h (grub_partition_iterate): Return int
10975 instead of grub_err_t.
10977 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10979 [GRUB_UTIL] (grub_search_fini): Likewise.
10981 * include/grub/device.h (grub_device_iterate): New prototype.
10983 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10985 (pkgdata_MODULES): Added search.mod.
10986 (search_mod_SOURCES): New variable.
10987 (search_mod_CFLAGS): Likewise.
10989 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10990 (pkgdata_MODULES): Added search.mod.
10991 (search_mod_SOURCES): New variable.
10992 (search_mod_CFLAGS): Likewise.
10994 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10995 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10996 All callers changed.
10998 * DISTLIST: Added commands/search.c.
11000 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11002 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11004 (grub_getcharwidth): New function.
11006 * kern/misc.c (grub_utf8_to_ucs4): New function.
11008 * include/grub/term.h (struct grub_term): Added a new member
11010 (grub_getcharwidth): New prototype.
11012 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11014 * term/i386/pc/console.c (map_char): New function. Segregated from
11015 grub_console_putchar.
11016 (grub_console_putchar): Use map_char.
11017 (grub_console_getcharwidth): New function.
11018 (grub_console_term): Specified grub_console_getcharwidth as
11021 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11022 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11024 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11026 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11027 on grub_strtoul completely.
11028 (write_char): Declare local variables in the beginning of the
11030 (grub_vesafb_getcharwidth): New function.
11031 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11034 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
11036 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11037 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11038 commands/i386/pc/vbetest.c.
11040 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11041 call grub_vbe_get_controller_info again, because the returned
11042 information is volatile.
11043 (grub_vbe_set_video_mode): Mostly rewritten.
11044 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11045 grub_vbe_status_t correctly.
11046 (grub_vbe_get_video_mode_info): Likewise.
11047 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11048 several if statements.
11050 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11051 * commands/i386/pc/vbeinfo.c: ... this.
11053 * commands/i386/pc/vbe_test.c: Renamed to ...
11054 * commands/i386/pc/vbetest.c: ... this.
11056 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11058 (grub_cmd_vbeinfo): ... this. Save video modes before
11059 iterating. Skip a video mode, if it is not available, not enough
11060 information is given or it is monochrome. Show the memory
11061 model. Leave the interpretation of MODEVAR to grub_strtoul
11063 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11064 (GRUB_MOD_FINI): Likewise.
11066 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11067 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11068 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11069 duplicated grub_env_get. Leave the interpretation of MODEVAR to
11070 grub_strtoul completely.
11071 (real2pm): Removed.
11072 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11073 (GRUB_MOD_FINI): Likewise.
11075 * normal/misc.c: Include grub/mm.h.
11077 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11078 vbe_list_modes with vbetest.mod and vbeinfo.mod.
11079 (vbe_list_modes_mod_SOURCES): Removed.
11080 (vbe_list_modes_mod_CFLAGS): Likewise.
11081 (vbe_test_mod_SOURCES): Likewise.
11082 (vbe_test_mod_CFLAGS): Likewise.
11083 (vbeinfo_mod_SOURCES): New variable.
11084 (vbeinfo_mod_CFLAGS): Likewise.
11085 (vbetest_mod_SOURCES): Likewise.
11086 (vbetest_mod_CFLAGS): Likewise.
11088 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
11090 * normal/misc.c: New file.
11092 * DISTLIST: Added normal/misc.c.
11094 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11095 DISK to HOOK. Call HOOK with DISK.
11096 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11097 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11098 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11100 * normal/menu_entry.c (struct screen): Added a new member
11101 "completion_shown".
11102 (completion_buffer): New global variable.
11103 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11104 (store_completion): New function.
11105 (complete): Likewise.
11106 (clear_completions): Likewise.
11107 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11108 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11109 a tab, call complete.
11111 * normal/completion.c (disk_dev): Removed.
11112 (print_simple_completion): Likewise.
11113 (print_partition_completion): Likewise.
11114 (print_func): New global variable.
11115 (add_completion): Do not take the arguments WHAT or PRINT any
11116 longer. Added a new argument TYPE. Instead of printing directly,
11117 call PRINT_FUNC if not NULL.
11118 All callers changed.
11119 (complete_device): Use a local variable DEV instead of
11120 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11121 (grub_normal_do_completion): Take a new argument HOOK. Do not
11122 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11123 empty string, return NULL instead.
11124 All callers changed.
11126 * normal/cmdline.c (print_completion): New function.
11128 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11130 All callers changed.
11132 * kern/disk.c (grub_print_partinfo): Removed.
11134 * include/grub/partition.h (struct grub_partition_map): Add a new
11135 argument DISK into HOOK of ITERATE.
11136 (grub_partition_iterate): Add a new argument DISK to HOOK.
11138 * include/grub/normal.h (enum grub_completion_type): New enum.
11139 (grub_completion_type_t): New type.
11140 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11141 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11142 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11143 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11144 (grub_normal_do_completion): Added a new argument HOOK.
11145 (grub_normal_print_device_info): New prototype.
11147 * include/grub/disk.h (grub_print_partinfo): Removed.
11149 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11150 (normal_mod_SOURCES): Likewise.
11151 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11152 (normal_mod_SOURCES): Likewise.
11154 * commands/ls.c (grub_ls_list_disks): Use
11155 grub_normal_print_device_info instead of grub_print_partinfo. Free
11157 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11158 duplicating the code.
11160 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11162 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
11163 follow GCS more precisely.
11164 * commands/i386/pc/vbe_test.c: Likewise.
11165 * include/grub/i386/pc/vbe.h: Likewise.
11166 * term/i386/pc/vesafb.c: Likewise.
11167 * video/i386/pc/vbe.c: Likewise.
11169 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11171 * DISTLIST: Added term/i386/pc/vesafb.c
11172 DISTLIST: Added video/i386/pc/vbe.c
11173 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11174 DISTLIST: Added commands/i386/pc/vbe_test.c.
11175 * commands/i386/pc/vbe_list_modes.c: New file.
11176 * commands/i386/pc/vbe_test.c: Likewise.
11177 * term/i386/pc/vesafb.c: Likewise.
11178 * video/i386/pc/vbe.c: Likewise.
11179 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11180 (grub_vbe_probe) Added prototype.
11181 (grub_vbe_set_video_mode) Likewise.
11182 (grub_vbe_get_video_mode) Likewise.
11183 (grub_vbe_get_video_mode_info) Likewise.
11184 (grub_vbe_set_pixel_rgb) Likewise.
11185 (grub_vbe_set_pixel_index) Likewise.
11186 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11187 (pkgdata_MODULES): Added vesafb.mod.
11188 (pkgdata_MODULES): Added vbe_list_modes.mod.
11189 (pkgdata_MODULES): Added vbe_test.mod.
11190 (vbe_mod_SOURCES): Added.
11191 (vbe_mod_CFLAGS): Likewise.
11192 (vesafb_mod_SOURCES): Likewise.
11193 (vesafb_mod_CFLAGS): Likewise.
11194 (vbe_list_modes_mod_SOURCES): Likewise.
11195 (vbe_list_modes_mod_CFLAGS): Likewise.
11196 (vbe_test_mod_SOURCES): Likewise.
11197 (vbe_test_mod_CFLAGS): Likewise.
11199 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11201 * normal/command.c (grub_command_execute): If INTERACTIVE is
11202 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11203 CMDLINE. Disable the pager if INTERACTIVE is true.
11204 All callers are changed.
11206 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11207 before reading a config file.
11208 * normal/main.c (read_config_file): Even if a command is not
11209 found, register it if it is within an entry.
11211 * util/grub-emu.c: Include sys/types.h and unistd.h.
11212 (options): Added --hold.
11213 (struct arguments): Added a new member "hold".
11214 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11216 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11217 cleared by a debugger, if it is not zero.
11219 * include/grub/normal.h (grub_command_execute): Add an argument
11222 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11224 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11226 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11228 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11229 program with another one, because the old one didn't detect a bug
11230 in gcc-3.4. Always use regparm 2, because the new test is still
11231 not enough for gcc-4.0. Someone must investigate a simple test
11232 case which detects a bug in gcc-4.0.
11234 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11236 * DISTLIST: Added normal/completion.c.
11238 * normal/completion.c: New file.
11240 * term/i386/pc/console.c (grub_console_getwh): New function.
11241 (grub_console_term): Assign grub_console_getwh to getwh.
11243 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11244 function is defined in normal/completion.c as
11245 grub_normal_do_completion.
11246 (grub_cmdline_get): Use grub_normal_do_completion instead of
11249 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11250 returns non-zero, otherwise return 0.
11251 (grub_partition_iterate): First, probe the partition map. Then,
11252 call ITERATE only for this partition map.
11254 * kern/misc.c (grub_strncmp): Rewritten.
11256 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11257 returns non-zero. Otherwise return 0.
11259 * include/grub/partition.h (grub_partition_map_iterate): Return
11260 int instead of void.
11262 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11264 * include/grub/misc.h (grub_strncmp): Change the type of N to
11267 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11270 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
11271 unsigned explicitly before comparing it with I.
11273 * kern/main.c (grub_env_write_root): Add the attribute unused into
11276 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11277 normal/completion.c.
11278 (normal_mod_SOURCES): Likewise.
11279 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11280 (normal_mod_SOURCES): Likewise.
11282 * normal/command.c (grub_iterate_commands): If ITERATE returns
11283 non-zero, return one immediately.
11285 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11287 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11288 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11290 (grub_vbe_get_controller_info): New function.
11291 (grub_vbe_get_mode_info): Likewise.
11292 (grub_vbe_set_mode): Likewise.
11293 (grub_vbe_get_mode): Likewise.
11294 (grub_vbe_set_memory_window): Likewise.
11295 (grub_vbe_get_memory_window): Likewise.
11296 (grub_vbe_set_scanline_length): Likewise.
11297 (grub_vbe_get_scanline_length): Likewise.
11298 (grub_vbe_set_display_start): Likewise.
11299 (grub_vbe_get_display_start): Likewise.
11300 (grub_vbe_set_palette_data): Likewise.
11301 * include/grub/i386/pc/vbe.h: New file.
11303 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11305 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11306 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11307 * DISTLIST: Likewise.
11308 * kern/ieee1275/of.c: Moved to ...
11309 * kern/ieee1275/ieee1275.c: ... here.
11311 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11313 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11314 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11315 Pass 0 as `end' parameter to grub_strtoul().
11317 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11319 * include/grub/powerpc/ieee1275/console.h: Do not include
11320 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11322 (grub_console_cur_color): Remove i386-specific prototype.
11323 (grub_console_real_putchar): Likewise.
11324 (grub_console_checkkey): Likewise.
11325 (grub_console_getkey): Likewise.
11326 (grub_console_getxy): Likewise.
11327 (grub_console_gotoxy): Likewise.
11328 (grub_console_cls): Likewise.
11329 (grub_console_setcursor): Likewise.
11330 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11331 Include <grub/machine/console.h>.
11332 * term/ieee1275/ofconsole.c: Likewise.
11334 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11336 * Makefile.in (LIBLZO): New variable.
11338 * configure.ac: Check for LZO version 2.
11340 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11341 lzo/lzo1x.h instead of lzo1x.h.
11343 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11346 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11347 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11349 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11350 copying the data from PARTITION to P.
11352 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11354 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11355 negative, unload the module.
11357 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11358 map is "pc_partition_map" but not "pc".
11359 (usage): Fix the description. The options are --boot-image and
11360 --core-image but not --boot-file or --core-file.
11361 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11362 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11365 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11366 --core-file. Specify INSTALL_DEVICE as an argument.
11368 * util/console.c: Include config.h.
11369 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11370 [HAVE_NCURSES_H]: Include ncurses.h.
11371 [HAVE_CURSES_H]: Include curses.h.
11372 [!A_NORMAL] (A_NORMAL): Defined as zero.
11373 [!A_STANDOUT] (A_STANDOUT): Likewise.
11375 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11377 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11379 * configure.ac: Check for curses libraries and headers.
11381 * Makefile.in (LIBCURSES): New variable.
11383 * genmk.rb (Script::rule): Set the executable bits.
11385 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11386 name of the PC partition map is "pc_partition_map" but not "pc".
11388 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11390 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11391 (modules): Likewise.
11392 (usage): Added descriptions for --modules and --grub-probefs.
11393 Handle --modules and --grub-probefs. Save the arguments in MODULES
11394 and GRUB_PROBEFS, respectively.
11395 Auto-detect a filesystem module against GRUBDIR. If the result is
11396 empty and modules are not specified explicitly, abort the
11397 installation. Add the result to MODULES.
11399 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11400 disk/powerpc/ieee1275/ofdisk.c,
11401 include/grub/powerpc/ieee1275/init.h and
11402 term/powerpc/ieee1275/ofconsole.c.
11403 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11404 term/ieee1275/ofconsole.c.
11406 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11408 * COPYING: Upgraded to the latest version. Only the address of the
11409 FSF office has changed.
11411 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11413 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11414 kern/ieee1275.c with kern/ieee1275/of.c.
11416 * kern/ieee1275.c: Moved to ...
11417 * kern/ieee1275/of.c: ... here.
11419 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11421 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
11424 * config.guess: Updated to the latest version from gnulib.
11425 * config.sub: Likewise.
11426 * install.sh: Likewise.
11427 * mkinstalldirs: Likewise.
11429 * include/grub/console.h: Removed. This file is arch-specific. Do
11430 not put this in include/grub.
11432 * include/grub/i386/pc/console.h: Resurrected.
11434 * util/console.c: Include grub/machine/console.h instead of
11436 * util/grub-emu.c: Likewise.
11438 2005-08-04 Marco Gerards <metgerards@student.han.nl>
11440 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11443 From Vincent Pelletier <subdino2004@yahoo.fr>
11444 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11445 Redefined to use grub_getwh.
11446 (grub_term): New member named getwh.
11447 (grub_getwh): New prototype.
11448 * kern/term.c (grub_getwh): New function.
11449 * term/i386/pc/console.c (grub_console_getwh): New function.
11450 (grub_console_term): New member `getwh'.
11451 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11452 (grub_vga_term): New member `getwh'.
11453 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
11455 (grub_ofconsole_getw): New function.
11456 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11457 (grub_ofconsole_term): New field named getwh and new initial
11460 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11462 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11463 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11464 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11465 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11466 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11467 of <grub/machine/ieee1275.h>.
11468 * commands/ieee1275/reboot.c: Likewise.
11469 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11470 * kern/ieee1275.c: ... to here. All users updated. Change all
11471 parameter structs to use new type `grub_ieee1275_cell_t'.
11472 * term/powerpc/ieee1275/ofconsole.c: Move ...
11473 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11474 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11475 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11476 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11478 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11479 Remove unused prototypes. All users updated.
11480 * include/grub/powerpc/ieee1275/console.h: Removed.
11481 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11482 `grub_ieee1275_cell_t'.
11483 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11484 Cast comparisons with -1 to the correct type.
11485 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11486 type to match `grub_ieee1275_entry_fn'.
11488 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11490 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11492 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11493 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11495 (grub_probefs_SOURCES): New variable.
11497 * util/i386/pc/grub-probefs.c: New file.
11499 * util/i386/pc/grub-setup.c (main): Call
11500 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11501 grub_hfs_init and grub_jfs_init to initialize the system. Call
11502 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11503 grub_pc_partition_map_fini to finish the system.
11505 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11507 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11509 (grub_multiboot_load_elf32): Likewise.
11510 (grub_multiboot_is_elf64): Likewise.
11511 (grub_multiboot_load_elf64): Likewise.
11512 (grub_multiboot_load_elf): Likewise.
11513 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11514 an ELF32 or ELF64 file.
11515 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11517 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11518 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11519 NULL before calling FS->LABEL.
11520 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11521 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11522 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11523 before calling FS->LABEL.
11525 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11527 * util/i386/pc/grub-install.in (datadir): New variable.
11529 (pkgdatadir): New variable.
11530 (pkglibdir): Removed.
11532 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11534 * DISTLIST: Added util/i386/pc/grub-install.in.
11536 * util/i386/pc/grub-install.in: New file.
11538 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11539 (grub_install_SOURCES): Likewise.
11541 * genmk.rb: Added support for scripts.
11542 (Script): New class.
11543 (scripts): New variable.
11545 * Makefile.in (install-local): Install sbin_SCRIPTS by
11547 (uninstall): Remove sbin_SCRIPTS.
11549 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11550 device, try to get a GRUB device by
11551 grub_util_biosdisk_get_grub_dev.
11554 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11555 description for --device-map.
11557 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11559 Change the semantics of variable hooks. They now return strings
11560 instead of error values.
11562 * util/i386/pc/grub-setup.c: Include grub/env.h.
11563 (setup): Use grub_device_set_root instead of grub_env_set.
11565 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11566 grub_env_get instead of grub_device_set_root and
11567 grub_device_get_root, respectively.
11569 * kern/main.c (grub_env_write_root): New function.
11570 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11571 grub_env_set instead of grub_device_set_root.
11573 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11575 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11576 rather than calling ENV->WRITE_HOOK afterwards.
11577 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11578 passing a pointer of a pointer.
11579 (grub_register_variable_hook): Change the types of "read_hook" and
11580 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11582 Allocate the default empty string on the heap, because this string
11583 may be freed later.
11585 * kern/device.c: Include grub/env.h.
11586 (grub_device_set_root): Removed.
11587 (grub_device_get_root): Likewise.
11588 (grub_device_open): Use grub_env_get instead of
11589 grub_device_get_root.
11591 * include/grub/env.h (grub_env_read_hook_t): New type.
11592 (grub_env_write_hook_t): Likewise.
11593 (grub_env_var): Change the types of "read_hook" and "write_hook"
11594 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11595 (grub_register_variable_hook): Likewise.
11597 * include/grub/device.h (grub_device_set_root): Removed.
11598 (grub_device_set_root): Likewise.
11600 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11601 make sure that DIRNAME terminates with '/', so that
11602 grub_fat_find_dir will fail if PATH is not a directory.
11604 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11606 Use the qualifier auto for print_files and print_files_long.
11607 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11609 Put a newline only if there is no error.
11610 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11613 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11615 * kern/partition.c (grub_partition_probe): Initialize PART to
11616 NULL. Otherwise, when no partition map is registered, this returns
11619 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11621 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11622 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11625 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11627 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11628 information on each device, if it does not have partitions. Print
11629 "Device" instead of "Disk", because this function is not specific
11632 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11633 static to ensure that it is put on the memory rather than a
11636 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11638 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
11639 (grub_cat_init): Likewise.
11640 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
11641 (options): Likewise.
11642 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
11643 (grub_configfile_init): Likewise.
11644 * font/manager.c (GRUB_MOD_INIT): Likewise.
11645 * commands/help.c (GRUB_MOD_INIT): Likewise.
11646 (grub_help_init): Likewise.
11647 * normal/command.c (grub_command_init): Likewise.
11648 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11649 * disk/loopback.c (grub_loop_init): Likewise.
11650 (GRUB_MOD_INIT): Likewise.
11651 * commands/ls.c (grub_ls_init): Likewise.
11652 (GRUB_MOD_INIT): Likewise.
11653 (options): Likewise.
11654 * commands/boot.c (grub_boot_init): Likewise.
11655 (GRUB_MOD_INIT): Likewise.
11656 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11657 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11658 (GRUB_MOD_INIT): Likewise.
11659 * commands/cmp.c (grub_cmp_init): Likewise.
11660 (GRUB_MOD_INIT): Likewise.
11662 * normal/arg.c: Use <> instead of "" to include header files.
11663 (SHORT_ARG_HELP): New macro.
11664 (SHORT_ARG_USAGE): Likewise.
11665 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11666 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11668 (find_short): Check if C is 'h' or 'u' explicitly.
11669 (grub_arg_show_help): Use space characters instead of tabs. Treat
11670 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11671 are shown with --help and --usage only if they are not used for
11672 the command itself.
11673 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11676 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11677 const into "longarg". Change the type of "shortarg" to int.
11679 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11681 * boot/i386/pc/boot.S (boot_drive_check): New label.
11683 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11686 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11687 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11689 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11691 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11692 When turning off Gate A20, skip the check and return immediately,
11693 because this is not fatal usually.
11695 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11697 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11698 be 0x7C00 instead of 0x8000.
11700 * boot/i386/pc/pxeboot.S: Rewritten.
11702 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11704 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11707 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11709 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11710 robustness. This routine now supports a BIOS call and System
11711 Control Port A to modify the gate A20.
11713 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11714 Increased to 0x440.
11716 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11718 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11719 device path and resulting ihandle.
11720 (grub_ofdisk_close): dprintf the ihandle being closed.
11721 (grub_ofdisk_read): dprintf function parameters.
11722 * kern/mm.c (grub_mm_init_region): Likewise.
11723 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11724 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11725 size, and boot arguments.
11726 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11727 before loading into memory.
11728 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11729 before loading into memory.
11731 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11733 * kern/mm.c: Added much documentation.
11734 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11735 8, set to 5 instead of 8.
11737 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11739 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11741 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11742 (grub_mkdevicemap_SOURCES): New variable.
11744 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11745 lib/device.c of GRUB Legacy.
11747 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11749 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11750 instead of PATH is NULL.
11752 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11754 * commands/cmp.c (BUFFER_SIZE): New macro.
11755 (grub_cmd_cmp): Close the right file at the right time. Compare
11756 only data just read. Don't report files of different size as
11757 identical. Dynamically allocate buffers. Move variable
11758 declarations at the beginning of function.
11760 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
11762 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11765 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11767 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11768 when backspace is pressed at beginning of line.
11770 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
11772 * DISTLIST: Added genfslist.sh.
11774 * normal/main.c (fs_module_list): New variable.
11775 (autoload_fs_module): New function.
11776 (read_fs_list): Likewise.
11777 (grub_normal_execute): Call read_fs_list.
11779 * kern/fs.c (grub_fs_autoload_hook): New variable.
11780 (grub_fs_probe): Added support for auto-loading.
11782 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11783 (grub_fs_module_list_t): New type.
11785 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11786 (grub_fs_autoload_hook): New prototype.
11788 * genfslist.sh: New file.
11790 * genmk.rb: Added a rule to generate a filesystem list.
11792 2005-06-30 Marco Gerards <metgerards@student.han.nl>
11794 * configure.ac: Fix the test for cross-compiling.
11796 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11797 define GRUB_UTIL anymore.
11799 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11800 so this function works on other systems than just big endian.
11801 (load_modules): Likewise.
11802 (add_segments): Likewise.
11804 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11806 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11807 contains `l' modifier, get a long from va_arg().
11809 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11811 * kern/mm.c (grub_free): If the next free block which is being
11812 merged is the first free block, set the first block to the block
11814 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11816 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11818 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11819 `grub_ieee1275_chosen'.
11821 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11823 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11824 (grub_ieee1275_chosen): New variable.
11825 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11827 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11828 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11829 Rename first argument to `phandle' for consistency.
11830 (grub_ieee1275_get_property_length): Likewise.
11831 (grub_ieee1275_next_property): Likewise. Change type of first argument
11832 to grub_ieee1275_phandle_t.
11833 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11834 Move export next to declaration.
11835 (grub_ieee1275_chosen): New variable.
11836 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11837 Correct cosmetic typo.
11838 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11839 `grub_ieee1275_chosen'.
11840 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11841 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11842 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11843 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11844 `grub_ieee1275_chosen'.
11846 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11848 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11850 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11851 /chosen/bootargs as "variable=value" pairs.
11853 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11855 * include/grub/misc.h (grub_dprintf): New macro.
11856 (grub_real_dprintf): New prototype.
11857 (grub_strword): Likewise.
11858 (grub_iswordseparator): Likewise.
11859 * kern/misc.c (grub_real_dprintf): New function.
11860 (grub_strword): Likewise.
11861 (grub_iswordseparator): Likewise.
11863 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11865 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11866 (roundup): Remove macro.
11867 (grub_ieee1275_flags): Make static.
11868 (grub_ieee1275_realmode): Remove.
11869 (grub_ieee1275_test_flag): New function.
11870 (grub_ieee1275_set_flag): Likewise.
11871 (find_options): Rename to `grub_ieee1275_find_options'; update
11872 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11873 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11874 (cmain): New prototype.
11875 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11876 `grub_ieee1275_flags' directly.
11877 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11878 machine/biosdisk.h.
11879 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11880 Don't include grub/machine/init.h.
11881 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11882 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11884 (grub_ieee1275_realmode): Likewise.
11885 (grub_ieee1275_flag): New enum.
11886 (grub_ieee1275_test_flag): New prototype.
11887 (grub_ieee1275_set_flag): New prototype.
11888 * include/grub/powerpc/ieee1275/init.h: Remove file.
11889 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11890 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11891 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11892 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11894 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11895 `grub_ieee1275_test_flag'.
11896 (grub_ieee1275_encode_devname): Likewise.
11898 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11900 * include/grub/powerpc/ieee1275/ieee1275.h
11901 (grub_ieee1275_encode_devname): New prototype.
11902 (grub_ieee1275_get_filename): Likewise.
11903 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11905 (grub_set_prefix): Likewise.
11906 (grub_machine_init): Call grub_set_prefix.
11907 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11908 (grub_parse_type): New enum.
11909 (grub_ieee1275_get_devargs): New function.
11910 (grub_ieee1275_get_devname): Likewise.
11911 (grub_ieee1275_parse_args): Likewise.
11912 (grub_ieee1275_get_filename): Likewise.
11913 (grub_ieee1275_encode_devname): Likewise.
11915 2005-03-30 Marco Gerards <metgerards@student.han.nl>
11917 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11918 `grub_loader_unset'.
11920 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11922 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11923 instead of grub_ieee1275_interpret.
11924 (grub_halt_init): New function.
11925 (grub_halt_fini): Likewise.
11926 (GRUB_MOD_INIT): Correct message grammar.
11927 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11928 instead of grub_ieee1275_interpret.
11929 (grub_reboot_init): New function.
11930 (grub_reboot_fini): Likewise.
11931 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11932 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11933 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11934 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11935 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11937 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11939 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11941 (grub_halt): Likewise.
11942 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11943 (cmain): Remove __attribute__((unused)).
11944 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11945 (grub_heap_len): Likewise.
11946 (grub_machine_fini): New function.
11947 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11948 (grub_halt): Likewise.
11949 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11951 * util/powerpc/ieee1275/misc.c: New file.
11953 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11955 * DISTLIST: New file.
11956 * gendistlist.sh: Likewise.
11958 * Makefile.in (COMMON_DISTFILES): Removed.
11959 (BOOT_DISTFILES): Likewise.
11960 (CONF_DISTFILES): Likewise.
11961 (DISK_DISTFILES): Likewise.
11962 (FS_DISTFILES): Likewise.
11963 (INCLUDE_DISTFILES): Likewise.
11964 (KERN_DISTFILES): Likewise.
11965 (LOADER_DISTFILES): Likewise.
11966 (TERM_DISTFILES): Likewise.
11967 (UTIL_DISTFILES): Likewise.
11968 (DISTFILES): Likewise.
11969 (uninstall): Uninstall files in $(pkgdata_DATA).
11970 (DISTLIST): New target.
11971 (distdir): Use the contents of the file DISTLIST to get a list of
11974 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11976 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11977 descriptor. This is ported from GRUB Legacy.
11979 * gencmdlist.sh: Added an extra semicolon to make it work with
11980 old sed versions. Reported by Robert Bihlmeyer
11981 <robbe@orcus.priv.at>.
11983 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
11985 Automatic loading of commands is supported.
11987 * normal/main.c (read_command_list): New function.
11988 (grub_normal_execute): Call read_command_list.
11990 * normal/command.c (grub_register_command): Return zero or CMD.
11991 Allocate CMD->NAME from the heap.
11992 Initialize CMD->MODULE_NAME to zero.
11993 Find the same name as well. If the same command is found and it is
11994 a dummy command, overwrite members. If it is not a dummy command,
11996 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11997 (grub_command_find): If a dummy command is found, load a module
11998 and retry to find a command only once.
12000 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12001 make sure that each command is loaded.
12003 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12005 (struct grub_command): Remove const from the member `name'.
12006 Add a new member `module_name'.
12007 (grub_register_command): Return grub_command_t.
12009 * commands/help.c (grub_cmd_help): Call grub_command_find to make
12010 sure that each command is loaded.
12012 * genmk.rb (PModule::rule): Specify a module name without the
12013 suffix ".mod" to gencmdlist.sh.
12015 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12017 * gencmdlist.sh: New file.
12019 * genmk.rb (PModule::rule): Generate a rule for a command list.
12021 Generate command.lst from $(COMMANDFILES).
12023 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12024 (DATA): Added $(pkgdata_DATA).
12025 (install-local): Install files in $(pkgdata_DATA).
12027 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12029 * term/i386/pc/vga.c (debug_command): Removed.
12030 (GRUB_MOD_INIT): Do not register the command "debug".
12032 From Hollis Blanchard:
12033 * commands/configfile.c: New file.
12034 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12035 commands/configfile.c.
12036 (pkgdata_MODULES): Added configfile.mod.
12037 (configfile_mod_SOURCES): New variable.
12038 (configfile_mod_CFLAGS): Likewise.
12039 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12040 commands/configfile.c.
12041 (pkgdata_MODULES): Added configfile.mod.
12042 (configfile_mod_SOURCES): New variable.
12043 (configfile_mod_CFLAGS): Likewise.
12044 * util/grub-emu.c (main): Call grub_configfile_init and
12045 grub_configfile_fini.
12046 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12048 [GRUB_UTIL] (grub_configfile_fini): Likewise.
12050 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12052 * normal/arg.c (grub_arg_show_help): Do not show the bug report
12055 * commands/help.c (grub_cmd_help): Do not print newlines after
12056 the last command in print_command_help.
12058 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12060 * commands/default.h: New file.
12061 * commands/timeout.h: Likewise.
12062 * normal/context.c: Likewise.
12064 * util/misc.c: Do not include sys/times.h.
12065 Include sys/time.h and grub/machine/time.h.
12066 (grub_get_rtc): Rewritten with gettimeofday.
12068 * util/grub-emu.c (main): Call grub_default_init and
12069 grub_timeout_init before grub_normal_init, and call
12070 grub_timeout_fini and grub_default_fini after grub_main.
12072 * util/console.c (grub_ncurses_checkkey): Return the read
12075 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12078 * normal/main.c (read_config_file): Push MENU. If this fails,
12079 print an error and wait for a user input.
12080 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12081 If a menu is empty or an error occurs, pop MENU.
12082 (grub_normal_execute): Pop and free MENU after grub_menu_run
12085 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12087 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12089 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12091 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12093 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12096 * include/grub/normal.h (struct grub_menu_list): New struct.
12097 (grub_menu_list_t): New type.
12098 (struct grub_context): New struct.
12099 (grub_context_t): New type.
12100 (grub_register_command): Got rid of EXPORT_FUNC.
12101 (grub_unregister_command): Likewise.
12102 (grub_context_get): New prototype.
12103 (grub_context_get_current_menu): Likewise.
12104 (grub_context_push_menu): Likewise.
12105 (grub_context_pop_menu): Likewise.
12106 [GRUB_UTIL] (grub_default_init): Likewise.
12107 [GRUB_UTIL] (grub_default_fini): Likewise.
12108 [GRUB_UTIL] (grub_timeout_init): Likewise.
12109 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12111 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12112 commands/timeout.c and normal/context.c.
12113 (pkgdata_MODULES): Added default.mod and timeout.mod.
12114 (normal_mod_SOURCES): Added normal/context.c.
12115 (default_mod_SOURCES): New variable.
12116 (default_mod_CFLAGS): Likewise.
12117 (timeout_mod_SOURCES): Likewise.
12118 (timeout_mod_CFLAGS): Likewise.
12119 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12121 (pkgdata_MODULES): Added default.mod and timeout.mod.
12122 (normal_mod_SOURCES): Added normal/context.c.
12123 (default_mod_SOURCES): New variable.
12124 (default_mod_CFLAGS): Likewise.
12125 (timeout_mod_SOURCES): Likewise.
12126 (timeout_mod_CFLAGS): Likewise.
12128 * Makefile.in (all-local): Added $(MKFILES).
12130 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12132 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12133 (grub_emu_SOURCES): Likewise.
12134 (pkgdata_MODULES): Add `sun.mod'.
12135 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12136 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12138 (pkgdata_MODULES): Add `sun.mod'.
12139 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12140 * include/grub/partition.h (grub_sun_partition_map_init): New
12142 (grub_sun_partition_map_fini): Likewise.
12143 * partmap/sun.c: New file.
12144 * util/grub-emu.c (main): Initialize and de-initialize the sun
12145 partitionmap support.
12147 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12149 This implements an Emacs-like menu entry editor.
12151 * normal/menu_entry.c: New file.
12153 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12154 characters to ASCII.
12155 (saved_char): New variable.
12156 (grub_ncurses_checkkey): Rewritten completely.
12157 (grub_ncurses_getkey): Likewise.
12158 (grub_ncurses_init): Call raw instead of cbreak.
12160 * normal/menu.c (print_entry): Do not put a space.
12161 (init_page): Renamed to ...
12162 (grub_menu_init_page): ... this. All callers changed.
12163 (edit_menu_entry): Removed.
12164 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12166 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12168 * kern/misc.c (grub_vprintf): Call grub_refresh.
12170 * normal/menu.c (DISP_LEFT): Renamed to ...
12171 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12172 * normal/menu.c (DISP_UP): Renamed to ...
12173 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12174 * normal/menu.c (DISP_RIGHT): Renamed to ...
12175 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12176 * normal/menu.c (DISP_DOWN): Renamed to ...
12177 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12178 * normal/menu.c (DISP_HLINE): Renamed to ...
12179 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12180 * normal/menu.c (DISP_VLINE): Renamed to ...
12181 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12182 * normal/menu.c (DISP_UL): Renamed to ...
12183 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12184 * normal/menu.c (DISP_UR): Renamed to ...
12185 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12186 * normal/menu.c (DISP_LL): Renamed to ...
12187 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12188 * normal/menu.c (DISP_LR): Renamed to ...
12189 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12190 * normal/menu.c (TERM_WIDTH): Renamed to ...
12191 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12192 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12193 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12194 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12195 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12196 * normal/menu.c (TERM_MARGIN): Renamed to ...
12197 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12198 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12199 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12200 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12201 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12202 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12203 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12204 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12205 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12206 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12207 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12208 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12209 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12210 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12211 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12212 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12213 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12214 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12215 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12216 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12217 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12218 All callers changed.
12220 * include/grub/normal.h: New prototype.
12222 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12223 normal/menu_entry.c.
12224 (normal_mod_SOURCES): Likewise.
12225 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12226 (normal_mod_SOURCES): Likewise.
12228 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12230 * include/grub/normal.h (grub_halt_init): New prototype.
12231 (grub_halt_fini): Likewise.
12232 (grub_reboot_init): Likewise.
12233 (grub_reboot_fini): Likewise.
12235 * util/grub-emu.c: Include signal.h.
12236 (main_env): New global variable.
12237 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12239 (grub_machine_fini): New function.
12240 (main): Call grub_halt_init and grub_reboot_init before
12241 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12242 Call setjmp with MAIN_ENV to go back afterwards.
12243 Call grub_machine_fini right before return.
12245 * include/grub/util/misc.h: Include setjmp.h.
12246 (main_env): New prototype.
12248 * include/grub/kernel.h (grub_machine_fini): New prototype.
12249 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12250 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12252 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12253 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12254 * term/i386/pc/console.c (grub_console_fini): Likewise.
12256 * util/i386/pc/misc.c: New file.
12258 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12259 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12260 commands/i386/pc/reboot.c.
12262 2005-02-14 Guillem Jover <guillem@hadrons.org>
12264 * include/grub/dl.h (grub_dl_check_header): New prototype.
12265 (grub_arch_dl_check_header): Change return type to grub_err_t,
12266 remove size parameter and export function. Update all callers.
12267 * kern/dl.c (grub_dl_check_header): New function.
12268 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12269 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12270 are inside the core.
12271 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12272 independent ELF header checks.
12273 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12274 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12275 `grub_dl_check_header' instead of explicit checks. Check for the
12277 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12278 `grub_dl_check_header' instead of explicit checks. Remove arch
12279 specific ELF header checks.
12281 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12284 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12286 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12287 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12289 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12291 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
12292 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
12293 (part_map_iterate): Clear `grub_errno' and return 0 if
12294 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
12295 * partmap/amiga.c (amiga_partition_map_iterate): Return
12296 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12297 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12299 2005-02-01 Guillem Jover <guillem@hadrons.org>
12301 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12304 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12306 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12308 (grub_rescue_cmd_linux): New prototype.
12309 (grub_rescue_cmd_initrd): Likewise.
12310 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12312 (grub_linux_release_mem): Release the memory for the initrd.
12313 (grub_load_linux): Renamed from this...
12314 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12315 Changed `entry' not to be static. Loop over memory regions to
12316 find another one when the default fails.
12317 (grub_rescue_cmd_initrd): New function.
12318 (grub_linux_init): Remove function.
12319 (grub_linux_fini): Likewise.
12320 (GRUB_MOD_INIT): Register `initrd'.
12321 (GRUB_MOD_FINI): Unregister `initrd'.
12322 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12324 (grub_linux_normal_fini): Likewise.
12325 (GRUB_MOD_INIT): Register `initrd'.
12326 (GRUB_MOD_FINI): Unregister `initrd'.
12328 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12330 * commands/help.c: New file.
12331 * normal/arg.c (show_help): Renamed to...
12332 (grub_arg_show_help): ... this.
12333 * commands/i386/pc/halt.c: New file.
12334 * commands/i386/pc/reboot.c: Likewise.
12335 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12336 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12337 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12338 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12340 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12342 (pkgdata_MODULES): Add `help.mod'.
12343 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12344 * grub/i386/pc/init.h (grub_reboot): New prototype.
12345 (grub_halt): Likewise.
12346 * include/grub/normal.h (grub_arg_show_help): New prototype.
12347 (grub_help_init): Likewise.
12348 (grub_help_fini): Likewise.
12349 * util/grub-emu.c (main): Initialize and deinitialize the help
12352 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12354 * normal/command.c (grub_command_init): Fixed the description of
12355 the `set' and `unset' commands.
12357 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12359 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12361 * commands/ieee1275/halt.c: New file.
12362 * commands/ieee1275/reboot.c: Likewise.
12363 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12364 `__attribute__ ((unused))'. Some GCS related fixed.
12365 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12366 (grub_suspend_fini): Likewise.
12367 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12369 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12370 (halt_mod_CFLAGS): New variables.
12371 * include/grub/powerpc/ieee1275/ieee1275.h
12372 (grub_ieee1275_interpret): New prototype.
12374 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12376 * include/grub/misc.h (memmove): New prototype.
12377 (memcpy): Likewise.
12379 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12381 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12382 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12384 2005-01-22 Marco Gerards <metgerards@student.han.nl>
12386 * kern/misc.c (grub_strndup): Function rewritten.
12388 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12390 * normal/menu.c (TERM_WIDTH): Macro redefined.
12391 (TERM_TOP_BORDER_Y): Likewise.
12392 (draw_border): Replaced while-loop by a for-loop. Make the number
12393 of lines consistent with the number of lines displayed in
12394 print_entries. Added a margin below the rectangle.
12395 (print_entry): Make the entry fit in the rectangle.
12396 (print_entries): Display the scroll arrows next to the right
12399 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12401 * fs/minix.c (grub_minix_find_file): Reserve more space for
12402 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12403 `grub_strncpy' to copy `path' into it.
12405 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12407 Add the loopback device, a device via which files can be accessed
12410 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12411 (pkgdata_MODULES): Add loopback.mod.
12412 (loopback_mod_SOURCES): New variable.
12413 (loopback_mod_CFLAGS): Likewise.
12414 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12416 (pkgdata_MODULES): Add loopback.mod.
12417 (loopback_mod_SOURCES): New variable.
12418 (loopback_mod_CFLAGS): Likewise.
12419 * disk/loopback.c: new file.
12420 * include/grub/normal.h (grub_loop_init): New prototype.
12421 (grub_loop_fini): New prototype.
12422 * util/grub-emu.c (main): Initialize and de-initialize loopback
12424 * include/grub/disk.h (grub_disk_dev_id): Add
12425 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12427 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12429 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12431 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12432 (suspend_mod_SOURCES): New variable.
12433 (suspend_mod_CFLAGS): Likewise.
12434 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12436 * commands/ieee1275/suspend.c: New file.
12438 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12440 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
12441 ((unused))' to `__attribute__ ((used))'.
12442 (GRUB_MOD_FINI): Likewise.
12443 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12444 * genmk.rb (PModule): Assign space to common symbols when linking
12447 2005-01-20 Marco Gerards <metgerards@student.han.nl>
12449 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12450 `unsigned' arguments to `grub_size_t'.
12451 (grub_malloc): Likewise.
12452 (grub_realloc): Likewise.
12453 (grub_memalign): Likewise.
12454 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12455 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12456 * util/misc.c (grub_malloc): Likewise.
12457 (grub_realloc): Likewise.
12458 * kern/mm.c (get_header_from_pointer): Change the casts to
12459 `unsigned' into a cast to `grub_size_t'.
12461 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12462 point to `currnode' when `currnode' is changed.
12464 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12465 Schottelius <nico-linux@schottelius.org>.
12467 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12469 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12470 (note_path): Remove variable.
12471 (GRUB_IEEE1275_NOTE_NAME): New macro.
12472 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12473 (grub_ieee1275_note_hdr): New structure.
12474 (grub_ieee1275_note_desc): Likewise.
12475 (grub_ieee1275_note): Likewise.
12476 (load_note): Remove `dir' argument. All callers updated. Remove
12477 `note_img' and `path'. Do not load a file from `note_path'.
12478 Initialize a struct grub_ieee1275_note and write that to `out'.
12479 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12481 2005-01-05 Marco Gerards <metgerards@student.han.nl>
12483 * util/misc.c (grub_util_read_image): Revert last change. It
12484 called `grub_util_read_at', which seeks from the beginning of the
12487 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12489 * TODO: Add note about endianness in grub-mkimage.
12490 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12492 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12493 (grub_mkimage_SOURCES): New target.
12494 * include/grub/kernel.h (grub_start_addr): Remove variable.
12495 (grub_end_addr): Likewise.
12496 (grub_total_module_size): Likewise.
12497 (grub_kernel_image_size): Likewise.
12498 (GRUB_MODULE_MAGIC): New constant.
12499 (grub_module_info): New structure.
12500 (grub_arch_modules_addr): New prototype.
12501 (grub_get_end_addr): Remove prototype.
12502 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12503 * include/grub/powerpc/ieee1275/kernel.h: New file.
12504 * include/grub/util/misc.h (grub_util_get_fp_size): New
12506 (grub_util_read_at): Likewise.
12507 (grub_util_write_image_at): Likewise.
12508 * kern/main.c (grub_get_end_addr): Remove function.
12509 (grub_load_modules): Call grub_arch_modules_addr instead of using
12510 grub_end_addr. Look for a grub_module_info struct in memory. Use
12511 the grub_module_info fields instead of calling grub_get_end_addr
12512 as loop conditions. Move grub_add_unused_region code here.
12513 (grub_add_unused_region): Remove function.
12514 * kern/i386/pc/init.c: Include grub/cache.h.
12515 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12516 one call to add_mem_region.
12517 (grub_arch_modules_addr): New function.
12518 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12519 (grub_total_module_size): Likewise.
12520 Include grub/machine/kernel.h.
12521 (grub_arch_modules_addr): New function.
12522 * util/grub-emu.c (grub_end_addr): Remove variable.
12523 (grub_total_module_size): Likewise.
12524 (grub_arch_modules_addr): New function.
12525 * util/misc.c: Include unistd.h.
12526 (grub_util_get_fp_size): New function.
12527 (grub_util_read_at): Likewise.
12528 (grub_util_write_image_at): Likewise.
12529 (grub_util_read_image): Call grub_util_read_at.
12530 (grub_util_write_image): Call grub_util_write_image_at.
12531 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12532 additional memory in kernel_img for a struct grub_module_info.
12533 Fill in that grub_module_info.
12534 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12536 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12538 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12540 * include/grub/powerpc/ieee1275/ieee1275.h
12541 (grub_ieee1275_milliseconds): New prototype.
12542 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12544 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12545 grub_ieee1275_milliseconds.
12547 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12549 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12551 (find_options): New function.
12552 (cmain): Call find_options.
12553 * include/grub/powerpc/ieee1275/ieee1275.h
12554 (grub_ieee1275_realmode): New extern variable.
12555 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12556 grub_map if grub_ieee1275_realmode is false.
12558 2004-12-29 Marco Gerards <metgerards@student.han.nl>
12560 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12561 lines are inserted and make it work like readline. Reported by
12562 Vincent Pelletier <subdino2004@yahoo.fr>.
12564 2004-12-28 Marco Gerards <metgerards@student.han.nl>
12566 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12568 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12569 `kern/powerpc/cache.S'.
12571 2004-12-27 Marco Gerards <metgerards@student.han.nl>
12573 * genmk.rb: Handle the `Program' class in the main loop. Written
12574 by Johan Rydberg <jrydberg@gnu.org>.
12575 (Program): New class.
12576 (programs): New variable.
12577 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12578 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12579 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12580 (help_arch): Function removed.
12581 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12582 `powerpc/libgcc.h' and `loader.h'.
12583 (pkgdata_PROGRAMS): New variable.
12584 (sbin_UTILITIES): Variable removed.
12585 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12586 (grubof_SOURCES): Variable re-defined so it only includes the
12587 core functionality.
12588 (grubof_CFLAGS): Remove `-DGRUBOF'.
12589 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12590 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12591 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12592 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12593 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12594 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12595 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12596 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12597 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12598 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12599 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12600 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12601 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12602 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12603 (pc_mod_CFLAGS): New variables.
12604 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12605 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12606 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12607 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12609 * include/grub/i386/pc/init.h (grub_os_area_addr)
12610 (rub_os_area_size): ... to here.
12611 * include/grub/powerpc/ieee1275/ieee1275.h
12612 (grub_ieee1275_entry_fn): Export symbol.
12613 * include/grub/powerpc/ieee1275/init.h: New file.
12614 * include/grub/powerpc/libgcc.h: Likewise.
12615 * include/grub/cache.h: Likewise.
12616 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12617 <hollis@penguinppc.org>.
12618 * kern/dl.c: Include <grub/cache.h>.
12619 (grub_dl_flush_cache): New function.
12620 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12622 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12623 (grub_console_init): Removed prototypes.
12624 (grub_machine_init): Don't initialize the modules anymore.
12625 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12627 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12628 Macro undef removed.
12629 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12630 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12631 relocation `R_PPC_REL32'. Return an error when the relocation is
12633 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12634 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12635 * util/misc.c (grub_arch_sync_caches): Likewise.
12637 2004-12-19 Marco Gerards <metgerards@student.han.nl>
12639 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
12640 `symlist.c', add `grubof_symlist.c'.
12641 (symlist.c): Variable removed.
12642 (grubof_HEADERS): Variable added.
12643 (grubof_symlist.c): New target.
12644 (kernel_syms.lst): Use `grubof_HEADERS' instead of
12645 `kernel_img_HEADERS'.
12646 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12647 * kern/powerpc/dl.c: New file.
12648 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12650 (grub_arch_dl_relocate_symbols): Likewise.
12651 (grub_register_exported_symbols): Likewise.
12653 2004-12-13 Marco Gerards <metgerards@student.han.nl>
12655 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12656 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12657 to fail instead. Reported by Vincent Pelletier
12658 <subdino2004@yahoo.fr>.
12660 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12661 it is not allocated. Reported by Vincent Pelletier
12662 <subdino2004@yahoo.fr>.
12664 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12665 output so the output looks better.
12667 2004-12-04 Marco Gerards <metgerards@student.han.nl>
12669 Modulize the partition map support and add support for the amiga
12672 * commands/ls.c: Include <grub/partition.h> instead of
12673 <grub/machine/partition.h>.
12674 * kern/disk.c: Likewise.
12675 * kern/rescue.c: Likewise.
12676 * loader/i386/pc/chainloader.c: Likewise.
12677 * normal/cmdline.c: Likewise.
12678 * kern/powerpc/ieee1275/init.c: Likewise.
12679 (grub_machine_init): Call `grub_pc_partition_map_init',
12680 `grub_amiga_partition_map_init' and
12681 `grub_apple_partition_map_init'.
12682 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12683 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12684 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12685 `partition.h' and `pc_partition.h'.
12686 (grub_setup_SOURCES): Remove
12687 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12688 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12689 (grub_emu_SOURCES): Likewise.
12690 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12691 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12692 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12693 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12694 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12695 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12696 (grubof_SOURCES): Likewise.
12697 * disk/i386/pc/partition.c: File removed.
12698 * disk/powerpc/ieee1275/partition.c: Likewise.
12699 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12700 * include/grub/i386/pc/partition.h: Likewise.
12701 * kern/partition.c: New file.
12702 * partmap/amiga.c: Likewise.
12703 * partmap/apple.c: Likewise.
12704 * partmap/pc.c: Likewise.
12705 * include/grub/partition.h: Likewise..
12706 * include/grub/pc_partition.h: Likewise.
12707 * util/grub-emu.c: Include <grub/partition.h> instead of
12708 <grub/machine/partition.h>.
12709 (main): Call `grub_pc_partition_map_init',
12710 `grub_amiga_partition_map_init' and
12711 `grub_apple_partition_map_init' and deinitialize afterwards.
12712 * util/i386/pc/biosdisk.c: Include `#include
12713 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12714 `<grub/machine/partition.h>'.
12715 * util/i386/pc/grub-setup.c: Likewise.
12716 * util/i386/pc/biosdisk.c: Likewise.
12717 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12718 partition information in case of a PC partition.
12719 * util/i386/pc/grub-setup.c: Include `#include
12720 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12721 `<grub/machine/partition.h>'.
12722 (setup): Only access the PC specific partition information in case
12725 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
12727 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12728 (grub_longjmp): Likewise.
12729 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12731 * normal/powerpc/setjmp.S: New file.
12732 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12733 `normal/powerpc/setjmp.S'.
12734 (grubof_CFLAGS): Add `-DGRUBOF'.
12735 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12736 [GRUB_UTIL && !GRUBOF].
12738 2004-11-16 Marco Gerards <metgerards@student.han.nl>
12740 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12741 property named `name'. Correctly handle the error returned by
12742 `grub_ieee1275_finddevice' if a device can not be opened.
12744 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12746 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12747 `actual' for negativity.
12748 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12751 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12753 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12754 (PAGE_OFFSET): New macro.
12755 (CRTC_ADDR_PORT): Likewise.
12756 (CRTC_DATA_PORT): Likewise.
12757 (START_ADDR_HIGH_REGISTER): Likewise.
12758 (START_ADDR_LOW_REGISTER): Likewise.
12759 (GRAPHICS_ADDR_PORT): Likewise.
12760 (GRAPHICS_DATA_PORT): Likewise.
12761 (READ_MAP_REGISTER): Likewise.
12762 (INPUT_STATUS1_REGISTER): Likewise.
12763 (INPUT_STATUS1_VERTR_BIT): Likewise.
12764 (page): New variable.
12765 (wait_vretrace): New function.
12766 (set_read_map): Likewise.
12767 (set_start_address): Likewise.
12768 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12770 (check_vga_mem): Take the page into account.
12771 (write_char): Likewise.
12772 (write_cursor): Likewise.
12773 (scroll_up): Likewise. Copy the page to the page that is not
12774 shown and switch between both pages.
12775 (grub_vga_putchar): Fix off by one error.
12776 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12779 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12781 Add support for iso9660 (including rockridge).
12783 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12784 (iso9660_mod_SOURCES): New variable.
12785 (iso9660_mod_CFLAGS): Likewise.
12786 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12787 * include/grub/fs.h (grub_iso9660_init): New prototype.
12788 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12789 * fs/iso9660.c: New file.
12791 * include/grub/misc.h (grub_strncat): New prototype.
12792 * kern/misc.c (grub_strncat): New function.
12794 * fs/hfs.c (grub_hfs_mount): Translate the error
12795 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12796 * fs/jfs.c (grub_jfs_mount): Likewise.
12797 * fs/ufs.c (grub_ufs_mount): Likewise.
12799 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12801 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12802 which initialized BAT registers.
12803 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12804 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12806 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12807 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12809 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12810 (grub_mapclaim): Likewise.
12811 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12812 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12815 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12817 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12818 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12819 -ffreestanding and -msoft-float.
12821 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12823 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12824 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12825 set in grub_ieee1275_flags.
12827 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12829 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12831 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12832 grub_console_init first.
12833 Change the memory range used for grub_ieee1275_claim and
12834 grub_mm_init_region.
12835 Print an error message if the claim fails.
12836 Include <grub/misc.h>.
12838 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12840 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12841 Call grub_children_iterate for device nodes of type `scsi',
12843 (grub_ofdisk_open): Remove manual device alias resolution.
12844 Fix memory leak when device cannot be opened.
12845 * include/grub/powerpc/ieee1275/ieee1275.h
12846 (grub_children_iterate): New prototype.
12847 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12849 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12850 Return -1 if args.size was -1.
12852 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12854 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12855 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12856 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12857 Open Firmware's memory for it; claim memory from _start to _end.
12858 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12859 (_end): New extern.
12860 (_start): Zero BSS from __bss_start to _end.
12861 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12863 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12865 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12867 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12868 -1 if args.base was -1.
12870 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12872 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12873 escape sequence instead of a literal ^L. Also call
12874 grub_ofconsole_gotoxy.
12876 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12878 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12879 void * arguments to grub_addr_t. All callers updated. Also make
12880 the `result' argument optional.
12881 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12882 All callers updated.
12884 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12886 * commands/ls.c (grub_ls_list_files): Use the string following the
12887 initial ')', if present, as the filesystem path.
12888 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12890 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12892 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12894 Make the source code of the menu interface more readable.
12896 * normal/menu.c: Include grub/mm.h.
12897 (TERM_WIDTH): New macro.
12898 (TERM_HEIGHT): Likewise.
12899 (TERM_INFO_HEIGHT): Likewise.
12900 (TERM_MARGIN): Likewise.
12901 (TERM_SCROLL_WIDTH): Likewise.
12902 (TERM_TOP_BORDER_Y): Likewise.
12903 (TERM_LEFT_BORDER_X): Likewise.
12904 (TERM_BORDER_WIDTH): Likewise.
12905 (TERM_MESSAGE_HEIGHT): Likewise.
12906 (TERM_BORDER_HEIGHT): Likewise.
12907 (TERM_NUM_ENTRIES): Likewise.
12908 (TERM_FIRST_ENTRY_Y): Likewise.
12909 (TERM_ENTRY_WIDTH): Likewise.
12910 (TERM_CURSOR_X): Likewise.
12911 (draw_border): Use macros instead of magic numbers.
12912 (print_entry): Likewise.
12913 (print_entries): Likewise.
12914 (run_menu): Likewise. Also, handle the key 'e'.
12915 (run_menu_entry): Ignore empty command lines.
12916 (print_message): Added a new argument EDIT. If EDIT is true,
12917 print a different message.
12918 (init_page): Likewise.
12919 (edit_menu_entry): New function. Not implemented yet.
12921 2004-09-17 Marco Gerards <metgerards@student.han.nl>
12923 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12924 can be loaded from normal mode.
12926 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12928 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12929 (multiboot_mod_CFLAGS): New variables.
12930 * loader/i386/pc/linux_normal.c: New file.
12931 * loader/i386/pc/multiboot_normal.c: Likewise.
12933 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12934 attribute `unused'.
12936 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12937 `fdiro' to read the mode information from instead of `diro'.
12939 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12940 looking up a symlink.
12942 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12944 * normal/command.c (grub_command_execute): Don't parse the
12945 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12946 flags of the command.
12948 * normal/menu.c (grub_menu_run): Fix typo.
12950 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12952 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12954 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12955 `y + 1' instead of `y - 1'.
12957 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12959 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12961 From Hollis Blanchard <hollis@penguinppc.org>:
12962 * kern/misc.c (memmove): New alias for grub_memmove.
12963 (memcmp): New alias for grub_memcmp.
12964 (memset): New alias for grub_memset.
12965 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12966 Change "int handle" to "grub_ieee1275_phandle_t handle".
12967 * include/grub/powerpc/ieee1275/ieee1275.h
12968 (grub_ieee1275_get_property): Likewise.
12970 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12972 Added normal mode command `chainloader' as module chain.mod, which
12973 depends on normal.mod and _chain.mod.
12975 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12976 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12977 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12979 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12980 but arguments parsing moved to ...
12981 (grub_chainloader_cmd): ... here. New function.
12982 * include/grub/i386/pc/chainloader.h: New file.
12983 * loader/i386/pc/chainloader_normal.c: Likewise.
12985 2004-09-11 Marco Gerards <metgerards@student.han.nl>
12987 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12988 (grub_mkimage_LDFLAGS): Likewise.
12989 (grub_emu_SOURCES): Likewise.
12990 (kernel_img_HEADERS): Added fshelp.h.
12991 * fs/ext2.c: Include <grub/fshelp.h>.
12992 (FILETYPE_REG): New macro.
12993 (FILETYPE_INO_REG): Likewise.
12994 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12996 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12998 (grub_fshelp_node): New struct.
12999 (grub_ext2_data): Added member `diropen'. Changed member `inode'
13001 (grub_ext2_get_file_block): Removed function.
13002 (grub_ext2_read_block): New function.
13003 (grub_ext2_read_file): Replaced parameter `data' by `node'.
13004 This function was written.
13005 (grub_ext2_mount): Read the root inode. Create a diropen struct.
13006 (grub_ext2_find_file): Removed function.
13007 (grub_ext2_read_symlink): New function.
13008 (grub_ext2_iterate_dir): Likewise.
13009 (grub_ext2_open): Rewritten.
13010 (grub_ext2_dir): Rewritten.
13011 * include/grub/fshelp.h: New file.
13012 * fs/fshelp.c: Likewise.
13014 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
13016 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13017 (print_message): Add a missing newline.
13018 (run_menu): Added timeout support.
13019 (run_menu_entry): New local function.
13020 (grub_menu_run): Added support for booting.
13022 * kern/loader.c (grub_loader_is_loaded): New function.
13024 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13025 (grub_get_rtc): Exported.
13027 * include/grub/i386/pc/time.h: Include grub/symbol.h.
13028 (grub_get_rtc): Exported.
13030 * include/grub/normal.h (struct grub_command_list): Remove
13031 constant from the member `command'.
13033 * include/grub/loader.h (grub_loader_is_loaded): Declared.
13035 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13037 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13039 2004-08-28 Marco Gerards <metgerards@student.han.nl>
13041 Add support for the JFS filesystem.
13043 * fs/jfs.c: New file.
13044 * include/grub/fs.h (grub_jfs_init): New prototype.
13045 (grub_jfs_fini): New prototype.
13046 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13047 (grub_emu_SOURCES): Likewise.
13048 (pkgdata_MODULES): Add jfs.mod.
13049 (jfs_mod_SOURCES): New variable.
13050 (jfs_mod_CFLAGS): Likewise.
13051 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13052 (grubof_SOURCES): Likewise.
13053 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13055 * fs/fat.c (grub_fat_find_dir): Convert the filename little
13056 endian to the host endian.
13057 (grub_fat_utf16_to_utf8): Move function from there...
13058 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
13059 the endianness of the source string anymore.
13060 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13062 2004-08-24 Marco Gerards <metgerards@student.han.nl>
13064 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13065 (grub_boot_fini) [GRUB_UTIL]: Likewise.
13066 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13067 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
13069 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13070 (grub_hfs_iterate_dir): Make the function static. Add prototypes
13071 for `node_found' and `it_dir'.
13072 (grub_hfs_dir): Add prototype for `dir_hook'.
13074 * fs/minix.c (grub_minix_get_file_block): Add prototype for
13075 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
13076 and `indir32' to silence a gcc warning.
13078 * include/grub/fs.h (grub_hfs_init): New prototype.
13079 (grub_hfs_fini): Likewise.
13082 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13084 Each disk device has its own id now. This is useful to make use
13085 of multiple disk devices.
13087 * include/grub/disk.h (grub_disk_dev_id): New enum.
13088 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13089 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13091 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13092 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13094 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13095 GRUB_DISK_DEVICE_OFDISK_ID as an id.
13097 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13098 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13100 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13101 "id" which is used by the cache manager.
13103 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13106 2004-08-18 Marco Gerards <metgerards@student.han.nl>
13108 * fs/hfs.c: New file.
13109 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13110 (grub_emu_SOURCES): Likewise.
13111 (pkgdata_MODULES): Add hfs.mod.
13112 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13113 (grubof_SOURCES): Likewise.
13114 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13116 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13117 * kern/misc.c (grub_strncasecmp): Add function.
13119 2004-08-14 Marco Gerards <metgerards@student.han.nl>
13121 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13124 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13125 (grub_ext2_dir): In case the directory entry type is unknown, read
13128 2004-08-02 Peter Bruin <pjbruin@dds.nl>
13130 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13131 grub_load_linux instead of grub_rescue_cmd_linux as second
13132 argument of grub_rescue_register_command.
13134 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13136 2004-07-27 Marco Gerards <metgerards@student.han.nl>
13138 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13140 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13141 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13142 `loader/powerpc/ieee1275/linux.c',
13143 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13144 * include/grub/powerpc/ieee1275/ieee1275.h
13145 (grub_ieee1275_release): New prototype.
13146 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13147 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13148 normal, boot, linux and linux_normal.
13149 * loader/powerpc/ieee1275/linux.c: New file.
13150 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13152 2004-07-12 Marco Gerards <metgerards@student.han.nl>
13154 * normal/arg.c (grub_arg_parse): Correct error handling after
13155 reallocating the argumentlist (check if `argl' is not null instead
13156 of checking if `args' is not null).
13157 * kern/mm.c (grub_realloc): Return the same pointer when using the
13158 same region, instead of returning the header address.
13160 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13162 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13163 one block instead of two when looking for the initial partition.
13164 (grub_partition_probe): Initialize the local variable `p' with 0.
13165 Use base 10 for the grub_strtoul call.
13166 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13167 need for one local variable.
13168 (grub_strtoul): Don't add the new value to `num', instead of that
13171 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13173 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13174 (pxeboot_img_SOURCES): New variable.
13175 (pxeboot_img_ASFLAGS): Likewise.
13176 (pxeboot_img_LDFLAGS): Likewise.
13177 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13178 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13179 <lode_leroy@hotmail.com>.
13181 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13183 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13184 there was no input.
13186 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13188 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13189 the history buffer logic.
13191 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13193 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13194 (FILETYPE_INO_SYMLINK): New macros.
13195 (grub_ext2_find_file): Check if the node is a directory using the
13196 inode stat information instead of using the filetype in the
13197 dirent. Exclude the first character of an absolute symlink.
13198 (grub_ext2_dir): Mask out the filetype part of the mode member of
13201 2004-05-24 Marco Gerards <metgerards@student.han.nl>
13203 Add support for UFS version 1 and 2. Add support for the minix
13204 filesystem version 1 and 2, both the variants with 14 and 30 long
13207 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13209 (grub_emu_SOURCES): Likewise.
13210 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13211 (ufs_mod_SOURCES): New variable.
13212 (ufs_mod_CFLAGS): Likewise.
13213 (minix_mod_SOURCES): Likewise.
13214 (minix_mod_CFLAGS): Likewise.
13215 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13217 (grubof_SOURCES): Likewise.
13218 * fs/ufs.c: New file.
13219 * fs/minix.c: New file.
13220 * include/grub/fs.h (grub_ufs_init): New prototype.
13221 (grub_ufs_fini): Likewise.
13222 (grub_minix_init): Likewise.
13223 (grub_minix_fini): Likewise.
13224 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13227 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13230 commands/ls.c, commands/terminal.c, commands/boot.c,
13231 commands/cmp.c and commands/cat.c.
13232 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13234 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13237 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13239 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13240 and grub_, respectively. Because the conversion is trivial and
13241 mechanical, I omit the details here. Please refer to the CVS
13242 if you need more information.
13244 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13246 * include/pupa: Renamed to ...
13247 * include/grub: ... this.
13248 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13249 * util/i386/pc/grub-mkimage.c: ... this.
13250 * util/i386/pc/pupa-setup.c: Renamed to ...
13251 * util/i386/pc/grub-setup.c: ... this.
13252 * util/pupa-emu.c: Renamed to ...
13253 * util/grub-emu.c: ... this.
13255 2004-03-29 Marco Gerards <metgerards@student.han.nl>
13257 Add support for the newworld apple macintosh (PPC). This has been
13258 tested on the powerbook 2000 only. It only adds support for
13259 generic ieee1275 functions, console and disk support. This should
13260 be easy to port to other architectures with support for Open
13263 * configure.ac: Accept the powerpc as host_cpu. In the case of
13264 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13265 specific tests are only executed while building for the i386.
13266 Inverse test for crosscompile.
13267 * genmk.rb (Utility): Allow assembler files.
13268 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13269 * conf/powerpc-ieee1275.rmk: New file.
13270 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13271 * disk/powerpc/ieee1275/partition.c: Likewise.
13272 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13273 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13274 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13275 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13276 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13277 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13278 * include/pupa/powerpc/ieee1275/loader.h
13279 * include/pupa/powerpc/setjmp.h: Likewise.
13280 * include/pupa/powerpc/types.h: Likewise.
13281 * kern/powerpc/ieee1275/init.c: Likewise.
13282 * kern/powerpc/ieee1275/openfw.c: Likewise.
13283 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13285 These files were written by Johan Rydberg
13286 (jrydberg@night.trouble.net) and I only modified them slightly.
13288 * boot/powerpc/ieee1275/cmain.c: New file.
13289 * boot/powerpc/ieee1275/crt0.S: Likewise.
13290 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13291 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13293 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13295 * Makefile.in: Update copyright.
13296 * genmodsrc.sh: Likewise.
13297 * gensymlist.sh: Likewise.
13298 * term/i386/pc/vga.c: Indent correctly.
13300 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13301 bugreporting address.
13302 * util/i386/pc/pupa-setup.c (usage): Likewise,
13303 (main): Call pupa_ext2_init and pupa_ext2_fini.
13305 * fs/fat.c (log2): Renamed to ...
13306 (fat_log2): ... this.
13307 All callers changed.
13308 * kern/misc.c (memcpy): Alias to pupa_memmove.
13309 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13311 * util/console.c (pupa_ncurses_fini): Return 0.
13313 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13314 Move fail label here.
13315 [__GNU__]: Don't warn when using stat.
13316 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13317 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13318 long int. Use strtol instead of strtoul.
13320 2004-03-14 Marco Gerards <metgerards@student.han.nl>
13322 * commands/boot.c: New file.
13323 * commands/cat.c: Likewise.
13324 * commands/cmp.c: Likewise.
13325 * commands/ls.c: Likewise.
13326 * commands/terminal.c: Likewise.
13327 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13328 (pupa_register_command): Changed interface to match the new
13330 (pupa_command_execute): Changed (almost rewritten) so it uses
13331 pupa_split_command. Added support for setting variables using the
13333 (rescue_command): Changed to work with the new argument parser.
13334 (terminal_command): Moved from here to commands/terminal.c.
13335 (set_command): New function.
13336 (unset_command): New function.
13337 (insmod_command): New function.
13338 (rmmod_command): New function.
13339 (lsmod_command): New function.
13340 (pupa_command_init): Don't initialize the command terminal
13341 anymore. Initialize the commands set, unset, insmod, rmmod and
13343 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13344 (kernel_img_HEADERS): Add arg.h and env.h.
13345 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13346 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13347 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13349 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13351 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13352 (boot_mod_SOURCES): New variable.
13353 (terminal_mod_SOURCES): Likewise.
13354 (ls_mod_SOURCES): Likewise.
13355 (cmp_mod_SOURCES): Likewise.
13356 (cat_mod_SOURCES): Likewise.
13358 * normal/arg.c: New file.
13359 * kern/env.c: Likewise.
13360 * include/pupa/arg.h: Likewise.
13361 * include/pupa/env.h: Likewise.
13362 * font/manager.c (font_command): Changed to match argument parsing
13364 (PUPA_MOD_INIT): Likewise.
13365 * hello/hello.c (pupa_cmd_hello): Likewise.
13366 (PUPA_MOD_INIT): Likewise.
13367 * include/pupa/disk.h: Include <pupa/device.h>.
13368 (pupa_print_partinfo): New prototype.
13369 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13370 (pupa_dl_get_prefix): Likewise.
13371 * include/pupa/misc.h: Include <pupa/err.h>.
13372 (pupa_isgraph): New prototype.
13373 (pupa_isdigit): Likewise.
13374 (pupa_split_cmdline): Likewise.
13375 * include/pupa/normal.h: Include <pupa/arg.h>.
13376 (pupa_command): Changed the prototype of the member `func' to
13377 match the argument parsing interface. Added member `options'.
13378 (pupa_register_command): Updated to match function.
13379 (pupa_arg_parse): New prototype.
13380 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13381 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13382 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13383 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13384 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13385 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13386 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13387 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13388 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13389 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13390 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13391 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13392 * kern/disk.c: Include <pupa/file.h>.
13393 (pupa_print_partinfo): New function.
13394 * kern/dl.c: Include <pupa/env.h>.
13395 (pupa_dl_dir): Variable removed.
13396 (pupa_dl_load): Use the environment variable `prefix' instead of
13397 the variable pupa_dl_dir.
13398 (pupa_dl_set_prefix): Function removed.
13399 (pupa_dl_get_prefix): Likewise.
13400 * kern/i386/pc/init.c: Include <pupa/env.h>.
13401 (pupa_machine_init): Use the environment variable `prefix' instead of
13402 using pupa_dl_set_prefix to set the prefix.
13403 * kern/main.c: Include <pupa/env.h>.
13404 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13405 using pupa_dl_get_prefix to get the prefix.
13406 * kern/misc.c: Include <pupa/env.h>.
13407 (pupa_isdigit): New function.
13408 (pupa_isgraph): Likewise.
13409 (pupa_ftoa): Likewise.
13410 (pupa_vsprintf): Added support for printing values of the type
13411 `double'. Make it possible to format variable output when using
13412 formatting like `%1.2%f'.
13413 (pupa_split_cmdline): New function.
13414 * kern/rescue.c: Include <pupa/env.h>.
13415 (next_word): Removed function.
13416 (pupa_rescue_cmd_prefix): Likewise.
13417 (pupa_rescue_cmd_set): New function.
13418 (pupa_rescue_cmd_unset): New function.
13419 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13420 split the command line instead of splitting it here. Added
13421 support for setting variables using the syntax `foo=bar'. Don't
13422 initialize the prefix command anymore. Initialized the set and
13424 * normal/cmdline.c: Include <pupa/env.h>.
13425 (pupa_tab_complete): Added prototypes for print_simple_completion,
13426 print_partition_completion, add_completion, iterate_commands,
13427 iterate_dev, iterate_part and iterate_dir. Moved code to print
13428 partition information from here to kern/disk.c.
13429 (pupa_cmdline_run): Don't check if the function exists anymore.
13430 * normal/main.c: Include <pupa/env.h>.
13431 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13432 instead of using pupa_dl_get_prefix to get the prefix.
13433 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13434 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13436 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13437 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13438 ((unused))' to silence a gcc warning.
13439 (pupa_vga_setcolor): Likewise.
13440 (debug_command): Changed to match argument parsing
13442 * util/pupa-emu.c: Include <pupa/env.h>.
13443 (options): Added 0's for unused fields to silence a gcc warning.
13445 (main): Use the environment variable `prefix' instead of using
13446 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13447 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13450 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13451 * util/misc.c: Include <malloc.h>.
13452 (pupa_malloc): Rewritten so errors are correctly reported.
13453 (pupa_realloc): Likewise.
13454 (pupa_memalign): Likewise.
13455 (pupa_mm_init_region): Declare unused variables with
13456 `__attribute__ ((unused))' to silence a gcc warning.
13457 * normal/i386/setjmp.S: Remove tab at the end of the file to
13458 silence a gcc warning.
13459 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13460 variables with `__attribute__ ((unused))' to silence a gcc
13462 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13463 local variable i unsigned to silence a gcc warning.
13465 * kern/term.c: Include <pupa/misc.h>.
13466 (pupa_more_lines): New variable.
13467 (pupa_more): Likewise.
13468 (pupa_putcode): When the pager is active pause at the end of every
13470 (pupa_set_more): New function.
13471 * include/pupa/term.h (pupa_set_more): New prototype.
13474 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13476 Now this project is GRUB 2 rather than PUPA. The location of
13477 the CVS repository was moved to GRUB's.
13479 * configure.ac: Use bug-grub as the reporting address.
13480 Use GRUB instead of PUPA.
13481 Change the version number to 1.90.
13483 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13485 * genkernsyms.sh: Updated copyright information.
13486 * genmk.rb: Likewise.
13487 * genmodsrc.sh: Likewise.
13488 * gensymlist.sh: Likewise.
13489 * boot/i386/pc/boot.S: Likewise.
13490 * boot/i386/pc/diskboot.S: Likewise.
13491 * disk/i386/pc/biosdisk.c: Likewise.
13492 * disk/i386/pc/partition.c: Likewise.
13493 * font/manager.c: Likewise.
13494 * fs/ext2.c: Likewise.
13495 * fs/fat.c: Likewise.
13496 * include/pupa/boot.h: Likewise.
13497 * include/pupa/device.h: Likewise.
13498 * include/pupa/disk.h: Likewise.
13499 * include/pupa/dl.h: Likewise.
13500 * include/pupa/elf.h: Likewise.
13501 * include/pupa/err.h: Likewise.
13502 * include/pupa/file.h: Likewise.
13503 * include/pupa/font.h: Likewise.
13504 * include/pupa/fs.h: Likewise.
13505 * include/pupa/kernel.h: Likewise.
13506 * include/pupa/loader.h: Likewise.
13507 * include/pupa/misc.h: Likewise.
13508 * include/pupa/mm.h: Likewise.
13509 * include/pupa/net.h: Likewise.
13510 * include/pupa/normal.h: Likewise.
13511 * include/pupa/rescue.h: Likewise.
13512 * include/pupa/setjmp.h: Likewise.
13513 * include/pupa/symbol.h: Likewise.
13514 * include/pupa/term.h: Likewise.
13515 * include/pupa/types.h: Likewise.
13516 * include/pupa/i386/setjmp.h: Likewise.
13517 * include/pupa/i386/types.h: Likewise.
13518 * include/pupa/i386/pc/biosdisk.h: Likewise.
13519 * include/pupa/i386/pc/boot.h: Likewise.
13520 * include/pupa/i386/pc/console.h: Likewise.
13521 * include/pupa/i386/pc/init.h: Likewise.
13522 * include/pupa/i386/pc/kernel.h: Likewise.
13523 * include/pupa/i386/pc/linux.h: Likewise.
13524 * include/pupa/i386/pc/loader.h: Likewise.
13525 * include/pupa/i386/pc/memory.h: Likewise.
13526 * include/pupa/i386/pc/multiboot.h: Likewise.
13527 * include/pupa/i386/pc/partition.h: Likewise.
13528 * include/pupa/i386/pc/time.h: Likewise.
13529 * include/pupa/i386/pc/vga.h: Likewise.
13530 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13531 * include/pupa/util/getroot.h: Likewise.
13532 * include/pupa/util/misc.h: Likewise.
13533 * include/pupa/util/resolve.h: Likewise.
13534 * kern/device.c: Likewise.
13535 * kern/disk.c: Likewise.
13536 * kern/dl.c: Likewise.
13537 * kern/err.c: Likewise.
13538 * kern/file.c: Likewise.
13539 * kern/fs.c: Likewise.
13540 * kern/loader.c: Likewise.
13541 * kern/main.c: Likewise.
13542 * kern/misc.c: Likewise.
13543 * kern/mm.c: Likewise.
13544 * kern/rescue.c: Likewise.
13545 * kern/term.c: Likewise.
13546 * kern/i386/dl.c: Likewise.
13547 * kern/i386/pc/init.c: Likewise.
13548 * kern/i386/pc/lzo1x.S: Likewise.
13549 * kern/i386/pc/startup.S: Likewise.
13550 * loader/i386/pc/chainloader.c: Likewise.
13551 * loader/i386/pc/linux.c: Likewise.
13552 * loader/i386/pc/multiboot.c: Likewise.
13553 * normal/cmdline.c: Likewise.
13554 * normal/command.c: Likewise.
13555 * normal/main.c: Likewise.
13556 * normal/menu.c: Likewise.
13557 * normal/i386/setjmp.S: Likewise.
13558 * term/i386/pc/console.c: Likewise.
13559 * term/i386/pc/vga.c: Likewise.
13560 * util/console.c: Likewise.
13561 * util/genmoddep.c: Likewise.
13562 * util/misc.c: Likewise.
13563 * util/pupa-emu.c: Likewise.
13564 * util/resolve.c: Likewise.
13565 * util/unifont2pff.rb: Likewise.
13566 * util/i386/pc/biosdisk.c: Likewise.
13567 * util/i386/pc/getroot.c: Likewise.
13568 * util/i386/pc/pupa-mkimage.c: Likewise.
13569 * util/i386/pc/pupa-setup.c: Likewise.
13571 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13573 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13574 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13575 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13576 reading and reset it after reading.
13577 (pupa_ext2_close): Return PUPA_ERR_NONE.
13579 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13581 (struct linux_kernel_header): Add kernel_version and
13583 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13584 pupa_file_read succeeds.
13585 (pupa_rescue_cmd_initrd): Implement.
13587 2003-12-03 Marco Gerards <metgerards@student.han.nl>
13589 * fs/ext2.c (pupa_ext2_label): New function.
13590 (pupa_ext2_fs): Added label.
13591 * fs/fat.c (pupa_fat_label): New function.
13592 (pupa_fat_fs): Added label.
13593 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13595 * kern/misc.c (pupa_strndup): New function.
13596 * include/pupa/misc.h (pupa_strndup): New prototype.
13598 * include/pupa/normal.h: Include <pupa/err.h>.
13599 (pupa_set_history): New prototype.
13600 (pupa_iterate_commands): New prototype.
13601 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13602 <pupa/disk.h>, <pupa/file.h>.
13603 (hist_size): New variable.
13604 (hist_lines): Likewise.
13605 (hist_end): Likewise.
13606 (hist_used): Likewise.
13607 (pupa_set_history): New function.
13608 (pupa_history_get): Likewise.
13609 (pupa_history_add): Likewise.
13610 (pupa_history_replace): Likewise.
13611 (pupa_tab_complete): Likewise.
13612 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13613 completion shows partitionnames while completing partitions, this
13614 feature was suggested by Jeff Bailey.
13615 * normal/command.c (pupa_iterate_commands): New function.
13616 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13617 (pupa_normal_init): Initialize history buffer.
13618 (PUPA_MOD_INIT): Likewise.
13619 (pupa_normal_fini): Free the history buffer.
13620 (PUPA_MOD_FINI): Likewise.
13622 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13625 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13626 * configure.ac [i386]: Check for regparam bug.
13627 (NESTED_FUNC_ATTR) [! i386]: Defined.
13629 2003-11-17 Marco Gerards <metgerards@student.han.nl>
13631 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13632 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13633 (pupa_emu_SOURCES): New variable.
13634 (pupa_emu_LDFLAGS): Likewise.
13635 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
13636 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
13637 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
13638 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13639 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
13640 (pupa_jmp_buf): New typedef.
13641 (pupa_setjmp) [PUPA_UTIL]: New macro.
13642 (pupa_longjmp) [PUPA_UTIL]: Likewise.
13643 * include/pupa/term.h (struct pupa_term): New member `refresh'.
13644 (pupa_refresh): New prototype.
13645 * include/pupa/util/getroot.h: New file.
13646 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13648 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13649 (pupa_rescue_cmd_cat): Likewise.
13650 (pupa_rescue_cmd_ls): Likewise.
13651 (pupa_rescue_cmd_testload): Likewise.
13652 (pupa_rescue_cmd_lsmod): Likewise.
13653 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13654 * normal/menu.c (run_menu): Likewise.
13655 * kern/term.c (pupa_cls): Likewise.
13656 (pupa_refresh): New function.
13657 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13658 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13659 * util/console.c: New file.
13661 * util/i386/pc/getroot.c: New file.
13662 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13663 (pupa_putchar): New function.
13664 (pupa_refresh): Likewise.
13665 (xgetcwd): Function moved to ...
13666 (strip_extra_slashes): Likewise.
13667 (get_prefix): Likewise.
13668 * util/i386/pc/getroot.c: ... here.
13669 (find_root_device): Function moved and renamed to...
13670 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13671 Changed all callers.
13672 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13674 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13675 Changed all callers.
13676 * util/misc.c (pupa_memalign): New function.
13677 (pupa_mm_init_region): Likewise.
13678 (pupa_register_exported_symbols): Likewise.
13679 (pupa_putchar): Function removed.
13680 * util/pupa-emu.c: New file.
13682 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13684 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13685 (_multiboot_mod_SOURCES): New variable.
13686 (_multiboot_mod_CFLAGS): Likewise.
13687 * loader/i386/pc/multiboot.c: New file.
13688 * include/pupa/i386/pc/multiboot.h: Likewise.
13689 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13690 (pupa_multiboot_real_boot): New function.
13691 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13692 (pupa_multiboot_real_boot): New prototype.
13693 (pupa_rescue_cmd_multiboot): Likewise
13694 (pupa_rescue_cmd_module): Likewise.
13696 * kern/loader.c (pupa_loader_set): Continue when
13697 pupa_loader_unload_func() fails.
13698 (pupa_loader_unset): New function.
13699 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13701 * kern/misc.c (pupa_stpcpy): New function.
13702 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13704 2003-11-12 Marco Gerards <metgerards@student.han.nl>
13706 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13707 for available extensions.
13709 * include/pupa/i386/pc/time.h: New file.
13710 * kern/disk.c: Include <pupa/machine/time.h>.
13711 (PUPA_CACHE_TIMEOUT): New macro.
13712 (pupa_last_time): New variable.
13713 (pupa_disk_open): Flush the cache when there was a timeout.
13714 (pupa_disk_close): Reset the timer.
13715 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13717 * util/misc.c: Include <sys/times.h>
13718 (pupa_get_rtc): New function.
13720 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13722 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13724 (pupa_ext2_get_file_block): Use blocks member.
13726 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13727 first block. Return -1 instead of pupa_errno on error.
13729 2003-10-27 Marco Gerards <metgerards@student.han.nl>
13731 * README: In the pupa-mkimage example use _chain instead of chain
13732 and ext2 instead of fat.
13733 * TODO: Replace ext2fs with jfs as an example. Add an item for
13734 adding journal playback for ext2fs.
13735 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13736 (pkgdata_MODULES): Added ext2.mod.
13737 (ext2_mod_SOURCES): New variable.
13738 (ext2_mod_CFLAGS): Likewise.
13739 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13740 * include/pupa/misc.h (pupa_strncpy): New prototype.
13741 (pupa_strcat): Likewise.
13742 (pupa_strncmp): Likewise.
13743 * kern/misc.c (pupa_strcat): Enable function.
13744 (pupa_strncpy): New function.
13745 (pupa_strncmp): Likewise.
13746 * fs/ext2.c: New file.
13748 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13749 when the read failed before retrying.
13750 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13751 (_FILE_OFFSET_BITS): Likewise.
13752 * configure.ac: Added AC_SYS_LARGEFILE.
13754 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13756 * genmk.rb (PModule#rule): Make sure to get only symbol names
13757 from the output of nm.
13758 Reported by Robert Millan <zeratul2@wanadoo.es>.
13760 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13762 I forgot to check in these changes for a long time. This adds
13763 incomplete support for VGA console, and this is still very
13764 buggy. Also, a lot of consideration is required for I18N,
13765 UNICODE, and VGA font issues. Therefore, assume that this is
13766 such that "better than nothing".
13768 * font/manager.c: New file.
13769 * include/pupa/font.h: Likewise.
13770 * include/pupa/i386/pc/vga.h: Likewise.
13771 * term/i386/pc/vga.c: Likewise.
13772 * util/unifont2pff.rb: Likewise.
13774 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13775 (pkgdata_MODULES): Added vga.mod and font.mod.
13776 (vga_mod_SOURCES): New variables.
13777 (vga_mod_CFLAGS): Likewise.
13778 (font_mod_SOURCES): Likewise.
13779 (font_mod_CFLAGS): Likewise.
13781 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13783 * include/pupa/term.h: Include pupa/err.h.
13784 (struct pupa_term): Added init and fini.
13785 Changed the argument of putchar to pupa_uint32_t.
13787 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13788 (pupa_console_real_putchar): New prototype.
13789 (pupa_console_putchar): Removed.
13790 (pupa_console_checkkey): Exported.
13791 (pupa_console_getkey): Likewise.
13793 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13796 * kern/term.c (pupa_term_set_current): Rewritten.
13797 (pupa_putchar): Likewise.
13798 (pupa_putcode): New function.
13800 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13801 (pupa_console_real_putchar): ... this.
13802 (pupa_vga_set_mode): New function.
13803 (pupa_vga_get_font): Likewise.
13805 * normal/command.c: Include pupa/term.h.
13806 (terminal_command): New function.
13807 (pupa_command_init): Register the command "terminal".
13809 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13810 (DISP_UP): Likewise.
13811 (DISP_RIGHT): Likewise.
13812 (DISP_DOWN): Likewise.
13813 (DISP_HLINE): Likewise.
13814 (DISP_VLINE): Likewise.
13815 (DISP_UL): Likewise.
13816 (DISP_UR): Likewise.
13817 (DISP_LL): Likewise.
13818 (DISP_LR): Likewise.
13820 * term/i386/pc/console.c (pupa_console_putchar): New function.
13822 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13824 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13825 FIX. Reverse the path_list.
13827 * include/pupa/normal.h: Export pupa_register_command and
13828 pupa_unregister_command.
13830 * hello/hello.c (pupa_cmd_hello): New module.
13831 * conf/i386-pc.rmk: Added hello.mod.
13833 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13835 * kern/i386/pc/lzo1x.S: New file.
13837 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13838 (compress_kernel): New variable.
13839 (generate_image): Heavily modified to support compressing a
13840 large part of the core image.
13842 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13844 (pupa_util_load_image): New function.
13846 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13847 (pupa_compressed_size): New variable.
13848 (codestart): Enable Gate A20 here.
13849 Decompress the compressed part of the core image.
13850 Rearrange the code to put functions and variables which are
13851 required for initialization in the non-compressed part.
13854 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13857 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13859 * include/pupa/i386/pc/kernel.h
13860 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13861 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13862 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13863 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13864 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13866 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13868 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13869 (Utility#rule): Likewise.
13871 * configure.ac: Check if LZO is available.
13873 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13875 * include/pupa/normal.h: New file.
13876 * include/pupa/setjmp.h: Likewise.
13877 * include/pupa/i386/setjmp.h: Likewise.
13878 * normal/cmdline.c: Likewise.
13879 * normal/command.c: Likewise.
13880 * normal/main.c: Likewise.
13881 * normal/menu.c: Likewise.
13882 * normal/i386/setjmp.S: Likewise.
13884 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13885 (pupa_rescue_cmd_initrd): Likewise.
13887 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13890 * kern/i386/pc/startup.S (translation_table): New variable.
13891 (translate_keycode): New function.
13892 (pupa_console_getkey): Call translate_keycode.
13894 * kern/rescue.c (attempt_normal_mode): New function.
13895 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13896 it failed, print a message.
13898 * kern/mm.c (pupa_real_malloc): Print more information when a
13899 free magic is broken.
13900 (pupa_free): If the first free header is not free actually, set
13903 * kern/main.c (pupa_load_normal_mode): Just load the module
13905 (pupa_main): Don't print the message
13906 "Entering into rescue mode..." here.
13908 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13910 (pupa_rescue_cmd_initrd): Likewise.
13911 (pupa_rescue_cmd_initrd): Likewise.
13913 * include/pupa/symbol.h (FUNCTION): Specify the type.
13914 (VARIABLE): Likewise.
13916 * include/pupa/err.h (pupa_err_t): Added
13917 PUPA_ERR_UNKNOWN_COMMAND.
13919 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13920 (pupa_dl_get_prefix): Likewise.
13922 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13923 Added _chain.mod and _linux.mod instead of chain.mod and
13925 (chain_mod_SOURCES): Renamed to ...
13926 (_chain_mod_SOURCES): ... this.
13927 (chain_mod_CFLAGS): Renamed to ...
13928 (_chain_mod_CFLAGS): ... this.
13929 (linux_mod_SOURCES): Renamed to ...
13930 (_linux_mod_SOURCES): ... this.
13931 (linux_mod_CFLAGS): Renamed to ...
13932 (_linux_mod_CFLAGS): ... this.
13933 (normal_mod_SOURCES): New variable.
13934 (normal_mod_CFLAGS): Likewise.
13935 (normal_mod_ASFLAGS): Likewise.
13937 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13939 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13942 * kern/dl.c (pupa_dl_ref): Refer depending modules
13944 (pupa_dl_unref): Unrefer depending modules recursively.
13945 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13946 a module is unloaded before one depending on that module is
13948 (pupa_dl_unload): Unload depending modules explicitly,
13951 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13953 * include/pupa/i386/pc/linux.h: New file.
13954 * loader/i386/pc/linux.c: Likewise.
13956 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13958 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13959 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13960 of PUPA_CHAINLOADER_BOOT_SECTOR.
13962 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13963 (pupa_linux_prot_size): New variable.
13964 (pupa_linux_tmp_addr): Likewise.
13965 (pupa_linux_real_addr): Likewise.
13966 (pupa_linux_boot_zimage): New function.
13967 (pupa_linux_boot_bzimage): Likewise.
13969 * kern/i386/pc/init.c (struct mem_region): New structure.
13970 (MAX_REGIONS): New macro.
13971 (mem_regions): New variable.
13972 (num_regions): Likewise.
13973 (pupa_os_area_addr): Likewise.
13974 (pupa_os_area_size): Likewise.
13975 (pupa_lower_mem): Likewise.
13976 (pupa_upper_mem): Likewise.
13977 (add_mem_region): New function.
13978 (compact_mem_regions): Likewise.
13979 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13980 the size of the conventional memory and that of so-called upper
13981 memory (before the first memory hole).
13982 Instead of adding each found region to free memory, use
13983 add_mem_region and add them after removing overlaps.
13984 Also, add only 1/4 of the upper memory to free memory. The rest
13985 is used for loading OS images. Maybe this is ad hoc, but this
13986 makes it much easier to relocate OS images when booting.
13988 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13989 (pupa_enter_rescue_mode): Don't register initrd and module.
13991 * kern/mm.c: Include pupa/dl.h.
13993 * kern/main.c: Include pupa/file.h and pupa/device.h.
13995 * kern/loader.c (pupa_loader_load_module_func): Removed.
13996 (pupa_loader_load_module): Likewise.
13998 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14001 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14002 (pupa_linux_tmp_addr): Likewise.
14003 (pupa_linux_real_addr): Likewise.
14004 (pupa_linux_boot_zimage): Likewise.
14005 (pupa_linux_boot_bzimage): Likewise.
14007 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14008 (pupa_upper_mem): Likewise.
14009 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14010 module is too dangerous.
14012 * include/pupa/loader.h (pupa_os_area_addr): Declared.
14013 (pupa_os_area_size): Likewise.
14014 (pupa_loader_set): Remove the first argument. Loader doesn't
14015 manage modules or initrd any longer.
14016 (pupa_loader_load_module): Removed.
14018 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14019 (linux_mod_SOURCES): New variable.
14020 (linux_mod_CFLAGS): Likewise.
14022 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
14024 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14025 the length of a blocklist correctly.
14027 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14028 Use ioctl only if the OS file is a block device.
14029 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14030 not very useful for normal files.
14032 * kern/main.c (pupa_set_root_dev): New function.
14033 (pupa_load_normal_mode): Likewise.
14034 (pupa_main): Call those above.
14036 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14039 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14041 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
14043 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14044 (setup): Configure the installed partition information and the
14047 * loader/i386/pc/chainloader.c (my_mod): New variable.
14048 (pupa_chainloader_unload): New function.
14049 (pupa_rescue_cmd_chainloader): Refer itself.
14050 (PUPA_MOD_INIT): Save its own module in MY_MOD.
14052 * kern/i386/pc/startup.S (install_partition): Removed.
14053 (version_string): Likewise.
14054 (config_file): Likewise.
14055 (pupa_install_dos_part): New variable.
14056 (pupa_install_bsd_part): Likewise.
14057 (pupa_prefix): Likewise.
14058 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14060 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14062 (make_install_device): New function.
14063 (pupa_machine_init): Set the dl prefix.
14065 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14066 (buf): Renamed to ...
14067 (linebuf): ... this.
14068 (pupa_rescue_cmd_prefix): New function.
14069 (pupa_rescue_cmd_insmod): Likewise.
14070 (pupa_rescue_cmd_rmmod): Likewise.
14071 (pupa_rescue_cmd_lsmod): Likewise.
14072 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14075 * kern/mm.c (pupa_memalign): If failed even after invalidating
14076 disk caches, unload unneeded modules and retry.
14078 * kern/misc.c (pupa_memmove): New function.
14079 (pupa_memcpy): Removed.
14080 (pupa_strcpy): New function.
14081 (pupa_itoa): Made static.
14083 * kern/dl.c (pupa_dl_iterate): New function.
14084 (pupa_dl_ref): Likewise.
14085 (pupa_dl_unref): Likewise.
14086 (pupa_dl_unload): Return if succeeded or not.
14087 (pupa_dl_unload_unneeded): New function.
14088 (pupa_dl_unload_all): Likewise.
14089 (pupa_dl_init): Renamed to ...
14090 (pupa_dl_set_prefix): ... this.
14091 (pupa_dl_get_prefix): New function.
14093 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14094 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14095 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14096 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14097 (pupa_install_dos_part): Declared.
14098 (pupa_install_bsd_part): Likewise.
14099 (pupa_prefix): Likewise.
14100 (pupa_boot_drive): Likewise.
14102 * include/pupa/types.h: Fix a typo.
14104 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14106 (pupa_memmove): Declared.
14107 (pupa_strcpy): Likewise.
14109 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14110 pupa_mod_init takes one argument, its own module.
14111 (pupa_dl_unload_unneeded): Declared.
14112 (pupa_dl_unload_all): Likewise.
14113 (pupa_dl_ref): Likewise.
14114 (pupa_dl_unref): Likewise.
14115 (pupa_dl_iterate): Likewise.
14116 (pupa_dl_init): Renamed to ...
14117 (pupa_dl_set_prefix): ... this.
14118 (pupa_dl_get_prefix): Declared.
14120 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
14121 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
14123 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14124 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14126 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14127 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14129 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14131 * util/i386/pc/pupa-setup.c (setup): Define the internal
14132 function find_first_partition_start at the top level, because GCC
14133 3.0.x cannot compile internal functions in deeper scopes
14135 (find_root_device): Use lstat instead of stat.
14136 Don't follow symbolic links.
14137 Fix the path-constructing code.
14139 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14140 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14141 by a BLKGETSIZE ioctl first, because block devices don't fill
14142 the member st_mode of the structure stat on Linux.
14143 [__linux__] (linux_find_partition): Use a temporary buffer
14144 REAL_DEV for the working space. Copy it to DEV before returning.
14145 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14146 buffer cache consistent.
14147 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14148 strncmp. The previous value was merely wrong.
14149 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14151 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14152 FAT size is 12. The previous value was merely wrong.
14154 * kern/main.c (pupa_main): Don't split the starting message from
14157 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14158 LF, because BIOS goes crazy about character attributes in this
14161 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14163 * include/i386/pc/util/biosdisk.h: New file.
14164 * util/i386/pc/biosdisk.c: Likewise.
14165 * util/i386/pc/pupa-setup.c: Likewise.
14167 * Makefile.in (INCLUDE_DISTFILES): Added
14168 include/pupa/i386/pc/util/biosdisk.h.
14169 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14170 directory util/i386/pc.
14171 (install-local): Added a rule for sbin_UTILITIES.
14172 (uninstall): Likewise.
14174 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14176 * util/misc.c (xrealloc): New function.
14177 (pupa_malloc): Likewise.
14178 (pupa_free): Likewise.
14179 (pupa_realloc): Likewise.
14180 (pupa_stop): Likewise.
14181 (pupa_putchar): Likewise.
14183 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14185 * include/pupa/util/misc.h (xrealloc): Declared.
14187 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14189 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14190 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14192 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14193 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14195 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14196 way should be implemented.
14197 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14199 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14200 the size of NAME for safety.
14201 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14204 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14205 (pupa_setup_SOURCES): Likewise.
14207 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14209 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14211 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14212 bunch of pushl's from pusha, because this destroys the return
14215 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14217 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14218 This means that any missing prototypes could be fatal. Also, you
14219 must take care when writing assembly code. See the comments at
14220 the beginning of startup.S, for more details.
14222 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14223 compilation mechanism.
14224 (pupa_chainloader_real_boot): Likewise.
14225 (pupa_biosdisk_rw_int13_extensions): Likewise.
14226 (pupa_biosdisk_rw_standard): Likewise.
14227 (pupa_biosdisk_check_int13_extensions): Likewise.
14228 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14229 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14230 (pupa_get_memsize): Likewise.
14231 (pupa_get_mmap_entry): Likewise.
14232 (pupa_console_putchar): Likewise.
14233 (pupa_console_setcursor): Likewise.
14234 (pupa_getrtsecs): Use pushl instead of push.
14236 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14237 memory instead of the stack for a mmap entry, because some
14238 BIOSes may ignore the maximum size and overflow.
14240 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14242 * genmk.rb (PModule#rule): Compile automatically generated
14243 sources with module-specific CFLAGS as well as other sources.
14245 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14247 * configure.ac: Check ld.
14248 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14249 respectively, before checking endianness and sizes.
14251 * Makefile.in (LD): New variable.
14253 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14255 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14257 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14259 * Changelog: New file.