1 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
3 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
5 2009-05-22 Pavel Roskin <proski@gnu.org>
7 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
8 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
9 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
10 compiling for the i386 targets, but not for the utilities.
12 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
14 (grub_root_drive): Likewise.
15 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
17 (grub_root_drive): Change size to byte.
18 (grub_start_addr): Remove.
19 (grub_end_addr): Likewise.
20 (grub_apm_bios_info): Likewise.
22 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
24 * normal/i386: Remove.
25 * normal/powerpc: Likewise.
26 * normal/sparc64: Likewise.
27 * normal/x86_64: Likewise.
29 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
31 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
32 * loader/i386/linux_trampoline.S: Fix identation
33 * loader/i386/xnu_helper.S: Likewise
35 2009-05-18 Colin D Bennett <colin@gibibit.com>
37 Display error messages when parsing a Lua statement fails.
38 Previously, executing a syntactically invalid statement like
39 ")foo" or "bar;" would silently fail.
41 * script/lua/grub_main.c (handle_lua_error): New function.
42 (grub_lua_parse_line): Improved reporting of Lua parser and
45 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
47 Remove -Werror which causes build to fail on some systems
49 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
50 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
51 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
53 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
55 trampoline for linux on 64-bit platform
57 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
58 loader/i386/efi/linux_trampoline.S
59 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
61 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
63 * loader/i386/linux_trampoline.S: moved here
64 * loader/i386/efi/linux.c (allocate_pages): reserve space for
67 (grub_linux_trampoline_start): new declaration
68 (grub_linux_trampoline_end): likewise
69 (grub_linux_boot): use trampoline when on 64-bit platform
70 * loader/i386/linux.c: likewise
72 2009-05-16 Pavel Roskin <proski@gnu.org>
74 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
75 const to avoid a warning.
76 (grub_lua_setenv): Likewise.
77 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
78 lmsg to fix a warning.
80 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
82 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
83 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
84 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
85 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
86 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
87 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
88 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
89 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
91 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
93 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
95 2009-05-16 Bean <bean123ch@gmail.com>
97 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
98 (lua_mod_SOURCES): New variable.
99 (lua_mod_CFLAGS): Likewise.
100 (lua_mod_LDFLAGS): Likewise.
102 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
103 (setjmp_mod_SOURCES): New variable.
104 (setjmp_mod_CFLAGS): Likewise.
105 (setjmp_LDFLAGS): Likewise.
107 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
108 (setjmp_mod_SOURCES): New variable.
109 (setjmp_mod_CFLAGS): Likewise.
110 (setjmp_LDFLAGS): Likewise.
112 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
113 (setjmp_mod_SOURCES): New variable.
114 (setjmp_mod_CFLAGS): Likewise.
115 (setjmp_LDFLAGS): Likewise.
117 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
118 (setjmp_mod_SOURCES): New variable.
119 (setjmp_mod_CFLAGS): Likewise.
120 (setjmp_LDFLAGS): Likewise.
122 * normal/i386/setjmp.S: Moved from here ...
123 * lib/i386/setjmp.S: ... Moved here
124 * normal/x86_64/setjmp.S: Moved from here ...
125 * lib/x86_64/setjmp.S: ... Moved here
126 * normal/powerpc/setjmp.S: Moved from here ...
127 * lib/powerpc/setjmp.S: ... Moved here
128 * normal/sparc64/setjmp.S: Moved from here ...
129 * lib/sparc64/setjmp.S: ... Moved here
131 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
132 returns_twice in mingw.
134 * script/lua/grub_lib.c: New file.
135 * script/lua/grub_lib.h: Likewise.
136 * script/lua/grub_lua.h: Likewise.
137 * script/lua/grub_main.c: Likewise.
138 * script/lua/lapi.c: Likewise.
139 * script/lua/lapi.h: Likewise.
140 * script/lua/lauxlib.c: Likewise.
141 * script/lua/lauxlib.h: Likewise.
142 * script/lua/lbaselib.c: Likewise.
143 * script/lua/lcode.c: Likewise.
144 * script/lua/lcode.h: Likewise.
145 * script/lua/ldblib.c: Likewise.
146 * script/lua/ldebug.c: Likewise.
147 * script/lua/ldebug.h: Likewise.
148 * script/lua/ldo.c: Likewise.
149 * script/lua/ldo.h: Likewise.
150 * script/lua/ldump.c: Likewise.
151 * script/lua/lfunc.c: Likewise.
152 * script/lua/lfunc.h: Likewise.
153 * script/lua/lgc.c: Likewise.
154 * script/lua/lgc.h: Likewise.
155 * script/lua/linit.c: Likewise.
156 * script/lua/liolib.c: Likewise.
157 * script/lua/llex.c: Likewise.
158 * script/lua/llex.h: Likewise.
159 * script/lua/llimits.h: Likewise.
160 * script/lua/lmathlib.c: Likewise.
161 * script/lua/lmem.c: Likewise.
162 * script/lua/lmem.h: Likewise.
163 * script/lua/loadlib.c: Likewise.
164 * script/lua/lobject.c: Likewise.
165 * script/lua/lobject.h: Likewise.
166 * script/lua/lopcodes.c: Likewise.
167 * script/lua/lopcodes.h: Likewise.
168 * script/lua/loslib.c: Likewise.
169 * script/lua/lparser.c: Likewise.
170 * script/lua/lparser.h: Likewise.
171 * script/lua/lstate.c: Likewise.
172 * script/lua/lstate.h: Likewise.
173 * script/lua/lstring.c: Likewise.
174 * script/lua/lstring.h: Likewise.
175 * script/lua/lstrlib.c: Likewise.
176 * script/lua/ltable.c: Likewise.
177 * script/lua/ltable.h: Likewise.
178 * script/lua/ltablib.c: Likewise.
179 * script/lua/ltm.c: Likewise.
180 * script/lua/ltm.h: Likewise.
181 * script/lua/lua.h: Likewise.
182 * script/lua/luaconf.h: Likewise.
183 * script/lua/lualib.h: Likewise.
184 * script/lua/lundump.c: Likewise.
185 * script/lua/lundump.h: Likewise.
186 * script/lua/lvm.c: Likewise.
187 * script/lua/lvm.h: Likewise.
188 * script/lua/lzio.c: Likewise.
189 * script/lua/lzio.h: Likewise.
191 2009-05-16 Bean <bean123ch@gmail.com>
193 * include/grub/kernel.h (grub_module_header_types): Add type
196 * kern/main.c (grub_load_config): New function.
197 (grub_main): Call grub_load_config to read boot config.
199 * grub-mkimage (generate_image): New parameter config_path.
200 (options): New option --config.
201 (main): Parse --config option, and pass it to generate_image.
203 2009-05-14 Christian Franke <franke@computer.org>
205 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
206 This fixes build on Cygwin.
208 2009-05-14 Pavel Roskin <proski@gnu.org>
210 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
211 jump. This saves two bytes, so the typical case of 2 swapped
212 drives would fit 32 bytes.
214 2009-05-13 Pavel Roskin <proski@gnu.org>
216 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
217 grub_uint32_t to avoid a warning.
219 * loader/i386/linux.c (allocate_pages): When assigning
220 real_mode_mem, cast through grub_size_t to fix a warning. The
221 code already makes sure that the value would fit a pointer.
222 (grub_linux_setup_video): Cast render_target->data to
223 grub_size_t to fix a warning.
225 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
227 * commands/i386/pc/drivemap.c: New file - implement drivemap
229 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
230 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
232 2009-05-13 Pavel Roskin <proski@gnu.org>
234 * util/i386/pc/grub-setup.c (setup): Remove unused variable
235 embedding_area_exists.
237 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
239 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
240 it easier to understand / work with.
241 Improve warning messages for cases where there's no embedding area,
242 or when it is too small (or core.img too large).
244 2009-05-13 Pavel Roskin <proski@gnu.org>
246 * loader/i386/pc/multiboot2.c: Add necessary includes for
247 grub_multiboot2_real_boot().
249 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
250 PX record is always little-endian. We only need the lower 2
253 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
254 facilitate code reuse.
255 (grub_cpio_mount): Use "struct head", not a char buffer. This
256 fixes a warning reported by gcc 4.4.
258 * kernel/disk.c (grub_disk_read): Use void pointer for the
260 (grub_disk_write): Use const void pointer for the buffer.
261 Adjust all callers. Remove unnecessary casts.
263 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
265 * util/i386/pc/grub-install.in: Update copyright year.
267 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
271 * commands/gptsync.c: new file
272 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
273 (gptsync_mod_SOURCES): new variable
274 (gptsync_mod_CFLAGS): likewise
275 (gptsync_mod_LDFLAGS): likewise
276 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
278 (GRUB_PC_PARTITION_TYPE_HFS): likewise
279 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
280 * conf/i386-ieee1275.rmk: likewise
281 * conf/i386-pc.rmk: likewise
282 * conf/powerpc-ieee1275.rmk: likewise
284 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
288 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
289 (grub_dl_ref): likewise
291 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
293 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
294 split in two functions (one for msdos and one for gpt).
296 2009-05-08 Pavel Roskin <proski@gnu.org>
298 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
301 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
302 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
303 Initialize them with -1. Add sanity check for bad1. Eliminate
306 2009-05-08 David S. Miller <davem@davemloft.net>
308 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
310 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
312 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
315 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
317 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
318 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
320 2009-05-05 David S. Miller <davem@davemloft.net>
322 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
324 2009-05-05 Pavel Roskin <proski@gnu.org>
326 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
327 of grub_dl_ref() and grub_dl_unref().
328 * commands/parttool.c: Remove preprocessor conditionals around
329 grub_dl_ref() and grub_dl_unref().
330 * fs/affs.c: Likewise.
331 * fs/afs.c: Likewise.
332 * fs/cpio.c: Likewise.
333 * fs/ext2.c: Likewise.
334 * fs/fat.c: Likewise.
335 * fs/hfs.c: Likewise.
336 * fs/hfsplus.c: Likewise.
337 * fs/iso9660.c: Likewise.
338 * fs/jfs.c: Likewise.
339 * fs/minix.c: Likewise.
340 * fs/ntfs.c: Likewise.
341 * fs/reiserfs.c: Likewise.
342 * fs/sfs.c: Likewise.
343 * fs/udf.c: Likewise.
344 * fs/ufs.c: Likewise.
345 * fs/xfs.c: Likewise.
346 * include/grub/dl.h: Likewise.
347 * loader/xnu.c: Likewise.
349 2009-05-04 Pavel Roskin <proski@gnu.org>
351 * commands/acpi.c: Remove unused variable my_mod.
352 * partmap/amiga.c: Likewise.
353 * partmap/apple.c: Likewise.
354 * partmap/gpt.c: Likewise.
355 * partmap/pc.c: Likewise.
356 * partmap/sun.c: Likewise.
357 * term/gfxterm.c: Likewise.
358 * term/i386/pc/vesafb.c: Likewise.
359 * term/i386/pc/vga.c: Likewise.
361 2009-05-04 David S. Miller <davem@davemloft.net>
363 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
364 pointer args to grub_ieee1275_get_property().
366 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
368 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
369 devices, and do not traverse down under controller nodes.
371 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
372 (grub_ofdisk_open): Use it to un-escape "," characters.
373 * kern/disk.c (find_part_sep): New.
374 (grub_disk_open): Use it to find the first non-escaped ','
375 character in the disk name.
376 * util/ieee1275/devicemap.c (escape_of_path): New.
377 (grub_util_emit_devicemap_entry): Use it.
378 * util/sparc64/ieee1275/grub-install.in: Update script to
379 strip partition specifiers properly by not triggering on
380 '\' escaped ',' characters.
382 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
384 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
386 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
388 (linux_vesafb_modes): Add a lot of additional modes to the list (based
389 on documentation from Wikipedia).
391 2009-05-04 Pavel Roskin <proski@gnu.org>
393 * disk/ata.c: Spelling fixes.
394 * disk/raid.c: Likewise.
395 * disk/usbms.c: Likewise.
396 * disk/dmraid_nvidia.c: Likewise.
397 * kern/ieee1275/openfw.c: Likewise.
398 * kern/ieee1275/init.c: Likewise.
399 * kern/ieee1275/cmain.c: Likewise.
400 * boot/i386/pc/cdboot.S: Likewise.
401 * video/readers/png.c: Likewise.
402 * video/i386/pc/vbe.c: Likewise.
403 * fs/udf.c: Likewise.
404 * fs/hfs.c: Likewise.
405 * fs/reiserfs.c: Likewise.
406 * efiemu/runtime/efiemu.c: Likewise.
407 * efiemu/main.c: Likewise.
408 * efiemu/mm.c: Likewise.
409 * include/grub/elf.h: Likewise.
410 * include/grub/xnu.h: Likewise.
411 * include/grub/usbdesc.h: Likewise.
412 * include/grub/usb.h: Likewise.
413 * include/grub/script_sh.h: Likewise.
414 * include/grub/lib/LzmaEnc.h: Likewise.
415 * include/grub/efiemu/efiemu.h: Likewise.
416 * include/grub/command.h: Likewise.
417 * normal/menu.c: Likewise.
418 * normal/main.c: Likewise.
419 * normal/datetime.c: Likewise.
420 * bus/usb/uhci.c: Likewise.
421 * mmap/i386/uppermem.c: Likewise.
422 * mmap/mmap.c: Likewise.
423 * commands/acpi.c: Likewise.
424 * commands/test.c: Likewise.
425 * partmap/apple.c: Likewise.
426 * font/font.c: Likewise.
427 * loader/sparc64/ieee1275/linux.c: Likewise.
428 * loader/macho.c: Likewise.
429 * loader/i386/bsd_trampoline.S: Likewise.
430 * loader/i386/bsd.c: Likewise.
431 * loader/xnu.c: Likewise.
432 * term/i386/pc/vesafb.c: Likewise.
433 * term/usb_keyboard.c: Likewise.
434 * util/resolve.c: Likewise.
435 * util/getroot.c: Likewise.
437 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
439 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
441 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
443 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
446 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
448 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
449 parameter only available on BIOS.
451 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
453 Removed wrong semicolon in declaration
455 * grub/misc.h (grub_dprintf): remove semicolon
457 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
459 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
460 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
461 is done by grub_cmd_linux() now).
462 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
463 restore video to text mode.
464 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
465 indicates lack of "vga=" parameter. "vga=0" is mapped to
466 `GRUB_LINUX_VID_MODE_NORMAL'.
468 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
470 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
471 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
472 and `normal/script.c'. Add `kern/rescue_reader.c',
473 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
474 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
477 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
478 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
479 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
480 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
481 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
483 * Makefile.in: Remove duplicated 2008 in Copyright line.
485 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
487 * util/misc.c (grub_util_warn): New function. Emmits a warning
489 * include/grub/util/misc.h (grub_util_warn): New declaration.
491 * util/i386/pc/grub-install.in: Understand --force and pass it down
494 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
496 (setup): Improve error messages and add warnings when requested to
497 install in odd layouts. Refuse to install using blocklists unless
500 2009-05-04 martin f. krafft <madduck@madduck.net>
502 * disk/raid.c (grub_raid_scan_device): Improve debug message.
504 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
506 Updated copyright year
508 * fs/hfsplus.c: updated copyright year
510 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
514 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
515 in the space previously used by unused3
516 (grub_hfsplus_uuid): new function
517 (grub_hfsplus_fs): added uuid field
519 2009-05-03 Pavel Roskin <proski@gnu.org>
521 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
522 suppress warnings. It's no longer needed.
523 * disk/host.c: Likewise.
524 * disk/ata_pthru.c: Likewise.
525 * disk/loopback.c: Likewise.
526 * hook/datehook.c: Likewise.
527 * parttool/pcpart.c: Likewise.
528 * fs/i386/pc/pxe.c: Likewise.
529 * fs/ntfscomp.c: Likewise.
530 * efiemu/main.c: Likewise.
531 * mmap/mmap.c: Likewise.
532 * commands/crc.c: Likewise.
533 * commands/hexdump.c: Likewise.
534 * commands/hdparm.c: Likewise.
535 * commands/acpi.c: Likewise.
536 * commands/echo.c: Likewise.
537 * commands/minicmd.c: Likewise.
538 * commands/blocklist.c: Likewise.
539 * commands/memrw.c: Likewise.
540 * commands/loadenv.c: Likewise.
541 * commands/usbtest.c: Likewise.
542 * commands/lsmmap.c: Likewise.
543 * commands/boot.c: Likewise.
544 * commands/parttool.c: Likewise.
545 * commands/configfile.c: Likewise.
546 * commands/search.c: Likewise.
547 * commands/ieee1275/suspend.c: Likewise.
548 * commands/cat.c: Likewise.
549 * commands/i386/pc/pxecmd.c: Likewise.
550 * commands/i386/pc/play.c: Likewise.
551 * commands/i386/pc/halt.c: Likewise.
552 * commands/i386/pc/vbeinfo.c: Likewise.
553 * commands/i386/pc/vbetest.c: Likewise.
554 * commands/lspci.c: Likewise.
555 * commands/date.c: Likewise.
556 * commands/handler.c: Likewise.
557 * commands/ls.c: Likewise.
558 * commands/test.c: Likewise.
559 * commands/cmp.c: Likewise.
560 * commands/efi/loadbios.c: Likewise.
561 * commands/efi/fixvideo.c: Likewise.
562 * commands/halt.c: Likewise.
563 * commands/help.c: Likewise.
564 * commands/reboot.c: Likewise.
565 * hello/hello.c: Likewise.
566 * script/sh/main.c: Likewise.
567 * loader/xnu.c: Likewise.
568 * term/terminfo.c: Likewise.
569 * term/i386/pc/serial.c: Likewise.
570 * term/usb_keyboard.c: Likewise.
572 2009-05-03 David S. Miller <davem@davemloft.net>
574 * normal/menu.c: Include grub/parser.h
576 2009-05-03 Pavel Roskin <proski@gnu.org>
578 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
580 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
581 Suggested by Javier MartÃn <lordhabbit@gmail.com>
583 * util/i386/pc/grub-mkrescue.in: Allow for the case when
584 efiemu??.o doesn't exist.
585 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
588 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
590 FreeBSD 64-bit support
592 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
593 and loader/i386/bsd_trampoline.S
594 (bsd_mod_ASFLAGS): new variable
595 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
596 (FREEBSD_MODTYPE_KERNEL64): likewise
597 (grub_bsd64_trampoline_start): likewise
598 (grub_bsd64_trampoline_end): likewise
599 (grub_bsd64_trampoline_selfjump): likewise
600 (grub_bsd64_trampoline_gdt): likewise
601 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
602 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
603 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
604 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
605 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
607 * loader/i386/bsd_pagetable.c: new file
608 * loader/i386/bsd_trampoline.S: likewise
609 * loader/i386/bsd.c (ALIGN_QWORD): new macro
610 (ALIGN_VAR): likewise
611 (entry_hi): new variable
612 (kern_end_mdofs): likewise
614 (grub_freebsd_add_meta): use ALIGN_VAR
615 (grub_e820_mmap): new declaration
616 (grub_freebsd_add_mmap): new function
617 (grub_freebsd_add_meta_module): support 64 bit kernels
618 (grub_freebsd_list_modules): use ALIGN_VAR
619 (gdt_descriptor): new declaration
620 (grub_freebsd_boot): support 64 bit kernels
621 (grub_bsd_elf64_hook): new function
622 (grub_bsd_load_elf): support elf64
624 2009-05-03 Bean <bean123ch@gmail.com>
626 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
627 after we get the result of if statement.
629 2009-05-03 Bean <bean123ch@gmail.com>
631 * Makefile.in (enable_efiemu): New variable.
633 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
635 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
637 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
638 path, add -mno-red-zone option.
639 (efiemu64_s.o): Likewise.
640 (efiemu64.o): Use macro $^ for source file.
642 * configure.ac (--enable-efiemu): New option.
644 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
648 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
649 (pkglib_MODULES): add xnu.mod
650 (xnu_mod_SOURCES): new variable
651 (xnu_mod_CFLAGS): likewise
652 (xnu_mod_LDFLAGS): likewise
653 (xnu_mod_ASFLAGS): likewise
654 * conf/i386-pc.rmk: likewise
655 * conf/x86_64-efi.rmk: likewise
656 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
658 * include/grub/i386/macho.h: new file
659 * include/grub/i386/xnu.h: likewise
660 * include/grub/macho.h: likewise
661 * include/grub/machoload.h: likewise
662 * include/grub/x86_64/macho.h: likewise
663 * include/grub/x86_64/xnu.h: likewise
664 * include/grub/xnu.h: likewise
665 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
666 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
667 * loader/i386/efi/xnu.c: new file
668 * loader/i386/pc/xnu.c: likewise
669 * loader/i386/xnu.c: likewise
670 * loader/i386/xnu_helper.S: likewise
671 * loader/macho.c: likewise
672 * loader/xnu.c: likewise
673 * loader/xnu_resume.c: likewise
674 * util/grub-dumpdevtree: likewise
675 * include/grub/i386/pit.h: include grub/err.h
676 (grub_pit_wait): export
677 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
679 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
683 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
684 _linux_efi, linux_efi.
685 new files in grub-emu
686 new targets efiemu32.o and efiemu64.o
687 * loader/linux_normal_efiemu.c: likewise
688 * loader/i386/efi/linux.c: added preliminary efiemu support
689 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
691 * include/grub/autoefi.h: new file
692 * include/grub/i386/efiemu.h: likewise
693 * include/grub/i386/pc/efiemu.h: likewise
694 * include/grub/efi/api.h: add LL suffix when necessary
695 new definitions relating to tables
696 * include/grub/efiemu/efiemu.h: new file
697 * include/grub/efiemu/runtime.h: likewise
698 * efiemu/prepare.c: likewise
699 * efiemu/loadcore_common.c: likewise
700 * efiemu/loadcore64.c: likewise
701 * efiemu/runtime/efiemu.sh: likewise
702 * efiemu/runtime/efiemu.S: likewise
703 * efiemu/runtime/efiemu.c: likewise
704 * efiemu/runtime/config.h: likewise
705 * efiemu/prepare32.c: likewise
706 * efiemu/main.c: likewise
707 * efiemu/modules/pnvram.c: likewise
708 * efiemu/modules/i386: likewise
709 * efiemu/modules/i386/pc: likewise
710 * efiemu/modules/acpi.c: likewise
711 * efiemu/i386/pc/cfgtables.c: likewise
712 * efiemu/i386/loadcore64.c: likewise
713 * efiemu/i386/loadcore32.c: likewise
714 * efiemu/prepare64.c: likewise
715 * efiemu/loadcore.c: likewise
716 * efiemu/symbols.c: likewise
717 * efiemu/mm.c: likewise
718 * efiemu/loadcore32.c: likewise
720 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
724 * commands/acpi.c: new file
725 * commands/i386/pc/acpi.c: likewise
726 * commands/efi/acpi.c: likewise
727 * include/grub/acpi.h: likewise
728 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
729 (acpi_mod_SOURCES): new variable
730 (acpi_mod_CFLAGS): likewise
731 (acpi_mod_LDFLAGS): likewise
732 * conf/i386-efi.rmk: likewise
733 * conf/x86_64-efi.rmk: likewise
735 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
737 Missing part from mmap patch
739 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
740 (grub_mmap_unregister)
741 (grub_mmap_free_and_unregister): use grub_mmap_register
743 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
747 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
748 * loader/i386/linux.c (find_mmap_size): likewise
749 (allocate_pages): likewise
750 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
751 (grub_fill_multiboot_mmap): likewise
752 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
753 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
754 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
755 (OPENBSD_MMAP_RESERVED): likewise
756 * include/grub/i386/pc/memory.h: include grub/memory.h
757 (grub_lower_mem): removed
758 (grub_upper_mem): likewise
759 (GRUB_MACHINE_MEMORY_ACPI): new definition
760 (GRUB_MACHINE_MEMORY_NVS): likewise
761 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
762 (GRUB_MACHINE_MEMORY_HOLE): likewise
763 (grub_machine_mmap_register): likewise
764 (grub_machine_mmap_unregister): likewise
765 (grub_machine_get_upper): likewise
766 (grub_machine_get_lower): likewise
767 (grub_machine_get_post64): likewise
768 * include/grub/i386/efi/memory.h: new file
769 * include/grub/x86_64/efi/memory.h: likewise
770 * include/grub/efi/memory.h: likewise
771 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
772 (mmap_mod_SOURCES): new variable
773 (mmap_mod_LDFLAGS): likewise
774 (mmap_mod_ASFLAGS): likewise
775 * conf/i386-coreboot.rmk: likewise
776 * conf/i386-ieee1275.rmk: likewise
777 * conf/i386-efi.rmk: likewise
778 * conf/x86_64-efi.rmk: likewise
779 * include/grub/types.h (UINT_TO_PTR): new macro
780 (PTR_TO_UINT32): likewise
781 (PTR_TO_UINT64): likewise
782 * include/grub/memory.h: new file
783 * mmap/i386/pc/mmap.c: likewise
784 * mmap/i386/pc/mmap_helper.S: likewise
785 * mmap/i386/uppermem.c: likewise
786 * mmap/mmap.c: likewise
787 * mmap/efi/mmap.c: likewise
788 * kern/i386/coreboot/init.c (grub_machine_init): don't use
790 * kern/i386/pc/init.c (grub_lower_mem): removed variable
791 (grub_upper_mem): likewise
792 (grub_machine_init): don't use grub_upper_mem,
793 make grub_lower_mem local
794 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
795 grub_mmap_iterate and grub_mmap_get_upper
796 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
798 2009-05-02 Bean <bean123ch@gmail.com>
800 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
802 (pkglib_MODULES): Add normal.mod and sh.mod.
803 (normal_SOURCES): New variable.
804 (normal_mod_CFLAGS): Likewise.
805 (normal_mod_LDFLAGS): Likewise.
806 (sh_mod_SOURCES): Likewise.
807 (sh_mod_CFLAGS): Likewise.
808 (sh_mod_LDFLAGS): Likewise.
810 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
811 script/sh/lexer.c_DEPENDENCIES.
812 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
813 kern/rescue_reader.c and kern/rescue_parser.c.
814 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
815 (grub_emu_SOURCES): Change source files.
816 (pkglib_MODULES): Remove normal.mod.
817 (normal_SOURCES): Removed.
818 (normal_mod_CFLAGS): Likewise.
819 (normal_mod_LDFLAGS): Likewise.
820 * conf/i386-coreboot.rmk: Likewise.
821 * conf/i386-efi.rmk: Likewise.
822 * conf/i386-ieee1276.rmk: Likewise.
823 * conf/powerpc-ieee1275.rmk: Likewise.
824 * conf/sparc64-ieee1275.rmk: Likewise.
825 * conf/x86_64-efi.rmk: Likewise.
827 * include/grub/command.h (grub_command_execute): New inline function.
829 * include/grub/menu.h (grub_menu_entry): Removed commands field.
831 * include/grub/normal.h: Remove <grub/setjmp.h>.
832 (grub_fs_module_list): Moved to normal/autofs.c.
833 (grub_exit_env): Removed.
834 (grub_command_execute): Likewise.
835 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
837 (read_command_list): New function declaration.
838 (read_fs_list): Likewise.
840 * include/parser.h: Include <grub/reader.h>.
841 (grub_parser_split_cmdline): Change type of getline parameter.
842 (grub_parser): New structure.
843 (grub_parser_class): New variable.
844 (grub_parser_execute): New function declaration.
845 (grub_register_rescue_parser): Likewise.
846 (grub_parser_register): New inline function.
847 (grub_parser_unregister): Likewise.
848 (grub_parser_get_current): Likewise.
849 (grub_parser_set_current): Likewise.
851 * include/grub/reader.h: New file.
852 * kern/reader.c: Likewise.
853 * kern/rescue_parser.c: Likewise.
854 * kern/rescue_reader.c: Likewise.
855 * normal/autofs.c: Likewise.
856 * normal/dyncmd.c: Likewise.
858 * include/grub/rescue.h: Removed.
859 * normal/command.h: Likewise.
861 * include/grub/script.h: Moved to ...
862 * include/grub/script_sh.h: ... Moved here.
863 * normal/execute.c: Moved to ...
864 * script/sh/execute.c: ... Moved here.
865 * normal/function.c: Moved to ...
866 * script/sh/function.c: ... Moved here.
867 * normal/lexer.c: Moved to ...
868 * script/sh/lexer.c: ... Moved here.
869 * normal/parser.y: Moved to ...
870 * script/sh/parser.y: ... Moved here.
871 * normal/script.c: Moved to ...
872 * script/sh/script.c: ... Moved here.
874 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
876 (grub_exit_env): Removed.
877 (fs_module_list): Moved to normal/autofs.c.
878 (grub_file_getline): Don't handle comment here.
879 (free_menu): Skip removed field entry->commands.
880 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
882 (read_config_file): Removed nested parameter, change getline function.
883 (grub_enter_normal_mode): Removed.
884 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
885 (read_command_list): Likewise.
886 (autoload_fs_module): Moved to normal/autofs.c.
887 (read_fs_list): Likewise.
888 (reader_nested): New variable.
889 (grub_normal_execute): Run parser.sh to switch to sh parser.
890 (grub_cmd_rescue): Removed.
891 (cmd_normal): Removed.
892 (grub_cmd_normal): Unregister itself at the beginning. Don't register
894 (grub_cmdline_run): New function.
895 (grub_normal_reader_init): Likewise.
896 (grub_normal_read_line): Likewise.
897 (grub_env_write_pager): Likewise.
898 (cmdline): New variable.
899 (grub_normal_reader): Likewise.
900 (GRUB_MOD_INIT): Register normal reader and set as current, register
901 pager hook, register normal command with grub_register_command_prio,
902 so that it won't show up in command.lst.
903 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
904 grub_fs_autoload_hook.
906 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
907 (grub_menu_execute_entry): Replace grub_script_execute with
908 grub_parser_execute, change parameter to grub_command_execute.
910 * normal/menu_text.c: Remove <grub/script.h>.
912 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
914 (run): Change editor_getline to use new parser interface. Change
915 parameter to grub_command_execute.
917 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
918 <grub/reader.h> and <grub/parser.h>.
919 (grub_load_normal_mode): Execute normal command.
920 (grub_main): Call grub_register_core_commands,
921 grub_register_rescue_parser and grub_register_rescue_reader, use
922 grub_reader_loop to enter input loop.
924 * kern/parser.c (grub_parser_split_cmdline): Change type of
926 (grub_parser_class): New variable.
927 (grub_parser_execute): New function.
929 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
930 * loader/multiboot2.c: Likewise.
931 * loader/sparc64/ieee1275/linux.c: Likewise.
933 * util/grub-emu.c (read_command_list): New dummy function.
935 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
937 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
938 count to 16 for CCISS and IDA.
940 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
942 * normal/menu_text.c (grub_wait_after_message): Print a newline
943 after waiting for user input.
945 * loader/i386/linux.c: Include `<grub/normal.h>'.
946 (grub_cmd_linux): Improve the error message about `ask' mode, by
947 waiting for user input so it's not missed (we can do this, since
948 user requested interaction).
950 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
952 Added missing lst to grub-mkrescue
954 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
955 and ${input_dir}/parttool.lst
957 2009-04-30 David S. Miller <davem@davemloft.net>
959 * util/hostdisk.c (device_is_wholedisk): New function.
960 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
961 zero only if device_is_wholedisk() returns true.
963 * util/hostdisk.c (convert_system_partition_to_system_disk):
964 Handle virtual disk devices named /dev/vdiskX as found on sparc
967 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
968 lettered partition specifier is found, convert to numbered.
970 2009-04-29 David S. Miller <davem@davemloft.net>
972 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
973 * include/grub/sparc64/ieee1275/memory.h: Likewise.
975 * normal/command.c: Add missing newline at end of file.
977 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
979 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
980 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
981 grub_ofdisk_read): Likewise, and deal similarly with the fact that
982 ihandles have a 32-bit type but need to be stored in a "void *".
984 2009-04-28 Pavel Roskin <proski@gnu.org>
986 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
987 not disk. Adjust all dependencies.
988 (grub_fs_uuid_close): Use grub_device_close(), not
991 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
992 parent's partition, don't copy it by reference, as it gets freed
995 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
997 Preboot hooks support
999 * commands/boot.c (struct grub_preboot_t): new declaration
1000 (preboots_head): new variable
1001 (preboots_tail): likewise
1002 (grub_loader_register_preboot_hook): new function
1003 (grub_loader_unregister_preboot_hook): likewise
1004 (grub_loader_set): launch preboot hooks
1005 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1006 (grub_loader_register_preboot_hook): new declaration
1007 (grub_loader_unregister_preboot_hook): likewise
1009 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1013 * disk/scsi.c (grub_scsi_open): added missing cast when
1014 calling grub_dprintf
1016 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1018 Bug and warning fixes
1020 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1022 * commands/test.c (test_parse): fixed bug with file tests and corrected
1023 declaration of find_file
1025 2009-04-26 Pavel Roskin <proski@gnu.org>
1027 * Makefile.in: Don't install empty manual pages if help2man is
1028 missing. Use help2man option for output, not shell redirection.
1030 2009-04-26 David S. Miller <davem@davemloft.net>
1032 * util/grub-mkdevicemap.c (make_device_map): Add missing
1033 NESTED_FUNC_ATTR to process_device().
1035 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1039 * commands/test.c: rewritten to use bash-like test
1041 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1043 Parttool autoloading and improvements
1045 * Makefile.in (pkglib_DATA): add parttool.lst
1046 (parttool.lst): new target
1047 * genmk.rb: generate parttool-*
1048 (CLEANFILES): add #{parttool}
1049 (PARTTOOLFILES): new variable
1050 * genparttoollist.sh: new file
1051 * parttool/pcpart.c (grub_pcpart_boot): more feedback
1052 (grub_pcpart_type): likewise
1053 * commands/parttool.c (helpmsg): new variable
1054 (grub_cmd_parttool): output help if not enough arguments are supplied
1056 (GRUB_MOD_INIT(parttool)): use helpmsg
1058 2009-04-24 David S. Miller <davem@davemloft.net>
1060 Avoiding opening same device multiple times in device iterator.
1062 * kern/device.c: (grub_device_iterate): Define struct part_ent,
1063 and use it to build a list of partitions in iterate_disk() and
1064 iterate_partition().
1066 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1069 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1070 grub_devalias_iterate() result instead of unconditional 0.
1071 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1072 Also, capture hook return value, either directly or via
1073 grub_children_iterate(), and propagate to caller.
1074 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1075 grub_children_iterate): Return value is now 'int' instead of
1077 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1078 like a proper iterator, stopping when hooks return non-zero.
1079 (grub_devalias_iterate): Likewise.
1081 2009-04-23 David S. Miller <davem@davemloft.net>
1083 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1085 2009-04-22 David S. Miller <davem@davemloft.net>
1087 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1088 is larger than address_cells, use that value for address_cells too.
1090 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1091 IEEE1275_MAX_PATH_LEN): Define.
1092 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1093 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1094 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1095 'devtype'. Explicitly NULL terminate devalias expansion.
1097 * util/sparc64/ieee1275/misc.c: New file.
1098 * util/sparc64/ieee1275/grub-setup.c: New file.
1099 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1100 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1101 * util/sparc64/ieee1275/grub-install.in: New file.
1102 * util/ieee1275/ofpath.c: New file.
1103 * util/ieee1275/devicemap.c: New file.
1104 * util/devicemap.c: New file.
1105 * util/deviceiter.c: New file.
1106 * kern/sparc64/ieee1275/init.c: New file.
1107 * include/grub/util/ofpath.h: New file.
1108 * include/grub/util/deviceiter.h: New file.
1109 * util/grub-mkdevicemap.c: Include deviceiter.h.
1110 Implement using grub_util_emit_devicemap_entry and
1111 grub_util_iterate_devices.
1112 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1113 util/devicemap.c into grub-mkdevicemap
1114 * conf/i386-efi.rmk: Likewise.
1115 * conf/i386-ieee1275.rmk: Likewise.
1116 * conf/i386-pc.rmk: Likewise.
1117 * conf/powerpc-ieee1275.rmk: Likewise.
1118 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1119 images and installation utilities. Build kernel as image
1120 instead of as elf binary. Use common rules as much as possible.
1122 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
1124 Correct GPT definition
1126 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1129 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
1131 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1133 2009-04-19 David S. Miller <davem@davemloft.net>
1135 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1136 (grub_rescue_cmd_linux): Rename to...
1137 (grub_cmd_linux): and fix prototype.
1138 (grub_rescue_cmd_initrd): Rename to...
1139 (grub_cmd_initrd): and fix prototype.
1140 (cmd_linux, cmd_initrd): New.
1141 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1142 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1144 2009-04-17 Pavel Roskin <proski@gnu.org>
1146 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1148 (grub_ohci_transfer): Likewise.
1150 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1152 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1153 return without a value. Fix inconsistent indentation.
1155 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1156 match struct grub_fs.
1158 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1159 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1160 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1161 * commands/lspci.c (grub_lspci_iter): Likewise.
1163 2009-04-16 Bean <bean123ch@gmail.com>
1165 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1168 2009-04-15 Pavel Roskin <proski@gnu.org>
1170 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1171 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1172 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1175 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1177 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1178 that no multiple data or metadata areas are supported and `Unknown
1181 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1183 Move loader out of the kernel
1185 * kern/loader.c: moved to ...
1186 * commands/boot.c: ... moved here
1187 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1188 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1189 * include/grub/kernel.h (grub_machine_fini): export
1190 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1191 (grub_loader_set): likewise
1192 (grub_loader_unset): likewise
1193 (grub_loader_boot): likewise
1194 * conf/common.rmk: new module boot.mod
1195 (pkglib_MODULES): add boot.mod
1196 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1197 (grub_emu_SOURCES): likewise
1198 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1199 (grub_emu_SOURCES): likewise
1200 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1201 (grub_emu_SOURCES): likewise
1202 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1203 (grub_emu_SOURCES): likewise
1204 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1205 (grub_emu_SOURCES): likewise
1206 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1207 (grub_emu_SOURCES): likewise
1208 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1209 (grub_emu_SOURCES): likewise
1211 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1213 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1215 * kern/misc.c (grub_itoa): Removed function
1216 (grub_ltoa): likewise
1217 (grub_vsprintf): use grub_lltoa
1219 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1223 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1224 * conf/i386-coreboot.rmk: likewise
1225 * conf/i386-ieee1275.rmk: likewise
1226 * conf/powerpc-ieee1275.rmk: likewise
1228 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1230 * INSTALL: Add that `./autogen.sh' needs to be run before
1233 2009-04-14 Bean <bean123ch@gmail.com>
1235 * Makefile.in (pkglib_DATA): Add handler.lst.
1236 (handler.lst): New rule.
1238 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1239 * conf/i386-coreboot.rmk: Likewise.
1240 * conf/i386-ieee1275.rmk: Likewise.
1241 * conf/i386-efi.rmk: Likewise.
1242 * conf/x86_64-efi.rmk: Likewise.
1243 * conf/powerpc-ieee1275.rmk: Likewise.
1244 * conf/sparc64-ieee1275.rmk: Likewise.
1246 * genhandlerlist.sh: New file.
1248 * genmk.rb: Add rules to generate handler.lst.
1250 * include/grub/normal.h (grub_file_getline): New function definition.
1251 (read_handler_list): Likewise.
1252 (free_handler_list): Likewise.
1254 * include/grub/term.h (grub_term_register_input): Add name parameter
1255 for auto generation of handler.lst.
1256 (grub_term_register_output): Likewise.
1258 * normal/handler.c: New file.
1260 * normal/main.c (get_line): Renamed to grub_file_getline.
1261 (read_config_file): Use the newly renamed grub_file_getline.
1262 (read_command_list): Likewise.
1263 (read_fs_list): Likewise.
1264 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1265 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1267 * term/efi/console.c (grub_console_init): Add name parameter for auto
1268 generation of handler.lst.
1269 * term/gfxterm.c: Likewise.
1270 * term/i386/pc/at_keyboard.c: Likewise.
1271 * term/i386/pc/console.c: Likewise.
1272 * term/i386/pc/serial.c: Likewise.
1273 * term/i386/pc/vesafb.c: Likewise.
1274 * term/i386/pc/vga.c: Likewise.
1275 * term/i386/pc/vga_text.c: Likewise.
1276 * term/ieee1275/ofconsole.c: Likewise.
1277 * term/usb_keyboard.c: Likewise.
1279 2009-04-14 Bean <bean123ch@gmail.com>
1281 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1282 properly with null character.
1284 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1286 * configure: Remove.
1287 * config.h.in: Likewise.
1288 * stamp-h.in: Likewise.
1289 * DISTLIST: Likewise.
1290 * conf/common.mk: Likewise.
1291 * conf/i386-coreboot.mk: Likewise.
1292 * conf/i386-efi.mk: Likewise.
1293 * conf/i386-ieee1275.mk: Likewise.
1294 * conf/i386.mk: Likewise.
1295 * conf/i386-pc.mk: Likewise.
1296 * conf/powerpc-ieee1275.mk: Likewise.
1297 * conf/sparc64-ieee1275.mk: Likewise.
1298 * conf/x86_64-efi.mk: Likewise.
1300 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1303 2009-04-14 John Stanley <jpsinthemix@verizon.net>
1304 David S. Miller <davem@davemloft.net>
1306 * util/hostdisk.c (make_device_name): Fix buffer length
1309 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1311 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1312 <sys/param.h> and <sys/sysctl.h>.
1313 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1314 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1315 opening the device and reset them afterwards.
1317 2009-04-13 Pavel Roskin <proski@gnu.org>
1319 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1320 Reported by John Stanley <jpsinthemix@verizon.net>
1322 2009-04-13 Robert Millan <rmh@aybabtu.com>
1324 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1325 that name for menuentries when appropriate.
1327 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1329 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1331 2009-04-13 Robert Millan <rmh@aybabtu.com>
1333 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1334 to Linux, simply abort telling the user it's no longer supported.
1336 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1338 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1339 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
1340 `freebsd_loadenv' only when devices.hints exist.
1342 2009-04-13 Pavel Roskin <proski@gnu.org>
1344 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1346 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1348 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1350 (grub_drive): Likewise.
1352 2009-04-13 David S. Miller <davem@davemloft.net>
1354 * kern/sparc64/ieee1275/ieee1275.c: New file.
1355 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1356 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1357 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1358 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1359 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1360 grub_ieee1275_alloc_physmem): Declare new exported functions.
1362 * include/grub/sparc64/ieee1275/loader.h: New file.
1363 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1364 * include/grub/sparc64/kernel.h: Likewise.
1365 * loader/sparc64/ieee1275/linux.c: Likewise.
1367 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1368 (grub_fstest_SOURCES): Likewise.
1370 * util/hostdisk.c (make_device_name): Do not make any assumptions
1371 about the length of drive names.
1373 * kern/dl.c (grub_dl_load_file): Close file immediately when
1374 we are done using it.
1376 2009-04-12 David S. Miller <davem@davemloft.net>
1378 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1379 values. Noticed by Pavel Roskin.
1381 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1384 * genmk.rb: Add more flexible image type specification, also
1385 pass --strip-unneeded to objcopy.
1386 * conf/i386-pc.rmk: Use *_FORMAT.
1387 * conf/i386-pc.mk: Rebuilt.
1389 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1390 (OFDISK_HASH_SZ): Define.
1391 (ofdisk_hash): New hash table.
1392 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1393 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1394 instead of device phandle which is not unique.
1396 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1397 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1398 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1399 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1400 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1401 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1402 GRUB_KERNEL_MACHINE_DATA_END): Define.
1403 (grub_kernel_image_size, grub_total_module_size): Declare.
1405 2009-04-12 Pavel Roskin <proski@gnu.org>
1407 * configure.ac: Change the logic when we check for target tools.
1408 Do it when the target is specified and it's different from the
1409 specified value of the host.
1411 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
1413 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1414 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1415 GNU/kFreeBSD. Check if a device is a character device. Use
1416 DIOCGMEDIASIZE to get the size.
1417 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1418 support for GNU/kFreeBSD.
1419 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1420 is a character device instead of a block device. Add support for
1421 FreeBSD device names.
1423 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1424 is a character device instead of a block device.
1426 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1427 is a character device instead of a block device.
1429 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1431 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1432 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1433 FreeBSD. Check if a device is a character device. Use
1434 DIOCGMEDIASIZE to get the size.
1435 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1436 support for FreeBSD.
1437 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1438 is a character device instead of a block device. Add support for
1439 FreeBSD device names.
1441 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1442 a character device instead of a block device.
1443 (grub_util_check_char_device): New function.
1445 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1446 a character device instead of a block device.
1448 * include/grub/util/getroot.h (grub_util_check_char_device): New
1451 2009-04-11 David S. Miller <davem@davemloft.net>
1453 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1455 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1456 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1457 function, if present.
1458 (__bswapdi2): Likewise.
1460 * include/grub/sparc64/ieee1275/boot.h: New file.
1461 * boot/sparc64/ieee1275/boot.S: Likewise.
1462 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1464 * kern/misc.c (grub_ltoa): New function.
1465 (grub_vsprintf): Use it to format 'long' integers.
1467 2009-04-10 David S. Miller <davem@davemloft.net>
1469 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1470 slots are of type grub_ieee1275_cell_t.
1471 (grub_nand_read): Likewise.
1472 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1473 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1474 macros are used to compare values in arg/ret block of the call.
1475 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1476 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1477 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1478 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1479 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1480 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1481 grub_ieee1275_close, grub_ieee1275_set_property,
1482 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1483 grub_ieee1275_cell_t.
1484 * kern/ieee1275/openfw.c (grub_map): Likewise.
1485 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1486 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1488 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1489 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1490 (grub_devalias_iterate): Likewise.
1492 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
1496 * fs/ufs.c (INODE_NBLOCKS): new definition
1497 (struct grub_ufs_dirent): added fields for non-BSD dirents
1498 (grub_ufs_get_file_block): fixed double indirect handling
1499 (grub_ufs_lookup_symlink): use more robust way to determine whether
1501 (grub_ufs_find_file): support for non-BSD dirents
1502 (grub_ufs_dir): support for non-BSD dirents
1504 2009-04-10 Bean <bean123ch@gnail.com>
1506 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1507 attribute, otherwise the size would be wrong for i386 platform.
1509 * include/grub/pci.h (grub_pci_read_word): New inline function.
1510 (grub_pci_read_byte): Likewise.
1511 (grub_pci_write): Likewise.
1512 (grub_pci_write_word): Likewise.
1513 (grub_pci_write_byte): Likewise.
1515 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1517 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1518 (find_framebuf): Scan pci to locate the frame buffer address.
1520 * commands/efi/fixvideo.c: New file.
1522 * commands/efi/loadbios.c: Likewise.
1524 * commands/memrw.c: Likewise.
1526 * util/grub-dumpbios.in: Likewise.
1528 * conf/common.rmk (grub-dumpbios): New utility.
1529 (pkglib_MODULES): New module memrw.mod.
1530 (memrw_mod_SOURCE): New macro.
1531 (memrw_mod_CFLAGS): Likewise.
1532 (memrw_mod_LDFLAGS): Likewise.
1534 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1536 (loadbios_mod_SOURCE): New macro.
1537 (loadbios_mod_CFLAGS): Likewise.
1538 (loadbios_mod_LDFLAGS): Likewise.
1539 (fixvideo_mod_SOURCE): Likewise.
1540 (fixvideo_mod_CFLAGS): Likewise.
1541 (fixvideo_mod_LDFLAGS): Likewise.
1543 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1545 (loadbios_mod_SOURCE): New macro.
1546 (loadbios_mod_CFLAGS): Likewise.
1547 (loadbios_mod_LDFLAGS): Likewise.
1548 (fixvideo_mod_SOURCE): Likewise.
1549 (fixvideo_mod_CFLAGS): Likewise.
1550 (fixvideo_mod_LDFLAGS): Likewise.
1552 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
1554 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1556 2009-04-07 David S. Miller <davem@davemloft.net>
1558 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1559 support for R_SPARC_OLO10 relocations. Fix compile warning for
1560 R_SPARC_WDISP30 case.
1561 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1563 2009-04-06 Pavel Roskin <proski@gnu.org>
1565 * include/grub/misc.h (ARRAY_SIZE): New macro.
1566 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1568 * loader/i386/linux.c (allocate_pages): Use free_pages().
1569 (grub_linux_unload): Don't use free_pages().
1570 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1571 wrong index. Treat all other modes as text modes.
1572 (grub_cmd_linux): Initialize vid_mode unconditionally to
1573 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1575 * commands/help.c (print_command_help): Use cmd->prio, not
1576 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1578 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
1582 * parttool/pcpart.c: new file
1583 * commands/parttool.c: likewise
1584 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1585 (parttool_mod_SOURCES): new variable
1586 (parttool_mod_CFLAGS): likewise
1587 (parttool_mod_LDFLAGS): likewise
1588 (pcpart_mod_SOURCES): likewise
1589 (pcpart_mod_CFLAGS): likewise
1590 (pcpart_mod_LDFLAGS): likewise
1591 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1592 and parttool/pcpart.c
1593 * conf/i386-efi.rmk: likewise
1594 * conf/i386-ieee1275.rmk: likewise
1595 * conf/i386-pc.rmk: likewise
1596 * conf/powerpc-ieee1275.rmk: likewise
1597 * conf/sparc64-ieee1275.rmk: likewise
1598 * conf/x86_64-ieee1275.rmk: likewise
1600 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1602 Support for mtime and further expandability of dir command
1604 * include/grub/lib/datetime.h: moved to ...
1605 * include/grub/datetime.h: ... moved here and added
1606 declaration of grub_unixtime2datetime. All users updated
1607 * include/grub/fs.h: new syntax for dir and mtime functions in
1609 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1610 and GRUB_FSHELP_FLAGS_MASK
1611 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1612 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1613 (grub_ext2_mtime): new function
1614 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1615 (grub_hfsplus_mtime): new function
1616 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1617 (GRUB_UFS_ATTR_FILE): likewise
1618 (GRUB_UFS_ATTR_LNK): likewise
1619 (struct grub_ufs_sblock): new fields mtime
1620 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1622 (grub_ufs_dir): mtime support
1623 (grub_ufs_mtime): new function
1624 * fs/affs.c (grub_affs_dir): use new dir syntax
1625 * fs/afs.c (grub_afs_dir): likewise
1626 * fs/cpio.c (grub_cpio_dir): likewise
1627 * fs/fat.c (grub_fat_find_dir): likewise
1628 * fs/hfs.c (grub_hfs_dir): likewise
1629 * fs/iso9660.c (grub_iso9660_dir): likewise
1630 * fs/jfs.c (grub_jfs_dir): likewise
1631 * fs/minix.c (grub_minix_dir): likewise
1632 * fs/ntfs.c (grub_ntfs_dir): likewise
1633 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1634 * fs/sfs.c (grub_sfs_dir): likewise
1635 * fs/xfs.c (grub_xfs_dir): likewise
1636 * util/hostfs.c (grub_hostfs_dir): likewise
1637 * lib/datetime.c: moved to ...
1638 * normal/datetime.c: ... moved here
1639 (grub_unixtime2datetime): new function
1640 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1641 * normal/completion.c (iterate_dir): use new dir syntax
1642 * normal/misc.c (grub_normal_print_device_info): tell the
1643 last modification time of a volume
1644 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1645 * conf/common.rmk: added lib/datetime.c to ls.mod
1646 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1647 (normal_mod_SOURCES): likewise
1648 (datetime_mod_SOURCES): Removed lib/datetime.c
1649 * conf/i386-efi.rmk: likewise
1650 * conf/i386-ieee1275.rmk: likewise
1651 * conf/i386-pc.rmk: likewise
1652 * conf/powerpc-ieee1275.rmk: likewise
1653 * conf/sparc64-ieee1275.rmk: likewise
1654 * conf/x86_64-efi.rmk: likewise
1656 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1658 Trim trailing spaces in FAT label and support mtools-like labels
1660 * fs/fat.c (grub_fat_iterate_dir): New function based
1661 on grub_fat_find_dir
1662 (grub_fat_find_dir): use grub_fat_iterate_dir
1663 (grub_fat_label): likewise
1665 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1667 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1669 remove extraneous kernel_elf_HEADERS
1671 2009-04-04 Bean <bean123ch@gnail.com>
1673 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1675 * util/misc.c: Likewise.
1677 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1679 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1680 instead of grub_printf.
1682 2009-04-03 Robert Millan <rmh@aybabtu.com>
1684 * loader/i386/linux.c (grub_linux_setup_video): Fill
1685 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1686 values from `mode info' structure instead of hardcoded
1689 2009-04-01 Pavel Roskin <proski@gnu.org>
1691 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1693 * genmk.rb: Likewise.
1694 * configure.ac: Likewise.
1696 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1698 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1699 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1701 2009-04-01 David S. Miller <davem@davemloft.net>
1703 * normal/sparc64/setjmp.S: Fix setjmp implementation.
1704 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1705 (grub_setjmp): Mark with 'returns_twice' attribute.
1706 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1707 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1708 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1710 2009-04-01 Robert Millan <rmh@aybabtu.com>
1712 Reapply fix from 2008-07-28 which was accidentally reverted; also
1713 perform the same fix to a similar check in same function.
1715 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1716 with the same number are found, just use issue a warning with
1717 grub_dprintf(), as this error has been reported to be non-fatal.
1719 2009-03-31 Pavel Roskin <proski@gnu.org>
1721 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1722 for cross-compilation.
1724 2009-03-30 Robert Millan <rmh@aybabtu.com>
1726 Fix i386-ieee1275 build.
1728 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1731 2009-03-30 Pavel Roskin <proski@gnu.org>
1733 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1734 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1735 zero-terminated, rely only on the strlen value. Fix comparison
1736 of strings differing in length.
1738 2009-03-30 Robert Millan <rmh@aybabtu.com>
1740 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1741 checking for abi version. Improve error messages on BIOS to notify
1742 user about `linux16' command.
1744 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1748 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1749 in case of collision
1750 * disk/scsi.c (grub_scsi_open): free scsi in case of error
1752 2009-03-29 Robert Millan <rmh@aybabtu.com>
1754 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1755 set `vid_mode' accordingly.
1756 (grub_linux_boot): Process `vid_mode' and set video mode.
1758 2009-03-29 Robert Millan <rmh@aybabtu.com>
1760 * util/grub.d/10_linux.in (linux_entry): New function.
1761 Factorize generation of Linux boot entries.
1763 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1765 Make the format of Environment Block plain text. The boot loader
1766 part is not tested well yet.
1768 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1771 (usage): Remove "info" and "clear". Add "unset". Update the
1772 description of "set", as this does not delete variables any
1774 (create_envblk_file): Complete rewrite.
1775 (open_envblk_file): Likewise.
1776 (cmd_info): Removed.
1777 (cmd_list): Likewise.
1778 (cmd_set): Likewise.
1779 (cmd_clear): Likewise.
1780 (list_variables): New function.
1781 (write_envblk): Likewise.
1782 (set_variables): Likewise.
1783 (unset_variables): Likewise.
1784 (main): Complete rewrite.
1786 * commands/loadenv.c (buffer): Removed.
1788 (open_envblk_file): New function.
1789 (read_envblk_file): Complete rewrite.
1790 (grub_cmd_load_env): Likewise.
1791 (grub_cmd_list_env): Likewise.
1792 (struct blocklist): New struct.
1793 (free_blocklists): New function.
1794 (check_blocklists): Likewise.
1795 (write_blocklists): Likewise.
1796 (grub_cmd_save_env): Complete rewrite.
1798 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1799 a plain text signature.
1800 (GRUB_ENVBLK_MAXLEN): Removed.
1801 (struct grub_envblk): Complete rewrite.
1802 (grub_envblk_find): Removed.
1803 (grub_envblk_insert): Likewise.
1804 (grub_envblk_open): New prototype.
1805 (grub_envblk_set): Likewise.
1806 (grub_envblk_delete): Put const to VALUE.
1807 (grub_envblk_iterate): Put const to NAME and VALUE.
1808 (grub_envblk_close): New prototype.
1809 (grub_envblk_buffer): New inline function.
1810 (grub_envblk_size): Likewise.
1812 * lib/envblk.c: Include grub/mm.h.
1813 (grub_env_find): Removed.
1814 (grub_envblk_open): New function.
1815 (grub_envblk_close): Likewise.
1816 (escaped_value_len): Likewise.
1817 (find_next_line): Likewise.
1818 (grub_envblk_insert): Removed.
1819 (grub_envblk_set): New function.
1820 (grub_envblk_delete): Complete rewrite.
1821 (grub_envblk_iterate): Likewise.
1823 2009-03-28 Robert Millan <rmh@aybabtu.com>
1825 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1826 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1827 variables. Use 16-bit loader.
1828 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1830 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1831 (grub_linux16_boot): ... this. Update all users.
1832 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1833 (grub_linux_boot): ... this. Update all users.
1835 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1836 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1837 commands to `linux16' and `initrd16'.
1838 (GRUB_MOD_FINI(linux)): Rename to ...
1839 (GRUB_MOD_FINI(linux16)): ... this.
1841 2009-03-24 Pavel Roskin <proski@gnu.org>
1843 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1844 not just for compilation.
1846 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1848 Move multiboot helper out of kernel
1850 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1851 `loader/i386/multiboot_helper.S'.
1852 * conf/i386-coreboot.rmk: Likewise
1853 * conf/i386-ieee1275.rmk: Likewise
1855 * kern/i386/loader.S: Move multiboot helpers from here...
1856 * loader/i386/multiboot_helper.S: ...moved here
1857 * include/grub/i386/loader.h: Move declarations of multiboot
1858 helpers from here...
1859 * include/grub/i386/multiboot.h: ...moved here
1860 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1862 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1864 * kern/env.c (grub_env_context_open): Added an argument to specify
1865 whether a new context inherits exported variables from current
1866 one. This is useful when making a sandbox to interpret a config
1868 All callers updated.
1870 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1872 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1874 * kern/env.c (grub_env_context_close): Fix memory leaks.
1876 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1878 * normal/main.c (grub_normal_execute): Added an argument
1879 BATCH to specify if an interactive interface should be provided
1880 after reading a config file.
1881 All callers updated.
1882 (read_command_list): Prevent being executed twice.
1883 (read_fs_list): Likewise.
1885 * include/grub/normal.h (grub_normal_execute): Updated the
1888 2009-03-22 Pavel Roskin <proski@gno.org>
1890 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1892 * kern/i386/pc/startup.S: Likewise.
1893 * kern/i386/efi/startup.S: Likewise.
1894 * kern/i386/ieee1275/startup.S: Likewise.
1895 * kern/i386/coreboot/startup.S: Likewise.
1896 * kern/x86_64/efi/startup.S: Likewise.
1898 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1899 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1900 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1902 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1904 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1906 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1908 Use vaddr of correct segment for entry_point.
1910 2009-03-21 Bean <bean123ch@gmail.com>
1912 * commands/blocklist.c: Add include file <grub/command.h>, remove
1913 <grub/normal.h> and <grub/arg.h>.
1914 (grub_cmd_blocklist): Use the new command interface.
1915 (GRUB_MOD_INIT): Likewise.
1916 (GRUB_MOD_FINI): Likewise.
1917 * commands/boot.c: Likewise.
1918 * commands/cat.c: Likewise.
1919 * commands/cmp.c: Likewise.
1920 * commands/configfile.c: Likewise.
1921 * commands/crc.c: Likewise.
1922 * commands/echo.c: Likewise.
1923 * commands/halt.c: Likewise.
1924 * commands/handler.c: Likewise.
1925 * commands/hdparm.c: Likewise.
1926 * commands/help.c: Likewise.
1927 * commands/hexdump.c: Likewise.
1928 * commands/loadenv.c: Likewise.
1929 * commands/ls.c: Likewise.
1930 * commands/lsmmap.c: Likewise.
1931 * commands/lspci.c: Likewise.
1932 * commands/loadenv.c: Likewise.
1933 * commands/read.c: Likewise.
1934 * commands/reboot.c: Likewise.
1935 * commands/search.c: Likewise.
1936 * commands/sleep.c: Likewise.
1937 * commands/test.c: Likewise.
1938 * commands/usbtest.c: Likewise.
1939 * commands/videotest.c: Likewise.
1940 * commands/i386/cpuid.c: Likewise.
1941 * commands/i386/pc/halt.c: Likewise.
1942 * commands/i386/pc/play.c: Likewise.
1943 * commands/i386/pc/pxecmd.c: Likewise.
1944 * commands/i386/pc/vbeinfo.c: Likewise.
1945 * commands/i386/pc/vbetest.c: Likewise.
1946 * commands/ieee1275/suspend.c: Likewise.
1947 * disk/loopback.c: Likewise.
1948 * font/font_cmd.c: Likewise.
1949 * hello/hello.c: Likewise.
1950 * loader/efi/appleloader.c: Likewise.
1951 * loader/efi/chainloader.c: Likewise.
1952 * loader/i386/bsd.c: Likewise.
1953 * loader/i386/efi/linux.c: Likewise.
1954 * loader/i386/ieee1275/linux.c: Likewise.
1955 * loader/i386/linux.c: Likewise.
1956 * loader/i386/pc/chainloader.c: Likewise.
1957 * loader/i386/pc/linux.c: Likewise.
1958 * loader/powerpc/ieee1275/linux.c: Likewise.
1959 * loader/multiboot_loader.c: Likewise.
1960 * term/gfxterm.c: Likewise.
1961 * term/i386/pc/serial.c: Likewise.
1962 * term/terminfo.c: Likewise.
1964 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1965 * term/i386/pc/vga.c: Likewise.
1966 * video/readers/jpeg.c: Likewise.
1967 * video/readers/png.c: Likewise.
1968 * video/readers/tga.c: Likewise.
1970 * util/grub-fstest (cmd_loopback): Removed.
1971 (cmd_blocklist): Likewise.
1973 (grub_register_command): Likewise.
1974 (grub_unregister_command): Likewise.
1975 (execute_command): Use grub_command_find to locate command and execute
1978 * include/grub/efi/chainloader.h: Removed.
1979 * loader/efi/chainloader_normal.c: Likewise.
1980 * loader/i386/bsd_normal.c: Likewise.
1981 * loader/i386/pc/chainloader_normal.c: Likewise.
1982 * loader/i386/pc/multiboot_normal.c: Likewise.
1983 * loader/linux_normal.c: Likewise.
1984 * loader/multiboot_loader_normal.c: Likewise.
1985 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1987 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1988 and grub_register_command_p1.
1990 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1991 kern/command.c, lib/arg.c and commands/extcmd.c.
1992 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1993 (minicmd_mod_SOURCES): New variable.
1994 (minicmd_mod_CFLAGS): Likewise.
1995 (minicmd_mod_LDFLAGS): Likewise.
1996 (extcmd_mod_SOURCES): Likewise.
1997 (extcmd_mod_CFLAGS): Likewise.
1998 (extcmd_mod_LDFLAGS): Likewise.
1999 (boot_mod_SOURCES): Removed.
2000 (boot_mod_CFLAGS): Likewise.
2001 (boot_mod_LDFLAGS): Likewise.
2003 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2005 (kernel_img_HEADERS): Add command.h.
2006 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2007 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2009 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2010 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2011 remove the corresponding normal mode command.
2012 (normal_mod_SOURCES): Remove normal/arg.c.
2013 * conf/i386-coreboot.rmk: Likewise.
2014 * conf/i386-efi.rmk: Likewise.
2015 * conf/i386-ieee1275.rmk: Likewise.
2016 * conf/powerpc-ieee1275.rmk: Likewise.
2017 * conf/x86_64-efi.rmk: Likewise.
2019 * include/grub/arg.h: Move from here ...
2020 * include/grub/lib/arg.h: ... to here.
2022 * normal/arg.c: Move from here ...
2023 * lib/arg.c: ... to here.
2025 * commands/extcmd.c: New file.
2026 * commands/minicmd.c: Likewise.
2027 * include/grub/command.h: Likewise.
2028 * include/grub/extcmd.h: Likewise.
2029 * kern/command.c: Likewise.
2030 * kern/corecmd.c: Likewise.
2032 * kern/list.c (grub_list_iterate): Return int instead of void.
2033 (grub_list_insert): New function.
2034 (grub_prio_list_insert): Likewise.
2036 * kern/rescue.c (grub_rescue_command): Removed.
2037 (grub_rescue_command_list): Likewise.
2038 (grub_rescue_register_command): Likewise.
2039 (grub_rescue_unregister_command): Likewise.
2040 (grub_rescue_cmd_boot): Move to minicmd.c
2041 (grub_rescue_cmd_help): Likewise.
2042 (grub_rescue_cmd_info): Likewise.
2043 (grub_rescue_cmd_boot): Likewise.
2044 (grub_rescue_cmd_testload): Likewise.
2045 (grub_rescue_cmd_dump): Likewise.
2046 (grub_rescue_cmd_rmmod): Likewise.
2047 (grub_rescue_cmd_lsmod): Likewise.
2048 (grub_rescue_cmd_exit): Likewise.
2049 (grub_rescue_print_devices): Moved to corecmd.c.
2050 (grub_rescue_print_files): Likewise.
2051 (grub_rescue_cmd_ls): Likewise.
2052 (grub_rescue_cmd_insmod): Likewise.
2053 (grub_rescue_cmd_set): Likewise.
2054 (grub_rescue_cmd_unset): Likewise.
2055 (attempt_normal_mode): Use grub_command_find to get normal module.
2056 (grub_enter_rescue_mode): Use grub_register_core_commands to register
2057 commands, remove grub_rescue_register_command calls.
2059 * normal/command.c (grub_register_command): Removed.
2060 (grub_unregister_command): Likewise.
2061 (grub_command_find): Likewise.
2062 (grub_iterate_commands): Likewise.
2063 (rescue_command): Likewise.
2064 (export_command): Moved to corecmd.c.
2065 (set_command): Removed.
2066 (unset_command): Likewise.
2067 (insmod_command): Likewise.
2068 (rmmod_command): Likewise.
2069 (lsmod_command): Likewise.
2070 (grub_command_init): Likewise.
2072 * normal/completion.c (iterate_command): Use cmd->prio to check for
2074 (complete_arguments): Use grub_extcmd_t structure to find options.
2075 (grub_normal_do_completion): Change function grub_iterate_commands to
2076 grub_command_iterate.
2078 * normal/execute.c (grub_script_execute_cmd): No need to parse
2081 * normal/main.c (grub_dyncmd_dispatcher): New function.
2082 (read_command_list): Register unload commands as dyncmd.
2083 (grub_cmd_normal): Use new command interface, register rescue,
2084 unregister normal at entry, register normal, unregister rescue at exit.
2086 * include/grub/list.h (grub_list_test_t): New type.
2087 (grub_list_iterate): Return int instead of void.
2088 (grub_list_insert): New function.
2089 (GRUB_AS_NAMED_LIST_P): New macro.
2090 (GRUB_AS_PRIO_LIST): Likewise.
2091 (GRUB_AS_PRIO_LIST_P): Likewise.
2092 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2093 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2094 (grub_prio_list): New structure.
2095 (grub_prio_list_insert): New function.
2096 (grub_prio_list_remove): New inline function.
2098 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2099 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2100 (GRUB_COMMAND_FLAG_MENU): Likewise.
2101 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2102 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2103 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2104 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2105 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2106 (grub_command): Likewise.
2107 (grub_register_command): Likewise.
2108 (grub_command_find): Likewise.
2109 (grub_iterate_commands): Likewise.
2110 (grub_command_init): Likewise.
2111 (grub_arg_parse): Likewise.
2112 (grub_arg_show_help): Likewise.
2114 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2115 (grub_rescue_unregister_command): Likewise.
2117 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2118 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2119 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2121 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2122 grub_rescue_cmd_initrd.
2123 * include/grub/i386/loader.h: Likewise.
2124 * include/grub/x86_64/loader.h: Likewise.
2126 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2128 2009-03-21 Bean <bean123ch@gmail.com>
2130 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2131 instead of stat in mingw environment.
2133 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2135 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2137 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2140 2009-03-21 Bean <bean123ch@gmail.com>
2142 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2145 2009-03-18 Michel Dänzer <michel@daenzer.net>
2147 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2148 checking inode flags for EXT4_EXTENTS_FLAG.
2150 2009-03-18 Robert Millan <rmh@aybabtu.com>
2152 * loader/i386/linux.c: Include `<grub/video.h>' and
2153 `<grub/i386/pc/vbe.h>'..
2154 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2155 (grub_linux32_boot): Attempt to configure video settings with
2156 grub_linux_setup_video().
2157 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2158 to avoid grub_console_fini() which would step out of graphical mode
2161 2009-03-14 Robert Millan <rmh@aybabtu.com>
2163 Fix build on powerpc.
2164 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2166 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2168 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2169 background image command.
2171 2009-03-12 Colin D Bennett <colin@gibibit.com>
2173 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2174 (grub_gfxterm_putchar): Extract pairs of identical calls to
2175 draw_cursor out of conditional blocks.
2177 2009-03-11 Pavel Roskin <proski@gnu.org>
2179 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2180 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2182 2009-03-11 Robert Millan <rmh@aybabtu.com>
2184 * loader/i386/multiboot_elfxx.c
2185 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2187 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
2189 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2192 2009-03-11 Robert Millan <rmh@aybabtu.com>
2194 * loader/i386/multiboot.c (code_size): New variable.
2195 (grub_multiboot): Define offsets by adding to `code_size' rather
2196 than subtracting from `grub_multiboot_payload_size'. Provide
2197 4-byte alignment to MBI and others by increasing
2198 `boot_loader_name_length' appropriately.
2200 * loader/i386/multiboot_elfxx.c
2201 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2203 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
2205 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2208 2009-03-08 Robert Millan <rmh@aybabtu.com>
2210 Make loader/i386/linux.c usable on i386-pc again.
2212 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2214 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2217 2009-03-07 Bean <bean123ch@gmail.com>
2219 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2222 2009-03-06 Robert Millan <rmh@aybabtu.com>
2224 Fix display issue on terminals with screen size other than 80x25
2225 (e.g. gfxterm with resolution higher than 640x480).
2227 * normal/main.c (grub_normal_init_page): Display title text in a
2228 position relative to the center of the terminal instead of relying
2229 on a hardcoded offset.
2231 2009-03-04 Robert Millan <rmh@aybabtu.com>
2233 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2236 * Makefile.in (host_kernel): New variable.
2237 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2238 scripts instead of just the windows one.
2239 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2241 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2243 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2245 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2246 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2247 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2248 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2249 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2250 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2252 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2254 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2255 or if there's no space for the disk label and print the partition number on a
2258 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2260 * util/misc.c: Include <time.h>.
2261 (grub_millisleep): New function.
2263 2009-03-04 Bean <bean123ch@gmail.com>
2265 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2266 another option -mno-red-zone.
2268 * commands/handler.c: Change module description.
2270 * kern/handler.c: Add missing space at the end of description line.
2272 * kern/list.c: Likewise.
2274 2009-03-03 Robert Millan <rmh@aybabtu.com>
2276 Move more components to the relocation area, and fix mbi pointer
2277 handling to use the destination rather than the origin (thanks to
2278 Vladimir Serbinenko for spotting).
2280 * loader/i386/multiboot.c (mbi_dest): New variable.
2281 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2282 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2285 2009-03-01 Bean <bean123ch@gmail.com>
2287 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2288 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2289 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2290 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2292 * loader/i386/efi/linux.c (acpi_guid): New variable.
2293 (acpi_guid): Likewise.
2294 (EBDA_SEG_ADDR): New constant.
2295 (LOW_MEM_ADDR): Likewise.
2296 (FAKE_EBDA_SEG): Likewise.
2297 (fake_bios_data): New function.
2298 (grub_linux_boot): Call fake_bios_data.
2300 2009-03-01 Bean <bean123ch@gmail.com>
2302 * commands/terminal.c: Removed.
2304 * commands/handler.c: New file.
2306 * include/grub/list.h: Likewise.
2308 * include/grub/handler.h: Likewise.
2310 * kern/list.c: Likewise.
2312 * kern/handler.c: Likewise.
2314 * kern/term.h: Include header file <grub/handler.h>.
2315 (grub_term_input): Move next field to the beginning.
2316 (grub_term_output): Likewise.
2317 (grub_term_input_class): New variable.
2318 (grub_term_output_class): Likewise.
2319 (grub_term_register_input): Changed to inline function.
2320 (grub_term_register_output): Likewise.
2321 (grub_term_unregister_input): Likewise.
2322 (grub_term_unregister_output): Likewise.
2323 (grub_term_set_current_input): Likewise.
2324 (grub_term_set_current_output): Likewise.
2325 (grub_term_get_current_input): Likewise.
2326 (grub_term_get_current_output): Likewise.
2327 (grub_term_iterate_input): Removed.
2328 (grub_term_iterate_output): Likewise.
2330 * kern/term.c (grub_term_list_input): Removed.
2331 (grub_term_list_output): Likewise.
2332 (grub_term_input_class): New variable.
2333 (grub_term_output_class): Likewise.
2334 (grub_cur_term_input): Change variable as macro.
2335 (grub_cur_term_output): Likewise.
2336 (grub_term_register_input): Removed.
2337 (grub_term_register_output): Likewise.
2338 (grub_term_unregister_input): Likewise.
2339 (grub_term_unregister_output): Likewise.
2340 (grub_term_set_current_input): Likewise.
2341 (grub_term_set_current_output): Likewise.
2342 (grub_term_iterate_input): Likewise.
2343 (grub_term_iterate_output): Likewise.
2344 (grub_term_get_current_input): Likewise.
2345 (grub_term_get_current_output): Likewise.
2347 * util/grub-editenv.c: Include header file <grub/handler.h>.
2348 (grub_term_get_current_input): Removed.
2349 (grub_term_get_current_output): Likewise.
2350 (grub_term_input_class): New variable.
2351 (grub_term_output_class): Likewise.
2353 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2354 (grub_term_get_current_output): Likewise.
2355 (grub_term_input_class): New variable.
2356 (grub_term_output_class): Likewise.
2358 * util/grub-probe.c (grub_term_get_current_input): Removed.
2359 (grub_term_get_current_output): Likewise.
2360 (grub_term_input_class): New variable.
2361 (grub_term_output_class): Likewise.
2363 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2364 (grub_term_get_current_output): Likewise.
2365 (grub_term_input_class): New variable.
2366 (grub_term_output_class): Likewise.
2368 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2369 (terminal_mod_SOURCES): Likewise.
2370 (terminal_mod_CFLAGS): Likewise.
2371 (terminal_mod_LDFLAGS): Likewise.
2373 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2375 (kernel_img_SOURCES): Add list.c and handler.c.
2376 (kernel_img_HEADERS): Add list.h and handler.h.
2378 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2380 (kernel_mod_SOURCES): Add list.c and handler.c.
2381 (kernel_mod_HEADERS): Add list.h and handler.h.
2383 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2385 (kernel_elf_SOURCES): Add list.c and handler.c.
2386 (kernel_elf_HEADERS): Add list.h and handler.h.
2388 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2390 (kernel_elf_SOURCES): Add list.c and handler.c.
2391 (kernel_elf_HEADERS): Add list.h and handler.h.
2393 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2395 (kernel_mod_SOURCES): Add list.c and handler.c.
2396 (kernel_mod_HEADERS): Add list.h and handler.h.
2398 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2400 (kernel_elf_SOURCES): Add list.c and handler.c.
2401 (kernel_elf_HEADERS): Add list.h and handler.h.
2403 2009-02-27 Robert Millan <rmh@aybabtu.com>
2405 Factorize elf32 / elf64 code in Multiboot loader. This will
2406 prevent it from getting out of sync again.
2408 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2409 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2410 grub_multiboot_load_elf64): Move from here ...
2411 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2412 grub_multiboot_load_elf): ... to here (new file).
2414 2009-02-27 Robert Millan <rmh@aybabtu.com>
2416 * util/grub.d/10_linux.in: Rename "single-user mode" to
2419 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2421 Don't leak in SCSI code.
2422 * disk/scsi.c (grub_scsi_close): free `scsi'.
2424 2009-02-27 Robert Millan <rmh@aybabtu.com>
2426 * loader/i386/pc/multiboot.c: Move from here ...
2427 * loader/i386/multiboot.c: ... to here. Update all users.
2429 2009-02-27 Robert Millan <rmh@aybabtu.com>
2431 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2432 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2434 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
2436 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2439 2009-02-27 Robert Millan <rmh@aybabtu.com>
2441 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2442 `0x' qualifier as 0 when base is specified as parameter).
2444 2009-02-24 Bean <bean123ch@gmail.com>
2446 * configure.ac: Check for -mcmodel=large in x86_64 target.
2448 * include/grub/efi/api.h (efi_call_10): New macro.
2449 (efi_wrap_10): New function.
2451 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2452 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2453 (GRUB_PE32_REL_BASED_LOW): Likewise.
2454 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2455 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2456 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2457 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2458 (GRUB_PE32_REL_BASED_REL): Likewise.
2459 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2460 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2461 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2463 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2466 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2467 (efi_wrap_10): New function.
2469 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2471 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2472 MB/MBP model (NV chipset).
2473 (devdata_devs): Add devpath_5 to the list.
2475 * load/i386/efi/linux.c (video_base): Remove variable.
2476 (RGB_MASK): New macro.
2477 (RGB_MAGIC): Likewise.
2478 (LINE_MIN): Likewise.
2479 (LINE_MAX): Likewise.
2480 (FBTEST_STEP): Likewise.
2481 (FBTEST_COUNT): Likewise.
2482 (fb_list): New variable.
2483 (grub_find_video_card): Remove function.
2484 (find_framebuf): New function.
2485 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2488 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2491 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2493 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2495 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2498 2009-02-22 Robert Millan <rmh@aybabtu.com>
2500 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2501 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2502 in our relocation, instead of using it directly from heap. Also
2503 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2505 2009-02-21 Robert Millan <rmh@aybabtu.com>
2507 Implement USB keyboard support (based on patch by Marco Gerards)
2509 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2510 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2511 (usb_keyboard_mod_LDFLAGS): New variables.
2513 * term/usb_keyboard.c: New file.
2515 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2517 Corrected wrong declaration
2519 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2521 2009-02-14 Christian Franke <franke@computer.org>
2523 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2524 (grub_lspci_iter): Print class code and programming interface byte.
2526 2009-02-14 Christian Franke <franke@computer.org>
2528 * gendistlist.sh: Ignore `.svn' directories.
2530 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
2532 * fs/fat.c: Add 2009 to Copyright line.
2534 2009-02-14 Christian Franke <franke@computer.org>
2536 * commands/hdparm.c: New file. Provides `hdparm' command
2537 which sends ATA commands via grub_disk_ata_pass_through ().
2539 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2541 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2542 and <grub/cpu/io.h> to include/grub/ata.h.
2543 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2544 (GRUB_CDROM_SECTOR_SIZE): Remove.
2545 (GRUB_ATA_*): Move to include/grub/ata.h.
2546 (GRUB_ATAPI_*): Likewise.
2547 (enum grub_ata_commands): Likewise.
2548 (enum grub_ata_timeout_milliseconds): Likewise.
2549 (struct grub_ata_device): Likewise.
2550 (grub_ata_regset): Likewise.
2551 (grub_ata_regget): Likewise.
2552 (grub_ata_regset2): Likewise.
2553 (grub_ata_regget2): Likewise.
2554 (grub_ata_check_ready): Likewise.
2555 (grub_ata_wait_not_busy): Remove static, exported in
2557 (grub_ata_wait_drq): Likewise.
2558 (grub_ata_pio_read): Likewise.
2560 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2561 function for hdparm.mod.
2563 * include/grub/ata.h: New file, contains declarations from
2565 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2567 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2568 (grub_disk_ata_pass_through): New exported variable.
2570 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2572 2009-02-13 Colin D Bennett <colin@gibibit.com>
2574 Support multiple fallback entries, and provide an API to support
2575 executing default+fallback menu entries. Renamed the `terminal' menu
2578 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2579 variable declaration.
2580 (grub_menu_execute_callback): New structure declaration.
2581 (grub_menu_execute_callback_t): New typedef.
2582 (grub_menu_execute_with_fallback): New function declaration.
2583 (grub_menu_get_entry): Likewise.
2584 (grub_menu_get_timeout): Likewise.
2585 (grub_menu_set_timeout): Likewise.
2587 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2589 * normal/menu.c (grub_wait_after_message): Moved to
2590 `normal/menu_text.c'.
2591 (draw_border): Likewise.
2592 (print_message): Likewise.
2593 (print_entry): Likewise.
2594 (print_entries): Likewise.
2595 (grub_menu_init_page): Likewise.
2596 (get_entry_number): Likewise.
2597 (print_timeout): Likewise.
2598 (run_menu): Likewise.
2599 (grub_menu_execute_entry): Likewise.
2600 (show_text_menu): Likewise.
2601 (get_and_remove_first_entry_number): New function.
2602 (grub_menu_execute_with_fallback): Likewise.
2603 (get_entry): Renamed to ...
2604 (grub_menu_get_entry): .. this and made it global.
2605 (get_timeout): Renamed to ...
2606 (grub_menu_get_timeout): ... this and made it global.
2607 (set_timeout): Renamed to ...
2608 (grub_menu_set_timeout): ... this and made it global.
2609 (grub_normal_terminal_menu_viewer): Renamed to ...
2610 (grub_normal_text_menu_viewer): ... this.
2612 * normal/menu_text.c: New file. Extracted text-menu-specific code
2615 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2616 (normal_mod_SOURCES): Likewise.
2618 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2619 (normal_mod_SOURCES): Likewise.
2621 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2622 (normal_mod_SOURCES): Likewise.
2624 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2625 (normal_mod_SOURCES): Likewise.
2627 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2628 (normal_mod_SOURCES): Likewise.
2630 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2631 (normal_mod_SOURCES): Likewise.
2633 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2634 (normal_mod_SOURCES): Likewise.
2636 2009-02-11 Robert Millan <rmh@aybabtu.com>
2638 * util/grub.d/00_header.in: Update old reference to `font' command.
2640 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
2642 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2644 Based on patch from Javier MartÃn.
2646 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2648 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2649 to avoid false positives with FAT.
2650 (grub_fstest_SOURCES): Likewise.
2651 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2652 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2653 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2654 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2655 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2656 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2658 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2660 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2661 bpb.version_specific.fat12_or_fat16.fstype and
2662 bpb.version_specific.fat32.fstype.
2664 2009-02-08 Robert Millan <rmh@aybabtu.com>
2666 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2668 2009-02-08 Robert Millan <rmh@aybabtu.com>
2670 * Makefile.in (host_os, host_cpu): New variables.
2671 (target_os): Remove. Update all users.
2673 2009-02-08 Marco Gerards <marco@gnu.org>
2675 * Makefile.in (enable_grub_emu_usb): New variable.
2676 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2677 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2678 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2679 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2680 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2681 `usbtest.mod' and `usbms.mod'.
2682 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2683 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2684 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2685 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2686 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2689 * disk/usbms.c: New file.
2691 * include/grub/usb.h: Likewise.
2693 * include/grub/usbtrans.h: Likewise.
2695 * include/grub/usbdesc.h: Likewise.
2697 * bus/usb/usbtrans.c: Likewise.
2699 * bus/usb/ohci.c: Likewise.
2701 * bus/usb/uhci.c: Likewise.
2703 * bus/usb/usbhub.c: Likewise.
2705 * bus/usb/usb.c: Likewise.
2707 * commands/usbtest.c: Likewise.
2709 * util/usb.c: Likewise.
2711 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2713 * configure.ac: Test for libusb presence.
2715 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2717 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2719 * kern/mm.c: Add more comments.
2721 2009-02-08 Robert Millan <rmh@aybabtu.com>
2723 Patch from Javier MartÃn.
2724 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2725 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2727 2009-02-08 Robert Millan <rmh@aybabtu.com>
2729 * fs/cpio.c: Split tar functionality to ...
2730 * fs/tar.c: ... here (new file). Update all users.
2732 2009-02-07 Robert Millan <rmh@aybabtu.com>
2734 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2735 backward-incompatible features.
2737 Based on patch from Javier MartÃn, with some adjustments.
2739 2009-02-07 Michael Scherer <misc@mandriva.org>
2741 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2743 2009-02-07 Robert Millan <rmh@aybabtu.com>
2745 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2746 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2747 after the RAID stuff.
2749 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2751 Fixes problem when running vbetest command as reported by
2752 Vladimir Serbinenko <phcoder@gmail.com>.
2754 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2756 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
2758 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2759 /dev/md/NpN style mdraid devices.
2761 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2763 * util/unifont2pff.rb: Remove.
2765 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2767 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2770 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2772 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2773 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2774 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2775 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2776 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2777 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2778 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2780 2009-02-02 Christian Franke <franke@computer.org>
2782 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2784 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
2786 * INSTALL: Note that we now require at least autoconf 2.59 and
2787 that LZO is optional.
2789 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2791 Base on patch on bug #24154 created by Tomas Tintera
2794 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2796 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2798 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2799 <bero@arklinux.org>.
2801 * normal/parser.y (script_init): Add missing semicolon.
2803 2009-01-31 Colin D Bennett <colin@gibibit.com>
2805 * normal/main.c: Add include to grub/menu_viewer.h.
2806 (free_menu_entry_classes): Added.
2807 (grub_normal_menu_addentry): Added class property handling.
2808 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2809 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2811 * normal/menu_viewer.c: New file.
2813 * normal/menu.c (run_menu_entry): Renamed to ...
2814 (grub_menu_execute_entry): ... this and made it as global.
2815 (grub_menu_run): Renamed to ...
2816 (show_text_menu): ... this and made it local.
2817 (show_text_menu): Adapt to new function names.
2818 (grub_normal_terminal_menu_viewer): New global variable.
2820 * include/grub/menu.h: New file.
2822 * include/grub/menu_viewer.h: New file.
2824 * include/grub/normal.h: Added include to grub/menu.h.
2825 (grub_menu_entry): Moved to include/grub/menu.h.
2826 (grub_menu_entry_t): Likewise.
2827 (grub_menu): Likewise.
2828 (grub_menu_t): Likewise.
2829 (grub_normal_terminal_menu_viewer): Added.
2830 (grub_menu_execute_entry): Likewise.
2831 (grub_menu_run): Removed.
2833 * DISTLIST: Added include/grub/menu.h.
2834 Added include/grub/menu_viewer.h.
2835 Added normal/menu_viewer.c.
2837 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2839 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2840 arglist for menutitle arguments.
2842 * normal/main.c (grub_normal_menu_addentry): Likewise.
2844 * normal/parser.y (menuentry): Likewise.
2846 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2848 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2849 (grub_script_create_cmdmenu): Likewise.
2851 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2853 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2856 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2858 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2860 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2862 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2864 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2866 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2868 2009-01-30 Christian Franke <franke@computer.org>
2870 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2871 in option help text.
2873 2009-01-27 Pavel Roskin <proski@gnu.org>
2875 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2877 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2879 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2881 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2883 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2884 unregister function.
2886 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2888 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2890 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2892 * util/grub-mkfont.c (usage): Fix typo.
2894 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2896 2009-01-26 Daniel Mierswa <impulze@impulze.org>
2898 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2900 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2902 * kern/misc.c (grub_strcasecmp): New function.
2903 (grub_strcasecmp): Use grub_size_t instead of int for length.
2905 * include/grub/misc.h: Update function prototypes.
2907 2009-01-26 Robert Millan <rmh@aybabtu.com>
2909 * configure.ac: Fix cross-compilation check.
2911 2009-01-22 Christian Franke <franke@computer.org>
2913 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2914 (precision) digit string. Allow `.format2' without `format1' (width).
2915 Limit input chars for `%s' output to `format2' if specified. This is
2916 compatible with standard printf ().
2918 2009-01-22 Christian Franke <franke@computer.org>
2920 * disk/ata.c (grub_ata_wait_status): Replace by ...
2921 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2922 other status bits may be invalid while BSY is asserted.
2923 (grub_ata_check_ready): New function.
2924 (grub_ata_cmd): Removed.
2925 (grub_ata_wait_drq): New function.
2926 (grub_ata_strncpy): Remove inline.
2927 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2928 and error check now done by grub_ata_wait_drq ().
2929 (grub_ata_pio_write): Likewise.
2930 (grub_atapi_identify): Set DEV before check for !BSY. Use
2931 grub_ata_wait_drq () to wait for data.
2932 (grub_ata_device_initialize): Add status register check to
2933 detect missing SATA slave devices. Add debug messages.
2934 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2935 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2936 transfer loop by grub_ata_pio_write ().
2937 (grub_ata_identify): Set DEV before check for !BSY. Use
2938 grub_ata_wait_drq () to wait for data.
2939 (grub_ata_setaddress): Set DEV before check for !BSY.
2940 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2941 read/write in one loop. Fix invalid command on write. Fix incomplete
2942 command on (size % batch) == 0. Add missing error check after write of
2943 last block. Add debug messages.
2944 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2946 2009-01-19 Christian Franke <franke@computer.org>
2948 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2949 (GRUB_ATAPI_IREASON_*): Likewise.
2950 (grub_ata_pio_write): Fix timeout error return.
2951 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2952 (grub_atapi_wait_drq): New function.
2953 (grub_atapi_packet): New parameter `size'.
2954 Use grub_atapi_wait_drq () and direct write instead of
2955 grub_ata_pio_write ().
2956 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2957 reads the number of bytes requested by the device for each DRQ
2959 (grub_atapi_write): Remove old implementation, return not
2960 implemented instead.
2962 2009-01-19 Christian Franke <franke@computer.org>
2964 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2965 of 512 to calculate data size.
2966 (grub_scsi_read12): Likewise.
2967 (grub_scsi_write10): Likewise.
2968 (grub_scsi_write12): Likewise.
2969 (grub_scsi_read): Adjust size according to blocksize.
2970 Add checks for invalid blocksize and unaligned transfer.
2972 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2974 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2976 * term/gfxterm.c (write_char): Fix background rendering for wide
2979 2009-01-19 Robert Millan <rmh@aybabtu.com>
2981 * config.guess: Update to latest version from config git.
2982 * config.sub: Likewise.
2984 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
2986 * Makefile.in: Change font compilation to use new grub-mkfont instead
2989 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2990 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2991 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2992 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2993 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2994 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2995 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2996 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2997 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2999 2009-01-16 Christian Franke <franke@computer.org>
3001 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3002 (enum grub_ata_timeout_milliseconds): New enum.
3003 (grub_ata_wait_status): Add parameter milliseconds.
3004 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3005 recovery from timed-out commands.
3006 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3007 return grub_errno instead of REG_ERROR.
3008 (grub_ata_pio_write): Add parameter milliseconds.
3009 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3010 Pass milliseconds to grub_ata_wait_status () and
3011 grub_ata_pio_read ().
3012 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3013 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3014 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3015 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3016 It is not suitable for device detection, because DEV bit is ignored,
3017 the command may run too long, and not all devices set the signature
3019 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3020 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3021 Fix device selection, DEV bit must be set first to address the registers
3022 of the correct device.
3023 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3024 grub_ata_pio_read/write ().
3025 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3026 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3028 2009-01-13 Carles Pina i Estany <carles@pina.cat>
3030 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3032 2009-01-13 Bean <bean123ch@gmail.com>
3034 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3036 2009-01-13 Bean <bean123ch@gmail.com>
3038 * Makefile.in: (enable_grub_mkfont): New variable.
3039 (freetype_cflags): Likewise.
3040 (freetype_libs): Likewise.
3042 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3043 (grub_mkfont_SOURCES): New variable.
3044 (grub_mkfont_CFLAGS): Likewise.
3045 (grub_mkfont_LDFLAGS): Likewise.
3047 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3048 library if `--enable-grub-mkfont' is requested.
3049 (enable_grub_mkfont): New variable.
3050 (freetype_cflags): Likewise.
3051 (freetype_libs): Likewise.
3053 * util/grub-mkfont.c: New file.
3055 2009-01-12 Christian Franke <franke@computer.org>
3057 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3058 mode check. Fix setting of compat_use[].
3060 2009-01-10 Robert Millan <rmh@aybabtu.com>
3062 Update a few copyright years which we forgot to do in 2008 (only for
3063 files whose changes made in 2008 were copyright-significant)
3065 * Makefile.in: Add 2008 to Copyright line.
3066 * disk/ieee1275/ofdisk.c: Likewise.
3067 * disk/efi/efidisk.c: Likewise.
3068 * kern/dl.c: Likewise.
3069 * kern/sparc64/ieee1275/init.c: Likewise.
3070 * kern/mm.c: Likewise.
3071 * kern/efi/mm.c: Likewise.
3072 * boot/i386/pc/boot.S: Likewise.
3073 * genfslist.sh: Likewise.
3074 * fs/iso9660.c: Likewise.
3075 * fs/hfs.c: Likewise.
3076 * fs/jfs.c: Likewise.
3077 * fs/minix.c: Likewise.
3078 * fs/ufs.c: Likewise.
3079 * gensymlist.sh.in: Likewise.
3080 * genkernsyms.sh.in: Likewise.
3081 * include/grub/misc.h: Likewise.
3082 * include/grub/types.h: Likewise.
3083 * include/grub/symbol.h: Likewise.
3084 * include/grub/elf.h: Likewise.
3085 * include/grub/kernel.h: Likewise.
3086 * include/grub/disk.h: Likewise.
3087 * include/grub/dl.h: Likewise.
3088 * include/grub/i386/linux.h: Likewise.
3089 * include/grub/i386/pc/biosdisk.h: Likewise.
3090 * include/grub/efi/api.h: Likewise.
3091 * include/grub/efi/pe32.h: Likewise.
3092 * include/grub/util/misc.h: Likewise.
3093 * normal/execute.c: Likewise.
3094 * normal/arg.c: Likewise.
3095 * normal/completion.c: Likewise.
3096 * normal/lexer.c: Likewise.
3097 * normal/parser.y: Likewise.
3098 * normal/misc.c: Likewise.
3099 * commands/i386/pc/vbeinfo.c: Likewise.
3100 * commands/hexdump.c: Likewise.
3101 * commands/terminal.c: Likewise.
3102 * commands/ls.c: Likewise.
3103 * commands/help.c: Likewise.
3104 * partmap/pc.c: Likewise.
3105 * loader/efi/chainloader.c: Likewise.
3106 * loader/multiboot_loader.c: Likewise.
3107 * loader/i386/pc/multiboot2.c: Likewise.
3108 * term/efi/console.c: Likewise.
3109 * term/i386/pc/serial.c: Likewise.
3110 * util/lvm.c: Likewise.
3111 * util/console.c: Likewise.
3112 * util/i386/efi/grub-mkimage.c: Likewise.
3113 * util/raid.c: Likewise.
3115 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3117 * commands/videotest.c: Removed include to grub/machine/memory.h.
3119 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3120 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3121 (video_mod_SOURCES): Removed.
3122 (video_mod_CFLAGS): Likewise.
3123 (video_mod_LDFLAGS): Likewise.
3124 (gfxterm_mod_SOURCES): Likewise.
3125 (gfxterm_mod_CFLAGS): Likewise.
3126 (gfxterm_mod_LDFLAGS): Likewise.
3127 (videotest_mod_SOURCES): Likewise.
3128 (videotest_mod_CFLAGS): Likewise.
3129 (videotest_mod_LDFLAGS): Likewise.
3130 (bitmap_mod_SOURCES): Likewise.
3131 (bitmap_mod_CFLAGS): Likewise.
3132 (bitmap_mod_LDFLAGS): Likewise.
3133 (tga_mod_SOURCES): Likewise.
3134 (tga_mod_CFLAGS): Likewise.
3135 (tga_mod_LDFLAGS): Likewise.
3136 (jpeg_mod_SOURCES): Likewise.
3137 (jpeg_mod_CFLAGS): Likewise.
3138 (jpeg_mod_LDFLAGS): Likewise.
3139 (png_mod_SOURCES): Likewise.
3140 (png_mod_CFLAGS): Likewise.
3141 (png_mod_LDFLAGS): Likewise.
3143 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3144 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3145 (video_mod_SOURCES): Added.
3146 (video_mod_CFLAGS): Likewise.
3147 (video_mod_LDFLAGS): Likewise.
3148 (videotest_mod_SOURCES): Likewise.
3149 (videotest_mod_CFLAGS): Likewise.
3150 (videotest_mod_LDFLAGS): Likewise.
3151 (bitmap_mod_SOURCES): Likewise.
3152 (bitmap_mod_CFLAGS): Likewise.
3153 (bitmap_mod_LDFLAGS): Likewise.
3154 (tga_mod_SOURCES): Likewise.
3155 (tga_mod_CFLAGS): Likewise.
3156 (tga_mod_LDFLAGS): Likewise.
3157 (jpeg_mod_SOURCES): Likewise.
3158 (jpeg_mod_CFLAGS): Likewise.
3159 (jpeg_mod_LDFLAGS): Likewise.
3160 (png_mod_SOURCES): Likewise.
3161 (png_mod_CFLAGS): Likewise.
3162 (png_mod_LDFLAGS): Likewise.
3163 (gfxterm_mod_SOURCES): Likewise.
3164 (gfxterm_mod_CFLAGS): Likewise.
3165 (gfxterm_mod_LDFLAGS): Likewise.
3167 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3168 grub/machine/console.h.
3170 2009-01-04 Jerone Young <jerone@gmail.com>
3172 Make on screen instructions clearer
3174 Based on patch created by Jidanni <jidanni@jidanni.org>
3176 * normal/menu.c: print clearer instructions on the screen
3178 2009-01-02 Colin D Bennett <colin@gibibit.com>
3182 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3183 build system and fixed gfxterm.c to work with different sized fonts.
3185 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3187 * configure: Re-generated.
3189 * DISTLIST: Removed font/manager.c.
3191 Added font/font_cmd.c.
3193 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3196 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
3198 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3200 * kern/term.c: Changed users of grub_utf8_to_ucs4.
3202 * normal/menu.c: Likewise.
3204 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3205 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3207 * include/grub/font.h: Replaced with new file.
3209 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3210 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3211 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3212 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3213 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3214 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3215 fg_red, fg_green, fg_blue, fg_alpha.
3216 (grub_video_adapter): Removed blit_glyph.
3217 (grub_video_blit_glyph): Removed.
3219 * font/manager.c: Removed file.
3221 * font/font.c: New file.
3223 * font/font_cmd.c: Likewise.
3225 * video/video.c (grub_video_blit_glyph): Removed.
3227 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3228 (grub_video_vbe_map_rgba): Likewise.
3229 (grub_video_vbe_unmap_color_int): Likewise.
3230 (grub_video_vbe_blit_glyph): Removed.
3231 (grub_video_vbe_adapter): Removed blit_glyph.
3233 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3234 (get_pixel): Likewise.
3235 (set_pixel): Likewise.
3237 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3239 * term/gfxterm.c: Adapted to new font engine.
3241 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
3243 * term/i386/pc/vga.c: Likewise.
3245 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3247 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3249 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3251 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3253 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3255 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3257 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3259 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3261 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3263 * util/grub.d/00_header.in: Changed to use new loadfont command.
3265 * util/grub-mkconfig_lib.in: Changed font extension.
3267 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
3269 * util/getroot.c (grub_util_get_grub_dev): Add support for
3270 /dev/md/dNNpNN style partitionable mdraid devices.
3272 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
3274 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3275 at a time limit of the PXE TFTP API correctly.
3276 (grub_pxefs_close): Likewise.
3278 2008-11-29 Robert Millan <rmh@aybabtu.com>
3280 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3281 grub_ata_device_initialize() calls.
3283 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
3285 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3287 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3289 2008-11-28 Robert Millan <rmh@aybabtu.com>
3291 Fix build on powerpc-ieee1275. Based on patch created by
3292 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3293 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3294 `kern/ieee1275/mmap.c'.
3295 * include/grub/powerpc/ieee1275/memory.h: New file.
3297 Provide grub-install on coreboot.
3298 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3299 (grub_install_SOURCES): New variable.
3300 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3303 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
3305 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3306 to `grub_term_input_t'.
3307 (grub_term_get_current_output): Change return type to
3308 `grub_term_output_t'.
3310 2008-11-22 Robert Millan <rmh@aybabtu.com>
3312 Fix breakage on coreboot due to declaration mismatch.
3313 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3314 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3315 grub_vga_text_cls().
3317 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3318 comments. Avoid copying one more byte than necessary (just in case).
3320 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3321 to 0x200000 (avoids trouble with some OFW implementations, and matches
3322 with the one in Yaboot).
3323 Reported by Manoel Abranches
3325 2008-11-20 Robert Millan <rmh@aybabtu.com>
3327 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3328 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3330 * util/grub-mkconfig_lib.in (grub_warn): New function.
3331 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3332 warnings, to obtain consistent formatting.
3333 * util/grub.d/00_header.in: Likewise.
3334 * util/update-grub_lib.in: Likewise.
3336 * loader/i386/linux.c (allocate_pages): Fix a warning.
3337 Move comment text to `#error' stanza.
3339 Harmonize ieee1275's grub_available_iterate() with the generic
3340 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3341 build problem on i386-ieee1275):
3342 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3343 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3344 parameter `type'. Update all users of this function.
3345 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3346 `kern/ieee1275/mmap.c'.
3347 * kern/ieee1275/init.c
3348 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3350 (grub_machine_mmap_iterate): ... this.
3351 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3352 return type to `grub_err_t'. Update all implementations of this
3354 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3357 Add `lsmmap' command (lists firmware-provided memory map):
3358 * commands/lsmmap.c: New file.
3359 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3360 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3362 * conf/powerpc-ieee1275.rmk: Likewise.
3363 * conf/i386-coreboot.rmk: Likewise.
3364 * conf/i386-ieee1275.rmk: Likewise.
3366 2008-11-19 Robert Millan <rmh@aybabtu.com>
3368 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3369 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3370 constraints to initrd allocation (based on code from
3371 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3372 for Linux to find it.
3374 2008-11-14 Robert Millan <rmh@aybabtu.com>
3376 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3377 order to cope with duplicate slashes.
3379 2008-11-14 Robert Millan <rmh@aybabtu.com>
3381 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3382 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3383 don't want to mess with lower memory, because it is used in the Linux
3386 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3387 an appropriate place in lower memory, between 0x10000 and 0x90000,
3388 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3389 is in our heap (probably as a result of it being corrupted during
3390 decompression). Add #error instance with comment to explain why this
3391 loader isn't currently usable on PC/BIOS.
3393 2008-11-14 Robert Millan <rmh@aybabtu.com>
3395 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3396 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3398 2008-11-12 Robert Millan <rmh@aybabtu.com>
3400 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3402 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3403 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3405 * include/grub/i386/pc/memory.h: ... to here.
3407 2008-11-12 Robert Millan <rmh@aybabtu.com>
3409 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3412 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3413 (grub_console_cur_color, grub_console_real_putchar)
3414 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3415 (grub_console_setcolorstate, grub_console_setcolor)
3416 (grub_console_getcolor): Move from here ...
3417 * include/grub/i386/vga_common.h: ... to here (new file).
3419 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3420 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3422 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3423 `<grub/i386/vga_common.h>'.
3425 2008-11-12 Robert Millan <rmh@aybabtu.com>
3427 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3428 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3429 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3431 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3432 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3434 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3435 grub_console_init() with call to grub_vga_text_init().
3436 (grub_machine_fini): Replace call to
3437 grub_console_fini() with call to grub_vga_text_fini() and
3438 grub_at_keyboard_fini().
3440 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3441 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3442 (grub_console_setcolorstate, grub_console_setcolor)
3443 (grub_console_getcolor): New function prototypes.
3445 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3446 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3447 (grub_vga_text_setcursor): Static-ize.
3448 (grub_vga_text_term): New structure.
3449 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3451 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3452 (grub_console_cur_color, grub_console_standard_color)
3453 (grub_console_normal_color, grub_console_highlight_color)
3454 (map_char, grub_console_putchar, grub_console_getcharwidth)
3455 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3456 (grub_console_getcolor): Move from here ...
3457 * term/i386/vga_common.c: ... to here (same function names).
3459 2008-11-12 Robert Millan <rmh@aybabtu.com>
3461 Use newly-added Multiboot support in coreboot.
3463 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3464 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3466 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3467 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3468 (codestart): Store the MBI in `startup_multiboot_info' when we're
3469 being loaded using Multiboot.
3471 * kern/i386/coreboot/init.c (grub_machine_init): Move
3472 grub_at_keyboard_init() call to beginning of function (useful for
3473 debugging). Call grub_machine_mmap_init() before attempting to use
3474 grub_machine_mmap_iterate().
3475 (grub_lower_mem, grub_upper_mem): Move from here ...
3476 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3479 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3482 2008-11-12 Robert Millan <rmh@aybabtu.com>
3484 Fix a regression introduced by the at_keyboard.mod split. Because
3485 some terminals are default on some platforms and non-default on
3486 others, the first terminal being registered determines which is
3487 going to be default.
3489 * kern/term.c (grub_term_register_input): If this is the first
3490 terminal being registered, set it as the current one.
3491 (grub_term_register_output): Likewise.
3493 * term/efi/console.c (grub_console_init): Do not call
3494 grub_term_set_current_output() or grub_term_set_current_input().
3495 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3496 * term/i386/pc/console.c (grub_console_init): Likewise.
3497 (grub_console_fini): Do not call grub_term_set_current_input()
3498 (but leave grub_term_set_current_output() to restore text mode).
3500 2008-11-10 Robert Millan <rmh@aybabtu.com>
3502 * util/grub.d/00_header.in: Add backward compatibility check for
3503 versions of terminal.mod that don't understand `terminal_input' or
3506 2008-11-09 Robert Millan <rmh@aybabtu.com>
3508 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3509 `terminal_input' / `terminal_output', not `terminal'.
3511 2008-11-08 Robert Millan <rmh@aybabtu.com>
3513 * Makefile.in (include_DATA): Fix srcdir=. assumption.
3514 (DISTCLEANFILES): Add `build_env.mk'.
3516 2008-11-08 Robert Millan <rmh@aybabtu.com>
3518 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3519 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3520 members. Update all users.
3521 * util/console.c (grub_ncurses_term): Split in ...
3522 (grub_ncurses_term_input): ... this, and ...
3523 (grub_ncurses_term_output): ... this. Update all users.
3524 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3526 2008-11-08 Robert Millan <rmh@aybabtu.com>
3528 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3529 (PKGDATA): Add $(pkgdata_SRCDIR).
3530 (pkglib_BUILDDIR): New variable.
3531 (pkgdata_SRCDIR): New variable.
3532 (build_env.mk): New target.
3533 (include_DATA): New variable.
3534 (install-local): Install $(include_DATA) files in $(includedir).
3536 2008-11-07 Pavel Roskin <proski@gnu.org>
3538 * gendistlist.sh: Use C locale for sorting to ensure consistent
3539 output on all systems.
3541 * util/grub.d/00_header.in: Remove incorrect space before
3544 2008-11-07 Robert Millan <rmh@aybabtu.com>
3546 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3548 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3549 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3550 (based on find_multi_boot1_header).
3551 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3552 using find_multi_boot2_header(), and abort if neither Multiboot or
3553 Multiboot headers were found.
3555 2008-11-07 Robert Millan <rmh@aybabtu.com>
3557 Modularize at_keyboard.mod:
3559 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3560 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3561 (at_keyboard_mod_LDFLAGS): New variables.
3563 Actual terminal split:
3565 * include/grub/term.h (struct grub_term): Split in ...
3566 (struct grub_term_input): ... this, and ...
3567 (struct grub_term_output): ... this. Update all users.
3568 (grub_term_set_current): Split in ...
3569 (grub_term_set_current_input): ... this, and ...
3570 (grub_term_set_current_output): ... this.
3571 (grub_term_get_current): Split in ...
3572 (grub_term_get_current_input): ... this, and ...
3573 (grub_term_get_current_output): ... this.
3574 (grub_term_register): Split in ...
3575 (grub_term_register_input): ... this, and ...
3576 (grub_term_register_output): ... this.
3577 (grub_term_unregister): Split in ...
3578 (grub_term_unregister_input): ... this, and ...
3579 (grub_term_unregister_output): ... this.
3580 (grub_term_iterate): Split in ...
3581 (grub_term_iterate_input): ... this, and ...
3582 (grub_term_iterate_output): ... this.
3584 * kern/term.c (grub_term_list): Split in ...
3585 (grub_term_list_input): ... this, and ...
3586 (grub_term_list_output): ... this. Update all users.
3587 (grub_cur_term): Split in ...
3588 (grub_cur_term_input): ... this, and ...
3589 (grub_cur_term_output): ... this. Update all users.
3590 (grub_term_set_current): Split in ...
3591 (grub_term_set_current_input): ... this, and ...
3592 (grub_term_set_current_output): ... this.
3593 (grub_term_get_current): Split in ...
3594 (grub_term_get_current_input): ... this, and ...
3595 (grub_term_get_current_output): ... this.
3596 (grub_term_register): Split in ...
3597 (grub_term_register_input): ... this, and ...
3598 (grub_term_register_output): ... this.
3599 (grub_term_unregister): Split in ...
3600 (grub_term_unregister_input): ... this, and ...
3601 (grub_term_unregister_output): ... this.
3602 (grub_term_iterate): Split in ...
3603 (grub_term_iterate_input): ... this, and ...
3604 (grub_term_iterate_output): ... this.
3606 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3607 a check for input and one for output (and only attempt to get keys
3608 from user when input works).
3610 * util/grub-probe.c (grub_term_get_current): Split in ...
3611 (grub_term_get_current_input): ... this, and ...
3612 (grub_term_get_current_output): ... this.
3613 * util/grub-fstest.c: Likewise.
3614 * util/i386/pc/grub-setup.c: Likewise.
3615 * util/grub-editenv.c: Likewise.
3617 Portability adjustments:
3619 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3620 `term/i386/pc/at_keyboard.c'.
3621 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3622 grub_keyboard_controller_init() (now handled by terminal .init).
3623 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3624 grub_at_keyboard_init().
3625 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3626 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3627 at_keyboard.mod via input terminal interface).
3628 * include/grub/i386/coreboot/console.h: Convert into a stub for
3629 `<grub/i386/pc/console.h>'.
3631 Migrate full terminals to new API:
3633 * term/efi/console.c (grub_console_term): Split into ...
3634 (grub_console_term_input): ... this, and ...
3635 (grub_console_term_output): ... this. Update all users.
3636 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3637 (grub_ofconsole_init): Split into ...
3638 (grub_ofconsole_init_input): ... this, and ...
3639 (grub_ofconsole_init_output): ... this.
3640 (grub_ofconsole_term): Split into ...
3641 (grub_ofconsole_term_input): ... this, and ...
3642 (grub_ofconsole_term_output): ... this. Update all users.
3643 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3644 (grub_serial_term_input): ... this, and ...
3645 (grub_serial_term_output): ... this. Update all users.
3646 * term/i386/pc/console.c (grub_console_term): Split into ...
3647 (grub_console_term_input): ... this, and ...
3648 (grub_console_term_output): ... this. Update all users.
3649 (grub_console_term_input): Only enable it on PC/BIOS platform.
3650 (grub_console_init): Remove grub_keyboard_controller_init() call.
3652 Migrate input terminals to new API:
3654 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3655 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3656 i386-specific anyway).
3657 (grub_console_checkkey): Rename to ...
3658 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3660 (grub_keyboard_controller_orig): New variable.
3661 (grub_console_getkey): Rename to ...
3662 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3664 (grub_keyboard_controller_init): Static-ize. Save original
3665 controller value so that it can be restored ...
3666 (grub_keyboard_controller_fini): ... here (new function).
3667 (grub_at_keyboard_term): New structure.
3668 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3671 Migrate output terminals to new API:
3673 * term/i386/pc/vga.c (grub_vga_term): Change type to
3674 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3675 members. Update all users.
3676 * term/gfxterm.c (grub_video_term): Change type to
3677 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3678 members. Update all users.
3679 * include/grub/i386/pc/console.h (grub_console_checkkey)
3680 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3683 Migrate `terminal' command and userland tools to new API:
3685 * commands/terminal.c (grub_cmd_terminal): Split into ...
3686 (grub_cmd_terminal_input): ... this, and ...
3687 (grub_cmd_terminal_output): ... this.
3688 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3689 `terminal_input' and `terminal_output'.
3690 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3691 `terminal_input' / `terminal_output' API.
3692 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3693 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3694 provided ${GRUB_TERMINAL}, convert it).
3696 2008-11-04 Robert Millan <rmh@aybabtu.com>
3698 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3700 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3702 2008-11-03 Bean <bean123ch@gmail.com>
3704 * kern/elf.c (grub_elf32_load): Revert to previous code.
3705 (grub_elf64_load): Likewise.
3707 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3709 2008-11-01 Robert Millan <rmh@aybabtu.com>
3711 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3712 (TARGET_CPPFLAGS): Likewise.
3713 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3715 2008-11-01 Carles Pina i Estany <carles@pina.cat>
3717 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3719 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3721 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3722 addition of objects until the code is not going to be able to fail.
3724 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3726 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3727 (add a missing NULL check, and correct them by moving the pointer
3728 operations after the actual check).
3730 2008-10-29 Robert Millan <rmh@aybabtu.com>
3732 * util/i386/pc/grub-install.in: Handle empty string as output from
3733 make_system_path_relative_to_its_root().
3735 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3737 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3738 circular metadata worst case scenario. If the metadata is circular
3739 then copy the wrap in place.
3740 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3741 project lib/format_text/layout.h
3742 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3744 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3746 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3748 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3750 * util/update-grub_lib.in: Mention filename in warning message.
3752 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3754 * NEWS: Update for rename of update-grub to grub-mkconfig.
3756 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3758 * util/update-grub_lib.in: Copy to ...
3759 * util/grub-mkconfig_lib.in: ... this. Update all users.
3760 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3761 * util/update-grub.in: Rename to ...
3762 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3763 option. Add `--output' option to allow users to specify the generated
3764 configuration file. Default to stdout.
3765 (update_grub_dir): Rename to ...
3766 (grub_mkconfig_dir): ... this.
3767 (grub_cfg): Default to an empty string.
3768 * conf/common.rmk (update-grub): Rename to ...
3769 (grub-mkconfig): ... this.
3770 (update-grub_lib): Copy to ...
3771 (grub-mkconfig_lib): ... this.
3772 (update-grub_SCRIPTS): Copy to ...
3773 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3774 (update-grub_DATA): Rename to ...
3775 (grub-mkconfig_DATA): ... this.
3777 2008-09-28 Robert Millan <rmh@aybabtu.com>
3779 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3780 to `modified'. Add the real `created' field.
3781 (grub_iso9660_uuid): Use `modified' rather than `created' for
3782 constructing the UUID.
3784 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
3786 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3787 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3789 2008-09-28 Bean <bean123ch@gmail.com>
3791 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3792 Thanks to Christian Franke for finding this bug.
3794 2008-09-25 Robert Millan <rmh@aybabtu.com>
3796 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3797 instances of grub_util_get_disk_name() (see previous commit).
3799 2008-09-25 Robert Millan <rmh@aybabtu.com>
3801 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3802 `util/i386/get_disk_name.c'.
3803 * conf/i386-efi.rmk: Likewise.
3804 * conf/x86_64-efi.rmk: Likewise.
3805 * conf/i386-coreboot.rmk: Likewise.
3806 * conf/i386-ieee1275.rmk: Likewise.
3807 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3808 `util/ieee1275/get_disk_name.c'.
3809 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3810 * util/ieee1275/get_disk_name.c: Remove file.
3811 * util/i386/get_disk_name.c: Remove file.
3812 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3813 "hd%d" for device.map entries, rather than using
3814 grub_util_get_disk_name().
3816 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3818 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3820 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3822 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3824 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3826 (GRUB_TERM_PPAGE): Changed to 0x4900.
3828 2008-09-24 Robert Millan <rmh@aybabtu.com>
3830 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3831 macros (they were i386-pc specific).
3832 * include/grub/sparc64/ieee1275/console.h: Likewise.
3833 * include/grub/efi/console.h: Likewise.
3835 2008-09-22 Bean <bean123ch@gmail.com>
3837 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3838 resident and in attribute list.
3840 * include/grub/ntfs.h (BMP_LEN): Removed.
3842 2008-09-22 Bean <bean123ch@gmail.com>
3844 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3845 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3847 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3848 error occurs, as grub_disk_open will call grub_disk_close, which will
3849 call p->close (scsi).
3851 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3853 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3854 (AC_PREREQ): Bumped to 2.59.
3855 (AC_TRY_COMPILE): Replace obsolete macro with ...
3856 (AC_COMPILE_IFELSE): ... this.
3857 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3858 (AC_LINK_IFELSE): ... this.
3860 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3862 * autogen.sh: Add a call to `gendistlist.sh'.
3864 2008-09-19 Christian Franke <franke@computer.org>
3866 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3867 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3868 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3869 Export __enable_execute_stack() to modules.
3870 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3873 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3875 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3878 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3880 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3881 #include <grub/util/hostdisk.h>.
3883 2008-09-08 Robert Millan <rmh@aybabtu.com>
3885 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3886 segments when their filesz is zero (grub_file_read() interprets
3887 zero-size as "read until EOF", which results in memory corruption).
3888 Use `lowest_segment' rather than 0 for calculating the current
3889 segment load address.
3891 2008-09-08 Robert Millan <rmh@aybabtu.com>
3893 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3894 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3895 clobbered useful information.
3897 2008-09-08 Robert Millan <rmh@aybabtu.com>
3899 * include/grub/util/biosdisk.h: Move to ...
3900 * include/grub/util/hostdisk.h: ... here. Update all users.
3901 * util/biosdisk.c: Move to ...
3902 * util/hostdisk.c: ... here. Update all users.
3904 2008-09-07 Robert Millan <rmh@aybabtu.com>
3906 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3908 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3909 and length can be stored directly in the `mbi->mmap_addr' and
3910 `mbi->mmap_length' struct fields.
3912 2008-09-07 Robert Millan <rmh@aybabtu.com>
3914 * conf/i386.rmk: New file. Provides declaration for building
3916 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3917 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3919 Include `conf/i386.mk'.
3920 * conf/i386-efi.rmk: Likewise.
3921 * conf/x86_64-efi.rmk: Likewise.
3922 * conf/i386-coreboot.rmk: Likewise.
3923 * conf/i386-ieee1275.rmk: Likewise.
3925 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3927 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3928 Adds optimization support for BGR based modes.
3930 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3931 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3932 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3933 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3934 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3935 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3936 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3937 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3938 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3939 (grub_video_i386_vbeblit_index_index): Likewise.
3940 (grub_video_i386_vbeblit_replace_directN): Added.
3941 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3942 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3943 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3944 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3945 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3946 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3947 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3948 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3949 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3950 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3951 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3952 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3953 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3955 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3956 (grub_video_i386_vbefill_R8G8B8): Likewise.
3957 (grub_video_i386_vbefill_index): Likewise.
3958 (grub_video_i386_vbefill_direct32): Added.
3959 (grub_video_i386_vbefill_direct24): Likewise.
3960 (grub_video_i386_vbefill_direct16): Likewise.
3961 (grub_video_i386_vbefill_direct8): Likewise.
3963 * include/grub/video.h (grub_video_blit_format): Removed
3964 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3965 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3966 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3967 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3968 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
3970 * video/video.c (grub_video_get_blit_format): Updated to use new
3971 blit formats. Added handling for 16 bit color modes.
3973 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
3975 (common_blitter): Updated to use new blitters.
3977 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3979 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3980 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3981 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3982 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3983 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3984 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3985 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3986 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3987 (grub_video_i386_vbeblit_index_index): Likewise.
3988 (grub_video_i386_vbeblit_replace_directN): Added.
3989 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3990 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3991 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3992 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3993 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3994 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3995 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3996 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3997 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3998 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3999 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4000 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4001 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4003 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4004 (grub_video_i386_vbefill_R8G8B8): Likewise.
4005 (grub_video_i386_vbefill_index): Likewise.
4006 (grub_video_i386_vbefill_direct32): Added.
4007 (grub_video_i386_vbefill_direct24): Likewise.
4008 (grub_video_i386_vbefill_direct16): Likewise.
4009 (grub_video_i386_vbefill_direct8): Likewise.
4011 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4014 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4017 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4020 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4023 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4025 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4028 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4030 * fs/iso9660.c (grub_iso9660_date): New structure.
4031 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4032 (grub_iso9660_uuid): New function.
4034 2008-09-05 Bean <bean123ch@gmail.com>
4036 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4038 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4039 insensitive bit for names in Win32 and Win32 & DOS namespace.
4041 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4043 * include/grub/types.h (LONG_MAX): Likewise.
4045 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4047 * util/getroot.c: Include <config.h>.
4048 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4049 add support for /dev/md/N devices and handle LVM double dash escaping.
4051 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4053 * config.guess: Update to latest version from config git.
4054 * config.sub: Likewise.
4056 2008-09-03 Robert Millan <rmh@aybabtu.com>
4058 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4059 `disk->total_sectors'.
4061 2008-09-01 Colin D Bennett <colin@gibibit.com>
4063 * include/grub/normal.h: Fixed incorrect comment for
4064 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4066 2008-09-01 Colin D Bennett <colin@gibibit.com>
4068 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4069 values with defines.
4071 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4072 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4073 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4074 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4075 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4076 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4077 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4078 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4079 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4080 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4081 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4082 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4083 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4084 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4085 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4086 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4087 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4088 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4089 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4091 2008-08-31 Robert Millan <rmh@aybabtu.com>
4093 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4095 (grub_multiboot): Fix a few warnings.
4097 2008-08-31 Robert Millan <rmh@aybabtu.com>
4099 * loader/i386/pc/multiboot.c: Update comment not to say that
4100 boot_device support is unimplemented.
4102 2008-08-31 Robert Millan <rmh@aybabtu.com>
4104 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4105 or memory map support are unimplemented.
4107 2008-08-31 Colin D Bennett <colin@gibibit.com>
4109 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4111 2008-08-31 Colin D Bennett <colin@gibibit.com>
4113 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4114 total video memory in 'vbeinfo' output; show color format details for
4117 2008-08-30 Pavel Roskin <proski@gnu.org>
4119 * util/genmoddep.c: Remove for real this time.
4120 * DISTLIST: Remove util/genmoddep.c.
4122 2008-08-30 Robert Millan <rmh@aybabtu.com>
4124 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4125 as required by Multiboot spec (it was already 4-byte aligned, but
4128 2008-08-29 Pavel Roskin <proski@gnu.org>
4130 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4131 * kern/powerpc/ieee1275/startup.S: ... this.
4132 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4133 * DISTLIST: Likewise.
4135 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4136 grub/cpu/kernel.h. Add start label for consistency with other
4137 platforms. Add grub_prefix immediately after start. Add jump
4138 to the code after grub_prefix.
4139 * include/grub/powerpc/kernel.h: Provide valid values for
4140 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4142 2008-08-29 Bean <bean123ch@gmail.com>
4144 * configure.ac: Change host_os to cygwin for mingw.
4145 (asprintf): New check for function.
4147 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4148 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4150 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4151 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4152 sync, sleep and grub_util_get_disk_size for mingw.
4154 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4155 to get size in mingw.
4156 (open_device): Use flag O_BINARY if it's defined.
4157 (find_root_device): Add dummy code for mingw.
4159 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4160 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4161 (get_scsi_disk_name): Return 0 for mingw.
4163 * util/hostfs.c: #include <grub/util/misc.h>.
4164 (grub_hostfs_open): Use "rb" flag to open file, use
4165 grub_util_get_disk_size to get disk size for mingw.
4167 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4168 (asprintf): New function if HAVE_ASPRINTF is not set.
4169 (sync): New function for mingw.
4171 (grub_util_get_disk_size): Likewise.
4173 2008-08-28 Pavel Roskin <proski@gnu.org>
4175 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4178 2008-08-28 Robert Millan <rmh@aybabtu.com>
4180 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4182 2008-08-28 Robert Millan <rmh@aybabtu.com>
4184 Change find_grub_drive() syntax so it doesn't prevent it from
4185 detecting NULL names as errors.
4187 * util/biosdisk.c (find_grub_drive): Move free slot search code
4189 (find_free_slot): ... to here.
4190 (read_device_map): Use find_free_slot() to search for free slots.
4192 2008-08-27 Marco Gerards <marco@gnu.org>
4194 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4195 (scsi_mod_SOURCES): New variable.
4196 (scsi_mod_CFLAGS): Likewise
4197 (scsi_mod_LDFLAGS): Likewise.
4199 * disk/scsi.c: New file.
4201 * include/grub/scsi.h: Likewise.
4203 * include/grub/scsicmd.h: Likewise.
4205 * disk/ata.c: Include <grub/scsi.h>.
4206 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4208 (grub_ata_iterate): Skip ATAPI devices.
4209 (grub_ata_open): Only handle ATAPI devices.
4210 (struct grub_atapi_read): Removed.
4211 (grub_atapi_readsector): Likewise.
4212 (grub_ata_read): No longer handle ATAPI devices.
4213 (grub_ata_write): Likewise.
4214 (grub_atapi_iterate): New function.
4215 (grub_atapi_read): Likewise.
4216 (grub_atapi_write): Likewise.
4217 (grub_atapi_open): Likewise.
4218 (grub_atapi_close): Likewise.
4219 (grub_atapi_dev): New variable.
4220 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4221 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4223 * include/grub/disk.h (enum grub_disk_dev_id): Add
4224 `GRUB_DISK_DEVICE_SCSI_ID'.
4226 2008-08-26 Robert Millan <rmh@aybabtu.com>
4228 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4229 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4232 2008-08-23 Bean <bean123ch@gmail.com>
4234 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4235 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4236 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4237 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4239 (raid5rec_mod_SOURCES): New macro.
4240 (raid5rec_mod_CFLAGS): Likewise.
4241 (raid5rec_mod_LDFLAGS): Likewise.
4242 (raid6rec_mod_SOURCES): Likewise.
4243 (raid6rec_mod_CFLAGS): Likewise.
4244 (raid6rec_mod_LDFLAGS): Likewise.
4245 (mdraid_mod_SOURCES): Likewise.
4246 (mdraid_mod_CFLAGS): Likewise.
4247 (mdraid_mod_LDFLAGS): Likewise.
4248 (dm_nv_mod_SOURCES): Likewise.
4249 (dm_nv_mod_CFLAGS): Likewise.
4250 (dm_nv_mod_LDFLAGS): Likewise.
4252 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4253 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4254 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4256 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4257 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4259 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4261 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4263 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4267 * disk/raid5_recover.c: New file.
4269 * disk/raid6_recover.c: Likewise.
4271 * disk/mdraid_linux.c: Likewise.
4273 * disk/dmraid_nvidia.c: Likewise.
4275 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4278 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4279 calculate the size of raid device.
4280 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4281 different layout of raid5.
4282 (grub_raid_scan_device): Remove code specific to mdraid.
4283 (grub_raid_list): New variable.
4284 (free_array): New function.
4285 (grub_raid_register): Likewise.
4286 (grub_raid_unregister): Likewise.
4287 (grub_raid_rescan): Likewise.
4288 (GRUB_MOD_INIT): Don't iterate device here.
4289 (GRUB_MOD_FINI): Use free_array to release resource.
4291 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4292 (grub_raid5_recover_func_t): New function variable type.
4293 (grub_raid6_recover_func_t): Likewise.
4294 (grub_raid5_recover_func): New variable.
4295 (grub_raid6_recover_func): Likewise.
4296 (grub_raid_register): New function.
4297 (grub_raid_unregister): Likewise.
4298 (grub_raid_rescan): Likewise.
4299 (grub_raid_block_xor): Likewise.
4301 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4302 (CMD_CRC): New macro.
4304 (read_file): Handle device as well as file.
4305 (cmd_crc): New function.
4306 (fstest): Handle multiple disks.
4307 (options): Remove part, raw and long, add root and diskcount.
4308 (usage): Add crc, remove -p, -r, -l, add -r and -c.
4309 (main): Find the first non option entry and ignore subsequent options,
4310 add handling for the new options, support multiple disks.
4312 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4314 2008-08-23 Bean <bean123ch@gmail.com>
4316 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4318 * genfslist.sh: Ignore kernel.mod.
4320 * genpartmaplist.sh: Likewise.
4322 2008-08-23 Robert Millan <rmh@aybabtu.com>
4324 * util/getroot.c (find_root_device): Skip anything that starts with
4325 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4327 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
4329 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4330 * util/grub.d/00_header.in: Allow the administrator to change default
4331 gfxmode via ${GRUB_GFXMODE}.
4333 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
4335 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4337 2008-08-21 Robert Millan <rmh@aybabtu.com>
4339 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4341 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4342 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4344 2008-08-20 Carles Pina i Estany <carles@pina.cat>
4346 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4347 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4349 2008-08-19 Robert Millan <rmh@aybabtu.com>
4351 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4352 (struct grub_virtual_screen): Remove `cursor_color'.
4353 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4355 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4357 2008-08-18 Robert Millan <rmh@aybabtu.com>
4359 Unify (identical) linux_normal.c files.
4360 * loader/i386/efi/linux_normal.c: Move from here ...
4361 * loader/linux_normal.c: ... to here. Update all users.
4362 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4363 * loader/i386/ieee1275/linux_normal.c: Likewise.
4365 2008-08-18 Robert Millan <rmh@aybabtu.com>
4367 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4368 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4369 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4370 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4371 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4373 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4374 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4375 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4376 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4377 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4378 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4379 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4380 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4381 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4382 portably using grub_getxy().
4383 Replace `-EFI' with `-bzImage' in boot message.
4385 2008-08-17 Robert Millan <rmh@aybabtu.com>
4387 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4389 2008-08-17 Robert Millan <rmh@aybabtu.com>
4391 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4393 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4394 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4395 (grub_machine_mmap_iterate): New function declaration.
4396 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4398 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4401 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4402 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4403 Move e820 parsing from here ...
4404 * kern/i386/pc/mmap.c: New file.
4405 (grub_machine_mmap_iterate): ... to here.
4407 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4408 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4409 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4410 (grub_available_iterate): Redeclare to return `void', and redeclare
4411 its hook to use grub_uint64_t as addr and size parameters, and rename
4413 (grub_machine_mmap_iterate): ... this. Update all users.
4415 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4416 to make it more readable. Rename to ...
4417 (grub_machine_mmap_iterate): ... this.
4419 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4420 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4421 (grub_multiboot): Allocate an extra region after the payload, and fill
4422 it with a Multiboot memory map. Adjust a.out loader to calculate size
4423 with the extra space.
4424 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4425 with the extra space.
4427 2008-08-17 Carles Pina i Estany <carles@pina.cat>
4429 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4431 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
4433 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4434 mdate-sh to the list `find' searches for.
4435 * DISTLIST: Regenerated.
4437 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
4439 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4440 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4441 genmoddep.awk, gensymlist.sh.in.
4442 (DISTDIRS): Add bus, docs, hook, lib.
4443 * DISTLIST: Regenerated.
4444 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4446 2008-08-16 Robert Millan <rmh@aybabtu.com>
4448 * disk/raid.c (grub_raid_init): Handle/report errors set by
4449 grub_device_iterate().
4450 * disk/lvm.c (grub_lvm_init): Likewise.
4452 2008-08-15 Bean <bean123ch@gmail.com>
4454 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4456 (datetime_mod_SOURCES): New macro.
4457 (datetime_mod_CFLAGS): Likewise.
4458 (datetime_mod_LDFLAGS): Likewise.
4459 (date_mod_SOURCES): Likewise.
4460 (date_mod_CFLAGS): Likewise.
4461 (date_mod_LDFLAGS): Likewise.
4462 (datehook_mod_SOURCES): Likewise.
4463 (datehook_mod_CFLAGS): Likewise.
4464 (datehook_mod_LDFLAGS): Likewise.
4466 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4468 (datetime_mod_SOURCES): New macro.
4469 (datetime_mod_CFLAGS): Likewise.
4470 (datetime_mod_LDFLAGS): Likewise.
4471 (date_mod_SOURCES): Likewise.
4472 (date_mod_CFLAGS): Likewise.
4473 (date_mod_LDFLAGS): Likewise.
4474 (datehook_mod_SOURCES): Likewise.
4475 (datehook_mod_CFLAGS): Likewise.
4476 (datehook_mod_LDFLAGS): Likewise.
4478 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4480 (datetime_mod_SOURCES): New macro.
4481 (datetime_mod_CFLAGS): Likewise.
4482 (datetime_mod_LDFLAGS): Likewise.
4483 (date_mod_SOURCES): Likewise.
4484 (date_mod_CFLAGS): Likewise.
4485 (date_mod_LDFLAGS): Likewise.
4486 (datehook_mod_SOURCES): Likewise.
4487 (datehook_mod_CFLAGS): Likewise.
4488 (datehook_mod_LDFLAGS): Likewise.
4490 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4492 (datetime_mod_SOURCES): New macro.
4493 (datetime_mod_CFLAGS): Likewise.
4494 (datetime_mod_LDFLAGS): Likewise.
4495 (date_mod_SOURCES): Likewise.
4496 (date_mod_CFLAGS): Likewise.
4497 (date_mod_LDFLAGS): Likewise.
4498 (datehook_mod_SOURCES): Likewise.
4499 (datehook_mod_CFLAGS): Likewise.
4500 (datehook_mod_LDFLAGS): Likewise.
4502 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4504 (datetime_mod_SOURCES): New macro.
4505 (datetime_mod_CFLAGS): Likewise.
4506 (datetime_mod_LDFLAGS): Likewise.
4507 (date_mod_SOURCES): Likewise.
4508 (date_mod_CFLAGS): Likewise.
4509 (date_mod_LDFLAGS): Likewise.
4510 (datehook_mod_SOURCES): Likewise.
4511 (datehook_mod_CFLAGS): Likewise.
4512 (datehook_mod_LDFLAGS): Likewise.
4514 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4516 * commands/date.c: New file.
4518 * hook/datehook.c: Likewise.
4520 * include/grub/lib/datetime.h: Likewise.
4522 * include/grub/i386/cmos.h: Likewise.
4524 * lib/datetime.c: Likewise.
4526 * lib/i386/datetime.c: Likewise.
4528 * lib/efi/datetime.c: Likewise.
4530 2008-08-14 Robert Millan <rmh@aybabtu.com>
4532 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4533 (grub_mkelfimage_SOURCES): New variable.
4534 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4536 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4537 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4538 * conf/powerpc-ieee1275.rmk: Likewise.
4539 * conf/i386-ieee1275.rmk: Likewise.
4541 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4542 * kern/i386/coreboot/init.c: Likewise.
4544 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4545 with `<grub/cpu/kernel.h>'.
4546 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4548 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4549 * kern/i386/coreboot/startup.S: Likewise.
4551 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4552 (GRUB_MOD_GAP): Remove.
4553 * include/grub/powerpc/kernel.h: New file.
4554 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4555 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4556 * include/grub/i386/kernel.h: New file.
4557 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4558 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4559 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4561 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4563 Use --directory when invoking grub_mkimage.
4565 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4566 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4567 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4568 and GRUB_KERNEL_CPU_PREFIX.
4570 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
4572 * include/grub/err.h (grub_err_printf): New function prototype.
4573 * util/misc.c (grub_err_printf): New function.
4574 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4576 * kern/err.c (grub_print_error): Use grub_err_printf.
4578 2008-08-13 Robert Millan <rmh@aybabtu.com>
4580 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4582 2008-08-13 Robert Millan <rmh@aybabtu.com>
4584 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4587 2008-08-12 Robert Millan <rmh@aybabtu.com>
4589 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4590 of the relocation code from here ...
4591 (grub_multiboot): ... to here.
4592 (forward_relocator, backward_relocator): Move from here ...
4593 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4594 (grub_multiboot_backward_relocator): ... to here.
4595 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4596 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4597 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4598 (grub_multiboot_forward_relocator_end)
4599 (grub_multiboot_backward_relocator)
4600 (grub_multiboot_backward_relocator_end): New variables.
4602 2008-08-12 Bean <bean123ch@gmail.com>
4604 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4606 2008-08-11 Robert Millan <rmh@aybabtu.com>
4608 * kern/i386/linuxbios/startup.S: Move from here ...
4609 * kern/i386/coreboot/startup.S: ... to here.
4611 * kern/i386/linuxbios/init.c: Move from here ...
4612 * kern/i386/coreboot/init.c: ... to here.
4614 * kern/i386/linuxbios/table.c: Move from here ...
4615 * kern/i386/coreboot/mmap.c: ... to here.
4617 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4619 2008-08-11 Robert Millan <rmh@aybabtu.com>
4621 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4622 errors. Leave it to the upper layer to handle them.
4624 2008-08-09 Christian Franke <franke@computer.org>
4626 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4627 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4628 Install `grub.d/10_windows' only on Cygwin.
4629 * configure.ac: Add subst of `target_os'.
4630 Check `target_os' also before setting TARGET_OBJ2ELF.
4631 Add `--enable-grub-pe2elf'.
4633 2008-08-08 Robert Millan <rmh@aybabtu.com>
4635 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4636 (grub_last_time): Change type to grub_uint64_t.
4637 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4638 (grub_disk_close): Likewise.
4640 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4641 (run_menu): Migrate code from to using grub_get_time_ms().
4643 * util/misc.c (grub_get_time_ms): New function.
4645 2008-08-08 Marco Gerards <marco@gnu.org>
4647 * disk/ata.c (grub_ata_regget): Change return type to
4649 (grub_ata_regget2): Likewise.
4650 (grub_ata_wait_status): New function.
4651 (grub_ata_wait_busy): Removed function, updated all users to use
4652 `grub_ata_wait_status'.
4653 (grub_ata_wait_drq): Likewise.
4654 (grub_ata_cmd): New function.
4655 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4657 (grub_ata_pio_write): Add error handling.
4658 (grub_atapi_identify): Likewise.
4659 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4661 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4662 handling. Actually use the detected registers. Reorder the
4663 detection logic such that it is easier to read.
4664 (grub_ata_pciinit): Do not assign the same ID to each controller.
4665 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4667 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4669 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4671 2008-08-08 Marco Gerards <marco@gnu.org>
4675 2008-08-07 Bean <bean123ch@gmail.com>
4677 * include/grub/x86_64/pci.h: New file.
4679 2008-08-07 Christian Franke <franke@computer.org>
4681 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4682 (TIMER2_GATE): Likewise.
4683 (grub_pit_wait): Add enable/disable of the timer2 gate
4684 bit of port 0x61. This fixes a possible infinite loop.
4686 2008-08-07 Bean <bean123ch@gmail.com>
4688 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4689 kern/i386/tsc.c and kern/i386/pit.c.
4691 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4694 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4697 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4699 2008-08-07 Bean <bean123ch@gmail.com>
4701 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4703 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4705 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4706 multiple inclusion. Add #include <grub/types.h>.
4708 2008-08-06 Christian Franke <franke@computer.org>
4710 * conf/common.rmk: Build and install `10_windows'.
4711 * util/grub.d/10_windows.in: New script.
4713 2008-08-06 Pavel Roskin <proski@gnu.org>
4715 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4717 2008-08-06 Robert Millan <rmh@aybabtu.com>
4719 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4720 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4722 2008-08-06 Bean <bean123ch@gmail.com>
4724 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4725 (grub_pxefs_fs_int): Remove dummy definition.
4726 (grub_pxefs_open): Use data->block_size to store the current block
4728 (grub_pxefs_read): Use block size stored in data->block_size. As the
4729 value of grub_pxe_blksize can be changed after the file is opened.
4731 2008-08-06 Bean <bean123ch@gmail.com>
4733 * fs/i386/pc/pxe.c (curr_file): new variable.
4734 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4735 require the dummy internal file system anymore.
4736 (grub_pxefs_read): Removed.
4737 (grub_pxefs_close): Likewise.
4738 (grub_pxefs_fs_int): Likewise.
4739 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4740 connection when we switch file.
4741 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4743 2008-08-06 Robert Millan <rmh@aybabtu.com>
4745 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4747 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4748 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4750 * kern/i386/halt.c: New file.
4751 * kern/i386/reboot.c: Likewise.
4752 * include/grub/i386/reboot.h: Likewise.
4753 * include/grub/i386/halt.h: Likewise.
4755 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4756 Include `<grub/cpu/halt.h>'.
4757 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4758 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4760 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4761 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4762 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4763 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4764 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4765 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4767 * include/grub/i386/at_keyboard.h: ... to here.
4769 2008-08-05 Robert Millan <rmh@aybabtu.com>
4771 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4772 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4773 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4774 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4775 `kern/generic/millisleep.c'.
4777 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4778 instead of grub_get_rtc().
4779 (grub_tsc_init): Initialize `tsc_boot_time'.
4781 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4782 (grub_machine_init): Use grub_tsc_init() rather than
4783 installing an RTC-based handler via grub_install_get_time_ms().
4785 * kern/i386/pit.c: New file.
4786 * include/grub/i386/pit.h: Likewise.
4788 2008-08-05 Bean <bean123ch@gmail.com>
4790 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4792 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4793 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4794 (pxe_mod_SOURCES): New macro.
4795 (pxe_mod_CFLAGS): Likewise.
4796 (pxe_mod_LDFLAGS): Likewise.
4797 (pxecmd_mod_SOURCES): Likewise.
4798 (pxecmd_mod_CFLAGS): Likewise.
4799 (pxecmd_mod_LDFLAGS): Likewise.
4801 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4802 (grub_pxe_call): Likewise.
4804 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4806 * commands/i386/pc/pxecmd.c: New file.
4808 * fs/i386/pc/pxe.c: Likewise.
4810 * include/grub/i386/pc/pxe.h: Likewise.
4812 2008-08-05 Bean <bean123ch@gmail.com>
4814 * util/console.c (grub_console_cur_color): New variable.
4815 (grub_console_standard_color): Likewise.
4816 (grub_console_normal_color): Likewise.
4817 (grub_console_highlight_color): Likewise.
4818 (color_map): Likewise.
4819 (use_color): Likewise.
4820 (NUM_COLORS): New macro.
4821 (grub_ncurses_setcolorstate): Handle color properly.
4822 (grub_ncurses_setcolor): Don't change color here, just remember the
4823 settings, color will be set in grub_ncurses_setcolorstate.
4824 (grub_ncurses_getcolor): New function.
4825 (grub_ncurses_init): Initialize color pairs.
4826 (grub_ncurses_term): New member grub_ncurses_getcolor.
4828 2008-08-05 Colin D Bennett <colin@gibibit.com>
4830 High resolution timer support. Implemented for x86 CPUs using TSC.
4831 Extracted generic grub_millisleep() so it's linked in only as needed.
4832 This requires a Pentium compatible CPU; if the RDTSC instruction is
4833 not supported, then it falls back on the generic grub_get_time_ms()
4834 implementation that uses the machine's RTC.
4836 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4837 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4838 `kern/generic/millisleep.c'.
4840 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4841 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4843 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4844 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4846 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4848 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4849 `kern/generic/millisleep.c'.
4851 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4853 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4855 * kern/generic/rtc_get_time_ms.c: New file.
4857 * kern/generic/millisleep.c: New file.
4859 * kern/misc.c: Don't include
4860 <kern/time.h> anymore.
4861 (grub_millisleep_generic): Removed.
4863 * commands/sleep.c (grub_interruptible_millisleep): Uses
4864 grub_get_time_ms() instead of grub_get_rtc().
4866 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4868 (grub_cpu_is_cpuid_supported): New inline function.
4869 (grub_cpu_is_tsc_supported): New inline function.
4870 (grub_tsc_init): New function prototype.
4871 (grub_tsc_get_time_ms): New function prototype.
4873 * kern/i386/tsc.c (grub_get_time_ms): New file.
4875 * include/grub/time.h: Include <grub/types.h.
4876 (grub_millisleep_generic): Removed.
4877 (grub_get_time_ms): New prototype.
4878 (grub_install_get_time_ms): New prototype.
4879 (grub_rtc_get_time_ms): New prototype.
4881 * kern/time.c (grub_get_time_ms): New function.
4882 (grub_install_get_time_ms): New function.
4884 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4885 <grub/time.h> anymore.
4886 (grub_millisleep): Removed.
4887 (grub_machine_init): Call grub_tsc_init.
4889 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4890 get_time_ms() implementation.
4892 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4893 (ieee1275_get_time_ms): New function.
4894 (grub_machine_init): Install get_time_ms() implementation.
4896 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4897 (grub_machine_init): Call grub_tsc_init().
4898 (grub_millisleep): Removed.
4900 * kern/ieee1275/init.c (grub_millisleep): Removed.
4901 (grub_machine_init): Install ieee1275_get_time_ms()
4903 (ieee1275_get_time_ms): New function.
4904 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4907 2008-08-05 Marco Gerards <marco@gnu.org>
4909 * disk/ata.c: Include <grub/pci.h>.
4910 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4911 (grub_ata_initialize): Rewritten.
4912 (grub_ata_device_initialize): New function.
4914 2008-08-04 Pavel Roskin <proski@gnu.org>
4916 * kern/main.c: Include grub/mm.h.
4918 2008-08-04 Robert Millan <rmh@aybabtu.com>
4920 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4921 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4922 corruption problem).
4924 2008-08-04 Robert Millan <rmh@aybabtu.com>
4926 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4927 warnings introduced in my last commit.
4929 2008-08-03 Robert Millan <rmh@aybabtu.com>
4931 Make PCI available on all i386 architectures.
4933 * include/grub/i386/pc/pci.h: Move from here ...
4934 * include/grub/i386/pci.h: ... to here.
4936 * include/grub/i386/pc/pci.h: Remove.
4937 * include/grub/i386/efi/pci.h: Remove.
4938 * include/grub/x86_64/efi/pci.h: Remove.
4940 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4943 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4944 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4945 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4947 * conf/i386-ieee1275.rmk: Likewise.
4949 2008-08-03 Robert Millan <rmh@aybabtu.com>
4951 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4952 (grub_console_setcursor): Make it possible to set cursor off.
4954 2008-08-03 Robert Millan <rmh@aybabtu.com>
4956 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4957 of modules instead of assuming which platform provides what.
4958 * util/update-grub.in: Likewise.
4960 2008-08-03 Robert Millan <rmh@aybabtu.com>
4962 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4963 instead of `grub_install_dos_part' to determine whether a drive needs
4964 to be prepended to prefix (`grub_install_dos_part' is not reliable,
4965 because it can be overridden when loading GRUB via Multiboot).
4967 2008-08-02 Robert Millan <rmh@aybabtu.com>
4969 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4971 2008-08-02 Robert Millan <rmh@aybabtu.com>
4973 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4974 of informational grub_dprintf() calls.
4976 2008-08-02 Robert Millan <rmh@aybabtu.com>
4978 * disk/memdisk.c (memdisk_size): Don't initialize.
4979 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4981 * include/grub/i386/pc/kernel.h
4982 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4983 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4984 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4985 (grub_arch_memdisk_size): Remove.
4987 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4988 field (was only used to transfer a constant). Add `type' field to
4989 support multiple module types.
4990 (grub_module_iterate): New function.
4992 * kern/device.c (grub_device_open): Do not hide error messages
4993 when grub_disk_open() fails. Use grub_print_error() instead.
4995 * kern/i386/pc/init.c (grub_arch_modules_addr)
4996 (grub_arch_memdisk_size): Remove functions.
4997 (grub_arch_modules_addr): Return the module address in high memory
4998 (now that it isn't copied anymore).
5000 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5001 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5002 decompression routine (grub_total_module_size already includes that
5003 now). Don't copy modules back to low memory.
5005 * kern/main.c: Include `<grub/mm.h>'.
5006 (grub_load_modules): Split out (and use) ...
5007 (grub_module_iterate): ... this function, which iterates through
5008 module objects and runs a hook.
5009 Comment out grub_mm_init_region() call, as it would cause non-ELF
5010 modules to be overwritten.
5012 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5013 the memdisk image in its own region, make it part of the module list.
5014 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5015 (main): Parse --memdisk|-m option, and pass user-provided path as
5016 parameter to generate_image().
5017 (add_segments): Pass `memdisk_path' down to load_modules().
5018 (load_modules): Embed memdisk image in module section when requested.
5019 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5020 `header.type' instead of `header.offset'.
5022 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5023 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5024 (memdisk_mod_LDFLAGS): New variables.
5025 * conf/i386-coreboot.rmk: Likewise.
5026 * conf/i386-ieee1275.rmk: Likewise.
5028 2008-08-02 Robert Millan <rmh@aybabtu.com>
5030 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5031 (backward_relocator): New variables. Used to allocate and relocate
5032 the payload, respectively.
5033 (grub_multiboot_load_elf32): Load into heap instead of requested
5034 address, install the appropriate relocator code in each bound of
5035 the payload, and set the entry point such that
5036 grub_multiboot_real_boot() will jump to one of them.
5038 * kern/i386/loader.S (grub_multiboot_payload_size)
5039 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5040 (grub_multiboot_payload_entry_offset): New variables.
5041 (grub_multiboot_real_boot): Set cpu context to what the relocator
5042 expects, and jump to the relocator instead of the payload.
5044 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5045 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5046 (grub_multiboot_payload_entry_offset): Export.
5048 2008-08-01 Bean <bean123ch@gmail.com>
5050 * normal/menu_entry.c (editor_getline): Don't return the original
5051 string as result, as it will be released by lexer once it has done
5054 2008-08-01 Robert Millan <rmh@aybabtu.com>
5056 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5057 within menuentries, not before them.
5058 util/grub.d/10_hurd.in: Likewise.
5060 2008-08-01 Bean <bean123ch@gmail.com>
5062 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5063 (bufio_mod_SOURCES): New macro.
5064 (bufio_mod_CFLAGS): Likewise.
5065 (bufio_mod_LDFLAGS): Likewise.
5067 * include/grub/bufio.h: New file.
5069 * io/bufio.c: Likewise.
5071 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5072 (grub_video_reader_png): Use grub_buffile_open to open file.
5074 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5075 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5077 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5078 (grub_video_reader_tga): Use grub_buffile_open to open file.
5080 * font/manager.c: Include <grub/bufio.h>.
5081 (add_font): Use grub_buffile_open to open file.
5083 2008-07-31 Robert Millan <rmh@aybabtu.com>
5085 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5086 ELF segments, use a macro for arbitrarily accessing any of them instead
5087 of preparing a pointer that allows access to one at a time.
5088 (grub_multiboot_load_elf64): Likewise.
5090 2008-07-31 Bean <bean123ch@gmail.com>
5092 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5093 GRUB_KERNEL_MACHINE_DATA_END.
5095 2008-07-30 Robert Millan <rmh@aybabtu.com>
5097 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5098 Increase from 0x50 to 0x60.
5099 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5100 use UUIDs to identify the root drive for them. If that's not
5102 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5103 check, for cross-disk installs.
5105 2008-07-30 Robert Millan <rmh@aybabtu.com>
5107 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5108 is non-empty, use it to set the `prefix' environment variable instead
5109 of the usual approach.
5110 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5111 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5112 environment variable instead of dummy make_install_device().
5114 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5115 (start): Insert a data section, with `grub_prefix' variable.
5116 * kern/i386/linuxbios/startup.S: Likewise.
5118 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5119 New variable reference.
5120 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5121 New macro. Defines offset of `grub_prefix' within startup.S (relative
5123 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5124 section within startup.S (relative to `start').
5125 * include/grub/i386/coreboot/kernel.h: Likewise.
5127 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5128 Overwrite grub_prefix with its contents, at the beginning of the
5130 (main): Understand -p|--prefix.
5132 2008-07-30 Robert Millan <rmh@aybabtu.com>
5134 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5136 2008-07-30 Robert Millan <rmh@aybabtu.com>
5138 * term/i386/pc/vga_text.c (grub_console_cls): Use
5139 grub_console_gotoxy() to go back to beginning of the screen.
5140 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5142 2008-07-29 Christian Franke <franke@computer.org>
5144 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5145 Add conversion of emulated mount points on Cygwin.
5147 2008-07-29 Christian Franke <franke@computer.org>
5149 * util/update-grub.in: Add a check for admin
5151 Remove old `grub.cfg.new' before creation.
5152 Add `-f' to `mv' to handle the different filesystem
5153 semantics of Windows.
5155 2008-07-29 Bean <bean123ch@gmail.com>
5157 * normal/main.c (get_line): Fix buffer overflow bug.
5159 2008-07-28 Robert Millan <rmh@aybabtu.com>
5161 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5162 (struct grub_apple_header): New struct. Describes the layout of
5164 (apple_partition_map_iterate): Check the header magic as well as the
5165 partition magic (which was already being checked).
5167 2008-07-28 Pavel Roskin <proski@gnu.org>
5169 * genmk.rb: Add a warning to the beginning of the output that
5170 it's a generated file and should not be edited.
5172 2008-07-28 Robert Millan <rmh@aybabtu.com>
5174 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5175 with the same number are found, just use issue a warning with
5176 grub_dprintf(), as this error has been reported to be non-fatal.
5178 2008-07-27 Robert Millan <rmh@aybabtu.com>
5180 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5183 2008-07-27 Bean <bean123ch@gmail.com>
5185 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5186 (grub_fat_find_dir): Ignore case when comparing filename.
5188 2008-07-27 Bean <bean123ch@gmail.com>
5190 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5191 smallino, as it's more descriptive, and i8count can be confused with
5192 the other field count.
5193 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5196 2008-07-27 Bean <bean123ch@gmail.com>
5198 * commands/crc.c: New file.
5200 * lib/crc.c: Likewise.
5202 * include/grub/lib/crc.h: Likewise.
5204 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5206 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5207 (hexdump): Move this function to ...
5209 * lib/hexdump.c: ... here.
5211 * include/grub/hexdump.h: Renamed to ...
5213 * include/grub/lib/hexdump.h: ... this.
5215 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5217 * util/grub-editenv.c: Likewise.
5219 * include/envblk.h: Renamed to ...
5221 * include/lib/envblk.h: ... this.
5223 * util/envblk.c: Renamed to ...
5225 * lib/envblk.c: ... this.
5227 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5229 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5230 (pkglib_MODULES): Add crc.mod.
5231 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5232 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5233 (crc_mod_SOURCES): New macro.
5234 (crc_mod_CFLAGS): Likewise.
5235 (crc_mod_LDFLAGS): Likewise.
5237 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5239 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5241 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5243 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5245 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5247 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
5249 * commands/help.c: Include <grub/term.h>.
5250 (TERM_WIDTH): Removed. Updated all users.
5252 2008-07-27 Pavel Roskin <proski@gnu.org>
5254 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5255 spurious warnings about a comment within a comment.
5257 2008-07-25 Robert Millan <rmh@aybabtu.com>
5259 * util/getroot.c (find_root_device): Skip devices that match
5260 /dev/dm-[0-9]. This lets the real device be found for any type of
5261 abstraction (LVM, EVMS, RAID..).
5262 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5263 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5264 device is found first, find_root_device() will now skip it.
5266 2008-07-24 Pavel Roskin <proski@gnu.org>
5268 * include/grub/types.h: Use __builtin_bswap32() and
5269 __builtin_bswap64() with gcc 4.3 and newer.
5271 2008-07-24 Christian Franke <franke@computer.org>
5273 * util/i386/pc/grub-install.in: If `--debug' is specified,
5274 pass `--verbose' to grub-setup.
5275 Abort script if make_system_path_relative_to_its_root() fails.
5277 2008-07-24 Bean <bean123ch@gmail.com>
5279 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5280 variable `target_platform' should be `platform'.
5282 2008-07-24 Bean <bean123ch@gmail.com>
5284 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5285 (grub_png_init_fixed_block): New function.
5286 (grub_png_decode_image_data): Handle fixed huffman code compression.
5288 2008-07-24 Bean <bean123ch@gmail.com>
5290 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5291 (grub_pe2elf_SOURCES): New macro.
5292 (CLEANFILES): Add grub-pe2elf.
5294 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5295 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5296 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5297 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5298 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5299 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5300 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5301 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5302 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5303 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5304 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5305 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5306 (GRUB_PE32_DT_FUNCTION): Likewise.
5307 (GRUB_PE32_REL_I386_DIR32): Likewise.
5308 (GRUB_PE32_REL_I386_REL32): Likewise.
5309 (grub_pe32_symbol): New structure.
5310 (grub_pe32_reloc): Likewise.
5312 * util/grub-pe2elf.c: New file.
5314 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5315 start symbol in non pc platform.
5317 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5319 The following patches are from Christian Franke.
5321 * include/grub/dl.h: Remove .previous, gas supports this only
5324 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5325 Remove .type, gas supports this only for ELF format.
5327 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5328 nullbytes in symbol table. This fixes an infinite loop if table is
5331 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5332 TARGET_IMG_LDFLAGS and EXEEXT.
5334 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5335 TARGET_IMG_LDFLAGS_AC.
5336 (grub_CHECK_STACK_ARG_PROBE): New function.
5338 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5340 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5342 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5343 to set TARGET_IMG_LD* accordingly.
5344 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5345 Add call to grub_CHECK_STACK_ARG_PROBE.
5346 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5348 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5350 * genmk.rb: Add EXEEXT to CLEANFILES.
5352 2008-07-23 Robert Millan <rmh@aybabtu.com>
5354 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5355 define the codes for arrows and lines used for the menu).
5356 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5359 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5360 fonts, because the latter are too slow.
5362 2008-07-21 Bean <bean123ch@gmail.com>
5364 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5365 a20. Run keyboard test last, as it will cause macbook to halt.
5367 2008-07-18 Pavel Roskin <proski@gnu.org>
5369 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5370 load foreign architecture modules correctly anyway. Keep
5371 support for loading host architecture modules, whether we
5372 compile them or not.
5374 2008-07-17 Pavel Roskin <proski@gnu.org>
5376 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5377 change target_cpu. The compiler default can mismatch target_cpu
5380 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5381 * kern/efi/efi.c: Likewise.
5383 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5384 target compiler is functional.
5385 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5388 * configure.ac: Default to efi platform for x86_64-apple. Allow
5389 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5390 adjustments from the rest, only do them if target is not
5391 explicitly given. Merge other adjustments with the final sanity
5392 check. Remove an extraneous check for supported CPU. Be
5393 specific which CPU and which platform is not supported.
5395 * configure.ac: Default to pc platform for x86_64.
5397 2008-07-17 Robert Millan <rmh@aybabtu.com>
5399 Partial LinuxBIOS -> Coreboot rename.
5401 * conf/i386-linuxbios.rmk: Renamed to ...
5402 * conf/i386-coreboot.rmk: ... this.
5403 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5404 * configure.ac: Accept "coreboot" as input platform (but maintain
5405 compatibility with "linuxbios").
5406 * include/grub/i386/linuxbios: Renamed to ...
5407 * include/grub/i386/coreboot: ... this.
5409 2008-07-17 Bean <bean123ch@gmail.com>
5411 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5412 (appleldr_mod_SOURCE): New variable.
5413 (appleldr_mod_CFLAGS): Likewise.
5414 (appleldr_mod_LDFLAGS): Likewise.
5415 (pci_mod_SOURCES): Likewise.
5416 (pci_mod_CFLAGS): Likewise.
5417 (pci_mod_LDFLAGS): Likewise.
5418 (lspci_mod_SOURCES): Likewise.
5419 (lspci_mod_CFLAGS): Likewise.
5420 (lspci_mod_LDFLAGS): Likewise.
5422 * conf/x86_64-efi.rmk: New file.
5424 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5426 (grub_efidisk_write): Likewise.
5428 * include/efi/api.h (efi_call_0): New macro.
5429 (efi_call_1): Likewise.
5430 (efi_call_2): Likewise.
5431 (efi_call_3): Likewise.
5432 (efi_call_4): Likewise.
5433 (efi_call_5): Likewise.
5434 (efi_call_6): Likewise.
5436 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5437 grub_rescue_cmd_chainloader.
5439 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5440 (grub_pe32_optional_header): Change some fields based on i386 or
5442 (GRUB_PE32_PE32_MAGIC): Likewise.
5444 * include/grub/efi/uga_draw.h: New file.
5446 * include/grub/elf.h (STN_ABS): New constant.
5447 (R_X86_64_NONE): Relocation constant for x86_64.
5448 (R_X86_64_64): Likewise.
5449 (R_X86_64_PC32): Likewise.
5450 (R_X86_64_GOT32): Likewise.
5451 (R_X86_64_PLT32): Likewise.
5452 (R_X86_64_COPY): Likewise.
5453 (R_X86_64_GLOB_DAT): Likewise.
5454 (R_X86_64_JUMP_SLOT): Likewise.
5455 (R_X86_64_RELATIVE): Likewise.
5456 (R_X86_64_GOTPCREL): Likewise.
5457 (R_X86_64_32): Likewise.
5458 (R_X86_64_32S): Likewise.
5459 (R_X86_64_16): Likewise.
5460 (R_X86_64_PC16): Likewise.
5461 (R_X86_64_8): Likewise.
5462 (R_X86_64_PC8): Likewise.
5464 * include/grub/i386/efi/pci.h: New file.
5466 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5467 Change it value based on platform.
5468 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5469 (GRUB_E820_RAM): Likewise.
5470 (GRUB_E820_RESERVED): Likewise.
5471 (GRUB_E820_ACPI): Likewise.
5472 (GRUB_E820_NVS): Likewise.
5473 (GRUB_E820_EXEC_CODE): Likewise.
5474 (GRUB_E820_MAX_ENTRY): Likewise.
5475 (grub_e820_mmap): New structure.
5476 (linux_kernel_header): Change the efi field according to different
5477 kernel version, also field from linux_kernel_header.
5479 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5481 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5482 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5483 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5484 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5485 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5486 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5487 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5488 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5489 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5490 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5492 * include/grub/x86_64/efi/kernel.h: New file.
5494 * include/grub/x86_64/efi/loader.h: Likewise.
5496 * include/grub/x86_64/efi/machine.h: Likewise.
5498 * include/grub/x86_64/efi/pci.h: Likewise.
5500 * include/grub/x86_64/efi/time.h: Likewise.
5502 * include/grub/x86_64/linux.h: Likewise.
5504 * include/grub/x86_64/setjmp.h: Likewise.
5506 * include/grub/x86_64/time.h: Likewise.
5508 * include/grub/x86_64/types.h: Likewise.
5510 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5511 GRUB_TARGET_SIZEOF_VOID_P.
5513 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5514 (grub_efi_locate_handle): Likewise.
5515 (grub_efi_open_protocol): Likewise.
5516 (grub_efi_set_text_mode): Likewise.
5517 (grub_efi_stall): Likewise.
5518 (grub_exit): Likewise.
5519 (grub_reboot): Likewise.
5520 (grub_halt): Likewise.
5521 (grub_efi_exit_boot_services): Likewise.
5522 (grub_get_rtc): Likewise.
5524 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5525 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5526 (grub_efi_allocate_pages): Wrap efi calls.
5527 (grub_efi_free_pages): Wrap efi calls.
5528 (grub_efi_get_memory_map): Wrap efi calls.
5530 * kern/x86_64/dl.c: New file.
5532 * kern/x86_64/efi/callwrap.S: Likewise.
5534 * kern/x86_64/efi/startup.S: Likewise.
5536 * loader/efi/appleloader.c: Likewise.
5538 * loader/efi/chainloader.c (cmdline): New variable.
5539 (grub_chainloader_unload): Wrap efi calls.
5540 (grub_chainloader_boot): Likewise.
5541 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5544 * loader/efi/chainloader_normal.c (chainloader_command):
5545 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5548 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5550 (grub_e820_add_region): New function.
5551 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5553 (grub_find_video_card): New function.
5554 (grub_linux_setup_video): New function.
5555 (grub_rescue_cmd_linux): Probe for video information.
5557 * normal/x86_64/setjmp.S: New file.
5559 * term/efi/console.c (map_char): New function.
5560 (grub_console_putchar): Map unicode char.
5561 (grub_console_checkkey): Wrap efi calls.
5562 (grub_console_getkey): Likewise.
5563 (grub_console_getwh): Likewise.
5564 (grub_console_gotoxy): Likewise.
5565 (grub_console_cls): Likewise.
5566 (grub_console_setcolorstate): Likewise.
5567 (grub_console_setcursor): Likewise.
5569 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5571 2008-07-16 Pavel Roskin <proski@gnu.org>
5573 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5576 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5577 pointer, not an integer. This fixes a warning and prevents
5578 precision loss on 64-bit systems.
5579 (relocate_addresses): Remove unneeded cast.
5581 2008-07-15 Pavel Roskin <proski@gnu.org>
5583 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5585 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5587 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5588 Fix comparison between signed and unsigned.
5590 * include/grub/i386/ieee1275/console.h: Declare
5591 grub_console_init() and grub_console_fini().
5593 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5594 It's empty and unused.
5596 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5597 beginning to avoid warnings with some compilers.
5599 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5600 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5602 2008-07-14 Pavel Roskin <proski@gnu.org>
5604 * kern/env.c (grub_register_variable_hook): Don't copy empty
5605 string, it leaks memory. Pass "" to grub_env_set(), it should
5606 handle constant strings.
5608 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5609 * commands/cmp.c (grub_cmd_cmp): Likewise.
5610 * kern/dl.c (grub_dl_flush_cache): Likewise.
5611 (grub_dl_load_core): Likewise.
5612 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5613 (grub_elf64_load_phdrs): Likewise.
5615 2008-07-13 Pavel Roskin <proski@gnu.org>
5617 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5618 between signed and unsigned.
5619 (LzmaEnc_Finish): Fix warning about an unused parameter.
5621 2008-07-13 Bean <bean123ch@gmail.com>
5623 * Makefile.in (enable_lzo): New rule.
5625 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5627 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5629 * boot/i386/pc/lnxboot.S: #include <config.h>.
5631 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5632 its value according to the compression algorithm used, lzo or lzma.
5634 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5635 compression algorithm according to configure macro.
5637 * kern/i386/pc/startup.S (codestart): Likewise.
5639 * kern/i386/pc/lzma_decode.S: New file.
5641 * include/grub/lib/LzFind.h: Likewise.
5643 * include/grub/lib/LzHash.h: Likewise.
5645 * include/grub/lib/LzmaDec.h: Likewise.
5647 * include/grub/lib/LzmaEnc.h: Likewise.
5649 * include/grub/lib/LzmaTypes.h: Likewise.
5651 * lib/LzFind.c: Likewise.
5653 * lib/LzmaDec.c: Likewise.
5655 * lib/LzmaEnc.c: Likewise.
5657 2008-07-13 Bean <bean123ch@gmail.com>
5659 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5660 (grub_ext4_extent_header): New structure.
5661 (grub_ext4_extent): Likewise.
5662 (grub_ext4_extent_idx): Likewise.
5663 (grub_ext4_find_leaf): New function.
5664 (grub_ext2_read_block): Handle extents.
5666 2008-07-12 Robert Millan <rmh@aybabtu.com>
5668 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5670 2008-07-11 Robert Millan <rmh@aybabtu.com>
5672 * util/grub.d/40_custom.in: New file. Example on how to add custom
5673 entries to /etc/grub.d.
5674 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5675 40_custom (implicitly, by merging all the grub.d rules).
5677 2008-07-11 Pavel Roskin <proski@gnu.org>
5679 * commands/read.c (grub_getline): Fix invalid memory access.
5680 Don't add newline to the variable value.
5682 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5683 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5684 (serial_hw_get_port): Check validity of the port number.
5685 (grub_cmd_serial): Check return value of serial_hw_get_port().
5687 2008-07-07 Pavel Roskin <proski@gnu.org>
5689 * boot/i386/pc/diskboot.S (notification_string): Replace
5690 "Loading kernel" with just "loading". This is shorter, less
5691 confusing and saves a few bytes for possible future changes.
5693 2008-07-05 Pavel Roskin <proski@gnu.org>
5695 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5696 size for ATAPI devices, they are undefined. Output sector
5697 number in decimal form.
5699 * disk/ata.c: Use named constants for status bits.
5701 2008-07-04 Pavel Roskin <proski@gnu.org>
5703 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5704 grub_addr_t before casting it to the void pointer to fix a
5705 warning. Non-addressable regions are discarded earlier.
5706 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5707 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5708 (check_signature): Don't shadow table_header.
5709 (grub_linuxbios_table_iterate): Cast numeric constants to
5710 grub_linuxbios_table_header_t.
5711 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5714 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5717 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5718 pointer, which can cause warnings. Support 64-bit addresses.
5720 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5721 of sizeof(long). This fixes PowerPC image generation on x86_64.
5723 2008-07-04 Robert Millan <rmh@aybabtu.com>
5725 This fixes a performance issue when pc & gpt partmap iterators
5726 didn't abort iteration even after our hook found what it was
5727 looking for (often causing expensive probes of non-existent drives).
5729 Some callers relied on previous buggy behaviour, since they would
5730 raise an error when their own hooks caused early abortion of its
5733 * kern/device.c (grub_device_open): Improve error message.
5734 * disk/lvm.c (grub_lvm_open): Likewise.
5735 * disk/raid.c (grub_raid_open): Likewise.
5737 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5738 when hook requests it, independently of grub_errno.
5739 (pc_partition_map_probe): Do not fail when find_func() caused
5740 early abortion of pc_partition_map_iterate().
5742 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5743 when hook requests it, independently of grub_errno.
5744 (gpt_partition_map_probe): Do not fail when find_func() caused
5745 early abortion of gpt_partition_map_iterate().
5747 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5748 when hook requests it, independently of grub_errno. Do not fail when
5749 part_map_iterate_hook() caused early abortion of p->iterate().
5751 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5752 when grub_partition_iterate() returned with non-zero.
5754 2008-07-03 Pavel Roskin <proski@gnu.org>
5756 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5757 like we do in grub_ata_pio_read().
5758 (grub_ata_readwrite): Always write individual sectors. Fix the
5759 sector count for the remainder.
5760 (grub_ata_write): Enable writing to ATA devices. Correctly
5761 report error for ATAPI devices.
5763 2008-07-02 Pavel Roskin <proski@gnu.org>
5765 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5768 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5769 for every read sector, we already increment it for the whole
5770 batch. This fixes reading more than 256 sectors at once.
5772 * util/grub-editenv.c (cmd_info): Cast argument to long
5773 explicitly. ptrdiff_t reduces to int on i386.
5775 * util/grub-editenv.c (main): Be specific which parameter is
5778 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5779 (memdisk): Make memdisk_orig_addr a pointer.
5781 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5782 for file offsets, use grub_off_t instead. Fix printf format
5785 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5786 there. Real unexpected warnings should not drown in the noise
5787 about known problems.
5789 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5790 grub_disk_addr_t for memory addresses.
5792 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5793 explicitly to fix a warning.
5795 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5797 * Makefile.in (MODULE_LDFLAGS): New variable.
5798 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5799 the linker accepts --build-id=none.
5800 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5802 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5804 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5805 those in Linux XFS code. Provide a way to access 64-bit parent
5807 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5808 the end of struct grub_xfs_dir_header.
5810 2008-07-02 Bean <bean123ch@gmail.com>
5812 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5813 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5814 and GRUB_IEEE1275_FLAG_NO_ANSI.
5816 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5817 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5818 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5820 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5821 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5823 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5824 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5826 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5827 esc sequence on non ANSI terminal.
5828 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5830 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5833 2008-07-02 Bean <bean123ch@gmail.com>
5835 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5836 (grub_editenv_SOURCES): New variable.
5837 (pkglib_MODULES): Add loadenv.mod.
5838 (loadenv_mod_SOURCES): New variable.
5839 (loadenv_mod_CFLAGS): Likewise.
5840 (loadenv_mod_LDFLAGS): Likewise.
5842 * include/grub/envblk.h: New file.
5844 * util/envblk.c: New file.
5846 * util/grub-editenv.c: New file.
5848 * commands/loadenv.c: New file.
5850 2008-07-01 Pavel Roskin <proski@gnu.org>
5852 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5853 not unsigned char. This fixes warnings and is consistent with
5856 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5858 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5860 * term/tparm.c (analyze): Always set *popcount.
5862 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5863 cast to fix a warning.
5865 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5866 cast to suppress a warning.
5868 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5869 grub_fshelp_read_file() expects.
5871 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5872 write uuid as a 32-bit value in CPU byte order, so declare and
5875 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5876 long if the format specifier expects it.
5877 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5878 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5879 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5880 long to fix a warning.
5881 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5882 grub_dprintf() arguments to fix warnings.
5884 2008-06-30 Pavel Roskin <proski@gnu.org>
5886 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5887 install_bsd_part immediately before core.img is embedded or
5888 modified on disk. This fixes core.img verification if core.img
5891 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5892 core_path to calculate the blocklist.
5893 Patch from Javier MartÃn <lordhabbit@gmail.com>
5895 2008-06-29 Robert Millan <rmh@aybabtu.com>
5897 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5898 block to disk block.
5899 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5900 Patch from Niels Böhm <bitbucket@arcor.de>
5902 2008-06-29 Robert Millan <rmh@aybabtu.com>
5904 * util/update-grub_lib.in (font_path): Search for fonts in
5905 /boot/grub first, which is more likely to be readable (we aren't
5906 deciding where fonts live, just looking for them).
5908 2008-06-26 Pavel Roskin <proski@gnu.org>
5910 * util/biosdisk.c (read_device_map): Don't leave dead map
5911 entries for devices failing stat() check.
5913 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5914 core_path_dev for the core.img path on the target device.
5916 2008-06-26 Robert Millan <rmh@aybabtu.com>
5918 * disk/fs_uuid.c: New file.
5919 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5920 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5921 (fs_uuid_mod_LDFLAGS): New variables.
5922 * include/grub/disk.h (grub_disk_dev_id): Add
5923 `GRUB_DISK_DEVICE_UUID_ID'.
5924 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5925 implement iterate().
5927 2008-06-26 Robert Millan <rmh@aybabtu.com>
5929 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5930 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5931 Linux image includes no initrd.
5933 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
5935 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5936 call to resolve the core image location that effectively appended the
5939 2008-06-21 Robert Millan <rmh@aybabtu.com>
5941 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5944 * util/grub.d/10_hurd.in: ... to here ...
5945 * util/grub.d/10_linux.in: ... and here.
5947 2008-06-19 Robert Millan <rmh@aybabtu.com>
5949 * kern/main.c (grub_main): Export `prefix' variable immediately
5950 after it has been set by grub_machine_set_prefix().
5952 2008-06-19 Robert Millan <rmh@aybabtu.com>
5954 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5955 search result when not saving to variable, not the other way around.
5956 When saving to variable, abort iteration as soon as a match is found.
5958 2008-06-19 Robert Millan <rmh@aybabtu.com>
5960 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5961 check for partition that provides /boot/grub. Its logic is flawed,
5962 as it prevents prepare_grub_to_access_device() from being called
5965 2008-06-19 Robert Millan <rmh@aybabtu.com>
5967 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5968 "insmod" command directly when abstraction modules are needed,
5969 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
5970 since it had already been processed).
5972 2008-06-19 Pavel Roskin <proski@gnu.org>
5974 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5975 changed. This is needed in case GRUB_LIBDIR changes.
5976 * conf/i386-ieee1275.rmk: Likewise.
5977 * conf/i386-linuxbios.rmk: Likewise.
5978 * conf/i386-pc.rmk: Likewise.
5979 * conf/powerpc-ieee1275.rmk: Likewise.
5981 2008-06-18 Pavel Roskin <proski@gnu.org>
5983 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5984 kernel_elf_symlist.c to symlist.c for consistency with other
5985 architectures. Update all users.
5986 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5988 2008-06-18 Robert Millan <rmh@aybabtu.com>
5990 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5993 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5994 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5995 a RAID device, run setup() for all members independently on whether
5996 LVM abstraction is being used.
5997 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5998 If grub-mkimage has set `*install_dos_part == -2', don't override this
6000 Perform *install_dos_part adjustments independently on whether
6001 we're embedding or not.
6002 Clarify error message when image is too big for embedding.
6003 Remove duplicate *install_dos_part stanza.
6005 2008-06-17 Robert Millan <rmh@aybabtu.com>
6007 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6008 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6010 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6011 values in grub_ofconsole_normal_color and
6012 grub_ofconsole_highlight_color (they're not directly related to
6013 background and foreground).
6014 (grub_ofconsole_setcolorstate): Extract background and foreground
6015 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6017 2008-06-17 Robert Millan <rmh@aybabtu.com>
6019 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6020 /boot/grub for the check in last commit, not /boot (they could be
6021 different partitions).
6023 2008-06-16 Robert Millan <rmh@aybabtu.com>
6025 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6026 asked to setup access for the same partition that provides /boot,
6027 don't bother using UUIDs since our root already has the value we
6030 2008-06-16 Robert Millan <rmh@aybabtu.com>
6032 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6034 Patch from Sven Mueller <sven@debian.org>.
6036 2008-06-16 Robert Millan <rmh@aybabtu.com>
6038 * util/update-grub.in: Check for $EUID instead of $UID.
6039 Reported by Vincent Zweije.
6041 2008-06-16 Bean <bean123ch@gmail.com>
6043 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6044 (grub_ext2_read_block): Likewise.
6045 (grub_ext2_read_inode): Likewise.
6046 (grub_ext2_mount): Likewise.
6047 (grub_ext2_close): Likewise.
6048 (grub_ext3_get_journal): Removed.
6050 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6051 (grub_reiserfs_read_symlink): Likewise.
6052 (grub_reiserfs_mount): Likewise.
6053 (grub_reiserfs_open): Likewise.
6054 (grub_reiserfs_read): Likewise.
6055 (grub_reiserfs_close): Likewise.
6056 (grub_reiserfs_get_journal): Removed.
6058 * fs/fshelp.c (grub_fshelp_read): Removed.
6059 (grub_fshelp_map_block): Likewise.
6061 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6062 (grub_fshelp_journal): Likewise.
6063 (grub_fshelp_read): Likewise.
6064 (grub_fshelp_map_block): Likewise.
6066 2008-06-16 Pavel Roskin <proski@gnu.org>
6068 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6069 floating point anymore.
6070 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6072 2008-06-15 Pavel Roskin <proski@gnu.org>
6074 * commands/ls.c (grub_ls_list_files): Use integer calculations
6075 for human readable format, avoid floating point use.
6076 * kern/misc.c (grub_ftoa): Remove.
6077 (grub_vsprintf): Remove floating point support.
6079 2008-06-15 Robert Millan <rmh@aybabtu.com>
6081 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6083 Reported by Max Vozeler.
6085 2008-06-15 Robert Millan <rmh@aybabtu.com>
6087 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6088 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6090 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6091 the beginning of the prefix.
6093 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6094 It is assumed that if we have a memdisk, grub-mkimage has set
6095 grub_prefix to include the "(memdisk)" drive in it.
6097 2008-06-15 Robert Millan <rmh@aybabtu.com>
6099 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6100 Initialize keyboard controller after registering the terminal, so that
6101 grub_printf() can be called from grub_keyboard_controller_init().
6103 2008-06-15 Robert Millan <rmh@aybabtu.com>
6105 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6106 extent-btree which is written as big endian on disk.
6107 Reported by Alain Greppin <al@chilibi.org>.
6109 2008-06-14 Robert Millan <rmh@aybabtu.com>
6111 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6112 * util/i386/pc/grub-install.in (modules): Likewise.
6114 2008-06-13 Pavel Roskin <proski@gnu.org>
6116 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6118 2008-06-13 Bean <bean123ch@gmail.com>
6120 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6122 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6124 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6125 to indicate sparse block.
6127 2008-06-12 Pavel Roskin <proski@gnu.org>
6129 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6130 number, grub_fshelp_read() does it for us.
6132 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6133 linear disk read with journal translation.
6134 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6135 * include/grub/fshelp.h: Declare grub_fshelp_read().
6137 2008-06-09 Pavel Roskin <proski@gnu.org>
6139 * fs/minix.c (grub_minix_mount): Handle error reading
6142 2008-06-08 Robert Millan <rmh@aybabtu.com>
6144 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6145 don't append the RAID prefix afterwards.
6146 Reported by Clint Adams.
6148 2008-06-08 Robert Millan <rmh@aybabtu.com>
6150 Based on description from Pavel:
6151 * kern/disk.c (grub_disk_check_range): Rename to ...
6152 (grub_disk_adjust_range): ... this. Add a comment explaining the
6153 tasks performed by this function.
6155 2008-06-08 Robert Millan <rmh@aybabtu.com>
6157 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6158 `num_serial' (for consistency with other variables).
6159 (struct grub_ntfs_data): Add `uuid' member.
6160 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6161 (grub_ntfs_uuid): New function.
6162 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6164 2008-06-07 Pavel Roskin <proski@gnu.org>
6166 * util/biosdisk.c (open_device): Revert last change to the
6167 function, it broke installation. The sector needs to be
6168 different dependent on which device is opened.
6170 2008-06-06 Robert Millan <rmh@aybabtu.com>
6172 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6173 rest of GRUB, and breakage doesn't happen if its value were modified.
6175 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6176 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6177 a constant (same value).
6178 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6179 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6181 2008-06-06 Robert Millan <rmh@aybabtu.com>
6183 * util/biosdisk.c (open_device): Do not modify sector offset when
6184 accessing a partition. kern/disk.c already handles this for us.
6186 2008-06-06 Robert Millan <rmh@aybabtu.com>
6188 * util/grub-emu.c (grub_machine_init): Move code in this function from
6190 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6191 segfault in case grub_printf() is called).
6193 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6194 grub_probe. Update all users not to explicitly add it again.
6195 (grub_device): New variable; contains corresponding device for grubdir.
6196 (fs_module, partmap_module, devabstraction_module): Pass
6197 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6200 2008-06-05 Robert Millan <rmh@aybabtu.com>
6202 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6203 is found, print it (same layout as with labels).
6205 2008-06-04 Robert Millan <rmh@aybabtu.com>
6207 * util/biosdisk.c (get_drive): Rename to ...
6208 (find_grub_drive): ... this. Update all users.
6210 (get_os_disk): Rename to ...
6211 (convert_system_partition_to_system_disk): ... this. Update all users.
6213 (find_drive): Rename to ...
6214 (find_system_device): ... this. Update all users.
6216 2008-06-04 Robert Millan <rmh@aybabtu.com>
6218 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6219 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6220 (make_device_map): Likewise.
6222 2008-06-01 Robert Millan <rmh@aybabtu.com>
6224 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6225 before dereferencing it.
6227 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6228 union with fat12/fat16-specific ones. Add some new fields, including
6229 `num_serial' for both versions.
6230 (struct grub_fat_data): Add `uuid' member.
6231 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6232 names. Initialize `data->uuid' using `num_serial'.
6233 (grub_fat_uuid): New function.
6234 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6236 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6237 (grub_reiserfs_uuid): New function.
6238 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6241 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6242 (grub_xfs_uuid): New function.
6243 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6245 2008-06-01 Robert Millan <rmh@aybabtu.com>
6247 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6248 code that is backward compatible with pre-uuid search command.
6250 2008-05-31 Robert Millan <rmh@aybabtu.com>
6252 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6253 floppies after everything else, to ensure floppy drive isn't accessed
6254 unnecessarily (patch from Bean).
6256 2008-05-31 Robert Millan <rmh@aybabtu.com>
6258 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6259 not print device names when we were asked to set a variable.
6261 2008-05-31 Robert Millan <rmh@aybabtu.com>
6263 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6264 using "cursor-on" and "cursor-off" commands (understood at least by
6265 the Open Firmware flavour on OLPC).
6267 2008-05-31 Michael Gorven <michael@gorven.za.net>
6269 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6270 on and off sequences.
6272 2008-05-31 Robert Millan <rmh@aybabtu.com>
6274 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6275 * util/update-grub.in: Likewise.
6277 2008-05-30 Pavel Roskin <proski@gnu.org>
6279 * util/biosdisk.c (linux_find_partition): Simplify logic and
6280 make the code more universal. Keep special processing for
6281 devfs, but use a simple rule for all other devices. If the
6282 device ends with a number, append 'p' and the partition number.
6283 Otherwise, append only the partition number.
6285 2008-05-30 Robert Millan <rmh@aybabtu.com>
6287 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6288 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6289 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6290 the `root' parameter to Linux.
6292 2008-05-30 Robert Millan <rmh@aybabtu.com>
6294 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6295 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6296 --fs_uuid with --fs-uuid.
6297 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6298 all filesystems support them).
6300 2008-05-30 Robert Millan <rmh@aybabtu.com>
6302 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6303 grub_printf() flags, since we're printing in units of 2 bytes.
6305 2008-05-30 Robert Millan <rmh@aybabtu.com>
6307 * util/grub.d/00_header.in: Remove obsolete comment referencing
6308 convert_system_path_to_grub_path().
6309 * util/update-grub.in: Likewise.
6310 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6311 (convert_system_path_to_grub_path): Add a warning message explaining
6312 that this function is deprecated. Rely on is_path_readable_by_grub()
6313 for the readability checks.
6314 (font_path): Use is_path_readable_by_grub() for the readability
6315 check rather than convert_system_path_to_grub_path().
6317 2008-05-30 Robert Millan <rmh@aybabtu.com>
6319 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6320 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6321 converting it first.
6322 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6323 grub.cfg for access to font file, and afterwards call it again to set
6326 2008-05-30 Robert Millan <rmh@aybabtu.com>
6328 * commands/search.c (options): Add --fs_uuid option.
6329 (search_fs_uuid): New function.
6330 (grub_cmd_search): Fix --set argument passing.
6331 Use search_fs_uuid() when requested via --fs_uuid.
6332 (grub_search_init): Update help message.
6333 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6334 and redeclare it as an array of 16-bit words.
6335 (grub_ext2_uuid): New function.
6336 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6337 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6338 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6339 (GRUB_DEVICE_BOOT_UUID): New variables.
6340 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6341 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6343 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6344 just assume `root' variable has the right value.
6345 * util/grub.d/10_linux.in: Likewise.
6346 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6348 (main): Recognise `-t fs_uuid' argument.
6350 2008-05-30 Robert Millan <rmh@aybabtu.com>
6352 * util/biosdisk.c (map): Redefine structure to hold information
6353 about GRUB drive name.
6354 (get_drive): Reimplement without assuming (and verifying) BIOS-like
6356 (call_hook): Remove.
6357 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6358 member. Assume drive has partitions.
6359 (grub_util_biosdisk_open): Access device names via `.device' struct
6361 (open_device): Likewise.
6362 (find_drive): Likewise.
6363 (read_device_map): Adjust map[] usage to match the new struct
6364 definition. Don't check for duplicates (still possible, but not cheap
6366 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6367 (make_device_name): Remove assumption of BIOS-like drive names.
6369 2008-05-30 Pavel Roskin <proski@gnu.org>
6371 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6372 compiling execute.c doesn't need grub_script.tab.h anymore.
6373 (normal/command.c_DEPENDENCIES): Likewise.
6374 (normal/function.c_DEPENDENCIES): Likewise.
6375 * conf/i386-ieee1275.rmk: Likewise.
6376 * conf/i386-linuxbios.rmk: Likewise.
6377 * conf/i386-pc.rmk: Likewise.
6378 * conf/powerpc-ieee1275.rmk: Likewise.
6379 * conf/sparc64-ieee1275.rmk: Likewise.
6381 2008-05-29 Pavel Roskin <proski@gnu.org>
6383 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6384 when scanning metadata for volume group name.
6386 * include/grub/script.h: Don't include grub_script.tab.h. It's
6387 a generated file, which may only be included from the files with
6388 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6389 use union YYSTYPE, as the later allows forward declaration.
6390 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6392 2008-05-29 Robert Millan <rmh@aybabtu.com>
6394 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6395 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6396 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6397 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6400 2008-05-29 Robert Millan <rmh@aybabtu.com>
6402 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6403 control key combinations.
6405 2008-05-29 Robert Millan <rmh@aybabtu.com>
6407 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6408 * util/ieee1275/grub-install.in: ... to here.
6409 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6410 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6411 (grub_install_SOURCES): Likewise.
6413 2008-05-29 Robert Millan <rmh@aybabtu.com>
6415 * fs/affs.c: Update copyright year.
6416 * fs/ext2.c: Likewise.
6417 * fs/fshelp.c: Likewise.
6418 * fs/hfsplus.c: Likewise.
6419 * fs/ntfs.c: Likewise.
6420 * fs/xfs.c: Likewise.
6421 * include/grub/fshelp.h: Likewise.
6422 * util/grub-mkdevicemap.c: Likewise.
6424 2008-05-28 Robert Millan <rmh@aybabtu.com>
6426 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6427 might need to be fatfs to support some firmware implementations
6430 2008-05-28 Robert Millan <rmh@aybabtu.com>
6432 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6434 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6435 (make_device_map): Likewise.
6437 2008-05-20 Bean <bean123ch@gmail.com>
6439 * fs/fshelp.c (grub_fshelp_map_block): New function.
6440 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6441 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6443 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6444 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6445 (grub_fshelp_journal): New structure.
6446 (grub_fshelp_map_block): New function prototype.
6447 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6448 (grub_fshelp_map_block): Likewise.
6450 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6451 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6452 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6453 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6454 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6455 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6456 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6457 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6458 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6459 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6460 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6461 (grub_ext2_sblock): New members for journal support.
6462 (grub_ext3_journal_header): New structure.
6463 (grub_ext3_journal_revoke_header): Likewise.
6464 (grub_ext3_journal_block_tag): Likewise.
6465 (grub_ext3_journal_sblock): Likewise.
6466 (grub_fshelp_node): New members logfile and journal.
6467 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6468 grub_fshelp_map_block to get real block number.
6469 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6471 (grub_ext2_read_inode): Likewise.
6472 (grub_ext3_get_journal): New function.
6473 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6474 (grub_ext2_close): Release memory used by journal.
6476 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6477 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6478 (grub_reiserfs_transaction_header): Renamed to
6479 grub_reiserfs_description_block, replace field data with real_blocks.
6480 (grub_reiserfs_commit_block): New structure.
6481 (grub_reiserfs_data): New member journal.
6482 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6484 (grub_reiserfs_read_symlink): Likewise.
6485 (grub_reiserfs_iterate_dir): Likewise.
6486 (grub_reiserfs_open): Likewise.
6487 (grub_reiserfs_read): Likewise.
6488 (grub_reiserfs_get_journal): New function.
6489 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6490 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6491 using grub_reiserfs_get_journal.
6492 (grub_reiserfs_close): Release memory used by journal.
6494 * fs/affs.c (grub_affs_read_block): Change block type to
6495 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6497 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6499 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6501 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6503 * fs/udf.c (grub_udf_read_block): Change block type to
6504 grub_disk_addr_t. Use type cast to avoid warning.
6506 * fs/xfs.c (grub_xfs_read_block): Likewise.
6508 2008-05-16 Christian Franke <franke@computer.org>
6510 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6511 to ensure that break with ESC will always work.
6512 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6513 Remove ESC from keyboard queue.
6515 2008-05-16 Christian Franke <franke@computer.org>
6517 * util/biosdisk.c: [__CYGWIN__] Add includes.
6518 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6519 (get_os_disk): Move variable declarations to OS specific
6520 parts to avoid warning.
6521 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6522 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6523 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6525 * util/getroot.c: [__CYGWIN__] Add includes.
6526 (strip_extra_slashes): Fix "/" case.
6527 [__CYGWIN__] (get_win32_path): New function.
6528 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6529 [__CYGWIN__] (find_root_device): Disable.
6530 [__CYGWIN__] (get_bootsec_serial): New function.
6531 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6532 [__linux__] (grub_guess_root_device): Add early returns to simplify
6534 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6535 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6536 check for Linux only.
6538 2008-05-15 Bean <bean123ch@gmail.com>
6540 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6541 keyboard hang problem in apple's intel mac.
6543 2008-05-09 Robert Millan <rmh@aybabtu.com>
6545 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6547 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6548 (make_device_map): Likewise.
6549 Reported by Aurelien Jarno <aurel32@debian.org>
6551 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
6553 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6554 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6555 (make_device_map): Output entries for xvd type disks.
6557 2008-05-07 Robert Millan <rmh@aybabtu.com>
6559 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6561 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6562 (make_device_map): Likewise.
6563 Reported by Roland Dreier <rdreier@cisco.com>
6565 2008-05-07 Robert Millan <rmh@aybabtu.com>
6567 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6568 grub_strstr() call. Correct a few mistakes in failure path handling.
6570 2008-05-06 Robert Millan <rmh@aybabtu.com>
6572 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6573 Do not print a trailing slash (therefore, the root directory is an
6575 (convert_system_path_to_grub_path): Do not remove trailing slash
6576 from make_system_path_relative_to_its_root() output.
6578 * util/i386/pc/grub-install.in: Add trailing slash to output from
6579 make_system_path_relative_to_its_root().
6581 2008-05-06 Robert Millan <rmh@aybabtu.com>
6583 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6584 ensures that output lines aren't intermangled with those sent to
6585 stderr (via grub_util_info()).
6586 * util/grub-probe.c (grub_refresh): Likewise.
6587 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6589 2008-05-05 Christian Franke <franke@computer.org>
6591 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6592 Add Cygwin device names.
6593 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6594 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6595 (check_device): Return error instead of success on empty name.
6596 (make_device_map): Move label inside linux specific code to
6597 prevent compiler warning.
6599 2008-04-30 Robert Millan <rmh@aybabtu.com>
6601 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6602 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6604 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6606 2008-04-29 Robert Millan <rmh@aybabtu.com>
6608 * docs/grub.cfg: New file (example GRUB configuration).
6610 2008-04-26 Robert Millan <rmh@aybabtu.com>
6612 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6613 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6614 and `disk/ieee1275/nand.c'.
6616 2008-04-25 Bean <bean123ch@gmail.com>
6618 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6621 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6622 change the buffer size to 4096 for cdrom device.
6624 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6626 (_linux_mod_SOURCES): New variable.
6627 (_linux_mod_CFLAGS): Likewise.
6628 (_linux_mod_LDFLAGS): Likewise.
6629 (linux_mod_SOURCES): Likewise.
6630 (linux_mod_CFLAGS): Likewise.
6631 (linux_mod_LDFLAGS): Likewise.
6632 (nand_mod_SOURCES): Likewise.
6633 (nand_mod_CFLAGS): Likewise.
6634 (nand_mod_LDFLAGS): Likewise.
6636 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6637 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6638 type property. (nand device in olpc don't have this property)
6640 * include/grub/disk.h (grub_disk_dev_id): New macro
6641 GRUB_DISK_DEVICE_NAND_ID.
6643 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6645 (grub_rescue_cmd_initrd): Likewise.
6647 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6648 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6649 ofw_cif_handler and ofw_idt, adjust padding number.
6651 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6652 GRUB_MACHINE_IEEE1275 is defined.
6654 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6655 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6657 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6658 on nested function heap_init.
6659 (grub_upper_mem): New variable for i386-ieee1275.
6660 (grub_get_extended_memory): New function for i386-ieee1275.
6661 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6663 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6664 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6667 * loader/i386/ieee1275/linux.c: New file.
6669 * loader/i386/ieee1275/linux_normal.c: New file.
6671 * disk/ieee1275/nand.c: New file.
6673 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6675 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6677 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6679 2008-04-18 Robert Millan <rmh@aybabtu.com>
6681 Restructures early code path on ieee1275 to unify grub_main() as
6682 the first C function that is executed in every platform.
6684 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6685 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6687 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6688 * kern/ieee1275/cmain.c (cmain): Rename to ...
6689 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6690 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6693 2008-04-18 Robert Millan <rmh@aybabtu.com>
6695 * util/update-grub.in: Fix syntax error when setting
6696 `GRUB_PRELOAD_MODULES'.
6697 Reported by Stephane Chazelas <stephane@artesyncp.com>
6699 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6701 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6702 section into account, newer toolchains generate unique build ids
6703 * configure.ac: remove the test for --build-id=none acceptance,
6704 we want build ids to be preserved
6705 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6706 far from other sections don't cause the raw binary images grow
6709 2008-04-15 Robert Millan <rmh@aybabtu.com>
6711 * disk/lvm.c: Update copyright year.
6712 * kern/misc.c: Likewise.
6714 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6716 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6717 there is no memory left for physical volume name.
6719 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6721 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6722 volume name mapping to support bigger than 9 character names properly.
6724 2008-04-13 Robert Millan <rmh@aybabtu.com>
6726 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6727 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6729 2008-04-13 Christian Franke <franke@computer.org>
6731 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6732 to create a floppy emulation boot CD when non emulation mode
6734 Enable Joliet CD filesystem extension.
6736 2008-04-13 Robert Millan <rmh@aybabtu.com>
6738 * kern/misc.c (grub_strncat): Fix off-by-one error.
6739 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6741 * kern/env.c (grub_env_context_close): Clear current context, not
6743 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6745 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6747 2008-04-13 Robert Millan <rmh@aybabtu.com>
6749 Improve robustness when handling LVM.
6751 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6752 (and leave `*p' unmodified).
6753 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6755 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6756 iterating through it.
6757 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6759 (grub_lvm_scan_device): Check the return value (and fail gracefully
6760 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6761 Don't assume `vg->pvs != NULL' when iterating through it.
6763 2008-04-13 Robert Millan <rmh@aybabtu.com>
6765 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6766 * genmk.rb (partmap): New variable.
6767 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6768 (#{partmap}): New target rule.
6769 * genpartmaplist.sh: New file.
6770 * Makefile.in (pkglib_DATA): Add partmap.lst.
6771 (partmap.lst): New target rule.
6772 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6773 modules (including all partition maps), instead of preloading them.
6775 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6777 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6778 `linux-boot-prober' (if installed) to detect other operating
6779 systems which are installed on the computer and add them to
6781 * conf/common.rmk: Build and install 30_os-prober.
6783 2008-04-12 Robert Millan <rmh@aybabtu.com>
6785 * kern/powerpc/ieee1275/init.c: Move from here ...
6786 * kern/ieee1275/init.c: ... to here. Update all users.
6788 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6789 * kern/ieee1275/cmain.c: ... to here. Update all users.
6791 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6792 * kern/ieee1275/openfw.c: ... to here. Update all users.
6794 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6795 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6797 2008-04-10 Pavel Roskin <proski@gnu.org>
6799 * configure.ac: Always use "_cv_" in cache variables for
6800 compatibility with Autoconf 2.62.
6802 2008-04-07 Robert Millan <rmh@aybabtu.com>
6804 Revert grub/machine/init.h addition by Pavel (since it breaks on
6805 i386-ieee1275 and others):
6806 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6807 * util/powerpc/ieee1275/misc.c: Likewise.
6809 2008-04-07 Robert Millan <rmh@aybabtu.com>
6811 * util/grub-probe.c (probe): Improve error message.
6813 2008-04-07 Robert Millan <rmh@aybabtu.com>
6815 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6816 (this prevents the presence of a bogus entry from ruining the whole
6819 2008-04-06 Pavel Roskin <proski@gnu.org>
6821 * util/biosdisk.c: Include grub/util/biosdisk.h.
6822 * util/grub-fstest.c (execute_command): Make static.
6823 * util/grub-mkdevicemap.c (check_device): Likewise.
6824 * util/i386/pc/misc.c: Include grub/machine/init.h.
6825 * util/powerpc/ieee1275/misc.c: Likewise.
6826 * util/lvm.c: Include grub/util/lvm.h.
6827 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6829 * util/raid.c: Include grub/util/raid.h.
6830 (grub_util_getdiskname): Make static.
6832 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6833 grub_hostfs_fini(), as they are called from grub_init_all() and
6834 grub_fini_all() respectively. This fixes an infinite loop in
6835 grub-fstest due to double registration of hostfs.
6836 Reported by Christian Franke <Christian.Franke@t-online.de>
6838 2008-04-05 Pavel Roskin <proski@gnu.org>
6840 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6841 all 8 functions. Otherwise, probe function 0 only.
6843 2008-04-04 Pavel Roskin <proski@gnu.org>
6845 * commands/lspci.c (grub_lspci_iter): Print the bus number
6848 * commands/lspci.c (grub_pci_classes): Fix typos.
6849 (grub_lspci_iter): Don't print func twice. Print vendor ID
6850 before device ID, as it's normally done.
6852 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6853 Fix signedness warnings.
6854 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6856 * util/ieee1275/get_disk_name.c: Include config.h so that
6857 _GNU_SOURCE is defined and getline() is declared. Mark an
6858 unused argument as such. Fix a signedness warning.
6860 2008-04-02 Pavel Roskin <proski@gnu.org>
6862 * genkernsyms.sh.in: Use more robust assignments for CC and
6863 srcdir. Quote srcdir.
6864 * gensymlist.sh.in: Likewise. Assert at the compile time that
6865 the symbol table is not empty.
6867 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6868 * fs/cpio.c (grub_cpio_read): Likewise.
6870 2008-04-01 Pavel Roskin <proski@gnu.org>
6872 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6873 * disk/host.c (grub_host_open): Likewise.
6874 * disk/loopback.c (grub_loopback_open): Likewise.
6875 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6876 disk->id as in disk/host.c, not a multi-character constant.
6878 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6879 later is obsolete, potentially dangerous and sets a bad example.
6880 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6881 * util/misc.c (grub_util_get_image_size): Likewise.
6883 * disk/loopback.c (options): Improve help for "--partitions".
6885 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6886 options to align them with the short options, e.g. "echo -e".
6888 2008-03-31 Bean <bean123ch@gmail.com>
6890 * video/reader/png.c (grub_png_data): New member is_16bit and
6892 (grub_png_decode_image_header): Detect 16 bit png image.
6893 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6894 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6895 (grub_video_reader_png): Release memory occupied by image_data.
6897 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6899 (grub_nfs_mount): Skip the test for sector per cluster.
6901 * include/grub/ntfs.h (MAX_SPC): Removed.
6903 2008-03-31 Bean <bean123ch@gmail.com>
6905 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6906 (grub_probe_SOURCES): Add fs/afs.c.
6907 (grub_fstest_SOURCES): Likewise.
6908 (afs_mod_SOURCES): New variable.
6909 (afs_mod_CFLAGS): Likewise.
6910 (afs_mod_LDFLAGS): Likewise.
6912 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6913 (grub_emu_SOURCES): Likewise.
6915 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6917 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6919 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6921 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6923 * fs/afs.c: New file.
6925 2008-03-30 Pavel Roskin <proski@gnu.org>
6927 * disk/host.c: Include grub/misc.h to fix a warning.
6928 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6929 warnings about implicit declarations.
6931 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6933 * include/grub/i386/loader.h: Change declaration of
6934 grub_linux_boot() to match what grub_loader_set() expects.
6935 * util/getroot.c (grub_guess_root_device): Return const char* to
6937 * util/grub-probe.c (probe): Fix a warning about uninitialized
6938 abstraction_name variable.
6939 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6940 second argument as unused to fix a warning.
6942 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6943 missing grub_error() call.
6945 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6946 2.60 and newer uses it to define datadir.
6948 * commands/sleep.c: Fix warning about implicit declaration.
6949 * disk/memdisk.c: Likewise.
6950 * loader/aout.c: Likewise.
6951 * loader/i386/bsd_normal.c: Likewise.
6952 * util/grub-probe.c: Likewise.
6954 * commands/i386/cpuid.c (has_longmode): Make static.
6955 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6956 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6958 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6959 GDT. This is more robust, as %ds can change.
6960 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6961 calling real_to_prot().
6962 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6964 2008-03-28 Pavel Roskin <proski@gnu.org>
6966 * kern/i386/pc/startup.S: Assert that uncompressed functions
6967 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6968 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6969 code, as they push parts of the code (error handlers) beyond
6970 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6971 code as correctness and size.
6973 2008-03-28 Pavel Roskin <proski@gnu.org>
6975 * kern/i386/pc/startup.S
6976 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6977 data block address to the real mode, keep offset minimal. This
6978 works around a bug in AWARD BIOS on old Athlon systems, which
6979 makes CD detection hang.
6981 2008-03-26 Pavel Roskin <proski@gnu.org>
6983 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6985 * include/grub/normal.h: Add grub_parse_color_name_pair()
6988 2008-03-24 Bean <bean123ch@gmail.com>
6990 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6991 (cd_count): Removed.
6992 (cd_drive): New variable.
6993 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6994 (grub_biosdisk_call_hook): Likewise.
6995 (grub_biosdisk_iterate): Change cdrom detection method.
6996 (grub_biosdisk_open): Replace cd_start with cd_drive.
6997 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6998 detect cdrom device.
7000 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7002 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7003 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7004 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7005 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7006 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7007 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7008 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7009 (grub_biosdisk_cdrp): New structure.
7010 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7012 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7014 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7017 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7020 2008-03-20 Robert Millan <rmh@aybabtu.com>
7022 Remove 2 TiB limit in ata.mod.
7023 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7024 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7025 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7026 grub_uint64_t instead of grub_uint32_t.
7028 2008-03-05 Bean <bean123ch@gmail.com>
7030 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7031 (grub_multiboot): Set boot device.
7033 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7035 2008-03-02 Bean <bean123ch@gmail.com>
7037 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7040 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7042 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7045 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7048 * docs/fdl.texi: New file.
7050 * docs/mdate-sh: New file. Copied from gnulib.
7051 * docs/texinfo.tex: Likewise.
7053 * config.guess: Updated from gnulib.
7054 * install-sh: Likewise.
7056 2008-02-28 Robert Millan <rmh@aybabtu.com>
7058 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7059 (aout_mod_SOURCES): New variable.
7060 (aout_mod_CFLAGS): Likewise.
7061 (aout_mod_LDFLAGS): Likewise.
7063 * conf/i386-ieee1275.rmk: Likewise.
7065 2008-02-28 Robert Millan <rmh@aybabtu.com>
7067 * util/update-grub.in: Reorganise terminal validity check. Accept
7068 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7069 Based on suggestion by Franklin PIAT.
7071 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7073 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7075 * util/getroot.c (grub_util_check_block_device): New function that
7076 returns the given argument if it is a block device and returns NULL else.
7077 * util/grub-probe.c (argument_is_device): New variable.
7078 (probe): Promote device_name from a variable to an argument. Receive
7079 device_name from grub_util_check_block_device() if path is NULL and from
7080 grub_guess_root_device() else. Do not free() device_name anymore.
7081 (options): Introduce new parameter '-d, --device'.
7082 (main): Add description of the new parameter to the help screen.
7083 Rename path variable to argument. Set argument_is_device if the '-d'
7084 option is given. Pass argument to probe() depending on
7087 2008-02-24 Bean <bean123ch@gmail.com>
7089 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7090 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7091 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7092 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7093 (GRUB_ISO9660_VOLDESC_END): Likewise.
7094 (grub_iso9660_primary_voldesc): New member escape.
7095 (grub_iso9660_data): New member joliet.
7096 (grub_iso9660_convert_string): New function.
7097 (grub_iso9660_mount): Detect joliet extension.
7098 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7099 (grub_iso9660_iso9660_label): Likewise.
7101 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7102 (grub_setup_SOURCES): Add fs/udf.c.
7103 (grub_fstest_SOURCES): Likewise.
7104 (udf_mod_SOURCES): New variable.
7105 (udf_mod_CFLAGS): Likewise.
7106 (udf_mod_LDFLAGS): Likewise.
7108 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7109 (grub_emu_SOURCES): Likewise.
7111 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7113 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7115 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7117 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7119 * fs/udf.c: New file.
7121 2008-02-24 Robert Millan <rmh@aybabtu.com>
7123 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7124 (normal/lexer.c_DEPENDENCIES): New variables.
7125 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7126 (normal/lexer.c_DEPENDENCIES): Likewise.
7127 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7128 (normal/lexer.c_DEPENDENCIES): Likewise.
7129 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7130 (normal/lexer.c_DEPENDENCIES): Likewise.
7131 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7132 (normal/lexer.c_DEPENDENCIES): Likewise.
7133 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7134 (normal/lexer.c_DEPENDENCIES): Likewise.
7136 2008-02-23 Robert Millan <rmh@aybabtu.com>
7138 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7139 since they were intended to be in hex. This didn't break previously
7140 because of a bug in gpt_partition_map_iterate() (see below).
7142 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7143 when checking the validity of GPT header.
7144 Remove `partno', since it always provides the same information as `i'.
7146 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7148 * include/grub/efi/time.h: Fix a wrong comment.
7150 2008-02-19 Pavel Roskin <proski@gnu.org>
7152 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7155 2008-02-19 Bean <bean123ch@gmail.com>
7157 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7158 (aout_mod_SOURCES): New variable.
7159 (aout_mod_CFLAGS): Likewise.
7160 (aout_mod_LDFLAGS): Likewise.
7161 (_bsd_mod_SOURCES): New variable.
7162 (_bsd_mod_CFLAGS): Likewise.
7163 (_bsd_mod_LDFLAGS): Likewise.
7164 (bsd_mod_SOURCES): New variable.
7165 (bsd_mod_CFLAGS): Likewise.
7166 (bsd_mod_LDFLAGS): Likewise.
7168 * include/grub/aout.h: New file.
7170 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7172 * include/grub/i386/bsd.h: New file.
7174 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7177 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7178 function is called, so that it's possible to change it inside the hook.
7179 (grub_elf64_load): Likewise.
7180 (grub_elf_file): Don't close the file if elf header is not found.
7181 (grub_elf_close): Close the file if grub_elf_file fails (The new
7182 grub_elf_file won't close it).
7183 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7184 (grub_elf64_size): Likewise.
7186 * kern/i386/loader.S (grub_unix_real_boot): New function.
7188 * loader/aout.c: New file.
7190 * loader/i386/bsd.c: New file.
7192 * loader/i386/bsd_normal.c: New file.
7194 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7196 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7197 can test other formats.
7199 2008-02-19 Robert Millan <rmh@aybabtu.com>
7201 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7202 (grub_gpt_partition_type_empty): Redefine with macro from
7203 `<grub/gpt_partition.h>'.
7204 (gpt_partition_map_iterate): Adjust partition type comparison.
7206 Export `entry' as partmap-specific `part.data' struct.
7207 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7209 * include/grub/gpt_partition.h (grub_gpt_header)
7210 (grub_gpt_partentry): ... to here (new file).
7212 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7214 (grub_gpt_partition_type_bios_boot): New const variable, defined
7215 with macro from `<grub/gpt_partition.h>'.
7217 (setup): Replace `first_start' with `embed_region', which keeps
7218 track of the embed region (and is partmap-agnostic).
7220 Replace find_first_partition_start() with find_usable_region(),
7221 which finds a usable region for embedding using partmap-specific
7222 knowledge (supports PC/MSDOS and GPT).
7224 Fix all assumptions that the embed region start at sector 1, using
7225 `embed_region.start' from now on. Similarly, use `embed_region.end'
7226 rather than `first_start' to calculate available size.
7228 In grub_util_info() message, replace "into after the MBR" with an
7229 indication of the specific sector our embed region starts at.
7231 2008-02-19 Robert Millan <rmh@aybabtu.com>
7233 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7234 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7235 `commands/reboot.c'.
7236 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7237 (halt_mod_SOURCES): Likewise.
7238 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7239 (halt_mod_SOURCES): Likewise.
7241 2008-02-17 Christian Franke <franke@computer.org>
7243 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7245 2008-02-17 Robert Millan <rmh@aybabtu.com>
7247 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7248 set `first_start' to 0 for non-PC/MSDOS partition maps.
7250 2008-02-16 Robert Millan <rmh@aybabtu.com>
7252 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7253 do not assume partition map is PC/MSDOS before performing checks that
7254 are specific to that layout.
7256 2008-02-13 Robert Millan <rmh@aybabtu.com>
7258 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7259 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7260 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7262 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7264 * configure.ac: Only a cosmetic change on the handling of
7265 -fno-stack-protector.
7267 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
7269 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7270 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7272 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7273 (halt_mod_SOURCES): New variable.
7274 (halt_mod_CFLAGS): Likewise.
7275 (halt_mod_LDFLAGS): Likewise.
7276 (reboot_mod_SOURCES): Likewise.
7277 (reboot_mod_CFLAGS): Likewise.
7278 (reboot_mod_LDFLAGS): Likewise.
7280 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7281 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7283 (halt_mod_SOURCES): Likewise.
7284 (reboot_mod_SOURCES): Likewise.
7286 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7287 commands/i386/pc/reboot.c by commands/reboot.c.
7288 (reboot_mod_SOURCES): Likewise.
7290 * commands/i386/pc/reboot.c: merge this file ...
7292 * commands/ieee1275/reboot.c: ... and this file ...
7294 * commands/reboot.c: ... to this file.
7295 Add some precompiler directive to include the correct header for
7298 * commands/ieee1275/halt.c: move this file ...
7300 * commands/halt.c: ... to here.
7301 Add some precompiler directive to include the correct header for
7304 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7305 (grub_halt): Likewise.
7307 * kern/efi/efi.c (grub_reboot): New function.
7308 (grub_halt): Likewise.
7310 2008-02-12 Robert Millan <rmh@aybabtu.com>
7312 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7313 /dev (like it is done for /dev/mapper). This doesn't provide support
7314 for EVMS, but at least it is now easy to identify the problem when it
7317 2008-02-11 Robert Millan <rmh@aybabtu.com>
7319 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7320 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7321 comparing it with -1, not 0.
7323 2008-02-10 Robert Millan <rmh@aybabtu.com>
7325 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7327 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7328 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7330 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7331 `disk/lvm.c' to the end of the list.
7332 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7333 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7335 2008-02-10 Robert Millan <rmh@aybabtu.com>
7337 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7338 grub_print_error() instead. This will let user know why we're entering
7340 Based on suggestions from Sam Morris.
7342 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
7344 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7345 on remaining N args, instead of "--" arg N times.
7347 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7349 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7350 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7351 pattern for unknown glyphs.
7353 2008-02-09 Robert Millan <rmh@aybabtu.com>
7355 * configure.ac: Probe for `help2man'.
7356 * Makefile.in (builddir): New variable.
7357 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7358 or otherwise add a few flags/options to it.
7359 (install-local): For every executable utility or script that is
7360 installed, invoke $(HELP2MAN) to install a manpage based on --help
7363 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7364 that it doesn't prevent --help from working in build tree.
7366 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7367 with `bug-grub@gnu.org'.
7368 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7369 * util/update-grub.in (usage): New function.
7370 Implement proper argument check, with support for --help and --version
7371 (as well as existing -y).
7373 2008-02-09 Christian Franke <franke@computer.org>
7375 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7376 avoid overwriting previous output.
7377 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7379 2008-02-09 Robert Millan <rmh@aybabtu.com>
7381 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7384 2008-02-09 Robert Millan <rmh@aybabtu.com>
7386 * commands/sleep.c: New file.
7387 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7388 (sleep_mod_SOURCES): New variable.
7389 (sleep_mod_CFLAGS): Likewise.
7390 (sleep_mod_LDFLAGS): Likewise.
7392 2008-02-09 Robert Millan <rmh@aybabtu.com>
7394 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7395 situations in which we can deduce the RAID size and the superblock
7398 2008-02-09 Robert Millan <rmh@aybabtu.com>
7400 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7401 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7402 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7404 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7405 and return a grub_diskmemberlist_t composed of physical array members.
7406 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7408 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7410 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7411 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7412 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7414 * util/grub-probe.c (probe): Move partmap probing code from here ...
7415 (probe_partmap): ... to here.
7416 (probe): Use probe_partmap() once for the disk we're probing, and
7417 additionally, when such disk contains a memberlist() struct member,
7418 once for each disk that is contained in the structure returned by
7421 2008-02-09 Robert Millan <rmh@aybabtu.com>
7423 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7424 environment variable to 'all' in order to obtain debug output from
7426 * util/i386/pc/grub-setup.c (main): Likewise.
7428 2008-02-08 Robert Millan <rmh@aybabtu.com>
7430 * disk/raid.c (grub_raid_scan_device): Check for
7431 `array->device[sb.this_disk.number]' rather than for
7432 `array->device[sb.this_disk.number]->name', since the latter is not
7433 guaranteed to be accessible.
7435 2008-02-08 Robert Millan <rmh@aybabtu.com>
7437 * disk/raid.c: Update copyright.
7438 * fs/cpio.c: Likewise.
7439 * include/grub/raid.h: Likewise.
7440 * loader/i386/pc/multiboot.c: Likewise.
7441 * util/hostfs.c: Likewise.
7443 2008-02-08 Robert Millan <rmh@aybabtu.com>
7445 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7446 to a grub_disk_t array.
7447 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7449 (grub_raid_scan_device): Replace `device[x].name' accesses with
7450 `device[x]->name'. Simplify initialization of `array->device[x]'.
7452 2008-02-08 Robert Millan <rmh@aybabtu.com>
7454 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7455 grub_dprintf() calls.
7456 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7459 2008-02-07 Christian Franke <franke@computer.org>
7461 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7462 instead of fseek and ftell to support large files.
7463 (grub_hostfs_read): Likewise.
7465 2008-02-07 Robert Millan <rmh@aybabtu.com>
7467 Patch from Jeroen Dekkers.
7468 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7469 failure, since successfully reading all array members might not be
7472 2008-02-06 Robert Millan <rmh@aybabtu.com>
7474 * util/grub-probe.c (probe): Simplify partmap probing (with the
7475 assumption that the first word up to the underscore equals to
7478 2008-02-06 Christian Franke <franke@computer.org>
7480 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7481 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7482 last block of a cpio or tar stream.
7483 Check for "TRAILER!!!" instead of any empty data
7484 block to detect last block of a cpio stream.
7485 (grub_cpio_dir): Fix constness of variable np.
7486 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7487 cpio or tar trailer is detected. This fixes a crash
7488 on open of a non existing file.
7490 2008-02-05 Bean <bean123ch@gmail.com>
7492 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7494 (grub_multiboot_load_elf64): Likewise.
7495 (grub_multiboot): Initialize mbi structure.
7497 * util/grub-fstest.c: Don't include unused header file script.h.
7499 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7501 (grub_fstest_SOURCES): Likewise.
7503 2008-02-05 Robert Millan <rmh@aybabtu.com>
7505 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7506 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7507 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7508 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7510 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7511 (translation_table): Replace hardcoded values with macros
7512 provided by `<grub/term.h>'.
7514 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7515 (keyboard_map): Correct/add a few values, with macros provided
7517 (keyboard_map_shift): Zero values that don't differ from their
7518 `keyboard_map' equivalents.
7519 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7520 Discard the second scan code that is always sent by Caps lock.
7521 Only use `keyboard_map_shift' when it provides a non-zero value,
7522 otherwise fallback to `keyboard_map'.
7524 2008-02-04 Bean <bean123ch@gmail.com>
7526 * Makefile.in (enable_grub_fstest): New variable.
7528 * conf/common.rmk (grub_fstest_init.lst): New rule.
7529 (grub_fstest_init.h): Likewise.
7530 (grub_fstest_init.c): Likewise.
7531 (util/grub-fstest.c_DEPENDENCIES): New variable.
7532 (grub_fstest_SOURCES): Likewise.
7534 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7536 * util/grub-fstest.c: New file.
7538 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7540 Make grub-setup handle a separate root device.
7542 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7543 so that the root device can be compared with the destination
7545 When embedding the core image, if the root and destination devices
7546 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7548 When not embedding, set ROOT_DRIVE to 0xFF.
7550 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7552 Add support for having a grub directory in a different drive. This
7553 is still only the data handling part.
7555 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7556 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7557 (grub_root_drive): New variable.
7559 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7560 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7561 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7564 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7566 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7568 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7570 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7571 is bogus, because PXE booting does not specify any drive
7574 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7575 am not sure if this is really correct.
7577 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7578 is always identical to the boot drive when booting from a CD.
7580 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7582 (root_drive): New variable.
7583 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7584 (setup_sectors): Push %dx right after popping it, because %dh will
7586 (copy_buffer): Restore %dx.
7588 2008-02-03 Robert Millan <rmh@aybabtu.com>
7590 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7591 use `cdboot.img' for cdrom images.
7593 2008-02-03 Robert Millan <rmh@aybabtu.com>
7595 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7596 only setup gfxterm when `font' command has succeeded.
7598 2008-02-03 Robert Millan <rmh@aybabtu.com>
7600 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7601 (grub_rescue_cmd_multiboot_loader)
7602 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7604 2008-02-03 Pavel Roskin <proski@gnu.org>
7606 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7607 %edx and %esi from stack only after grub_gate_a20() is called.
7608 grub_gate_a20() clobbers %edx.
7610 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7612 * configure.ac (AC_INIT): Bumped to 1.96.
7614 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7615 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7616 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7617 video/readers/png.c.
7619 2008-02-03 Bean <bean123ch@gmail.com>
7621 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7622 (cdboot_img_SOURCES): New variable.
7623 (cdboot_img_ASFLAGS): New variable.
7624 (cdboot_img_LDFLAGS): New variable.
7626 * boot/i386/pc/cdboot.S: New file.
7628 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7629 (cd_count): Likewise.
7630 (grub_biosdisk_get_drive): Add support for cd device.
7631 (grub_biosdisk_call_hook): Likewise.
7632 (grub_biosdisk_iterate): Likewise.
7633 (grub_biosdisk_open): Likewise.
7634 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7635 (grub_biosdisk_rw): Support reading from cd device.
7636 (GRUB_MOD_INIT): Iterate cd devices.
7638 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7639 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7640 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7642 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7644 2008-02-02 Robert Millan <rmh@aybabtu.com>
7646 * commands/read.c: New file.
7647 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7648 (read_mod_SOURCES): New variable.
7649 (read_mod_CFLAGS): Likewise.
7650 (read_mod_LDFLAGS): Likewise.
7652 2008-02-02 Robert Millan <rmh@aybabtu.com>
7654 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7655 determining whether menu has to be displayed.
7657 2008-02-02 Marco Gerards <marco@gnu.org>
7659 * bus/pci.c: New file.
7661 * include/grub/pci.h: Likewise.
7663 * include/grub/i386/pc/pci.h: Likewise.
7665 * commands/lspci.c: Likewise.
7667 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7669 (pci_mod_SOURCES): New variable.
7670 (pci_mod_CFLAGS): Likewise.
7671 (pci_mod_LDFLAGS): Likewise.
7672 (lspci_mod_SOURCES): Likewise.
7673 (lspci_mod_CFLAGS): Likewise.
7674 (lspci_mod_LDFLAGS): Likewise.
7676 2008-02-02 Bean <bean123ch@gmail.com>
7678 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7679 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7681 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7682 (grub_xfs_btree_node): New structure.
7683 (grub_xfs_btree_root): New structure.
7684 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7685 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7686 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7687 (GRUB_XFS_EXTENT_SIZE): Likewise.
7688 (grub_xfs_read_block): Support btree format type.
7689 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7690 Use directory block as basic unit.
7692 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7694 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7695 __attribute__ ((__regparm__ (1))).
7697 2008-02-01 Robert Millan <rmh@aybabtu.com>
7699 Correct a mistake in previous commit.
7701 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7703 (normal/command.c_DEPENDENCIES): New variable.
7705 2008-02-01 Robert Millan <rmh@aybabtu.com>
7707 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7709 (normal/command.c_DEPENDENCIES): New variable.
7710 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7711 * conf/i386-ieee1275.rmk: Likewise.
7712 * conf/i386-linuxbios.rmk: Likewise.
7713 * conf/i386-pc.rmk: Likewise.
7714 * conf/sparc64-ieee1275.rmk: Likewise.
7715 * conf/powerpc-ieee1275.rmk: Likewise.
7716 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7718 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7720 2008-02-01 Robert Millan <rmh@aybabtu.com>
7722 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7723 call at beginning of function.
7725 2008-01-31 Pavel Roskin <proski@gnu.org>
7727 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7728 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7729 (grub_mkrescue_SOURCES): Likewise.
7730 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7732 2008-01-30 Robert Millan <rmh@aybabtu.com>
7734 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7735 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7736 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7737 (grub_probe_SOURCES): ... to here.
7739 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7740 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7741 * conf/i386-ieee1275.rmk: Likewise.
7742 * conf/i386-linuxbios.rmk: Likewise.
7743 * conf/powerpc-ieee1275.rmk: Likewise.
7745 2008-01-30 Tristan Gingold <gingold@free.fr>
7747 * kern/rescue.c: Silently accept empty lines.
7749 2008-01-29 Bean <bean123ch@gmail.com>
7751 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7752 (real_code_2): Code cleanup and change comment style.
7753 (move_memory): Avoid using 32-bit address mode.
7755 2008-01-29 Bean <bean123ch@gmail.com>
7757 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7758 (png_mod_SOURCES): New variable.
7759 (png_mod_CFLAGS): Likewise.
7760 (png_mod_LDFLAGS): Likewise.
7762 * video/readers/png.c: New file.
7764 2008-01-28 Robert Millan <rmh@aybabtu.com>
7766 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7767 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7768 `ifndef GRUB_MOD_GAP' hack.
7769 * util/elf/grub-mkimage.c (add_segments): Likewise.
7771 2008-01-27 Robert Millan <rmh@aybabtu.com>
7773 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7774 `GRUB_MOD_GAP' for platforms in which it's not defined.
7775 * util/elf/grub-mkimage.c (add_segments): Likewise.
7777 2008-01-27 Robert Millan <rmh@aybabtu.com>
7779 Get grub-emu to build again (including parallel builds).
7781 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7783 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7784 (normal/execute.c_DEPENDENCIES): ... this, ...
7785 (grub-emu_DEPENDENCIES): ... and this.
7787 * conf/i386-efi.rmk: Likewise.
7788 * conf/i386-linuxbios.rmk: Likewise.
7789 * conf/i386-ieee1275.rmk: Likewise.
7790 * conf/powerpc-ieee1275.rmk: Likewise.
7791 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7793 2008-01-27 Robert Millan <rmh@aybabtu.com>
7795 * NEWS: Add a few items.
7797 2008-01-27 Robert Millan <rmh@aybabtu.com>
7799 Fix parallel builds with grub-emu. Based on earlier commit for
7800 grub-probe and grub-setup.
7802 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7803 (util/grub-emu.c_DEPENDENCIES): ... this.
7804 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7805 (util/grub-emu.c_DEPENDENCIES): ... this.
7806 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7807 (util/grub-emu.c_DEPENDENCIES): ... this.
7808 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7809 (util/grub-emu.c_DEPENDENCIES): ... this.
7810 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7811 (util/grub-emu.c_DEPENDENCIES): ... this.
7813 2008-01-27 Pavel Roskin <proski@gnu.org>
7815 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7816 to create a gap between _end and the modules added to the image
7817 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7818 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7819 * util/elf/grub-mkimage.c (add_segments): Likewise.
7821 2008-01-26 Pavel Roskin <proski@gnu.org>
7823 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7824 just return an error.
7826 2008-01-26 Bean <bean123ch@gmail.com>
7828 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7829 (grub_reiserfs_get_item): Save offset of the next item.
7830 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7832 2008-01-25 Robert Millan <rmh@aybabtu.com>
7834 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7835 make all filesystem sources appear together (possibly fixing omissions
7837 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7838 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7839 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7840 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7842 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7844 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7845 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7846 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7847 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7849 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7850 (probe): Add a sanity check to make sure of our ability to read
7851 requested files when probing for filesystem type.
7853 * genmk.rb: Update copyright year (2007).
7855 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7856 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7857 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7858 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7859 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7860 : Remove function prototypes.
7862 2008-01-25 Robert Millan <rmh@aybabtu.com>
7864 Revert my previous commits (based on wrong assumption of how grub_errno
7867 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7868 * kern/file.c (grub_file_open): Likewise.
7870 2008-01-24 Pavel Roskin <proski@gnu.org>
7872 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7873 that hang if GRUB tries to setup colors.
7874 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7875 colors for firmwares that don't support it.
7876 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7877 Recognize Open Hack'Ware, set flags to work around its
7880 2008-01-24 Robert Millan <rmh@aybabtu.com>
7882 * kern/file.c (grub_file_open): Do not account previous failures of
7883 unrelated functions when grub_errno is checked for.
7884 Reported by Oleg Strikov.
7886 2008-01-24 Bean <bean123ch@gmail.com>
7888 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7889 (grub_ufs_sblock): New member volume name.
7890 (grub_ufs_find_file): Fix string copy bug.
7891 (grub_ufs_label): Implement this function properly.
7893 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7894 (grub_hfs_iterate_records): Use the correct file number for extents
7895 and catalog file. Fix problem in next index calculation.
7896 (grub_hfs_find_node): Replace recursive function call with loop.
7897 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7899 2008-01-23 Robert Millan <rmh@aybabtu.com>
7901 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7902 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7903 (grub_multiboot2_real_boot): New function prototype.
7905 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7906 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7908 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7909 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7911 2008-01-23 Robert Millan <rmh@aybabtu.com>
7913 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7914 #ifdef'ed out grub_printf().
7916 2008-01-23 Robert Millan <rmh@aybabtu.com>
7918 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7919 grub_dprintf calls, since they make "debug=all" mode unusable.
7920 (grub_console_checkkey): Likewise.
7922 2008-01-23 Robert Millan <rmh@aybabtu.com>
7924 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7925 `term/i386/pc/at_keyboard.c'.
7926 (pkglib_MODULES): Add `serial.mod'.
7927 (serial_mod_SOURCES): New variable.
7928 (serial_mod_CFLAGS): Likewise.
7929 (serial_mod_LDFLAGS): Likewise.
7931 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7932 `<grub/powerpc/ieee1275/console.h>'.
7933 (grub_keyboard_controller_init): New function prototype.
7934 (grub_console_checkkey): Likewise.
7935 (grub_console_getkey): Likewise.
7937 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7940 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7941 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7943 2008-01-23 Robert Millan <rmh@aybabtu.com>
7945 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7946 present, "(memdisk)/boot/grub" becomes the default prefix.
7948 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7949 a memdisk tarball with all the modules. Add --overlay=DIR option that
7950 allows users to overlay additional files into the image.
7952 2008-01-23 Robert Millan <rmh@aybabtu.com>
7954 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7955 and `machine/memory.h'.
7956 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7957 (_multiboot_mod_SOURCES): New variable.
7958 (_multiboot_mod_CFLAGS): Likewise.
7959 (_multiboot_mod_LDFLAGS): Likewise.
7960 (multiboot_mod_SOURCES): Likewise.
7961 (multiboot_mod_CFLAGS): Likewise.
7962 (multiboot_mod_LDFLAGS): Likewise.
7964 * include/grub/i386/ieee1275/loader.h: New file.
7966 * include/grub/i386/ieee1275/machine.h: Likewise.
7968 * include/grub/i386/ieee1275/memory.h: Likewise.
7970 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7971 variable declaration.
7972 (grub_os_area_size): Likewise.
7974 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7975 (grub_lower_mem, grub_upper_mem): New variables.
7976 (grub_stop_floppy): New function (just to make
7977 grub_multiboot2_real_boot() happy).
7979 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7980 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7981 (grub_stop): New function.
7982 Include `"../realmode.S"' and `"../loader.S"'.
7984 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7985 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7987 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7988 rely on grub_multiboot2_real_boot() for final boot.
7990 2008-01-22 Robert Millan <rmh@aybabtu.com>
7992 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7993 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7994 device that doesn't look like an SD card.
7995 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7996 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7997 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7998 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8001 2008-01-22 Robert Millan <rmh@aybabtu.com>
8003 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8004 avoid claiming over our own code.
8006 2008-01-22 Bean <bean123ch@gmail.com>
8008 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8009 (jpeg_mod_SOURCES): New variable.
8010 (jpeg_mod_CFLAGS): Likewise.
8011 (jpeg_mod_LDFLAGS): Likewise.
8013 * video/readers/jpeg.c : New file.
8015 2008-01-22 Bean <bean123ch@gmail.com>
8017 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8018 there are no more items.
8020 2008-01-21 Robert Millan <rmh@aybabtu.com>
8022 * kern/mm.c (grub_mm_init_region): Improve debug message.
8024 2008-01-21 Robert Millan <rmh@aybabtu.com>
8026 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8027 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8029 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8031 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8032 Indicates start of upper memory.
8033 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8034 (generate_image): Abort when image size is big enough to corrupt
8037 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8038 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8039 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8040 instead of hardcoding 0xA0000.
8041 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8042 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8043 instead of hardcoding 0xA0000.
8045 2008-01-21 Robert Millan <rmh@aybabtu.com>
8047 * disk/memdisk.c (memdisk_size): New variable.
8048 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8050 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8051 image to dynamic memory.
8052 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8053 `memdisk_size'. Free memdisk block.
8055 2008-01-21 Robert Millan <rmh@aybabtu.com>
8057 Fix detection of very small filesystems (like tar).
8059 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8060 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8061 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8062 a problem with this disk).
8064 2008-01-21 Robert Millan <rmh@aybabtu.com>
8066 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8067 on grub_biosdisk_rw_standard() error.
8069 2008-01-21 Robert Millan <rmh@aybabtu.com>
8071 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8073 * kern/elf.c: Likewise.
8074 * kern/ieee1275/ieee1275.c: Likewise.
8075 * kern/powerpc/ieee1275/openfw.c: Likewise.
8076 * term/ieee1275/ofconsole.c: Likewise.
8078 2008-01-21 Robert Millan <rmh@aybabtu.com>
8080 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8082 * include/grub/kernel.h (grub_arch_memdisk_addr)
8083 (grub_arch_memdisk_size): Moved from here ...
8085 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8086 (grub_arch_memdisk_size): ... to here.
8088 2008-01-21 Robert Millan <rmh@aybabtu.com>
8090 Mostly based on bugfix from Bean.
8092 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8093 attribute with hook() parameter.
8094 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8096 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8097 attribute with hook() parameter.
8098 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8101 2008-01-21 Robert Millan <rmh@aybabtu.com>
8103 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8104 (pkglib_MODULES): Add `memdisk.mod'.
8105 (memdisk_mod_SOURCES): New variable.
8106 (memdisk_mod_CFLAGS): Likewise.
8107 (memdisk_mod_LDFLAGS): Likewise.
8109 * disk/memdisk.c: New file.
8111 * include/grub/disk.h (grub_disk_dev_id): Add
8112 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8114 * include/grub/i386/pc/kernel.h
8115 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8116 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8117 (grub_kernel_image_size): New variable declaration.
8118 (grub_total_module_size): Likewise.
8119 (grub_memdisk_image_size): Likewise.
8121 * include/grub/i386/pc/memory.h
8122 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8124 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8125 (grub_arch_memdisk_addr): New variable declaration.
8126 (grub_arch_memdisk_size): Likewise.
8128 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8129 (grub_arch_memdisk_size): Likewise.
8131 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8132 (codestart): Replace hardcoded `0x100000' with
8133 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8135 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8136 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8137 not NULL, append the contents of the file it refers to, at the end of
8138 the compressed kernel image. Initialize `grub_memdisk_image_size'
8139 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8140 (options): Add "memdisk"|'m' option.
8141 (main): Parse --memdisk|-m option, and pass user-provided path as
8142 parameter to generate_image().
8144 2008-01-20 Robert Millan <rmh@aybabtu.com>
8146 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8147 grub_dprintf() calls from here ...
8148 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8150 2008-01-20 Robert Millan <rmh@aybabtu.com>
8152 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8154 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8156 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8157 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8158 `GRUB_IEEE1275_FLAG_REAL_MODE'.
8159 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8161 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8162 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8164 2008-01-19 Robert Millan <rmh@aybabtu.com>
8166 Get rid of confusing function (superseded by
8167 `grub_ieee1275_get_integer_property')
8168 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8170 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8172 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8173 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8174 in native endianness from grub_ieee1275_get_integer_property().
8176 2008-01-19 Robert Millan <rmh@aybabtu.com>
8178 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8179 command after "shut-down", since implementations differ on which
8180 the command for halt is.
8182 2008-01-19 Robert Millan <rmh@aybabtu.com>
8184 * include/grub/i386/linuxbios/console.h: Add header protection.
8185 (grub_keyboard_controller_init): New function prototype.
8186 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8187 (KEYBOARD_COMMAND_READ): Likewise.
8188 (KEYBOARD_COMMAND_WRITE): Likewise.
8189 (KEYBOARD_SCANCODE_SET1): Likewise.
8190 (grub_keyboard_controller_write): New function.
8191 (grub_keyboard_controller_read): Likewise.
8192 (grub_keyboard_controller_init): Likewise.
8194 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8195 (grub_console_init): On coreboot/LinuxBIOS, call
8196 grub_keyboard_controller_init().
8198 2008-01-19 Robert Millan <rmh@aybabtu.com>
8200 PowerPC changes provided by Pavel Roskin.
8202 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8203 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8204 don't rely on cmain() doing it.
8205 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8206 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8208 2008-01-16 Robert Millan <rmh@aybabtu.com>
8210 * include/grub/i386/linuxbios/memory.h
8211 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8212 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8213 receive `table_header' as argument. Instead, probe for it in the
8214 known memory ranges where it can be present.
8215 (grub_available_iterate): Do not pass a fixed `table_header' address
8216 to grub_linuxbios_table_iterate().
8218 2008-01-15 Robert Millan <rmh@aybabtu.com>
8220 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8221 * conf/i386-ieee1275.rmk: New file.
8222 * include/grub/i386/ieee1275/console.h: Likewise.
8223 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8224 * include/grub/i386/ieee1275/kernel.h: Likewise.
8225 * include/grub/i386/ieee1275/time.h: Likewise.
8226 * kern/i386/ieee1275/init.c: Likewise.
8227 * kern/i386/ieee1275/startup.S: Likewise.
8229 2008-01-15 Robert Millan <rmh@aybabtu.com>
8231 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8232 when pointers are 32-bit (but still do set it to one when they are
8235 2008-01-15 Robert Millan <rmh@aybabtu.com>
8237 * include/grub/ieee1275/ieee1275.h
8238 (grub_ieee1275_get_integer_property): New function prototype.
8240 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8241 (grub_ieee1275_get_integer_property): New function. Wraps around
8242 grub_ieee1275_get_property() to handle endianness.
8244 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8245 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8247 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8248 (grub_map): Likewise.
8249 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8251 2008-01-15 Bean <bean123ch@gmail.com>
8253 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8254 (grub_script_execute_cmdline): Reset grub_errno.
8256 * normal/main.c (read_config_file): Reset grub_errno.
8258 * normal/parse.y (script_init): New.
8259 (script): Move function and menuentry here.
8261 (command): Add delimiter at the end of command.
8262 (commands): Adjust to match the new command.
8263 (commandblock): Remove grub_script_lexer_record_start.
8264 (menuentry): Add grub_script_lexer_record_start, use the new commands.
8265 (if): Use the new commands.
8267 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8269 2008-01-15 Robert Millan <rmh@aybabtu.com>
8271 * normal/menu.c (run_menu): Move timeout message from here ...
8272 (print_timeout): ... to here.
8273 (run_menu): Use print_timeout() once during initial draw to print
8274 the whole message, and again in every clock tick to update only
8275 the number of seconds.
8277 2008-01-15 Robert Millan <rmh@aybabtu.com>
8279 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8280 actual size of `available' from grub_ieee1275_get_property(), and
8281 restrict parsing to that bound.
8283 2008-01-15 Christian Franke <franke@computer.org>
8285 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8286 (argp_program_version): Remove variable.
8287 (argp_program_bug_address): Likewise.
8288 (options): Convert from struct argp_option to struct option.
8289 (struct arguments): Remove.
8290 (parse_opt): Remove.
8291 (usage): New function.
8292 (main): Replace struct args members by simple variables.
8293 Replace argp_parse() by getopt_long().
8294 Add switch to evaluate options.
8295 Add missing "(...)" around root_dev in prefix string.
8297 2008-01-14 Robert Millan <rmh@aybabtu.com>
8299 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8300 for grub_ieee1275_exit(), in order to improve portability.
8302 2008-01-14 Robert Millan <rmh@aybabtu.com>
8304 * util/grub.d/10_linux.in (prefix): Define.
8305 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8307 2008-01-13 Pavel Roskin <proski@gnu.org>
8309 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8310 grub_errno if no errors have been detected.
8312 2008-01-12 Robert Millan <rmh@aybabtu.com>
8314 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8315 (grub_util_get_dev_abstraction): New function prototype.
8317 * util/getroot.c: Include `<grub/util/getroot.h>'
8318 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8319 (grub_util_get_dev_abstraction): ... here (new function).
8321 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8322 `PRINT_ABSTRACTION'.
8323 (probe): Probe for abstraction type when requested.
8324 (main): Understand `--target=abstraction'.
8326 * util/i386/efi/grub-install.in: Add abstraction module to core
8327 image when it is found to be necessary.
8328 * util/i386/pc/grub-install.in: Likewise.
8329 * util/powerpc/ieee1275/grub-install.in: Likewise.
8331 * util/update-grub_lib.in (font_path): Return system path without
8332 converting to GRUB path.
8333 * util/update-grub.in: Convert system path returned by font_path()
8334 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8335 abstraction module is needed for loading fonts (if any). Export
8336 that as `GRUB_PRELOAD_MODULES'.
8337 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8340 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8342 Remove some unused code from reiserfs.
8344 * fs/reiserfs.c (struct grub_reiserfs_key)
8345 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8346 (struct grub_reiserfs_node_body): Removed.
8347 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8349 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8351 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8353 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8355 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8357 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8359 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8360 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8361 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8363 2008-01-10 Robert Millan <rmh@aybabtu.com>
8365 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8366 Determines if a file is garbage left by packaging systems, etc.
8367 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8368 for processing /etc/grub.d scripts.
8369 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8370 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8371 as a condition for processing Linux images.
8373 2008-01-10 Pavel Roskin <proski@gnu.org>
8375 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8376 to compile reiserfs.c on PowerPC.
8378 2008-01-10 Robert Millan <rmh@aybabtu.com>
8380 * kern/device.c (grub_device_iterate): Do not abort device iteration
8381 when one of the devices cannot be opened.
8382 * kern/disk.c (grub_disk_open): Do not account previous failures of
8383 unrelated functions when grub_errno is checked for.
8385 2008-01-08 Robert Millan <rmh@aybabtu.com>
8387 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8388 `! grub_linux_is_bzimage', change order of address comparison to make
8389 it more intuitive, and improve "too big zImage" error message.
8391 2008-01-08 Robert Millan <rmh@aybabtu.com>
8393 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8394 `$(update-grub_DATA)'.
8395 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8398 2008-01-07 Robert Millan <rmh@aybabtu.com>
8400 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8401 which instruction is modified by grub-setup during installation
8402 (since it wasn't obvious by only looking at this file).
8404 2008-01-07 Robert Millan <rmh@aybabtu.com>
8406 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8407 listing actual TODO items.
8409 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8411 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8413 (grub_reiserfs_get_key_offset): Likewise.
8414 (grub_reiserfs_set_key_offset): Likewise.
8415 (grub_reiserfs_set_key_type): Likewise.
8416 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8418 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8419 better to remove the bitfield version completely.
8421 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8423 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8424 allocated from the heap, due to the fshelp implementation.
8425 (grub_reiserfs_dir): Free NODE, due to the same reason.
8427 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8429 Mostly from Vincent Pelletier:
8431 * fs/reiserfs.c: New file.
8433 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8434 (reiserfs_mod_SOURCES): New variable.
8435 (reiserfs_mod_CFLAGS): Likewise.
8436 (reiserfs_mod_LDFLAGS): Likewise.
8438 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8439 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8440 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8443 2008-01-06 Robert Millan <rmh@aybabtu.com>
8445 * normal/color.c: Remove `<grub/env.h>'.
8447 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8449 * include/grub/normal.h: Include <grub/env.h>.
8451 2008-01-05 Robert Millan <rmh@aybabtu.com>
8453 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8454 usage example with `(hd0,1)'.
8455 Reported by Samuel Thibault.
8457 2008-01-05 Robert Millan <rmh@aybabtu.com>
8459 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8460 (grub_linux_boot_zimage): Rename to ...
8461 (grub_linux_boot): ... this.
8462 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8463 (grub_linux_boot_zimage): Conditionalize zImage copy.
8465 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8466 (grub_linux_boot_bzimage): Remove prototype.
8467 (grub_linux_boot_zimage): Rename to ...
8468 (grub_linux_boot): ... this.
8470 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8471 (grub_linux_boot): Remove function.
8473 2008-01-05 Robert Millan <rmh@aybabtu.com>
8475 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8476 (grub_env_write_color_highlight): Likewise.
8477 (grub_wait_after_message): Likewise.
8479 * normal/color.c: New file.
8481 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8482 (normal_mod_DEPENDENCIES): Likewise.
8484 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8485 (normal_mod_DEPENDENCIES): Likewise.
8487 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8488 (normal_mod_DEPENDENCIES): Likewise.
8490 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8491 (normal_mod_DEPENDENCIES): Likewise.
8493 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8494 for waiting after a message is printed.
8495 * normal/main.c (read_config_file): Likewise.
8496 (grub_normal_init): Register grub_env_write_color_normal() and
8497 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8498 `color_highlight' variables as global.
8500 * normal/menu.c (grub_wait_after_message): New function.
8501 (grub_color_menu_normal): New variable. Replaces ...
8502 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8503 (grub_color_menu_highlight): New variable. Replaces ...
8504 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8505 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8506 `GRUB_TERM_COLOR_STANDARD'.
8507 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8508 `normal_code' and `highlight_code' to `old_color_normal' and
8509 `old_color_highlight', respectively.
8510 (grub_menu_init_page): Update colors when drawing the menu, based on
8511 `menu_color_normal' and `menu_color_highlight' variables.
8512 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8513 a message is printed.
8515 2008-01-05 Robert Millan <rmh@aybabtu.com>
8517 * kern/env.c (grub_env_context_open): Propagate hooks for global
8518 variables to new context.
8520 * kern/main.c (grub_set_root_dev): Export `root' variable.
8522 2008-01-05 Robert Millan <rmh@aybabtu.com>
8524 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8525 discs unconditionally, since udev and others have options to provide
8528 2008-01-05 Robert Millan <rmh@aybabtu.com>
8530 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8532 2008-01-04 Christian Franke <franke@computer.org>
8534 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8537 2008-01-03 Pavel Roskin <proski@gnu.org>
8539 * kern/i386/linuxbios/init.c: Put "void" to all function
8540 declarations with no arguments.
8541 * kern/powerpc/ieee1275/init.c: Likewise.
8542 * term/i386/pc/at_keyboard.c: Likewise.
8543 * term/i386/pc/vga_text.c: Likewise.
8544 * util/grub-mkdevicemap.c: Likewise.
8546 2008-01-02 Robert Millan <rmh@aybabtu.com>
8548 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8549 message when loaded image is out of bounds.
8550 (grub_multiboot_load_elf64): Likewise.
8552 2008-01-02 Pavel Roskin <proski@gnu.org>
8554 * util/grub.d/10_linux.in: Try version without ".old" when
8555 looking for initrd. It's better to use initrd from the newer
8556 kernel of the same version than no initrd at all.
8558 2008-01-01 Robert Millan <rmh@aybabtu.com>
8560 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8562 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8564 * include/grub/video.h: Added grub_video_unmap_color and
8565 grub_video_get_active_render_target.
8566 (grub_video_adapter): Added unmap_color and get_active_render_target.
8568 * video/video.c: Added grub_video_unmap_color and
8569 grub_video_get_active_render_target.
8570 (grub_video_get_info): Changed method to accept NULL pointer as an
8571 argument to allow detection of active video adapter.
8573 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8574 grub_video_vbe_unmap_color_int.
8575 Added grub_video_vbe_unmap_color and
8576 grub_video_vbe_get_active_render_target.
8577 (grub_video_vbe_adapter): Added unmap_color and
8578 get_active_render_target.
8580 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8581 with grub_video_vbe_unmap_color_int.
8583 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8584 (DEFAULT_NORMAL_COLOR): Likewise.
8585 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8586 (DEFAULT_FG_COLOR): Removed.
8587 (DEFAULT_BG_COLOR): Likewise.
8588 (DEFAULT_CURSOR_COLOR): Changed value.
8589 (grub_virtual_screen): Added standard_color_setting,
8590 normal_color_setting, highlight_color_setting and term_color.
8591 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8592 (bitmap_width): Added.
8593 (bitmap_height): Likewise.
8595 (set_term_color): Likewise.
8596 (grub_virtual_screen_setup): Changed to use new terminal coloring
8598 (grub_gfxterm_init): Added init for bitmap.
8599 (grub_gfxterm_fini): Added destroy for bitmap.
8600 (redraw_screen_rect): Updated to use background bitmap and new
8602 (scroll_up): Added optimization for case when there is no bitmap.
8603 (grub_gfxterm_cls): Fixed to use correct background color.
8604 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8606 (grub_virtual_screen_setcolor): Likewise.
8607 (grub_virtual_screen_getcolor): Added.
8608 (grub_gfxterm_background_image_cmd): Likewise.
8609 (grub_video_term): Added setcolor and getcolor.
8610 (MOD_INIT): Added registration of background_image command.
8611 (MOD_TERM): Added unregistration for background_image command.
8613 2007-12-30 Pavel Roskin <proski@gnu.org>
8615 * loader/multiboot_loader.c: Fix multiboot command
8616 unregistration. Fix all typos in the word "multiboot".
8618 2007-12-29 Pavel Roskin <proski@gnu.org>
8620 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8621 support for initrd names used in Fedora.
8623 2007-12-26 Bean <bean123ch@gmail.com>
8625 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8626 (cpio_mod_SOURCES): New variable.
8627 (cpio_mod_CFLAGS): Likewise.
8628 (cpio_mod_LDFLAGS): Likewise.
8630 * fs/cpio.c: New file.
8632 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8634 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8636 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8638 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8640 2007-12-25 Robert Millan <rmh@aybabtu.com>
8642 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8643 (grub_getcolor): New function.
8645 * kern/term.c (grub_getcolor): New function.
8646 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8647 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8648 (print_entry): Set normal and highlight colors to
8649 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8650 respectively, before printing and restore them to old
8652 (grub_menu_init_page): Likewise. Fill an additional colored space
8653 that would otherwise be left blank.
8655 * term/efi/console.c (grub_console_getcolor): New function.
8656 (struct grub_console_term.getcolor): New variable.
8657 * term/i386/pc/console.c (grub_console_getcolor): New function.
8658 (struct grub_console_term.getcolor): New variable.
8659 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8660 (struct grub_console_term.getcolor): New variable.
8662 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8663 (struct grub_console_term.setcolor): Remove variable.
8664 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8665 (struct grub_console_term.setcolor): Remove variable.
8666 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8667 (struct grub_console_term.setcolor): Remove variable.
8668 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8669 (struct grub_console_term.setcolor): Remove variable.
8671 2007-12-25 Robert Millan <rmh@aybabtu.com>
8673 * configure.ac: Search for possible unifont.hex locations, and
8674 define UNIFONT_HEX if found.
8676 * Makefile.in (UNIFONT_HEX): Define variable.
8677 (DATA): Rename to ...
8678 (PKGLIB): ... this. Update all users.
8679 (PKGDATA): New variable.
8680 (pkgdata_IMAGES): Rename to ...
8681 (pkglib_IMAGES): ... this. Update all users.
8682 (pkgdata_MODULES): Rename to ...
8683 (pkglib_MODULES): ... this. Update all users.
8684 (pkgdata_PROGRAMS): Rename to ...
8685 (pkglib_PROGRAMS): ... this. Update all users.
8686 (pkgdata_DATA): Rename to ...
8687 (pkglib_DATA): ... this. Update all users.
8688 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8689 (unicode.pff, ascii.pff): New rules.
8690 (all-local): Add `$(PKGDATA)' dependency.
8691 (install-local): Process `$(PKGDATA)'.
8693 * util/update-grub_lib.in (font_path): Search for *.pff files in
8694 a few more locations, including `${pkgdata}'.
8696 2007-12-23 Robert Millan <rmh@aybabtu.com>
8698 Patch from Bean <bean123ch@gmail.com>:
8699 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8702 2007-12-21 Bean <bean123ch@gmail.com>
8704 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8705 (ntfscomp_mod_SOURCES): New variable.
8706 (ntfscomp_mod_CFLAGS): Likewise.
8707 (ntfscomp_mod_LDFLAGS): Likewise.
8709 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8710 (grub_probe_SOURCES): Likewise.
8711 (grub_emu_SOURCES): Likewise.
8713 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8714 (grub_emu_SOURCES): Likewise.
8716 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8717 (grub_emu_SOURCES): Likewise.
8719 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8720 (grub_emu_SOURCES): Likewise.
8722 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8723 (read_run_list): Renamed to grub_ntfs_read_run_list.
8724 (decomp_nextvcn): Moved to ntfscomp.c.
8725 (decomp_getch): Likewise.
8726 (decomp_get16): Likewise.
8727 (decomp_block): Likewise.
8728 (read_block): Likewise.
8729 (read_data): Partially moved to ntfscomp.c.
8730 (fixup): Change unsigned to grub_uint16_t.
8731 (read_mft): Change unsigned long to grub_uint32_t.
8732 (read_attr): Likewise.
8733 (read_data): Likewise.
8734 (read_run_data): Likewise.
8735 (read_run_list): Likewise.
8736 (read_mft): Likewise.
8738 * fs/ntfscomp.c: New file.
8740 * include/grub/ntfs.h: New file.
8742 2007-12-16 Robert Millan <rmh@aybabtu.com>
8744 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8745 IDE disk check, since Linux is known to support 20 IDE disks.
8746 Reported by Colin Watson.
8748 2007-12-15 Bean <bean123ch@gmail.com>
8750 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8751 (lnxboot_img_SOURCES): New variable.
8752 (lnxboot_img_ASFLAGS): Likewise.
8753 (lnxboot_img_LDFLAGS): Likewise.
8755 * boot/i386/pc/lnxboot.S: New file.
8757 2007-11-24 Pavel Roskin <proski@gnu.org>
8759 * configure.ac: Test if '--build-id=none' is supported by the
8760 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8761 objcopy to generate incorrect binary files (binutils
8762 2.17.50.0.18-1 as shipped by Fedora 8).
8763 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8764 linking, so that build ID doesn't break the test.
8766 2007-11-24 Pavel Roskin <proski@gnu.org>
8768 * include/grub/i386/time.h: use "void" in the argument list
8770 * include/grub/powerpc/time.h: Likewise.
8771 * include/grub/sparc64/time.h: Likewise.
8773 2007-11-18 Christian Franke <franke@computer.org>
8775 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8776 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8777 This fixes the problem that function keys did not work in grub-emu.
8779 2007-11-18 Christian Franke <franke@computer.org>
8781 * disk/host.c (grub_host_open): Remove attribute unused from
8782 name parameter. Add check for "host". This fixes the problem
8783 that grub-emu does not find partitions.
8785 2007-11-18 Christian Franke <franke@computer.org>
8787 * util/hostfs.c (is_dir): New function.
8788 (grub_hostfs_dir): Handle missing dirent.d_type case.
8789 (grub_hostfs_read): Add missing fseek().
8790 (grub_hostfs_label): Clear label pointer. This fixes a crash
8791 of grub-emu on "ls (host)".
8793 2007-11-18 Christian Franke <franke@computer.org>
8795 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8796 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8797 to 64 bit boundary by default.
8799 2007-11-18 Bean <bean123ch@gmail.com>
8801 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8802 (hexdump_mod_SOURCES): New variable.
8803 (hexdump_mod_CFLAGS): Likewise.
8804 (hexdump_mod_LDFLAGS): Likewise.
8806 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8808 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8810 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8812 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8814 * include/grub/hexdump.h: New file.
8816 * commands/hexdump.c: New file.
8818 2007-11-10 Robert Millan <rmh@aybabtu.com>
8820 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8821 in grub_outb() calls.
8822 (beep_on): Likewise.
8824 2007-11-10 Christian Franke <franke@computer.org>
8826 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8827 (grub_menu_run): Likewise.
8829 2007-11-10 Robert Millan <rmh@aybabtu.com>
8831 * include/grub/i386/efi/machine.h: New file.
8832 * include/grub/i386/linuxbios/machine.h: Likewise.
8833 * include/grub/i386/pc/machine.h: Likewise.
8834 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8835 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8837 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8838 (serial_hw_io_addr): New variable.
8839 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8840 instead of `(unsigned short *) 0x400'.
8842 2007-11-10 Bean <bean123ch@gmail.com>
8844 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8846 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8848 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8849 (vga_mod_SOURCES): Added.
8850 (vga_mod_CFLAGS): Likewise.
8851 (vga_mod_LDFLAGS): Likewise.
8853 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8855 (set_map_mask): Likewise.
8856 (set_read_map): Likewise.
8857 (set_read_address): Likewise.
8858 (vga_font): Removed variable.
8859 (get_vga_glyph): Removed function.
8860 (invalidate_char): Likewise.
8861 (write_char): Changed to use grub_font_get_glyph() for font
8863 (grub_vga_putchar): Likewise.
8864 (grub_vga_getcharwidth): Likewise.
8866 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8868 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8870 (pxeboot_img_LDFLAGS): Likewise.
8871 (diskboot_img_LDFLAGS): Likewise.
8872 (kernel_img_LDFLAGS): Likewise.
8874 2007-11-06 Robert Millan <rmh@aybabtu.com>
8876 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8877 in grub_outb() calls.
8878 (serial_hw_init): Likewise.
8880 2007-11-05 Robert Millan <rmh@aybabtu.com>
8882 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8883 spaces. Skip non-regular files.
8885 2007-11-05 Robert Millan <rmh@aybabtu.com>
8887 * kern/disk.c (grub_disk_firmware_fini)
8888 (grub_disk_firmware_is_tainted): New variables.
8890 * include/grub/disk.h (grub_disk_firmware_fini)
8891 (grub_disk_firmware_is_tainted): Likewise.
8893 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8894 (grub_disk_biosdisk_fini): ... to here.
8895 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8896 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8897 is set. Register grub_disk_biosdisk_fini() in
8898 `grub_disk_firmware_fini'.
8900 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8901 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8902 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8903 to finish existing firmware disk interface.
8905 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8906 (ata_mod_SOURCES): New variable.
8907 (ata_mod_CFLAGS): Likewise.
8908 (ata_mod_LDFLAGS): Likewise.
8910 2007-11-05 Robert Millan <rmh@aybabtu.com>
8912 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8913 (grub_ata_wait): Reimplement using grub_millisleep().
8915 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8916 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8918 2007-11-03 Marco Gerards <marco@gnu.org>
8920 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8921 (CRTC_ADDR_PORT): New macro.
8922 (CRTC_DATA_PORT): Likewise.
8923 (CRTC_CURSOR): Likewise.
8924 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8925 (CRTC_CURSOR_ADDR_LOW): Likewise.
8926 (update_cursor): New function.
8927 (grub_console_real_putchar): Call `update_cursor'.
8928 (grub_console_gotoxy): Likewise.
8929 (grub_console_cls): Set the default color when clearing the
8931 (grub_console_setcursor): Implemented.
8933 2007-11-03 Marco Gerards <marco@gnu.org>
8935 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8937 (grub_ata_pio_write): Likewise.
8939 (grub_atapi_identify): Wait after issuing an ATA command.
8940 (grub_atapi_packet): Likewise.
8941 (grub_ata_identify): Likewise.
8942 (grub_ata_readwrite): Likewise.
8944 2007-11-03 Marco Gerards <marco@gnu.org>
8946 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8947 (grub_ata_pio_write): Likewise.
8948 (grub_ata_readwrite): Use `grub_error', instead of
8949 returning `grub_errno'.
8951 2007-11-03 Marco Gerards <marco@gnu.org>
8953 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8954 grub_ata_pio_write once for every single sector, instead of for
8957 2007-10-31 Robert Millan <rmh@aybabtu.com>
8959 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8961 * conf/i386-linuxbios.rmk: New file.
8963 * kern/i386/pc/hardware.c: Likewise.
8964 * term/i386/pc/at_keyboard.c: Likewise.
8965 * term/i386/pc/vga_text.c: Likewise.
8967 * include/grub/i386/linuxbios/boot.h: Likewise.
8968 * include/grub/i386/linuxbios/console.h: Likewise.
8969 * include/grub/i386/linuxbios/init.h: Likewise.
8970 * include/grub/i386/linuxbios/kernel.h: Likewise.
8971 * include/grub/i386/linuxbios/loader.h: Likewise.
8972 * include/grub/i386/linuxbios/memory.h: Likewise.
8973 * include/grub/i386/linuxbios/serial.h: Likewise.
8974 * include/grub/i386/linuxbios/time.h: Likewise.
8976 * kern/i386/linuxbios/init.c: Likewise.
8977 * kern/i386/linuxbios/startup.S: Likewise.
8978 * kern/i386/linuxbios/table.c: Likewise.
8980 2007-10-31 Marco Gerards <marco@gnu.org>
8982 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8983 (ata_mod_SOURCES): New variable.
8984 (ata_mod_CFLAGS): Likewise.
8985 (ata_mod_LDFLAGS): Likewise.
8987 * disk/ata.c: New file.
8989 * include/grub/disk.h (grub_disk_dev_id): Add
8990 `GRUB_DISK_DEV_ATA_ID'.
8992 2007-10-31 Robert Millan <rmh@aybabtu.com>
8994 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8995 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8997 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8998 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9000 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9003 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9005 2007-10-27 Robert Millan <rmh@aybabtu.com>
9007 * include/grub/types.h (ULONG_MAX): Define macro.
9009 2007-10-22 Robert Millan <rmh@aybabtu.com>
9011 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9013 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9015 2007-10-22 Robert Millan <rmh@aybabtu.com>
9017 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9018 (pkgdata_MODULES): Add `biosdisk.mod'.
9019 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9022 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9023 (grub_biosdisk_init): Replace with ...
9024 (GRUB_MOD_INIT(biosdisk)): ... this.
9025 (grub_biosdisk_fini): Replace with ...
9026 (GRUB_MOD_FINI(biosdisk)): ... this.
9028 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9029 (grub_machine_init): Remove call to grub_biosdisk_init().
9030 (grub_machine_fini): Remove call to grub_machine_fini().
9032 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9034 2007-10-22 Robert Millan <rmh@aybabtu.com>
9036 * include/grub/time.h: New file.
9037 * include/grub/i386/time.h: Likewise.
9038 * include/grub/powerpc/time.h: Likewise.
9039 * include/grub/sparc64/time.h: Likewise.
9041 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9043 (KERNEL_MACHINE_TIME_HEADER): ... this.
9044 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9046 (KERNEL_MACHINE_TIME_HEADER): ... this.
9047 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9049 (KERNEL_MACHINE_TIME_HEADER): ... this.
9051 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9052 (grub_millisleep): New function.
9053 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9054 (grub_millisleep): New function.
9055 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9056 Remove `grub/machine/time.h' include.
9057 (grub_millisleep): New function.
9058 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9059 Remove `grub/machine/time.h' include.
9060 (grub_millisleep): New function.
9062 * include/grub/misc.h (grub_div_roundup): New function.
9064 * kern/misc.c: Include `<grub/time.h>'.
9065 (grub_millisleep_generic): New function.
9067 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9069 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9071 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9072 `machine/time.h'. Add `time.h'.
9073 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9075 2007-10-21 Robert Millan <rmh@aybabtu.com>
9077 * include/grub/misc.h (grub_max): New function.
9079 2007-10-21 Robert Millan <rmh@aybabtu.com>
9081 * util/misc.c (grub_util_info): Call fflush() before returning.
9083 2007-10-20 Robert Millan <rmh@aybabtu.com>
9085 * genmk.rb (Image): Copy `extra_flags' from here ...
9086 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9088 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9089 to `argc' and `args' arguments.
9091 2007-10-17 Robert Millan <rmh@aybabtu.com>
9093 * kern/i386/loader.S: New file.
9095 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9096 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9097 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9098 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9099 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9100 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9101 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9102 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9103 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9104 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9105 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9106 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9107 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9108 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9110 * kern/i386/realmode.S: New file.
9112 * kern/i386/pc/startup.S (protstack): Moved from here ...
9113 * kern/i386/realmode.S (protstack)... to here.
9114 * kern/i386/pc/startup.S (gdt): Moved from here ...
9115 * kern/i386/realmode.S (gdt)... to here.
9116 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9117 * kern/i386/realmode.S (prot_to_real)... to here.
9119 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9120 `kern/i386/realmode.S'.
9122 2007-10-17 Robert Millan <rmh@aybabtu.com>
9124 * include/grub/i386/loader.h: New file.
9126 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9127 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9128 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9129 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9130 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9131 * include/grub/i386/loader.h (grub_linux_prot_size)
9132 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9133 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9134 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9135 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9137 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9139 2007-10-15 Robert Millan <rmh@aybabtu.com>
9141 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9142 filesystem when dev->disk is unset.
9143 Do probe for filesystem even when dev->disk->has_partitions is set.
9144 In case a filesystem is found, always report it.
9145 In case it isn't, if dev->disk->has_partitions is set, report that
9146 a partition table was found instead of reporting that no filesystem
9147 could be identified.
9149 2007-10-12 Robert Millan <rmh@aybabtu.com>
9151 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9152 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9154 * include/grub/types.h (grub_host_to_target16): New macro.
9155 (grub_host_to_target32): Likewise.
9156 (grub_host_to_target64): Likewise.
9157 (grub_target_to_host16): Likewise.
9158 (grub_target_to_host32): Likewise.
9159 (grub_target_to_host64): Likewise.
9161 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9163 (GRUB_MOD_ALIGN): ...this. Update all users.
9165 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9166 grub_host_to_target32.
9167 Replace grub_be_to_cpu32 with grub_target_to_host32.
9168 (load_modules): Likewise.
9169 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9170 Replace grub_be_to_cpu32 with grub_target_to_host32.
9171 Replace grub_cpu_to_be16 with grub_host_to_target16.
9172 Replace grub_cpu_to_be32 grub_host_to_target32.
9174 2007-10-12 Robert Millan <rmh@aybabtu.com>
9176 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9177 * util/elf/grub-mkimage.c: ... here.
9179 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9180 `util/powerpc/ieee1275/grub-mkimage.c'.
9182 2007-10-07 Robert Millan <rmh@aybabtu.com>
9184 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9185 and make it easier to figure out.
9186 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9187 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9188 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9189 leave us with less than HEAP_MIN_SIZE total heap.
9190 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9192 2007-10-03 Robert Millan <rmh@aybabtu.com>
9194 * include/grub/i386/io.h: New file.
9195 * commands/i386/pc/play.c (inb): Removed.
9197 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9199 * term/i386/pc/serial.c (inb): Removed.
9201 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9203 * term/i386/pc/vga.c (inb): Removed.
9205 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9208 2007-10-02 Robert Millan <rmh@aybabtu.com>
9210 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9211 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9212 Reported by Marcin Kurek.
9214 2007-09-07 Robert Millan <rmh@aybabtu.com>
9216 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9217 SmartFirmware version updates (as released by Sven Luther), and avoid
9218 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9219 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9222 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9225 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9226 when merging two regions.
9228 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9230 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9231 * normal/completion.c (grub_normal_do_completion): Likewise.
9232 Reported by Hitoshi Ozeki.
9234 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9236 Do not use devices at boot in chainloading.
9238 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9239 (boot_part_addr): Likewise.
9240 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9241 with BOOT_DRIVE and BOOT_PART_ADDR.
9242 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9243 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9245 2007-08-29 Robert Millan <rmh@aybabtu.com>
9247 Patch from Simon Peter <dn.tlp@gmx.net>:
9248 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9249 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9250 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9251 util/i386/pc/grub-setup.c_DEPENDENCIES.
9252 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9253 util/grub-probe.c_DEPENDENCIES.
9254 * conf/powerpc-ieee1275.rmk: Likewise.
9256 2007-08-28 Robert Millan <rmh@aybabtu.com>
9258 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9259 to tell grub-mkdevicemap how to name devices.
9260 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9263 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9264 util/i386/get_disk_name.c.
9265 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9266 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9267 util/ieee1275/get_disk_name.c.
9269 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9271 * DISTLIST: Add util/i386/get_disk_name.c and
9272 util/ieee1275/get_disk_name.c.
9274 * util/grub-mkdevicemap.c: Replace device naming logic with
9275 grub_util_get_disk_name() calls.
9277 2007-08-20 Robert Millan <rmh@aybabtu.com>
9279 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9280 (so that it works for both plural and singular quantities).
9282 2007-08-05 Robert Millan <rmh@aybabtu.com>
9284 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9285 so that [xz] isn't taken into account when determining order.
9287 2007-08-02 Marco Gerards <marco@gnu.org>
9289 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9290 `include/multiboot2.h', `include/grub/elfload.h',
9291 `include/multiboot.h', `include/grub/multiboot.h',
9292 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9293 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9294 `kern/elf.c', `loader/multiboot_loader.c',
9295 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9296 `loader/i386/pc/multiboot2.c',
9297 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9298 `util/i386/pc/grub-mkrescue.in'. Remove
9299 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9300 `include/grub/i386/pc/util/biosdisk.h' and
9301 `include/grub/powerpc/ieee1275/multiboot.h'.
9303 2007-08-02 Bean <bean123ch@gmail.com>
9305 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9306 (ntfs_mod_SOURCES): New variable.
9307 (ntfs_mod_CFLAGS): Likewise.
9308 (ntfs_mod_LDFLAGS): Likewise.
9310 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9311 (grub_probe_SOURCES): Likewise.
9312 (grub_emu_SOURCES): Likewise.
9314 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9315 (grub_emu_SOURCES): Likewise.
9317 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9318 (grub_emu_SOURCES): Likewise.
9320 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9322 * fs/ntfs.c: New file.
9324 2007-08-02 Bean <bean123ch@gmail.com>
9326 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9328 * file.h (grub_file): Likewise.
9330 * fshelp.h (grub_fshelp_read_file): Likewise.
9332 * util/i386/pc/grub-setup.c (setup): Likewise.
9333 (save_first_sector): Likewise.
9334 (save_blocklists): Likewise.
9336 * fs/affs.c (grub_affs_read_file): Likewise.
9338 * fs/ext2.c (grub_ext2_read_file): Likewise.
9340 * fs/fat.c (grub_fat_read_data): Likewise.
9342 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9344 * fs/hfs.c (grub_hfs_read_file): Likewise.
9346 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9348 * fs/jfs.c (grub_jfs_read_file): Likewise.
9350 * fs/minix.c (grub_minix_read_file): Likewise.
9352 * fs/sfs.c (grub_sfs_read_file): Likewise.
9354 * fs/ufs.c (grub_ufs_read_file): Likewise.
9356 * fs/xfs.c (grub_xfs_read_file): Likewise.
9358 * command/blocklist.c (read_blocklist): Likewise.
9359 (print_blocklist): Likewise.
9361 2007-08-02 Marco Gerards <marco@gnu.org>
9363 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9366 * disk/host.c: New file.
9368 * util/hostfs.c: Likewise.
9370 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9371 return `GRUB_ERR_BAD_FS'.
9372 * fs/sfs.c (grub_sfs_mount): Likewise.
9373 * fs/xfs.c (grub_xfs_mount): Likewise.
9375 * include/grub/disk.h (enum grub_disk_dev_id): Add
9376 `GRUB_DISK_DEVICE_HOST_ID'.
9378 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9380 2007-07-24 Jerone Young <jerone@gmail.com>
9382 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9383 modules for compilation.
9384 * conf/powerpc-ieee1275.rmk: Likewise.
9386 * include/multiboot.h: Move multiboot definitions to one file. Rename
9387 many definitions to not get grub specific.
9388 * include/multiboot2.h: Create header with multiboot 2 definitions.
9389 * include/grub/multiboot.h: Header for grub specific function
9390 prototypes and definitions.
9391 * include/grub/multiboot2.h: Likewise.
9392 * include/grub/multiboot_loader.h: Likewise.
9393 * include/grub/i386/pc/multiboot.h: Removed.
9394 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9396 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9397 and 2 to allow for one multiboot and module commands.
9398 * loader/multiboot2.c: Add multiboot2 functionality.
9399 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9400 and definition names.
9401 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9403 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9404 ieee1275 specific multiboot2 code.
9406 * kern/i386/pc/startup.S: Change headers and definition names for
9407 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9409 2007-07-22 Robert Millan <rmh@aybabtu.com>
9411 * geninitheader.sh: Process file specified in first parameter rather
9412 than hardcoding grub_modules_init.lst.
9413 * geninit.sh: Likewise. Also, construct header name dynamically rather
9414 than hardcoding grub_modules_init.h.
9416 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9417 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9418 grub_probe_init.[ch] and grub_setup_init.[ch].
9420 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9421 grub_modules_init.h with grub_emu_init.h.
9422 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9423 grub_probe_init.[ch] files.
9424 * conf/i386-efi.rmk: Likewise.
9425 * conf/i386-pc.rmk: Likewise.
9426 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9427 grub_setup_init.[ch] files.
9429 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9430 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9431 to initialize modules rather than a list of hardcoded functions.
9432 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9433 grub_init_all() to initialize modules rather than a list of hardcoded
9436 2007-07-22 Robert Millan <rmh@aybabtu.com>
9438 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9439 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9441 2007-07-22 Robert Millan <rmh@aybabtu.com>
9443 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9444 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9445 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9446 flag when running on SmartFirmware.
9447 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9448 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9451 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9452 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9453 rather than decreasing it.
9455 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9456 there's not enough space to do it, fail in the same way as when it
9457 can't be done because there are no partitions.
9459 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9460 when nvsetenv failed.
9462 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9464 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9465 because this rule is automatically generated.
9466 (grub-mkrescue): Removed for the same reason as above.
9468 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9470 Migrate to GNU General Public License Version 3.
9472 * COPYING: Replaced with the plain text version of GPLv3.
9474 * config.guess: Updated from gnulib.
9475 * config.sub: Likewise.
9477 * geninit.sh: Output a GPLv3 copyright notice.
9478 * geninitheader.sh: Likewise.
9479 * genmodsrc.sh: Likewise.
9480 * gensymlist.sh.in: Likewise.
9482 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9483 * boot/i386/pc/diskboot.S: Likewise.
9484 * boot/i386/pc/pxeboot.S: Likewise.
9485 * commands/blocklist.c: Likewise.
9486 * commands/boot.c: Likewise.
9487 * commands/cat.c: Likewise.
9488 * commands/cmp.c: Likewise.
9489 * commands/configfile.c: Likewise.
9490 * commands/echo.c: Likewise.
9491 * commands/help.c: Likewise.
9492 * commands/ls.c: Likewise.
9493 * commands/search.c: Likewise.
9494 * commands/terminal.c: Likewise.
9495 * commands/test.c: Likewise.
9496 * commands/videotest.c: Likewise.
9497 * commands/i386/cpuid.c: Likewise.
9498 * commands/i386/pc/halt.c: Likewise.
9499 * commands/i386/pc/play.c: Likewise.
9500 * commands/i386/pc/reboot.c: Likewise.
9501 * commands/i386/pc/vbeinfo.c: Likewise.
9502 * commands/i386/pc/vbetest.c: Likewise.
9503 * commands/ieee1275/halt.c: Likewise.
9504 * commands/ieee1275/reboot.c: Likewise.
9505 * commands/ieee1275/suspend.c: Likewise.
9506 * disk/loopback.c: Likewise.
9507 * disk/lvm.c: Likewise.
9508 * disk/raid.c: Likewise.
9509 * disk/efi/efidisk.c: Likewise.
9510 * disk/i386/pc/biosdisk.c: Likewise.
9511 * disk/ieee1275/ofdisk.c: Likewise.
9512 * font/manager.c: Likewise.
9513 * fs/affs.c: Likewise.
9514 * fs/ext2.c: Likewise.
9515 * fs/fat.c: Likewise.
9516 * fs/fshelp.c: Likewise.
9517 * fs/hfs.c: Likewise.
9518 * fs/hfsplus.c: Likewise.
9519 * fs/iso9660.c: Likewise.
9520 * fs/jfs.c: Likewise.
9521 * fs/minix.c: Likewise.
9522 * fs/sfs.c: Likewise.
9523 * fs/ufs.c: Likewise.
9524 * fs/xfs.c: Likewise.
9525 * hello/hello.c: Likewise.
9526 * include/grub/acorn_filecore.h: Likewise.
9527 * include/grub/arg.h: Likewise.
9528 * include/grub/bitmap.h: Likewise.
9529 * include/grub/boot.h: Likewise.
9530 * include/grub/cache.h: Likewise.
9531 * include/grub/device.h: Likewise.
9532 * include/grub/disk.h: Likewise.
9533 * include/grub/dl.h: Likewise.
9534 * include/grub/elfload.h: Likewise.
9535 * include/grub/env.h: Likewise.
9536 * include/grub/err.h: Likewise.
9537 * include/grub/file.h: Likewise.
9538 * include/grub/font.h: Likewise.
9539 * include/grub/fs.h: Likewise.
9540 * include/grub/fshelp.h: Likewise.
9541 * include/grub/gzio.h: Likewise.
9542 * include/grub/hfs.h: Likewise.
9543 * include/grub/kernel.h: Likewise.
9544 * include/grub/loader.h: Likewise.
9545 * include/grub/lvm.h: Likewise.
9546 * include/grub/misc.h: Likewise.
9547 * include/grub/mm.h: Likewise.
9548 * include/grub/net.h: Likewise.
9549 * include/grub/normal.h: Likewise.
9550 * include/grub/parser.h: Likewise.
9551 * include/grub/partition.h: Likewise.
9552 * include/grub/pc_partition.h: Likewise.
9553 * include/grub/raid.h: Likewise.
9554 * include/grub/rescue.h: Likewise.
9555 * include/grub/script.h: Likewise.
9556 * include/grub/setjmp.h: Likewise.
9557 * include/grub/symbol.h: Likewise.
9558 * include/grub/term.h: Likewise.
9559 * include/grub/terminfo.h: Likewise.
9560 * include/grub/tparm.h: Likewise.
9561 * include/grub/types.h: Likewise.
9562 * include/grub/video.h: Likewise.
9563 * include/grub/efi/api.h: Likewise.
9564 * include/grub/efi/chainloader.h: Likewise.
9565 * include/grub/efi/console.h: Likewise.
9566 * include/grub/efi/console_control.h: Likewise.
9567 * include/grub/efi/disk.h: Likewise.
9568 * include/grub/efi/efi.h: Likewise.
9569 * include/grub/efi/pe32.h: Likewise.
9570 * include/grub/efi/time.h: Likewise.
9571 * include/grub/i386/linux.h: Likewise.
9572 * include/grub/i386/setjmp.h: Likewise.
9573 * include/grub/i386/types.h: Likewise.
9574 * include/grub/i386/efi/kernel.h: Likewise.
9575 * include/grub/i386/efi/loader.h: Likewise.
9576 * include/grub/i386/efi/time.h: Likewise.
9577 * include/grub/i386/pc/biosdisk.h: Likewise.
9578 * include/grub/i386/pc/boot.h: Likewise.
9579 * include/grub/i386/pc/chainloader.h: Likewise.
9580 * include/grub/i386/pc/console.h: Likewise.
9581 * include/grub/i386/pc/init.h: Likewise.
9582 * include/grub/i386/pc/kernel.h: Likewise.
9583 * include/grub/i386/pc/loader.h: Likewise.
9584 * include/grub/i386/pc/memory.h: Likewise.
9585 * include/grub/i386/pc/multiboot.h: Likewise.
9586 * include/grub/i386/pc/serial.h: Likewise.
9587 * include/grub/i386/pc/time.h: Likewise.
9588 * include/grub/i386/pc/vbe.h: Likewise.
9589 * include/grub/i386/pc/vbeblit.h: Likewise.
9590 * include/grub/i386/pc/vbefill.h: Likewise.
9591 * include/grub/i386/pc/vbeutil.h: Likewise.
9592 * include/grub/i386/pc/vga.h: Likewise.
9593 * include/grub/ieee1275/ieee1275.h: Likewise.
9594 * include/grub/ieee1275/ofdisk.h: Likewise.
9595 * include/grub/powerpc/libgcc.h: Likewise.
9596 * include/grub/powerpc/setjmp.h: Likewise.
9597 * include/grub/powerpc/types.h: Likewise.
9598 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9599 * include/grub/powerpc/ieee1275/console.h: Likewise.
9600 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9601 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9602 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9603 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9604 * include/grub/powerpc/ieee1275/time.h: Likewise.
9605 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9606 * include/grub/sparc64/libgcc.h: Likewise.
9607 * include/grub/sparc64/setjmp.h: Likewise.
9608 * include/grub/sparc64/types.h: Likewise.
9609 * include/grub/sparc64/ieee1275/console.h: Likewise.
9610 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9611 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9612 * include/grub/sparc64/ieee1275/time.h: Likewise.
9613 * include/grub/util/biosdisk.h: Likewise.
9614 * include/grub/util/getroot.h: Likewise.
9615 * include/grub/util/lvm.h: Likewise.
9616 * include/grub/util/misc.h: Likewise.
9617 * include/grub/util/raid.h: Likewise.
9618 * include/grub/util/resolve.h: Likewise.
9619 * io/gzio.c: Likewise.
9620 * kern/device.c: Likewise.
9621 * kern/disk.c: Likewise.
9622 * kern/dl.c: Likewise.
9623 * kern/elf.c: Likewise.
9624 * kern/env.c: Likewise.
9625 * kern/err.c: Likewise.
9626 * kern/file.c: Likewise.
9627 * kern/fs.c: Likewise.
9628 * kern/loader.c: Likewise.
9629 * kern/main.c: Likewise.
9630 * kern/misc.c: Likewise.
9631 * kern/mm.c: Likewise.
9632 * kern/parser.c: Likewise.
9633 * kern/partition.c: Likewise.
9634 * kern/rescue.c: Likewise.
9635 * kern/term.c: Likewise.
9636 * kern/efi/efi.c: Likewise.
9637 * kern/efi/init.c: Likewise.
9638 * kern/efi/mm.c: Likewise.
9639 * kern/i386/dl.c: Likewise.
9640 * kern/i386/efi/init.c: Likewise.
9641 * kern/i386/efi/startup.S: Likewise.
9642 * kern/i386/pc/init.c: Likewise.
9643 * kern/i386/pc/lzo1x.S: Likewise.
9644 * kern/i386/pc/startup.S: Likewise.
9645 * kern/ieee1275/ieee1275.c: Likewise.
9646 * kern/powerpc/cache.S: Likewise.
9647 * kern/powerpc/dl.c: Likewise.
9648 * kern/powerpc/ieee1275/cmain.c: Likewise.
9649 * kern/powerpc/ieee1275/crt0.S: Likewise.
9650 * kern/powerpc/ieee1275/init.c: Likewise.
9651 * kern/powerpc/ieee1275/openfw.c: Likewise.
9652 * kern/sparc64/cache.S: Likewise.
9653 * kern/sparc64/dl.c: Likewise.
9654 * kern/sparc64/ieee1275/init.c: Likewise.
9655 * kern/sparc64/ieee1275/openfw.c: Likewise.
9656 * loader/efi/chainloader.c: Likewise.
9657 * loader/efi/chainloader_normal.c: Likewise.
9658 * loader/i386/efi/linux.c: Likewise.
9659 * loader/i386/efi/linux_normal.c: Likewise.
9660 * loader/i386/pc/chainloader.c: Likewise.
9661 * loader/i386/pc/chainloader_normal.c: Likewise.
9662 * loader/i386/pc/linux.c: Likewise.
9663 * loader/i386/pc/linux_normal.c: Likewise.
9664 * loader/i386/pc/multiboot.c: Likewise.
9665 * loader/i386/pc/multiboot_normal.c: Likewise.
9666 * loader/powerpc/ieee1275/linux.c: Likewise.
9667 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9668 * normal/arg.c: Likewise.
9669 * normal/cmdline.c: Likewise.
9670 * normal/command.c: Likewise.
9671 * normal/completion.c: Likewise.
9672 * normal/execute.c: Likewise.
9673 * normal/function.c: Likewise.
9674 * normal/lexer.c: Likewise.
9675 * normal/main.c: Likewise.
9676 * normal/menu.c: Likewise.
9677 * normal/menu_entry.c: Likewise.
9678 * normal/misc.c: Likewise.
9679 * normal/parser.y: Likewise.
9680 * normal/script.c: Likewise.
9681 * normal/i386/setjmp.S: Likewise.
9682 * normal/powerpc/setjmp.S: Likewise.
9683 * normal/sparc64/setjmp.S: Likewise.
9684 * partmap/acorn.c: Likewise.
9685 * partmap/amiga.c: Likewise.
9686 * partmap/apple.c: Likewise.
9687 * partmap/gpt.c: Likewise.
9688 * partmap/pc.c: Likewise.
9689 * partmap/sun.c: Likewise.
9690 * term/gfxterm.c: Likewise.
9691 * term/terminfo.c: Likewise.
9692 * term/efi/console.c: Likewise.
9693 * term/i386/pc/console.c: Likewise.
9694 * term/i386/pc/serial.c: Likewise.
9695 * term/i386/pc/vesafb.c: Likewise.
9696 * term/i386/pc/vga.c: Likewise.
9697 * term/ieee1275/ofconsole.c: Likewise.
9698 * util/biosdisk.c: Likewise.
9699 * util/console.c: Likewise.
9700 * util/genmoddep.c: Likewise.
9701 * util/getroot.c: Likewise.
9702 * util/grub-emu.c: Likewise.
9703 * util/grub-mkdevicemap.c: Likewise.
9704 * util/grub-probe.c: Likewise.
9705 * util/lvm.c: Likewise.
9706 * util/misc.c: Likewise.
9707 * util/raid.c: Likewise.
9708 * util/resolve.c: Likewise.
9709 * util/update-grub.in: Likewise.
9710 * util/update-grub_lib.in: Likewise.
9711 * util/grub.d/00_header.in: Likewise.
9712 * util/grub.d/10_hurd.in: Likewise.
9713 * util/grub.d/10_linux.in: Likewise.
9714 * util/i386/efi/grub-install.in: Likewise.
9715 * util/i386/efi/grub-mkimage.c: Likewise.
9716 * util/i386/pc/grub-install.in: Likewise.
9717 * util/i386/pc/grub-mkimage.c: Likewise.
9718 * util/i386/pc/grub-mkrescue.in: Likewise.
9719 * util/i386/pc/grub-setup.c: Likewise.
9720 * util/i386/pc/misc.c: Likewise.
9721 * util/powerpc/ieee1275/grub-install.in: Likewise.
9722 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9723 * util/powerpc/ieee1275/misc.c: Likewise.
9724 * video/bitmap.c: Likewise.
9725 * video/video.c: Likewise.
9726 * video/i386/pc/vbe.c: Likewise.
9727 * video/i386/pc/vbeblit.c: Likewise.
9728 * video/i386/pc/vbefill.c: Likewise.
9729 * video/i386/pc/vbeutil.c: Likewise.
9730 * video/readers/tga.c: Likewise.
9732 2007-07-02 Robert Millan <rmh@aybabtu.com>
9734 * conf/i386-efi.rmk: Replace obsolete reference to
9735 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9736 with util/getroot.c.
9737 * conf/powerpc-ieee1275.rmk: Likewise.
9738 * conf/sparc64-ieee1275.rmk: Likewise.
9740 * util/grub-emu.c (main): Fix unchecked pointer handling.
9742 2007-07-02 Robert Millan <rmh@aybabtu.com>
9744 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9745 invocation to fail, in order to support partition-less media.
9747 * util/i386/pc/grub-install.in: Likewise.
9749 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9750 which fs or partmap modules are needed (akin to its sister scripts).
9752 Also use grub-probe to get rid of unportable /proc/mounts check.
9754 Print the same informational message that the other scripts do, before
9757 2007-06-23 Robert Millan <rmh@aybabtu.com>
9759 * util/update-grub_lib.in (font_path): New function. Determine whether
9760 a font file can be found and, if so, echo the GRUB path to it.
9762 * util/update-grub.in: Handle multiple terminals depending on user
9763 input, platform availability and font file presence. Propagate
9764 variables of our findings to /etc/grub.d/ children.
9766 * util/grub.d/00_header.in: Handle multiple terminals, based on
9767 environment setup by update-grub.
9769 2007-06-23 Robert Millan <rmh@aybabtu.com>
9771 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9773 2007-06-21 Robert Millan <rmh@aybabtu.com>
9775 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9776 indicate end of data section in kernel image.
9777 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9778 GRUB_KERNEL_MACHINE_DATA_END.
9780 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9782 * kern/i386/efi/startup.S: Likewise.
9784 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9785 during image generation. Implement --prefix option to override this
9787 * util/i386/efi/grub-mkimage.c: Likewise.
9789 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9790 code to make path relative to its root into a separate function.
9792 * util/i386/pc/grub-install.in: Use newly provided
9793 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9794 pass the result to grub-install --prefix.
9796 2007-06-13 Robert Millan <rmh@aybabtu.com>
9798 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9800 * util/grub-emu.c: Use above definitions from misc.h instead of
9802 * util/grub-mkdevicemap.c: Likewise.
9803 * util/i386/pc/grub-setup.c: Likewise.
9804 * util/grub-probe.c: Likewise.
9805 (probe): Abort with grub_util_error() when either
9806 grub_guess_root_device or grub_util_get_grub_dev fails.
9808 2007-06-12 Robert Millan <rmh@aybabtu.com>
9810 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9812 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9814 * util/grub-probe.c (probe): Likewise for "drive_name".
9816 2007-06-11 Robert Millan <rmh@aybabtu.com>
9818 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9819 not just the cdrom one.
9821 2007-06-11 Robert Millan <rmh@aybabtu.com>
9823 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9824 Add --pkglibdir=DIR option to override pkglibdir.
9825 Mention --image-type=TYPE in help output.
9826 Fix --grub-mkimage (it was a no-op).
9827 Abort gracefully when no parameter is given.
9829 2007-06-11 Robert Millan <rmh@aybabtu.com>
9831 * util/i386/pc/grub-mkrescue.in: New file.
9832 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9833 * Makefile.in: Handle bin_SCRIPTS.
9835 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9837 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9838 list of video modes.
9840 2007-06-06 Robert Millan <rmh@aybabtu.com>
9842 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9843 file doesn't exist, or if it is in a filesystem grub can't read.
9845 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9846 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9847 header comment to fit in 80 columns when the variables are resolved.
9849 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9850 could be identified by update-grub. Remove redundant check for
9851 unifont.pff existence (since convert_system_path_to_grub_path now
9854 2007-06-04 Robert Millan <rmh@aybabtu.com>
9856 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9858 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9860 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9862 2007-06-04 Robert Millan <rmh@aybabtu.com>
9864 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9866 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9867 grub_apple_partition_map_fini.
9870 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9871 to access >2 TiB disks).
9873 Print disk->total_sectors with %llu instead of %lu, since this
9874 variable is always 64-bit (prevents wrong disk size from being displayed
9875 on either >2 TiB disk or big-endian CPU).
9877 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9878 into a generic case that supports all (sane) partition maps.
9880 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9883 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9884 and grub_apple_partition_map_fini() after that.
9886 2007-06-01 Robert Millan <rmh@aybabtu.com>
9888 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9890 * util/grub.d/00_header.in: Only enable gfxterm when
9891 convert_system_path_to_grub_path() succeeds.
9893 2007-05-20 Robert Millan <rmh@aybabtu.com>
9895 * util/update-grub_lib.in: New file.
9896 * DISTLIST: Add update-grub_lib.in.
9897 * conf/common.rmk: Generate update-grub_lib and install it in
9899 * Makefile.in: Add install routine for $(lib_DATA).
9901 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9902 function provided by update-grub_lib to support arbitrary paths of
9904 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9905 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9907 2007-05-19 Robert Millan <rmh@aybabtu.com>
9909 * commands/i386/cpuid.c: New module.
9911 * conf/i386-efi.rmk: Enable cpuid.mod.
9912 * conf/i386-pc.rmk: Likewise.
9914 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9916 * kern/disk.c (grub_disk_read): Check return value of
9919 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9921 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9923 * disk/raid.c (grub_raid_open): Likewise.
9925 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9927 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9928 stack instead of on the heap.
9930 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9931 before doing a read on it.
9933 * configure.ac: Only use -fno-stack-protector for the target
9936 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9938 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9939 __attribute_ ((unused)) to mode_type argument.
9941 * util/getroot.c (grub_guess_root_device): Fix #endif.
9943 * kern/misc.c (memcmp): Fix prototype.
9945 * include/grub/partition.h [GRUB_UTIL]
9946 (grub_gpt_partition_map_init): Add prototype.
9947 (grub_gpt_partition_map_fini): Likewise.
9949 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9952 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9953 (grub_fat_read_data): Likewise.
9954 (grub_fat_find_dir): Likewise.
9956 * font/manager.c (find_glyph): Make table a const.
9957 (grub_font_get_glyph): Remove bitmap from if statement.
9959 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9961 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9962 code, first search for device in /dev/mapper, then in /dev.
9963 (grub_util_get_grub_dev): New function.
9964 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9966 * util/grub-probe.c (probe): Remove check for RAID, call
9967 grub_util_get_grub_dev() instead of
9968 grub_util_biosdisk_get_grub_dev().
9969 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9970 grub_util_biosdisk_get_grub_dev().
9971 * util/i386/pc/grub-setup.c (main): Likewise.
9973 2007-05-16 Robert Millan <rmh@aybabtu.com>
9975 * DISTLIST: Update for the latest changes.
9976 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9977 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9978 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9979 grub/util/biosdisk.h.
9980 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9981 grub/util/biosdisk.h.
9983 2007-05-16 Robert Millan <rmh@aybabtu.com>
9985 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9987 2007-05-16 Robert Millan <rmh@aybabtu.com>
9989 * util/i386/efi/grub-install.in: New.
9990 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9991 newly added grub-install.
9992 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9994 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9995 grub/util/biosdisk.h.
9996 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9997 grub/util/biosdisk.h.
9999 2007-05-16 Robert Millan <rmh@aybabtu.com>
10001 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10002 * include/grub/util/biosdisk.h: ... here.
10003 * util/i386/pc/biosdisk.c: Moved to ...
10004 * util/biosdisk.c: ... here.
10005 * util/i386/pc/getroot.c: Moved to ...
10006 * util/getroot.c: ... here.
10007 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10008 * util/grub-mkdevicemap.c: ... here.
10009 * util/i386/pc/grub-probe.c: Moved to ...
10010 * util/grub-probe.c: ... here.
10012 2007-05-15 Robert Millan <rmh@aybabtu.com>
10014 * util/update-grub.in: Remove duplicated line in grub.cfg header
10017 2007-05-13 Robert Millan <rmh@aybabtu.com>
10019 * util/update-grub.in: Fix a few assumptions about the devices holding
10020 /, /boot and /boot/grub being the same.
10021 * util/grub.d/00_header.in: Likewise.
10022 * util/grub.d/10_hurd.in: Likewise.
10023 * util/grub.d/10_linux.in: Likewise.
10025 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10026 patterns. Use that to define the `.old' suffix as older than `'.
10028 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10030 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10031 the grub.cfg header message.
10033 2007-05-11 Robert Millan <rmh@aybabtu.com>
10035 * util/update-grub.in: Create device.map if it doesn't already exist,
10036 before attempting to run grub-probe.
10037 Check for grub-probe and grub-mkdevicemap with the same code
10038 grub-install is using.
10041 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10043 * Makefile.in: Add the datarootdir autoconf variable.
10045 2007-05-09 Robert Millan <rmh@aybabtu.com>
10047 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10048 fail gracefully if dev->disk->partition == NULL.
10050 2007-05-07 Robert Millan <rmh@aybabtu.com>
10052 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10053 determine partition map module.
10054 * util/i386/pc/grub-install.in: Use this feature to decide which
10055 partition module to load, instead of hardcoding pc and gpt.
10057 2007-05-07 Robert Millan <rmh@aybabtu.com>
10059 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10060 source directory differs from build directory.
10062 2007-05-05 Robert Millan <rmh@aybabtu.com>
10064 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10067 2007-05-05 Robert Millan <rmh@aybabtu.com>
10069 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10071 2007-05-05 Robert Millan <rmh@aybabtu.com>
10073 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10074 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10076 2007-05-05 Robert Millan <rmh@aybabtu.com>
10078 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10079 (grub_probe_SOURCES): Likewise.
10080 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10081 GPT and initialize dos_part and bsd_part accordingly.
10082 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10084 (main): Activate gpt module for use during partition identification,
10085 and deactivate it afterwards.
10086 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10087 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10088 partition identification, and deactivate it afterwards.
10090 2007-05-05 Robert Millan <rmh@aybabtu.com>
10092 * term/i386/pc/console.c (grub_console_fini): Call
10093 grub_term_set_current() before grub_term_unregister().
10095 2007-05-04 Robert Millan <rmh@aybabtu.com>
10097 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10098 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10099 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10100 and update-grub_DATA.
10101 * conf/common.rmk: Build and install update-grub components.
10102 * conf/common.mk: Regenerate.
10103 * util/update-grub.in: New. Core of update-grub.
10104 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10105 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10106 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10107 * util/grub.d/README: New. Document grub.d directory layout.
10109 2007-05-01 Robert Millan <rmh@aybabtu.com>
10111 * util/grub-emu.c: Move initialization functions
10112 grub_util_biosdisk_init() and grub_init_all() before
10113 grub_util_biosdisk_get_grub_dev(), which relies on them.
10115 2007-04-19 Robert Millan <rmh@aybabtu.com>
10117 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10120 2007-04-18 Jerone Young <jerone@gmail.com>
10122 * kernel/elf.c: Add missing parenthesis for conditional statement
10125 2007-04-10 Jerone Young <jerone@gmail.com>
10127 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10128 continue on and look for device node with real device name.
10130 2007-04-10 Jerone Young <jerone@gmail.com>
10132 * configure.ac: Add argument for autoconf to use transformation
10134 * Makefile.in: Add autoconf package transformation code.
10135 * util/i386/pc/grub-install.in: Likewise.
10136 * util/powerpc/ieee1275/grub-install.in: Likewise.
10138 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10140 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10141 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10142 (EXT2_REVISION): Likewise.
10143 (EXT2_INODE_SIZE): Likewise.
10144 (struct grub_ext2_block_group): Added a missing member
10146 (grub_ext2_read_inode): Divide by the inode size in a superblock
10147 instead of 128 to obtain INODES_PER_BLOCK.
10148 Use the macro EXT2_INODE_SIZE instead of directly using
10149 SBLOCK->INODE_SIZE.
10151 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10153 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10154 superblock instead of the structure size to compute an
10155 offset. This fixes the problem that GRUB could not read a
10156 filesystem when inode size is different from 128-byte.
10158 2007-03-05 Marco Gerards <marco@gnu.org>
10160 * normal/main.c (read_config_file): When "menu" is not set, create
10161 an initial context.
10163 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10165 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10166 (HEAP_LIMIT): New macro.
10167 (grub_claim_heap): Claim memory up to `heaplimit'.
10169 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10171 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10172 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10173 (_start): Likewise.
10174 (grub_arch_modules_addr): Return address after `_end'.
10175 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10176 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10177 (add_segments): Calculate `_end' from phdr size and location.
10178 (ALIGN_UP): Moved to ...
10179 * include/grub/misc.h: here.
10180 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10182 (GRUB_IEEE1275_MODULE_BASE): Removed.
10184 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10186 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10189 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10191 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10193 (grub_elf64_load_hook_t): Likewise.
10194 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10197 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10199 * kern/mm.c: Update copyright.
10200 (grub_mm_debug): Correct syntax error.
10201 (grub_mm_dump_free): New function.
10202 (grub_debug_free): Call `grub_free'.
10203 * include/grub/mm.h: Update copyright.
10204 (grub_mm_dump_free): Add declaration.
10206 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10208 * include/grub/ieee1275/ieee1275.h: Update copyright.
10209 * kern/powerpc/ieee1275/init.c: Likewise.
10210 * kern/powerpc/ieee1275/openfw.c: Likewise.
10212 * loader/powerpc/ieee1275/linux.c: Likewise.
10213 * include/grub/elfload.h: Likewise.
10214 * kern/elf.c: Likewise.
10215 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10217 (grub_elf64_load): Likewise.
10218 (grub_elf32_load_segment): Move to a nested function.
10219 (grub_elf64_load_segment): Likewise.
10221 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10223 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10225 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10226 (grub_heap_len): Likewise.
10227 (HEAP_SIZE): New macro.
10228 (grub_claim_heap): New function.
10229 (grub_machine_init): Don't claim heap directly. Call
10231 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10232 (grub_available_iterate): New function.
10234 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10236 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10237 * configure.ac: Use it for testing the HOST and TARGET compilers.
10239 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10241 * Makefile.in (enable_grub_emu): New variable.
10242 * configure.ac (--enable-grub-emu): New option.
10243 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10244 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10245 * conf/i386-pc.rmk: Likewise.
10246 * conf/powerpc-ieee1275.rmk: Likewise.
10247 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10249 2006-12-12 Marco Gerards <marco@gnu.org>
10251 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10253 * kern/env.c (grub_env_unset): Don't free the member `value' when
10254 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10257 * normal/main.c (current_menu): Removed.
10258 (free_menu): Unset the `menu' environment variable.
10259 (grub_normal_menu_addentry): Make use of the environment variable
10260 `menu', instead of using the global `current_menu'. Allocate
10261 memory for the sourcecode of this entry.
10262 (read_config_file): New argument `nested', changed all callers.
10263 Only in the case of a new context, initialize a new menu. Set the
10264 `menu' environment variable.
10265 (grub_normal_execute): Don't set and unset the environment
10266 variable `menu' here anymore. Only free the menu when leaving the
10269 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10272 2006-12-11 Marco Gerards <marco@gnu.org>
10274 * normal/menu_entry.c (run): Fix off by one bug so the last line
10275 is executed. Move the loader check to outside the loop.
10277 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10279 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10281 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10283 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10284 the number of sectors. Reported by Andrey Shuvikov
10285 <mr_hyro@yahoo.com>.
10287 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10289 * kern/disk.c (grub_disk_read): When there is a read error, always
10290 try to read only the necessary data.
10292 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10294 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10296 [GRUB_UTIL] (grub_raid_fini): Likewise.
10297 [GRUB_UTIL] (grub_lvm_init): Likewise.
10298 [GRUB_UTIL] (grub_lvm_fini): Likewise.
10299 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10300 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10301 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10302 and grub_raid_fini().
10304 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10306 * include/grub/types.h (__unused): Rename to UNUSED.
10307 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10308 (grub_elf64_size): Likewise.
10310 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10312 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10313 grub_error_push and grub_error_pop in the error-handling path.
10314 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10317 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10319 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10320 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10321 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10322 (kernel_elf_SOURCES): Likewise.
10323 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10324 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10325 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10326 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10327 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10328 (elf_mod_SOURCES): New variable.
10329 (elf_mod_CFLAGS): Likewise.
10330 (elf_mod_LDFLAGS): Likewise.
10331 * include/grub/types.h (__unused): New macro.
10332 * include/grub/elfload.h: New file.
10333 * kern/elf.c: Likewise.
10334 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10335 (ELF32_LOADMASK): New macro.
10336 (ELF64_LOADMASK): Likewise.
10337 (vmlinux): Removed.
10338 (grub_linux_load32): New function.
10339 (grub_linux_load64): Likewise.
10340 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10341 Use grub_elf_t instead of grub_file_t.
10343 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10345 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10346 `catch_result' to struct set_color_args.
10348 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10350 * normal/menu.c: Include grub/script.h.
10351 * normal/menu_entry.c: Likewise.
10352 * include/grub/normal.h: Do not include grub/script.h.
10354 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10356 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10358 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10360 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10362 (grub_disk_close): Print debug messages when closing a disk.
10363 (grub_disk_read): Print debug messages when disk read fails.
10364 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10366 * kern/partition.c: Include misc.h.
10367 (grub_partition_iterate): Print debug messages when detecting
10370 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10372 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10374 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10376 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10378 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10379 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10381 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10383 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10384 instead of sizeof(lv). Patch by Michael Guntsche.
10386 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10388 * disk/lvm.c: Rename VGS to VG_LIST.
10389 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10390 (grub_lvm_open): Likewise.
10391 Thanks to Michael Guntsche for finding this bug.
10393 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10395 * configure.ac (AC_INIT): Bumped to 1.95.
10397 2006-10-14 Robert Millan <rmh@aybabtu.com>
10399 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10400 with "/dev/.static/dev/md".
10402 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10404 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10405 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10406 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10407 DRIVE_NAME are always freed.
10409 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10410 DOS_PART, as a DOS partition is counted from one instead of zero
10411 now. Reported by Robert Millan.
10413 2006-10-14 Robert Millan <rmh@aybabtu.com>
10415 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10416 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10417 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10418 string returned by grub_guess_root_device.
10419 * util/i386/pc/grub-setup.c: Likewise.
10420 * util/i386/pc/grub-probefs.c: Likewise.
10422 * util/i386/pc/grub-probefs.c: Rename to ...
10423 * util/i386/pc/grub-probe.c: ... this.
10424 * DISTLIST: Remove grub-probefs, add grub-probe.
10425 * conf/i386-efi.rmk: Likewise.
10426 * conf/i386-pc.rmk: Likewise.
10427 * util/i386/pc/grub-install.in: Likewise.
10429 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10430 choose which information we want to print.
10432 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10434 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10435 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10436 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10437 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10438 video/readers/tga.c and video/i386/pc/vbeutil.c.
10440 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10442 Added support for RAID and LVM.
10444 * disk/lvm.c: New file.
10445 * disk/raid.c: Likewise.
10446 * include/grub/lvm.h: Likewise.
10447 * include/grub/raid.h: Likewise.
10448 * include/grub/util/lvm.h: Likewise.
10449 * include/grub/util/raid.h: Likewise.
10450 * util/lvm.c: Likewise.
10451 * util/raid.c: Likewise.
10453 * include/grub/disk.h (grub_disk_dev_id): Add
10454 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10455 (grub_disk_get_size): New prototype.
10456 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10457 returns a partition.
10458 (grub_disk_get_size): New function.
10460 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10461 verbatim if grub_install_dos_part is -2.
10463 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10466 * util/i386/pc/grub-setup.c (setup): New argument
10467 MUST_EMBED. Force embedding of GRUB when the argument is
10468 true. Close FILE before returning.
10469 (main): Add support for RAID and LVM.
10471 * conf/common.rmk: Add RAID and LVM modules.
10472 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10474 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10476 * kern/misc.c (grub_strstr): New function.
10477 * include/grub/misc.h (grub_strstr): New prototype.
10479 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10481 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10483 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10485 * kern/misc.c (grub_strtoull): Guess the base only if not
10488 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10490 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10493 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10495 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10497 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10498 Remove `flags' argument. All callers changed.
10499 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10500 (IEEE1275_IHANDLE_INVALID): New variable.
10501 (IEEE1275_CELL_INVALID): New variable.
10502 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10503 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10504 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10505 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10506 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10507 codes from Open Firmware. All callers updated.
10508 (grub_ieee1275_next_property): Directly return Open Firmware return
10510 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10511 Standardize error checking from `grub_ieee1275_get_property'.
10512 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10513 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10515 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10517 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10518 `instance_to_package_args' to `instance_to_path_args'.
10520 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10521 `grub_ieee1275_chosen'.
10523 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10524 `grub_ieee1275_interpret'.
10526 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10528 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10530 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10532 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10533 (__cmpdi): Likewise.
10535 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10536 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10539 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10541 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10542 to type `grub_ssize_t'.
10543 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10545 2006-09-22 Marco Gerards <marco@gnu.org>
10547 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10550 2006-09-22 Marco Gerards <marco@gnu.org>
10552 * commands/echo.c: New file.
10554 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10556 * conf/common.rmk (echo_mod_SOURCES): New variable.
10557 (echo_mod_CFLAGS): Likewise.
10558 (echo_mod_LDFLAGS): Likewise.
10560 2006-09-22 Marco Gerards <marco@gnu.org>
10562 * normal/main.c (get_line): Malloc memory instead of using
10563 preallocated memory. Removed the arguments `cmdline' and
10564 `max_len'. Updated all callers.
10566 2006-09-22 Marco Gerards <marco@gnu.org>
10568 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10569 (normal_mod_DEPENDENCIES): Likewise.
10571 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10572 (normal_mod_DEPENDENCIES): Likewise.
10574 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10576 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
10578 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10580 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10581 (normal_mod_DEPENDENCIES): Likewise.
10582 * conf/i386-pc.mk: Regenerate.
10583 * conf/i386-efi.mk: Likewise
10584 * conf/common.mk: Likewise.
10585 * conf/powerpc-ieee1275.mk: Likewise.
10586 * conf/sparc64-ieee1275.mk: Likewise.
10588 2006-09-22 Robert Millan <rmh@aybabtu.com>
10590 Sync with i386 version.
10591 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10592 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10594 2006-09-21 Robert Millan <rmh@aybabtu.com>
10596 Import from GRUB Legacy (lib/device.c):
10597 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10598 (init_device_map) [__linux__]: Add support for I2O devices.
10600 2006-09-14 Marco Gerards <marco@gnu.org>
10602 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10605 2006-09-14 Robert Millan <rmh@aybabtu.com>
10607 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10610 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10612 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10613 before adding it to device.map.
10615 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
10617 * genmk.rb: Let GCC generate dependencies the first time it
10618 compiles a file; using the -MD option.
10619 * conf/common.mk: Regenerate.
10620 * conf/i386-pc.mk: Likewise.
10621 * conf/i386-efi.mk: Likewise.
10622 * conf/powerpc-ieee1275.mk: Likewise.
10623 * conf/sparc64-ieee1275.mk: Likewise.
10625 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10627 Move the prototypes of grub_setjmp and grub_longjmp to
10628 cpu/setjmp.h, so that each architecture may specify different
10631 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10632 (grub_longjmp): Likewise.
10633 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10634 (grub_longjmp): Likewise.
10635 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10636 (grub_longjmp): Likewise.
10638 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10639 [!GRUB_UTIL] (grub_longjmp): Removed.
10641 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10643 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10644 "color!" method does not return any value.
10646 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10648 * include/grub/bitmap.h: New file.
10650 * include/grub/i386/pc/vbeutil.h: Likewise.
10652 * video/bitmap.c: Likewise.
10654 * video/readers/tga.c: Likewise.
10656 * video/i386/pc/vbeutil.c: Likewise.
10658 * commands/videotest.c: Code cleanup and updated to reflect to new
10661 * term/gfxterm.c: Likewise.
10663 * video/video.c: Likewise.
10665 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10666 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10667 (bitmap_mod_SOURCES): New entry.
10668 (bitmap_mod_CFLAGS): Likewise.
10669 (bitmap_mod_LDFLAGS): Likewise.
10670 (tga_mod_SOURCES): Likewise.
10671 (tga_mod_CFLAGS): Likewise.
10672 (tga_mod_LDFLAGS): Likewise.
10674 * include/grub/video.h (grub_video_blit_operators): New enum type.
10675 (grub_video_render_target): Changed as forward declaration and moved
10676 actual definition to be video driver specific.
10677 (grub_video_adapter.blit_bitmap): Added blitting operator.
10678 (grub_video_adapter.blit_render_target): Likewise.
10679 (grub_video_blit_bitmap): Likewise.
10680 (grub_video_blit_render_target): Likewise.
10682 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10683 driver specific render target definition.
10684 (grub_video_vbe_map_rgba): Added driver internal helper.
10685 (grub_video_vbe_unmap_color): Updated to use
10686 grub_video_i386_vbeblit_info.
10687 (grub_video_vbe_get_video_ptr): Likewise.
10689 * include/grub/i386/pc/vbeblit.h
10690 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10691 grub_video_i386_vbeblit_info.
10692 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10693 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10694 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10695 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10696 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10697 (grub_video_i386_vbeblit_index_index): Likewise.
10698 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10699 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10700 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10701 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10703 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10706 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10707 include/grub/i386/pc/vbeblit.h.
10709 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10710 Updated to use grub_video_i386_vbeblit_info.
10711 (grub_video_i386_vbefill_R8G8B8): Likewise.
10712 (grub_video_i386_vbefill_index): Likewise.
10713 (grub_video_i386_vbefill): Added generic filler.
10715 * video/i386/pc/vbefill.c: Updated to reflect changes on
10716 include/grub/i386/pc/vbefill.h.
10718 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10719 grub_video_i386_vbeblit_info.
10720 (grub_video_vbe_unmap_color): Likewise.
10721 (grub_video_vbe_blit_glyph): Likewise.
10722 (grub_video_vbe_scroll): Likewise.
10723 (grub_video_vbe_draw_pixel): Removed function.
10724 (grub_video_vbe_get_pixel): Likewise.
10725 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10726 updated code to use it.
10727 (common_blitter): Added common blitter for render target and bitmap.
10728 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10729 (grub_video_vbe_blit_render_target): Likewise.
10731 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
10733 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10734 is in text mode if there is no console control protocol instance
10737 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10739 * include/grub/video.h: Code cleanup.
10741 * include/grub/i386/pc/vbe.h: Likewise.
10743 * video/i386/pc/vbe.c: Likewise.
10745 * video/i386/pc/vbeblit.c: Likewise.
10747 * video/i386/pc/vbefill.c: Likewise.
10749 * video/video.c: Likewise. Also added more comments.
10751 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10753 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10754 (struct grub_biosdisk_dap): Likewise.
10756 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10757 linkage settings for all functions.
10759 2006-07-12 Marco Gerards <marco@gnu.org>
10761 * configure.ac (--enable-mm-debug): Fix typo.
10763 * genkernsyms.sh.in: Use proper quoting for `CC'.
10765 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10767 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10768 (normal_mod_ASFLAGS): Remove "-m32".
10770 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10772 * util/misc.c: Include config.h.
10773 [!HAVE_MEMALIGN]: Do not include malloc.h.
10774 (grub_memalign): Use posix_memalign, if present. Then, use
10775 memalign, if present. Otherwise, emit an error.
10777 * util/grub-emu.c: Do not include malloc.h.
10779 * include/grub/util/misc.h: Include unistd.h. This is required for
10780 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10781 D. Eades III <hde@foobar-qux.org>.
10783 * configure.ac (AC_GNU_SOURCE): Added.
10784 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10787 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10789 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10790 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10792 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10794 * include/grub/types.h (grub_host_addr_t): Rename to
10795 grub_target_addr_t.
10796 (grub_host_off_t): Rename to grub_target_off_t.
10797 (grub_host_size_t): Rename to grub_target_size_t.
10798 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10799 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10801 * include/grub/kernel.h (struct grub_module_header): Change type
10802 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10803 (grub_module_info): Likewise.
10805 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10807 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10808 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10809 Velazquez <jesus.velazquez@gmail.com>.
10811 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10813 Count partitions from 1 instead of 0 in the string representation
10814 of partitions. Still use 0-based internally.
10816 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10817 (sun_partition_map_iterate): Use grub_partition_t instead of
10818 struct grub_partition *. Cast DESC->START_CYLINDER to
10819 grub_uint64_t after converting the endian.
10820 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10821 (sun_partition_map_get_name): Add 1 to P->INDEX.
10823 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10825 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10827 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10828 zero instead of one.
10829 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10830 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10832 * partmap/apple.c (apple_partition_map_iterate): Change the type
10833 of POS to unsigned.
10834 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10835 (apple_partition_map_get_name): Add 1 into P->INDEX.
10837 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10838 of POS to unsigned.
10839 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10840 calculate the offset of a partition.
10841 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10842 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10844 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10845 SECTOR to grub_disk_addr_t.
10846 (acorn_partition_map_iterate): Likewise.
10847 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10848 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10850 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10852 * kern/i386/pc/init.c (make_install_device): Add 1 into
10853 GRUB_INSTALL_DOS_PART.
10855 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10858 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10860 Clean up the code to support 64-bit addressing in disks and
10861 files. This change is not enough for filesystems yet.
10863 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10864 type of "start" to grub_uint64_t.
10865 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10866 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10867 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10870 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10871 to grub_disk_addr_t.
10873 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10876 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10878 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10881 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10883 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10885 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10887 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10888 to grub_off_t, to detect an error from grub_file_seek.
10889 (grub_multiboot_load_elf32): Likewise.
10891 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10892 maximum unsigned long value when an overflow is detected.
10893 (grub_strtoull): New function.
10894 (grub_divmod64): Likewise.
10895 (grub_lltoa): use grub_divmod64.
10897 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10899 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10900 the pointer to next character. Use grub_strtoull instead of
10902 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10903 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10906 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10907 return value is signed.
10908 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10909 test if OFFSET is less than zero, as OFFSET is unsigned now.
10911 * kern/disk.c (struct grub_disk_cache): Change the type of
10912 "sector" to grub_disk_addr_t.
10913 (grub_disk_cache_get_index): Change the type of SECTOR to
10914 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10915 unsigned after shifting.
10916 (grub_disk_cache_invalidate): Change the type of SECTOR to
10918 (grub_disk_cache_unlock): Likewise.
10919 (grub_disk_cache_store): Likewise.
10920 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10921 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10922 grub_disk_addr_t and grub_uint64_t, respectively.
10923 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10924 body, as the value of OFFSET is tweaked by
10925 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10926 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10928 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10929 body, as the value of OFFSET is tweaked by
10930 grub_disk_check_range. Change the types of LEN and N to
10933 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10934 and "saved_offset" to grub_off_t.
10935 (test_header): Cast BUF to char *.
10936 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10938 (grub_gzio_read): Change the types of OFFSET and SIZE to
10939 grub_off_t and grub_size_t, respectively.
10941 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10943 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10944 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10945 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10946 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10947 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10949 * include/grub/types.h (grub_off_t): Unconditionally set to
10951 (grub_disk_addr_t): Changed to grub_uint64_t.
10953 * include/grub/partition.h (struct grub_partition): Change the
10954 types of "start", "len" and "offset" to grub_disk_addr_t,
10955 grub_uint64_t and grub_disk_addr_t, respectively.
10956 (grub_partition_get_start): Return grub_disk_addr_t.
10957 (grub_partition_get_len): Return grub_uint64_t.
10959 * include/grub/misc.h (grub_strtoull): New prototype.
10960 (grub_divmod64): Likewise.
10962 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10963 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10964 grub_off_t, respectively.
10965 All callers and references changed.
10967 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10968 grub_size_t in "read".
10969 All callers and references changed.
10971 * include/grub/file.h (struct grub_file): Change the types of
10972 "offset" and "size" to grub_off_t and grub_off_t,
10973 respectively. Change the type of SECTOR to grub_disk_addr_t in
10975 (grub_file_read): Change the type of LEN to grub_size_t.
10976 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10978 (grub_file_size): Return grub_off_t.
10979 (grub_file_tell): Likewise.
10980 All callers and references changed.
10982 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10983 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10985 (struct grub_disk): Change the type of "total_sectors" to
10986 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10988 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10989 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10990 (grub_disk_write): Likewise.
10991 All callers and references changed.
10993 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10994 char * for grub_strncmp to silence gcc.
10995 (grub_iso9660_mount): Likewise.
10996 (grub_iso9660_mount): Likewise.
10997 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10999 (grub_iso9660_iterate_dir): Likewise.
11000 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11002 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11003 LEN to grub_disk_addr_t and grub_size_t, respectively.
11005 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11007 * fs/jfs.c (grub_jfs_read_file): Likewise.
11009 * fs/minix.c (grub_jfs_read_file): Likewise.
11011 * fs/sfs.c (grub_jfs_read_file): Likewise.
11013 * fs/ufs.c (grub_jfs_read_file): Likewise.
11015 * fs/xfs.c (grub_jfs_read_file): Likewise.
11017 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11018 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11021 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11022 BLKNR to -1 instead of returning GRUB_ERRNO.
11023 (grub_ext2_read_file): Change the types of SECTOR and
11024 LEN to grub_disk_addr_t and grub_size_t, respectively.
11026 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11027 LEN to grub_disk_addr_t and grub_size_t, respectively.
11029 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11032 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11033 string. Do not cast SECTOR explicitly.
11035 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11036 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11037 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11038 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11039 over 2TB and LBA mode is not supported, raise an error.
11040 (get_safe_sectors): New function.
11041 (grub_biosdisk_read): Use get_safe_sectors.
11042 (grub_biosdisk_write): Likewise.
11044 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11045 (grub_efidisk_write): Likewise.
11047 * disk/loopback.c (delete_loopback): Cosmetic changes.
11048 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11050 (grub_loopback_open): Likewise.
11051 (grub_loopback_read): Likewise. Also, change the type of POS to
11052 grub_off_t, and fix the usage of grub_memset.
11054 * commands/i386/pc/play.c: Include grub/machine/time.h.
11056 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11059 * commands/configfile.c: Include grub/env.h.
11061 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11062 GRUB_ERRNO directly instead. Change the type of POS to
11063 grub_off_t. Follow the coding standard.
11065 * commands/blocklist.c: Include grub/partition.h.
11066 (grub_cmd_blocklist): Return an error if the underlying device is
11067 not a disk. Take the starting sector of a partition into account,
11068 if a partition is used.
11070 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11072 (lba_mode): Support 64-bit addresses.
11073 (chs_mode): Likewise.
11074 (copy_buffer): Adapted to the new offsets of a length field and a
11076 (blocklist_default_start): Allocate 64-bit space.
11078 * boot/i386/pc/boot.S (force_lba): Removed.
11079 (boot_drive): Moved to under KERNEL_SECTOR.
11080 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11082 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11084 (lba_mode): Refactored to support a 64-bit address. More size
11086 (setup_sectors): Likewise.
11088 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11090 * DISTLIST: Added include/grub/i386/linux.h. Removed
11091 include/grub/i386/pc/linux.h
11093 * configure.ac (AC_INIT): Bumped to 1.94.
11095 * config.guess: Updated from gnulib.
11096 * config.sub: Likewise.
11097 * install-sh: Likewise.
11098 * mkinstalldirs: Likewise.
11100 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11102 * conf/common.rmk (grub_modules_init.lst): Depended on
11103 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11106 * genmk.rb (PModule::rule): Reverted the previous change.
11108 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11110 * conf/common.rmk (grub_modules_init.lst): Depends on
11111 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11112 that the target does not exist before producing.
11113 (grub_modules_init.h): Remove the target before generating.
11114 (grub_emu_init.c): Likewise.
11116 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11118 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11120 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11121 for the target-specific tests. Make sure that we also have the
11122 up-to-date target variables for those tests.
11124 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11126 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11127 (PModule::rule): Likewise.
11129 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11131 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11132 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11133 target-specific flags should be prefixed.
11134 (PModule::rule): Likewise.
11136 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11138 * configure.ac (CMP): Check if cmp is available explicitly.
11140 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11142 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11143 (target_cpu): New variable.
11144 (pkglibdir): Use target_cpu instead of host_cpu.
11146 * util/i386/pc/grub-install.in (host_cpu): Removed.
11147 (target_cpu): New variable.
11148 (pkglibdir): Use target_cpu instead of host_cpu.
11150 * util/genmoddep.c: Removed.
11152 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11153 instead of GRUB_HOST_SIZEOF_VOID_P.
11154 * kern/dl.c: Likewise.
11156 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11158 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11159 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11160 (GRUB_TARGET_SIZEOF_LONG): ... this.
11161 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11162 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11163 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11165 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11166 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11167 (GRUB_TARGET_SIZEOF_LONG): ... this.
11168 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11169 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11170 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11172 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11173 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11174 (GRUB_TARGET_SIZEOF_LONG): ... this.
11175 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11176 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11178 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11179 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11180 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11181 instead of GRUB_HOST_SIZEOF_LONG.
11182 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11183 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11184 GRUB_CPU_WORDS_BIGENDIAN.
11185 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11186 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11189 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11190 (genmoddep_SOURCES): Likewise.
11191 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11192 (genmoddep_SOURCES): Likewise.
11193 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11194 (genmoddep_SOURCES): Likewise.
11195 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11197 (genmoddep_SOURCES): Likewise.
11199 * genmoddep.awk: New file.
11201 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11202 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11203 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11204 (PModule::rule): Likewise.
11205 (Program::rule): Likewise.
11206 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11207 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11210 * configure.ac: Rewritten intensively to use host and target
11211 instead of build and host, respectively.
11213 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11214 (host_cpu): Removed.
11215 (target_cpu): New variable.
11216 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11217 (BUILD_CC): Removed.
11218 (BUILD_CFLAGS): Likewise.
11219 (BUILD_CPPFLAGS): Likewise.
11220 (TARGET_CC): New variable.
11221 (TARGET_CFLAGS): Likewise.
11222 (TARGET_CPPFLAGS): Likewise.
11223 (TARGET_LDFLAGS): Likewise.
11225 (include): Use target_cpu instead of host_cpu.
11226 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11228 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11230 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11232 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11233 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11234 field 'false' to 'exec_on_false'.
11235 (grub_script_create_cmdif): Renamed argument names to reflect above
11238 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11240 * normal/script.c (grub_script_create_cmdif): Likewise.
11242 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11244 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11246 (grub_hfsplus_btree_recptr): Likewise.
11247 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11248 FILEBLOCK both to pass a block number and store next block
11250 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11251 overflow file correctly. Specify errors appropriately, because
11252 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11253 grub_hfsplus_btree_recptr to get the pointer to a found key.
11254 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11257 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11259 (_linux_mod_SOURCES): New variable.
11260 (_linux_mod_CFLAGS): Likewise.
11261 (_linux_mod_LDFLAGS): Likewise.
11262 (linux_mod_SOURCES): Likewise.
11263 (linux_mod_CFLAGS): Likewise.
11264 (linux_mod_LDFLAGS): Likewise.
11266 * DISTLIST: Added loader/i386/efi/linux.c,
11267 loader/i386/efi/linux_normal.c and
11268 include/grub/i386/efi/loader.h.
11270 * loader/i386/efi/linux.c: New file.
11271 * loader/i386/efi/linux_normal.c: Likewise.
11272 * include/grub/i386/efi/loader.h: Likewise.
11274 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11276 * commands/blocklist.c: New file.
11278 * DISTLIST: Added commands/blocklist.c.
11280 * term/efi/console.c (grub_console_highlight_color): Use a lighter
11281 color for the background, and a darker color for the foreground.
11282 (grub_console_checkkey): Return READ_KEY.
11283 (grub_console_cls): Set the background to
11284 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11286 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11288 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11289 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11291 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11294 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11295 BG. The spec is wrong again.
11297 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11299 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11301 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11302 commands/blocklist.c.
11303 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11305 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11306 (blocklist_mod_SOURCES): New variable.
11307 (blocklist_mod_CFLAGS): Likewise.
11308 (blocklist_mod_LDFLAGS): Likewise.
11310 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11312 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11314 (lba_mode): Use %eax more intensively to reduce the code size.
11316 2006-05-20 Marco Gerards <marco@gnu.org>
11318 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11320 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11322 (script): Accept leading newlines.
11323 (newlines): New rule to describe 0 or more newlines.
11324 (commands): Accept `command' with trailing newline. Fixed the
11325 order in which arguments were passed to `grub_script_add_cmd'.
11326 Accept commands separated by newlines.
11327 (function): Changed to accept newlines.
11328 (menuentry) Rewritten.
11330 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11331 front of the list, instead of to the end.
11333 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11335 * util/i386/pc/grub-install.in (bindir): New variable.
11336 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11337 Shaver <lbgwjl@gmail.com>.
11339 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11341 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11342 grub/machine/linux.h
11343 * loader/i386/pc/linux.c: Likewise.
11345 * include/grub/i386/pc/linux.h: Moved to ...
11346 * include/grub/i386/linux.h: ... here.
11348 * include/grub/i386/linux.h (struct linux_kernel_params): New
11351 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11353 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11355 (grub_video_vbe_blit_glyph): Likewise.
11356 (grub_video_vbe_blit_bitmap): Likewise.
11357 (grub_video_vbe_blit_render_target): Likewise.
11359 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11361 * configure.ac (--with-platform): Properly quote the square
11364 2006-05-08 Marco Gerards <marco@gnu.org>
11366 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11368 (kernel_elf_HEADERS): ...to this. Updated all users.
11369 (grubof_symlist.c): Renamed from this...
11370 (kernel_elf_symlist.c): ...to this. Updated all users.
11371 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11372 (grubof_SOURCES): Renamed from this...
11373 (kernel_elf_SOURCES): ...to this.
11374 (grubof_HEADERS): Renamed from this...
11375 (kernel_elf_HEADERS): ...to this.
11376 (grubof_CFLAGS): Renamed from this...
11377 (kernel_elf_CFLAGS): ...to this.
11378 (grubof_ASFLAGS): Renamed from this...
11379 (kernel_elf_ASFLAGS): ...to this.
11380 (grubof_LDFLAGS): Renamed from this...
11381 (kernel_elf_LDFLAGS): ...to this.
11383 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11385 (kernel_elf_HEADERS): ...to this. Updated all users.
11386 (grubof_symlist.c): Renamed from this...
11387 (kernel_elf_symlist.c): ...to this. Updated all users.
11388 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11389 (grubof_SOURCES): Renamed from this...
11390 (kernel_elf_SOURCES): ...to this.
11391 (grubof_HEADERS): Renamed from this...
11392 (kernel_elf_HEADERS): ...to this.
11393 (grubof_CFLAGS): Renamed from this...
11394 (kernel_elf_CFLAGS): ...to this.
11395 (grubof_ASFLAGS): Renamed from this...
11396 (kernel_elf_ASFLAGS): ...to this.
11397 (grubof_LDFLAGS): Renamed from this...
11398 (kernel_elf_LDFLAGS): ...to this.
11400 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11401 `kernel.elf' instead of `grubof'.
11403 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11405 Add --with-platform to configure. Use pkglibdir instead of
11406 pkgdatadir. This is reported by Roger Leigh.
11408 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11409 (host_vendor): Likewise.
11410 (host_os): Likewise.
11411 (pkgdatadir): Likewise.
11412 (platform): New variable.
11413 (pkglibdir): Likewise.
11414 Use PKGLIBDIR instead of PKGDATADIR.
11416 * util/i386/pc/grub-install.in (datadir): Removed.
11417 (host_vendor): Likewise.
11418 (host_os): Likewise.
11419 (pkgdatadir): Likewise.
11420 (platform): New variable.
11421 (pkglibdir): Likewise.
11422 Use PKGLIBDIR instead of PKGDATADIR.
11424 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11425 instead of GRUB_DATADIR.
11427 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11429 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11432 * configure.ac (--with-platform): New option.
11433 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11435 * Makefile.in: Include a makefile based on PLATFORM instead of
11437 (pkgdatadir): Not appended by the machine type.
11438 (pkglibdir): Appended by the machine type.
11439 (host_vendor): Removed.
11440 (platform): New variable.
11441 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11442 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11443 (uninstall): Likewise.
11445 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11447 Use the environment context in the menu. Remove the commands
11448 "default" and "timeout", and use variables instead.
11450 * normal/menu.c: Include grub/env.h.
11451 (print_entry): Cast TITLE to silence gcc.
11452 (get_timeout): New function.
11453 (set_timeout): Likewise.
11454 (get_entry_number): Likewise.
11455 (run_menu): Use a default entry, a fallback entry and a timeout
11456 in the environment variables "default", "fallback" and
11457 "timeout". Also, tweak the default entry if it is not within the
11458 current menu entries.
11459 (grub_menu_run): Use a fallback entry in the environment variable
11462 * normal/main.c (read_config_file): Do not initialize
11463 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11465 (grub_normal_execute): Use a data slot to store the menu.
11467 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11468 fallback_entry and timeout.
11469 (struct grub_menu_list): Removed.
11470 (grub_menu_list_t): Likewise.
11471 (struct grub_context): Likewise.
11472 (grub_context_t): Likewise.
11473 (grub_context_get): Likewise.
11474 (grub_context_get_current_menu): Likewise.
11475 (grub_context_push_menu): Likewise.
11476 (grub_context_pop_menu): Likewise.
11477 (grub_default_init): Likewise.
11478 (grub_default_fini): Likewise.
11479 (grub_timeout_init): Likewise.
11480 (grub_timeout_fini): Likewise.
11482 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11484 (normal_mod_SOURCES): Removed normal/context.c.
11486 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11487 commands/default.c, commands/timeout.c and normal/context.c.
11488 (normal_mod_SOURCES): Removed normal/context.c.
11490 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11491 commands/timeout.c and normal/context.c.
11492 (normal_mod_SOURCES): Removed normal/context.c.
11494 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11495 commands/default.c, commands/timeout.c and normal/context.c.
11496 (normal_mod_SOURCES): Removed normal/context.c.
11498 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11500 (default_mod_SOURCES): Removed.
11501 (default_mod_CFLAGS): Likewise.
11502 (default_mod_LDFLAGS): Likewise.
11503 (timeout_mod_SOURCES): Removed.
11504 (timeout_mod_CFLAGS): Likewise.
11505 (timeout_mod_LDFLAGS): Likewise.
11507 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11510 * commands/default.c: Removed.
11511 * commands/timeout.c: Likewise.
11512 * normal/context.c: Likewise.
11514 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11516 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11518 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11520 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11521 "next" to "prev" for readability.
11522 (struct grub_env_sorted_var): New struct.
11523 (grub_env_context): Renamed to ...
11524 (initial_context): ... this.
11525 (grub_env_var_context): Renamed to ...
11526 (current_context): ... this.
11527 (grub_env_find): Look only at CURRENT_CONTEXT.
11528 (grub_env_context_open): Rewritten to copy exported variables from
11530 (grub_env_context_close): Rewritten according to the new
11531 scheme. Also, add an assertion to prevent the initial context from
11533 (grub_env_insert): Removed the code for the sorted list.
11534 (grub_env_remove): Likewise.
11535 (grub_env_export): Simply mark the variable with
11536 GRUB_ENV_VAR_GLOBAL.
11537 (grub_env_set): A cosmetic change for naming consistency.
11538 (grub_env_get): Likewise.
11539 (grub_env_unset): Likewise.
11540 (grub_env_iterate): Rewritten to sort variables within this
11542 (grub_register_variable_hook): Fixed for naming consistency. Call
11543 grub_env_find again, only if NAME is not found at the first time.
11544 (mangle_data_slot_name): New function.
11545 (grub_env_set_data_slot): Likewise.
11546 (grub_env_get_data_slot): Likewise.
11547 (grub_env_unset_data_slot): Likewise.
11549 * include/grub/env.h (grub_env_var_type): New enum.
11550 (GRUB_ENV_VAR_LOCAL): New constant.
11551 (GRUB_ENV_VAR_GLOBAL): Likewise.
11552 (GRUB_ENV_VAR_DATA): Likewise.
11553 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11555 (grub_env_set): Replace VAR with NAME for consistency.
11556 (grub_register_variable_hook): Likewise.
11557 (grub_env_export): Specify the name of the argument.
11558 (grub_env_set_data_slot): New prototype.
11559 (grub_env_get_data_slot): Likewise.
11560 (grub_env_unset_data_slot): Likewise.
11562 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11564 Extend the loader so that GRUB can accept a loader which comes
11565 back to GRUB when a loaded image exits. Also, this change adds
11566 support for a chainloader on EFI.
11568 * term/efi/console.c: Include grub/misc.h.
11569 (grub_console_checkkey): Display a scan code on the top for
11570 debugging. This will be removed once the EFI port gets stable.
11571 Correct the scan code mapping.
11573 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11574 allocate memory from larger regions, in order to reduce the number
11575 of allocated regions. Otherwise, the MacOSX loader panics.
11576 (filter_memory_map): Avoid less than 1MB for compatibility with
11578 (add_memory_regions): Allocate from the tail of a region, if
11579 possible, to avoid allocating a region near to 1MB, for the MacOSX
11582 * kern/efi/init.c (grub_efi_set_prefix): Specify
11583 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11585 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11586 argument IMAGE_HANDLE and specify it to get a loaded image.
11587 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11588 grub_efi_get_loaded_image.
11589 (grub_efi_get_filename): Divide the length by the size of
11591 (grub_efi_get_device_path): New function.
11592 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11593 the length by the size of grub_efi_char16_t for a file path device
11596 * kern/loader.c (grub_loader_noreturn): New variable.
11597 (grub_loader_set): Accept a new argument NORETURN. Set
11598 GRUB_LOADER_NORETURN to NORETURN.
11599 All callers changed.
11600 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11603 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11605 (grub_efi_get_loaded_image): Take an argument to specify an image
11608 * include/grub/loader.h (grub_loader_set): Added one more argument
11611 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11612 instead of grub_efi_open_protocol.
11613 (grub_efidisk_get_device_name): Likewise.
11614 (grub_efidisk_close): Print a newline.
11615 (grub_efidisk_get_device_handle): Fixed to use
11616 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11617 GRUB_EFI_DEVICE_PATH_TYPE.
11619 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11620 * kern/efi/efi.c (device_path_guid): ... here.
11622 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11624 (kernel_mod_HEADERS): Added efi/disk.h.
11625 (_chain_mod_SOURCES): New variable.
11626 (_chain_mod_CFLAGS): Likewise.
11627 (_chain_mod_LDFLAGS): Likewise.
11628 (chain_mod_SOURCES): Likewise.
11629 (chain_mod_CFLAGS): Likewise.
11630 (chain_mod_LDFLAGS): Likewise.
11632 * DISTLIST: Added include/grub/efi/chainloader.h,
11633 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11635 * include/grub/efi/chainloader.h: New file.
11636 * loader/efi/chainloader.c: Likewise.
11637 * loader/efi/chainloader_normal.c: Likewise.
11639 2006-04-30 Marco Gerards <marco@gnu.org>
11641 * commands/configfile.c (grub_cmd_source): New function.
11642 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11643 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11645 2006-04-30 Marco Gerards <marco@gnu.org>
11647 * normal/execute.c (grub_script_execute_cmd): Change the return
11648 type to `grub_err_t'. Correctly return the error.
11649 (grub_script_execute_cmdline): In case a command line is not a
11650 command or a function, try to interpret it as an assignment.
11652 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11654 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11655 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11656 skip a node whose name is obviously invalid as UTF-16,
11657 i.e. contains a NUL character. Stop the iteration when the last
11658 directory entry is found. Instead of using the return value of
11659 grub_hfsplus_btree_iterate_node, store the value in RET and use
11660 it, because the iterator can be stopped by the last directory
11663 2006-04-30 Marco Gerards <marco@gnu.org>
11665 * include/grub/env.h (grub_env_export): New prototype. Reported
11666 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11668 2006-04-30 Marco Gerards <marco@gnu.org>
11670 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11671 size of the extents in a catalog file record.
11673 2006-04-29 Marco Gerards <marco@gnu.org>
11675 * commands/configfile.c (grub_cmd_configfile): Execute the
11676 configfile within its own context.
11678 * include/grub/env.h (grub_env_context_open): New prototype.
11679 (grub_env_context_close): Likewise.
11681 * kern/env.c (grub_env): Removed.
11682 (grub_env_sorted): Likewise.
11683 (grub_env_context): New variable.
11684 (grub_env_var_context): Likewise.
11685 (grub_env_find): Search both the active context and the global
11687 (grub_env_context_open): New function.
11688 (grub_env_context_close): Likewise.
11689 (grub_env_insert): Likewise.
11690 (grub_env_remove): Likewise.
11691 (grub_env_export): Likewise.
11692 (grub_env_set): Changed to use helper functions to avoid code
11694 (grub_env_iterate): Rewritten so both the current context and the
11695 global context are being used.
11697 * normal/command.c (export_command): New function.
11698 (grub_command_init): Register the `export' function.
11700 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11702 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11703 explicitly to suppress gcc's warnings.
11704 * fs/fat.c (grub_fat_find_dir): Likewise.
11705 (grub_fat_label): Likewise.
11706 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11707 (grub_xfs_mount): Likewise.
11708 (grub_xfs_label): Likewise.
11709 * fs/affs.c (grub_affs_mount): Likewise.
11710 (grub_affs_label): Likewise.
11711 (grub_affs_iterate_dir): Likewise.
11712 * fs/sfs.c (grub_sfs_mount): Likewise.
11713 (grub_sfs_iterate_dir): Likewise.
11714 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11715 * fs/hfs.c (grub_hfs_mount): Likewise.
11716 (grub_hfs_cmp_catkeys): Likewise.
11717 (grub_hfs_find_dir): Likewise.
11718 (grub_hfs_dir): Likewise.
11719 (grub_hfs_label): Likewise.
11720 * fs/jfs.c (grub_jfs_mount): Likewise.
11721 (grub_jfs_opendir): Likewise.
11722 (grub_jfs_getent): Likewise.
11723 (grub_jfs_lookup_symlink): Likewise.
11724 (grub_jfs_label): Likewise.
11725 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11726 (grub_hfsplus_iterate_dir): Likewise.
11727 (grub_hfsplus_btree_iterate_node): Made static.
11729 * util/grub-emu.c (prefix): New variable.
11730 (grub_machine_set_prefix): New function.
11731 (main): Do not set the environment variable "prefix" here. Only
11732 set PREFIX, which is used later by grub_machine_set_prefix.
11734 * include/grub/video.h: Do not include grub/symbol.h.
11735 (grub_video_register): Not exported. This symbol is not defined in
11737 (grub_video_unregister): Likewise.
11738 (grub_video_iterate): Likewise.
11739 (grub_video_setup): Likewise.
11740 (grub_video_restore): Likewise.
11741 (grub_video_get_info): Likewise.
11742 (grub_video_get_blit_format): Likewise.
11743 (grub_video_set_palette): Likewise.
11744 (grub_video_get_palette): Likewise.
11745 (grub_video_set_viewport): Likewise.
11746 (grub_video_get_viewport): Likewise.
11747 (grub_video_map_color): Likewise.
11748 (grub_video_map_rgb): Likewise.
11749 (grub_video_map_rgba): Likewise.
11750 (grub_video_fill_rect): Likewise.
11751 (grub_video_blit_glyph): Likewise.
11752 (grub_video_blit_bitmap): Likewise.
11753 (grub_video_blit_render_target): Likewise.
11754 (grub_video_scroll): Likewise.
11755 (grub_video_swap_buffers): Likewise.
11756 (grub_video_create_render_target): Likewise.
11757 (grub_video_delete_render_target): Likewise.
11758 (grub_video_set_active_render_target): Likewise.
11760 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11762 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11764 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11765 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11766 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11767 instead of $(srcdir)/genkernsyms.sh.
11769 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11770 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11771 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11772 instead of $(srcdir)/genkernsyms.sh.
11774 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11775 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11776 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11777 instead of $(srcdir)/genkernsyms.sh.
11779 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11780 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11781 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11782 instead of $(srcdir)/genkernsyms.sh.
11784 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11787 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11789 (gensymlist.sh): New target.
11790 (genkernsyms.sh): Likewise.
11792 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11793 genkernsyms.sh.in and gensymlist.sh.in.
11795 * genkernsyms.sh: Removed.
11796 * gensymlist.sh: Likewise.
11798 * genkernsyms.sh.in: New file.
11799 * gensymlist.sh.in: Likewise.
11801 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11803 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11804 clobber "prefix", since we may have already set it manually.
11806 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11808 * kern/misc.c (abort): New alias for grub_abort.
11810 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11812 A new machine-specific function "grub_machine_set_prefix" is
11813 defined. This is called after loading modules, so that a prefix
11814 initialization can use modules. Also, this change adds an
11815 intensive debugging feature for the memory manager via the
11816 configure option "--enable-mm-debug".
11818 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11821 * kern/sparc64/ieee1275/init.c (abort): Removed.
11822 (grub_stop): Likewise.
11823 (grub_exit): New function.
11824 (grub_set_prefix): Renamed to ...
11825 (grub_machine_set_prefix): ... this.
11826 (grub_machine_init): Do not call grub_set_prefix.
11828 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11829 (grub_machine_set_prefix): ... this.
11830 (grub_machine_init): Do not call grub_set_prefix.
11832 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11833 (grub_machine_init): Do not set the prefix here.
11835 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11837 * kern/efi/init.c: Include grub/mm.h.
11838 (grub_efi_set_prefix): New function.
11840 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11841 (grub_efi_get_filename): New function.
11842 (grub_print_device_path): Renamed to ...
11843 (grub_efi_print_device_path): ... this.
11845 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11846 [MM_DEBUG] (grub_realloc): Likewise.
11847 [MM_DEBUG] (grub_free): Likewise.
11848 [MM_DEBUG] (grub_memalign): Likewise.
11849 [MM_DEBUG] (grub_mm_debug): New variable.
11850 [MM_DEBUG] (grub_debug_malloc): New function.
11851 [MM_DEBUG] (grub_debug_free): New function.
11852 [MM_DEBUG] (grub_debug_realloc): New function.
11853 [MM_DEBUG] (grub_debug_memalign): New function.
11855 * kern/misc.c (grub_abort): Print a newline to distinguish
11858 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11859 grub_set_root_dev after loading modules. This is necessary when
11860 setting a prefix depends on modules.
11862 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11863 (grub_efi_print_device_path): ... this.
11864 (grub_efi_get_filename): New prototype.
11865 (grub_efi_set_prefix): Likewise.
11867 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11869 (grub_efidisk_get_device_handle): New prototype.
11870 (grub_efidisk_get_device_name): Likewise.
11872 * include/grub/mm.h: Include config.h.
11873 (MM_DEBUG): Removed.
11874 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11875 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11876 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11877 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11878 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11879 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11880 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11881 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11882 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11884 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11886 * disk/efi/efidisk.c: Include grub/partition.h.
11887 (iterate_child_devices): New function.
11888 (add_device): First, compare only last device path nodes, so that
11889 devices are sorted by the types.
11890 (grub_efidisk_get_device_handle): New function.
11891 (grub_efidisk_get_device_name): Likewise.
11893 * configure.ac (--enable-mm-debug): New option to enable the
11894 memory manager debugging feature. This makes the binary much
11895 bigger, so is disabled by default.
11897 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11899 Use grub_abort instead of grub_stop, and grub_exit must be
11900 define in each architecture now. Also, this change adds support
11903 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11904 (grub_getkey): New function.
11905 (grub_term_get_current): Likewise.
11907 * util/i386/pc/grub-setup.c: Include grub/term.h.
11908 (grub_getkey): New function.
11909 (grub_term_get_current): Likewise.
11911 * util/misc.c (grub_stop): Renamed to ...
11912 (grub_exit): ... this.
11914 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11915 (grub_exit): ... this.
11916 (grub_machine_init): Use grub_abort instead of abort.
11917 (grub_stop): Removed.
11919 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11922 * kern/i386/pc/startup.S (grub_exit): New function.
11923 (cold_reboot): New label.
11925 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11926 (grub_efi_init): Call grub_efidisk_init.
11927 (grub_efi_fini): Call grub_efidisk_fini.
11929 * kern/efi/efi.c: Include grub/mm.h.
11930 (grub_efi_console_control_guid): Renamed to ...
11931 (console_control_guid): ... this.
11932 (grub_efi_loaded_image_guid): Renamed to ...
11933 (loaded_image_guid): ... this.
11934 (grub_efi_locate_handle): New function.
11935 (grub_efi_open_protocol): Likewise.
11936 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11937 GRUB_EFI_CONSOLE_CONTROL_GUID.
11938 (grub_efi_exit): Removed.
11939 (grub_stop): Likewise.
11940 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11941 (grub_exit): New function.
11942 (grub_print_device_path): Likewise.
11944 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11945 (grub_enter_rescue_mode): Register "exit".
11947 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11948 (grub_abort): New function.
11950 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11952 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11954 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11956 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11957 (grub_print_device_path): New prototype.
11958 (grub_efi_locate_handle): Likewise.
11959 (grub_efi_open_protocol): Likewise.
11961 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11962 * disk/efi/efidisk.c: Likewise.
11964 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11966 * include/grub/efi/console_control.h
11967 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11969 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11970 last 8 bytes as an array.
11971 (GRUB_EFI_DISK_IO_GUID): New macro.
11972 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11973 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11974 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11976 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11977 (struct grub_efi_device_path): Rename the member "sub_type" to
11979 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11980 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11981 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11982 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11983 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11984 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11985 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11986 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11987 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11988 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11989 (struct grub_efi_pci_device_path): New structure.
11990 (grub_efi_pci_device_path_t): New type.
11991 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11992 (struct grub_efi_pccard_device_path): New structure.
11993 (grub_efi_pccard_device_path_t): New type.
11994 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11995 (struct grub_efi_memory_mapped_device_path): New structure.
11996 (grub_efi_memory_mapped_device_path_t): New type.
11997 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11998 (struct grub_efi_vendor_device_path): New structure.
11999 (grub_efi_vendor_device_path_t): New type.
12000 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12001 (struct grub_efi_controller_device_path): New structure.
12002 (grub_efi_controller_device_path_t): New type.
12003 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12004 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12005 (struct grub_efi_acpi_device_path): New structure.
12006 (grub_efi_acpi_device_path_t): New type.
12007 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12008 (struct grub_efi_expanded_acpi_device_path): New structure.
12009 (grub_efi_expanded_acpi_device_path_t): New type.
12010 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12011 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12012 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12013 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12014 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12015 (struct grub_efi_atapi_device_path): New structure.
12016 (grub_efi_atapi_device_path_t): New type.
12017 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12018 (struct grub_efi_fibre_channel_device_path): New structure.
12019 (grub_efi_fibre_channel_device_path_t): New type.
12020 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12021 (struct grub_efi_1394_device_path): New structure.
12022 (grub_efi_1394_device_path_t): New type.
12023 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12024 (struct grub_efi_usb_device_path): New structure.
12025 (grub_efi_usb_device_path_t): New type.
12026 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12027 (struct grub_efi_usb_class_device_path): New structure.
12028 (grub_efi_usb_class_device_path_t): New type.
12029 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12030 (struct grub_efi_i2o_device_path): New structure.
12031 (grub_efi_i2o_device_path_t): New type.
12032 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12033 (struct grub_efi_mac_address_device_path): New structure.
12034 (grub_efi_mac_address_device_path_t): New type.
12035 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12036 (struct grub_efi_ipv4_device_path): New structure.
12037 (grub_efi_ipv4_device_path_t): New type.
12038 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12039 (struct grub_efi_ipv6_device_path): New structure.
12040 (grub_efi_ipv6_device_path_t): New type.
12041 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12042 (struct grub_efi_infiniband_device_path): New structure.
12043 (grub_efi_infiniband_device_path_t): New type.
12044 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12045 (struct grub_efi_uart_device_path): New structure.
12046 (grub_efi_uart_device_path_t): New type.
12047 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12048 (struct grub_efi_vendor_messaging_device_path): New structure.
12049 (grub_efi_vendor_messaging_device_path_t): New type.
12050 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12051 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12052 (struct grub_efi_hard_drive_device_path): New structure.
12053 (grub_efi_hard_drive_device_path_t): New type.
12054 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12055 (struct grub_efi_cdrom_device_path): New structure.
12056 (grub_efi_cdrom_device_path_t): New type.
12057 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12058 (struct grub_efi_vendor_media_device_path): New structure.
12059 (grub_efi_vendor_media_device_path_t): New type.
12060 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12061 (struct grub_efi_file_path_device_path): New structure.
12062 (grub_efi_file_path_device_path_t): New type.
12063 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12064 (struct grub_efi_protocol_device_path): New structure.
12065 (grub_efi_protocol_device_path_t): New type.
12066 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12067 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12068 (struct grub_efi_bios_device_path): New structure.
12069 (grub_efi_bios_device_path_t): New type.
12070 (struct grub_efi_disk_io): New structure.
12071 (grub_efi_disk_io_t): New type.
12072 (struct grub_efi_block_io_media): New structure.
12073 (grub_efi_block_io_media_t): New type.
12074 (struct grub_efi_block_io): New structure.
12075 (grub_efi_block_io_t): New type.
12077 * include/grub/misc.h (grub_stop): Removed.
12078 (grub_exit): New prototype.
12079 (grub_abort): Likewise.
12081 * include/grub/disk.h (enum grub_disk_dev_id): Added
12082 GRUB_DISK_DEVICE_EFIDISK_ID.
12084 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12085 disk/efi/efidisk.c.
12086 (kernel_syms.lst): Remove the target if an error occurs.
12088 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12090 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12091 as it was simply too buggy.
12093 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12095 * kern/misc.c (grub_lltoa): New function.
12096 (grub_vsprintf): Added support for the long long suffix,
12099 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12101 * Makefile.in (LDFLAGS): Add variable.
12102 (LD): Remove variable.
12103 * configure.ac: Add -m32 to LDFLAGS.
12104 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12105 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12106 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12107 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12108 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12110 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12111 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12112 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12114 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12116 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12117 length for unknown glyph.
12119 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12121 Add support for pre-loaded modules into the EFI port.
12123 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12124 completely. Accept one more argument DIR. The caller has changed.
12126 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12128 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12129 (grub_efi_loaded_image_guid): New variable.
12130 (grub_efi_get_loaded_image): New function.
12131 (grub_arch_modules_addr): Likewise.
12133 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12136 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12137 (struct grub_efi_loaded_image): New structure.
12138 (grub_efi_loaded_image_t): New type.
12140 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12142 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12143 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12144 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12146 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12148 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12150 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12152 * DISTLIST: Added include/grub/efi/console.h,
12153 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12154 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12156 * include/grub/efi/console.h: New file.
12157 * include/grub/efi/time.h: Likewise.
12158 * include/grub/i386/efi/kernel.h: Likewise.
12159 * kern/efi/init.c: Likewise.
12160 * kern/efi/mm.c: Likewise.
12161 * term/efi/console.c: Likewise.
12163 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12164 (grub_stop): Removed.
12165 (grub_get_rtc): Likewise.
12166 (grub_machine_init): Simply call grub_efi_init.
12167 (grub_machine_fini): Call grub_efi_fini.
12169 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12170 (grub_efi_output_string): Removed.
12171 (grub_efi_stall): New function.
12172 (grub_stop): Likewise.
12173 (grub_get_rtc): Likewise.
12175 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12176 (grub_efi_stall): New prototype.
12177 (grub_efi_allocate_pages): Likewise.
12178 (grub_efi_free_pages): Likewise.
12179 (grub_efi_get_memory_map): Likewise.
12180 (grub_efi_mm_init): Likewise.
12181 (grub_efi_mm_fini): Likewise.
12182 (grub_efi_init): Likewise.
12183 (grub_efi_fini): Likewise.
12185 * include/grub/i386/efi/time.h: Do not include
12186 grub/symbol.h. Include grub/efi/time.h.
12187 (GRUB_TICKS_PER_SECOND): Removed.
12188 (grub_get_rtc): Likewise.
12190 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12191 Added padding. The EFI spec is buggy.
12192 (GRUB_EFI_BLACK): New macro.
12193 (GRUB_EFI_BLUE): Likewise.
12194 (GRUB_EFI_GREEN): Likewise.
12195 (GRUB_EFI_CYAN): Likewise.
12196 (GRUB_EFI_RED): Likewise.
12197 (GRUB_EFI_MAGENTA): Likewise.
12198 (GRUB_EFI_BROWN): Likewise.
12199 (GRUB_EFI_LIGHTGRAY): Likewise.
12200 (GRUB_EFI_BRIGHT): Likewise.
12201 (GRUB_EFI_DARKGRAY): Likewise.
12202 (GRUB_EFI_LIGHTBLUE): Likewise.
12203 (GRUB_EFI_LIGHTGREEN): Likewise.
12204 (GRUB_EFI_LIGHTCYAN): Likewise.
12205 (GRUB_EFI_LIGHTRED): Likewise.
12206 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12207 (GRUB_EFI_YELLOW): Likewise.
12208 (GRUB_EFI_WHITE): Likewise.
12209 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12210 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12211 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12212 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12213 (GRUB_EFI_BACKGROUND_RED): Likewise.
12214 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12215 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12216 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12217 (GRUB_EFI_TEXT_ATTR): Likewise.
12219 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12220 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12221 (kernel_mod_HEADERS): Added efi/time.h.
12223 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12225 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12226 include/grub/efi/api.h, include/grub/efi/console_control.h,
12227 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12228 include/grub/i386/efi/time.h, kern/efi/efi.c,
12229 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12230 and util/i386/efi/grub-mkimage.c.
12232 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12234 * genmk.rb (PModule#rule): Do not export symbols if
12235 #{prefix}_EXPORTS is set to "no".
12237 * conf/i386-efi.mk: New file.
12238 * conf/i386-efi.rmk: Likewise.
12239 * include/grub/efi/api.h: Likewise.
12240 * include/grub/efi/console_control.h: Likewise.
12241 * include/grub/efi/efi.h: Likewise.
12242 * include/grub/efi/pe32.h: Likewise.
12243 * include/grub/i386/efi/time.h: Likewise.
12244 * kern/efi/efi.c: Likewise.
12245 * kern/i386/efi/init.c: Likewise.
12246 * kern/i386/efi/startup.S: Likewise.
12247 * util/i386/efi/grub-mkimage.c: Likewise.
12249 2006-04-17 Marco Gerards <marco@gnu.org>
12251 * include/grub/script.h: Include <grub/parser.h> and
12252 "grub_script.tab.h".
12253 (struct grub_lexer_param): New struct.
12254 (struct grub_parser_param): Likewise.
12255 (grub_script_create_arglist): Pass the state in an argument.
12256 (grub_script_add_arglist): Likewise.
12257 (grub_script_create_cmdline): Likewise.
12258 (grub_script_create_cmdblock): Likewise.
12259 (grub_script_create_cmdif): Likewise.
12260 (grub_script_create_cmdmenu): Likewise.
12261 (grub_script_add_cmd): Likewise.
12262 (grub_script_arg_add): Likewise.
12263 (grub_script_lexer_ref): Likewise.
12264 (grub_script_lexer_deref): Likewise.
12265 (grub_script_lexer_record_start): Likewise.
12266 (grub_script_lexer_record_stop): Likewise.
12267 (grub_script_mem_record): Likewise.
12268 (grub_script_mem_record_stop): Likewise.
12269 (grub_script_malloc): Likewise.
12270 (grub_script_yylex): Likewise.
12271 (grub_script_yyparse): Likewise.
12272 (grub_script_yyerror): Likewise.
12273 (grub_script_yylex): Likewise.
12274 (grub_script_lexer_init): Return the state.
12276 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12277 (grub_script_lexer_done): Likewise.
12278 (grub_script_lexer_getline): Likewise.
12279 (grub_script_lexer_refs): Likewise.
12280 (script): Likewise.
12281 (newscript): Likewise.
12282 (record): Likewise.
12283 (recording): Likewise.
12284 (recordpos): Likewise.
12285 (recordlen): Likewise.
12286 (grub_script_lexer_init): Return the state instead of setting
12288 (grub_script_lexer_ref): Use the newly added argument for state
12289 instead of globals.
12290 (grub_script_lexer_deref): Likewise.
12291 (grub_script_lexer_record_start): Likewise.
12292 (grub_script_lexer_record_stop): Likewise.
12293 (recordchar): Likewise.
12294 (nextchar): Likewise.
12295 (grub_script_yylex2): Likewise.
12296 (grub_script_yylex): Likewise.
12297 (grub_script_yyerror): Likewise.
12299 * normal/parser.y (func_mem): Removed variable.
12300 (menu_entry): Likewise.
12302 (%lex-param): New parser option.
12303 (%parse-param): Likewise.
12304 (script): Always return the AST.
12305 (argument): Pass the state around.
12306 (arguments): Likewise.
12307 (grubcmd): Likewise.
12308 (commands): Likewise.
12309 (function): Likewise.
12310 (menuentry): Likewise.
12311 (if_statement): Likewise.
12314 * normal/script.c (grub_script_memused): Removed variable.
12315 (grub_script_parsed): Likewise.
12316 (grub_script_malloc): Added a state argument. Use that instead of
12318 (grub_script_mem_record): Likewise.
12319 (grub_script_mem_record_stop): Likewise.
12320 (grub_script_arg_add): Likewise.
12321 (grub_script_add_arglist): Likewise.
12322 (grub_script_create_cmdline): Likewise.
12323 (grub_script_create_cmdif): Likewise.
12324 (grub_script_create_cmdmenu): Likewise.
12325 (grub_script_add_cmd): Likewise.
12326 (grub_script_parse): Setup the state before calling the parser.
12328 2006-04-16 Marco Gerards <marco@gnu.org>
12330 * normal/command.c (grub_command_init): Remove the title command.
12332 * normal/lexer.c (grub_script_yylex): Renamed from this...
12333 (grub_script_yylex2): ... to this.
12334 (grub_script_yylex): New function. Temporary
12335 introduced to filter some tokens.
12336 (grub_script_yyerror): Print a newline.
12338 * normal/main.c (read_config_file): Output information about the
12339 lines that contain errors. Wait for a key after all lines have
12340 been processed. Don't return an empty menu.
12342 * normal/parser.y (func_mem): Don't initialize.
12343 (menu_entry): Likewise.
12344 (err): New variable.
12345 (script): Don't return anything when an error was encountered.
12346 (ws, returns): Removed rules.
12347 (argument): Disabled concatenated variable support.
12348 (arguments): Remove explicit separators.
12349 (grubcmd): Likewise.
12350 (function): Likewise.
12351 (menuentry): Likewise.
12353 (commands): Likewise. Add error handling.
12355 * normal/script.c (grub_script_create_cmdline): If
12356 `grub_script_parsed' is 0, assume the parser encountered an error.
12358 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12360 * configure.ac: Add support for EFI. Fix the typo
12361 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12363 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12365 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12366 foreign multibyte characters should be shown correctly.
12368 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12370 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12372 (read_config_file): Made it to close file before returning.
12374 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12376 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12377 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12378 video/i386/pc/vbefill.c.
12380 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12381 video/i386/pc/vbefill.c.
12383 * include/grub/video.h (grub_video_blit_format): New enum.
12384 (grub_video_mode_info): Added new member blit_format.
12385 (grub_video_get_blit_format): New function prototype.
12387 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12388 function prototype.
12389 (grub_video_vbe_map_rgb): Likewise.
12390 (grub_video_vbe_unmap_color): Likewise.
12392 * include/grub/i386/pc/vbeblit.h: New file.
12394 * include/grub/i386/pc/vbefill.h: New file.
12396 * video/video.c (grub_video_get_blit_format): New function.
12397 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12398 (grub_video_vbe_map_rgb): Likewise.
12399 (grub_video_vbe_unmap_color): Likewise.
12401 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12403 (grub_video_vbe_blit_render_target): Changed to use more optimized
12405 (grub_video_vbe_setup): Added detection for optimized settings.
12406 (grub_video_vbe_create_render_target): Likewise.
12408 * video/i386/pc/vbeblit.c: New file.
12410 * video/i386/pc/vbefill.c: New file.
12412 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12414 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12417 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12418 parsing to support both hex and dec ranges. If filename was missing
12419 show usage information.
12421 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12423 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12424 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12426 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12427 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12428 (video_mod_SOURCES): Added.
12429 (video_mod_CFLAGS): Likewise.
12430 (video_mod_LDFLAGS): Likewise.
12431 (gfxterm_mod_SOURCES): Likewise.
12432 (gfxterm_mod_CFLAGS): Likewise.
12433 (gfxterm_mod_LDFLAGS): Likewise.
12434 (videotest_mod_SOURCES): Likewise.
12435 (videotest_mod_CFLAGS): Likewise.
12436 (videotest_mod_LDFLAGS): Likewise.
12437 (vesafb_mod_SOURCES): Removed.
12438 (vesafb_mod_CFLAGS): Likewise.
12439 (vesafb_mod_LDFLAGS): Likewise.
12440 (vga_mod_SOURCES): Likewise.
12441 (vga_mod_CFLAGS): Likewise.
12442 (vga_mod_LDFLAGS): Likewise.
12444 * commands/videotest.c: New file.
12446 * font/manager.c (fill_with_default_glyph): Modified to use
12448 (grub_font_get_glyph): Likewise.
12449 (fontmanager): Renamed from this...
12450 (font_manager): ... to this.
12452 * include/grub/font.h (grub_font_glyph): Added new structure.
12453 (grub_font_get_glyph): Modified to use grub_font_glyph.
12455 * include/grub/misc.h (grub_abs): Added as inline function.
12457 * include/grub/video.h: New file.
12459 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12460 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12461 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12462 (grub_vbe_get_controller_info): Renamed from this...
12463 (grub_vbe_bios_get_controller_info): ... to this.
12464 (grub_vbe_get_mode_info): Renamed from this...
12465 (grub_vbe_bios_get_mode_info): ... to this.
12466 (grub_vbe_set_mode): Renamed from this...
12467 (grub_vbe_bios_set_mode): ... to this.
12468 (grub_vbe_get_mode): Renamed from this...
12469 (grub_vbe_bios_get_mode): ... to this.
12470 (grub_vbe_set_memory_window): Renamed from this...
12471 (grub_vbe_bios_set_memory_window): ... to this.
12472 (grub_vbe_get_memory_window): Renamed from this...
12473 (grub_vbe_bios_get_memory_window): ... to this.
12474 (grub_vbe_set_scanline_length): Renamed from this...
12475 (grub_vbe_set_scanline_length): ... to this.
12476 (grub_vbe_get_scanline_length): Renamed from this...
12477 (grub_vbe_bios_get_scanline_length): ... to this.
12478 (grub_vbe_set_display_start): Renamed from this...
12479 (grub_vbe_bios_set_display_start): ... to this.
12480 (grub_vbe_get_display_start): Renamed from this...
12481 (grub_vbe_bios_get_display_start): ... to this.
12482 (grub_vbe_set_palette_data): Renamed from this...
12483 (grub_vbe_bios_set_palette_data): ... to this.
12484 (grub_vbe_set_pixel_rgb): Removed.
12485 (grub_vbe_set_pixel_index): Likewise.
12487 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12489 (grub_vbe_bios_get_controller_info): ... to this.
12490 (grub_vbe_get_mode_info): Renamed from this...
12491 (grub_vbe_bios_get_mode_info): ... to this.
12492 (grub_vbe_set_mode): Renamed from this...
12493 (grub_vbe_bios_set_mode): ... to this.
12494 (grub_vbe_get_mode): Renamed from this...
12495 (grub_vbe_bios_get_mode): ... to this.
12496 (grub_vbe_set_memory_window): Renamed from this...
12497 (grub_vbe_bios_set_memory_window): ... to this.
12498 (grub_vbe_get_memory_window): Renamed from this...
12499 (grub_vbe_bios_get_memory_window): ... to this.
12500 (grub_vbe_set_scanline_length): Renamed from this...
12501 (grub_vbe_set_scanline_length): ... to this.
12502 (grub_vbe_get_scanline_length): Renamed from this...
12503 (grub_vbe_bios_get_scanline_length): ... to this.
12504 (grub_vbe_set_display_start): Renamed from this...
12505 (grub_vbe_bios_set_display_start): ... to this.
12506 (grub_vbe_get_display_start): Renamed from this...
12507 (grub_vbe_bios_get_display_start): ... to this.
12508 (grub_vbe_set_palette_data): Renamed from this...
12509 (grub_vbe_bios_set_palette_data): ... to this.
12510 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12511 getting corrupted after calling it. Added more pushes and pops.
12512 (grub_vbe_bios_set_mode): Likewise.
12513 (grub_vbe_bios_get_mode): Likewise.
12514 (grub_vbe_bios_get_memory_window): Likewise.
12515 (grub_vbe_bios_set_scanline_length): Likewise.
12516 (grub_vbe_bios_get_scanline_length): Likewise.
12517 (grub_vbe_bios_get_display_start): Likewise.
12518 (grub_vbe_bios_set_palette_data): Likewise.
12520 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12521 (cl_insert): Likewise.
12522 (cl_delete): Likewise.
12524 * term/gfxterm.c: New file.
12526 * term/i386/pc/vesafb.c: Removed file.
12528 * video/video.c: New file.
12530 * video/i386/pc/vbe.c (real2pm): Added new function.
12531 (grub_video_vbe_draw_pixel): Likewise.
12532 (grub_video_vbe_get_video_ptr): Likewise.
12533 (grub_video_vbe_get_pixel): Likewise
12534 (grub_video_vbe_init): Likewise.
12535 (grub_video_vbe_fini): Likewise.
12536 (grub_video_vbe_setup): Likewise.
12537 (grub_video_vbe_get_info): Likewise.
12538 (grub_video_vbe_set_palette): Likewise.
12539 (grub_video_vbe_get_palette): Likewise.
12540 (grub_video_vbe_set_viewport): Likewise.
12541 (grub_video_vbe_get_viewport): Likewise.
12542 (grub_video_vbe_map_color): Likewise.
12543 (grub_video_vbe_map_rgb): Likewise.
12544 (grub_video_vbe_map_rgba): Likewise.
12545 (grub_video_vbe_unmap_color): Likewise.
12546 (grub_video_vbe_fill_rect): Likewise.
12547 (grub_video_vbe_blit_glyph): Likewise.
12548 (grub_video_vbe_blit_bitmap): Likewise.
12549 (grub_video_vbe_blit_render_target): Likewise.
12550 (grub_video_vbe_scroll): Likewise.
12551 (grub_video_vbe_swap_buffers): Likewise.
12552 (grub_video_vbe_create_render_target): Likewise.
12553 (grub_video_vbe_delete_render_target): Likewise.
12554 (grub_video_vbe_set_active_render_target): Likewise.
12555 (grub_vbe_set_pixel_rgb): Remove function.
12556 (grub_vbe_set_pixel_index): Likewise.
12557 (index_color_mode): Remove static variable.
12558 (active_mode): Likewise.
12559 (framebuffer): Likewise.
12560 (bytes_per_scan_line): Likewise.
12561 (grub_video_vbe_adapter): Added new static variable.
12562 (framebuffer): Likewise.
12563 (render_target): Likewise.
12564 (initial_mode): Likewise.
12565 (mode_in_use): Likewise.
12566 (mode_list): Likewise.
12568 2006-03-10 Marco Gerards <marco@gnu.org>
12570 * configure.ac (AC_INIT): Bumped to 1.93.
12572 * DISTLIST: Added `include/grub/hfs.h'.
12574 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12576 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12577 18H, which might help the BIOS falling back to next boot media.
12579 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12581 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12582 Poe Chen <poe.poechen@gmail.com>.
12584 2006-01-17 Marco Gerards <marco@gnu.org>
12586 * include/grub/normal.h: Include <grub/script.h>.
12587 (grub_command_list): Removed struct.
12588 (grub_command_list_t): Removed type.
12589 (grub_menu_entry): Remove members `num' and `command_list'. Add
12590 members `commands' and `sourcecode'.
12591 * include/grub/script.h: Add inclusion guards.
12592 (grub_script_cmd_menuentry): New struct.
12593 (grub_script_execute_menuentry): New prototype.
12594 (grub_script_lexer_record_start): Likewise.
12595 (grub_script_lexer_record_stop): Likewise.
12596 * normal/execute.c (grub_script_execute_menuentry): New function.
12597 * normal/lexer.c (record, recording, recordpos, recordlen): New
12599 (grub_script_lexer_record_start): New function.
12600 (grub_script_lexer_record_stop): Likewise.
12601 (recordchar): Likewise.
12602 (nextchar): Likewise.
12603 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12604 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12605 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12606 (current_menu): New variable.
12607 (free_menu): Mainly rewritten.
12608 (grub_normal_menu_addentry): New function.
12609 (read_config_file): Rewritten.
12610 * normal/menu.c (run_menu_entry): Mainly rewritten.
12611 * normal/menu_entry.c (make_screen): Rewritten the code to insert
12613 (run): Mainly rewritten.
12614 * normal/parser.y (menu_entry): New variable.
12615 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12616 (menuentry): New rule.
12617 (command): Add `menuentry'.
12618 (if_statement): Allow additional returns before `fi'.
12619 * normal/script.c (grub_script_create_cmdmenu): New function.
12621 2006-01-03 Marco Gerards <marco@gnu.org>
12623 * INSTALL: GNU Bison is required.
12624 * configure.ac: Rewritten the test to detect Bison.
12625 * Makefile.in (YACC): New variable. Reported by Xun Sun
12626 <xun.sun.cn@gmail.com>.
12628 2006-01-03 Marco Gerards <marco@gnu.org>
12630 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12631 the HFS+ filesystem to filesystem blocks.
12632 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12633 GCC warning is silenced.
12635 2006-01-03 Marco Gerards <marco@gnu.org>
12637 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12638 read from disk from big endian to host byte order.
12640 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12642 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12644 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12645 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12646 embedded HFS+ filesystem.
12647 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12648 (grub_hfs_sblock): Move from here...
12649 * include/grub/hfs.h: To here... New file.
12650 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12652 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12654 (grub_hfsplus_volheader): Change type of member `magic' to
12656 (grub_hfsplus_data): Add new member `embedded_offset'.
12657 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12659 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12660 Calculate the offset.
12662 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12664 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12666 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12668 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12670 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12671 ENV->NAME is NULL after allocating ENV->VALUE.
12673 2005-12-25 Marco Gerards <marco@gnu.org>
12675 * kern/env.c (grub_env_set): Rewritten the error handling code.
12677 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12679 * geninit.sh: Made more robust, and more portable.
12681 2005-12-25 Marco Gerards <marco@gnu.org>
12683 Add support for Apple HFS+ filesystems.
12685 * fs/hfsplus.c: New file.
12687 * DISTLIST: Added `fs/hfsplus.c'.
12689 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12690 (hfsplus_mod_SOURCES): New variable.
12691 (hfsplus_mod_CFLAGS): Likewise.
12692 (hfsplus_mod_LDFLAGS): Likewise.
12693 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12694 (grub_setup_SOURCES): Likewise.
12695 (grub_mkdevicemap_SOURCES): Likewise.
12696 (grub_emu_SOURCES): Likewise.
12697 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12699 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12701 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12703 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12705 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12706 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12707 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12708 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12709 normal/lexer.c, normal/parser.y, normal/script.c, and
12711 Removed kern/sparc64/cache.c.
12713 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12714 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12717 * configure.ac (AC_INIT): Bumped to 1.92.
12719 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12721 * kern/err.c (grub_error_push): Added new function to support error
12723 (grub_error_pop): Likewise.
12724 (grub_error_stack_items): New local variable to support error stacks.
12725 (grub_error_stack_pos): Likewise.
12726 (grub_error_stack_assert): Likewise.
12727 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12729 (grub_print_error): Added support to print errors from error stack.
12731 * include/grub/err.h (grub_error_push): Added function prototype.
12732 (grub_error_pop): Likewise.
12734 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12736 * configure.ac: Accept `powerpc64' as host_cpu.
12737 (amd64): Rename to `biarch32'.
12739 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12740 non-cacheline-aligned addresses.
12742 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12743 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12744 if `size' is non-zero.
12746 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
12748 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12749 and `cd' to make sure the filename is not prefixed with a
12751 (pkgdata_MODULES): Add `gpt.mod'.
12752 (gpt_mod_SOURCES): New variable.
12753 (gpt_mod_CFLAGS): Likewise.
12754 (gpt_mod_LDFLAGS): Likewise.
12756 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12758 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12761 * partmap/gpt.c: New file.
12763 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12764 GPT partition map is detected.
12766 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12768 * commands/i386/pc/play.c: New file.
12769 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12770 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12773 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
12775 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12776 ((unused))' to silence gcc warning.
12778 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12780 * configure.ac: Correct `AC_PROG_YACC' test.
12782 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12784 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12785 check before installing files.
12787 2005-11-22 Mike Small <smallm@panix.com>
12789 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12790 number regex so multidigit numbers are recognized correctly.
12792 2005-11-22 Mike Small <smallm@panix.com>
12794 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12795 debugging message before attempting to claim memory.
12796 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12797 multiple addresses in case of failure.
12799 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12801 * term/tparm.c (get_space): Remove empty `if' statement.
12803 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12805 * kern/parser.c (check_varstate): Rename `state' to 's'.
12807 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12809 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12810 variable definitions to the beginning of each function. Sort stack
12812 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12813 `buf' argument to `char *'.
12815 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12817 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12818 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12819 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12820 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12821 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12822 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12823 configfile.mod, search.mod, gzio.mod and test.mod.
12824 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12825 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12826 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12827 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12828 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12829 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12830 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12831 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12832 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12833 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12834 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12835 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12836 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12837 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12838 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12839 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12840 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12841 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12842 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12843 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12844 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12845 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12846 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12848 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12850 (pkgdata_MODULES): Add test.mod.
12852 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12854 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12855 appending to variables with "+=".
12856 (PModule): Use full pathname to generate *.lst filenames.
12858 * Makefile.in: Fixed list rules moved from genmk.rb.
12859 (.DELETE_ON_ERROR): New special target.
12860 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12862 * conf/i386-pc.rmk: Include conf/common.mk.
12863 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12864 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12865 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12866 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12867 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12868 configfile.mod, search.mod, gzio.mod and test.mod.
12869 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12870 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12871 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12872 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12873 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12874 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12875 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12876 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12877 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12878 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12879 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12880 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12881 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12882 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12883 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12884 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12885 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12886 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12887 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12888 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12889 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12890 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12891 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12893 * conf/common.rmk: ... to here. New file.
12895 * conf/common.mk: New file.
12897 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12899 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12900 (grub_script.tab.c): ... here.
12902 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12903 (grub_script.tab.c): ... here.
12905 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12906 (grub_script.tab.c): ... here.
12908 * normal/command.c (grub_command_find): Fixed a memory leak of
12909 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12911 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12913 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12914 "@" which marks the start of a comment on ARM.
12915 (VARIABLE): Likewise.
12917 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12919 Add support for Linux/ADFS partition tables.
12921 * partmap/acorn.c: New file.
12923 * include/grub/acorn_filecore.h: Likewise.
12925 * DISTLIST: Added `partmap/acorn.c' and
12926 `include/grub/acorn_filecore.h'.
12928 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12930 (pkgdata_MODULES): Add `acorn.mod'.
12931 (acorn_mod_SOURCES): New variable.
12932 (acorn_mod_CFLAGS): Likewise.
12934 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12936 (pkgdata_MODULES): Add `acorn.mod'.
12937 (acorn_mod_SOURCES): New variable.
12938 (acorn_mod_CFLAGS): Likewise.
12940 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12941 (pkgdata_MODULES): Add `acorn.mod'.
12942 (acorn_mod_SOURCES): New variable.
12943 (acorn_mod_CFLAGS): Likewise.
12944 (acorn_mod_LDFLAGS): Likewise.
12946 * include/types.h (grub_disk_addr_t): New typedef.
12948 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
12950 * geninit.sh: New file.
12952 * geninitheader.sh: Likewise.
12954 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12955 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12956 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12957 * commands/configfile.c (grub_configfile_init)
12958 (grub_configfile_fini): Likewise.
12959 * commands/default.c (grub_default_init, grub_default_fini):
12961 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12962 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12963 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12964 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12966 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12967 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12969 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
12970 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
12972 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12974 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
12976 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12977 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12978 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12979 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12980 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12981 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12982 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12983 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12984 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12985 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12986 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12987 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12988 * partmap/amiga.c (grub_amiga_partition_map_init)
12989 (grub_amiga_partition_map_fini): Likewise.
12990 * partmap/apple.c (grub_apple_partition_map_init)
12991 (grub_apple_partition_map_fini): Likewise.
12992 * partmap/pc.c (grub_pc_partition_map_init)
12993 (grub_pc_partition_map_fini): Likewise.
12994 * partmap/sun.c (grub_sun_partition_map_init,
12995 grub_sun_partition_map_fini): Likewise.
12996 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12999 * util/grub-emu.c: Include <grub_modules_init.h>.
13000 (main): Don't initialize and de-initialize any modules directly,
13001 use `grub_init_all' and `grub_fini_all' instead.
13003 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13004 `grub_vesafb_mod_init'.
13005 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13007 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13008 `grub_vga_mod_init'. Updated all users.
13009 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13011 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13012 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13015 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13016 Generate a function to initialize the module in utilities.
13017 Updated all callers.
13018 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13019 initialize the module in utilities. Updated all callers.
13021 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13023 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13024 escape sequence and a literal ^L to clear the screen.
13026 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13027 when returning from Open Firmware.
13029 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13031 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13032 (grub_ofconsole_height): Likewise.
13033 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13034 manually insert a '\n'.
13035 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13036 `grub_ofconsole_height'. Return early if these are already set.
13038 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13040 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13041 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13042 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13043 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13044 and `normal/script.c'.
13045 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13046 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13047 (test_mod_SOURCES): New variable.
13048 (test_mod_CFLAGS): Likewise.
13049 (test_mod_LDFLAGS): Likewise.
13050 (pkgdata_MODULES): Add `test.mod'.
13051 (grub_script.tab.c): New rule.
13052 (grub_script.tab.h): Likewise.
13054 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
13056 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13057 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13058 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13059 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13060 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13061 (test_mod_SOURCES): New variable.
13062 (test_mod_CFLAGS): Likewise.
13063 (pkgdata_MODULES): Add `test.mod'.
13064 (grub_script.tab.c): New rule.
13065 (grub_script.tab.h): Likewise.
13067 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
13069 Add initial scripting support.
13071 * commands/test.c: New file.
13072 * include/grub/script.h: Likewise.
13073 * normal/execute.c: Likewise.
13074 * normal/function.c: Likewise.
13075 * normal/lexer.c: Likewise.
13076 * normal/parser.y: Likewise.
13077 * normal/script.c: Likewise.
13079 * configure.ac: Add `AC_PROG_YACC' test.
13081 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13082 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13083 `normal/function.c' and `normal/script.c'.
13084 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13085 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13086 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13088 (pkgdata_MODULES): Add `test.mod'.
13089 (grub_script.tab.c): New rule.
13090 (grub_script.tab.h): Likewise.
13092 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13094 * include/grub/normal.h (grub_test_init): New prototype.
13095 (grub_test_fini): Likewise.
13097 * normal/command.c: Include <grub/script.h>.
13098 (grub_command_execute): Rewritten.
13100 * util/grub-emu.c (main): Call `grub_test_init' and
13103 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13105 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13107 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13108 there are no pending characters.
13110 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13112 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13113 `grub_strndup' to drop device arguments. Replace unnecessary
13114 `grub_strndup' with `grub_strdup'.
13116 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13118 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13119 `debug' environment variable has been set.
13121 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
13123 * Makefile.in (install-local): Use $(DATA).
13124 (uninstall): Likewise.
13125 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13126 (sbin_UTILITIES): ... to here.
13127 (sbin_SCRIPTS): New variable.
13128 (grub_install_SOURCES): New variable.
13129 * util/powerpc/ieee1275/grub-install.in: New file.
13130 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13132 (add_segments): Call `grub_util_get_path'.
13134 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13136 From Timothy Baldwin:
13137 * commands/ls.c (grub_ls_list_files): Close FILE with
13139 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13141 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
13143 * include/grub/parser.h: New file.
13145 * kern/parser.c: Likewise.
13147 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13148 (grub_setup_SOURCES): Likewise.
13149 (grub_probefs_SOURCES): Likewise.
13150 (grub_emu_SOURCES): Likewise.
13151 (kernel_img_HEADERS): Add `parser.h'.
13153 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13154 (grub_emu_SOURCES): Add `kern/parser.c'.
13155 (grubof_SOURCES): Likewise.
13157 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13158 (grubof_SOURCES): Add `kern/parser.c'.
13160 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13162 * kern/misc.c (grub_split_cmdline): Removed function.
13164 * kern/rescue.c: Include <grub/parser.h>.
13165 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13166 of `grub_split_cmdline'.
13168 * normal/command.c: Include <grub/parser.h>.
13169 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13170 of `grub_split_cmdline'.
13172 * normal/completion.c: Include <grub/parser.h>.
13173 (cmdline_state): New variable.
13174 (iterate_dir): End the filename with a quote depending on the
13175 command line state.
13176 (get_state): new function.
13177 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13178 split the arguments and determine the current argument. When the
13179 argument string is not quoted, escape all spaces.
13181 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13183 * normal/sparc64/setjmp.S: New file.
13185 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13187 * include/grub/sparc64/libgcc.h: New file.
13188 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13189 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13190 normal/sparc64/setjmp.c.
13192 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13194 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13195 * kern/sparc64/cache.S: New file.
13196 * kern/sparc64/cache.c: Removed.
13197 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13198 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13200 (COMMON_LDFLAGS): Add -melf64_sparc.
13201 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13202 (grubof_SOURCES): Use cache.S instead of cache.c.
13203 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13204 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13205 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13207 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13208 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13209 (linux_mod_CFLAGS): Commented out.
13210 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13211 out because module isn't built.
13212 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13213 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13214 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13215 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13216 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13217 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13218 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13219 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13220 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13221 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13222 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13223 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13224 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13225 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13227 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13229 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13230 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13231 longer, because HFS should not be used on PC.
13233 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13235 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13236 consistently within the loop.
13238 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
13240 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13241 directory can not be read.
13243 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13245 * configure.ac (AC_INIT): Increase the version number to 1.91.
13247 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13248 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13249 term/i386/pc/serial.c.
13251 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13253 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13254 file size must be permitted.
13256 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13257 between %ah and %al.
13259 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13261 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13263 Call the hook with a NUL-terminated filename.
13264 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13267 * kern/term.c (cursor_state): New variable.
13268 (grub_term_set_current): Reset the cursor state on a new
13270 (grub_setcursor): Rewritten to use CURSOR_STATE.
13271 (grub_getcursor): New function.
13273 * include/grub/term.h (grub_getcursor): New prototype.
13275 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13276 integers on ARM. Reported by Timothy Baldwin
13277 <T.E.Baldwin99@members.leeds.ac.uk>.
13279 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
13281 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13283 (grub_sfs_dir): Likewise.
13285 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
13287 Add support for the SFS filesystem.
13289 * fs/sfs.c: New file.
13291 * DISTLIST: Added `fs/sfs.c'.
13293 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13294 (grub_probefs_SOURCES): Likewise.
13295 (grub_emu_SOURCES): Likewise.
13296 (pkgdata_MODULES): Add `sfs.mod'.
13297 (sfs_mod_SOURCES): New variable.
13298 (sfs_mod_CFLAGS): Likewise.
13299 (sfs_mod_LDFLAGS): Likewise.
13301 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13302 (pkgdata_MODULES): Add `sfs.mod'.
13303 (sfs_mod_SOURCES): New variable.
13304 (sfs_mod_CFLAGS): Likewise.
13306 * util/grub-emu.c (main): Call `grub_sfs_init' and
13309 * include/grub/fs.h (grub_sfs_init): New prototype.
13310 (grub_sfs_fini): Likewise.
13312 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
13314 Add support for the AFFS filesystem.
13316 * fs/affs.c: New file.
13318 * DISTLIST: Added `fs/affs.c'.
13320 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13321 (grub_probefs_SOURCES): Likewise.
13322 (grub_emu_SOURCES): Likewise.
13323 (pkgdata_MODULES): Add `affs.mod'.
13324 (affs_mod_SOURCES): New variable.
13325 (affs_mod_CFLAGS): Likewise.
13326 (affs_mod_LDFLAGS): Likewise.
13328 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13329 (pkgdata_MODULES): Add `affs.mod'.
13330 (affs_mod_SOURCES): New variable.
13331 (affs_mod_CFLAGS): Likewise.
13333 * util/grub-emu.c (main): Call `grub_affs_init' and
13336 * include/grub/fs.h (grub_affs_init): New prototype.
13337 (grub_affs_fini): Likewise.
13339 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13341 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13343 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13345 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13348 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13351 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13352 (COMMON_LDFLAGS): New variable.
13353 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13354 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13355 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13356 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13357 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13358 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13359 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13360 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13361 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13362 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13363 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13364 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13365 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13366 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13367 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13369 (normal_mod_ASFLAGS): Add `-m32'.
13371 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13372 (grub_host_size_t, grub_host_ssize_t): New types.
13373 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13374 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13375 `GRUB_HOST_SIZEOF_VOID_P'.
13377 * include/grub/kernel.h (struct grub_module_header): Type of
13378 member offset changed to `grub_host_off_t'. Type of member size
13379 changed to `grub_host_size_t'.
13380 (struct grub_module_info): Type of member offset changed to
13381 `grub_host_off_t'. Type of member size changed to
13382 `grub_host_size_t'.
13384 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13386 Make GRUB's kernel compliant to Multiboot Specification.
13388 * kern/i386/pc/startup.S (multiboot_header): New label.
13389 (multiboot_entry): Likewise.
13390 (multiboot_trampoline): Likewise.
13392 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13393 Increased to 0x4A0.
13395 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13396 put parentheses after a question mark.
13397 [!GRUB_UTIL] (my_mod): New variable.
13399 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13401 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
13403 Adds support for the XFS filesystem. Btrees are not supported
13406 * fs/xfs.c: New file.
13408 * DISTLIST: Added `fs/xfs.c'.
13410 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13411 (grub_probefs_SOURCES): Likewise.
13412 (grub_emu_SOURCES): Likewise.
13413 (pkgdata_MODULES): Add `xfs.mod'.
13414 (xfs_mod_SOURCES): New variable.
13415 (xfs_mod_CFLAGS): Likewise.
13417 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13418 (pkgdata_MODULES): Add `xfs.mod'.
13419 (xfs_mod_SOURCES): New variable.
13420 (xfs_mod_CFLAGS): Likewise.
13422 * util/grub-emu.c (main): Call `grub_xfs_init' and
13425 * include/grub/fs.h (grub_xfs_init): New prototype.
13426 (grub_xfs_fini): Likewise.
13429 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13431 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13432 color modes, allow greater than 16 colors to be configured as
13435 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13437 * normal/completion.c (complete_arguments): Add the qualifier
13438 const into OPTIONS.
13440 From Omniflux <omniflux+lists@omniflux.com>:
13441 * include/grub/terminfo.h: New file.
13442 * include/grub/tparm.h: Likewise.
13443 * include/grub/i386/pc/serial.h: Likewise.
13444 * term/terminfo.c: Likewise.
13445 * term/tparm.c: Likewise.
13446 * term/i386/pc/serial.c: Likewise.
13447 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13449 (terminfo_mod_SOURCES): New variable.
13450 (terminfo_mod_CFLAGS): Likewise.
13451 (serial_mod_SOURCES): Likewise.
13452 (serial_mod_CFLAGS): Likewise.
13454 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13456 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13457 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13458 and kern/powerpc/ieee1275/cmain.c, respectively.
13460 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13461 * kern/powerpc/ieee1275/crt0.S: ... here.
13463 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13464 * kern/powerpc/ieee1275/cmain.c: ... here.
13466 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13467 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13468 instead of boot/powerpc/ieee1275/crt0.S and
13469 boot/powerpc/ieee1275/cmain.c, respectively.
13471 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13472 sectors. It was not used anyway.
13474 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13476 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13477 `unused parameter' warning.
13479 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13481 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13483 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13486 2005-08-28 Marco Gerards <metgerards@student.han.nl>
13488 * include/grub/normal.h (enum grub_completion_type): Added
13489 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13491 * normal/cmdline.c (print_completion): Handle
13492 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13493 * normal/menu_entry.c (store_completion): Likewise.
13495 * normal/completion.c (complete_arguments): New function.
13496 (grub_normal_do_completion): Call `complete_arguments' when the
13497 current words start with a dash.
13499 2005-08-27 Marco Gerards <metgerards@student.han.nl>
13501 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13502 `gzio.mod' instead of `io.mod').
13504 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13506 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13507 (DISTDIRS): Added io and video.
13508 Rewrite the search routine to make an output consistently.
13510 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13511 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13512 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13513 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13514 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13515 util/powerpc/ieee1275/misc.c.
13517 * include/grub/gzio.h: New file.
13518 * io/gzio.c: Likewise.
13520 * kern/file.c (grub_file_close): Call grub_device_close only if
13521 FILE->DEVICE is not NULL.
13523 * include/grub/mm.h [!NULL] (NULL): New macro.
13525 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13527 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13528 (pkgdata_MODULES): Added gzio.mod.
13529 (gzio_mod_SOURCES): New variable.
13530 (gzio_mod_CFLAGS): Likewise.
13532 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13533 (pkgdata_MODULES): Added gzio.mod.
13534 (gzio_mod_SOURCES): New variable.
13535 (gzio_mod_CFLAGS): Likewise.
13537 * commands/cat.c: Include grub/gzio.h.
13538 (grub_cmd_cat): Use grub_gzfile_open instead of
13541 * commands/cmp.c: Include grub/gzio.h.
13542 (grub_cmd_cmp): Use grub_gzfile_open instead of
13545 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13546 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13548 (grub_rescue_cmd_module): Likewise.
13550 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13552 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13553 kern/sparc64/ieee1275/init.c because it contains _start.
13554 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13556 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13558 * configure.ac: Add support for sparc64 host with ieee1275
13560 * configure: Generated from configure.ac.
13561 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13563 (grub_ofdisk_read): Likewise.
13564 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13565 pointers as (void *) to remove a warning.
13566 (grub_ofdisk_close): Likewise.
13567 (grub_ofdisk_read): Likewise.
13568 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13569 returns, so make it return void to remove a warning.
13570 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13571 Corresponding prototype change.
13572 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13573 values, and cast the pointers as (void *) to remove a warning.
13574 (grub_mm_dump): Likewise.
13575 * conf/sparc64-ieee1275.mk: New file.
13576 * conf/sparc64-ieee1275.rmk: Likewise.
13577 * include/grub/sparc64/setjmp.h: Likewise.
13578 * include/grub/sparc64/types.h: Likewise.
13579 * include/grub/sparc64/ieee1275/console.h: Likewise.
13580 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13581 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13582 * include/grub/sparc64/ieee1275/time.h: Likewise.
13583 * kern/sparc64/cache.c: Likewise.
13584 * kern/sparc64/dl.c: Likewise.
13585 * kern/sparc64/ieee1275/init.c: Likewise.
13586 * kern/sparc64/ieee1275/openfw.c: Likewise.
13588 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13590 * util/console.c (grub_ncurses_putchar): If C is greater than
13591 0x7f, set C to a question mark.
13592 (grub_ncurses_getcharwidth): New function.
13593 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13596 * normal/menu.c (print_entry): Made aware of Unicode. First,
13597 convert TITLE to UCS-4, and predict the cursor position by
13600 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13602 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13604 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13606 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13607 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13610 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13611 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13612 grub_strcpy and grub_strlen. Take it into account that a space
13613 character is inserted as a delimiter.
13615 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13617 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13618 invalid magic in the error.
13620 * commands/search.c: New file.
13622 * util/grub-emu.c (main): Call grub_search_init and
13625 * kern/rescue.c (grub_rescue_print_disks): Removed.
13626 (grub_rescue_print_devices): New function.
13627 (grub_rescue_cmd_ls): Use grub_device_iterate with
13628 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13629 grub_rescue_print_disks.
13631 * kern/partition.c (grub_partition_iterate): Return the result of
13632 PARTMAP->ITERATE instead of GRUB_ERRNO.
13634 * kern/device.c: Include grub/partition.h.
13635 (grub_device_iterate): New function.
13637 * include/grub/partition.h (grub_partition_iterate): Return int
13638 instead of grub_err_t.
13640 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13642 [GRUB_UTIL] (grub_search_fini): Likewise.
13644 * include/grub/device.h (grub_device_iterate): New prototype.
13646 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13648 (pkgdata_MODULES): Added search.mod.
13649 (search_mod_SOURCES): New variable.
13650 (search_mod_CFLAGS): Likewise.
13652 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13653 (pkgdata_MODULES): Added search.mod.
13654 (search_mod_SOURCES): New variable.
13655 (search_mod_CFLAGS): Likewise.
13657 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13658 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13659 All callers changed.
13661 * DISTLIST: Added commands/search.c.
13663 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13665 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13667 (grub_getcharwidth): New function.
13669 * kern/misc.c (grub_utf8_to_ucs4): New function.
13671 * include/grub/term.h (struct grub_term): Added a new member
13673 (grub_getcharwidth): New prototype.
13675 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13677 * term/i386/pc/console.c (map_char): New function. Segregated from
13678 grub_console_putchar.
13679 (grub_console_putchar): Use map_char.
13680 (grub_console_getcharwidth): New function.
13681 (grub_console_term): Specified grub_console_getcharwidth as
13684 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13685 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13687 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13689 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13690 on grub_strtoul completely.
13691 (write_char): Declare local variables in the beginning of the
13693 (grub_vesafb_getcharwidth): New function.
13694 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13697 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13699 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13700 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13701 commands/i386/pc/vbetest.c.
13703 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13704 call grub_vbe_get_controller_info again, because the returned
13705 information is volatile.
13706 (grub_vbe_set_video_mode): Mostly rewritten.
13707 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13708 grub_vbe_status_t correctly.
13709 (grub_vbe_get_video_mode_info): Likewise.
13710 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13711 several if statements.
13713 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13714 * commands/i386/pc/vbeinfo.c: ... this.
13716 * commands/i386/pc/vbe_test.c: Renamed to ...
13717 * commands/i386/pc/vbetest.c: ... this.
13719 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13721 (grub_cmd_vbeinfo): ... this. Save video modes before
13722 iterating. Skip a video mode, if it is not available, not enough
13723 information is given or it is monochrome. Show the memory
13724 model. Leave the interpretation of MODEVAR to grub_strtoul
13726 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13727 (GRUB_MOD_FINI): Likewise.
13729 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13730 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13731 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13732 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13733 grub_strtoul completely.
13734 (real2pm): Removed.
13735 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13736 (GRUB_MOD_FINI): Likewise.
13738 * normal/misc.c: Include grub/mm.h.
13740 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13741 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13742 (vbe_list_modes_mod_SOURCES): Removed.
13743 (vbe_list_modes_mod_CFLAGS): Likewise.
13744 (vbe_test_mod_SOURCES): Likewise.
13745 (vbe_test_mod_CFLAGS): Likewise.
13746 (vbeinfo_mod_SOURCES): New variable.
13747 (vbeinfo_mod_CFLAGS): Likewise.
13748 (vbetest_mod_SOURCES): Likewise.
13749 (vbetest_mod_CFLAGS): Likewise.
13751 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13753 * normal/misc.c: New file.
13755 * DISTLIST: Added normal/misc.c.
13757 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13758 DISK to HOOK. Call HOOK with DISK.
13759 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13760 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13761 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13763 * normal/menu_entry.c (struct screen): Added a new member
13764 "completion_shown".
13765 (completion_buffer): New global variable.
13766 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13767 (store_completion): New function.
13768 (complete): Likewise.
13769 (clear_completions): Likewise.
13770 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13771 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13772 a tab, call complete.
13774 * normal/completion.c (disk_dev): Removed.
13775 (print_simple_completion): Likewise.
13776 (print_partition_completion): Likewise.
13777 (print_func): New global variable.
13778 (add_completion): Do not take the arguments WHAT or PRINT any
13779 longer. Added a new argument TYPE. Instead of printing directly,
13780 call PRINT_FUNC if not NULL.
13781 All callers changed.
13782 (complete_device): Use a local variable DEV instead of
13783 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13784 (grub_normal_do_completion): Take a new argument HOOK. Do not
13785 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13786 empty string, return NULL instead.
13787 All callers changed.
13789 * normal/cmdline.c (print_completion): New function.
13791 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13793 All callers changed.
13795 * kern/disk.c (grub_print_partinfo): Removed.
13797 * include/grub/partition.h (struct grub_partition_map): Add a new
13798 argument DISK into HOOK of ITERATE.
13799 (grub_partition_iterate): Add a new argument DISK to HOOK.
13801 * include/grub/normal.h (enum grub_completion_type): New enum.
13802 (grub_completion_type_t): New type.
13803 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13804 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13805 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13806 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13807 (grub_normal_do_completion): Added a new argument HOOK.
13808 (grub_normal_print_device_info): New prototype.
13810 * include/grub/disk.h (grub_print_partinfo): Removed.
13812 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13813 (normal_mod_SOURCES): Likewise.
13814 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13815 (normal_mod_SOURCES): Likewise.
13817 * commands/ls.c (grub_ls_list_disks): Use
13818 grub_normal_print_device_info instead of grub_print_partinfo. Free
13820 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13821 duplicating the code.
13823 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13825 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13826 follow GCS more precisely.
13827 * commands/i386/pc/vbe_test.c: Likewise.
13828 * include/grub/i386/pc/vbe.h: Likewise.
13829 * term/i386/pc/vesafb.c: Likewise.
13830 * video/i386/pc/vbe.c: Likewise.
13832 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13834 * DISTLIST: Added term/i386/pc/vesafb.c
13835 DISTLIST: Added video/i386/pc/vbe.c
13836 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13837 DISTLIST: Added commands/i386/pc/vbe_test.c.
13838 * commands/i386/pc/vbe_list_modes.c: New file.
13839 * commands/i386/pc/vbe_test.c: Likewise.
13840 * term/i386/pc/vesafb.c: Likewise.
13841 * video/i386/pc/vbe.c: Likewise.
13842 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13843 (grub_vbe_probe) Added prototype.
13844 (grub_vbe_set_video_mode) Likewise.
13845 (grub_vbe_get_video_mode) Likewise.
13846 (grub_vbe_get_video_mode_info) Likewise.
13847 (grub_vbe_set_pixel_rgb) Likewise.
13848 (grub_vbe_set_pixel_index) Likewise.
13849 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13850 (pkgdata_MODULES): Added vesafb.mod.
13851 (pkgdata_MODULES): Added vbe_list_modes.mod.
13852 (pkgdata_MODULES): Added vbe_test.mod.
13853 (vbe_mod_SOURCES): Added.
13854 (vbe_mod_CFLAGS): Likewise.
13855 (vesafb_mod_SOURCES): Likewise.
13856 (vesafb_mod_CFLAGS): Likewise.
13857 (vbe_list_modes_mod_SOURCES): Likewise.
13858 (vbe_list_modes_mod_CFLAGS): Likewise.
13859 (vbe_test_mod_SOURCES): Likewise.
13860 (vbe_test_mod_CFLAGS): Likewise.
13862 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13864 * normal/command.c (grub_command_execute): If INTERACTIVE is
13865 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13866 CMDLINE. Disable the pager if INTERACTIVE is true.
13867 All callers are changed.
13869 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13870 before reading a config file.
13871 * normal/main.c (read_config_file): Even if a command is not
13872 found, register it if it is within an entry.
13874 * util/grub-emu.c: Include sys/types.h and unistd.h.
13875 (options): Added --hold.
13876 (struct arguments): Added a new member "hold".
13877 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13879 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13880 cleared by a debugger, if it is not zero.
13882 * include/grub/normal.h (grub_command_execute): Add an argument
13885 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13887 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13889 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13891 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13892 program with another one, because the old one didn't detect a bug
13893 in gcc-3.4. Always use regparm 2, because the new test is still
13894 not enough for gcc-4.0. Someone must investigate a simple test
13895 case which detects a bug in gcc-4.0.
13897 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13899 * DISTLIST: Added normal/completion.c.
13901 * normal/completion.c: New file.
13903 * term/i386/pc/console.c (grub_console_getwh): New function.
13904 (grub_console_term): Assign grub_console_getwh to getwh.
13906 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13907 function is defined in normal/completion.c as
13908 grub_normal_do_completion.
13909 (grub_cmdline_get): Use grub_normal_do_completion instead of
13912 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13913 returns non-zero, otherwise return 0.
13914 (grub_partition_iterate): First, probe the partition map. Then,
13915 call ITERATE only for this partition map.
13917 * kern/misc.c (grub_strncmp): Rewritten.
13919 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13920 returns non-zero. Otherwise return 0.
13922 * include/grub/partition.h (grub_partition_map_iterate): Return
13923 int instead of void.
13925 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13927 * include/grub/misc.h (grub_strncmp): Change the type of N to
13930 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13933 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13934 unsigned explicitly before comparing it with I.
13936 * kern/main.c (grub_env_write_root): Add the attribute unused into
13939 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13940 normal/completion.c.
13941 (normal_mod_SOURCES): Likewise.
13942 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13943 (normal_mod_SOURCES): Likewise.
13945 * normal/command.c (grub_iterate_commands): If ITERATE returns
13946 non-zero, return one immediately.
13948 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13950 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13951 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13953 (grub_vbe_get_controller_info): New function.
13954 (grub_vbe_get_mode_info): Likewise.
13955 (grub_vbe_set_mode): Likewise.
13956 (grub_vbe_get_mode): Likewise.
13957 (grub_vbe_set_memory_window): Likewise.
13958 (grub_vbe_get_memory_window): Likewise.
13959 (grub_vbe_set_scanline_length): Likewise.
13960 (grub_vbe_get_scanline_length): Likewise.
13961 (grub_vbe_set_display_start): Likewise.
13962 (grub_vbe_get_display_start): Likewise.
13963 (grub_vbe_set_palette_data): Likewise.
13964 * include/grub/i386/pc/vbe.h: New file.
13966 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13968 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13969 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13970 * DISTLIST: Likewise.
13971 * kern/ieee1275/of.c: Moved to ...
13972 * kern/ieee1275/ieee1275.c: ... here.
13974 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13976 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13977 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13978 Pass 0 as `end' parameter to grub_strtoul().
13980 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13982 * include/grub/powerpc/ieee1275/console.h: Do not include
13983 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13985 (grub_console_cur_color): Remove i386-specific prototype.
13986 (grub_console_real_putchar): Likewise.
13987 (grub_console_checkkey): Likewise.
13988 (grub_console_getkey): Likewise.
13989 (grub_console_getxy): Likewise.
13990 (grub_console_gotoxy): Likewise.
13991 (grub_console_cls): Likewise.
13992 (grub_console_setcursor): Likewise.
13993 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13994 Include <grub/machine/console.h>.
13995 * term/ieee1275/ofconsole.c: Likewise.
13997 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13999 * Makefile.in (LIBLZO): New variable.
14001 * configure.ac: Check for LZO version 2.
14003 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14004 lzo/lzo1x.h instead of lzo1x.h.
14006 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14009 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14010 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14012 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14013 copying the data from PARTITION to P.
14015 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14017 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14018 negative, unload the module.
14020 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14021 map is "pc_partition_map" but not "pc".
14022 (usage): Fix the description. The options are --boot-image and
14023 --core-image but not --boot-file or --core-file.
14024 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14025 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14028 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14029 --core-file. Specify INSTALL_DEVICE as an argument.
14031 * util/console.c: Include config.h.
14032 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14033 [HAVE_NCURSES_H]: Include ncurses.h.
14034 [HAVE_CURSES_H]: Include curses.h.
14035 [!A_NORMAL] (A_NORMAL): Defined as zero.
14036 [!A_STANDOUT] (A_STANDOUT): Likewise.
14038 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14040 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14042 * configure.ac: Check for curses libraries and headers.
14044 * Makefile.in (LIBCURSES): New variable.
14046 * genmk.rb (Script::rule): Set the executable bits.
14048 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14049 name of the PC partition map is "pc_partition_map" but not "pc".
14051 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14053 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14054 (modules): Likewise.
14055 (usage): Added descriptions for --modules and --grub-probefs.
14056 Handle --modules and --grub-probefs. Save the arguments in MODULES
14057 and GRUB_PROBEFS, respectively.
14058 Auto-detect a filesystem module against GRUBDIR. If the result is
14059 empty and modules are not specified explicitly, abort the
14060 installation. Add the result to MODULES.
14062 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14063 disk/powerpc/ieee1275/ofdisk.c,
14064 include/grub/powerpc/ieee1275/init.h and
14065 term/powerpc/ieee1275/ofconsole.c.
14066 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14067 term/ieee1275/ofconsole.c.
14069 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14071 * COPYING: Upgraded to the latest version. Only the address of the
14072 FSF office has changed.
14074 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14076 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14077 kern/ieee1275.c with kern/ieee1275/of.c.
14079 * kern/ieee1275.c: Moved to ...
14080 * kern/ieee1275/of.c: ... here.
14082 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14084 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14087 * config.guess: Updated to the latest version from gnulib.
14088 * config.sub: Likewise.
14089 * install.sh: Likewise.
14090 * mkinstalldirs: Likewise.
14092 * include/grub/console.h: Removed. This file is arch-specific. Do
14093 not put this in include/grub.
14095 * include/grub/i386/pc/console.h: Resurrected.
14097 * util/console.c: Include grub/machine/console.h instead of
14099 * util/grub-emu.c: Likewise.
14101 2005-08-04 Marco Gerards <metgerards@student.han.nl>
14103 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14106 From Vincent Pelletier <subdino2004@yahoo.fr>
14107 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14108 Redefined to use grub_getwh.
14109 (grub_term): New member named getwh.
14110 (grub_getwh): New prototype.
14111 * kern/term.c (grub_getwh): New function.
14112 * term/i386/pc/console.c (grub_console_getwh): New function.
14113 (grub_console_term): New member `getwh'.
14114 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14115 (grub_vga_term): New member `getwh'.
14116 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14118 (grub_ofconsole_getw): New function.
14119 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14120 (grub_ofconsole_term): New field named getwh and new initial
14123 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14125 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14126 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14127 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14128 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14129 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14130 of <grub/machine/ieee1275.h>.
14131 * commands/ieee1275/reboot.c: Likewise.
14132 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14133 * kern/ieee1275.c: ... to here. All users updated. Change all
14134 parameter structs to use new type `grub_ieee1275_cell_t'.
14135 * term/powerpc/ieee1275/ofconsole.c: Move ...
14136 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14137 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14138 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14139 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14141 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14142 Remove unused prototypes. All users updated.
14143 * include/grub/powerpc/ieee1275/console.h: Removed.
14144 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14145 `grub_ieee1275_cell_t'.
14146 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14147 Cast comparisons with -1 to the correct type.
14148 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14149 type to match `grub_ieee1275_entry_fn'.
14151 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14153 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14155 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14156 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14158 (grub_probefs_SOURCES): New variable.
14160 * util/i386/pc/grub-probefs.c: New file.
14162 * util/i386/pc/grub-setup.c (main): Call
14163 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14164 grub_hfs_init and grub_jfs_init to initialize the system. Call
14165 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14166 grub_pc_partition_map_fini to finish the system.
14168 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14170 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14172 (grub_multiboot_load_elf32): Likewise.
14173 (grub_multiboot_is_elf64): Likewise.
14174 (grub_multiboot_load_elf64): Likewise.
14175 (grub_multiboot_load_elf): Likewise.
14176 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14177 an ELF32 or ELF64 file.
14178 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14180 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14181 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14182 NULL before calling FS->LABEL.
14183 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14184 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14185 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14186 before calling FS->LABEL.
14188 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14190 * util/i386/pc/grub-install.in (datadir): New variable.
14192 (pkgdatadir): New variable.
14193 (pkglibdir): Removed.
14195 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14197 * DISTLIST: Added util/i386/pc/grub-install.in.
14199 * util/i386/pc/grub-install.in: New file.
14201 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14202 (grub_install_SOURCES): Likewise.
14204 * genmk.rb: Added support for scripts.
14205 (Script): New class.
14206 (scripts): New variable.
14208 * Makefile.in (install-local): Install sbin_SCRIPTS by
14210 (uninstall): Remove sbin_SCRIPTS.
14212 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14213 device, try to get a GRUB device by
14214 grub_util_biosdisk_get_grub_dev.
14217 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14218 description for --device-map.
14220 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14222 Change the semantics of variable hooks. They now return strings
14223 instead of error values.
14225 * util/i386/pc/grub-setup.c: Include grub/env.h.
14226 (setup): Use grub_device_set_root instead of grub_env_set.
14228 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14229 grub_env_get instead of grub_device_set_root and
14230 grub_device_get_root, respectively.
14232 * kern/main.c (grub_env_write_root): New function.
14233 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14234 grub_env_set instead of grub_device_set_root.
14236 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14238 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14239 rather than calling ENV->WRITE_HOOK afterwards.
14240 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14241 passing a pointer of a pointer.
14242 (grub_register_variable_hook): Change the types of "read_hook" and
14243 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14245 Allocate the default empty string on the heap, because this string
14246 may be freed later.
14248 * kern/device.c: Include grub/env.h.
14249 (grub_device_set_root): Removed.
14250 (grub_device_get_root): Likewise.
14251 (grub_device_open): Use grub_env_get instead of
14252 grub_device_get_root.
14254 * include/grub/env.h (grub_env_read_hook_t): New type.
14255 (grub_env_write_hook_t): Likewise.
14256 (grub_env_var): Change the types of "read_hook" and "write_hook"
14257 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14258 (grub_register_variable_hook): Likewise.
14260 * include/grub/device.h (grub_device_set_root): Removed.
14261 (grub_device_set_root): Likewise.
14263 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14264 make sure that DIRNAME terminates with '/', so that
14265 grub_fat_find_dir will fail if PATH is not a directory.
14267 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14269 Use the qualifier auto for print_files and print_files_long.
14270 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14272 Put a newline only if there is no error.
14273 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14276 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14278 * kern/partition.c (grub_partition_probe): Initialize PART to
14279 NULL. Otherwise, when no partition map is registered, this returns
14282 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14284 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14285 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14288 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14290 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14291 information on each device, if it does not have partitions. Print
14292 "Device" instead of "Disk", because this function is not specific
14295 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14296 static to ensure that it is put on the memory rather than a
14299 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14301 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14302 (grub_cat_init): Likewise.
14303 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14304 (options): Likewise.
14305 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14306 (grub_configfile_init): Likewise.
14307 * font/manager.c (GRUB_MOD_INIT): Likewise.
14308 * commands/help.c (GRUB_MOD_INIT): Likewise.
14309 (grub_help_init): Likewise.
14310 * normal/command.c (grub_command_init): Likewise.
14311 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14312 * disk/loopback.c (grub_loop_init): Likewise.
14313 (GRUB_MOD_INIT): Likewise.
14314 * commands/ls.c (grub_ls_init): Likewise.
14315 (GRUB_MOD_INIT): Likewise.
14316 (options): Likewise.
14317 * commands/boot.c (grub_boot_init): Likewise.
14318 (GRUB_MOD_INIT): Likewise.
14319 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14320 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14321 (GRUB_MOD_INIT): Likewise.
14322 * commands/cmp.c (grub_cmp_init): Likewise.
14323 (GRUB_MOD_INIT): Likewise.
14325 * normal/arg.c: Use <> instead of "" to include header files.
14326 (SHORT_ARG_HELP): New macro.
14327 (SHORT_ARG_USAGE): Likewise.
14328 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14329 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14331 (find_short): Check if C is 'h' or 'u' explicitly.
14332 (grub_arg_show_help): Use space characters instead of tabs. Treat
14333 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14334 are shown with --help and --usage only if they are not used for
14335 the command itself.
14336 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14339 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14340 const into "longarg". Change the type of "shortarg" to int.
14342 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14344 * boot/i386/pc/boot.S (boot_drive_check): New label.
14346 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14349 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14350 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14352 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14354 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14355 When turning off Gate A20, skip the check and return immediately,
14356 because this is not fatal usually.
14358 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14360 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14361 be 0x7C00 instead of 0x8000.
14363 * boot/i386/pc/pxeboot.S: Rewritten.
14365 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14367 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14370 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14372 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14373 robustness. This routine now supports a BIOS call and System
14374 Control Port A to modify the gate A20.
14376 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14377 Increased to 0x440.
14379 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14381 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14382 device path and resulting ihandle.
14383 (grub_ofdisk_close): dprintf the ihandle being closed.
14384 (grub_ofdisk_read): dprintf function parameters.
14385 * kern/mm.c (grub_mm_init_region): Likewise.
14386 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14387 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14388 size, and boot arguments.
14389 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14390 before loading into memory.
14391 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14392 before loading into memory.
14394 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14396 * kern/mm.c: Added much documentation.
14397 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14398 8, set to 5 instead of 8.
14400 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14402 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14404 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14405 (grub_mkdevicemap_SOURCES): New variable.
14407 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14408 lib/device.c of GRUB Legacy.
14410 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14412 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14413 instead of PATH is NULL.
14415 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14417 * commands/cmp.c (BUFFER_SIZE): New macro.
14418 (grub_cmd_cmp): Close the right file at the right time. Compare
14419 only data just read. Don't report files of different size as
14420 identical. Dynamically allocate buffers. Move variable
14421 declarations at the beginning of function.
14423 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
14425 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14428 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14430 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14431 when backspace is pressed at beginning of line.
14433 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
14435 * DISTLIST: Added genfslist.sh.
14437 * normal/main.c (fs_module_list): New variable.
14438 (autoload_fs_module): New function.
14439 (read_fs_list): Likewise.
14440 (grub_normal_execute): Call read_fs_list.
14442 * kern/fs.c (grub_fs_autoload_hook): New variable.
14443 (grub_fs_probe): Added support for auto-loading.
14445 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14446 (grub_fs_module_list_t): New type.
14448 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14449 (grub_fs_autoload_hook): New prototype.
14451 * genfslist.sh: New file.
14453 * genmk.rb: Added a rule to generate a filesystem list.
14455 2005-06-30 Marco Gerards <metgerards@student.han.nl>
14457 * configure.ac: Fix the test for cross-compiling.
14459 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14460 define GRUB_UTIL anymore.
14462 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14463 so this function works on other systems than just big endian.
14464 (load_modules): Likewise.
14465 (add_segments): Likewise.
14467 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14469 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14470 contains `l' modifier, get a long from va_arg().
14472 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14474 * kern/mm.c (grub_free): If the next free block which is being
14475 merged is the first free block, set the first block to the block
14477 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14479 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14481 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14482 `grub_ieee1275_chosen'.
14484 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14486 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14487 (grub_ieee1275_chosen): New variable.
14488 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14490 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14491 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14492 Rename first argument to `phandle' for consistency.
14493 (grub_ieee1275_get_property_length): Likewise.
14494 (grub_ieee1275_next_property): Likewise. Change type of first argument
14495 to grub_ieee1275_phandle_t.
14496 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14497 Move export next to declaration.
14498 (grub_ieee1275_chosen): New variable.
14499 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14500 Correct cosmetic typo.
14501 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14502 `grub_ieee1275_chosen'.
14503 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14504 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14505 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14506 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14507 `grub_ieee1275_chosen'.
14509 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14511 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14513 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14514 /chosen/bootargs as "variable=value" pairs.
14516 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14518 * include/grub/misc.h (grub_dprintf): New macro.
14519 (grub_real_dprintf): New prototype.
14520 (grub_strword): Likewise.
14521 (grub_iswordseparator): Likewise.
14522 * kern/misc.c (grub_real_dprintf): New function.
14523 (grub_strword): Likewise.
14524 (grub_iswordseparator): Likewise.
14526 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14528 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14529 (roundup): Remove macro.
14530 (grub_ieee1275_flags): Make static.
14531 (grub_ieee1275_realmode): Remove.
14532 (grub_ieee1275_test_flag): New function.
14533 (grub_ieee1275_set_flag): Likewise.
14534 (find_options): Rename to `grub_ieee1275_find_options'; update
14535 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14536 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14537 (cmain): New prototype.
14538 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14539 `grub_ieee1275_flags' directly.
14540 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14541 machine/biosdisk.h.
14542 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14543 Don't include grub/machine/init.h.
14544 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14545 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14547 (grub_ieee1275_realmode): Likewise.
14548 (grub_ieee1275_flag): New enum.
14549 (grub_ieee1275_test_flag): New prototype.
14550 (grub_ieee1275_set_flag): New prototype.
14551 * include/grub/powerpc/ieee1275/init.h: Remove file.
14552 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14553 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14554 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14555 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14557 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14558 `grub_ieee1275_test_flag'.
14559 (grub_ieee1275_encode_devname): Likewise.
14561 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14563 * include/grub/powerpc/ieee1275/ieee1275.h
14564 (grub_ieee1275_encode_devname): New prototype.
14565 (grub_ieee1275_get_filename): Likewise.
14566 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14568 (grub_set_prefix): Likewise.
14569 (grub_machine_init): Call grub_set_prefix.
14570 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14571 (grub_parse_type): New enum.
14572 (grub_ieee1275_get_devargs): New function.
14573 (grub_ieee1275_get_devname): Likewise.
14574 (grub_ieee1275_parse_args): Likewise.
14575 (grub_ieee1275_get_filename): Likewise.
14576 (grub_ieee1275_encode_devname): Likewise.
14578 2005-03-30 Marco Gerards <metgerards@student.han.nl>
14580 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14581 `grub_loader_unset'.
14583 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14585 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14586 instead of grub_ieee1275_interpret.
14587 (grub_halt_init): New function.
14588 (grub_halt_fini): Likewise.
14589 (GRUB_MOD_INIT): Correct message grammar.
14590 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14591 instead of grub_ieee1275_interpret.
14592 (grub_reboot_init): New function.
14593 (grub_reboot_fini): Likewise.
14594 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14595 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14596 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14597 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14598 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14600 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14602 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14604 (grub_halt): Likewise.
14605 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14606 (cmain): Remove __attribute__((unused)).
14607 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14608 (grub_heap_len): Likewise.
14609 (grub_machine_fini): New function.
14610 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14611 (grub_halt): Likewise.
14612 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14614 * util/powerpc/ieee1275/misc.c: New file.
14616 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14618 * DISTLIST: New file.
14619 * gendistlist.sh: Likewise.
14621 * Makefile.in (COMMON_DISTFILES): Removed.
14622 (BOOT_DISTFILES): Likewise.
14623 (CONF_DISTFILES): Likewise.
14624 (DISK_DISTFILES): Likewise.
14625 (FS_DISTFILES): Likewise.
14626 (INCLUDE_DISTFILES): Likewise.
14627 (KERN_DISTFILES): Likewise.
14628 (LOADER_DISTFILES): Likewise.
14629 (TERM_DISTFILES): Likewise.
14630 (UTIL_DISTFILES): Likewise.
14631 (DISTFILES): Likewise.
14632 (uninstall): Uninstall files in $(pkgdata_DATA).
14633 (DISTLIST): New target.
14634 (distdir): Use the contents of the file DISTLIST to get a list of
14637 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14639 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14640 descriptor. This is ported from GRUB Legacy.
14642 * gencmdlist.sh: Added an extra semicolon to make it work with
14643 old sed versions. Reported by Robert Bihlmeyer
14644 <robbe@orcus.priv.at>.
14646 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
14648 Automatic loading of commands is supported.
14650 * normal/main.c (read_command_list): New function.
14651 (grub_normal_execute): Call read_command_list.
14653 * normal/command.c (grub_register_command): Return zero or CMD.
14654 Allocate CMD->NAME from the heap.
14655 Initialize CMD->MODULE_NAME to zero.
14656 Find the same name as well. If the same command is found and it is
14657 a dummy command, overwrite members. If it is not a dummy command,
14659 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14660 (grub_command_find): If a dummy command is found, load a module
14661 and retry to find a command only once.
14663 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14664 make sure that each command is loaded.
14666 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14668 (struct grub_command): Remove const from the member `name'.
14669 Add a new member `module_name'.
14670 (grub_register_command): Return grub_command_t.
14672 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14673 sure that each command is loaded.
14675 * genmk.rb (PModule::rule): Specify a module name without the
14676 suffix ".mod" to gencmdlist.sh.
14678 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14680 * gencmdlist.sh: New file.
14682 * genmk.rb (PModule::rule): Generate a rule for a command list.
14684 Generate command.lst from $(COMMANDFILES).
14686 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14687 (DATA): Added $(pkgdata_DATA).
14688 (install-local): Install files in $(pkgdata_DATA).
14690 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14692 * term/i386/pc/vga.c (debug_command): Removed.
14693 (GRUB_MOD_INIT): Do not register the command "debug".
14695 From Hollis Blanchard:
14696 * commands/configfile.c: New file.
14697 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14698 commands/configfile.c.
14699 (pkgdata_MODULES): Added configfile.mod.
14700 (configfile_mod_SOURCES): New variable.
14701 (configfile_mod_CFLAGS): Likewise.
14702 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14703 commands/configfile.c.
14704 (pkgdata_MODULES): Added configfile.mod.
14705 (configfile_mod_SOURCES): New variable.
14706 (configfile_mod_CFLAGS): Likewise.
14707 * util/grub-emu.c (main): Call grub_configfile_init and
14708 grub_configfile_fini.
14709 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14711 [GRUB_UTIL] (grub_configfile_fini): Likewise.
14713 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14715 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14718 * commands/help.c (grub_cmd_help): Do not print newlines after
14719 the last command in print_command_help.
14721 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14723 * commands/default.h: New file.
14724 * commands/timeout.h: Likewise.
14725 * normal/context.c: Likewise.
14727 * util/misc.c: Do not include sys/times.h.
14728 Include sys/time.h and grub/machine/time.h.
14729 (grub_get_rtc): Rewritten with gettimeofday.
14731 * util/grub-emu.c (main): Call grub_default_init and
14732 grub_timeout_init before grub_normal_init, and call
14733 grub_timeout_fini and grub_default_fini after grub_main.
14735 * util/console.c (grub_ncurses_checkkey): Return the read
14738 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14741 * normal/main.c (read_config_file): Push MENU. If this fails,
14742 print an error and wait for a user input.
14743 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14744 If a menu is empty or an error occurs, pop MENU.
14745 (grub_normal_execute): Pop and free MENU after grub_menu_run
14748 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14750 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14752 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14754 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14756 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14759 * include/grub/normal.h (struct grub_menu_list): New struct.
14760 (grub_menu_list_t): New type.
14761 (struct grub_context): New struct.
14762 (grub_context_t): New type.
14763 (grub_register_command): Got rid of EXPORT_FUNC.
14764 (grub_unregister_command): Likewise.
14765 (grub_context_get): New prototype.
14766 (grub_context_get_current_menu): Likewise.
14767 (grub_context_push_menu): Likewise.
14768 (grub_context_pop_menu): Likewise.
14769 [GRUB_UTIL] (grub_default_init): Likewise.
14770 [GRUB_UTIL] (grub_default_fini): Likewise.
14771 [GRUB_UTIL] (grub_timeout_init): Likewise.
14772 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14774 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14775 commands/timeout.c and normal/context.c.
14776 (pkgdata_MODULES): Added default.mod and timeout.mod.
14777 (normal_mod_SOURCES): Added normal/context.c.
14778 (default_mod_SOURCES): New variable.
14779 (default_mod_CFLAGS): Likewise.
14780 (timeout_mod_SOURCES): Likewise.
14781 (timeout_mod_CFLAGS): Likewise.
14782 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14784 (pkgdata_MODULES): Added default.mod and timeout.mod.
14785 (normal_mod_SOURCES): Added normal/context.c.
14786 (default_mod_SOURCES): New variable.
14787 (default_mod_CFLAGS): Likewise.
14788 (timeout_mod_SOURCES): Likewise.
14789 (timeout_mod_CFLAGS): Likewise.
14791 * Makefile.in (all-local): Added $(MKFILES).
14793 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14795 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14796 (grub_emu_SOURCES): Likewise.
14797 (pkgdata_MODULES): Add `sun.mod'.
14798 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14799 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14801 (pkgdata_MODULES): Add `sun.mod'.
14802 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14803 * include/grub/partition.h (grub_sun_partition_map_init): New
14805 (grub_sun_partition_map_fini): Likewise.
14806 * partmap/sun.c: New file.
14807 * util/grub-emu.c (main): Initialize and de-initialize the sun
14808 partitionmap support.
14810 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14812 This implements an Emacs-like menu entry editor.
14814 * normal/menu_entry.c: New file.
14816 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14817 characters to ASCII.
14818 (saved_char): New variable.
14819 (grub_ncurses_checkkey): Rewritten completely.
14820 (grub_ncurses_getkey): Likewise.
14821 (grub_ncurses_init): Call raw instead of cbreak.
14823 * normal/menu.c (print_entry): Do not put a space.
14824 (init_page): Renamed to ...
14825 (grub_menu_init_page): ... this. All callers changed.
14826 (edit_menu_entry): Removed.
14827 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14829 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14831 * kern/misc.c (grub_vprintf): Call grub_refresh.
14833 * normal/menu.c (DISP_LEFT): Renamed to ...
14834 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14835 * normal/menu.c (DISP_UP): Renamed to ...
14836 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14837 * normal/menu.c (DISP_RIGHT): Renamed to ...
14838 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14839 * normal/menu.c (DISP_DOWN): Renamed to ...
14840 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14841 * normal/menu.c (DISP_HLINE): Renamed to ...
14842 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14843 * normal/menu.c (DISP_VLINE): Renamed to ...
14844 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14845 * normal/menu.c (DISP_UL): Renamed to ...
14846 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14847 * normal/menu.c (DISP_UR): Renamed to ...
14848 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14849 * normal/menu.c (DISP_LL): Renamed to ...
14850 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14851 * normal/menu.c (DISP_LR): Renamed to ...
14852 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14853 * normal/menu.c (TERM_WIDTH): Renamed to ...
14854 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14855 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14856 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14857 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14858 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14859 * normal/menu.c (TERM_MARGIN): Renamed to ...
14860 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14861 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14862 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14863 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14864 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14865 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14866 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14867 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14868 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14869 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14870 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14871 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14872 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14873 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14874 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14875 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14876 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14877 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14878 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14879 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14880 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14881 All callers changed.
14883 * include/grub/normal.h: New prototype.
14885 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14886 normal/menu_entry.c.
14887 (normal_mod_SOURCES): Likewise.
14888 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14889 (normal_mod_SOURCES): Likewise.
14891 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14893 * include/grub/normal.h (grub_halt_init): New prototype.
14894 (grub_halt_fini): Likewise.
14895 (grub_reboot_init): Likewise.
14896 (grub_reboot_fini): Likewise.
14898 * util/grub-emu.c: Include signal.h.
14899 (main_env): New global variable.
14900 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14902 (grub_machine_fini): New function.
14903 (main): Call grub_halt_init and grub_reboot_init before
14904 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14905 Call setjmp with MAIN_ENV to go back afterwards.
14906 Call grub_machine_fini right before return.
14908 * include/grub/util/misc.h: Include setjmp.h.
14909 (main_env): New prototype.
14911 * include/grub/kernel.h (grub_machine_fini): New prototype.
14912 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14913 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14915 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14916 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14917 * term/i386/pc/console.c (grub_console_fini): Likewise.
14919 * util/i386/pc/misc.c: New file.
14921 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14922 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14923 commands/i386/pc/reboot.c.
14925 2005-02-14 Guillem Jover <guillem@hadrons.org>
14927 * include/grub/dl.h (grub_dl_check_header): New prototype.
14928 (grub_arch_dl_check_header): Change return type to grub_err_t,
14929 remove size parameter and export function. Update all callers.
14930 * kern/dl.c (grub_dl_check_header): New function.
14931 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14932 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14933 are inside the core.
14934 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14935 independent ELF header checks.
14936 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14937 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14938 `grub_dl_check_header' instead of explicit checks. Check for the
14940 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14941 `grub_dl_check_header' instead of explicit checks. Remove arch
14942 specific ELF header checks.
14944 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14947 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14949 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14950 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14952 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14954 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
14955 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
14956 (part_map_iterate): Clear `grub_errno' and return 0 if
14957 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
14958 * partmap/amiga.c (amiga_partition_map_iterate): Return
14959 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14960 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14962 2005-02-01 Guillem Jover <guillem@hadrons.org>
14964 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14967 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14969 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14971 (grub_rescue_cmd_linux): New prototype.
14972 (grub_rescue_cmd_initrd): Likewise.
14973 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14975 (grub_linux_release_mem): Release the memory for the initrd.
14976 (grub_load_linux): Renamed from this...
14977 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14978 Changed `entry' not to be static. Loop over memory regions to
14979 find another one when the default fails.
14980 (grub_rescue_cmd_initrd): New function.
14981 (grub_linux_init): Remove function.
14982 (grub_linux_fini): Likewise.
14983 (GRUB_MOD_INIT): Register `initrd'.
14984 (GRUB_MOD_FINI): Unregister `initrd'.
14985 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14987 (grub_linux_normal_fini): Likewise.
14988 (GRUB_MOD_INIT): Register `initrd'.
14989 (GRUB_MOD_FINI): Unregister `initrd'.
14991 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14993 * commands/help.c: New file.
14994 * normal/arg.c (show_help): Renamed to...
14995 (grub_arg_show_help): ... this.
14996 * commands/i386/pc/halt.c: New file.
14997 * commands/i386/pc/reboot.c: Likewise.
14998 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14999 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15000 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15001 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15003 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15005 (pkgdata_MODULES): Add `help.mod'.
15006 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15007 * grub/i386/pc/init.h (grub_reboot): New prototype.
15008 (grub_halt): Likewise.
15009 * include/grub/normal.h (grub_arg_show_help): New prototype.
15010 (grub_help_init): Likewise.
15011 (grub_help_fini): Likewise.
15012 * util/grub-emu.c (main): Initialize and deinitialize the help
15015 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15017 * normal/command.c (grub_command_init): Fixed the description of
15018 the `set' and `unset' commands.
15020 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15022 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15024 * commands/ieee1275/halt.c: New file.
15025 * commands/ieee1275/reboot.c: Likewise.
15026 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15027 `__attribute__ ((unused))'. Some GCS related fixed.
15028 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15029 (grub_suspend_fini): Likewise.
15030 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15032 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15033 (halt_mod_CFLAGS): New variables.
15034 * include/grub/powerpc/ieee1275/ieee1275.h
15035 (grub_ieee1275_interpret): New prototype.
15037 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15039 * include/grub/misc.h (memmove): New prototype.
15040 (memcpy): Likewise.
15042 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15044 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15045 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15047 2005-01-22 Marco Gerards <metgerards@student.han.nl>
15049 * kern/misc.c (grub_strndup): Function rewritten.
15051 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15053 * normal/menu.c (TERM_WIDTH): Macro redefined.
15054 (TERM_TOP_BORDER_Y): Likewise.
15055 (draw_border): Replaced while-loop by a for-loop. Make the number
15056 of lines consistent with the number of lines displayed in
15057 print_entries. Added a margin below the rectangle.
15058 (print_entry): Make the entry fit in the rectangle.
15059 (print_entries): Display the scroll arrows next to the right
15062 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15064 * fs/minix.c (grub_minix_find_file): Reserve more space for
15065 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15066 `grub_strncpy' to copy `path' into it.
15068 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15070 Add the loopback device, a device via which files can be accessed
15073 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15074 (pkgdata_MODULES): Add loopback.mod.
15075 (loopback_mod_SOURCES): New variable.
15076 (loopback_mod_CFLAGS): Likewise.
15077 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15079 (pkgdata_MODULES): Add loopback.mod.
15080 (loopback_mod_SOURCES): New variable.
15081 (loopback_mod_CFLAGS): Likewise.
15082 * disk/loopback.c: new file.
15083 * include/grub/normal.h (grub_loop_init): New prototype.
15084 (grub_loop_fini): New prototype.
15085 * util/grub-emu.c (main): Initialize and de-initialize loopback
15087 * include/grub/disk.h (grub_disk_dev_id): Add
15088 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15090 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15092 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15094 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15095 (suspend_mod_SOURCES): New variable.
15096 (suspend_mod_CFLAGS): Likewise.
15097 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15099 * commands/ieee1275/suspend.c: New file.
15101 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15103 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15104 ((unused))' to `__attribute__ ((used))'.
15105 (GRUB_MOD_FINI): Likewise.
15106 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15107 * genmk.rb (PModule): Assign space to common symbols when linking
15110 2005-01-20 Marco Gerards <metgerards@student.han.nl>
15112 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15113 `unsigned' arguments to `grub_size_t'.
15114 (grub_malloc): Likewise.
15115 (grub_realloc): Likewise.
15116 (grub_memalign): Likewise.
15117 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15118 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15119 * util/misc.c (grub_malloc): Likewise.
15120 (grub_realloc): Likewise.
15121 * kern/mm.c (get_header_from_pointer): Change the casts to
15122 `unsigned' into a cast to `grub_size_t'.
15124 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15125 point to `currnode' when `currnode' is changed.
15127 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15128 Schottelius <nico-linux@schottelius.org>.
15130 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15132 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15133 (note_path): Remove variable.
15134 (GRUB_IEEE1275_NOTE_NAME): New macro.
15135 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15136 (grub_ieee1275_note_hdr): New structure.
15137 (grub_ieee1275_note_desc): Likewise.
15138 (grub_ieee1275_note): Likewise.
15139 (load_note): Remove `dir' argument. All callers updated. Remove
15140 `note_img' and `path'. Do not load a file from `note_path'.
15141 Initialize a struct grub_ieee1275_note and write that to `out'.
15142 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15144 2005-01-05 Marco Gerards <metgerards@student.han.nl>
15146 * util/misc.c (grub_util_read_image): Revert last change. It
15147 called `grub_util_read_at', which seeks from the beginning of the
15150 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15152 * TODO: Add note about endianness in grub-mkimage.
15153 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15155 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15156 (grub_mkimage_SOURCES): New target.
15157 * include/grub/kernel.h (grub_start_addr): Remove variable.
15158 (grub_end_addr): Likewise.
15159 (grub_total_module_size): Likewise.
15160 (grub_kernel_image_size): Likewise.
15161 (GRUB_MODULE_MAGIC): New constant.
15162 (grub_module_info): New structure.
15163 (grub_arch_modules_addr): New prototype.
15164 (grub_get_end_addr): Remove prototype.
15165 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15166 * include/grub/powerpc/ieee1275/kernel.h: New file.
15167 * include/grub/util/misc.h (grub_util_get_fp_size): New
15169 (grub_util_read_at): Likewise.
15170 (grub_util_write_image_at): Likewise.
15171 * kern/main.c (grub_get_end_addr): Remove function.
15172 (grub_load_modules): Call grub_arch_modules_addr instead of using
15173 grub_end_addr. Look for a grub_module_info struct in memory. Use
15174 the grub_module_info fields instead of calling grub_get_end_addr
15175 as loop conditions. Move grub_add_unused_region code here.
15176 (grub_add_unused_region): Remove function.
15177 * kern/i386/pc/init.c: Include grub/cache.h.
15178 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15179 one call to add_mem_region.
15180 (grub_arch_modules_addr): New function.
15181 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15182 (grub_total_module_size): Likewise.
15183 Include grub/machine/kernel.h.
15184 (grub_arch_modules_addr): New function.
15185 * util/grub-emu.c (grub_end_addr): Remove variable.
15186 (grub_total_module_size): Likewise.
15187 (grub_arch_modules_addr): New function.
15188 * util/misc.c: Include unistd.h.
15189 (grub_util_get_fp_size): New function.
15190 (grub_util_read_at): Likewise.
15191 (grub_util_write_image_at): Likewise.
15192 (grub_util_read_image): Call grub_util_read_at.
15193 (grub_util_write_image): Call grub_util_write_image_at.
15194 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15195 additional memory in kernel_img for a struct grub_module_info.
15196 Fill in that grub_module_info.
15197 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15199 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15201 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15203 * include/grub/powerpc/ieee1275/ieee1275.h
15204 (grub_ieee1275_milliseconds): New prototype.
15205 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15207 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15208 grub_ieee1275_milliseconds.
15210 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15212 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15214 (find_options): New function.
15215 (cmain): Call find_options.
15216 * include/grub/powerpc/ieee1275/ieee1275.h
15217 (grub_ieee1275_realmode): New extern variable.
15218 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15219 grub_map if grub_ieee1275_realmode is false.
15221 2004-12-29 Marco Gerards <metgerards@student.han.nl>
15223 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15224 lines are inserted and make it work like readline. Reported by
15225 Vincent Pelletier <subdino2004@yahoo.fr>.
15227 2004-12-28 Marco Gerards <metgerards@student.han.nl>
15229 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15231 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15232 `kern/powerpc/cache.S'.
15234 2004-12-27 Marco Gerards <metgerards@student.han.nl>
15236 * genmk.rb: Handle the `Program' class in the main loop. Written
15237 by Johan Rydberg <jrydberg@gnu.org>.
15238 (Program): New class.
15239 (programs): New variable.
15240 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15241 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15242 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15243 (help_arch): Function removed.
15244 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15245 `powerpc/libgcc.h' and `loader.h'.
15246 (pkgdata_PROGRAMS): New variable.
15247 (sbin_UTILITIES): Variable removed.
15248 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15249 (grubof_SOURCES): Variable re-defined so it only includes the
15250 core functionality.
15251 (grubof_CFLAGS): Remove `-DGRUBOF'.
15252 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15253 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15254 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15255 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15256 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15257 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15258 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15259 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15260 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15261 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15262 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15263 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15264 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15265 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15266 (pc_mod_CFLAGS): New variables.
15267 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15268 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15269 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15270 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15272 * include/grub/i386/pc/init.h (grub_os_area_addr)
15273 (rub_os_area_size): ... to here.
15274 * include/grub/powerpc/ieee1275/ieee1275.h
15275 (grub_ieee1275_entry_fn): Export symbol.
15276 * include/grub/powerpc/ieee1275/init.h: New file.
15277 * include/grub/powerpc/libgcc.h: Likewise.
15278 * include/grub/cache.h: Likewise.
15279 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15280 <hollis@penguinppc.org>.
15281 * kern/dl.c: Include <grub/cache.h>.
15282 (grub_dl_flush_cache): New function.
15283 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15285 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15286 (grub_console_init): Removed prototypes.
15287 (grub_machine_init): Don't initialize the modules anymore.
15288 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15290 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15291 Macro undef removed.
15292 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15293 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15294 relocation `R_PPC_REL32'. Return an error when the relocation is
15296 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15297 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15298 * util/misc.c (grub_arch_sync_caches): Likewise.
15300 2004-12-19 Marco Gerards <metgerards@student.han.nl>
15302 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15303 `symlist.c', add `grubof_symlist.c'.
15304 (symlist.c): Variable removed.
15305 (grubof_HEADERS): Variable added.
15306 (grubof_symlist.c): New target.
15307 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15308 `kernel_img_HEADERS'.
15309 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15310 * kern/powerpc/dl.c: New file.
15311 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15313 (grub_arch_dl_relocate_symbols): Likewise.
15314 (grub_register_exported_symbols): Likewise.
15316 2004-12-13 Marco Gerards <metgerards@student.han.nl>
15318 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15319 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15320 to fail instead. Reported by Vincent Pelletier
15321 <subdino2004@yahoo.fr>.
15323 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15324 it is not allocated. Reported by Vincent Pelletier
15325 <subdino2004@yahoo.fr>.
15327 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15328 output so the output looks better.
15330 2004-12-04 Marco Gerards <metgerards@student.han.nl>
15332 Modulize the partition map support and add support for the amiga
15335 * commands/ls.c: Include <grub/partition.h> instead of
15336 <grub/machine/partition.h>.
15337 * kern/disk.c: Likewise.
15338 * kern/rescue.c: Likewise.
15339 * loader/i386/pc/chainloader.c: Likewise.
15340 * normal/cmdline.c: Likewise.
15341 * kern/powerpc/ieee1275/init.c: Likewise.
15342 (grub_machine_init): Call `grub_pc_partition_map_init',
15343 `grub_amiga_partition_map_init' and
15344 `grub_apple_partition_map_init'.
15345 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15346 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15347 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15348 `partition.h' and `pc_partition.h'.
15349 (grub_setup_SOURCES): Remove
15350 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15351 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15352 (grub_emu_SOURCES): Likewise.
15353 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15354 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15355 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15356 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15357 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15358 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15359 (grubof_SOURCES): Likewise.
15360 * disk/i386/pc/partition.c: File removed.
15361 * disk/powerpc/ieee1275/partition.c: Likewise.
15362 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15363 * include/grub/i386/pc/partition.h: Likewise.
15364 * kern/partition.c: New file.
15365 * partmap/amiga.c: Likewise.
15366 * partmap/apple.c: Likewise.
15367 * partmap/pc.c: Likewise.
15368 * include/grub/partition.h: Likewise..
15369 * include/grub/pc_partition.h: Likewise.
15370 * util/grub-emu.c: Include <grub/partition.h> instead of
15371 <grub/machine/partition.h>.
15372 (main): Call `grub_pc_partition_map_init',
15373 `grub_amiga_partition_map_init' and
15374 `grub_apple_partition_map_init' and deinitialize afterwards.
15375 * util/i386/pc/biosdisk.c: Include `#include
15376 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15377 `<grub/machine/partition.h>'.
15378 * util/i386/pc/grub-setup.c: Likewise.
15379 * util/i386/pc/biosdisk.c: Likewise.
15380 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15381 partition information in case of a PC partition.
15382 * util/i386/pc/grub-setup.c: Include `#include
15383 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15384 `<grub/machine/partition.h>'.
15385 (setup): Only access the PC specific partition information in case
15388 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
15390 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15391 (grub_longjmp): Likewise.
15392 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15394 * normal/powerpc/setjmp.S: New file.
15395 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15396 `normal/powerpc/setjmp.S'.
15397 (grubof_CFLAGS): Add `-DGRUBOF'.
15398 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15399 [GRUB_UTIL && !GRUBOF].
15401 2004-11-16 Marco Gerards <metgerards@student.han.nl>
15403 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15404 property named `name'. Correctly handle the error returned by
15405 `grub_ieee1275_finddevice' if a device can not be opened.
15407 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15409 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15410 `actual' for negativity.
15411 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15414 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15416 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15417 (PAGE_OFFSET): New macro.
15418 (CRTC_ADDR_PORT): Likewise.
15419 (CRTC_DATA_PORT): Likewise.
15420 (START_ADDR_HIGH_REGISTER): Likewise.
15421 (START_ADDR_LOW_REGISTER): Likewise.
15422 (GRAPHICS_ADDR_PORT): Likewise.
15423 (GRAPHICS_DATA_PORT): Likewise.
15424 (READ_MAP_REGISTER): Likewise.
15425 (INPUT_STATUS1_REGISTER): Likewise.
15426 (INPUT_STATUS1_VERTR_BIT): Likewise.
15427 (page): New variable.
15428 (wait_vretrace): New function.
15429 (set_read_map): Likewise.
15430 (set_start_address): Likewise.
15431 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15433 (check_vga_mem): Take the page into account.
15434 (write_char): Likewise.
15435 (write_cursor): Likewise.
15436 (scroll_up): Likewise. Copy the page to the page that is not
15437 shown and switch between both pages.
15438 (grub_vga_putchar): Fix off by one error.
15439 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15442 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15444 Add support for iso9660 (including rockridge).
15446 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15447 (iso9660_mod_SOURCES): New variable.
15448 (iso9660_mod_CFLAGS): Likewise.
15449 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15450 * include/grub/fs.h (grub_iso9660_init): New prototype.
15451 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15452 * fs/iso9660.c: New file.
15454 * include/grub/misc.h (grub_strncat): New prototype.
15455 * kern/misc.c (grub_strncat): New function.
15457 * fs/hfs.c (grub_hfs_mount): Translate the error
15458 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15459 * fs/jfs.c (grub_jfs_mount): Likewise.
15460 * fs/ufs.c (grub_ufs_mount): Likewise.
15462 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15464 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15465 which initialized BAT registers.
15466 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15467 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15469 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15470 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15472 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15473 (grub_mapclaim): Likewise.
15474 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15475 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15478 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15480 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15481 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15482 -ffreestanding and -msoft-float.
15484 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15486 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15487 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15488 set in grub_ieee1275_flags.
15490 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15492 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15494 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15495 grub_console_init first.
15496 Change the memory range used for grub_ieee1275_claim and
15497 grub_mm_init_region.
15498 Print an error message if the claim fails.
15499 Include <grub/misc.h>.
15501 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15503 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15504 Call grub_children_iterate for device nodes of type `scsi',
15506 (grub_ofdisk_open): Remove manual device alias resolution.
15507 Fix memory leak when device cannot be opened.
15508 * include/grub/powerpc/ieee1275/ieee1275.h
15509 (grub_children_iterate): New prototype.
15510 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15512 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15513 Return -1 if args.size was -1.
15515 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15517 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15518 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15519 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15520 Open Firmware's memory for it; claim memory from _start to _end.
15521 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15522 (_end): New extern.
15523 (_start): Zero BSS from __bss_start to _end.
15524 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15526 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15528 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15530 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15531 -1 if args.base was -1.
15533 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15535 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15536 escape sequence instead of a literal ^L. Also call
15537 grub_ofconsole_gotoxy.
15539 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15541 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15542 void * arguments to grub_addr_t. All callers updated. Also make
15543 the `result' argument optional.
15544 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15545 All callers updated.
15547 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15549 * commands/ls.c (grub_ls_list_files): Use the string following the
15550 initial ')', if present, as the filesystem path.
15551 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15553 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15555 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15557 Make the source code of the menu interface more readable.
15559 * normal/menu.c: Include grub/mm.h.
15560 (TERM_WIDTH): New macro.
15561 (TERM_HEIGHT): Likewise.
15562 (TERM_INFO_HEIGHT): Likewise.
15563 (TERM_MARGIN): Likewise.
15564 (TERM_SCROLL_WIDTH): Likewise.
15565 (TERM_TOP_BORDER_Y): Likewise.
15566 (TERM_LEFT_BORDER_X): Likewise.
15567 (TERM_BORDER_WIDTH): Likewise.
15568 (TERM_MESSAGE_HEIGHT): Likewise.
15569 (TERM_BORDER_HEIGHT): Likewise.
15570 (TERM_NUM_ENTRIES): Likewise.
15571 (TERM_FIRST_ENTRY_Y): Likewise.
15572 (TERM_ENTRY_WIDTH): Likewise.
15573 (TERM_CURSOR_X): Likewise.
15574 (draw_border): Use macros instead of magic numbers.
15575 (print_entry): Likewise.
15576 (print_entries): Likewise.
15577 (run_menu): Likewise. Also, handle the key 'e'.
15578 (run_menu_entry): Ignore empty command lines.
15579 (print_message): Added a new argument EDIT. If EDIT is true,
15580 print a different message.
15581 (init_page): Likewise.
15582 (edit_menu_entry): New function. Not implemented yet.
15584 2004-09-17 Marco Gerards <metgerards@student.han.nl>
15586 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15587 can be loaded from normal mode.
15589 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15591 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15592 (multiboot_mod_CFLAGS): New variables.
15593 * loader/i386/pc/linux_normal.c: New file.
15594 * loader/i386/pc/multiboot_normal.c: Likewise.
15596 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15597 attribute `unused'.
15599 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15600 `fdiro' to read the mode information from instead of `diro'.
15602 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15603 looking up a symlink.
15605 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15607 * normal/command.c (grub_command_execute): Don't parse the
15608 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15609 flags of the command.
15611 * normal/menu.c (grub_menu_run): Fix typo.
15613 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15615 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15617 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15618 `y + 1' instead of `y - 1'.
15620 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15622 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15624 From Hollis Blanchard <hollis@penguinppc.org>:
15625 * kern/misc.c (memmove): New alias for grub_memmove.
15626 (memcmp): New alias for grub_memcmp.
15627 (memset): New alias for grub_memset.
15628 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15629 Change "int handle" to "grub_ieee1275_phandle_t handle".
15630 * include/grub/powerpc/ieee1275/ieee1275.h
15631 (grub_ieee1275_get_property): Likewise.
15633 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15635 Added normal mode command `chainloader' as module chain.mod, which
15636 depends on normal.mod and _chain.mod.
15638 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15639 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15640 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15642 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15643 but arguments parsing moved to ...
15644 (grub_chainloader_cmd): ... here. New function.
15645 * include/grub/i386/pc/chainloader.h: New file.
15646 * loader/i386/pc/chainloader_normal.c: Likewise.
15648 2004-09-11 Marco Gerards <metgerards@student.han.nl>
15650 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15651 (grub_mkimage_LDFLAGS): Likewise.
15652 (grub_emu_SOURCES): Likewise.
15653 (kernel_img_HEADERS): Added fshelp.h.
15654 * fs/ext2.c: Include <grub/fshelp.h>.
15655 (FILETYPE_REG): New macro.
15656 (FILETYPE_INO_REG): Likewise.
15657 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15659 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15661 (grub_fshelp_node): New struct.
15662 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15664 (grub_ext2_get_file_block): Removed function.
15665 (grub_ext2_read_block): New function.
15666 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15667 This function was written.
15668 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15669 (grub_ext2_find_file): Removed function.
15670 (grub_ext2_read_symlink): New function.
15671 (grub_ext2_iterate_dir): Likewise.
15672 (grub_ext2_open): Rewritten.
15673 (grub_ext2_dir): Rewritten.
15674 * include/grub/fshelp.h: New file.
15675 * fs/fshelp.c: Likewise.
15677 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15679 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15680 (print_message): Add a missing newline.
15681 (run_menu): Added timeout support.
15682 (run_menu_entry): New local function.
15683 (grub_menu_run): Added support for booting.
15685 * kern/loader.c (grub_loader_is_loaded): New function.
15687 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15688 (grub_get_rtc): Exported.
15690 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15691 (grub_get_rtc): Exported.
15693 * include/grub/normal.h (struct grub_command_list): Remove
15694 constant from the member `command'.
15696 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15698 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15700 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15702 2004-08-28 Marco Gerards <metgerards@student.han.nl>
15704 Add support for the JFS filesystem.
15706 * fs/jfs.c: New file.
15707 * include/grub/fs.h (grub_jfs_init): New prototype.
15708 (grub_jfs_fini): New prototype.
15709 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15710 (grub_emu_SOURCES): Likewise.
15711 (pkgdata_MODULES): Add jfs.mod.
15712 (jfs_mod_SOURCES): New variable.
15713 (jfs_mod_CFLAGS): Likewise.
15714 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15715 (grubof_SOURCES): Likewise.
15716 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15718 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15719 endian to the host endian.
15720 (grub_fat_utf16_to_utf8): Move function from there...
15721 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
15722 the endianness of the source string anymore.
15723 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15725 2004-08-24 Marco Gerards <metgerards@student.han.nl>
15727 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15728 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15729 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15730 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15732 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15733 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15734 for `node_found' and `it_dir'.
15735 (grub_hfs_dir): Add prototype for `dir_hook'.
15737 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15738 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15739 and `indir32' to silence a gcc warning.
15741 * include/grub/fs.h (grub_hfs_init): New prototype.
15742 (grub_hfs_fini): Likewise.
15745 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15747 Each disk device has its own id now. This is useful to make use
15748 of multiple disk devices.
15750 * include/grub/disk.h (grub_disk_dev_id): New enum.
15751 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15752 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15754 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15755 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15757 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15758 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15760 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15761 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15763 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15764 "id" which is used by the cache manager.
15766 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15769 2004-08-18 Marco Gerards <metgerards@student.han.nl>
15771 * fs/hfs.c: New file.
15772 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15773 (grub_emu_SOURCES): Likewise.
15774 (pkgdata_MODULES): Add hfs.mod.
15775 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15776 (grubof_SOURCES): Likewise.
15777 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15779 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15780 * kern/misc.c (grub_strncasecmp): Add function.
15782 2004-08-14 Marco Gerards <metgerards@student.han.nl>
15784 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15787 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15788 (grub_ext2_dir): In case the directory entry type is unknown, read
15791 2004-08-02 Peter Bruin <pjbruin@dds.nl>
15793 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15794 grub_load_linux instead of grub_rescue_cmd_linux as second
15795 argument of grub_rescue_register_command.
15797 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15799 2004-07-27 Marco Gerards <metgerards@student.han.nl>
15801 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15803 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15804 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15805 `loader/powerpc/ieee1275/linux.c',
15806 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15807 * include/grub/powerpc/ieee1275/ieee1275.h
15808 (grub_ieee1275_release): New prototype.
15809 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15810 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15811 normal, boot, linux and linux_normal.
15812 * loader/powerpc/ieee1275/linux.c: New file.
15813 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15815 2004-07-12 Marco Gerards <metgerards@student.han.nl>
15817 * normal/arg.c (grub_arg_parse): Correct error handling after
15818 reallocating the argumentlist (check if `argl' is not null instead
15819 of checking if `args' is not null).
15820 * kern/mm.c (grub_realloc): Return the same pointer when using the
15821 same region, instead of returning the header address.
15823 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15825 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15826 one block instead of two when looking for the initial partition.
15827 (grub_partition_probe): Initialize the local variable `p' with 0.
15828 Use base 10 for the grub_strtoul call.
15829 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15830 need for one local variable.
15831 (grub_strtoul): Don't add the new value to `num', instead of that
15834 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15836 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15837 (pxeboot_img_SOURCES): New variable.
15838 (pxeboot_img_ASFLAGS): Likewise.
15839 (pxeboot_img_LDFLAGS): Likewise.
15840 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15841 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15842 <lode_leroy@hotmail.com>.
15844 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15846 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15847 there was no input.
15849 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15851 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15852 the history buffer logic.
15854 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15856 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15857 (FILETYPE_INO_SYMLINK): New macros.
15858 (grub_ext2_find_file): Check if the node is a directory using the
15859 inode stat information instead of using the filetype in the
15860 dirent. Exclude the first character of an absolute symlink.
15861 (grub_ext2_dir): Mask out the filetype part of the mode member of
15864 2004-05-24 Marco Gerards <metgerards@student.han.nl>
15866 Add support for UFS version 1 and 2. Add support for the minix
15867 filesystem version 1 and 2, both the variants with 14 and 30 long
15870 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15872 (grub_emu_SOURCES): Likewise.
15873 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15874 (ufs_mod_SOURCES): New variable.
15875 (ufs_mod_CFLAGS): Likewise.
15876 (minix_mod_SOURCES): Likewise.
15877 (minix_mod_CFLAGS): Likewise.
15878 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15880 (grubof_SOURCES): Likewise.
15881 * fs/ufs.c: New file.
15882 * fs/minix.c: New file.
15883 * include/grub/fs.h (grub_ufs_init): New prototype.
15884 (grub_ufs_fini): Likewise.
15885 (grub_minix_init): Likewise.
15886 (grub_minix_fini): Likewise.
15887 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15890 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15892 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15893 commands/ls.c, commands/terminal.c, commands/boot.c,
15894 commands/cmp.c and commands/cat.c.
15895 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15897 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15900 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15902 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15903 and grub_, respectively. Because the conversion is trivial and
15904 mechanical, I omit the details here. Please refer to the CVS
15905 if you need more information.
15907 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15909 * include/pupa: Renamed to ...
15910 * include/grub: ... this.
15911 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15912 * util/i386/pc/grub-mkimage.c: ... this.
15913 * util/i386/pc/pupa-setup.c: Renamed to ...
15914 * util/i386/pc/grub-setup.c: ... this.
15915 * util/pupa-emu.c: Renamed to ...
15916 * util/grub-emu.c: ... this.
15918 2004-03-29 Marco Gerards <metgerards@student.han.nl>
15920 Add support for the newworld apple macintosh (PPC). This has been
15921 tested on the powerbook 2000 only. It only adds support for
15922 generic ieee1275 functions, console and disk support. This should
15923 be easy to port to other architectures with support for Open
15926 * configure.ac: Accept the powerpc as host_cpu. In the case of
15927 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15928 specific tests are only executed while building for the i386.
15929 Inverse test for crosscompile.
15930 * genmk.rb (Utility): Allow assembler files.
15931 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15932 * conf/powerpc-ieee1275.rmk: New file.
15933 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15934 * disk/powerpc/ieee1275/partition.c: Likewise.
15935 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15936 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15937 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15938 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15939 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15940 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15941 * include/pupa/powerpc/ieee1275/loader.h
15942 * include/pupa/powerpc/setjmp.h: Likewise.
15943 * include/pupa/powerpc/types.h: Likewise.
15944 * kern/powerpc/ieee1275/init.c: Likewise.
15945 * kern/powerpc/ieee1275/openfw.c: Likewise.
15946 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15948 These files were written by Johan Rydberg
15949 (jrydberg@night.trouble.net) and I only modified them slightly.
15951 * boot/powerpc/ieee1275/cmain.c: New file.
15952 * boot/powerpc/ieee1275/crt0.S: Likewise.
15953 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15954 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15956 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15958 * Makefile.in: Update copyright.
15959 * genmodsrc.sh: Likewise.
15960 * gensymlist.sh: Likewise.
15961 * term/i386/pc/vga.c: Indent correctly.
15963 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15964 bugreporting address.
15965 * util/i386/pc/pupa-setup.c (usage): Likewise,
15966 (main): Call pupa_ext2_init and pupa_ext2_fini.
15968 * fs/fat.c (log2): Renamed to ...
15969 (fat_log2): ... this.
15970 All callers changed.
15971 * kern/misc.c (memcpy): Alias to pupa_memmove.
15972 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15974 * util/console.c (pupa_ncurses_fini): Return 0.
15976 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15977 Move fail label here.
15978 [__GNU__]: Don't warn when using stat.
15979 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15980 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15981 long int. Use strtol instead of strtoul.
15983 2004-03-14 Marco Gerards <metgerards@student.han.nl>
15985 * commands/boot.c: New file.
15986 * commands/cat.c: Likewise.
15987 * commands/cmp.c: Likewise.
15988 * commands/ls.c: Likewise.
15989 * commands/terminal.c: Likewise.
15990 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15991 (pupa_register_command): Changed interface to match the new
15993 (pupa_command_execute): Changed (almost rewritten) so it uses
15994 pupa_split_command. Added support for setting variables using the
15996 (rescue_command): Changed to work with the new argument parser.
15997 (terminal_command): Moved from here to commands/terminal.c.
15998 (set_command): New function.
15999 (unset_command): New function.
16000 (insmod_command): New function.
16001 (rmmod_command): New function.
16002 (lsmod_command): New function.
16003 (pupa_command_init): Don't initialize the command terminal
16004 anymore. Initialize the commands set, unset, insmod, rmmod and
16006 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16007 (kernel_img_HEADERS): Add arg.h and env.h.
16008 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16009 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16010 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16012 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16014 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16015 (boot_mod_SOURCES): New variable.
16016 (terminal_mod_SOURCES): Likewise.
16017 (ls_mod_SOURCES): Likewise.
16018 (cmp_mod_SOURCES): Likewise.
16019 (cat_mod_SOURCES): Likewise.
16021 * normal/arg.c: New file.
16022 * kern/env.c: Likewise.
16023 * include/pupa/arg.h: Likewise.
16024 * include/pupa/env.h: Likewise.
16025 * font/manager.c (font_command): Changed to match argument parsing
16027 (PUPA_MOD_INIT): Likewise.
16028 * hello/hello.c (pupa_cmd_hello): Likewise.
16029 (PUPA_MOD_INIT): Likewise.
16030 * include/pupa/disk.h: Include <pupa/device.h>.
16031 (pupa_print_partinfo): New prototype.
16032 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16033 (pupa_dl_get_prefix): Likewise.
16034 * include/pupa/misc.h: Include <pupa/err.h>.
16035 (pupa_isgraph): New prototype.
16036 (pupa_isdigit): Likewise.
16037 (pupa_split_cmdline): Likewise.
16038 * include/pupa/normal.h: Include <pupa/arg.h>.
16039 (pupa_command): Changed the prototype of the member `func' to
16040 match the argument parsing interface. Added member `options'.
16041 (pupa_register_command): Updated to match function.
16042 (pupa_arg_parse): New prototype.
16043 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16044 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16045 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16046 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16047 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16048 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16049 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16050 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16051 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16052 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16053 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16054 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16055 * kern/disk.c: Include <pupa/file.h>.
16056 (pupa_print_partinfo): New function.
16057 * kern/dl.c: Include <pupa/env.h>.
16058 (pupa_dl_dir): Variable removed.
16059 (pupa_dl_load): Use the environment variable `prefix' instead of
16060 the variable pupa_dl_dir.
16061 (pupa_dl_set_prefix): Function removed.
16062 (pupa_dl_get_prefix): Likewise.
16063 * kern/i386/pc/init.c: Include <pupa/env.h>.
16064 (pupa_machine_init): Use the environment variable `prefix' instead of
16065 using pupa_dl_set_prefix to set the prefix.
16066 * kern/main.c: Include <pupa/env.h>.
16067 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16068 using pupa_dl_get_prefix to get the prefix.
16069 * kern/misc.c: Include <pupa/env.h>.
16070 (pupa_isdigit): New function.
16071 (pupa_isgraph): Likewise.
16072 (pupa_ftoa): Likewise.
16073 (pupa_vsprintf): Added support for printing values of the type
16074 `double'. Make it possible to format variable output when using
16075 formatting like `%1.2%f'.
16076 (pupa_split_cmdline): New function.
16077 * kern/rescue.c: Include <pupa/env.h>.
16078 (next_word): Removed function.
16079 (pupa_rescue_cmd_prefix): Likewise.
16080 (pupa_rescue_cmd_set): New function.
16081 (pupa_rescue_cmd_unset): New function.
16082 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16083 split the command line instead of splitting it here. Added
16084 support for setting variables using the syntax `foo=bar'. Don't
16085 initialize the prefix command anymore. Initialized the set and
16087 * normal/cmdline.c: Include <pupa/env.h>.
16088 (pupa_tab_complete): Added prototypes for print_simple_completion,
16089 print_partition_completion, add_completion, iterate_commands,
16090 iterate_dev, iterate_part and iterate_dir. Moved code to print
16091 partition information from here to kern/disk.c.
16092 (pupa_cmdline_run): Don't check if the function exists anymore.
16093 * normal/main.c: Include <pupa/env.h>.
16094 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16095 instead of using pupa_dl_get_prefix to get the prefix.
16096 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16097 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16099 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16100 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16101 ((unused))' to silence a gcc warning.
16102 (pupa_vga_setcolor): Likewise.
16103 (debug_command): Changed to match argument parsing
16105 * util/pupa-emu.c: Include <pupa/env.h>.
16106 (options): Added 0's for unused fields to silence a gcc warning.
16108 (main): Use the environment variable `prefix' instead of using
16109 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16110 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16113 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16114 * util/misc.c: Include <malloc.h>.
16115 (pupa_malloc): Rewritten so errors are correctly reported.
16116 (pupa_realloc): Likewise.
16117 (pupa_memalign): Likewise.
16118 (pupa_mm_init_region): Declare unused variables with
16119 `__attribute__ ((unused))' to silence a gcc warning.
16120 * normal/i386/setjmp.S: Remove tab at the end of the file to
16121 silence a gcc warning.
16122 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16123 variables with `__attribute__ ((unused))' to silence a gcc
16125 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16126 local variable i unsigned to silence a gcc warning.
16128 * kern/term.c: Include <pupa/misc.h>.
16129 (pupa_more_lines): New variable.
16130 (pupa_more): Likewise.
16131 (pupa_putcode): When the pager is active pause at the end of every
16133 (pupa_set_more): New function.
16134 * include/pupa/term.h (pupa_set_more): New prototype.
16137 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16139 Now this project is GRUB 2 rather than PUPA. The location of
16140 the CVS repository was moved to GRUB's.
16142 * configure.ac: Use bug-grub as the reporting address.
16143 Use GRUB instead of PUPA.
16144 Change the version number to 1.90.
16146 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16148 * genkernsyms.sh: Updated copyright information.
16149 * genmk.rb: Likewise.
16150 * genmodsrc.sh: Likewise.
16151 * gensymlist.sh: Likewise.
16152 * boot/i386/pc/boot.S: Likewise.
16153 * boot/i386/pc/diskboot.S: Likewise.
16154 * disk/i386/pc/biosdisk.c: Likewise.
16155 * disk/i386/pc/partition.c: Likewise.
16156 * font/manager.c: Likewise.
16157 * fs/ext2.c: Likewise.
16158 * fs/fat.c: Likewise.
16159 * include/pupa/boot.h: Likewise.
16160 * include/pupa/device.h: Likewise.
16161 * include/pupa/disk.h: Likewise.
16162 * include/pupa/dl.h: Likewise.
16163 * include/pupa/elf.h: Likewise.
16164 * include/pupa/err.h: Likewise.
16165 * include/pupa/file.h: Likewise.
16166 * include/pupa/font.h: Likewise.
16167 * include/pupa/fs.h: Likewise.
16168 * include/pupa/kernel.h: Likewise.
16169 * include/pupa/loader.h: Likewise.
16170 * include/pupa/misc.h: Likewise.
16171 * include/pupa/mm.h: Likewise.
16172 * include/pupa/net.h: Likewise.
16173 * include/pupa/normal.h: Likewise.
16174 * include/pupa/rescue.h: Likewise.
16175 * include/pupa/setjmp.h: Likewise.
16176 * include/pupa/symbol.h: Likewise.
16177 * include/pupa/term.h: Likewise.
16178 * include/pupa/types.h: Likewise.
16179 * include/pupa/i386/setjmp.h: Likewise.
16180 * include/pupa/i386/types.h: Likewise.
16181 * include/pupa/i386/pc/biosdisk.h: Likewise.
16182 * include/pupa/i386/pc/boot.h: Likewise.
16183 * include/pupa/i386/pc/console.h: Likewise.
16184 * include/pupa/i386/pc/init.h: Likewise.
16185 * include/pupa/i386/pc/kernel.h: Likewise.
16186 * include/pupa/i386/pc/linux.h: Likewise.
16187 * include/pupa/i386/pc/loader.h: Likewise.
16188 * include/pupa/i386/pc/memory.h: Likewise.
16189 * include/pupa/i386/pc/multiboot.h: Likewise.
16190 * include/pupa/i386/pc/partition.h: Likewise.
16191 * include/pupa/i386/pc/time.h: Likewise.
16192 * include/pupa/i386/pc/vga.h: Likewise.
16193 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16194 * include/pupa/util/getroot.h: Likewise.
16195 * include/pupa/util/misc.h: Likewise.
16196 * include/pupa/util/resolve.h: Likewise.
16197 * kern/device.c: Likewise.
16198 * kern/disk.c: Likewise.
16199 * kern/dl.c: Likewise.
16200 * kern/err.c: Likewise.
16201 * kern/file.c: Likewise.
16202 * kern/fs.c: Likewise.
16203 * kern/loader.c: Likewise.
16204 * kern/main.c: Likewise.
16205 * kern/misc.c: Likewise.
16206 * kern/mm.c: Likewise.
16207 * kern/rescue.c: Likewise.
16208 * kern/term.c: Likewise.
16209 * kern/i386/dl.c: Likewise.
16210 * kern/i386/pc/init.c: Likewise.
16211 * kern/i386/pc/lzo1x.S: Likewise.
16212 * kern/i386/pc/startup.S: Likewise.
16213 * loader/i386/pc/chainloader.c: Likewise.
16214 * loader/i386/pc/linux.c: Likewise.
16215 * loader/i386/pc/multiboot.c: Likewise.
16216 * normal/cmdline.c: Likewise.
16217 * normal/command.c: Likewise.
16218 * normal/main.c: Likewise.
16219 * normal/menu.c: Likewise.
16220 * normal/i386/setjmp.S: Likewise.
16221 * term/i386/pc/console.c: Likewise.
16222 * term/i386/pc/vga.c: Likewise.
16223 * util/console.c: Likewise.
16224 * util/genmoddep.c: Likewise.
16225 * util/misc.c: Likewise.
16226 * util/pupa-emu.c: Likewise.
16227 * util/resolve.c: Likewise.
16228 * util/unifont2pff.rb: Likewise.
16229 * util/i386/pc/biosdisk.c: Likewise.
16230 * util/i386/pc/getroot.c: Likewise.
16231 * util/i386/pc/pupa-mkimage.c: Likewise.
16232 * util/i386/pc/pupa-setup.c: Likewise.
16234 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16236 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16237 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16238 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16239 reading and reset it after reading.
16240 (pupa_ext2_close): Return PUPA_ERR_NONE.
16242 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16244 (struct linux_kernel_header): Add kernel_version and
16246 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16247 pupa_file_read succeeds.
16248 (pupa_rescue_cmd_initrd): Implement.
16250 2003-12-03 Marco Gerards <metgerards@student.han.nl>
16252 * fs/ext2.c (pupa_ext2_label): New function.
16253 (pupa_ext2_fs): Added label.
16254 * fs/fat.c (pupa_fat_label): New function.
16255 (pupa_fat_fs): Added label.
16256 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16258 * kern/misc.c (pupa_strndup): New function.
16259 * include/pupa/misc.h (pupa_strndup): New prototype.
16261 * include/pupa/normal.h: Include <pupa/err.h>.
16262 (pupa_set_history): New prototype.
16263 (pupa_iterate_commands): New prototype.
16264 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16265 <pupa/disk.h>, <pupa/file.h>.
16266 (hist_size): New variable.
16267 (hist_lines): Likewise.
16268 (hist_end): Likewise.
16269 (hist_used): Likewise.
16270 (pupa_set_history): New function.
16271 (pupa_history_get): Likewise.
16272 (pupa_history_add): Likewise.
16273 (pupa_history_replace): Likewise.
16274 (pupa_tab_complete): Likewise.
16275 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16276 completion shows partitionnames while completing partitions, this
16277 feature was suggested by Jeff Bailey.
16278 * normal/command.c (pupa_iterate_commands): New function.
16279 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16280 (pupa_normal_init): Initialize history buffer.
16281 (PUPA_MOD_INIT): Likewise.
16282 (pupa_normal_fini): Free the history buffer.
16283 (PUPA_MOD_FINI): Likewise.
16285 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16288 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16289 * configure.ac [i386]: Check for regparam bug.
16290 (NESTED_FUNC_ATTR) [! i386]: Defined.
16292 2003-11-17 Marco Gerards <metgerards@student.han.nl>
16294 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16295 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16296 (pupa_emu_SOURCES): New variable.
16297 (pupa_emu_LDFLAGS): Likewise.
16298 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16299 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16300 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16301 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16302 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16303 (pupa_jmp_buf): New typedef.
16304 (pupa_setjmp) [PUPA_UTIL]: New macro.
16305 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16306 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16307 (pupa_refresh): New prototype.
16308 * include/pupa/util/getroot.h: New file.
16309 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16311 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16312 (pupa_rescue_cmd_cat): Likewise.
16313 (pupa_rescue_cmd_ls): Likewise.
16314 (pupa_rescue_cmd_testload): Likewise.
16315 (pupa_rescue_cmd_lsmod): Likewise.
16316 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16317 * normal/menu.c (run_menu): Likewise.
16318 * kern/term.c (pupa_cls): Likewise.
16319 (pupa_refresh): New function.
16320 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16321 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16322 * util/console.c: New file.
16324 * util/i386/pc/getroot.c: New file.
16325 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16326 (pupa_putchar): New function.
16327 (pupa_refresh): Likewise.
16328 (xgetcwd): Function moved to ...
16329 (strip_extra_slashes): Likewise.
16330 (get_prefix): Likewise.
16331 * util/i386/pc/getroot.c: ... here.
16332 (find_root_device): Function moved and renamed to...
16333 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16334 Changed all callers.
16335 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16337 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16338 Changed all callers.
16339 * util/misc.c (pupa_memalign): New function.
16340 (pupa_mm_init_region): Likewise.
16341 (pupa_register_exported_symbols): Likewise.
16342 (pupa_putchar): Function removed.
16343 * util/pupa-emu.c: New file.
16345 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16347 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16348 (_multiboot_mod_SOURCES): New variable.
16349 (_multiboot_mod_CFLAGS): Likewise.
16350 * loader/i386/pc/multiboot.c: New file.
16351 * include/pupa/i386/pc/multiboot.h: Likewise.
16352 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16353 (pupa_multiboot_real_boot): New function.
16354 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16355 (pupa_multiboot_real_boot): New prototype.
16356 (pupa_rescue_cmd_multiboot): Likewise
16357 (pupa_rescue_cmd_module): Likewise.
16359 * kern/loader.c (pupa_loader_set): Continue when
16360 pupa_loader_unload_func() fails.
16361 (pupa_loader_unset): New function.
16362 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16364 * kern/misc.c (pupa_stpcpy): New function.
16365 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16367 2003-11-12 Marco Gerards <metgerards@student.han.nl>
16369 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16370 for available extensions.
16372 * include/pupa/i386/pc/time.h: New file.
16373 * kern/disk.c: Include <pupa/machine/time.h>.
16374 (PUPA_CACHE_TIMEOUT): New macro.
16375 (pupa_last_time): New variable.
16376 (pupa_disk_open): Flush the cache when there was a timeout.
16377 (pupa_disk_close): Reset the timer.
16378 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16380 * util/misc.c: Include <sys/times.h>
16381 (pupa_get_rtc): New function.
16383 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16385 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16387 (pupa_ext2_get_file_block): Use blocks member.
16389 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16390 first block. Return -1 instead of pupa_errno on error.
16392 2003-10-27 Marco Gerards <metgerards@student.han.nl>
16394 * README: In the pupa-mkimage example use _chain instead of chain
16395 and ext2 instead of fat.
16396 * TODO: Replace ext2fs with jfs as an example. Add an item for
16397 adding journal playback for ext2fs.
16398 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16399 (pkgdata_MODULES): Added ext2.mod.
16400 (ext2_mod_SOURCES): New variable.
16401 (ext2_mod_CFLAGS): Likewise.
16402 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16403 * include/pupa/misc.h (pupa_strncpy): New prototype.
16404 (pupa_strcat): Likewise.
16405 (pupa_strncmp): Likewise.
16406 * kern/misc.c (pupa_strcat): Enable function.
16407 (pupa_strncpy): New function.
16408 (pupa_strncmp): Likewise.
16409 * fs/ext2.c: New file.
16411 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16412 when the read failed before retrying.
16413 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16414 (_FILE_OFFSET_BITS): Likewise.
16415 * configure.ac: Added AC_SYS_LARGEFILE.
16417 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16419 * genmk.rb (PModule#rule): Make sure to get only symbol names
16420 from the output of nm.
16421 Reported by Robert Millan <zeratul2@wanadoo.es>.
16423 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16425 I forgot to check in these changes for a long time. This adds
16426 incomplete support for VGA console, and this is still very
16427 buggy. Also, a lot of consideration is required for I18N,
16428 UNICODE, and VGA font issues. Therefore, assume that this is
16429 such that "better than nothing".
16431 * font/manager.c: New file.
16432 * include/pupa/font.h: Likewise.
16433 * include/pupa/i386/pc/vga.h: Likewise.
16434 * term/i386/pc/vga.c: Likewise.
16435 * util/unifont2pff.rb: Likewise.
16437 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16438 (pkgdata_MODULES): Added vga.mod and font.mod.
16439 (vga_mod_SOURCES): New variables.
16440 (vga_mod_CFLAGS): Likewise.
16441 (font_mod_SOURCES): Likewise.
16442 (font_mod_CFLAGS): Likewise.
16444 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16446 * include/pupa/term.h: Include pupa/err.h.
16447 (struct pupa_term): Added init and fini.
16448 Changed the argument of putchar to pupa_uint32_t.
16450 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16451 (pupa_console_real_putchar): New prototype.
16452 (pupa_console_putchar): Removed.
16453 (pupa_console_checkkey): Exported.
16454 (pupa_console_getkey): Likewise.
16456 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16459 * kern/term.c (pupa_term_set_current): Rewritten.
16460 (pupa_putchar): Likewise.
16461 (pupa_putcode): New function.
16463 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16464 (pupa_console_real_putchar): ... this.
16465 (pupa_vga_set_mode): New function.
16466 (pupa_vga_get_font): Likewise.
16468 * normal/command.c: Include pupa/term.h.
16469 (terminal_command): New function.
16470 (pupa_command_init): Register the command "terminal".
16472 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16473 (DISP_UP): Likewise.
16474 (DISP_RIGHT): Likewise.
16475 (DISP_DOWN): Likewise.
16476 (DISP_HLINE): Likewise.
16477 (DISP_VLINE): Likewise.
16478 (DISP_UL): Likewise.
16479 (DISP_UR): Likewise.
16480 (DISP_LL): Likewise.
16481 (DISP_LR): Likewise.
16483 * term/i386/pc/console.c (pupa_console_putchar): New function.
16485 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16487 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16488 FIX. Reverse the path_list.
16490 * include/pupa/normal.h: Export pupa_register_command and
16491 pupa_unregister_command.
16493 * hello/hello.c (pupa_cmd_hello): New module.
16494 * conf/i386-pc.rmk: Added hello.mod.
16496 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16498 * kern/i386/pc/lzo1x.S: New file.
16500 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16501 (compress_kernel): New variable.
16502 (generate_image): Heavily modified to support compressing a
16503 large part of the core image.
16505 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16507 (pupa_util_load_image): New function.
16509 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16510 (pupa_compressed_size): New variable.
16511 (codestart): Enable Gate A20 here.
16512 Decompress the compressed part of the core image.
16513 Rearrange the code to put functions and variables which are
16514 required for initialization in the non-compressed part.
16517 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16520 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16522 * include/pupa/i386/pc/kernel.h
16523 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16524 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16525 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16526 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16527 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16529 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16531 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16532 (Utility#rule): Likewise.
16534 * configure.ac: Check if LZO is available.
16536 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16538 * include/pupa/normal.h: New file.
16539 * include/pupa/setjmp.h: Likewise.
16540 * include/pupa/i386/setjmp.h: Likewise.
16541 * normal/cmdline.c: Likewise.
16542 * normal/command.c: Likewise.
16543 * normal/main.c: Likewise.
16544 * normal/menu.c: Likewise.
16545 * normal/i386/setjmp.S: Likewise.
16547 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16548 (pupa_rescue_cmd_initrd): Likewise.
16550 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16553 * kern/i386/pc/startup.S (translation_table): New variable.
16554 (translate_keycode): New function.
16555 (pupa_console_getkey): Call translate_keycode.
16557 * kern/rescue.c (attempt_normal_mode): New function.
16558 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16559 it failed, print a message.
16561 * kern/mm.c (pupa_real_malloc): Print more information when a
16562 free magic is broken.
16563 (pupa_free): If the first free header is not free actually, set
16566 * kern/main.c (pupa_load_normal_mode): Just load the module
16568 (pupa_main): Don't print the message
16569 "Entering into rescue mode..." here.
16571 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16573 (pupa_rescue_cmd_initrd): Likewise.
16574 (pupa_rescue_cmd_initrd): Likewise.
16576 * include/pupa/symbol.h (FUNCTION): Specify the type.
16577 (VARIABLE): Likewise.
16579 * include/pupa/err.h (pupa_err_t): Added
16580 PUPA_ERR_UNKNOWN_COMMAND.
16582 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16583 (pupa_dl_get_prefix): Likewise.
16585 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16586 Added _chain.mod and _linux.mod instead of chain.mod and
16588 (chain_mod_SOURCES): Renamed to ...
16589 (_chain_mod_SOURCES): ... this.
16590 (chain_mod_CFLAGS): Renamed to ...
16591 (_chain_mod_CFLAGS): ... this.
16592 (linux_mod_SOURCES): Renamed to ...
16593 (_linux_mod_SOURCES): ... this.
16594 (linux_mod_CFLAGS): Renamed to ...
16595 (_linux_mod_CFLAGS): ... this.
16596 (normal_mod_SOURCES): New variable.
16597 (normal_mod_CFLAGS): Likewise.
16598 (normal_mod_ASFLAGS): Likewise.
16600 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16602 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16605 * kern/dl.c (pupa_dl_ref): Refer depending modules
16607 (pupa_dl_unref): Unrefer depending modules recursively.
16608 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16609 a module is unloaded before one depending on that module is
16611 (pupa_dl_unload): Unload depending modules explicitly,
16614 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16616 * include/pupa/i386/pc/linux.h: New file.
16617 * loader/i386/pc/linux.c: Likewise.
16619 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16621 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16622 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16623 of PUPA_CHAINLOADER_BOOT_SECTOR.
16625 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16626 (pupa_linux_prot_size): New variable.
16627 (pupa_linux_tmp_addr): Likewise.
16628 (pupa_linux_real_addr): Likewise.
16629 (pupa_linux_boot_zimage): New function.
16630 (pupa_linux_boot_bzimage): Likewise.
16632 * kern/i386/pc/init.c (struct mem_region): New structure.
16633 (MAX_REGIONS): New macro.
16634 (mem_regions): New variable.
16635 (num_regions): Likewise.
16636 (pupa_os_area_addr): Likewise.
16637 (pupa_os_area_size): Likewise.
16638 (pupa_lower_mem): Likewise.
16639 (pupa_upper_mem): Likewise.
16640 (add_mem_region): New function.
16641 (compact_mem_regions): Likewise.
16642 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16643 the size of the conventional memory and that of so-called upper
16644 memory (before the first memory hole).
16645 Instead of adding each found region to free memory, use
16646 add_mem_region and add them after removing overlaps.
16647 Also, add only 1/4 of the upper memory to free memory. The rest
16648 is used for loading OS images. Maybe this is ad hoc, but this
16649 makes it much easier to relocate OS images when booting.
16651 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16652 (pupa_enter_rescue_mode): Don't register initrd and module.
16654 * kern/mm.c: Include pupa/dl.h.
16656 * kern/main.c: Include pupa/file.h and pupa/device.h.
16658 * kern/loader.c (pupa_loader_load_module_func): Removed.
16659 (pupa_loader_load_module): Likewise.
16661 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16664 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16665 (pupa_linux_tmp_addr): Likewise.
16666 (pupa_linux_real_addr): Likewise.
16667 (pupa_linux_boot_zimage): Likewise.
16668 (pupa_linux_boot_bzimage): Likewise.
16670 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16671 (pupa_upper_mem): Likewise.
16672 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16673 module is too dangerous.
16675 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16676 (pupa_os_area_size): Likewise.
16677 (pupa_loader_set): Remove the first argument. Loader doesn't
16678 manage modules or initrd any longer.
16679 (pupa_loader_load_module): Removed.
16681 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16682 (linux_mod_SOURCES): New variable.
16683 (linux_mod_CFLAGS): Likewise.
16685 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16687 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16688 the length of a blocklist correctly.
16690 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16691 Use ioctl only if the OS file is a block device.
16692 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16693 not very useful for normal files.
16695 * kern/main.c (pupa_set_root_dev): New function.
16696 (pupa_load_normal_mode): Likewise.
16697 (pupa_main): Call those above.
16699 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16702 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16704 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16706 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16707 (setup): Configure the installed partition information and the
16710 * loader/i386/pc/chainloader.c (my_mod): New variable.
16711 (pupa_chainloader_unload): New function.
16712 (pupa_rescue_cmd_chainloader): Refer itself.
16713 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16715 * kern/i386/pc/startup.S (install_partition): Removed.
16716 (version_string): Likewise.
16717 (config_file): Likewise.
16718 (pupa_install_dos_part): New variable.
16719 (pupa_install_bsd_part): Likewise.
16720 (pupa_prefix): Likewise.
16721 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16723 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16725 (make_install_device): New function.
16726 (pupa_machine_init): Set the dl prefix.
16728 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16729 (buf): Renamed to ...
16730 (linebuf): ... this.
16731 (pupa_rescue_cmd_prefix): New function.
16732 (pupa_rescue_cmd_insmod): Likewise.
16733 (pupa_rescue_cmd_rmmod): Likewise.
16734 (pupa_rescue_cmd_lsmod): Likewise.
16735 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16738 * kern/mm.c (pupa_memalign): If failed even after invalidating
16739 disk caches, unload unneeded modules and retry.
16741 * kern/misc.c (pupa_memmove): New function.
16742 (pupa_memcpy): Removed.
16743 (pupa_strcpy): New function.
16744 (pupa_itoa): Made static.
16746 * kern/dl.c (pupa_dl_iterate): New function.
16747 (pupa_dl_ref): Likewise.
16748 (pupa_dl_unref): Likewise.
16749 (pupa_dl_unload): Return if succeeded or not.
16750 (pupa_dl_unload_unneeded): New function.
16751 (pupa_dl_unload_all): Likewise.
16752 (pupa_dl_init): Renamed to ...
16753 (pupa_dl_set_prefix): ... this.
16754 (pupa_dl_get_prefix): New function.
16756 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16757 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16758 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16759 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16760 (pupa_install_dos_part): Declared.
16761 (pupa_install_bsd_part): Likewise.
16762 (pupa_prefix): Likewise.
16763 (pupa_boot_drive): Likewise.
16765 * include/pupa/types.h: Fix a typo.
16767 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16769 (pupa_memmove): Declared.
16770 (pupa_strcpy): Likewise.
16772 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16773 pupa_mod_init takes one argument, its own module.
16774 (pupa_dl_unload_unneeded): Declared.
16775 (pupa_dl_unload_all): Likewise.
16776 (pupa_dl_ref): Likewise.
16777 (pupa_dl_unref): Likewise.
16778 (pupa_dl_iterate): Likewise.
16779 (pupa_dl_init): Renamed to ...
16780 (pupa_dl_set_prefix): ... this.
16781 (pupa_dl_get_prefix): Declared.
16783 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16784 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16786 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16787 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16789 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16790 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16792 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16794 * util/i386/pc/pupa-setup.c (setup): Define the internal
16795 function find_first_partition_start at the top level, because GCC
16796 3.0.x cannot compile internal functions in deeper scopes
16798 (find_root_device): Use lstat instead of stat.
16799 Don't follow symbolic links.
16800 Fix the path-constructing code.
16802 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16803 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16804 by a BLKGETSIZE ioctl first, because block devices don't fill
16805 the member st_mode of the structure stat on Linux.
16806 [__linux__] (linux_find_partition): Use a temporary buffer
16807 REAL_DEV for the working space. Copy it to DEV before returning.
16808 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16809 buffer cache consistent.
16810 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16811 strncmp. The previous value was merely wrong.
16812 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16814 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16815 FAT size is 12. The previous value was merely wrong.
16817 * kern/main.c (pupa_main): Don't split the starting message from
16820 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16821 LF, because BIOS goes crazy about character attributes in this
16824 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16826 * include/i386/pc/util/biosdisk.h: New file.
16827 * util/i386/pc/biosdisk.c: Likewise.
16828 * util/i386/pc/pupa-setup.c: Likewise.
16830 * Makefile.in (INCLUDE_DISTFILES): Added
16831 include/pupa/i386/pc/util/biosdisk.h.
16832 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16833 directory util/i386/pc.
16834 (install-local): Added a rule for sbin_UTILITIES.
16835 (uninstall): Likewise.
16837 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16839 * util/misc.c (xrealloc): New function.
16840 (pupa_malloc): Likewise.
16841 (pupa_free): Likewise.
16842 (pupa_realloc): Likewise.
16843 (pupa_stop): Likewise.
16844 (pupa_putchar): Likewise.
16846 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16848 * include/pupa/util/misc.h (xrealloc): Declared.
16850 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16852 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16853 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16855 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16856 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16858 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16859 way should be implemented.
16860 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16862 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16863 the size of NAME for safety.
16864 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16867 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16868 (pupa_setup_SOURCES): Likewise.
16870 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16872 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16874 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16875 bunch of pushl's from pusha, because this destroys the return
16878 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16880 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16881 This means that any missing prototypes could be fatal. Also, you
16882 must take care when writing assembly code. See the comments at
16883 the beginning of startup.S, for more details.
16885 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16886 compilation mechanism.
16887 (pupa_chainloader_real_boot): Likewise.
16888 (pupa_biosdisk_rw_int13_extensions): Likewise.
16889 (pupa_biosdisk_rw_standard): Likewise.
16890 (pupa_biosdisk_check_int13_extensions): Likewise.
16891 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16892 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16893 (pupa_get_memsize): Likewise.
16894 (pupa_get_mmap_entry): Likewise.
16895 (pupa_console_putchar): Likewise.
16896 (pupa_console_setcursor): Likewise.
16897 (pupa_getrtsecs): Use pushl instead of push.
16899 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16900 memory instead of the stack for a mmap entry, because some
16901 BIOSes may ignore the maximum size and overflow.
16903 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16905 * genmk.rb (PModule#rule): Compile automatically generated
16906 sources with module-specific CFLAGS as well as other sources.
16908 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16910 * configure.ac: Check ld.
16911 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16912 respectively, before checking endianness and sizes.
16914 * Makefile.in (LD): New variable.
16916 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16918 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16920 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16922 * Changelog: New file.